@elizaos/cli 1.0.0-alpha.2 → 1.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/index-B8F8O6ta.js +266 -0
- package/dist/client/assets/index-B8F8O6ta.js.br +0 -0
- package/dist/client/assets/index-CRVugqmW.css +1 -0
- package/dist/client/assets/index-CRVugqmW.css.br +0 -0
- package/dist/client/elizaos-icon.png +0 -0
- package/dist/client/elizaos.webp +0 -0
- package/dist/client/index.html +13 -0
- package/dist/index.js +109 -81
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
var yb=t=>{throw TypeError(t)};var $d=(t,r,a)=>r.has(t)||yb("Cannot "+a);var P=(t,r,a)=>($d(t,r,"read from private field"),a?a.call(t):r.get(t)),be=(t,r,a)=>r.has(t)?yb("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,a),ce=(t,r,a,s)=>($d(t,r,"write to private field"),s?s.call(t,a):r.set(t,a),a),Ne=(t,r,a)=>($d(t,r,"access private method"),a);var vc=(t,r,a,s)=>({set _(o){ce(t,r,o,a)},get _(){return P(t,r,s)}});function uA(t,r){for(var a=0;a<r.length;a++){const s=r[a];if(typeof s!="string"&&!Array.isArray(s)){for(const o in s)if(o!=="default"&&!(o in t)){const c=Object.getOwnPropertyDescriptor(s,o);c&&Object.defineProperty(t,o,c.get?c:{enumerable:!0,get:()=>s[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&s(f)}).observe(document,{childList:!0,subtree:!0});function a(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(o){if(o.ep)return;o.ep=!0;const c=a(o);fetch(o.href,c)}})();function gs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qd={exports:{}},Rl={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var bb;function fA(){if(bb)return Rl;bb=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function a(s,o,c){var f=null;if(c!==void 0&&(f=""+c),o.key!==void 0&&(f=""+o.key),"key"in o){c={};for(var d in o)d!=="key"&&(c[d]=o[d])}else c=o;return o=c.ref,{$$typeof:t,type:s,key:f,ref:o!==void 0?o:null,props:c}}return Rl.Fragment=r,Rl.jsx=a,Rl.jsxs=a,Rl}var xb;function dA(){return xb||(xb=1,qd.exports=fA()),qd.exports}var g=dA(),Bd={exports:{}},Te={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Sb;function hA(){if(Sb)return Te;Sb=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=b&&M[b]||M["@@iterator"],typeof M=="function"?M:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,S={};function w(M,G,ee){this.props=M,this.context=G,this.refs=S,this.updater=ee||E}w.prototype.isReactComponent={},w.prototype.setState=function(M,G){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,G,"setState")},w.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function C(){}C.prototype=w.prototype;function N(M,G,ee){this.props=M,this.context=G,this.refs=S,this.updater=ee||E}var O=N.prototype=new C;O.constructor=N,T(O,w.prototype),O.isPureReactComponent=!0;var _=Array.isArray,L={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function V(M,G,ee,ae,re,oe){return ee=oe.ref,{$$typeof:t,type:M,key:G,ref:ee!==void 0?ee:null,props:oe}}function k(M,G){return V(M.type,G,void 0,void 0,void 0,M.props)}function U(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function K(M){var G={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(ee){return G[ee]})}var te=/\/+/g;function se(M,G){return typeof M=="object"&&M!==null&&M.key!=null?K(""+M.key):G.toString(36)}function de(){}function q(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(de,de):(M.status="pending",M.then(function(G){M.status==="pending"&&(M.status="fulfilled",M.value=G)},function(G){M.status==="pending"&&(M.status="rejected",M.reason=G)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function H(M,G,ee,ae,re){var oe=typeof M;(oe==="undefined"||oe==="boolean")&&(M=null);var pe=!1;if(M===null)pe=!0;else switch(oe){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(M.$$typeof){case t:case r:pe=!0;break;case v:return pe=M._init,H(pe(M._payload),G,ee,ae,re)}}if(pe)return re=re(M),pe=ae===""?"."+se(M,0):ae,_(re)?(ee="",pe!=null&&(ee=pe.replace(te,"$&/")+"/"),H(re,G,ee,"",function(Ee){return Ee})):re!=null&&(U(re)&&(re=k(re,ee+(re.key==null||M&&M.key===re.key?"":(""+re.key).replace(te,"$&/")+"/")+pe)),G.push(re)),1;pe=0;var ue=ae===""?".":ae+":";if(_(M))for(var me=0;me<M.length;me++)ae=M[me],oe=ue+se(ae,me),pe+=H(ae,G,ee,oe,re);else if(me=x(M),typeof me=="function")for(M=me.call(M),me=0;!(ae=M.next()).done;)ae=ae.value,oe=ue+se(ae,me++),pe+=H(ae,G,ee,oe,re);else if(oe==="object"){if(typeof M.then=="function")return H(q(M),G,ee,ae,re);throw G=String(M),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return pe}function j(M,G,ee){if(M==null)return M;var ae=[],re=0;return H(M,ae,"","",function(oe){return G.call(ee,oe,re++)}),ae}function B(M){if(M._status===-1){var G=M._result;G=G(),G.then(function(ee){(M._status===0||M._status===-1)&&(M._status=1,M._result=ee)},function(ee){(M._status===0||M._status===-1)&&(M._status=2,M._result=ee)}),M._status===-1&&(M._status=0,M._result=G)}if(M._status===1)return M._result.default;throw M._result}var z=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)};function Q(){}return Te.Children={map:j,forEach:function(M,G,ee){j(M,function(){G.apply(this,arguments)},ee)},count:function(M){var G=0;return j(M,function(){G++}),G},toArray:function(M){return j(M,function(G){return G})||[]},only:function(M){if(!U(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Te.Component=w,Te.Fragment=a,Te.Profiler=o,Te.PureComponent=N,Te.StrictMode=s,Te.Suspense=m,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Te.act=function(){throw Error("act(...) is not supported in production builds of React.")},Te.cache=function(M){return function(){return M.apply(null,arguments)}},Te.cloneElement=function(M,G,ee){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var ae=T({},M.props),re=M.key,oe=void 0;if(G!=null)for(pe in G.ref!==void 0&&(oe=void 0),G.key!==void 0&&(re=""+G.key),G)!$.call(G,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&G.ref===void 0||(ae[pe]=G[pe]);var pe=arguments.length-2;if(pe===1)ae.children=ee;else if(1<pe){for(var ue=Array(pe),me=0;me<pe;me++)ue[me]=arguments[me+2];ae.children=ue}return V(M.type,re,void 0,void 0,oe,ae)},Te.createContext=function(M){return M={$$typeof:f,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:c,_context:M},M},Te.createElement=function(M,G,ee){var ae,re={},oe=null;if(G!=null)for(ae in G.key!==void 0&&(oe=""+G.key),G)$.call(G,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(re[ae]=G[ae]);var pe=arguments.length-2;if(pe===1)re.children=ee;else if(1<pe){for(var ue=Array(pe),me=0;me<pe;me++)ue[me]=arguments[me+2];re.children=ue}if(M&&M.defaultProps)for(ae in pe=M.defaultProps,pe)re[ae]===void 0&&(re[ae]=pe[ae]);return V(M,oe,void 0,void 0,null,re)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(M){return{$$typeof:d,render:M}},Te.isValidElement=U,Te.lazy=function(M){return{$$typeof:v,_payload:{_status:-1,_result:M},_init:B}},Te.memo=function(M,G){return{$$typeof:p,type:M,compare:G===void 0?null:G}},Te.startTransition=function(M){var G=L.T,ee={};L.T=ee;try{var ae=M(),re=L.S;re!==null&&re(ee,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(Q,z)}catch(oe){z(oe)}finally{L.T=G}},Te.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Te.use=function(M){return L.H.use(M)},Te.useActionState=function(M,G,ee){return L.H.useActionState(M,G,ee)},Te.useCallback=function(M,G){return L.H.useCallback(M,G)},Te.useContext=function(M){return L.H.useContext(M)},Te.useDebugValue=function(){},Te.useDeferredValue=function(M,G){return L.H.useDeferredValue(M,G)},Te.useEffect=function(M,G){return L.H.useEffect(M,G)},Te.useId=function(){return L.H.useId()},Te.useImperativeHandle=function(M,G,ee){return L.H.useImperativeHandle(M,G,ee)},Te.useInsertionEffect=function(M,G){return L.H.useInsertionEffect(M,G)},Te.useLayoutEffect=function(M,G){return L.H.useLayoutEffect(M,G)},Te.useMemo=function(M,G){return L.H.useMemo(M,G)},Te.useOptimistic=function(M,G){return L.H.useOptimistic(M,G)},Te.useReducer=function(M,G,ee){return L.H.useReducer(M,G,ee)},Te.useRef=function(M){return L.H.useRef(M)},Te.useState=function(M){return L.H.useState(M)},Te.useSyncExternalStore=function(M,G,ee){return L.H.useSyncExternalStore(M,G,ee)},Te.useTransition=function(){return L.H.useTransition()},Te.version="19.0.0",Te}var wb;function Gl(){return wb||(wb=1,Bd.exports=hA()),Bd.exports}var y=Gl();const hr=gs(y),mA=uA({__proto__:null,default:hr},[y]);var Id={exports:{}},Tl={},Vd={exports:{}},Yd={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Eb;function pA(){return Eb||(Eb=1,function(t){function r(j,B){var z=j.length;j.push(B);e:for(;0<z;){var Q=z-1>>>1,M=j[Q];if(0<o(M,B))j[Q]=B,j[z]=M,z=Q;else break e}}function a(j){return j.length===0?null:j[0]}function s(j){if(j.length===0)return null;var B=j[0],z=j.pop();if(z!==B){j[0]=z;e:for(var Q=0,M=j.length,G=M>>>1;Q<G;){var ee=2*(Q+1)-1,ae=j[ee],re=ee+1,oe=j[re];if(0>o(ae,z))re<M&&0>o(oe,ae)?(j[Q]=oe,j[re]=z,Q=re):(j[Q]=ae,j[ee]=z,Q=ee);else if(re<M&&0>o(oe,z))j[Q]=oe,j[re]=z,Q=re;else break e}}return B}function o(j,B){var z=j.sortIndex-B.sortIndex;return z!==0?z:j.id-B.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,d=f.now();t.unstable_now=function(){return f.now()-d}}var m=[],p=[],v=1,b=null,x=3,E=!1,T=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function O(j){for(var B=a(p);B!==null;){if(B.callback===null)s(p);else if(B.startTime<=j)s(p),B.sortIndex=B.expirationTime,r(m,B);else break;B=a(p)}}function _(j){if(S=!1,O(j),!T)if(a(m)!==null)T=!0,q();else{var B=a(p);B!==null&&H(_,B.startTime-j)}}var L=!1,$=-1,V=5,k=-1;function U(){return!(t.unstable_now()-k<V)}function K(){if(L){var j=t.unstable_now();k=j;var B=!0;try{e:{T=!1,S&&(S=!1,C($),$=-1),E=!0;var z=x;try{t:{for(O(j),b=a(m);b!==null&&!(b.expirationTime>j&&U());){var Q=b.callback;if(typeof Q=="function"){b.callback=null,x=b.priorityLevel;var M=Q(b.expirationTime<=j);if(j=t.unstable_now(),typeof M=="function"){b.callback=M,O(j),B=!0;break t}b===a(m)&&s(m),O(j)}else s(m);b=a(m)}if(b!==null)B=!0;else{var G=a(p);G!==null&&H(_,G.startTime-j),B=!1}}break e}finally{b=null,x=z,E=!1}B=void 0}}finally{B?te():L=!1}}}var te;if(typeof N=="function")te=function(){N(K)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,de=se.port2;se.port1.onmessage=K,te=function(){de.postMessage(null)}}else te=function(){w(K,0)};function q(){L||(L=!0,te())}function H(j,B){$=w(function(){j(t.unstable_now())},B)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_continueExecution=function(){T||E||(T=!0,q())},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_getFirstCallbackNode=function(){return a(m)},t.unstable_next=function(j){switch(x){case 1:case 2:case 3:var B=3;break;default:B=x}var z=x;x=B;try{return j()}finally{x=z}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(j,B){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var z=x;x=j;try{return B()}finally{x=z}},t.unstable_scheduleCallback=function(j,B,z){var Q=t.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?Q+z:Q):z=Q,j){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=z+M,j={id:v++,callback:B,priorityLevel:j,startTime:z,expirationTime:M,sortIndex:-1},z>Q?(j.sortIndex=z,r(p,j),a(m)===null&&j===a(p)&&(S?(C($),$=-1):S=!0,H(_,z-Q))):(j.sortIndex=M,r(m,j),T||E||(T=!0,q())),j},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(j){var B=x;return function(){var z=x;x=B;try{return j.apply(this,arguments)}finally{x=z}}}}(Yd)),Yd}var Rb;function gA(){return Rb||(Rb=1,Vd.exports=pA()),Vd.exports}var Gd={exports:{}},St={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Tb;function vA(){if(Tb)return St;Tb=1;var t=Gl();function r(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)p+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var s={d:{f:a,r:function(){throw Error(r(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(m,p,v){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:m,containerInfo:p,implementation:v}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return St.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,St.createPortal=function(m,p){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return c(m,p,null,v)},St.flushSync=function(m){var p=f.T,v=s.p;try{if(f.T=null,s.p=2,m)return m()}finally{f.T=p,s.p=v,s.d.f()}},St.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(m,p))},St.prefetchDNS=function(m){typeof m=="string"&&s.d.D(m)},St.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var v=p.as,b=d(v,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,E=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;v==="style"?s.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:x,fetchPriority:E}):v==="script"&&s.d.X(m,{crossOrigin:b,integrity:x,fetchPriority:E,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},St.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var v=d(p.as,p.crossOrigin);s.d.M(m,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(m)},St.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var v=p.as,b=d(v,p.crossOrigin);s.d.L(m,v,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},St.preloadModule=function(m,p){if(typeof m=="string")if(p){var v=d(p.as,p.crossOrigin);s.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(m)},St.requestFormReset=function(m){s.d.r(m)},St.unstable_batchedUpdates=function(m,p){return m(p)},St.useFormState=function(m,p,v){return f.H.useFormState(m,p,v)},St.useFormStatus=function(){return f.H.useHostTransitionStatus()},St.version="19.0.0",St}var Cb;function $x(){if(Cb)return Gd.exports;Cb=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),Gd.exports=vA(),Gd.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Ab;function yA(){if(Ab)return Tl;Ab=1;var t=gA(),r=Gl(),a=$x();function s(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}var c=Symbol.for("react.element"),f=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),x=Symbol.for("react.consumer"),E=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),_=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function $(e){return e===null||typeof e!="object"?null:(e=L&&e[L]||e["@@iterator"],typeof e=="function"?e:null)}var V=Symbol.for("react.client.reference");function k(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===V?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case m:return"Fragment";case d:return"Portal";case v:return"Profiler";case p:return"StrictMode";case S:return"Suspense";case w:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:return(e.displayName||"Context")+".Provider";case x:return(e._context.displayName||"Context")+".Consumer";case T:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case C:return n=e.displayName||null,n!==null?n:k(e.type)||"Memo";case N:n=e._payload,e=e._init;try{return k(e(n))}catch{}}return null}var U=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=Object.assign,te,se;function de(e){if(te===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);te=n&&n[1]||"",se=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+te+e+se}var q=!1;function H(e,n){if(!e||q)return"";q=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(Z){var W=Z}Reflect.construct(e,[],ie)}else{try{ie.call()}catch(Z){W=Z}e.call(ie.prototype)}}else{try{throw Error()}catch(Z){W=Z}(ie=e())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(Z){if(Z&&W&&typeof Z.stack=="string")return[Z.stack,W.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=l.DetermineComponentFrameRoot(),R=h[0],A=h[1];if(R&&A){var D=R.split(`
|
|
44
|
+
`),Y=A.split(`
|
|
45
|
+
`);for(u=l=0;l<D.length&&!D[l].includes("DetermineComponentFrameRoot");)l++;for(;u<Y.length&&!Y[u].includes("DetermineComponentFrameRoot");)u++;if(l===D.length||u===Y.length)for(l=D.length-1,u=Y.length-1;1<=l&&0<=u&&D[l]!==Y[u];)u--;for(;1<=l&&0<=u;l--,u--)if(D[l]!==Y[u]){if(l!==1||u!==1)do if(l--,u--,0>u||D[l]!==Y[u]){var J=`
|
|
46
|
+
`+D[l].replace(" at new "," at ");return e.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",e.displayName)),J}while(1<=l&&0<=u);break}}}finally{q=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?de(i):""}function j(e){switch(e.tag){case 26:case 27:case 5:return de(e.type);case 16:return de("Lazy");case 13:return de("Suspense");case 19:return de("SuspenseList");case 0:case 15:return e=H(e.type,!1),e;case 11:return e=H(e.type.render,!1),e;case 1:return e=H(e.type,!0),e;default:return""}}function B(e){try{var n="";do n+=j(e),e=e.return;while(e);return n}catch(i){return`
|
|
47
|
+
Error generating stack: `+i.message+`
|
|
48
|
+
`+i.stack}}function z(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(i=n.return),e=n.return;while(e)}return n.tag===3?i:null}function Q(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function M(e){if(z(e)!==e)throw Error(s(188))}function G(e){var n=e.alternate;if(!n){if(n=z(e),n===null)throw Error(s(188));return n!==e?null:e}for(var i=e,l=n;;){var u=i.return;if(u===null)break;var h=u.alternate;if(h===null){if(l=u.return,l!==null){i=l;continue}break}if(u.child===h.child){for(h=u.child;h;){if(h===i)return M(u),e;if(h===l)return M(u),n;h=h.sibling}throw Error(s(188))}if(i.return!==l.return)i=u,l=h;else{for(var R=!1,A=u.child;A;){if(A===i){R=!0,i=u,l=h;break}if(A===l){R=!0,l=u,i=h;break}A=A.sibling}if(!R){for(A=h.child;A;){if(A===i){R=!0,i=h,l=u;break}if(A===l){R=!0,l=h,i=u;break}A=A.sibling}if(!R)throw Error(s(189))}}if(i.alternate!==l)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?e:n}function ee(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=ee(e),n!==null)return n;e=e.sibling}return null}var ae=Array.isArray,re=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},pe=[],ue=-1;function me(e){return{current:e}}function Ee(e){0>ue||(e.current=pe[ue],pe[ue]=null,ue--)}function fe(e,n){ue++,pe[ue]=e.current,e.current=n}var Se=me(null),Ae=me(null),Ie=me(null),Et=me(null);function Rn(e,n){switch(fe(Ie,n),fe(Ae,e),fe(Se,null),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)&&(n=n.namespaceURI)?Fy(n):0;break;default:if(e=e===8?n.parentNode:n,n=e.tagName,e=e.namespaceURI)e=Fy(e),n=Qy(e,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Ee(Se),fe(Se,n)}function Vt(){Ee(Se),Ee(Ae),Ee(Ie)}function Fn(e){e.memoizedState!==null&&fe(Et,e);var n=Se.current,i=Qy(n,e.type);n!==i&&(fe(Ae,e),fe(Se,i))}function si(e){Ae.current===e&&(Ee(Se),Ee(Ae)),Et.current===e&&(Ee(Et),bl._currentValue=oe)}var Cr=Object.prototype.hasOwnProperty,Du=t.unstable_scheduleCallback,_u=t.unstable_cancelCallback,BR=t.unstable_shouldYield,IR=t.unstable_requestPaint,Tn=t.unstable_now,VR=t.unstable_getCurrentPriorityLevel,Pp=t.unstable_ImmediatePriority,Up=t.unstable_UserBlockingPriority,io=t.unstable_NormalPriority,YR=t.unstable_LowPriority,kp=t.unstable_IdlePriority,GR=t.log,FR=t.unstable_setDisableYieldValue,Ns=null,zt=null;function QR(e){if(zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(Ns,e,void 0,(e.current.flags&128)===128)}catch{}}function Ar(e){if(typeof GR=="function"&&FR(e),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(Ns,e)}catch{}}var Pt=Math.clz32?Math.clz32:WR,XR=Math.log,KR=Math.LN2;function WR(e){return e>>>=0,e===0?32:31-(XR(e)/KR|0)|0}var so=128,lo=4194304;function ya(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function oo(e,n){var i=e.pendingLanes;if(i===0)return 0;var l=0,u=e.suspendedLanes,h=e.pingedLanes,R=e.warmLanes;e=e.finishedLanes!==0;var A=i&134217727;return A!==0?(i=A&~u,i!==0?l=ya(i):(h&=A,h!==0?l=ya(h):e||(R=A&~R,R!==0&&(l=ya(R))))):(A=i&~u,A!==0?l=ya(A):h!==0?l=ya(h):e||(R=i&~R,R!==0&&(l=ya(R)))),l===0?0:n!==0&&n!==l&&(n&u)===0&&(u=l&-l,R=n&-n,u>=R||u===32&&(R&4194176)!==0)?n:l}function Os(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function ZR(e,n){switch(e){case 1:case 2:case 4:case 8:return n+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Hp(){var e=so;return so<<=1,(so&4194176)===0&&(so=128),e}function $p(){var e=lo;return lo<<=1,(lo&62914560)===0&&(lo=4194304),e}function Lu(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function Ms(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function JR(e,n,i,l,u,h){var R=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var A=e.entanglements,D=e.expirationTimes,Y=e.hiddenUpdates;for(i=R&~i;0<i;){var J=31-Pt(i),ie=1<<J;A[J]=0,D[J]=-1;var W=Y[J];if(W!==null)for(Y[J]=null,J=0;J<W.length;J++){var Z=W[J];Z!==null&&(Z.lane&=-536870913)}i&=~ie}l!==0&&qp(e,l,0),h!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=h&~(R&~n))}function qp(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var l=31-Pt(n);e.entangledLanes|=n,e.entanglements[l]=e.entanglements[l]|1073741824|i&4194218}function Bp(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var l=31-Pt(i),u=1<<l;u&n|e[l]&n&&(e[l]|=n),i&=~u}}function Ip(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vp(){var e=re.p;return e!==0?e:(e=window.event,e===void 0?32:db(e.type))}function eT(e,n){var i=re.p;try{return re.p=e,n()}finally{re.p=i}}var Nr=Math.random().toString(36).slice(2),bt="__reactFiber$"+Nr,Ot="__reactProps$"+Nr,li="__reactContainer$"+Nr,zu="__reactEvents$"+Nr,tT="__reactListeners$"+Nr,nT="__reactHandles$"+Nr,Yp="__reactResources$"+Nr,js="__reactMarker$"+Nr;function Pu(e){delete e[bt],delete e[Ot],delete e[zu],delete e[tT],delete e[nT]}function ba(e){var n=e[bt];if(n)return n;for(var i=e.parentNode;i;){if(n=i[li]||i[bt]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=Wy(e);e!==null;){if(i=e[bt])return i;e=Wy(e)}return n}e=i,i=e.parentNode}return null}function oi(e){if(e=e[bt]||e[li]){var n=e.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return e}return null}function Ds(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(s(33))}function ci(e){var n=e[Yp];return n||(n=e[Yp]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function dt(e){e[js]=!0}var Gp=new Set,Fp={};function xa(e,n){ui(e,n),ui(e+"Capture",n)}function ui(e,n){for(Fp[e]=n,e=0;e<n.length;e++)Gp.add(n[e])}var Qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rT=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Qp={},Xp={};function aT(e){return Cr.call(Xp,e)?!0:Cr.call(Qp,e)?!1:rT.test(e)?Xp[e]=!0:(Qp[e]=!0,!1)}function co(e,n,i){if(aT(n))if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+i)}}function uo(e,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+i)}}function Xn(e,n,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(n,i,""+l)}}function Yt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kp(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function iT(e){var n=Kp(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),l=""+e[n];if(!e.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var u=i.get,h=i.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(R){l=""+R,h.call(this,R)}}),Object.defineProperty(e,n,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(R){l=""+R},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function fo(e){e._valueTracker||(e._valueTracker=iT(e))}function Wp(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),l="";return e&&(l=Kp(e)?e.checked?"true":"false":e.value),e=l,e!==i?(n.setValue(e),!0):!1}function ho(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var sT=/[\n"\\]/g;function Gt(e){return e.replace(sT,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Uu(e,n,i,l,u,h,R,A){e.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.type=R:e.removeAttribute("type"),n!=null?R==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Yt(n)):e.value!==""+Yt(n)&&(e.value=""+Yt(n)):R!=="submit"&&R!=="reset"||e.removeAttribute("value"),n!=null?ku(e,R,Yt(n)):i!=null?ku(e,R,Yt(i)):l!=null&&e.removeAttribute("value"),u==null&&h!=null&&(e.defaultChecked=!!h),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.name=""+Yt(A):e.removeAttribute("name")}function Zp(e,n,i,l,u,h,R,A){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||n!=null))return;i=i!=null?""+Yt(i):"",n=n!=null?""+Yt(n):i,A||n===e.value||(e.value=n),e.defaultValue=n}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=A?e.checked:!!l,e.defaultChecked=!!l,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(e.name=R)}function ku(e,n,i){n==="number"&&ho(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function fi(e,n,i,l){if(e=e.options,n){n={};for(var u=0;u<i.length;u++)n["$"+i[u]]=!0;for(i=0;i<e.length;i++)u=n.hasOwnProperty("$"+e[i].value),e[i].selected!==u&&(e[i].selected=u),u&&l&&(e[i].defaultSelected=!0)}else{for(i=""+Yt(i),n=null,u=0;u<e.length;u++){if(e[u].value===i){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Jp(e,n,i){if(n!=null&&(n=""+Yt(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+Yt(i):""}function eg(e,n,i,l){if(n==null){if(l!=null){if(i!=null)throw Error(s(92));if(ae(l)){if(1<l.length)throw Error(s(93));l=l[0]}i=l}i==null&&(i=""),n=i}i=Yt(n),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l)}function di(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var lT=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tg(e,n,i){var l=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":l?e.setProperty(n,i):typeof i!="number"||i===0||lT.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function ng(e,n,i){if(n!=null&&typeof n!="object")throw Error(s(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||n!=null&&n.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var u in n)l=n[u],n.hasOwnProperty(u)&&i[u]!==l&&tg(e,u,l)}else for(var h in n)n.hasOwnProperty(h)&&tg(e,h,n[h])}function Hu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var oT=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),cT=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function mo(e){return cT.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var $u=null;function qu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hi=null,mi=null;function rg(e){var n=oi(e);if(n&&(e=n.stateNode)){var i=e[Ot]||null;e:switch(e=n.stateNode,n.type){case"input":if(Uu(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Gt(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var l=i[n];if(l!==e&&l.form===e.form){var u=l[Ot]||null;if(!u)throw Error(s(90));Uu(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<i.length;n++)l=i[n],l.form===e.form&&Wp(l)}break e;case"textarea":Jp(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&fi(e,!!i.multiple,n,!1)}}}var Bu=!1;function ag(e,n,i){if(Bu)return e(n,i);Bu=!0;try{var l=e(n);return l}finally{if(Bu=!1,(hi!==null||mi!==null)&&(Wo(),hi&&(n=hi,e=mi,mi=hi=null,rg(n),e)))for(n=0;n<e.length;n++)rg(e[n])}}function _s(e,n){var i=e.stateNode;if(i===null)return null;var l=i[Ot]||null;if(l===null)return null;i=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(s(231,n,typeof i));return i}var Iu=!1;if(Qn)try{var Ls={};Object.defineProperty(Ls,"passive",{get:function(){Iu=!0}}),window.addEventListener("test",Ls,Ls),window.removeEventListener("test",Ls,Ls)}catch{Iu=!1}var Or=null,Vu=null,po=null;function ig(){if(po)return po;var e,n=Vu,i=n.length,l,u="value"in Or?Or.value:Or.textContent,h=u.length;for(e=0;e<i&&n[e]===u[e];e++);var R=i-e;for(l=1;l<=R&&n[i-l]===u[h-l];l++);return po=u.slice(e,1<l?1-l:void 0)}function go(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function vo(){return!0}function sg(){return!1}function Mt(e){function n(i,l,u,h,R){this._reactName=i,this._targetInst=u,this.type=l,this.nativeEvent=h,this.target=R,this.currentTarget=null;for(var A in e)e.hasOwnProperty(A)&&(i=e[A],this[A]=i?i(h):h[A]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?vo:sg,this.isPropagationStopped=sg,this}return K(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=vo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=vo)},persist:function(){},isPersistent:vo}),n}var Sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yo=Mt(Sa),zs=K({},Sa,{view:0,detail:0}),uT=Mt(zs),Yu,Gu,Ps,bo=K({},zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ps&&(Ps&&e.type==="mousemove"?(Yu=e.screenX-Ps.screenX,Gu=e.screenY-Ps.screenY):Gu=Yu=0,Ps=e),Yu)},movementY:function(e){return"movementY"in e?e.movementY:Gu}}),lg=Mt(bo),fT=K({},bo,{dataTransfer:0}),dT=Mt(fT),hT=K({},zs,{relatedTarget:0}),Fu=Mt(hT),mT=K({},Sa,{animationName:0,elapsedTime:0,pseudoElement:0}),pT=Mt(mT),gT=K({},Sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vT=Mt(gT),yT=K({},Sa,{data:0}),og=Mt(yT),bT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xT={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ST={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wT(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=ST[e])?!!n[e]:!1}function Qu(){return wT}var ET=K({},zs,{key:function(e){if(e.key){var n=bT[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=go(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qu,charCode:function(e){return e.type==="keypress"?go(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?go(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),RT=Mt(ET),TT=K({},bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cg=Mt(TT),CT=K({},zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qu}),AT=Mt(CT),NT=K({},Sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),OT=Mt(NT),MT=K({},bo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),jT=Mt(MT),DT=K({},Sa,{newState:0,oldState:0}),_T=Mt(DT),LT=[9,13,27,32],Xu=Qn&&"CompositionEvent"in window,Us=null;Qn&&"documentMode"in document&&(Us=document.documentMode);var zT=Qn&&"TextEvent"in window&&!Us,ug=Qn&&(!Xu||Us&&8<Us&&11>=Us),fg=" ",dg=!1;function hg(e,n){switch(e){case"keyup":return LT.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pi=!1;function PT(e,n){switch(e){case"compositionend":return mg(n);case"keypress":return n.which!==32?null:(dg=!0,fg);case"textInput":return e=n.data,e===fg&&dg?null:e;default:return null}}function UT(e,n){if(pi)return e==="compositionend"||!Xu&&hg(e,n)?(e=ig(),po=Vu=Or=null,pi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return ug&&n.locale!=="ko"?null:n.data;default:return null}}var kT={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function pg(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!kT[e.type]:n==="textarea"}function gg(e,n,i,l){hi?mi?mi.push(l):mi=[l]:hi=l,n=nc(n,"onChange"),0<n.length&&(i=new yo("onChange","change",null,i,l),e.push({event:i,listeners:n}))}var ks=null,Hs=null;function HT(e){By(e,0)}function xo(e){var n=Ds(e);if(Wp(n))return e}function vg(e,n){if(e==="change")return n}var yg=!1;if(Qn){var Ku;if(Qn){var Wu="oninput"in document;if(!Wu){var bg=document.createElement("div");bg.setAttribute("oninput","return;"),Wu=typeof bg.oninput=="function"}Ku=Wu}else Ku=!1;yg=Ku&&(!document.documentMode||9<document.documentMode)}function xg(){ks&&(ks.detachEvent("onpropertychange",Sg),Hs=ks=null)}function Sg(e){if(e.propertyName==="value"&&xo(Hs)){var n=[];gg(n,Hs,e,qu(e)),ag(HT,n)}}function $T(e,n,i){e==="focusin"?(xg(),ks=n,Hs=i,ks.attachEvent("onpropertychange",Sg)):e==="focusout"&&xg()}function qT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xo(Hs)}function BT(e,n){if(e==="click")return xo(n)}function IT(e,n){if(e==="input"||e==="change")return xo(n)}function VT(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Ut=typeof Object.is=="function"?Object.is:VT;function $s(e,n){if(Ut(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),l=Object.keys(n);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var u=i[l];if(!Cr.call(n,u)||!Ut(e[u],n[u]))return!1}return!0}function wg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Eg(e,n){var i=wg(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=n&&l>=n)return{node:i,offset:n-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=wg(i)}}function Rg(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Rg(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Tg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=ho(e.document);n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=ho(e.document)}return n}function Zu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function YT(e,n){var i=Tg(n);n=e.focusedElem;var l=e.selectionRange;if(i!==n&&n&&n.ownerDocument&&Rg(n.ownerDocument.documentElement,n)){if(l!==null&&Zu(n)){if(e=l.start,i=l.end,i===void 0&&(i=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(i,n.value.length);else if(i=(e=n.ownerDocument||document)&&e.defaultView||window,i.getSelection){i=i.getSelection();var u=n.textContent.length,h=Math.min(l.start,u);l=l.end===void 0?h:Math.min(l.end,u),!i.extend&&h>l&&(u=l,l=h,h=u),u=Eg(n,h);var R=Eg(n,l);u&&R&&(i.rangeCount!==1||i.anchorNode!==u.node||i.anchorOffset!==u.offset||i.focusNode!==R.node||i.focusOffset!==R.offset)&&(e=e.createRange(),e.setStart(u.node,u.offset),i.removeAllRanges(),h>l?(i.addRange(e),i.extend(R.node,R.offset)):(e.setEnd(R.node,R.offset),i.addRange(e)))}}for(e=[],i=n;i=i.parentNode;)i.nodeType===1&&e.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)i=e[n],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var GT=Qn&&"documentMode"in document&&11>=document.documentMode,gi=null,Ju=null,qs=null,ef=!1;function Cg(e,n,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ef||gi==null||gi!==ho(l)||(l=gi,"selectionStart"in l&&Zu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),qs&&$s(qs,l)||(qs=l,l=nc(Ju,"onSelect"),0<l.length&&(n=new yo("onSelect","select",null,n,i),e.push({event:n,listeners:l}),n.target=gi)))}function wa(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var vi={animationend:wa("Animation","AnimationEnd"),animationiteration:wa("Animation","AnimationIteration"),animationstart:wa("Animation","AnimationStart"),transitionrun:wa("Transition","TransitionRun"),transitionstart:wa("Transition","TransitionStart"),transitioncancel:wa("Transition","TransitionCancel"),transitionend:wa("Transition","TransitionEnd")},tf={},Ag={};Qn&&(Ag=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);function Ea(e){if(tf[e])return tf[e];if(!vi[e])return e;var n=vi[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in Ag)return tf[e]=n[i];return e}var Ng=Ea("animationend"),Og=Ea("animationiteration"),Mg=Ea("animationstart"),FT=Ea("transitionrun"),QT=Ea("transitionstart"),XT=Ea("transitioncancel"),jg=Ea("transitionend"),Dg=new Map,_g="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function cn(e,n){Dg.set(e,n),xa(n,[e])}var Ft=[],yi=0,nf=0;function So(){for(var e=yi,n=nf=yi=0;n<e;){var i=Ft[n];Ft[n++]=null;var l=Ft[n];Ft[n++]=null;var u=Ft[n];Ft[n++]=null;var h=Ft[n];if(Ft[n++]=null,l!==null&&u!==null){var R=l.pending;R===null?u.next=u:(u.next=R.next,R.next=u),l.pending=u}h!==0&&Lg(i,u,h)}}function wo(e,n,i,l){Ft[yi++]=e,Ft[yi++]=n,Ft[yi++]=i,Ft[yi++]=l,nf|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function rf(e,n,i,l){return wo(e,n,i,l),Eo(e)}function Mr(e,n){return wo(e,null,null,n),Eo(e)}function Lg(e,n,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var u=!1,h=e.return;h!==null;)h.childLanes|=i,l=h.alternate,l!==null&&(l.childLanes|=i),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(u=!0)),e=h,h=h.return;u&&n!==null&&e.tag===3&&(h=e.stateNode,u=31-Pt(i),h=h.hiddenUpdates,e=h[u],e===null?h[u]=[n]:e.push(n),n.lane=i|536870912)}function Eo(e){if(50<dl)throw dl=0,ud=null,Error(s(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var bi={},zg=new WeakMap;function Qt(e,n){if(typeof e=="object"&&e!==null){var i=zg.get(e);return i!==void 0?i:(n={value:e,source:n,stack:B(n)},zg.set(e,n),n)}return{value:e,source:n,stack:B(n)}}var xi=[],Si=0,Ro=null,To=0,Xt=[],Kt=0,Ra=null,Kn=1,Wn="";function Ta(e,n){xi[Si++]=To,xi[Si++]=Ro,Ro=e,To=n}function Pg(e,n,i){Xt[Kt++]=Kn,Xt[Kt++]=Wn,Xt[Kt++]=Ra,Ra=e;var l=Kn;e=Wn;var u=32-Pt(l)-1;l&=~(1<<u),i+=1;var h=32-Pt(n)+u;if(30<h){var R=u-u%5;h=(l&(1<<R)-1).toString(32),l>>=R,u-=R,Kn=1<<32-Pt(n)+u|i<<u|l,Wn=h+e}else Kn=1<<h|i<<u|l,Wn=e}function af(e){e.return!==null&&(Ta(e,1),Pg(e,1,0))}function sf(e){for(;e===Ro;)Ro=xi[--Si],xi[Si]=null,To=xi[--Si],xi[Si]=null;for(;e===Ra;)Ra=Xt[--Kt],Xt[Kt]=null,Wn=Xt[--Kt],Xt[Kt]=null,Kn=Xt[--Kt],Xt[Kt]=null}var Rt=null,gt=null,ze=!1,un=null,Cn=!1,lf=Error(s(519));function Ca(e){var n=Error(s(418,""));throw Vs(Qt(n,e)),lf}function Ug(e){var n=e.stateNode,i=e.type,l=e.memoizedProps;switch(n[bt]=e,n[Ot]=l,i){case"dialog":De("cancel",n),De("close",n);break;case"iframe":case"object":case"embed":De("load",n);break;case"video":case"audio":for(i=0;i<ml.length;i++)De(ml[i],n);break;case"source":De("error",n);break;case"img":case"image":case"link":De("error",n),De("load",n);break;case"details":De("toggle",n);break;case"input":De("invalid",n),Zp(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),fo(n);break;case"select":De("invalid",n);break;case"textarea":De("invalid",n),eg(n,l.value,l.defaultValue,l.children),fo(n)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||l.suppressHydrationWarning===!0||Gy(n.textContent,i)?(l.popover!=null&&(De("beforetoggle",n),De("toggle",n)),l.onScroll!=null&&De("scroll",n),l.onScrollEnd!=null&&De("scrollend",n),l.onClick!=null&&(n.onclick=rc),n=!0):n=!1,n||Ca(e)}function kg(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 3:case 27:Cn=!0;return;case 5:case 13:Cn=!1;return;default:Rt=Rt.return}}function Bs(e){if(e!==Rt)return!1;if(!ze)return kg(e),ze=!0,!1;var n=!1,i;if((i=e.tag!==3&&e.tag!==27)&&((i=e.tag===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Ad(e.type,e.memoizedProps)),i=!i),i&&(n=!0),n&>&&Ca(e),kg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8)if(i=e.data,i==="/$"){if(n===0){gt=dn(e.nextSibling);break e}n--}else i!=="$"&&i!=="$!"&&i!=="$?"||n++;e=e.nextSibling}gt=null}}else gt=Rt?dn(e.stateNode.nextSibling):null;return!0}function Is(){gt=Rt=null,ze=!1}function Vs(e){un===null?un=[e]:un.push(e)}var Ys=Error(s(460)),Hg=Error(s(474)),of={then:function(){}};function $g(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Co(){}function qg(e,n,i){switch(i=e[i],i===void 0?e.push(n):i!==n&&(n.then(Co,Co),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,e===Ys?Error(s(483)):e;default:if(typeof n.status=="string")n.then(Co,Co);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=n,e.status="pending",e.then(function(l){if(n.status==="pending"){var u=n;u.status="fulfilled",u.value=l}},function(l){if(n.status==="pending"){var u=n;u.status="rejected",u.reason=l}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,e===Ys?Error(s(483)):e}throw Gs=n,Ys}}var Gs=null;function Bg(){if(Gs===null)throw Error(s(459));var e=Gs;return Gs=null,e}var wi=null,Fs=0;function Ao(e){var n=Fs;return Fs+=1,wi===null&&(wi=[]),qg(wi,e,n)}function Qs(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function No(e,n){throw n.$$typeof===c?Error(s(525)):(e=Object.prototype.toString.call(n),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Ig(e){var n=e._init;return n(e._payload)}function Vg(e){function n(F,I){if(e){var X=F.deletions;X===null?(F.deletions=[I],F.flags|=16):X.push(I)}}function i(F,I){if(!e)return null;for(;I!==null;)n(F,I),I=I.sibling;return null}function l(F){for(var I=new Map;F!==null;)F.key!==null?I.set(F.key,F):I.set(F.index,F),F=F.sibling;return I}function u(F,I){return F=Br(F,I),F.index=0,F.sibling=null,F}function h(F,I,X){return F.index=X,e?(X=F.alternate,X!==null?(X=X.index,X<I?(F.flags|=33554434,I):X):(F.flags|=33554434,I)):(F.flags|=1048576,I)}function R(F){return e&&F.alternate===null&&(F.flags|=33554434),F}function A(F,I,X,ne){return I===null||I.tag!==6?(I=nd(X,F.mode,ne),I.return=F,I):(I=u(I,X),I.return=F,I)}function D(F,I,X,ne){var he=X.type;return he===m?J(F,I,X.props.children,ne,X.key):I!==null&&(I.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===N&&Ig(he)===I.type)?(I=u(I,X.props),Qs(I,X),I.return=F,I):(I=Go(X.type,X.key,X.props,null,F.mode,ne),Qs(I,X),I.return=F,I)}function Y(F,I,X,ne){return I===null||I.tag!==4||I.stateNode.containerInfo!==X.containerInfo||I.stateNode.implementation!==X.implementation?(I=rd(X,F.mode,ne),I.return=F,I):(I=u(I,X.children||[]),I.return=F,I)}function J(F,I,X,ne,he){return I===null||I.tag!==7?(I=Pa(X,F.mode,ne,he),I.return=F,I):(I=u(I,X),I.return=F,I)}function ie(F,I,X){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return I=nd(""+I,F.mode,X),I.return=F,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case f:return X=Go(I.type,I.key,I.props,null,F.mode,X),Qs(X,I),X.return=F,X;case d:return I=rd(I,F.mode,X),I.return=F,I;case N:var ne=I._init;return I=ne(I._payload),ie(F,I,X)}if(ae(I)||$(I))return I=Pa(I,F.mode,X,null),I.return=F,I;if(typeof I.then=="function")return ie(F,Ao(I),X);if(I.$$typeof===E)return ie(F,Io(F,I),X);No(F,I)}return null}function W(F,I,X,ne){var he=I!==null?I.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return he!==null?null:A(F,I,""+X,ne);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case f:return X.key===he?D(F,I,X,ne):null;case d:return X.key===he?Y(F,I,X,ne):null;case N:return he=X._init,X=he(X._payload),W(F,I,X,ne)}if(ae(X)||$(X))return he!==null?null:J(F,I,X,ne,null);if(typeof X.then=="function")return W(F,I,Ao(X),ne);if(X.$$typeof===E)return W(F,I,Io(F,X),ne);No(F,X)}return null}function Z(F,I,X,ne,he){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return F=F.get(X)||null,A(I,F,""+ne,he);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case f:return F=F.get(ne.key===null?X:ne.key)||null,D(I,F,ne,he);case d:return F=F.get(ne.key===null?X:ne.key)||null,Y(I,F,ne,he);case N:var Me=ne._init;return ne=Me(ne._payload),Z(F,I,X,ne,he)}if(ae(ne)||$(ne))return F=F.get(X)||null,J(I,F,ne,he,null);if(typeof ne.then=="function")return Z(F,I,X,Ao(ne),he);if(ne.$$typeof===E)return Z(F,I,X,Io(I,ne),he);No(I,ne)}return null}function ge(F,I,X,ne){for(var he=null,Me=null,ye=I,xe=I=0,pt=null;ye!==null&&xe<X.length;xe++){ye.index>xe?(pt=ye,ye=null):pt=ye.sibling;var Pe=W(F,ye,X[xe],ne);if(Pe===null){ye===null&&(ye=pt);break}e&&ye&&Pe.alternate===null&&n(F,ye),I=h(Pe,I,xe),Me===null?he=Pe:Me.sibling=Pe,Me=Pe,ye=pt}if(xe===X.length)return i(F,ye),ze&&Ta(F,xe),he;if(ye===null){for(;xe<X.length;xe++)ye=ie(F,X[xe],ne),ye!==null&&(I=h(ye,I,xe),Me===null?he=ye:Me.sibling=ye,Me=ye);return ze&&Ta(F,xe),he}for(ye=l(ye);xe<X.length;xe++)pt=Z(ye,F,xe,X[xe],ne),pt!==null&&(e&&pt.alternate!==null&&ye.delete(pt.key===null?xe:pt.key),I=h(pt,I,xe),Me===null?he=pt:Me.sibling=pt,Me=pt);return e&&ye.forEach(function(Xr){return n(F,Xr)}),ze&&Ta(F,xe),he}function Re(F,I,X,ne){if(X==null)throw Error(s(151));for(var he=null,Me=null,ye=I,xe=I=0,pt=null,Pe=X.next();ye!==null&&!Pe.done;xe++,Pe=X.next()){ye.index>xe?(pt=ye,ye=null):pt=ye.sibling;var Xr=W(F,ye,Pe.value,ne);if(Xr===null){ye===null&&(ye=pt);break}e&&ye&&Xr.alternate===null&&n(F,ye),I=h(Xr,I,xe),Me===null?he=Xr:Me.sibling=Xr,Me=Xr,ye=pt}if(Pe.done)return i(F,ye),ze&&Ta(F,xe),he;if(ye===null){for(;!Pe.done;xe++,Pe=X.next())Pe=ie(F,Pe.value,ne),Pe!==null&&(I=h(Pe,I,xe),Me===null?he=Pe:Me.sibling=Pe,Me=Pe);return ze&&Ta(F,xe),he}for(ye=l(ye);!Pe.done;xe++,Pe=X.next())Pe=Z(ye,F,xe,Pe.value,ne),Pe!==null&&(e&&Pe.alternate!==null&&ye.delete(Pe.key===null?xe:Pe.key),I=h(Pe,I,xe),Me===null?he=Pe:Me.sibling=Pe,Me=Pe);return e&&ye.forEach(function(cA){return n(F,cA)}),ze&&Ta(F,xe),he}function et(F,I,X,ne){if(typeof X=="object"&&X!==null&&X.type===m&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case f:e:{for(var he=X.key;I!==null;){if(I.key===he){if(he=X.type,he===m){if(I.tag===7){i(F,I.sibling),ne=u(I,X.props.children),ne.return=F,F=ne;break e}}else if(I.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===N&&Ig(he)===I.type){i(F,I.sibling),ne=u(I,X.props),Qs(ne,X),ne.return=F,F=ne;break e}i(F,I);break}else n(F,I);I=I.sibling}X.type===m?(ne=Pa(X.props.children,F.mode,ne,X.key),ne.return=F,F=ne):(ne=Go(X.type,X.key,X.props,null,F.mode,ne),Qs(ne,X),ne.return=F,F=ne)}return R(F);case d:e:{for(he=X.key;I!==null;){if(I.key===he)if(I.tag===4&&I.stateNode.containerInfo===X.containerInfo&&I.stateNode.implementation===X.implementation){i(F,I.sibling),ne=u(I,X.children||[]),ne.return=F,F=ne;break e}else{i(F,I);break}else n(F,I);I=I.sibling}ne=rd(X,F.mode,ne),ne.return=F,F=ne}return R(F);case N:return he=X._init,X=he(X._payload),et(F,I,X,ne)}if(ae(X))return ge(F,I,X,ne);if($(X)){if(he=$(X),typeof he!="function")throw Error(s(150));return X=he.call(X),Re(F,I,X,ne)}if(typeof X.then=="function")return et(F,I,Ao(X),ne);if(X.$$typeof===E)return et(F,I,Io(F,X),ne);No(F,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,I!==null&&I.tag===6?(i(F,I.sibling),ne=u(I,X),ne.return=F,F=ne):(i(F,I),ne=nd(X,F.mode,ne),ne.return=F,F=ne),R(F)):i(F,I)}return function(F,I,X,ne){try{Fs=0;var he=et(F,I,X,ne);return wi=null,he}catch(ye){if(ye===Ys)throw ye;var Me=en(29,ye,null,F.mode);return Me.lanes=ne,Me.return=F,Me}finally{}}}var Aa=Vg(!0),Yg=Vg(!1),Ei=me(null),Oo=me(0);function Gg(e,n){e=or,fe(Oo,e),fe(Ei,n),or=e|n.baseLanes}function cf(){fe(Oo,or),fe(Ei,Ei.current)}function uf(){or=Oo.current,Ee(Ei),Ee(Oo)}var Wt=me(null),An=null;function jr(e){var n=e.alternate;fe(ot,ot.current&1),fe(Wt,e),An===null&&(n===null||Ei.current!==null||n.memoizedState!==null)&&(An=e)}function Fg(e){if(e.tag===22){if(fe(ot,ot.current),fe(Wt,e),An===null){var n=e.alternate;n!==null&&n.memoizedState!==null&&(An=e)}}else Dr()}function Dr(){fe(ot,ot.current),fe(Wt,Wt.current)}function Zn(e){Ee(Wt),An===e&&(An=null),Ee(ot)}var ot=me(0);function Mo(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var KT=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){n.aborted=!0,e.forEach(function(i){return i()})}},WT=t.unstable_scheduleCallback,ZT=t.unstable_NormalPriority,ct={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ff(){return{controller:new KT,data:new Map,refCount:0}}function Xs(e){e.refCount--,e.refCount===0&&WT(ZT,function(){e.controller.abort()})}var Ks=null,df=0,Ri=0,Ti=null;function JT(e,n){if(Ks===null){var i=Ks=[];df=0,Ri=yd(),Ti={status:"pending",value:void 0,then:function(l){i.push(l)}}}return df++,n.then(Qg,Qg),n}function Qg(){if(--df===0&&Ks!==null){Ti!==null&&(Ti.status="fulfilled");var e=Ks;Ks=null,Ri=0,Ti=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function eC(e,n){var i=[],l={status:"pending",value:null,reason:null,then:function(u){i.push(u)}};return e.then(function(){l.status="fulfilled",l.value=n;for(var u=0;u<i.length;u++)(0,i[u])(n)},function(u){for(l.status="rejected",l.reason=u,u=0;u<i.length;u++)(0,i[u])(void 0)}),l}var Xg=U.S;U.S=function(e,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&JT(e,n),Xg!==null&&Xg(e,n)};var Na=me(null);function hf(){var e=Na.current;return e!==null?e:Ye.pooledCache}function jo(e,n){n===null?fe(Na,Na.current):fe(Na,n.pool)}function Kg(){var e=hf();return e===null?null:{parent:ct._currentValue,pool:e}}var _r=0,Oe=null,$e=null,at=null,Do=!1,Ci=!1,Oa=!1,_o=0,Ws=0,Ai=null,tC=0;function rt(){throw Error(s(321))}function mf(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!Ut(e[i],n[i]))return!1;return!0}function pf(e,n,i,l,u,h){return _r=h,Oe=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=e===null||e.memoizedState===null?Ma:Lr,Oa=!1,h=i(l,u),Oa=!1,Ci&&(h=Zg(n,i,l,u)),Wg(e),h}function Wg(e){U.H=Nn;var n=$e!==null&&$e.next!==null;if(_r=0,at=$e=Oe=null,Do=!1,Ws=0,Ai=null,n)throw Error(s(300));e===null||ht||(e=e.dependencies,e!==null&&Bo(e)&&(ht=!0))}function Zg(e,n,i,l){Oe=e;var u=0;do{if(Ci&&(Ai=null),Ws=0,Ci=!1,25<=u)throw Error(s(301));if(u+=1,at=$e=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}U.H=ja,h=n(i,l)}while(Ci);return h}function nC(){var e=U.H,n=e.useState()[0];return n=typeof n.then=="function"?Zs(n):n,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(Oe.flags|=1024),n}function gf(){var e=_o!==0;return _o=0,e}function vf(e,n,i){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i}function yf(e){if(Do){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Do=!1}_r=0,at=$e=Oe=null,Ci=!1,Ws=_o=0,Ai=null}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?Oe.memoizedState=at=e:at=at.next=e,at}function it(){if($e===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var n=at===null?Oe.memoizedState:at.next;if(n!==null)at=n,$e=e;else{if(e===null)throw Oe.alternate===null?Error(s(467)):Error(s(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},at===null?Oe.memoizedState=at=e:at=at.next=e}return at}var Lo;Lo=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function Zs(e){var n=Ws;return Ws+=1,Ai===null&&(Ai=[]),e=qg(Ai,e,n),n=Oe,(at===null?n.memoizedState:at.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?Ma:Lr),e}function zo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Zs(e);if(e.$$typeof===E)return xt(e)}throw Error(s(438,String(e)))}function bf(e){var n=null,i=Oe.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var l=Oe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),i===null&&(i=Lo(),Oe.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(e),l=0;l<e;l++)i[l]=_;return n.index++,i}function Jn(e,n){return typeof n=="function"?n(e):n}function Po(e){var n=it();return xf(n,$e,e)}function xf(e,n,i){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=i;var u=e.baseQueue,h=l.pending;if(h!==null){if(u!==null){var R=u.next;u.next=h.next,h.next=R}n.baseQueue=u=h,l.pending=null}if(h=e.baseState,u===null)e.memoizedState=h;else{n=u.next;var A=R=null,D=null,Y=n,J=!1;do{var ie=Y.lane&-536870913;if(ie!==Y.lane?(Le&ie)===ie:(_r&ie)===ie){var W=Y.revertLane;if(W===0)D!==null&&(D=D.next={lane:0,revertLane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),ie===Ri&&(J=!0);else if((_r&W)===W){Y=Y.next,W===Ri&&(J=!0);continue}else ie={lane:0,revertLane:Y.revertLane,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},D===null?(A=D=ie,R=h):D=D.next=ie,Oe.lanes|=W,Ir|=W;ie=Y.action,Oa&&i(h,ie),h=Y.hasEagerState?Y.eagerState:i(h,ie)}else W={lane:ie,revertLane:Y.revertLane,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},D===null?(A=D=W,R=h):D=D.next=W,Oe.lanes|=ie,Ir|=ie;Y=Y.next}while(Y!==null&&Y!==n);if(D===null?R=h:D.next=A,!Ut(h,e.memoizedState)&&(ht=!0,J&&(i=Ti,i!==null)))throw i;e.memoizedState=h,e.baseState=R,e.baseQueue=D,l.lastRenderedState=h}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Sf(e){var n=it(),i=n.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=e;var l=i.dispatch,u=i.pending,h=n.memoizedState;if(u!==null){i.pending=null;var R=u=u.next;do h=e(h,R.action),R=R.next;while(R!==u);Ut(h,n.memoizedState)||(ht=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),i.lastRenderedState=h}return[h,l]}function Jg(e,n,i){var l=Oe,u=it(),h=ze;if(h){if(i===void 0)throw Error(s(407));i=i()}else i=n();var R=!Ut(($e||u).memoizedState,i);if(R&&(u.memoizedState=i,ht=!0),u=u.queue,Rf(nv.bind(null,l,u,e),[e]),u.getSnapshot!==n||R||at!==null&&at.memoizedState.tag&1){if(l.flags|=2048,Ni(9,tv.bind(null,l,u,i,n),{destroy:void 0},null),Ye===null)throw Error(s(349));h||(_r&60)!==0||ev(l,n,i)}return i}function ev(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=Oe.updateQueue,n===null?(n=Lo(),Oe.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function tv(e,n,i,l){n.value=i,n.getSnapshot=l,rv(n)&&av(e)}function nv(e,n,i){return i(function(){rv(n)&&av(e)})}function rv(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!Ut(e,i)}catch{return!0}}function av(e){var n=Mr(e,2);n!==null&&Tt(n,e,2)}function wf(e){var n=jt();if(typeof e=="function"){var i=e;if(e=i(),Oa){Ar(!0);try{i()}finally{Ar(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:e},n}function iv(e,n,i,l){return e.baseState=i,xf(e,$e,typeof l=="function"?l:Jn)}function rC(e,n,i,l,u){if(Ho(e))throw Error(s(485));if(e=n.action,e!==null){var h={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){h.listeners.push(R)}};U.T!==null?i(!0):h.isTransition=!1,l(h),i=n.pending,i===null?(h.next=n.pending=h,sv(n,h)):(h.next=i.next,n.pending=i.next=h)}}function sv(e,n){var i=n.action,l=n.payload,u=e.state;if(n.isTransition){var h=U.T,R={};U.T=R;try{var A=i(u,l),D=U.S;D!==null&&D(R,A),lv(e,n,A)}catch(Y){Ef(e,n,Y)}finally{U.T=h}}else try{h=i(u,l),lv(e,n,h)}catch(Y){Ef(e,n,Y)}}function lv(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){ov(e,n,l)},function(l){return Ef(e,n,l)}):ov(e,n,i)}function ov(e,n,i){n.status="fulfilled",n.value=i,cv(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,sv(e,i)))}function Ef(e,n,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=i,cv(n),n=n.next;while(n!==l)}e.action=null}function cv(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function uv(e,n){return n}function fv(e,n){if(ze){var i=Ye.formState;if(i!==null){e:{var l=Oe;if(ze){if(gt){t:{for(var u=gt,h=Cn;u.nodeType!==8;){if(!h){u=null;break t}if(u=dn(u.nextSibling),u===null){u=null;break t}}h=u.data,u=h==="F!"||h==="F"?u:null}if(u){gt=dn(u.nextSibling),l=u.data==="F!";break e}}Ca(l)}l=!1}l&&(n=i[0])}}return i=jt(),i.memoizedState=i.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uv,lastRenderedState:n},i.queue=l,i=Ov.bind(null,Oe,l),l.dispatch=i,l=wf(!1),h=Of.bind(null,Oe,!1,l.queue),l=jt(),u={state:n,dispatch:null,action:e,pending:null},l.queue=u,i=rC.bind(null,Oe,u,h,i),u.dispatch=i,l.memoizedState=e,[n,i,!1]}function dv(e){var n=it();return hv(n,$e,e)}function hv(e,n,i){n=xf(e,n,uv)[0],e=Po(Jn)[0],n=typeof n=="object"&&n!==null&&typeof n.then=="function"?Zs(n):n;var l=it(),u=l.queue,h=u.dispatch;return i!==l.memoizedState&&(Oe.flags|=2048,Ni(9,aC.bind(null,u,i),{destroy:void 0},null)),[n,h,e]}function aC(e,n){e.action=n}function mv(e){var n=it(),i=$e;if(i!==null)return hv(n,i,e);it(),n=n.memoizedState,i=it();var l=i.queue.dispatch;return i.memoizedState=e,[n,l,!1]}function Ni(e,n,i,l){return e={tag:e,create:n,inst:i,deps:l,next:null},n=Oe.updateQueue,n===null&&(n=Lo(),Oe.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,n.lastEffect=e),e}function pv(){return it().memoizedState}function Uo(e,n,i,l){var u=jt();Oe.flags|=e,u.memoizedState=Ni(1|n,i,{destroy:void 0},l===void 0?null:l)}function ko(e,n,i,l){var u=it();l=l===void 0?null:l;var h=u.memoizedState.inst;$e!==null&&l!==null&&mf(l,$e.memoizedState.deps)?u.memoizedState=Ni(n,i,h,l):(Oe.flags|=e,u.memoizedState=Ni(1|n,i,h,l))}function gv(e,n){Uo(8390656,8,e,n)}function Rf(e,n){ko(2048,8,e,n)}function vv(e,n){return ko(4,2,e,n)}function yv(e,n){return ko(4,4,e,n)}function bv(e,n){if(typeof n=="function"){e=e();var i=n(e);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function xv(e,n,i){i=i!=null?i.concat([e]):null,ko(4,4,bv.bind(null,n,e),i)}function Tf(){}function Sv(e,n){var i=it();n=n===void 0?null:n;var l=i.memoizedState;return n!==null&&mf(n,l[1])?l[0]:(i.memoizedState=[e,n],e)}function wv(e,n){var i=it();n=n===void 0?null:n;var l=i.memoizedState;if(n!==null&&mf(n,l[1]))return l[0];if(l=e(),Oa){Ar(!0);try{e()}finally{Ar(!1)}}return i.memoizedState=[l,n],l}function Cf(e,n,i){return i===void 0||(_r&1073741824)!==0?e.memoizedState=n:(e.memoizedState=i,e=Ry(),Oe.lanes|=e,Ir|=e,i)}function Ev(e,n,i,l){return Ut(i,n)?i:Ei.current!==null?(e=Cf(e,i,l),Ut(e,n)||(ht=!0),e):(_r&42)===0?(ht=!0,e.memoizedState=i):(e=Ry(),Oe.lanes|=e,Ir|=e,n)}function Rv(e,n,i,l,u){var h=re.p;re.p=h!==0&&8>h?h:8;var R=U.T,A={};U.T=A,Of(e,!1,n,i);try{var D=u(),Y=U.S;if(Y!==null&&Y(A,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var J=eC(D,l);Js(e,n,J,qt(e))}else Js(e,n,l,qt(e))}catch(ie){Js(e,n,{then:function(){},status:"rejected",reason:ie},qt())}finally{re.p=h,U.T=R}}function iC(){}function Af(e,n,i,l){if(e.tag!==5)throw Error(s(476));var u=Tv(e).queue;Rv(e,u,n,oe,i===null?iC:function(){return Cv(e),i(l)})}function Tv(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:oe},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Cv(e){var n=Tv(e).next.queue;Js(e,n,{},qt())}function Nf(){return xt(bl)}function Av(){return it().memoizedState}function Nv(){return it().memoizedState}function sC(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=qt();e=Ur(i);var l=kr(n,e,i);l!==null&&(Tt(l,n,i),nl(l,n,i)),n={cache:ff()},e.payload=n;return}n=n.return}}function lC(e,n,i){var l=qt();i={lane:l,revertLane:0,action:i,hasEagerState:!1,eagerState:null,next:null},Ho(e)?Mv(n,i):(i=rf(e,n,i,l),i!==null&&(Tt(i,e,l),jv(i,n,l)))}function Ov(e,n,i){var l=qt();Js(e,n,i,l)}function Js(e,n,i,l){var u={lane:l,revertLane:0,action:i,hasEagerState:!1,eagerState:null,next:null};if(Ho(e))Mv(n,u);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var R=n.lastRenderedState,A=h(R,i);if(u.hasEagerState=!0,u.eagerState=A,Ut(A,R))return wo(e,n,u,0),Ye===null&&So(),!1}catch{}finally{}if(i=rf(e,n,u,l),i!==null)return Tt(i,e,l),jv(i,n,l),!0}return!1}function Of(e,n,i,l){if(l={lane:2,revertLane:yd(),action:l,hasEagerState:!1,eagerState:null,next:null},Ho(e)){if(n)throw Error(s(479))}else n=rf(e,i,l,2),n!==null&&Tt(n,e,2)}function Ho(e){var n=e.alternate;return e===Oe||n!==null&&n===Oe}function Mv(e,n){Ci=Do=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function jv(e,n,i){if((i&4194176)!==0){var l=n.lanes;l&=e.pendingLanes,i|=l,n.lanes=i,Bp(e,i)}}var Nn={readContext:xt,use:zo,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt};Nn.useCacheRefresh=rt,Nn.useMemoCache=rt,Nn.useHostTransitionStatus=rt,Nn.useFormState=rt,Nn.useActionState=rt,Nn.useOptimistic=rt;var Ma={readContext:xt,use:zo,useCallback:function(e,n){return jt().memoizedState=[e,n===void 0?null:n],e},useContext:xt,useEffect:gv,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,Uo(4194308,4,bv.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Uo(4194308,4,e,n)},useInsertionEffect:function(e,n){Uo(4,2,e,n)},useMemo:function(e,n){var i=jt();n=n===void 0?null:n;var l=e();if(Oa){Ar(!0);try{e()}finally{Ar(!1)}}return i.memoizedState=[l,n],l},useReducer:function(e,n,i){var l=jt();if(i!==void 0){var u=i(n);if(Oa){Ar(!0);try{i(n)}finally{Ar(!1)}}}else u=n;return l.memoizedState=l.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},l.queue=e,e=e.dispatch=lC.bind(null,Oe,e),[l.memoizedState,e]},useRef:function(e){var n=jt();return e={current:e},n.memoizedState=e},useState:function(e){e=wf(e);var n=e.queue,i=Ov.bind(null,Oe,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:Tf,useDeferredValue:function(e,n){var i=jt();return Cf(i,e,n)},useTransition:function(){var e=wf(!1);return e=Rv.bind(null,Oe,e.queue,!0,!1),jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var l=Oe,u=jt();if(ze){if(i===void 0)throw Error(s(407));i=i()}else{if(i=n(),Ye===null)throw Error(s(349));(Le&60)!==0||ev(l,n,i)}u.memoizedState=i;var h={value:i,getSnapshot:n};return u.queue=h,gv(nv.bind(null,l,h,e),[e]),l.flags|=2048,Ni(9,tv.bind(null,l,h,i,n),{destroy:void 0},null),i},useId:function(){var e=jt(),n=Ye.identifierPrefix;if(ze){var i=Wn,l=Kn;i=(l&~(1<<32-Pt(l)-1)).toString(32)+i,n=":"+n+"R"+i,i=_o++,0<i&&(n+="H"+i.toString(32)),n+=":"}else i=tC++,n=":"+n+"r"+i.toString(32)+":";return e.memoizedState=n},useCacheRefresh:function(){return jt().memoizedState=sC.bind(null,Oe)}};Ma.useMemoCache=bf,Ma.useHostTransitionStatus=Nf,Ma.useFormState=fv,Ma.useActionState=fv,Ma.useOptimistic=function(e){var n=jt();n.memoizedState=n.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=Of.bind(null,Oe,!0,i),i.dispatch=n,[e,n]};var Lr={readContext:xt,use:zo,useCallback:Sv,useContext:xt,useEffect:Rf,useImperativeHandle:xv,useInsertionEffect:vv,useLayoutEffect:yv,useMemo:wv,useReducer:Po,useRef:pv,useState:function(){return Po(Jn)},useDebugValue:Tf,useDeferredValue:function(e,n){var i=it();return Ev(i,$e.memoizedState,e,n)},useTransition:function(){var e=Po(Jn)[0],n=it().memoizedState;return[typeof e=="boolean"?e:Zs(e),n]},useSyncExternalStore:Jg,useId:Av};Lr.useCacheRefresh=Nv,Lr.useMemoCache=bf,Lr.useHostTransitionStatus=Nf,Lr.useFormState=dv,Lr.useActionState=dv,Lr.useOptimistic=function(e,n){var i=it();return iv(i,$e,e,n)};var ja={readContext:xt,use:zo,useCallback:Sv,useContext:xt,useEffect:Rf,useImperativeHandle:xv,useInsertionEffect:vv,useLayoutEffect:yv,useMemo:wv,useReducer:Sf,useRef:pv,useState:function(){return Sf(Jn)},useDebugValue:Tf,useDeferredValue:function(e,n){var i=it();return $e===null?Cf(i,e,n):Ev(i,$e.memoizedState,e,n)},useTransition:function(){var e=Sf(Jn)[0],n=it().memoizedState;return[typeof e=="boolean"?e:Zs(e),n]},useSyncExternalStore:Jg,useId:Av};ja.useCacheRefresh=Nv,ja.useMemoCache=bf,ja.useHostTransitionStatus=Nf,ja.useFormState=mv,ja.useActionState=mv,ja.useOptimistic=function(e,n){var i=it();return $e!==null?iv(i,$e,e,n):(i.baseState=e,[e,i.queue.dispatch])};function Mf(e,n,i,l){n=e.memoizedState,i=i(l,n),i=i==null?n:K({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var jf={isMounted:function(e){return(e=e._reactInternals)?z(e)===e:!1},enqueueSetState:function(e,n,i){e=e._reactInternals;var l=qt(),u=Ur(l);u.payload=n,i!=null&&(u.callback=i),n=kr(e,u,l),n!==null&&(Tt(n,e,l),nl(n,e,l))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var l=qt(),u=Ur(l);u.tag=1,u.payload=n,i!=null&&(u.callback=i),n=kr(e,u,l),n!==null&&(Tt(n,e,l),nl(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=qt(),l=Ur(i);l.tag=2,n!=null&&(l.callback=n),n=kr(e,l,i),n!==null&&(Tt(n,e,i),nl(n,e,i))}};function Dv(e,n,i,l,u,h,R){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,h,R):n.prototype&&n.prototype.isPureReactComponent?!$s(i,l)||!$s(u,h):!0}function _v(e,n,i,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,l),n.state!==e&&jf.enqueueReplaceState(n,n.state,null)}function Da(e,n){var i=n;if("ref"in n){i={};for(var l in n)l!=="ref"&&(i[l]=n[l])}if(e=e.defaultProps){i===n&&(i=K({},i));for(var u in e)i[u]===void 0&&(i[u]=e[u])}return i}var $o=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Lv(e){$o(e)}function zv(e){console.error(e)}function Pv(e){$o(e)}function qo(e,n){try{var i=e.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(l){setTimeout(function(){throw l})}}function Uv(e,n,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Df(e,n,i){return i=Ur(i),i.tag=3,i.payload={element:null},i.callback=function(){qo(e,n)},i}function kv(e){return e=Ur(e),e.tag=3,e}function Hv(e,n,i,l){var u=i.type.getDerivedStateFromError;if(typeof u=="function"){var h=l.value;e.payload=function(){return u(h)},e.callback=function(){Uv(n,i,l)}}var R=i.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(e.callback=function(){Uv(n,i,l),typeof u!="function"&&(Vr===null?Vr=new Set([this]):Vr.add(this));var A=l.stack;this.componentDidCatch(l.value,{componentStack:A!==null?A:""})})}function oC(e,n,i,l,u){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=i.alternate,n!==null&&tl(n,i,u,!0),i=Wt.current,i!==null){switch(i.tag){case 13:return An===null?hd():i.alternate===null&&Je===0&&(Je=3),i.flags&=-257,i.flags|=65536,i.lanes=u,l===of?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([l]):n.add(l),pd(e,l,u)),!1;case 22:return i.flags|=65536,l===of?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([l]):i.add(l)),pd(e,l,u)),!1}throw Error(s(435,i.tag))}return pd(e,l,u),hd(),!1}if(ze)return n=Wt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,l!==lf&&(e=Error(s(422),{cause:l}),Vs(Qt(e,i)))):(l!==lf&&(n=Error(s(423),{cause:l}),Vs(Qt(n,i))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Qt(l,i),u=Df(e.stateNode,l,u),Ff(e,u),Je!==4&&(Je=2)),!1;var h=Error(s(520),{cause:l});if(h=Qt(h,i),ul===null?ul=[h]:ul.push(h),Je!==4&&(Je=2),n===null)return!0;l=Qt(l,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,e=u&-u,i.lanes|=e,e=Df(i.stateNode,l,e),Ff(i,e),!1;case 1:if(n=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Vr===null||!Vr.has(h))))return i.flags|=65536,u&=-u,i.lanes|=u,u=kv(u),Hv(u,e,i,l),Ff(i,u),!1}i=i.return}while(i!==null);return!1}var $v=Error(s(461)),ht=!1;function vt(e,n,i,l){n.child=e===null?Yg(n,null,i,l):Aa(n,e.child,i,l)}function qv(e,n,i,l,u){i=i.render;var h=n.ref;if("ref"in l){var R={};for(var A in l)A!=="ref"&&(R[A]=l[A])}else R=l;return La(n),l=pf(e,n,i,R,h,u),A=gf(),e!==null&&!ht?(vf(e,n,u),er(e,n,u)):(ze&&A&&af(n),n.flags|=1,vt(e,n,l,u),n.child)}function Bv(e,n,i,l,u){if(e===null){var h=i.type;return typeof h=="function"&&!td(h)&&h.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=h,Iv(e,n,h,l,u)):(e=Go(i.type,null,l,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!qf(e,u)){var R=h.memoizedProps;if(i=i.compare,i=i!==null?i:$s,i(R,l)&&e.ref===n.ref)return er(e,n,u)}return n.flags|=1,e=Br(h,l),e.ref=n.ref,e.return=n,n.child=e}function Iv(e,n,i,l,u){if(e!==null){var h=e.memoizedProps;if($s(h,l)&&e.ref===n.ref)if(ht=!1,n.pendingProps=l=h,qf(e,u))(e.flags&131072)!==0&&(ht=!0);else return n.lanes=e.lanes,er(e,n,u)}return _f(e,n,i,l,u)}function Vv(e,n,i){var l=n.pendingProps,u=l.children,h=(n.stateNode._pendingVisibility&2)!==0,R=e!==null?e.memoizedState:null;if(el(e,n),l.mode==="hidden"||h){if((n.flags&128)!==0){if(l=R!==null?R.baseLanes|i:i,e!==null){for(u=n.child=e.child,h=0;u!==null;)h=h|u.lanes|u.childLanes,u=u.sibling;n.childLanes=h&~l}else n.childLanes=0,n.child=null;return Yv(e,n,l,i)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&jo(n,R!==null?R.cachePool:null),R!==null?Gg(n,R):cf(),Fg(n);else return n.lanes=n.childLanes=536870912,Yv(e,n,R!==null?R.baseLanes|i:i,i)}else R!==null?(jo(n,R.cachePool),Gg(n,R),Dr(),n.memoizedState=null):(e!==null&&jo(n,null),cf(),Dr());return vt(e,n,u,i),n.child}function Yv(e,n,i,l){var u=hf();return u=u===null?null:{parent:ct._currentValue,pool:u},n.memoizedState={baseLanes:i,cachePool:u},e!==null&&jo(n,null),cf(),Fg(n),e!==null&&tl(e,n,l,!0),null}function el(e,n){var i=n.ref;if(i===null)e!==null&&e.ref!==null&&(n.flags|=2097664);else{if(typeof i!="function"&&typeof i!="object")throw Error(s(284));(e===null||e.ref!==i)&&(n.flags|=2097664)}}function _f(e,n,i,l,u){return La(n),i=pf(e,n,i,l,void 0,u),l=gf(),e!==null&&!ht?(vf(e,n,u),er(e,n,u)):(ze&&l&&af(n),n.flags|=1,vt(e,n,i,u),n.child)}function Gv(e,n,i,l,u,h){return La(n),n.updateQueue=null,i=Zg(n,l,i,u),Wg(e),l=gf(),e!==null&&!ht?(vf(e,n,h),er(e,n,h)):(ze&&l&&af(n),n.flags|=1,vt(e,n,i,h),n.child)}function Fv(e,n,i,l,u){if(La(n),n.stateNode===null){var h=bi,R=i.contextType;typeof R=="object"&&R!==null&&(h=xt(R)),h=new i(l,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=jf,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=l,h.state=n.memoizedState,h.refs={},Yf(n),R=i.contextType,h.context=typeof R=="object"&&R!==null?xt(R):bi,h.state=n.memoizedState,R=i.getDerivedStateFromProps,typeof R=="function"&&(Mf(n,i,R,l),h.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(R=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),R!==h.state&&jf.enqueueReplaceState(h,h.state,null),al(n,l,h,u),rl(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(e===null){h=n.stateNode;var A=n.memoizedProps,D=Da(i,A);h.props=D;var Y=h.context,J=i.contextType;R=bi,typeof J=="object"&&J!==null&&(R=xt(J));var ie=i.getDerivedStateFromProps;J=typeof ie=="function"||typeof h.getSnapshotBeforeUpdate=="function",A=n.pendingProps!==A,J||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(A||Y!==R)&&_v(n,h,l,R),Pr=!1;var W=n.memoizedState;h.state=W,al(n,l,h,u),rl(),Y=n.memoizedState,A||W!==Y||Pr?(typeof ie=="function"&&(Mf(n,i,ie,l),Y=n.memoizedState),(D=Pr||Dv(n,i,D,l,W,Y,R))?(J||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(n.flags|=4194308)):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=l,n.memoizedState=Y),h.props=l,h.state=Y,h.context=R,l=D):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{h=n.stateNode,Gf(e,n),R=n.memoizedProps,J=Da(i,R),h.props=J,ie=n.pendingProps,W=h.context,Y=i.contextType,D=bi,typeof Y=="object"&&Y!==null&&(D=xt(Y)),A=i.getDerivedStateFromProps,(Y=typeof A=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(R!==ie||W!==D)&&_v(n,h,l,D),Pr=!1,W=n.memoizedState,h.state=W,al(n,l,h,u),rl();var Z=n.memoizedState;R!==ie||W!==Z||Pr||e!==null&&e.dependencies!==null&&Bo(e.dependencies)?(typeof A=="function"&&(Mf(n,i,A,l),Z=n.memoizedState),(J=Pr||Dv(n,i,J,l,W,Z,D)||e!==null&&e.dependencies!==null&&Bo(e.dependencies))?(Y||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(l,Z,D),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(l,Z,D)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||R===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||R===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=Z),h.props=l,h.state=Z,h.context=D,l=J):(typeof h.componentDidUpdate!="function"||R===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||R===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),l=!1)}return h=l,el(e,n),l=(n.flags&128)!==0,h||l?(h=n.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,e!==null&&l?(n.child=Aa(n,e.child,null,u),n.child=Aa(n,null,i,u)):vt(e,n,i,u),n.memoizedState=h.state,e=n.child):e=er(e,n,u),e}function Qv(e,n,i,l){return Is(),n.flags|=256,vt(e,n,i,l),n.child}var Lf={dehydrated:null,treeContext:null,retryLane:0};function zf(e){return{baseLanes:e,cachePool:Kg()}}function Pf(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=tn),e}function Xv(e,n,i){var l=n.pendingProps,u=!1,h=(n.flags&128)!==0,R;if((R=h)||(R=e!==null&&e.memoizedState===null?!1:(ot.current&2)!==0),R&&(u=!0,n.flags&=-129),R=(n.flags&32)!==0,n.flags&=-33,e===null){if(ze){if(u?jr(n):Dr(),ze){var A=gt,D;if(D=A){e:{for(D=A,A=Cn;D.nodeType!==8;){if(!A){A=null;break e}if(D=dn(D.nextSibling),D===null){A=null;break e}}A=D}A!==null?(n.memoizedState={dehydrated:A,treeContext:Ra!==null?{id:Kn,overflow:Wn}:null,retryLane:536870912},D=en(18,null,null,0),D.stateNode=A,D.return=n,n.child=D,Rt=n,gt=null,D=!0):D=!1}D||Ca(n)}if(A=n.memoizedState,A!==null&&(A=A.dehydrated,A!==null))return A.data==="$!"?n.lanes=16:n.lanes=536870912,null;Zn(n)}return A=l.children,l=l.fallback,u?(Dr(),u=n.mode,A=kf({mode:"hidden",children:A},u),l=Pa(l,u,i,null),A.return=n,l.return=n,A.sibling=l,n.child=A,u=n.child,u.memoizedState=zf(i),u.childLanes=Pf(e,R,i),n.memoizedState=Lf,l):(jr(n),Uf(n,A))}if(D=e.memoizedState,D!==null&&(A=D.dehydrated,A!==null)){if(h)n.flags&256?(jr(n),n.flags&=-257,n=Hf(e,n,i)):n.memoizedState!==null?(Dr(),n.child=e.child,n.flags|=128,n=null):(Dr(),u=l.fallback,A=n.mode,l=kf({mode:"visible",children:l.children},A),u=Pa(u,A,i,null),u.flags|=2,l.return=n,u.return=n,l.sibling=u,n.child=l,Aa(n,e.child,null,i),l=n.child,l.memoizedState=zf(i),l.childLanes=Pf(e,R,i),n.memoizedState=Lf,n=u);else if(jr(n),A.data==="$!"){if(R=A.nextSibling&&A.nextSibling.dataset,R)var Y=R.dgst;R=Y,l=Error(s(419)),l.stack="",l.digest=R,Vs({value:l,source:null,stack:null}),n=Hf(e,n,i)}else if(ht||tl(e,n,i,!1),R=(i&e.childLanes)!==0,ht||R){if(R=Ye,R!==null){if(l=i&-i,(l&42)!==0)l=1;else switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=64;break;case 268435456:l=134217728;break;default:l=0}if(l=(l&(R.suspendedLanes|i))!==0?0:l,l!==0&&l!==D.retryLane)throw D.retryLane=l,Mr(e,l),Tt(R,e,l),$v}A.data==="$?"||hd(),n=Hf(e,n,i)}else A.data==="$?"?(n.flags|=128,n.child=e.child,n=EC.bind(null,e),A._reactRetry=n,n=null):(e=D.treeContext,gt=dn(A.nextSibling),Rt=n,ze=!0,un=null,Cn=!1,e!==null&&(Xt[Kt++]=Kn,Xt[Kt++]=Wn,Xt[Kt++]=Ra,Kn=e.id,Wn=e.overflow,Ra=n),n=Uf(n,l.children),n.flags|=4096);return n}return u?(Dr(),u=l.fallback,A=n.mode,D=e.child,Y=D.sibling,l=Br(D,{mode:"hidden",children:l.children}),l.subtreeFlags=D.subtreeFlags&31457280,Y!==null?u=Br(Y,u):(u=Pa(u,A,i,null),u.flags|=2),u.return=n,l.return=n,l.sibling=u,n.child=l,l=u,u=n.child,A=e.child.memoizedState,A===null?A=zf(i):(D=A.cachePool,D!==null?(Y=ct._currentValue,D=D.parent!==Y?{parent:Y,pool:Y}:D):D=Kg(),A={baseLanes:A.baseLanes|i,cachePool:D}),u.memoizedState=A,u.childLanes=Pf(e,R,i),n.memoizedState=Lf,l):(jr(n),i=e.child,e=i.sibling,i=Br(i,{mode:"visible",children:l.children}),i.return=n,i.sibling=null,e!==null&&(R=n.deletions,R===null?(n.deletions=[e],n.flags|=16):R.push(e)),n.child=i,n.memoizedState=null,i)}function Uf(e,n){return n=kf({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function kf(e,n){return Sy(e,n,0,null)}function Hf(e,n,i){return Aa(n,e.child,null,i),e=Uf(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Kv(e,n,i){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),If(e.return,n,i)}function $f(e,n,i,l,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:u}:(h.isBackwards=n,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=i,h.tailMode=u)}function Wv(e,n,i){var l=n.pendingProps,u=l.revealOrder,h=l.tail;if(vt(e,n,l.children,i),l=ot.current,(l&2)!==0)l=l&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Kv(e,i,n);else if(e.tag===19)Kv(e,i,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}switch(fe(ot,l),u){case"forwards":for(i=n.child,u=null;i!==null;)e=i.alternate,e!==null&&Mo(e)===null&&(u=i),i=i.sibling;i=u,i===null?(u=n.child,n.child=null):(u=i.sibling,i.sibling=null),$f(n,!1,u,i,h);break;case"backwards":for(i=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&Mo(e)===null){n.child=u;break}e=u.sibling,u.sibling=i,i=u,u=e}$f(n,!0,i,null,h);break;case"together":$f(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function er(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),Ir|=n.lanes,(i&n.childLanes)===0)if(e!==null){if(tl(e,n,i,!1),(i&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(s(153));if(n.child!==null){for(e=n.child,i=Br(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=Br(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function qf(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Bo(e)))}function cC(e,n,i){switch(n.tag){case 3:Rn(n,n.stateNode.containerInfo),zr(n,ct,e.memoizedState.cache),Is();break;case 27:case 5:Fn(n);break;case 4:Rn(n,n.stateNode.containerInfo);break;case 10:zr(n,n.type,n.memoizedProps.value);break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(jr(n),n.flags|=128,null):(i&n.child.childLanes)!==0?Xv(e,n,i):(jr(n),e=er(e,n,i),e!==null?e.sibling:null);jr(n);break;case 19:var u=(e.flags&128)!==0;if(l=(i&n.childLanes)!==0,l||(tl(e,n,i,!1),l=(i&n.childLanes)!==0),u){if(l)return Wv(e,n,i);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),fe(ot,ot.current),l)break;return null;case 22:case 23:return n.lanes=0,Vv(e,n,i);case 24:zr(n,ct,e.memoizedState.cache)}return er(e,n,i)}function Zv(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)ht=!0;else{if(!qf(e,i)&&(n.flags&128)===0)return ht=!1,cC(e,n,i);ht=(e.flags&131072)!==0}else ht=!1,ze&&(n.flags&1048576)!==0&&Pg(n,To,n.index);switch(n.lanes=0,n.tag){case 16:e:{e=n.pendingProps;var l=n.elementType,u=l._init;if(l=u(l._payload),n.type=l,typeof l=="function")td(l)?(e=Da(l,e),n.tag=1,n=Fv(null,n,l,e,i)):(n.tag=0,n=_f(null,n,l,e,i));else{if(l!=null){if(u=l.$$typeof,u===T){n.tag=11,n=qv(null,n,l,e,i);break e}else if(u===C){n.tag=14,n=Bv(null,n,l,e,i);break e}}throw n=k(l)||l,Error(s(306,n,""))}}return n;case 0:return _f(e,n,n.type,n.pendingProps,i);case 1:return l=n.type,u=Da(l,n.pendingProps),Fv(e,n,l,u,i);case 3:e:{if(Rn(n,n.stateNode.containerInfo),e===null)throw Error(s(387));var h=n.pendingProps;u=n.memoizedState,l=u.element,Gf(e,n),al(n,h,null,i);var R=n.memoizedState;if(h=R.cache,zr(n,ct,h),h!==u.cache&&Vf(n,[ct],i,!0),rl(),h=R.element,u.isDehydrated)if(u={element:h,isDehydrated:!1,cache:R.cache},n.updateQueue.baseState=u,n.memoizedState=u,n.flags&256){n=Qv(e,n,h,i);break e}else if(h!==l){l=Qt(Error(s(424)),n),Vs(l),n=Qv(e,n,h,i);break e}else for(gt=dn(n.stateNode.containerInfo.firstChild),Rt=n,ze=!0,un=null,Cn=!0,i=Yg(n,null,h,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Is(),h===l){n=er(e,n,i);break e}vt(e,n,h,i)}n=n.child}return n;case 26:return el(e,n),e===null?(i=tb(n.type,null,n.pendingProps,null))?n.memoizedState=i:ze||(i=n.type,e=n.pendingProps,l=ac(Ie.current).createElement(i),l[bt]=n,l[Ot]=e,yt(l,i,e),dt(l),n.stateNode=l):n.memoizedState=tb(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Fn(n),e===null&&ze&&(l=n.stateNode=Zy(n.type,n.pendingProps,Ie.current),Rt=n,Cn=!0,gt=dn(l.firstChild)),l=n.pendingProps.children,e!==null||ze?vt(e,n,l,i):n.child=Aa(n,null,l,i),el(e,n),n.child;case 5:return e===null&&ze&&((u=l=gt)&&(l=HC(l,n.type,n.pendingProps,Cn),l!==null?(n.stateNode=l,Rt=n,gt=dn(l.firstChild),Cn=!1,u=!0):u=!1),u||Ca(n)),Fn(n),u=n.type,h=n.pendingProps,R=e!==null?e.memoizedProps:null,l=h.children,Ad(u,h)?l=null:R!==null&&Ad(u,R)&&(n.flags|=32),n.memoizedState!==null&&(u=pf(e,n,nC,null,null,i),bl._currentValue=u),el(e,n),vt(e,n,l,i),n.child;case 6:return e===null&&ze&&((e=i=gt)&&(i=$C(i,n.pendingProps,Cn),i!==null?(n.stateNode=i,Rt=n,gt=null,e=!0):e=!1),e||Ca(n)),null;case 13:return Xv(e,n,i);case 4:return Rn(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Aa(n,null,l,i):vt(e,n,l,i),n.child;case 11:return qv(e,n,n.type,n.pendingProps,i);case 7:return vt(e,n,n.pendingProps,i),n.child;case 8:return vt(e,n,n.pendingProps.children,i),n.child;case 12:return vt(e,n,n.pendingProps.children,i),n.child;case 10:return l=n.pendingProps,zr(n,n.type,l.value),vt(e,n,l.children,i),n.child;case 9:return u=n.type._context,l=n.pendingProps.children,La(n),u=xt(u),l=l(u),n.flags|=1,vt(e,n,l,i),n.child;case 14:return Bv(e,n,n.type,n.pendingProps,i);case 15:return Iv(e,n,n.type,n.pendingProps,i);case 19:return Wv(e,n,i);case 22:return Vv(e,n,i);case 24:return La(n),l=xt(ct),e===null?(u=hf(),u===null&&(u=Ye,h=ff(),u.pooledCache=h,h.refCount++,h!==null&&(u.pooledCacheLanes|=i),u=h),n.memoizedState={parent:l,cache:u},Yf(n),zr(n,ct,u)):((e.lanes&i)!==0&&(Gf(e,n),al(n,null,null,i),rl()),u=e.memoizedState,h=n.memoizedState,u.parent!==l?(u={parent:l,cache:l},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),zr(n,ct,l)):(l=h.cache,zr(n,ct,l),l!==u.cache&&Vf(n,[ct],i,!0))),vt(e,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(s(156,n.tag))}var Bf=me(null),_a=null,tr=null;function zr(e,n,i){fe(Bf,n._currentValue),n._currentValue=i}function nr(e){e._currentValue=Bf.current,Ee(Bf)}function If(e,n,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),e===i)break;e=e.return}}function Vf(e,n,i,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var h=u.dependencies;if(h!==null){var R=u.child;h=h.firstContext;e:for(;h!==null;){var A=h;h=u;for(var D=0;D<n.length;D++)if(A.context===n[D]){h.lanes|=i,A=h.alternate,A!==null&&(A.lanes|=i),If(h.return,i,e),l||(R=null);break e}h=A.next}}else if(u.tag===18){if(R=u.return,R===null)throw Error(s(341));R.lanes|=i,h=R.alternate,h!==null&&(h.lanes|=i),If(R,i,e),R=null}else R=u.child;if(R!==null)R.return=u;else for(R=u;R!==null;){if(R===e){R=null;break}if(u=R.sibling,u!==null){u.return=R.return,R=u;break}R=R.return}u=R}}function tl(e,n,i,l){e=null;for(var u=n,h=!1;u!==null;){if(!h){if((u.flags&524288)!==0)h=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var R=u.alternate;if(R===null)throw Error(s(387));if(R=R.memoizedProps,R!==null){var A=u.type;Ut(u.pendingProps.value,R.value)||(e!==null?e.push(A):e=[A])}}else if(u===Et.current){if(R=u.alternate,R===null)throw Error(s(387));R.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(bl):e=[bl])}u=u.return}e!==null&&Vf(n,e,i,l),n.flags|=262144}function Bo(e){for(e=e.firstContext;e!==null;){if(!Ut(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function La(e){_a=e,tr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return Jv(_a,e)}function Io(e,n){return _a===null&&La(e),Jv(e,n)}function Jv(e,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},tr===null){if(e===null)throw Error(s(308));tr=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else tr=tr.next=n;return i}var Pr=!1;function Yf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gf(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ur(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function kr(e,n,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ke&2)!==0){var u=l.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),l.pending=n,n=Eo(e),Lg(e,null,i),n}return wo(e,l,n,i),Eo(e)}function nl(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194176)!==0)){var l=n.lanes;l&=e.pendingLanes,i|=l,n.lanes=i,Bp(e,i)}}function Ff(e,n){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var u=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var R={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?u=h=R:h=h.next=R,i=i.next}while(i!==null);h===null?u=h=n:h=h.next=n}else u=h=n;i={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:h,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var Qf=!1;function rl(){if(Qf){var e=Ti;if(e!==null)throw e}}function al(e,n,i,l){Qf=!1;var u=e.updateQueue;Pr=!1;var h=u.firstBaseUpdate,R=u.lastBaseUpdate,A=u.shared.pending;if(A!==null){u.shared.pending=null;var D=A,Y=D.next;D.next=null,R===null?h=Y:R.next=Y,R=D;var J=e.alternate;J!==null&&(J=J.updateQueue,A=J.lastBaseUpdate,A!==R&&(A===null?J.firstBaseUpdate=Y:A.next=Y,J.lastBaseUpdate=D))}if(h!==null){var ie=u.baseState;R=0,J=Y=D=null,A=h;do{var W=A.lane&-536870913,Z=W!==A.lane;if(Z?(Le&W)===W:(l&W)===W){W!==0&&W===Ri&&(Qf=!0),J!==null&&(J=J.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var ge=e,Re=A;W=n;var et=i;switch(Re.tag){case 1:if(ge=Re.payload,typeof ge=="function"){ie=ge.call(et,ie,W);break e}ie=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Re.payload,W=typeof ge=="function"?ge.call(et,ie,W):ge,W==null)break e;ie=K({},ie,W);break e;case 2:Pr=!0}}W=A.callback,W!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=u.callbacks,Z===null?u.callbacks=[W]:Z.push(W))}else Z={lane:W,tag:A.tag,payload:A.payload,callback:A.callback,next:null},J===null?(Y=J=Z,D=ie):J=J.next=Z,R|=W;if(A=A.next,A===null){if(A=u.shared.pending,A===null)break;Z=A,A=Z.next,Z.next=null,u.lastBaseUpdate=Z,u.shared.pending=null}}while(!0);J===null&&(D=ie),u.baseState=D,u.firstBaseUpdate=Y,u.lastBaseUpdate=J,h===null&&(u.shared.lanes=0),Ir|=R,e.lanes=R,e.memoizedState=ie}}function ey(e,n){if(typeof e!="function")throw Error(s(191,e));e.call(n)}function ty(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)ey(i[e],n)}function il(e,n){try{var i=n.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var u=l.next;i=u;do{if((i.tag&e)===e){l=void 0;var h=i.create,R=i.inst;l=h(),R.destroy=l}i=i.next}while(i!==u)}}catch(A){Ve(n,n.return,A)}}function Hr(e,n,i){try{var l=n.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var h=u.next;l=h;do{if((l.tag&e)===e){var R=l.inst,A=R.destroy;if(A!==void 0){R.destroy=void 0,u=n;var D=i;try{A()}catch(Y){Ve(u,D,Y)}}}l=l.next}while(l!==h)}}catch(Y){Ve(n,n.return,Y)}}function ny(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{ty(n,i)}catch(l){Ve(e,e.return,l)}}}function ry(e,n,i){i.props=Da(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){Ve(e,n,l)}}function za(e,n){try{var i=e.ref;if(i!==null){var l=e.stateNode;switch(e.tag){case 26:case 27:case 5:var u=l;break;default:u=l}typeof i=="function"?e.refCleanup=i(u):i.current=u}}catch(h){Ve(e,n,h)}}function kt(e,n){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(u){Ve(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(u){Ve(e,n,u)}else i.current=null}function ay(e){var n=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(u){Ve(e,e.return,u)}}function iy(e,n,i){try{var l=e.stateNode;LC(l,e.type,i,n),l[Ot]=n}catch(u){Ve(e,e.return,u)}}function sy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27||e.tag===4}function Xf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==27&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Kf(e,n,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?i.nodeType===8?i.parentNode.insertBefore(e,n):i.insertBefore(e,n):(i.nodeType===8?(n=i.parentNode,n.insertBefore(e,i)):(n=i,n.appendChild(e)),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=rc));else if(l!==4&&l!==27&&(e=e.child,e!==null))for(Kf(e,n,i),e=e.sibling;e!==null;)Kf(e,n,i),e=e.sibling}function Vo(e,n,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(l!==4&&l!==27&&(e=e.child,e!==null))for(Vo(e,n,i),e=e.sibling;e!==null;)Vo(e,n,i),e=e.sibling}var rr=!1,Ze=!1,Wf=!1,ly=typeof WeakSet=="function"?WeakSet:Set,mt=null,oy=!1;function uC(e,n){if(e=e.containerInfo,Td=uc,e=Tg(e),Zu(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var u=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var R=0,A=-1,D=-1,Y=0,J=0,ie=e,W=null;t:for(;;){for(var Z;ie!==i||u!==0&&ie.nodeType!==3||(A=R+u),ie!==h||l!==0&&ie.nodeType!==3||(D=R+l),ie.nodeType===3&&(R+=ie.nodeValue.length),(Z=ie.firstChild)!==null;)W=ie,ie=Z;for(;;){if(ie===e)break t;if(W===i&&++Y===u&&(A=R),W===h&&++J===l&&(D=R),(Z=ie.nextSibling)!==null)break;ie=W,W=ie.parentNode}ie=Z}i=A===-1||D===-1?null:{start:A,end:D}}else i=null}i=i||{start:0,end:0}}else i=null;for(Cd={focusedElem:e,selectionRange:i},uc=!1,mt=n;mt!==null;)if(n=mt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,mt=e;else for(;mt!==null;){switch(n=mt,h=n.alternate,e=n.flags,n.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,i=n,u=h.memoizedProps,h=h.memoizedState,l=i.stateNode;try{var ge=Da(i.type,u,i.elementType===i.type);e=l.getSnapshotBeforeUpdate(ge,h),l.__reactInternalSnapshotBeforeUpdate=e}catch(Re){Ve(i,i.return,Re)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,i=e.nodeType,i===9)Md(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Md(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=n.sibling,e!==null){e.return=n.return,mt=e;break}mt=n.return}return ge=oy,oy=!1,ge}function cy(e,n,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:ir(e,i),l&4&&il(5,i);break;case 1:if(ir(e,i),l&4)if(e=i.stateNode,n===null)try{e.componentDidMount()}catch(A){Ve(i,i.return,A)}else{var u=Da(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(u,n,e.__reactInternalSnapshotBeforeUpdate)}catch(A){Ve(i,i.return,A)}}l&64&&ny(i),l&512&&za(i,i.return);break;case 3:if(ir(e,i),l&64&&(l=i.updateQueue,l!==null)){if(e=null,i.child!==null)switch(i.child.tag){case 27:case 5:e=i.child.stateNode;break;case 1:e=i.child.stateNode}try{ty(l,e)}catch(A){Ve(i,i.return,A)}}break;case 26:ir(e,i),l&512&&za(i,i.return);break;case 27:case 5:ir(e,i),n===null&&l&4&&ay(i),l&512&&za(i,i.return);break;case 12:ir(e,i);break;case 13:ir(e,i),l&4&&dy(e,i);break;case 22:if(u=i.memoizedState!==null||rr,!u){n=n!==null&&n.memoizedState!==null||Ze;var h=rr,R=Ze;rr=u,(Ze=n)&&!R?$r(e,i,(i.subtreeFlags&8772)!==0):ir(e,i),rr=h,Ze=R}l&512&&(i.memoizedProps.mode==="manual"?za(i,i.return):kt(i,i.return));break;default:ir(e,i)}}function uy(e){var n=e.alternate;n!==null&&(e.alternate=null,uy(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Pu(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var st=null,Ht=!1;function ar(e,n,i){for(i=i.child;i!==null;)fy(e,n,i),i=i.sibling}function fy(e,n,i){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(Ns,i)}catch{}switch(i.tag){case 26:Ze||kt(i,n),ar(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Ze||kt(i,n);var l=st,u=Ht;for(st=i.stateNode,ar(e,n,i),i=i.stateNode,n=i.attributes;n.length;)i.removeAttributeNode(n[0]);Pu(i),st=l,Ht=u;break;case 5:Ze||kt(i,n);case 6:u=st;var h=Ht;if(st=null,ar(e,n,i),st=u,Ht=h,st!==null)if(Ht)try{e=st,l=i.stateNode,e.nodeType===8?e.parentNode.removeChild(l):e.removeChild(l)}catch(R){Ve(i,n,R)}else try{st.removeChild(i.stateNode)}catch(R){Ve(i,n,R)}break;case 18:st!==null&&(Ht?(n=st,i=i.stateNode,n.nodeType===8?Od(n.parentNode,i):n.nodeType===1&&Od(n,i),El(n)):Od(st,i.stateNode));break;case 4:l=st,u=Ht,st=i.stateNode.containerInfo,Ht=!0,ar(e,n,i),st=l,Ht=u;break;case 0:case 11:case 14:case 15:Ze||Hr(2,i,n),Ze||Hr(4,i,n),ar(e,n,i);break;case 1:Ze||(kt(i,n),l=i.stateNode,typeof l.componentWillUnmount=="function"&&ry(i,n,l)),ar(e,n,i);break;case 21:ar(e,n,i);break;case 22:Ze||kt(i,n),Ze=(l=Ze)||i.memoizedState!==null,ar(e,n,i),Ze=l;break;default:ar(e,n,i)}}function dy(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{El(e)}catch(i){Ve(n,n.return,i)}}function fC(e){switch(e.tag){case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new ly),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new ly),n;default:throw Error(s(435,e.tag))}}function Zf(e,n){var i=fC(e);n.forEach(function(l){var u=RC.bind(null,e,l);i.has(l)||(i.add(l),l.then(u,u))})}function Zt(e,n){var i=n.deletions;if(i!==null)for(var l=0;l<i.length;l++){var u=i[l],h=e,R=n,A=R;e:for(;A!==null;){switch(A.tag){case 27:case 5:st=A.stateNode,Ht=!1;break e;case 3:st=A.stateNode.containerInfo,Ht=!0;break e;case 4:st=A.stateNode.containerInfo,Ht=!0;break e}A=A.return}if(st===null)throw Error(s(160));fy(h,R,u),st=null,Ht=!1,h=u.alternate,h!==null&&(h.return=null),u.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)hy(n,e),n=n.sibling}var fn=null;function hy(e,n){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Zt(n,e),Jt(e),l&4&&(Hr(3,e,e.return),il(3,e),Hr(5,e,e.return));break;case 1:Zt(n,e),Jt(e),l&512&&(Ze||i===null||kt(i,i.return)),l&64&&rr&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var u=fn;if(Zt(n,e),Jt(e),l&512&&(Ze||i===null||kt(i,i.return)),l&4){var h=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,u=u.ownerDocument||u;t:switch(l){case"title":h=u.getElementsByTagName("title")[0],(!h||h[js]||h[bt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=u.createElement(l),u.head.insertBefore(h,u.querySelector("head > title"))),yt(h,l,i),h[bt]=e,dt(h),l=h;break e;case"link":var R=ab("link","href",u).get(l+(i.href||""));if(R){for(var A=0;A<R.length;A++)if(h=R[A],h.getAttribute("href")===(i.href==null?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){R.splice(A,1);break t}}h=u.createElement(l),yt(h,l,i),u.head.appendChild(h);break;case"meta":if(R=ab("meta","content",u).get(l+(i.content||""))){for(A=0;A<R.length;A++)if(h=R[A],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){R.splice(A,1);break t}}h=u.createElement(l),yt(h,l,i),u.head.appendChild(h);break;default:throw Error(s(468,l))}h[bt]=e,dt(h),l=h}e.stateNode=l}else ib(u,e.type,e.stateNode);else e.stateNode=rb(u,l,e.memoizedProps);else h!==l?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,l===null?ib(u,e.type,e.stateNode):rb(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&iy(e,e.memoizedProps,i.memoizedProps)}break;case 27:if(l&4&&e.alternate===null){u=e.stateNode,h=e.memoizedProps;try{for(var D=u.firstChild;D;){var Y=D.nextSibling,J=D.nodeName;D[js]||J==="HEAD"||J==="BODY"||J==="SCRIPT"||J==="STYLE"||J==="LINK"&&D.rel.toLowerCase()==="stylesheet"||u.removeChild(D),D=Y}for(var ie=e.type,W=u.attributes;W.length;)u.removeAttributeNode(W[0]);yt(u,ie,h),u[bt]=e,u[Ot]=h}catch(ge){Ve(e,e.return,ge)}}case 5:if(Zt(n,e),Jt(e),l&512&&(Ze||i===null||kt(i,i.return)),e.flags&32){u=e.stateNode;try{di(u,"")}catch(ge){Ve(e,e.return,ge)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,iy(e,u,i!==null?i.memoizedProps:u)),l&1024&&(Wf=!0);break;case 6:if(Zt(n,e),Jt(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(ge){Ve(e,e.return,ge)}}break;case 3:if(lc=null,u=fn,fn=ic(n.containerInfo),Zt(n,e),fn=u,Jt(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{El(n.containerInfo)}catch(ge){Ve(e,e.return,ge)}Wf&&(Wf=!1,my(e));break;case 4:l=fn,fn=ic(e.stateNode.containerInfo),Zt(n,e),Jt(e),fn=l;break;case 12:Zt(n,e),Jt(e);break;case 13:Zt(n,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(ld=Tn()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Zf(e,l)));break;case 22:if(l&512&&(Ze||i===null||kt(i,i.return)),D=e.memoizedState!==null,Y=i!==null&&i.memoizedState!==null,J=rr,ie=Ze,rr=J||D,Ze=ie||Y,Zt(n,e),Ze=ie,rr=J,Jt(e),n=e.stateNode,n._current=e,n._visibility&=-3,n._visibility|=n._pendingVisibility&2,l&8192&&(n._visibility=D?n._visibility&-2:n._visibility|1,D&&(n=rr||Ze,i===null||Y||n||Oi(e)),e.memoizedProps===null||e.memoizedProps.mode!=="manual"))e:for(i=null,n=e;;){if(n.tag===5||n.tag===26||n.tag===27){if(i===null){Y=i=n;try{if(u=Y.stateNode,D)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{R=Y.stateNode,A=Y.memoizedProps.style;var Z=A!=null&&A.hasOwnProperty("display")?A.display:null;R.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(ge){Ve(Y,Y.return,ge)}}}else if(n.tag===6){if(i===null){Y=n;try{Y.stateNode.nodeValue=D?"":Y.memoizedProps}catch(ge){Ve(Y,Y.return,ge)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Zf(e,i))));break;case 19:Zt(n,e),Jt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Zf(e,l)));break;case 21:break;default:Zt(n,e),Jt(e)}}function Jt(e){var n=e.flags;if(n&2){try{if(e.tag!==27){e:{for(var i=e.return;i!==null;){if(sy(i)){var l=i;break e}i=i.return}throw Error(s(160))}switch(l.tag){case 27:var u=l.stateNode,h=Xf(e);Vo(e,h,u);break;case 5:var R=l.stateNode;l.flags&32&&(di(R,""),l.flags&=-33);var A=Xf(e);Vo(e,A,R);break;case 3:case 4:var D=l.stateNode.containerInfo,Y=Xf(e);Kf(e,Y,D);break;default:throw Error(s(161))}}}catch(J){Ve(e,e.return,J)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function my(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;my(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function ir(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)cy(e,n.alternate,n),n=n.sibling}function Oi(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Hr(4,n,n.return),Oi(n);break;case 1:kt(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&ry(n,n.return,i),Oi(n);break;case 26:case 27:case 5:kt(n,n.return),Oi(n);break;case 22:kt(n,n.return),n.memoizedState===null&&Oi(n);break;default:Oi(n)}e=e.sibling}}function $r(e,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var l=n.alternate,u=e,h=n,R=h.flags;switch(h.tag){case 0:case 11:case 15:$r(u,h,i),il(4,h);break;case 1:if($r(u,h,i),l=h,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(Y){Ve(l,l.return,Y)}if(l=h,u=l.updateQueue,u!==null){var A=l.stateNode;try{var D=u.shared.hiddenCallbacks;if(D!==null)for(u.shared.hiddenCallbacks=null,u=0;u<D.length;u++)ey(D[u],A)}catch(Y){Ve(l,l.return,Y)}}i&&R&64&&ny(h),za(h,h.return);break;case 26:case 27:case 5:$r(u,h,i),i&&l===null&&R&4&&ay(h),za(h,h.return);break;case 12:$r(u,h,i);break;case 13:$r(u,h,i),i&&R&4&&dy(u,h);break;case 22:h.memoizedState===null&&$r(u,h,i),za(h,h.return);break;default:$r(u,h,i)}n=n.sibling}}function Jf(e,n){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Xs(i))}function ed(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Xs(e))}function qr(e,n,i,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)py(e,n,i,l),n=n.sibling}function py(e,n,i,l){var u=n.flags;switch(n.tag){case 0:case 11:case 15:qr(e,n,i,l),u&2048&&il(9,n);break;case 3:qr(e,n,i,l),u&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Xs(e)));break;case 12:if(u&2048){qr(e,n,i,l),e=n.stateNode;try{var h=n.memoizedProps,R=h.id,A=h.onPostCommit;typeof A=="function"&&A(R,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(D){Ve(n,n.return,D)}}else qr(e,n,i,l);break;case 23:break;case 22:h=n.stateNode,n.memoizedState!==null?h._visibility&4?qr(e,n,i,l):sl(e,n):h._visibility&4?qr(e,n,i,l):(h._visibility|=4,Mi(e,n,i,l,(n.subtreeFlags&10256)!==0)),u&2048&&Jf(n.alternate,n);break;case 24:qr(e,n,i,l),u&2048&&ed(n.alternate,n);break;default:qr(e,n,i,l)}}function Mi(e,n,i,l,u){for(u=u&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;){var h=e,R=n,A=i,D=l,Y=R.flags;switch(R.tag){case 0:case 11:case 15:Mi(h,R,A,D,u),il(8,R);break;case 23:break;case 22:var J=R.stateNode;R.memoizedState!==null?J._visibility&4?Mi(h,R,A,D,u):sl(h,R):(J._visibility|=4,Mi(h,R,A,D,u)),u&&Y&2048&&Jf(R.alternate,R);break;case 24:Mi(h,R,A,D,u),u&&Y&2048&&ed(R.alternate,R);break;default:Mi(h,R,A,D,u)}n=n.sibling}}function sl(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=e,l=n,u=l.flags;switch(l.tag){case 22:sl(i,l),u&2048&&Jf(l.alternate,l);break;case 24:sl(i,l),u&2048&&ed(l.alternate,l);break;default:sl(i,l)}n=n.sibling}}var ll=8192;function ji(e){if(e.subtreeFlags&ll)for(e=e.child;e!==null;)gy(e),e=e.sibling}function gy(e){switch(e.tag){case 26:ji(e),e.flags&ll&&e.memoizedState!==null&&JC(fn,e.memoizedState,e.memoizedProps);break;case 5:ji(e);break;case 3:case 4:var n=fn;fn=ic(e.stateNode.containerInfo),ji(e),fn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=ll,ll=16777216,ji(e),ll=n):ji(e));break;default:ji(e)}}function vy(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function ol(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var l=n[i];mt=l,by(l,e)}vy(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)yy(e),e=e.sibling}function yy(e){switch(e.tag){case 0:case 11:case 15:ol(e),e.flags&2048&&Hr(9,e,e.return);break;case 3:ol(e);break;case 12:ol(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&4&&(e.return===null||e.return.tag!==13)?(n._visibility&=-5,Yo(e)):ol(e);break;default:ol(e)}}function Yo(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var l=n[i];mt=l,by(l,e)}vy(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Hr(8,n,n.return),Yo(n);break;case 22:i=n.stateNode,i._visibility&4&&(i._visibility&=-5,Yo(n));break;default:Yo(n)}e=e.sibling}}function by(e,n){for(;mt!==null;){var i=mt;switch(i.tag){case 0:case 11:case 15:Hr(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Xs(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,mt=l;else e:for(i=e;mt!==null;){l=mt;var u=l.sibling,h=l.return;if(uy(l),l===i){mt=null;break e}if(u!==null){u.return=h,mt=u;break e}mt=h}}}function dC(e,n,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,n,i,l){return new dC(e,n,i,l)}function td(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Br(e,n){var i=e.alternate;return i===null?(i=en(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&31457280,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function xy(e,n){e.flags&=31457282;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,n=i.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Go(e,n,i,l,u,h){var R=0;if(l=e,typeof e=="function")td(e)&&(R=1);else if(typeof e=="string")R=WC(e,i,Se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case m:return Pa(i.children,u,h,n);case p:R=8,u|=24;break;case v:return e=en(12,i,n,u|2),e.elementType=v,e.lanes=h,e;case S:return e=en(13,i,n,u),e.elementType=S,e.lanes=h,e;case w:return e=en(19,i,n,u),e.elementType=w,e.lanes=h,e;case O:return Sy(i,u,h,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case b:case E:R=10;break e;case x:R=9;break e;case T:R=11;break e;case C:R=14;break e;case N:R=16,l=null;break e}R=29,i=Error(s(130,e===null?"null":typeof e,"")),l=null}return n=en(R,i,n,u),n.elementType=e,n.type=l,n.lanes=h,n}function Pa(e,n,i,l){return e=en(7,e,l,n),e.lanes=i,e}function Sy(e,n,i,l){e=en(22,e,l,n),e.elementType=O,e.lanes=i;var u={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var h=u._current;if(h===null)throw Error(s(456));if((u._pendingVisibility&2)===0){var R=Mr(h,2);R!==null&&(u._pendingVisibility|=2,Tt(R,h,2))}},attach:function(){var h=u._current;if(h===null)throw Error(s(456));if((u._pendingVisibility&2)!==0){var R=Mr(h,2);R!==null&&(u._pendingVisibility&=-3,Tt(R,h,2))}}};return e.stateNode=u,e}function nd(e,n,i){return e=en(6,e,null,n),e.lanes=i,e}function rd(e,n,i){return n=en(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function sr(e){e.flags|=4}function wy(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!sb(n)){if(n=Wt.current,n!==null&&((Le&4194176)===Le?An!==null:(Le&62914560)!==Le&&(Le&536870912)===0||n!==An))throw Gs=of,Hg;e.flags|=8192}}function Fo(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?$p():536870912,e.lanes|=n,_i|=n)}function cl(e,n){if(!ze)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Xe(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(n)for(var u=e.child;u!==null;)i|=u.lanes|u.childLanes,l|=u.subtreeFlags&31457280,l|=u.flags&31457280,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)i|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=i,n}function hC(e,n,i){var l=n.pendingProps;switch(sf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(n),null;case 1:return Xe(n),null;case 3:return i=n.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),nr(ct),Vt(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Bs(n)?sr(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,un!==null&&(fd(un),un=null))),Xe(n),null;case 26:return i=n.memoizedState,e===null?(sr(n),i!==null?(Xe(n),wy(n,i)):(Xe(n),n.flags&=-16777217)):i?i!==e.memoizedState?(sr(n),Xe(n),wy(n,i)):(Xe(n),n.flags&=-16777217):(e.memoizedProps!==l&&sr(n),Xe(n),n.flags&=-16777217),null;case 27:si(n),i=Ie.current;var u=n.type;if(e!==null&&n.stateNode!=null)e.memoizedProps!==l&&sr(n);else{if(!l){if(n.stateNode===null)throw Error(s(166));return Xe(n),null}e=Se.current,Bs(n)?Ug(n):(e=Zy(u,l,i),n.stateNode=e,sr(n))}return Xe(n),null;case 5:if(si(n),i=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&sr(n);else{if(!l){if(n.stateNode===null)throw Error(s(166));return Xe(n),null}if(e=Se.current,Bs(n))Ug(n);else{switch(u=ac(Ie.current),e){case 1:e=u.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:e=u.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":e=u.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":e=u.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?u.createElement("select",{is:l.is}):u.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?u.createElement(i,{is:l.is}):u.createElement(i)}}e[bt]=n,e[Ot]=l;e:for(u=n.child;u!==null;){if(u.tag===5||u.tag===6)e.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===n)break e;for(;u.sibling===null;){if(u.return===null||u.return===n)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}n.stateNode=e;e:switch(yt(e,i,l),i){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&sr(n)}}return Xe(n),n.flags&=-16777217,null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==l&&sr(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error(s(166));if(e=Ie.current,Bs(n)){if(e=n.stateNode,i=n.memoizedProps,l=null,u=Rt,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[bt]=n,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Gy(e.nodeValue,i)),e||Ca(n)}else e=ac(e).createTextNode(l),e[bt]=n,n.stateNode=e}return Xe(n),null;case 13:if(l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Bs(n),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(s(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(s(317));u[bt]=n}else Is(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Xe(n),u=!1}else un!==null&&(fd(un),un=null),u=!0;if(!u)return n.flags&256?(Zn(n),n):(Zn(n),null)}if(Zn(n),(n.flags&128)!==0)return n.lanes=i,n;if(i=l!==null,e=e!==null&&e.memoizedState!==null,i){l=n.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool);var h=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==u&&(l.flags|=2048)}return i!==e&&i&&(n.child.flags|=8192),Fo(n,n.updateQueue),Xe(n),null;case 4:return Vt(),e===null&&wd(n.stateNode.containerInfo),Xe(n),null;case 10:return nr(n.type),Xe(n),null;case 19:if(Ee(ot),u=n.memoizedState,u===null)return Xe(n),null;if(l=(n.flags&128)!==0,h=u.rendering,h===null)if(l)cl(u,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Mo(e),h!==null){for(n.flags|=128,cl(u,!1),e=h.updateQueue,n.updateQueue=e,Fo(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)xy(i,e),i=i.sibling;return fe(ot,ot.current&1|2),n.child}e=e.sibling}u.tail!==null&&Tn()>Qo&&(n.flags|=128,l=!0,cl(u,!1),n.lanes=4194304)}else{if(!l)if(e=Mo(h),e!==null){if(n.flags|=128,l=!0,e=e.updateQueue,n.updateQueue=e,Fo(n,e),cl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!h.alternate&&!ze)return Xe(n),null}else 2*Tn()-u.renderingStartTime>Qo&&i!==536870912&&(n.flags|=128,l=!0,cl(u,!1),n.lanes=4194304);u.isBackwards?(h.sibling=n.child,n.child=h):(e=u.last,e!==null?e.sibling=h:n.child=h,u.last=h)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Tn(),n.sibling=null,e=ot.current,fe(ot,l?e&1|2:e&1),n):(Xe(n),null);case 22:case 23:return Zn(n),uf(),l=n.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?(i&536870912)!==0&&(n.flags&128)===0&&(Xe(n),n.subtreeFlags&6&&(n.flags|=8192)):Xe(n),i=n.updateQueue,i!==null&&Fo(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==i&&(n.flags|=2048),e!==null&&Ee(Na),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),nr(ct),Xe(n),null;case 25:return null}throw Error(s(156,n.tag))}function mC(e,n){switch(sf(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return nr(ct),Vt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return si(n),null;case 13:if(Zn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(s(340));Is()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Ee(ot),null;case 4:return Vt(),null;case 10:return nr(n.type),null;case 22:case 23:return Zn(n),uf(),e!==null&&Ee(Na),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return nr(ct),null;case 25:return null;default:return null}}function Ey(e,n){switch(sf(n),n.tag){case 3:nr(ct),Vt();break;case 26:case 27:case 5:si(n);break;case 4:Vt();break;case 13:Zn(n);break;case 19:Ee(ot);break;case 10:nr(n.type);break;case 22:case 23:Zn(n),uf(),e!==null&&Ee(Na);break;case 24:nr(ct)}}var pC={getCacheForType:function(e){var n=xt(ct),i=n.data.get(e);return i===void 0&&(i=e(),n.data.set(e,i)),i}},gC=typeof WeakMap=="function"?WeakMap:Map,Ke=0,Ye=null,je=null,Le=0,Ge=0,$t=null,lr=!1,Di=!1,ad=!1,or=0,Je=0,Ir=0,Ua=0,id=0,tn=0,_i=0,ul=null,On=null,sd=!1,ld=0,Qo=1/0,Xo=null,Vr=null,Ko=!1,ka=null,fl=0,od=0,cd=null,dl=0,ud=null;function qt(){if((Ke&2)!==0&&Le!==0)return Le&-Le;if(U.T!==null){var e=Ri;return e!==0?e:yd()}return Vp()}function Ry(){tn===0&&(tn=(Le&536870912)===0||ze?Hp():536870912);var e=Wt.current;return e!==null&&(e.flags|=32),tn}function Tt(e,n,i){(e===Ye&&Ge===2||e.cancelPendingCommit!==null)&&(Li(e,0),cr(e,Le,tn,!1)),Ms(e,i),((Ke&2)===0||e!==Ye)&&(e===Ye&&((Ke&2)===0&&(Ua|=i),Je===4&&cr(e,Le,tn,!1)),Mn(e))}function Ty(e,n,i){if((Ke&6)!==0)throw Error(s(327));var l=!i&&(n&60)===0&&(n&e.expiredLanes)===0||Os(e,n),u=l?bC(e,n):md(e,n,!0),h=l;do{if(u===0){Di&&!l&&cr(e,n,0,!1);break}else if(u===6)cr(e,n,0,!lr);else{if(i=e.current.alternate,h&&!vC(i)){u=md(e,n,!1),h=!1;continue}if(u===2){if(h=n,e.errorRecoveryDisabledLanes&h)var R=0;else R=e.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){n=R;e:{var A=e;u=ul;var D=A.current.memoizedState.isDehydrated;if(D&&(Li(A,R).flags|=256),R=md(A,R,!1),R!==2){if(ad&&!D){A.errorRecoveryDisabledLanes|=h,Ua|=h,u=4;break e}h=On,On=u,h!==null&&fd(h)}u=R}if(h=!1,u!==2)continue}}if(u===1){Li(e,0),cr(e,n,0,!0);break}e:{switch(l=e,u){case 0:case 1:throw Error(s(345));case 4:if((n&4194176)===n){cr(l,n,tn,!lr);break e}break;case 2:On=null;break;case 3:case 5:break;default:throw Error(s(329))}if(l.finishedWork=i,l.finishedLanes=n,(n&62914560)===n&&(h=ld+300-Tn(),10<h)){if(cr(l,n,tn,!lr),oo(l,0)!==0)break e;l.timeoutHandle=Xy(Cy.bind(null,l,i,On,Xo,sd,n,tn,Ua,_i,lr,2,-0,0),h);break e}Cy(l,i,On,Xo,sd,n,tn,Ua,_i,lr,0,-0,0)}}break}while(!0);Mn(e)}function fd(e){On===null?On=e:On.push.apply(On,e)}function Cy(e,n,i,l,u,h,R,A,D,Y,J,ie,W){var Z=n.subtreeFlags;if((Z&8192||(Z&16785408)===16785408)&&(yl={stylesheets:null,count:0,unsuspend:ZC},gy(n),n=eA(),n!==null)){e.cancelPendingCommit=n(_y.bind(null,e,i,l,u,R,A,D,1,ie,W)),cr(e,h,R,!Y);return}_y(e,i,l,u,R,A,D,J,ie,W)}function vC(e){for(var n=e;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var u=i[l],h=u.getSnapshot;u=u.value;try{if(!Ut(h(),u))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function cr(e,n,i,l){n&=~id,n&=~Ua,e.suspendedLanes|=n,e.pingedLanes&=~n,l&&(e.warmLanes|=n),l=e.expirationTimes;for(var u=n;0<u;){var h=31-Pt(u),R=1<<h;l[h]=-1,u&=~R}i!==0&&qp(e,i,n)}function Wo(){return(Ke&6)===0?(hl(0),!1):!0}function dd(){if(je!==null){if(Ge===0)var e=je.return;else e=je,tr=_a=null,yf(e),wi=null,Fs=0,e=je;for(;e!==null;)Ey(e.alternate,e),e=e.return;je=null}}function Li(e,n){e.finishedWork=null,e.finishedLanes=0;var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,PC(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),dd(),Ye=e,je=i=Br(e.current,null),Le=n,Ge=0,$t=null,lr=!1,Di=Os(e,n),ad=!1,_i=tn=id=Ua=Ir=Je=0,On=ul=null,sd=!1,(n&8)!==0&&(n|=n&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=n;0<l;){var u=31-Pt(l),h=1<<u;n|=e[u],l&=~h}return or=n,So(),i}function Ay(e,n){Oe=null,U.H=Nn,n===Ys?(n=Bg(),Ge=3):n===Hg?(n=Bg(),Ge=4):Ge=n===$v?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,$t=n,je===null&&(Je=1,qo(e,Qt(n,e.current)))}function Ny(){var e=U.H;return U.H=Nn,e===null?Nn:e}function Oy(){var e=U.A;return U.A=pC,e}function hd(){Je=4,lr||(Le&4194176)!==Le&&Wt.current!==null||(Di=!0),(Ir&134217727)===0&&(Ua&134217727)===0||Ye===null||cr(Ye,Le,tn,!1)}function md(e,n,i){var l=Ke;Ke|=2;var u=Ny(),h=Oy();(Ye!==e||Le!==n)&&(Xo=null,Li(e,n)),n=!1;var R=Je;e:do try{if(Ge!==0&&je!==null){var A=je,D=$t;switch(Ge){case 8:dd(),R=6;break e;case 3:case 2:case 6:Wt.current===null&&(n=!0);var Y=Ge;if(Ge=0,$t=null,zi(e,A,D,Y),i&&Di){R=0;break e}break;default:Y=Ge,Ge=0,$t=null,zi(e,A,D,Y)}}yC(),R=Je;break}catch(J){Ay(e,J)}while(!0);return n&&e.shellSuspendCounter++,tr=_a=null,Ke=l,U.H=u,U.A=h,je===null&&(Ye=null,Le=0,So()),R}function yC(){for(;je!==null;)My(je)}function bC(e,n){var i=Ke;Ke|=2;var l=Ny(),u=Oy();Ye!==e||Le!==n?(Xo=null,Qo=Tn()+500,Li(e,n)):Di=Os(e,n);e:do try{if(Ge!==0&&je!==null){n=je;var h=$t;t:switch(Ge){case 1:Ge=0,$t=null,zi(e,n,h,1);break;case 2:if($g(h)){Ge=0,$t=null,jy(n);break}n=function(){Ge===2&&Ye===e&&(Ge=7),Mn(e)},h.then(n,n);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:$g(h)?(Ge=0,$t=null,jy(n)):(Ge=0,$t=null,zi(e,n,h,7));break;case 5:var R=null;switch(je.tag){case 26:R=je.memoizedState;case 5:case 27:var A=je;if(!R||sb(R)){Ge=0,$t=null;var D=A.sibling;if(D!==null)je=D;else{var Y=A.return;Y!==null?(je=Y,Zo(Y)):je=null}break t}}Ge=0,$t=null,zi(e,n,h,5);break;case 6:Ge=0,$t=null,zi(e,n,h,6);break;case 8:dd(),Je=6;break e;default:throw Error(s(462))}}xC();break}catch(J){Ay(e,J)}while(!0);return tr=_a=null,U.H=l,U.A=u,Ke=i,je!==null?0:(Ye=null,Le=0,So(),Je)}function xC(){for(;je!==null&&!BR();)My(je)}function My(e){var n=Zv(e.alternate,e,or);e.memoizedProps=e.pendingProps,n===null?Zo(e):je=n}function jy(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=Gv(i,n,n.pendingProps,n.type,void 0,Le);break;case 11:n=Gv(i,n,n.pendingProps,n.type.render,n.ref,Le);break;case 5:yf(n);default:Ey(i,n),n=je=xy(n,or),n=Zv(i,n,or)}e.memoizedProps=e.pendingProps,n===null?Zo(e):je=n}function zi(e,n,i,l){tr=_a=null,yf(n),wi=null,Fs=0;var u=n.return;try{if(oC(e,u,n,i,Le)){Je=1,qo(e,Qt(i,e.current)),je=null;return}}catch(h){if(u!==null)throw je=u,h;Je=1,qo(e,Qt(i,e.current)),je=null;return}n.flags&32768?(ze||l===1?e=!0:Di||(Le&536870912)!==0?e=!1:(lr=e=!0,(l===2||l===3||l===6)&&(l=Wt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Dy(n,e)):Zo(n)}function Zo(e){var n=e;do{if((n.flags&32768)!==0){Dy(n,lr);return}e=n.return;var i=hC(n.alternate,n,or);if(i!==null){je=i;return}if(n=n.sibling,n!==null){je=n;return}je=n=e}while(n!==null);Je===0&&(Je=5)}function Dy(e,n){do{var i=mC(e.alternate,e);if(i!==null){i.flags&=32767,je=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){je=e;return}je=e=i}while(e!==null);Je=6,je=null}function _y(e,n,i,l,u,h,R,A,D,Y){var J=U.T,ie=re.p;try{re.p=2,U.T=null,SC(e,n,i,l,ie,u,h,R,A,D,Y)}finally{U.T=J,re.p=ie}}function SC(e,n,i,l,u,h,R,A){do Pi();while(ka!==null);if((Ke&6)!==0)throw Error(s(327));var D=e.finishedWork;if(l=e.finishedLanes,D===null)return null;if(e.finishedWork=null,e.finishedLanes=0,D===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var Y=D.lanes|D.childLanes;if(Y|=nf,JR(e,l,Y,h,R,A),e===Ye&&(je=Ye=null,Le=0),(D.subtreeFlags&10256)===0&&(D.flags&10256)===0||Ko||(Ko=!0,od=Y,cd=i,TC(io,function(){return Pi(),null})),i=(D.flags&15990)!==0,(D.subtreeFlags&15990)!==0||i?(i=U.T,U.T=null,h=re.p,re.p=2,R=Ke,Ke|=4,uC(e,D),hy(D,e),YT(Cd,e.containerInfo),uc=!!Td,Cd=Td=null,e.current=D,cy(e,D.alternate,D),IR(),Ke=R,re.p=h,U.T=i):e.current=D,Ko?(Ko=!1,ka=e,fl=l):Ly(e,Y),Y=e.pendingLanes,Y===0&&(Vr=null),QR(D.stateNode),Mn(e),n!==null)for(u=e.onRecoverableError,D=0;D<n.length;D++)Y=n[D],u(Y.value,{componentStack:Y.stack});return(fl&3)!==0&&Pi(),Y=e.pendingLanes,(l&4194218)!==0&&(Y&42)!==0?e===ud?dl++:(dl=0,ud=e):dl=0,hl(0),null}function Ly(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Xs(n)))}function Pi(){if(ka!==null){var e=ka,n=od;od=0;var i=Ip(fl),l=U.T,u=re.p;try{if(re.p=32>i?32:i,U.T=null,ka===null)var h=!1;else{i=cd,cd=null;var R=ka,A=fl;if(ka=null,fl=0,(Ke&6)!==0)throw Error(s(331));var D=Ke;if(Ke|=4,yy(R.current),py(R,R.current,A,i),Ke=D,hl(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(Ns,R)}catch{}h=!0}return h}finally{re.p=u,U.T=l,Ly(e,n)}}return!1}function zy(e,n,i){n=Qt(i,n),n=Df(e.stateNode,n,2),e=kr(e,n,2),e!==null&&(Ms(e,2),Mn(e))}function Ve(e,n,i){if(e.tag===3)zy(e,e,i);else for(;n!==null;){if(n.tag===3){zy(n,e,i);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Vr===null||!Vr.has(l))){e=Qt(i,e),i=kv(2),l=kr(n,i,2),l!==null&&(Hv(i,l,n,e),Ms(l,2),Mn(l));break}}n=n.return}}function pd(e,n,i){var l=e.pingCache;if(l===null){l=e.pingCache=new gC;var u=new Set;l.set(n,u)}else u=l.get(n),u===void 0&&(u=new Set,l.set(n,u));u.has(i)||(ad=!0,u.add(i),e=wC.bind(null,e,n,i),n.then(e,e))}function wC(e,n,i){var l=e.pingCache;l!==null&&l.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ye===e&&(Le&i)===i&&(Je===4||Je===3&&(Le&62914560)===Le&&300>Tn()-ld?(Ke&2)===0&&Li(e,0):id|=i,_i===Le&&(_i=0)),Mn(e)}function Py(e,n){n===0&&(n=$p()),e=Mr(e,n),e!==null&&(Ms(e,n),Mn(e))}function EC(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),Py(e,i)}function RC(e,n){var i=0;switch(e.tag){case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(i=u.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(n),Py(e,i)}function TC(e,n){return Du(e,n)}var Jo=null,Ui=null,gd=!1,ec=!1,vd=!1,Ha=0;function Mn(e){e!==Ui&&e.next===null&&(Ui===null?Jo=Ui=e:Ui=Ui.next=e),ec=!0,gd||(gd=!0,AC(CC))}function hl(e,n){if(!vd&&ec){vd=!0;do for(var i=!1,l=Jo;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var h=0;else{var R=l.suspendedLanes,A=l.pingedLanes;h=(1<<31-Pt(42|e)+1)-1,h&=u&~(R&~A),h=h&201326677?h&201326677|1:h?h|2:0}h!==0&&(i=!0,Hy(l,h))}else h=Le,h=oo(l,l===Ye?h:0),(h&3)===0||Os(l,h)||(i=!0,Hy(l,h));l=l.next}while(i);vd=!1}}function CC(){ec=gd=!1;var e=0;Ha!==0&&(zC()&&(e=Ha),Ha=0);for(var n=Tn(),i=null,l=Jo;l!==null;){var u=l.next,h=Uy(l,n);h===0?(l.next=null,i===null?Jo=u:i.next=u,u===null&&(Ui=i)):(i=l,(e!==0||(h&3)!==0)&&(ec=!0)),l=u}hl(e)}function Uy(e,n){for(var i=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var R=31-Pt(h),A=1<<R,D=u[R];D===-1?((A&i)===0||(A&l)!==0)&&(u[R]=ZR(A,n)):D<=n&&(e.expiredLanes|=A),h&=~A}if(n=Ye,i=Le,i=oo(e,e===n?i:0),l=e.callbackNode,i===0||e===n&&Ge===2||e.cancelPendingCommit!==null)return l!==null&&l!==null&&_u(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Os(e,i)){if(n=i&-i,n===e.callbackPriority)return n;switch(l!==null&&_u(l),Ip(i)){case 2:case 8:i=Up;break;case 32:i=io;break;case 268435456:i=kp;break;default:i=io}return l=ky.bind(null,e),i=Du(i,l),e.callbackPriority=n,e.callbackNode=i,n}return l!==null&&l!==null&&_u(l),e.callbackPriority=2,e.callbackNode=null,2}function ky(e,n){var i=e.callbackNode;if(Pi()&&e.callbackNode!==i)return null;var l=Le;return l=oo(e,e===Ye?l:0),l===0?null:(Ty(e,l,n),Uy(e,Tn()),e.callbackNode!=null&&e.callbackNode===i?ky.bind(null,e):null)}function Hy(e,n){if(Pi())return null;Ty(e,n,!0)}function AC(e){UC(function(){(Ke&6)!==0?Du(Pp,e):e()})}function yd(){return Ha===0&&(Ha=Hp()),Ha}function $y(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mo(""+e)}function qy(e,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,e.id&&i.setAttribute("form",e.id),n.parentNode.insertBefore(i,n),e=new FormData(e),i.parentNode.removeChild(i),e}function NC(e,n,i,l,u){if(n==="submit"&&i&&i.stateNode===u){var h=$y((u[Ot]||null).action),R=l.submitter;R&&(n=(n=R[Ot]||null)?$y(n.formAction):R.getAttribute("formAction"),n!==null&&(h=n,R=null));var A=new yo("action","action",null,l,u);e.push({event:A,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ha!==0){var D=R?qy(u,R):new FormData(u);Af(i,{pending:!0,data:D,method:u.method,action:h},null,D)}}else typeof h=="function"&&(A.preventDefault(),D=R?qy(u,R):new FormData(u),Af(i,{pending:!0,data:D,method:u.method,action:h},h,D))},currentTarget:u}]})}}for(var bd=0;bd<_g.length;bd++){var xd=_g[bd],OC=xd.toLowerCase(),MC=xd[0].toUpperCase()+xd.slice(1);cn(OC,"on"+MC)}cn(Ng,"onAnimationEnd"),cn(Og,"onAnimationIteration"),cn(Mg,"onAnimationStart"),cn("dblclick","onDoubleClick"),cn("focusin","onFocus"),cn("focusout","onBlur"),cn(FT,"onTransitionRun"),cn(QT,"onTransitionStart"),cn(XT,"onTransitionCancel"),cn(jg,"onTransitionEnd"),ui("onMouseEnter",["mouseout","mouseover"]),ui("onMouseLeave",["mouseout","mouseover"]),ui("onPointerEnter",["pointerout","pointerover"]),ui("onPointerLeave",["pointerout","pointerover"]),xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ml="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ml));function By(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],u=l.event;l=l.listeners;e:{var h=void 0;if(n)for(var R=l.length-1;0<=R;R--){var A=l[R],D=A.instance,Y=A.currentTarget;if(A=A.listener,D!==h&&u.isPropagationStopped())break e;h=A,u.currentTarget=Y;try{h(u)}catch(J){$o(J)}u.currentTarget=null,h=D}else for(R=0;R<l.length;R++){if(A=l[R],D=A.instance,Y=A.currentTarget,A=A.listener,D!==h&&u.isPropagationStopped())break e;h=A,u.currentTarget=Y;try{h(u)}catch(J){$o(J)}u.currentTarget=null,h=D}}}}function De(e,n){var i=n[zu];i===void 0&&(i=n[zu]=new Set);var l=e+"__bubble";i.has(l)||(Iy(n,e,2,!1),i.add(l))}function Sd(e,n,i){var l=0;n&&(l|=4),Iy(i,e,l,n)}var tc="_reactListening"+Math.random().toString(36).slice(2);function wd(e){if(!e[tc]){e[tc]=!0,Gp.forEach(function(i){i!=="selectionchange"&&(jC.has(i)||Sd(i,!1,e),Sd(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[tc]||(n[tc]=!0,Sd("selectionchange",!1,n))}}function Iy(e,n,i,l){switch(db(n)){case 2:var u=rA;break;case 8:u=aA;break;default:u=zd}i=u.bind(null,n,i,e),u=void 0,!Iu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(n,i,{capture:!0,passive:u}):e.addEventListener(n,i,!0):u!==void 0?e.addEventListener(n,i,{passive:u}):e.addEventListener(n,i,!1)}function Ed(e,n,i,l,u){var h=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var R=l.tag;if(R===3||R===4){var A=l.stateNode.containerInfo;if(A===u||A.nodeType===8&&A.parentNode===u)break;if(R===4)for(R=l.return;R!==null;){var D=R.tag;if((D===3||D===4)&&(D=R.stateNode.containerInfo,D===u||D.nodeType===8&&D.parentNode===u))return;R=R.return}for(;A!==null;){if(R=ba(A),R===null)return;if(D=R.tag,D===5||D===6||D===26||D===27){l=h=R;continue e}A=A.parentNode}}l=l.return}ag(function(){var Y=h,J=qu(i),ie=[];e:{var W=Dg.get(e);if(W!==void 0){var Z=yo,ge=e;switch(e){case"keypress":if(go(i)===0)break e;case"keydown":case"keyup":Z=RT;break;case"focusin":ge="focus",Z=Fu;break;case"focusout":ge="blur",Z=Fu;break;case"beforeblur":case"afterblur":Z=Fu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=lg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=dT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=AT;break;case Ng:case Og:case Mg:Z=pT;break;case jg:Z=OT;break;case"scroll":case"scrollend":Z=uT;break;case"wheel":Z=jT;break;case"copy":case"cut":case"paste":Z=vT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=cg;break;case"toggle":case"beforetoggle":Z=_T}var Re=(n&4)!==0,et=!Re&&(e==="scroll"||e==="scrollend"),F=Re?W!==null?W+"Capture":null:W;Re=[];for(var I=Y,X;I!==null;){var ne=I;if(X=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||X===null||F===null||(ne=_s(I,F),ne!=null&&Re.push(pl(I,ne,X))),et)break;I=I.return}0<Re.length&&(W=new Z(W,ge,null,i,J),ie.push({event:W,listeners:Re}))}}if((n&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",W&&i!==$u&&(ge=i.relatedTarget||i.fromElement)&&(ba(ge)||ge[li]))break e;if((Z||W)&&(W=J.window===J?J:(W=J.ownerDocument)?W.defaultView||W.parentWindow:window,Z?(ge=i.relatedTarget||i.toElement,Z=Y,ge=ge?ba(ge):null,ge!==null&&(et=z(ge),Re=ge.tag,ge!==et||Re!==5&&Re!==27&&Re!==6)&&(ge=null)):(Z=null,ge=Y),Z!==ge)){if(Re=lg,ne="onMouseLeave",F="onMouseEnter",I="mouse",(e==="pointerout"||e==="pointerover")&&(Re=cg,ne="onPointerLeave",F="onPointerEnter",I="pointer"),et=Z==null?W:Ds(Z),X=ge==null?W:Ds(ge),W=new Re(ne,I+"leave",Z,i,J),W.target=et,W.relatedTarget=X,ne=null,ba(J)===Y&&(Re=new Re(F,I+"enter",ge,i,J),Re.target=X,Re.relatedTarget=et,ne=Re),et=ne,Z&&ge)t:{for(Re=Z,F=ge,I=0,X=Re;X;X=ki(X))I++;for(X=0,ne=F;ne;ne=ki(ne))X++;for(;0<I-X;)Re=ki(Re),I--;for(;0<X-I;)F=ki(F),X--;for(;I--;){if(Re===F||F!==null&&Re===F.alternate)break t;Re=ki(Re),F=ki(F)}Re=null}else Re=null;Z!==null&&Vy(ie,W,Z,Re,!1),ge!==null&&et!==null&&Vy(ie,et,ge,Re,!0)}}e:{if(W=Y?Ds(Y):window,Z=W.nodeName&&W.nodeName.toLowerCase(),Z==="select"||Z==="input"&&W.type==="file")var he=vg;else if(pg(W))if(yg)he=IT;else{he=qT;var Me=$T}else Z=W.nodeName,!Z||Z.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?Y&&Hu(Y.elementType)&&(he=vg):he=BT;if(he&&(he=he(e,Y))){gg(ie,he,i,J);break e}Me&&Me(e,W,Y),e==="focusout"&&Y&&W.type==="number"&&Y.memoizedProps.value!=null&&ku(W,"number",W.value)}switch(Me=Y?Ds(Y):window,e){case"focusin":(pg(Me)||Me.contentEditable==="true")&&(gi=Me,Ju=Y,qs=null);break;case"focusout":qs=Ju=gi=null;break;case"mousedown":ef=!0;break;case"contextmenu":case"mouseup":case"dragend":ef=!1,Cg(ie,i,J);break;case"selectionchange":if(GT)break;case"keydown":case"keyup":Cg(ie,i,J)}var ye;if(Xu)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else pi?hg(e,i)&&(xe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(xe="onCompositionStart");xe&&(ug&&i.locale!=="ko"&&(pi||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&pi&&(ye=ig()):(Or=J,Vu="value"in Or?Or.value:Or.textContent,pi=!0)),Me=nc(Y,xe),0<Me.length&&(xe=new og(xe,e,null,i,J),ie.push({event:xe,listeners:Me}),ye?xe.data=ye:(ye=mg(i),ye!==null&&(xe.data=ye)))),(ye=zT?PT(e,i):UT(e,i))&&(xe=nc(Y,"onBeforeInput"),0<xe.length&&(Me=new og("onBeforeInput","beforeinput",null,i,J),ie.push({event:Me,listeners:xe}),Me.data=ye)),NC(ie,e,Y,i,J)}By(ie,n)})}function pl(e,n,i){return{instance:e,listener:n,currentTarget:i}}function nc(e,n){for(var i=n+"Capture",l=[];e!==null;){var u=e,h=u.stateNode;u=u.tag,u!==5&&u!==26&&u!==27||h===null||(u=_s(e,i),u!=null&&l.unshift(pl(e,u,h)),u=_s(e,n),u!=null&&l.push(pl(e,u,h))),e=e.return}return l}function ki(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vy(e,n,i,l,u){for(var h=n._reactName,R=[];i!==null&&i!==l;){var A=i,D=A.alternate,Y=A.stateNode;if(A=A.tag,D!==null&&D===l)break;A!==5&&A!==26&&A!==27||Y===null||(D=Y,u?(Y=_s(i,h),Y!=null&&R.unshift(pl(i,Y,D))):u||(Y=_s(i,h),Y!=null&&R.push(pl(i,Y,D)))),i=i.return}R.length!==0&&e.push({event:n,listeners:R})}var DC=/\r\n?/g,_C=/\u0000|\uFFFD/g;function Yy(e){return(typeof e=="string"?e:""+e).replace(DC,`
|
|
49
|
+
`).replace(_C,"")}function Gy(e,n){return n=Yy(n),Yy(e)===n}function rc(){}function qe(e,n,i,l,u,h){switch(i){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||di(e,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&di(e,""+l);break;case"className":uo(e,"class",l);break;case"tabIndex":uo(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":uo(e,i,l);break;case"style":ng(e,l,h);break;case"data":if(n!=="object"){uo(e,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=mo(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(i==="formAction"?(n!=="input"&&qe(e,n,"name",u.name,u,null),qe(e,n,"formEncType",u.formEncType,u,null),qe(e,n,"formMethod",u.formMethod,u,null),qe(e,n,"formTarget",u.formTarget,u,null)):(qe(e,n,"encType",u.encType,u,null),qe(e,n,"method",u.method,u,null),qe(e,n,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=mo(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=rc);break;case"onScroll":l!=null&&De("scroll",e);break;case"onScrollEnd":l!=null&&De("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(u.children!=null)throw Error(s(60));e.innerHTML=i}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}i=mo(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""+l):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":De("beforetoggle",e),De("toggle",e),co(e,"popover",l);break;case"xlinkActuate":Xn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Xn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Xn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Xn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Xn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Xn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":co(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=oT.get(i)||i,co(e,i,l))}}function Rd(e,n,i,l,u,h){switch(i){case"style":ng(e,l,h);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(i=l.__html,i!=null){if(u.children!=null)throw Error(s(60));e.innerHTML=i}}break;case"children":typeof l=="string"?di(e,l):(typeof l=="number"||typeof l=="bigint")&&di(e,""+l);break;case"onScroll":l!=null&&De("scroll",e);break;case"onScrollEnd":l!=null&&De("scrollend",e);break;case"onClick":l!=null&&(e.onclick=rc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fp.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(u=i.endsWith("Capture"),n=i.slice(2,u?i.length-7:void 0),h=e[Ot]||null,h=h!=null?h[i]:null,typeof h=="function"&&e.removeEventListener(n,h,u),typeof l=="function")){typeof h!="function"&&h!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,l,u);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):co(e,i,l)}}}function yt(e,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",e),De("load",e);var l=!1,u=!1,h;for(h in i)if(i.hasOwnProperty(h)){var R=i[h];if(R!=null)switch(h){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:qe(e,n,h,R,i,null)}}u&&qe(e,n,"srcSet",i.srcSet,i,null),l&&qe(e,n,"src",i.src,i,null);return;case"input":De("invalid",e);var A=h=R=u=null,D=null,Y=null;for(l in i)if(i.hasOwnProperty(l)){var J=i[l];if(J!=null)switch(l){case"name":u=J;break;case"type":R=J;break;case"checked":D=J;break;case"defaultChecked":Y=J;break;case"value":h=J;break;case"defaultValue":A=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(s(137,n));break;default:qe(e,n,l,J,i,null)}}Zp(e,h,A,D,Y,R,u,!1),fo(e);return;case"select":De("invalid",e),l=R=h=null;for(u in i)if(i.hasOwnProperty(u)&&(A=i[u],A!=null))switch(u){case"value":h=A;break;case"defaultValue":R=A;break;case"multiple":l=A;default:qe(e,n,u,A,i,null)}n=h,i=R,e.multiple=!!l,n!=null?fi(e,!!l,n,!1):i!=null&&fi(e,!!l,i,!0);return;case"textarea":De("invalid",e),h=u=l=null;for(R in i)if(i.hasOwnProperty(R)&&(A=i[R],A!=null))switch(R){case"value":l=A;break;case"defaultValue":u=A;break;case"children":h=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(s(91));break;default:qe(e,n,R,A,i,null)}eg(e,l,u,h),fo(e);return;case"option":for(D in i)if(i.hasOwnProperty(D)&&(l=i[D],l!=null))switch(D){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:qe(e,n,D,l,i,null)}return;case"dialog":De("cancel",e),De("close",e);break;case"iframe":case"object":De("load",e);break;case"video":case"audio":for(l=0;l<ml.length;l++)De(ml[l],e);break;case"image":De("error",e),De("load",e);break;case"details":De("toggle",e);break;case"embed":case"source":case"link":De("error",e),De("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in i)if(i.hasOwnProperty(Y)&&(l=i[Y],l!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,n));default:qe(e,n,Y,l,i,null)}return;default:if(Hu(n)){for(J in i)i.hasOwnProperty(J)&&(l=i[J],l!==void 0&&Rd(e,n,J,l,i,void 0));return}}for(A in i)i.hasOwnProperty(A)&&(l=i[A],l!=null&&qe(e,n,A,l,i,null))}function LC(e,n,i,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,h=null,R=null,A=null,D=null,Y=null,J=null;for(Z in i){var ie=i[Z];if(i.hasOwnProperty(Z)&&ie!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":D=ie;default:l.hasOwnProperty(Z)||qe(e,n,Z,null,l,ie)}}for(var W in l){var Z=l[W];if(ie=i[W],l.hasOwnProperty(W)&&(Z!=null||ie!=null))switch(W){case"type":h=Z;break;case"name":u=Z;break;case"checked":Y=Z;break;case"defaultChecked":J=Z;break;case"value":R=Z;break;case"defaultValue":A=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(s(137,n));break;default:Z!==ie&&qe(e,n,W,Z,l,ie)}}Uu(e,R,A,D,Y,J,h,u);return;case"select":Z=R=A=W=null;for(h in i)if(D=i[h],i.hasOwnProperty(h)&&D!=null)switch(h){case"value":break;case"multiple":Z=D;default:l.hasOwnProperty(h)||qe(e,n,h,null,l,D)}for(u in l)if(h=l[u],D=i[u],l.hasOwnProperty(u)&&(h!=null||D!=null))switch(u){case"value":W=h;break;case"defaultValue":A=h;break;case"multiple":R=h;default:h!==D&&qe(e,n,u,h,l,D)}n=A,i=R,l=Z,W!=null?fi(e,!!i,W,!1):!!l!=!!i&&(n!=null?fi(e,!!i,n,!0):fi(e,!!i,i?[]:"",!1));return;case"textarea":Z=W=null;for(A in i)if(u=i[A],i.hasOwnProperty(A)&&u!=null&&!l.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:qe(e,n,A,null,l,u)}for(R in l)if(u=l[R],h=i[R],l.hasOwnProperty(R)&&(u!=null||h!=null))switch(R){case"value":W=u;break;case"defaultValue":Z=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(s(91));break;default:u!==h&&qe(e,n,R,u,l,h)}Jp(e,W,Z);return;case"option":for(var ge in i)if(W=i[ge],i.hasOwnProperty(ge)&&W!=null&&!l.hasOwnProperty(ge))switch(ge){case"selected":e.selected=!1;break;default:qe(e,n,ge,null,l,W)}for(D in l)if(W=l[D],Z=i[D],l.hasOwnProperty(D)&&W!==Z&&(W!=null||Z!=null))switch(D){case"selected":e.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:qe(e,n,D,W,l,Z)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in i)W=i[Re],i.hasOwnProperty(Re)&&W!=null&&!l.hasOwnProperty(Re)&&qe(e,n,Re,null,l,W);for(Y in l)if(W=l[Y],Z=i[Y],l.hasOwnProperty(Y)&&W!==Z&&(W!=null||Z!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(s(137,n));break;default:qe(e,n,Y,W,l,Z)}return;default:if(Hu(n)){for(var et in i)W=i[et],i.hasOwnProperty(et)&&W!==void 0&&!l.hasOwnProperty(et)&&Rd(e,n,et,void 0,l,W);for(J in l)W=l[J],Z=i[J],!l.hasOwnProperty(J)||W===Z||W===void 0&&Z===void 0||Rd(e,n,J,W,l,Z);return}}for(var F in i)W=i[F],i.hasOwnProperty(F)&&W!=null&&!l.hasOwnProperty(F)&&qe(e,n,F,null,l,W);for(ie in l)W=l[ie],Z=i[ie],!l.hasOwnProperty(ie)||W===Z||W==null&&Z==null||qe(e,n,ie,W,l,Z)}var Td=null,Cd=null;function ac(e){return e.nodeType===9?e:e.ownerDocument}function Fy(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Qy(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Ad(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Nd=null;function zC(){var e=window.event;return e&&e.type==="popstate"?e===Nd?!1:(Nd=e,!0):(Nd=null,!1)}var Xy=typeof setTimeout=="function"?setTimeout:void 0,PC=typeof clearTimeout=="function"?clearTimeout:void 0,Ky=typeof Promise=="function"?Promise:void 0,UC=typeof queueMicrotask=="function"?queueMicrotask:typeof Ky<"u"?function(e){return Ky.resolve(null).then(e).catch(kC)}:Xy;function kC(e){setTimeout(function(){throw e})}function Od(e,n){var i=n,l=0;do{var u=i.nextSibling;if(e.removeChild(i),u&&u.nodeType===8)if(i=u.data,i==="/$"){if(l===0){e.removeChild(u),El(n);return}l--}else i!=="$"&&i!=="$?"&&i!=="$!"||l++;i=u}while(i);El(n)}function Md(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Md(i),Pu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function HC(e,n,i,l){for(;e.nodeType===1;){var u=i;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[js])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==u.rel||e.getAttribute("href")!==(u.href==null?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var h=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=dn(e.nextSibling),e===null)break}return null}function $C(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=dn(e.nextSibling),e===null))return null;return e}function dn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="F!"||n==="F")break;if(n==="/$")return null}}return e}function Wy(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"){if(n===0)return e;n--}else i==="/$"&&n++}e=e.previousSibling}return null}function Zy(e,n,i){switch(n=ac(i),e){case"html":if(e=n.documentElement,!e)throw Error(s(452));return e;case"head":if(e=n.head,!e)throw Error(s(453));return e;case"body":if(e=n.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}var nn=new Map,Jy=new Set;function ic(e){return typeof e.getRootNode=="function"?e.getRootNode():e.ownerDocument}var ur=re.d;re.d={f:qC,r:BC,D:IC,C:VC,L:YC,m:GC,X:QC,S:FC,M:XC};function qC(){var e=ur.f(),n=Wo();return e||n}function BC(e){var n=oi(e);n!==null&&n.tag===5&&n.type==="form"?Cv(n):ur.r(e)}var Hi=typeof document>"u"?null:document;function eb(e,n,i){var l=Hi;if(l&&typeof n=="string"&&n){var u=Gt(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof i=="string"&&(u+='[crossorigin="'+i+'"]'),Jy.has(u)||(Jy.add(u),e={rel:e,crossOrigin:i,href:n},l.querySelector(u)===null&&(n=l.createElement("link"),yt(n,"link",e),dt(n),l.head.appendChild(n)))}}function IC(e){ur.D(e),eb("dns-prefetch",e,null)}function VC(e,n){ur.C(e,n),eb("preconnect",e,n)}function YC(e,n,i){ur.L(e,n,i);var l=Hi;if(l&&e&&n){var u='link[rel="preload"][as="'+Gt(n)+'"]';n==="image"&&i&&i.imageSrcSet?(u+='[imagesrcset="'+Gt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(u+='[imagesizes="'+Gt(i.imageSizes)+'"]')):u+='[href="'+Gt(e)+'"]';var h=u;switch(n){case"style":h=$i(e);break;case"script":h=qi(e)}nn.has(h)||(e=K({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),nn.set(h,e),l.querySelector(u)!==null||n==="style"&&l.querySelector(gl(h))||n==="script"&&l.querySelector(vl(h))||(n=l.createElement("link"),yt(n,"link",e),dt(n),l.head.appendChild(n)))}}function GC(e,n){ur.m(e,n);var i=Hi;if(i&&e){var l=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Gt(l)+'"][href="'+Gt(e)+'"]',h=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=qi(e)}if(!nn.has(h)&&(e=K({rel:"modulepreload",href:e},n),nn.set(h,e),i.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(vl(h)))return}l=i.createElement("link"),yt(l,"link",e),dt(l),i.head.appendChild(l)}}}function FC(e,n,i){ur.S(e,n,i);var l=Hi;if(l&&e){var u=ci(l).hoistableStyles,h=$i(e);n=n||"default";var R=u.get(h);if(!R){var A={loading:0,preload:null};if(R=l.querySelector(gl(h)))A.loading=5;else{e=K({rel:"stylesheet",href:e,"data-precedence":n},i),(i=nn.get(h))&&jd(e,i);var D=R=l.createElement("link");dt(D),yt(D,"link",e),D._p=new Promise(function(Y,J){D.onload=Y,D.onerror=J}),D.addEventListener("load",function(){A.loading|=1}),D.addEventListener("error",function(){A.loading|=2}),A.loading|=4,sc(R,n,l)}R={type:"stylesheet",instance:R,count:1,state:A},u.set(h,R)}}}function QC(e,n){ur.X(e,n);var i=Hi;if(i&&e){var l=ci(i).hoistableScripts,u=qi(e),h=l.get(u);h||(h=i.querySelector(vl(u)),h||(e=K({src:e,async:!0},n),(n=nn.get(u))&&Dd(e,n),h=i.createElement("script"),dt(h),yt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(u,h))}}function XC(e,n){ur.M(e,n);var i=Hi;if(i&&e){var l=ci(i).hoistableScripts,u=qi(e),h=l.get(u);h||(h=i.querySelector(vl(u)),h||(e=K({src:e,async:!0,type:"module"},n),(n=nn.get(u))&&Dd(e,n),h=i.createElement("script"),dt(h),yt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(u,h))}}function tb(e,n,i,l){var u=(u=Ie.current)?ic(u):null;if(!u)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=$i(i.href),i=ci(u).hoistableStyles,l=i.get(n),l||(l={type:"style",instance:null,count:0,state:null},i.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=$i(i.href);var h=ci(u).hoistableStyles,R=h.get(e);if(R||(u=u.ownerDocument||u,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,R),(h=u.querySelector(gl(e)))&&!h._p&&(R.instance=h,R.state.loading=5),nn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},nn.set(e,i),h||KC(u,e,i,R.state))),n&&l===null)throw Error(s(528,""));return R}if(n&&l!==null)throw Error(s(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=qi(i),i=ci(u).hoistableScripts,l=i.get(n),l||(l={type:"script",instance:null,count:0,state:null},i.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function $i(e){return'href="'+Gt(e)+'"'}function gl(e){return'link[rel="stylesheet"]['+e+"]"}function nb(e){return K({},e,{"data-precedence":e.precedence,precedence:null})}function KC(e,n,i,l){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=1:(n=e.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=1}),n.addEventListener("error",function(){return l.loading|=2}),yt(n,"link",i),dt(n),e.head.appendChild(n))}function qi(e){return'[src="'+Gt(e)+'"]'}function vl(e){return"script[async]"+e}function rb(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var l=e.querySelector('style[data-href~="'+Gt(i.href)+'"]');if(l)return n.instance=l,dt(l),l;var u=K({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),dt(l),yt(l,"style",u),sc(l,i.precedence,e),n.instance=l;case"stylesheet":u=$i(i.href);var h=e.querySelector(gl(u));if(h)return n.state.loading|=4,n.instance=h,dt(h),h;l=nb(i),(u=nn.get(u))&&jd(l,u),h=(e.ownerDocument||e).createElement("link"),dt(h);var R=h;return R._p=new Promise(function(A,D){R.onload=A,R.onerror=D}),yt(h,"link",l),n.state.loading|=4,sc(h,i.precedence,e),n.instance=h;case"script":return h=qi(i.src),(u=e.querySelector(vl(h)))?(n.instance=u,dt(u),u):(l=i,(u=nn.get(h))&&(l=K({},i),Dd(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),dt(u),yt(u,"link",l),e.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(s(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(l=n.instance,n.state.loading|=4,sc(l,i.precedence,e));return n.instance}function sc(e,n,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,h=u,R=0;R<l.length;R++){var A=l[R];if(A.dataset.precedence===n)h=A;else if(h!==u)break}h?h.parentNode.insertBefore(e,h.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(e,n.firstChild))}function jd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Dd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var lc=null;function ab(e,n,i){if(lc===null){var l=new Map,u=lc=new Map;u.set(i,l)}else u=lc,l=u.get(i),l||(l=new Map,u.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),u=0;u<i.length;u++){var h=i[u];if(!(h[js]||h[bt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var R=h.getAttribute(n)||"";R=e+R;var A=l.get(R);A?A.push(h):l.set(R,[h])}}return l}function ib(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function WC(e,n,i){if(i===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function sb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var yl=null;function ZC(){}function JC(e,n,i){if(yl===null)throw Error(s(475));var l=yl;if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=$i(i.href),h=e.querySelector(gl(u));if(h){e=h._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=oc.bind(l),e.then(l,l)),n.state.loading|=4,n.instance=h,dt(h);return}h=e.ownerDocument||e,i=nb(i),(u=nn.get(u))&&jd(i,u),h=h.createElement("link"),dt(h);var R=h;R._p=new Promise(function(A,D){R.onload=A,R.onerror=D}),yt(h,"link",i),n.instance=h}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(l.count++,n=oc.bind(l),e.addEventListener("load",n),e.addEventListener("error",n))}}function eA(){if(yl===null)throw Error(s(475));var e=yl;return e.stylesheets&&e.count===0&&_d(e,e.stylesheets),0<e.count?function(n){var i=setTimeout(function(){if(e.stylesheets&&_d(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i)}}:null}function oc(){if(this.count--,this.count===0){if(this.stylesheets)_d(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cc=null;function _d(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cc=new Map,n.forEach(tA,e),cc=null,oc.call(e))}function tA(e,n){if(!(n.state.loading&4)){var i=cc.get(e);if(i)var l=i.get(null);else{i=new Map,cc.set(e,i);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<u.length;h++){var R=u[h];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(i.set(R.dataset.precedence,R),l=R)}l&&i.set(null,l)}u=n.instance,R=u.getAttribute("data-precedence"),h=i.get(R)||l,h===l&&i.set(null,u),i.set(R,u),this.count++,l=oc.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),h?h.parentNode.insertBefore(u,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),n.state.loading|=4}}var bl={$$typeof:E,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function nA(e,n,i,l,u,h,R,A){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Lu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lu(0),this.hiddenUpdates=Lu(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=h,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function lb(e,n,i,l,u,h,R,A,D,Y,J,ie){return e=new nA(e,n,i,R,A,D,Y,ie),n=1,h===!0&&(n|=24),h=en(3,null,null,n),e.current=h,h.stateNode=e,n=ff(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:l,isDehydrated:i,cache:n},Yf(h),e}function ob(e){return e?(e=bi,e):bi}function cb(e,n,i,l,u,h){u=ob(u),l.context===null?l.context=u:l.pendingContext=u,l=Ur(n),l.payload={element:i},h=h===void 0?null:h,h!==null&&(l.callback=h),i=kr(e,l,n),i!==null&&(Tt(i,e,n),nl(i,e,n))}function ub(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function Ld(e,n){ub(e,n),(e=e.alternate)&&ub(e,n)}function fb(e){if(e.tag===13){var n=Mr(e,67108864);n!==null&&Tt(n,e,67108864),Ld(e,67108864)}}var uc=!0;function rA(e,n,i,l){var u=U.T;U.T=null;var h=re.p;try{re.p=2,zd(e,n,i,l)}finally{re.p=h,U.T=u}}function aA(e,n,i,l){var u=U.T;U.T=null;var h=re.p;try{re.p=8,zd(e,n,i,l)}finally{re.p=h,U.T=u}}function zd(e,n,i,l){if(uc){var u=Pd(l);if(u===null)Ed(e,n,l,fc,i),hb(e,l);else if(sA(u,e,n,i,l))l.stopPropagation();else if(hb(e,l),n&4&&-1<iA.indexOf(e)){for(;u!==null;){var h=oi(u);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var R=ya(h.pendingLanes);if(R!==0){var A=h;for(A.pendingLanes|=2,A.entangledLanes|=2;R;){var D=1<<31-Pt(R);A.entanglements[1]|=D,R&=~D}Mn(h),(Ke&6)===0&&(Qo=Tn()+500,hl(0))}}break;case 13:A=Mr(h,2),A!==null&&Tt(A,h,2),Wo(),Ld(h,2)}if(h=Pd(l),h===null&&Ed(e,n,l,fc,i),h===u)break;u=h}u!==null&&l.stopPropagation()}else Ed(e,n,l,null,i)}}function Pd(e){return e=qu(e),Ud(e)}var fc=null;function Ud(e){if(fc=null,e=ba(e),e!==null){var n=z(e);if(n===null)e=null;else{var i=n.tag;if(i===13){if(e=Q(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return fc=e,null}function db(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(VR()){case Pp:return 2;case Up:return 8;case io:case YR:return 32;case kp:return 268435456;default:return 32}default:return 32}}var kd=!1,Yr=null,Gr=null,Fr=null,xl=new Map,Sl=new Map,Qr=[],iA="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function hb(e,n){switch(e){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Gr=null;break;case"mouseover":case"mouseout":Fr=null;break;case"pointerover":case"pointerout":xl.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sl.delete(n.pointerId)}}function wl(e,n,i,l,u,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:i,eventSystemFlags:l,nativeEvent:h,targetContainers:[u]},n!==null&&(n=oi(n),n!==null&&fb(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function sA(e,n,i,l,u){switch(n){case"focusin":return Yr=wl(Yr,e,n,i,l,u),!0;case"dragenter":return Gr=wl(Gr,e,n,i,l,u),!0;case"mouseover":return Fr=wl(Fr,e,n,i,l,u),!0;case"pointerover":var h=u.pointerId;return xl.set(h,wl(xl.get(h)||null,e,n,i,l,u)),!0;case"gotpointercapture":return h=u.pointerId,Sl.set(h,wl(Sl.get(h)||null,e,n,i,l,u)),!0}return!1}function mb(e){var n=ba(e.target);if(n!==null){var i=z(n);if(i!==null){if(n=i.tag,n===13){if(n=Q(i),n!==null){e.blockedOn=n,eT(e.priority,function(){if(i.tag===13){var l=qt(),u=Mr(i,l);u!==null&&Tt(u,i,l),Ld(i,l)}});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function dc(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=Pd(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);$u=l,i.target.dispatchEvent(l),$u=null}else return n=oi(i),n!==null&&fb(n),e.blockedOn=i,!1;n.shift()}return!0}function pb(e,n,i){dc(e)&&i.delete(n)}function lA(){kd=!1,Yr!==null&&dc(Yr)&&(Yr=null),Gr!==null&&dc(Gr)&&(Gr=null),Fr!==null&&dc(Fr)&&(Fr=null),xl.forEach(pb),Sl.forEach(pb)}function hc(e,n){e.blockedOn===n&&(e.blockedOn=null,kd||(kd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,lA)))}var mc=null;function gb(e){mc!==e&&(mc=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){mc===e&&(mc=null);for(var n=0;n<e.length;n+=3){var i=e[n],l=e[n+1],u=e[n+2];if(typeof l!="function"){if(Ud(l||i)===null)continue;break}var h=oi(i);h!==null&&(e.splice(n,3),n-=3,Af(h,{pending:!0,data:u,method:i.method,action:l},l,u))}}))}function El(e){function n(D){return hc(D,e)}Yr!==null&&hc(Yr,e),Gr!==null&&hc(Gr,e),Fr!==null&&hc(Fr,e),xl.forEach(n),Sl.forEach(n);for(var i=0;i<Qr.length;i++){var l=Qr[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Qr.length&&(i=Qr[0],i.blockedOn===null);)mb(i),i.blockedOn===null&&Qr.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var u=i[l],h=i[l+1],R=u[Ot]||null;if(typeof h=="function")R||gb(i);else if(R){var A=null;if(h&&h.hasAttribute("formAction")){if(u=h,R=h[Ot]||null)A=R.formAction;else if(Ud(u)!==null)continue}else A=R.action;typeof A=="function"?i[l+1]=A:(i.splice(l,3),l-=3),gb(i)}}}function Hd(e){this._internalRoot=e}pc.prototype.render=Hd.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(s(409));var i=n.current,l=qt();cb(i,l,e,n,null,null)},pc.prototype.unmount=Hd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;e.tag===0&&Pi(),cb(e.current,2,null,e,null,null),Wo(),n[li]=null}};function pc(e){this._internalRoot=e}pc.prototype.unstable_scheduleHydration=function(e){if(e){var n=Vp();e={blockedOn:null,target:e,priority:n};for(var i=0;i<Qr.length&&n!==0&&n<Qr[i].priority;i++);Qr.splice(i,0,e),i===0&&mb(e)}};var vb=r.version;if(vb!=="19.0.0")throw Error(s(527,vb,"19.0.0"));re.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=G(n),e=e!==null?ee(e):null,e=e===null?null:e.stateNode,e};var oA={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:U,findFiberByHostInstance:ba,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gc.isDisabled&&gc.supportsFiber)try{Ns=gc.inject(oA),zt=gc}catch{}}return Tl.createRoot=function(e,n){if(!o(e))throw Error(s(299));var i=!1,l="",u=Lv,h=zv,R=Pv,A=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(R=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(A=n.unstable_transitionCallbacks)),n=lb(e,1,!1,null,null,i,l,u,h,R,A,null),e[li]=n.current,wd(e.nodeType===8?e.parentNode:e),new Hd(n)},Tl.hydrateRoot=function(e,n,i){if(!o(e))throw Error(s(299));var l=!1,u="",h=Lv,R=zv,A=Pv,D=null,Y=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(R=i.onCaughtError),i.onRecoverableError!==void 0&&(A=i.onRecoverableError),i.unstable_transitionCallbacks!==void 0&&(D=i.unstable_transitionCallbacks),i.formState!==void 0&&(Y=i.formState)),n=lb(e,1,!0,n,i??null,l,u,h,R,A,D,Y),n.context=ob(null),i=n.current,l=qt(),u=Ur(l),u.callback=null,kr(i,u,l),n.current.lanes=l,Ms(n,l),Mn(n),e[li]=n.current,wd(e),new pc(n)},Tl.version="19.0.0",Tl}var Nb;function bA(){if(Nb)return Id.exports;Nb=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),Id.exports=yA(),Id.exports}var xA=bA(),vs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ei=typeof window>"u"||"Deno"in globalThis;function an(){}function SA(t,r){return typeof t=="function"?t(r):t}function rm(t){return typeof t=="number"&&t>=0&&t!==1/0}function qx(t,r){return Math.max(t+(r||0)-Date.now(),0)}function Xi(t,r){return typeof t=="function"?t(r):t}function gn(t,r){return typeof t=="function"?t(r):t}function Ob(t,r){const{type:a="all",exact:s,fetchStatus:o,predicate:c,queryKey:f,stale:d}=t;if(f){if(s){if(r.queryHash!==Bm(f,r.options))return!1}else if(!Ul(r.queryKey,f))return!1}if(a!=="all"){const m=r.isActive();if(a==="active"&&!m||a==="inactive"&&m)return!1}return!(typeof d=="boolean"&&r.isStale()!==d||o&&o!==r.state.fetchStatus||c&&!c(r))}function Mb(t,r){const{exact:a,status:s,predicate:o,mutationKey:c}=t;if(c){if(!r.options.mutationKey)return!1;if(a){if(ti(r.options.mutationKey)!==ti(c))return!1}else if(!Ul(r.options.mutationKey,c))return!1}return!(s&&r.state.status!==s||o&&!o(r))}function Bm(t,r){return((r==null?void 0:r.queryKeyHashFn)||ti)(t)}function ti(t){return JSON.stringify(t,(r,a)=>am(a)?Object.keys(a).sort().reduce((s,o)=>(s[o]=a[o],s),{}):a)}function Ul(t,r){return t===r?!0:typeof t!=typeof r?!1:t&&r&&typeof t=="object"&&typeof r=="object"?!Object.keys(r).some(a=>!Ul(t[a],r[a])):!1}function Bx(t,r){if(t===r)return t;const a=jb(t)&&jb(r);if(a||am(t)&&am(r)){const s=a?t:Object.keys(t),o=s.length,c=a?r:Object.keys(r),f=c.length,d=a?[]:{};let m=0;for(let p=0;p<f;p++){const v=a?p:c[p];(!a&&s.includes(v)||a)&&t[v]===void 0&&r[v]===void 0?(d[v]=void 0,m++):(d[v]=Bx(t[v],r[v]),d[v]===t[v]&&t[v]!==void 0&&m++)}return o===f&&m===o?t:d}return r}function Bc(t,r){if(!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(const a in t)if(t[a]!==r[a])return!1;return!0}function jb(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function am(t){if(!Db(t))return!1;const r=t.constructor;if(r===void 0)return!0;const a=r.prototype;return!(!Db(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Db(t){return Object.prototype.toString.call(t)==="[object Object]"}function wA(t){return new Promise(r=>{setTimeout(r,t)})}function im(t,r,a){return typeof a.structuralSharing=="function"?a.structuralSharing(t,r):a.structuralSharing!==!1?Bx(t,r):r}function EA(t,r,a=0){const s=[...t,r];return a&&s.length>a?s.slice(1):s}function RA(t,r,a=0){const s=[r,...t];return a&&s.length>a?s.slice(0,-1):s}var Im=Symbol();function Ix(t,r){return!t.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!t.queryFn||t.queryFn===Im?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Ga,ta,es,Mx,TA=(Mx=class extends vs{constructor(){super();be(this,Ga);be(this,ta);be(this,es);ce(this,es,r=>{if(!ei&&window.addEventListener){const a=()=>r();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){P(this,ta)||this.setEventListener(P(this,es))}onUnsubscribe(){var r;this.hasListeners()||((r=P(this,ta))==null||r.call(this),ce(this,ta,void 0))}setEventListener(r){var a;ce(this,es,r),(a=P(this,ta))==null||a.call(this),ce(this,ta,r(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(r){P(this,Ga)!==r&&(ce(this,Ga,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(a=>{a(r)})}isFocused(){var r;return typeof P(this,Ga)=="boolean"?P(this,Ga):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},Ga=new WeakMap,ta=new WeakMap,es=new WeakMap,Mx),Vm=new TA,ts,na,ns,jx,CA=(jx=class extends vs{constructor(){super();be(this,ts,!0);be(this,na);be(this,ns);ce(this,ns,r=>{if(!ei&&window.addEventListener){const a=()=>r(!0),s=()=>r(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",s)}}})}onSubscribe(){P(this,na)||this.setEventListener(P(this,ns))}onUnsubscribe(){var r;this.hasListeners()||((r=P(this,na))==null||r.call(this),ce(this,na,void 0))}setEventListener(r){var a;ce(this,ns,r),(a=P(this,na))==null||a.call(this),ce(this,na,r(this.setOnline.bind(this)))}setOnline(r){P(this,ts)!==r&&(ce(this,ts,r),this.listeners.forEach(s=>{s(r)}))}isOnline(){return P(this,ts)}},ts=new WeakMap,na=new WeakMap,ns=new WeakMap,jx),Ic=new CA;function sm(){let t,r;const a=new Promise((o,c)=>{t=o,r=c});a.status="pending",a.catch(()=>{});function s(o){Object.assign(a,o),delete a.resolve,delete a.reject}return a.resolve=o=>{s({status:"fulfilled",value:o}),t(o)},a.reject=o=>{s({status:"rejected",reason:o}),r(o)},a}function AA(t){return Math.min(1e3*2**t,3e4)}function Vx(t){return(t??"online")==="online"?Ic.isOnline():!0}var Yx=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Fd(t){return t instanceof Yx}function Gx(t){let r=!1,a=0,s=!1,o;const c=sm(),f=S=>{var w;s||(x(new Yx(S)),(w=t.abort)==null||w.call(t))},d=()=>{r=!0},m=()=>{r=!1},p=()=>Vm.isFocused()&&(t.networkMode==="always"||Ic.isOnline())&&t.canRun(),v=()=>Vx(t.networkMode)&&t.canRun(),b=S=>{var w;s||(s=!0,(w=t.onSuccess)==null||w.call(t,S),o==null||o(),c.resolve(S))},x=S=>{var w;s||(s=!0,(w=t.onError)==null||w.call(t,S),o==null||o(),c.reject(S))},E=()=>new Promise(S=>{var w;o=C=>{(s||p())&&S(C)},(w=t.onPause)==null||w.call(t)}).then(()=>{var S;o=void 0,s||(S=t.onContinue)==null||S.call(t)}),T=()=>{if(s)return;let S;const w=a===0?t.initialPromise:void 0;try{S=w??t.fn()}catch(C){S=Promise.reject(C)}Promise.resolve(S).then(b).catch(C=>{var $;if(s)return;const N=t.retry??(ei?0:3),O=t.retryDelay??AA,_=typeof O=="function"?O(a,C):O,L=N===!0||typeof N=="number"&&a<N||typeof N=="function"&&N(a,C);if(r||!L){x(C);return}a++,($=t.onFail)==null||$.call(t,a,C),wA(_).then(()=>p()?void 0:E()).then(()=>{r?x(C):T()})})};return{promise:c,cancel:f,continue:()=>(o==null||o(),c),cancelRetry:d,continueRetry:m,canStart:v,start:()=>(v()?T():E().then(T),c)}}function NA(){let t=[],r=0,a=d=>{d()},s=d=>{d()},o=d=>setTimeout(d,0);const c=d=>{r?t.push(d):o(()=>{a(d)})},f=()=>{const d=t;t=[],d.length&&o(()=>{s(()=>{d.forEach(m=>{a(m)})})})};return{batch:d=>{let m;r++;try{m=d()}finally{r--,r||f()}return m},batchCalls:d=>(...m)=>{c(()=>{d(...m)})},schedule:c,setNotifyFunction:d=>{a=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{o=d}}}var ut=NA(),Fa,Dx,Fx=(Dx=class{constructor(){be(this,Fa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rm(this.gcTime)&&ce(this,Fa,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ei?1/0:5*60*1e3))}clearGcTimeout(){P(this,Fa)&&(clearTimeout(P(this,Fa)),ce(this,Fa,void 0))}},Fa=new WeakMap,Dx),rs,as,rn,Qa,wt,Bl,Xa,mn,dr,_x,OA=(_x=class extends Fx{constructor(r){super();be(this,mn);be(this,rs);be(this,as);be(this,rn);be(this,Qa);be(this,wt);be(this,Bl);be(this,Xa);ce(this,Xa,!1),ce(this,Bl,r.defaultOptions),this.setOptions(r.options),this.observers=[],ce(this,Qa,r.client),ce(this,rn,P(this,Qa).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,ce(this,rs,MA(this.options)),this.state=r.state??P(this,rs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var r;return(r=P(this,wt))==null?void 0:r.promise}setOptions(r){this.options={...P(this,Bl),...r},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,rn).remove(this)}setData(r,a){const s=im(this.state.data,r,this.options);return Ne(this,mn,dr).call(this,{data:s,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),s}setState(r,a){Ne(this,mn,dr).call(this,{type:"setState",state:r,setStateOptions:a})}cancel(r){var s,o;const a=(s=P(this,wt))==null?void 0:s.promise;return(o=P(this,wt))==null||o.cancel(r),a?a.then(an).catch(an):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,rs))}isActive(){return this.observers.some(r=>gn(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Im||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(r=0){return this.state.isInvalidated||this.state.data===void 0||!qx(this.state.dataUpdatedAt,r)}onFocus(){var a;const r=this.observers.find(s=>s.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(a=P(this,wt))==null||a.continue()}onOnline(){var a;const r=this.observers.find(s=>s.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(a=P(this,wt))==null||a.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),P(this,rn).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(a=>a!==r),this.observers.length||(P(this,wt)&&(P(this,Xa)?P(this,wt).cancel({revert:!0}):P(this,wt).cancelRetry()),this.scheduleGc()),P(this,rn).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ne(this,mn,dr).call(this,{type:"invalidate"})}fetch(r,a){var m,p,v;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(P(this,wt))return P(this,wt).continueRetry(),P(this,wt).promise}if(r&&this.setOptions(r),!this.options.queryFn){const b=this.observers.find(x=>x.options.queryFn);b&&this.setOptions(b.options)}const s=new AbortController,o=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(ce(this,Xa,!0),s.signal)})},c=()=>{const b=Ix(this.options,a),x={client:P(this,Qa),queryKey:this.queryKey,meta:this.meta};return o(x),ce(this,Xa,!1),this.options.persister?this.options.persister(b,x,this):b(x)},f={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:P(this,Qa),state:this.state,fetchFn:c};o(f),(m=this.options.behavior)==null||m.onFetch(f,this),ce(this,as,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=f.fetchOptions)==null?void 0:p.meta))&&Ne(this,mn,dr).call(this,{type:"fetch",meta:(v=f.fetchOptions)==null?void 0:v.meta});const d=b=>{var x,E,T,S;Fd(b)&&b.silent||Ne(this,mn,dr).call(this,{type:"error",error:b}),Fd(b)||((E=(x=P(this,rn).config).onError)==null||E.call(x,b,this),(S=(T=P(this,rn).config).onSettled)==null||S.call(T,this.state.data,b,this)),this.scheduleGc()};return ce(this,wt,Gx({initialPromise:a==null?void 0:a.initialPromise,fn:f.fetchFn,abort:s.abort.bind(s),onSuccess:b=>{var x,E,T,S;if(b===void 0){d(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(b)}catch(w){d(w);return}(E=(x=P(this,rn).config).onSuccess)==null||E.call(x,b,this),(S=(T=P(this,rn).config).onSettled)==null||S.call(T,b,this.state.error,this),this.scheduleGc()},onError:d,onFail:(b,x)=>{Ne(this,mn,dr).call(this,{type:"failed",failureCount:b,error:x})},onPause:()=>{Ne(this,mn,dr).call(this,{type:"pause"})},onContinue:()=>{Ne(this,mn,dr).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0})),P(this,wt).start()}},rs=new WeakMap,as=new WeakMap,rn=new WeakMap,Qa=new WeakMap,wt=new WeakMap,Bl=new WeakMap,Xa=new WeakMap,mn=new WeakSet,dr=function(r){const a=s=>{switch(r.type){case"failed":return{...s,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Qx(s.data,this.options),fetchMeta:r.meta??null};case"success":return{...s,data:r.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:r.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=r.error;return Fd(o)&&o.revert&&P(this,as)?{...P(this,as),fetchStatus:"idle"}:{...s,error:o,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...r.state}}};this.state=a(this.state),ut.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),P(this,rn).notify({query:this,type:"updated",action:r})})},_x);function Qx(t,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Vx(r.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function MA(t){const r=typeof t.initialData=="function"?t.initialData():t.initialData,a=r!==void 0,s=a?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var jn,Lx,jA=(Lx=class extends vs{constructor(r={}){super();be(this,jn);this.config=r,ce(this,jn,new Map)}build(r,a,s){const o=a.queryKey,c=a.queryHash??Bm(o,a);let f=this.get(c);return f||(f=new OA({client:r,queryKey:o,queryHash:c,options:r.defaultQueryOptions(a),state:s,defaultOptions:r.getQueryDefaults(o)}),this.add(f)),f}add(r){P(this,jn).has(r.queryHash)||(P(this,jn).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const a=P(this,jn).get(r.queryHash);a&&(r.destroy(),a===r&&P(this,jn).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){ut.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return P(this,jn).get(r)}getAll(){return[...P(this,jn).values()]}find(r){const a={exact:!0,...r};return this.getAll().find(s=>Ob(a,s))}findAll(r={}){const a=this.getAll();return Object.keys(r).length>0?a.filter(s=>Ob(r,s)):a}notify(r){ut.batch(()=>{this.listeners.forEach(a=>{a(r)})})}onFocus(){ut.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){ut.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},jn=new WeakMap,Lx),Dn,Ct,Ka,_n,Jr,zx,DA=(zx=class extends Fx{constructor(r){super();be(this,_n);be(this,Dn);be(this,Ct);be(this,Ka);this.mutationId=r.mutationId,ce(this,Ct,r.mutationCache),ce(this,Dn,[]),this.state=r.state||Xx(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){P(this,Dn).includes(r)||(P(this,Dn).push(r),this.clearGcTimeout(),P(this,Ct).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){ce(this,Dn,P(this,Dn).filter(a=>a!==r)),this.scheduleGc(),P(this,Ct).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){P(this,Dn).length||(this.state.status==="pending"?this.scheduleGc():P(this,Ct).remove(this))}continue(){var r;return((r=P(this,Ka))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var o,c,f,d,m,p,v,b,x,E,T,S,w,C,N,O,_,L,$,V;ce(this,Ka,Gx({fn:()=>this.options.mutationFn?this.options.mutationFn(r):Promise.reject(new Error("No mutationFn found")),onFail:(k,U)=>{Ne(this,_n,Jr).call(this,{type:"failed",failureCount:k,error:U})},onPause:()=>{Ne(this,_n,Jr).call(this,{type:"pause"})},onContinue:()=>{Ne(this,_n,Jr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Ct).canRun(this)}));const a=this.state.status==="pending",s=!P(this,Ka).canStart();try{if(!a){Ne(this,_n,Jr).call(this,{type:"pending",variables:r,isPaused:s}),await((c=(o=P(this,Ct).config).onMutate)==null?void 0:c.call(o,r,this));const U=await((d=(f=this.options).onMutate)==null?void 0:d.call(f,r));U!==this.state.context&&Ne(this,_n,Jr).call(this,{type:"pending",context:U,variables:r,isPaused:s})}const k=await P(this,Ka).start();return await((p=(m=P(this,Ct).config).onSuccess)==null?void 0:p.call(m,k,r,this.state.context,this)),await((b=(v=this.options).onSuccess)==null?void 0:b.call(v,k,r,this.state.context)),await((E=(x=P(this,Ct).config).onSettled)==null?void 0:E.call(x,k,null,this.state.variables,this.state.context,this)),await((S=(T=this.options).onSettled)==null?void 0:S.call(T,k,null,r,this.state.context)),Ne(this,_n,Jr).call(this,{type:"success",data:k}),k}catch(k){try{throw await((C=(w=P(this,Ct).config).onError)==null?void 0:C.call(w,k,r,this.state.context,this)),await((O=(N=this.options).onError)==null?void 0:O.call(N,k,r,this.state.context)),await((L=(_=P(this,Ct).config).onSettled)==null?void 0:L.call(_,void 0,k,this.state.variables,this.state.context,this)),await((V=($=this.options).onSettled)==null?void 0:V.call($,void 0,k,r,this.state.context)),k}finally{Ne(this,_n,Jr).call(this,{type:"error",error:k})}}finally{P(this,Ct).runNext(this)}}},Dn=new WeakMap,Ct=new WeakMap,Ka=new WeakMap,_n=new WeakSet,Jr=function(r){const a=s=>{switch(r.type){case"failed":return{...s,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...s,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:r.error,failureCount:s.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=a(this.state),ut.batch(()=>{P(this,Dn).forEach(s=>{s.onMutationUpdate(r)}),P(this,Ct).notify({mutation:this,type:"updated",action:r})})},zx);function Xx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var pr,pn,Il,Px,_A=(Px=class extends vs{constructor(r={}){super();be(this,pr);be(this,pn);be(this,Il);this.config=r,ce(this,pr,new Set),ce(this,pn,new Map),ce(this,Il,0)}build(r,a,s){const o=new DA({mutationCache:this,mutationId:++vc(this,Il)._,options:r.defaultMutationOptions(a),state:s});return this.add(o),o}add(r){P(this,pr).add(r);const a=yc(r);if(typeof a=="string"){const s=P(this,pn).get(a);s?s.push(r):P(this,pn).set(a,[r])}this.notify({type:"added",mutation:r})}remove(r){if(P(this,pr).delete(r)){const a=yc(r);if(typeof a=="string"){const s=P(this,pn).get(a);if(s)if(s.length>1){const o=s.indexOf(r);o!==-1&&s.splice(o,1)}else s[0]===r&&P(this,pn).delete(a)}}this.notify({type:"removed",mutation:r})}canRun(r){const a=yc(r);if(typeof a=="string"){const s=P(this,pn).get(a),o=s==null?void 0:s.find(c=>c.state.status==="pending");return!o||o===r}else return!0}runNext(r){var s;const a=yc(r);if(typeof a=="string"){const o=(s=P(this,pn).get(a))==null?void 0:s.find(c=>c!==r&&c.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ut.batch(()=>{P(this,pr).forEach(r=>{this.notify({type:"removed",mutation:r})}),P(this,pr).clear(),P(this,pn).clear()})}getAll(){return Array.from(P(this,pr))}find(r){const a={exact:!0,...r};return this.getAll().find(s=>Mb(a,s))}findAll(r={}){return this.getAll().filter(a=>Mb(r,a))}notify(r){ut.batch(()=>{this.listeners.forEach(a=>{a(r)})})}resumePausedMutations(){const r=this.getAll().filter(a=>a.state.isPaused);return ut.batch(()=>Promise.all(r.map(a=>a.continue().catch(an))))}},pr=new WeakMap,pn=new WeakMap,Il=new WeakMap,Px);function yc(t){var r;return(r=t.options.scope)==null?void 0:r.id}function _b(t){return{onFetch:(r,a)=>{var v,b,x,E,T;const s=r.options,o=(x=(b=(v=r.fetchOptions)==null?void 0:v.meta)==null?void 0:b.fetchMore)==null?void 0:x.direction,c=((E=r.state.data)==null?void 0:E.pages)||[],f=((T=r.state.data)==null?void 0:T.pageParams)||[];let d={pages:[],pageParams:[]},m=0;const p=async()=>{let S=!1;const w=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(r.signal.aborted?S=!0:r.signal.addEventListener("abort",()=>{S=!0}),r.signal)})},C=Ix(r.options,r.fetchOptions),N=async(O,_,L)=>{if(S)return Promise.reject();if(_==null&&O.pages.length)return Promise.resolve(O);const $={client:r.client,queryKey:r.queryKey,pageParam:_,direction:L?"backward":"forward",meta:r.options.meta};w($);const V=await C($),{maxPages:k}=r.options,U=L?RA:EA;return{pages:U(O.pages,V,k),pageParams:U(O.pageParams,_,k)}};if(o&&c.length){const O=o==="backward",_=O?LA:Lb,L={pages:c,pageParams:f},$=_(s,L);d=await N(L,$,O)}else{const O=t??c.length;do{const _=m===0?f[0]??s.initialPageParam:Lb(s,d);if(m>0&&_==null)break;d=await N(d,_),m++}while(m<O)}return d};r.options.persister?r.fetchFn=()=>{var S,w;return(w=(S=r.options).persister)==null?void 0:w.call(S,p,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},a)}:r.fetchFn=p}}}function Lb(t,{pages:r,pageParams:a}){const s=r.length-1;return r.length>0?t.getNextPageParam(r[s],r,a[s],a):void 0}function LA(t,{pages:r,pageParams:a}){var s;return r.length>0?(s=t.getPreviousPageParam)==null?void 0:s.call(t,r[0],r,a[0],a):void 0}var tt,ra,aa,is,ss,ia,ls,os,Ux,zA=(Ux=class{constructor(t={}){be(this,tt);be(this,ra);be(this,aa);be(this,is);be(this,ss);be(this,ia);be(this,ls);be(this,os);ce(this,tt,t.queryCache||new jA),ce(this,ra,t.mutationCache||new _A),ce(this,aa,t.defaultOptions||{}),ce(this,is,new Map),ce(this,ss,new Map),ce(this,ia,0)}mount(){vc(this,ia)._++,P(this,ia)===1&&(ce(this,ls,Vm.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,tt).onFocus())})),ce(this,os,Ic.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,tt).onOnline())})))}unmount(){var t,r;vc(this,ia)._--,P(this,ia)===0&&((t=P(this,ls))==null||t.call(this),ce(this,ls,void 0),(r=P(this,os))==null||r.call(this),ce(this,os,void 0))}isFetching(t){return P(this,tt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return P(this,ra).findAll({...t,status:"pending"}).length}getQueryData(t){var a;const r=this.defaultQueryOptions({queryKey:t});return(a=P(this,tt).get(r.queryHash))==null?void 0:a.state.data}ensureQueryData(t){const r=this.defaultQueryOptions(t),a=P(this,tt).build(this,r),s=a.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&a.isStaleByTime(Xi(r.staleTime,a))&&this.prefetchQuery(r),Promise.resolve(s))}getQueriesData(t){return P(this,tt).findAll(t).map(({queryKey:r,state:a})=>{const s=a.data;return[r,s]})}setQueryData(t,r,a){const s=this.defaultQueryOptions({queryKey:t}),o=P(this,tt).get(s.queryHash),c=o==null?void 0:o.state.data,f=SA(r,c);if(f!==void 0)return P(this,tt).build(this,s).setData(f,{...a,manual:!0})}setQueriesData(t,r,a){return ut.batch(()=>P(this,tt).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,r,a)]))}getQueryState(t){var a;const r=this.defaultQueryOptions({queryKey:t});return(a=P(this,tt).get(r.queryHash))==null?void 0:a.state}removeQueries(t){const r=P(this,tt);ut.batch(()=>{r.findAll(t).forEach(a=>{r.remove(a)})})}resetQueries(t,r){const a=P(this,tt);return ut.batch(()=>(a.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},r)))}cancelQueries(t,r={}){const a={revert:!0,...r},s=ut.batch(()=>P(this,tt).findAll(t).map(o=>o.cancel(a)));return Promise.all(s).then(an).catch(an)}invalidateQueries(t,r={}){return ut.batch(()=>(P(this,tt).findAll(t).forEach(a=>{a.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},r)))}refetchQueries(t,r={}){const a={...r,cancelRefetch:r.cancelRefetch??!0},s=ut.batch(()=>P(this,tt).findAll(t).filter(o=>!o.isDisabled()).map(o=>{let c=o.fetch(void 0,a);return a.throwOnError||(c=c.catch(an)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(s).then(an)}fetchQuery(t){const r=this.defaultQueryOptions(t);r.retry===void 0&&(r.retry=!1);const a=P(this,tt).build(this,r);return a.isStaleByTime(Xi(r.staleTime,a))?a.fetch(r):Promise.resolve(a.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(an).catch(an)}fetchInfiniteQuery(t){return t.behavior=_b(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(an).catch(an)}ensureInfiniteQueryData(t){return t.behavior=_b(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Ic.isOnline()?P(this,ra).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,tt)}getMutationCache(){return P(this,ra)}getDefaultOptions(){return P(this,aa)}setDefaultOptions(t){ce(this,aa,t)}setQueryDefaults(t,r){P(this,is).set(ti(t),{queryKey:t,defaultOptions:r})}getQueryDefaults(t){const r=[...P(this,is).values()],a={};return r.forEach(s=>{Ul(t,s.queryKey)&&Object.assign(a,s.defaultOptions)}),a}setMutationDefaults(t,r){P(this,ss).set(ti(t),{mutationKey:t,defaultOptions:r})}getMutationDefaults(t){const r=[...P(this,ss).values()],a={};return r.forEach(s=>{Ul(t,s.mutationKey)&&Object.assign(a,s.defaultOptions)}),a}defaultQueryOptions(t){if(t._defaulted)return t;const r={...P(this,aa).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return r.queryHash||(r.queryHash=Bm(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===Im&&(r.enabled=!1),r}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...P(this,aa).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){P(this,tt).clear(),P(this,ra).clear()}},tt=new WeakMap,ra=new WeakMap,aa=new WeakMap,is=new WeakMap,ss=new WeakMap,ia=new WeakMap,ls=new WeakMap,os=new WeakMap,Ux),Dt,_e,Vl,At,Wa,cs,sa,Ln,Yl,us,fs,Za,Ja,la,ds,ke,Ll,lm,om,cm,um,fm,dm,hm,Kx,kx,PA=(kx=class extends vs{constructor(r,a){super();be(this,ke);be(this,Dt);be(this,_e);be(this,Vl);be(this,At);be(this,Wa);be(this,cs);be(this,sa);be(this,Ln);be(this,Yl);be(this,us);be(this,fs);be(this,Za);be(this,Ja);be(this,la);be(this,ds,new Set);this.options=a,ce(this,Dt,r),ce(this,Ln,null),ce(this,sa,sm()),this.options.experimental_prefetchInRender||P(this,sa).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,_e).addObserver(this),zb(P(this,_e),this.options)?Ne(this,ke,Ll).call(this):this.updateResult(),Ne(this,ke,um).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return mm(P(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mm(P(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ne(this,ke,fm).call(this),Ne(this,ke,dm).call(this),P(this,_e).removeObserver(this)}setOptions(r,a){const s=this.options,o=P(this,_e);if(this.options=P(this,Dt).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof gn(this.options.enabled,P(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ne(this,ke,hm).call(this),P(this,_e).setOptions(this.options),s._defaulted&&!Bc(this.options,s)&&P(this,Dt).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,_e),observer:this});const c=this.hasListeners();c&&Pb(P(this,_e),o,this.options,s)&&Ne(this,ke,Ll).call(this),this.updateResult(a),c&&(P(this,_e)!==o||gn(this.options.enabled,P(this,_e))!==gn(s.enabled,P(this,_e))||Xi(this.options.staleTime,P(this,_e))!==Xi(s.staleTime,P(this,_e)))&&Ne(this,ke,lm).call(this);const f=Ne(this,ke,om).call(this);c&&(P(this,_e)!==o||gn(this.options.enabled,P(this,_e))!==gn(s.enabled,P(this,_e))||f!==P(this,la))&&Ne(this,ke,cm).call(this,f)}getOptimisticResult(r){const a=P(this,Dt).getQueryCache().build(P(this,Dt),r),s=this.createResult(a,r);return kA(this,s)&&(ce(this,At,s),ce(this,cs,this.options),ce(this,Wa,P(this,_e).state)),s}getCurrentResult(){return P(this,At)}trackResult(r,a){const s={};return Object.keys(r).forEach(o=>{Object.defineProperty(s,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),a==null||a(o),r[o])})}),s}trackProp(r){P(this,ds).add(r)}getCurrentQuery(){return P(this,_e)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const a=P(this,Dt).defaultQueryOptions(r),s=P(this,Dt).getQueryCache().build(P(this,Dt),a);return s.fetch().then(()=>this.createResult(s,a))}fetch(r){return Ne(this,ke,Ll).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,At)))}createResult(r,a){var k;const s=P(this,_e),o=this.options,c=P(this,At),f=P(this,Wa),d=P(this,cs),p=r!==s?r.state:P(this,Vl),{state:v}=r;let b={...v},x=!1,E;if(a._optimisticResults){const U=this.hasListeners(),K=!U&&zb(r,a),te=U&&Pb(r,s,a,o);(K||te)&&(b={...b,...Qx(v.data,r.options)}),a._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:T,errorUpdatedAt:S,status:w}=b;if(a.select&&b.data!==void 0)if(c&&b.data===(f==null?void 0:f.data)&&a.select===P(this,Yl))E=P(this,us);else try{ce(this,Yl,a.select),E=a.select(b.data),E=im(c==null?void 0:c.data,E,a),ce(this,us,E),ce(this,Ln,null)}catch(U){ce(this,Ln,U)}else E=b.data;if(a.placeholderData!==void 0&&E===void 0&&w==="pending"){let U;if(c!=null&&c.isPlaceholderData&&a.placeholderData===(d==null?void 0:d.placeholderData))U=c.data;else if(U=typeof a.placeholderData=="function"?a.placeholderData((k=P(this,fs))==null?void 0:k.state.data,P(this,fs)):a.placeholderData,a.select&&U!==void 0)try{U=a.select(U),ce(this,Ln,null)}catch(K){ce(this,Ln,K)}U!==void 0&&(w="success",E=im(c==null?void 0:c.data,U,a),x=!0)}P(this,Ln)&&(T=P(this,Ln),E=P(this,us),S=Date.now(),w="error");const C=b.fetchStatus==="fetching",N=w==="pending",O=w==="error",_=N&&C,L=E!==void 0,V={status:w,fetchStatus:b.fetchStatus,isPending:N,isSuccess:w==="success",isError:O,isInitialLoading:_,isLoading:_,data:E,dataUpdatedAt:b.dataUpdatedAt,error:T,errorUpdatedAt:S,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>p.dataUpdateCount||b.errorUpdateCount>p.errorUpdateCount,isFetching:C,isRefetching:C&&!N,isLoadingError:O&&!L,isPaused:b.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:O&&L,isStale:Ym(r,a),refetch:this.refetch,promise:P(this,sa)};if(this.options.experimental_prefetchInRender){const U=se=>{V.status==="error"?se.reject(V.error):V.data!==void 0&&se.resolve(V.data)},K=()=>{const se=ce(this,sa,V.promise=sm());U(se)},te=P(this,sa);switch(te.status){case"pending":r.queryHash===s.queryHash&&U(te);break;case"fulfilled":(V.status==="error"||V.data!==te.value)&&K();break;case"rejected":(V.status!=="error"||V.error!==te.reason)&&K();break}}return V}updateResult(r){const a=P(this,At),s=this.createResult(P(this,_e),this.options);if(ce(this,Wa,P(this,_e).state),ce(this,cs,this.options),P(this,Wa).data!==void 0&&ce(this,fs,P(this,_e)),Bc(s,a))return;ce(this,At,s);const o={},c=()=>{if(!a)return!0;const{notifyOnChangeProps:f}=this.options,d=typeof f=="function"?f():f;if(d==="all"||!d&&!P(this,ds).size)return!0;const m=new Set(d??P(this,ds));return this.options.throwOnError&&m.add("error"),Object.keys(P(this,At)).some(p=>{const v=p;return P(this,At)[v]!==a[v]&&m.has(v)})};(r==null?void 0:r.listeners)!==!1&&c()&&(o.listeners=!0),Ne(this,ke,Kx).call(this,{...o,...r})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ne(this,ke,um).call(this)}},Dt=new WeakMap,_e=new WeakMap,Vl=new WeakMap,At=new WeakMap,Wa=new WeakMap,cs=new WeakMap,sa=new WeakMap,Ln=new WeakMap,Yl=new WeakMap,us=new WeakMap,fs=new WeakMap,Za=new WeakMap,Ja=new WeakMap,la=new WeakMap,ds=new WeakMap,ke=new WeakSet,Ll=function(r){Ne(this,ke,hm).call(this);let a=P(this,_e).fetch(this.options,r);return r!=null&&r.throwOnError||(a=a.catch(an)),a},lm=function(){Ne(this,ke,fm).call(this);const r=Xi(this.options.staleTime,P(this,_e));if(ei||P(this,At).isStale||!rm(r))return;const s=qx(P(this,At).dataUpdatedAt,r)+1;ce(this,Za,setTimeout(()=>{P(this,At).isStale||this.updateResult()},s))},om=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,_e)):this.options.refetchInterval)??!1},cm=function(r){Ne(this,ke,dm).call(this),ce(this,la,r),!(ei||gn(this.options.enabled,P(this,_e))===!1||!rm(P(this,la))||P(this,la)===0)&&ce(this,Ja,setInterval(()=>{(this.options.refetchIntervalInBackground||Vm.isFocused())&&Ne(this,ke,Ll).call(this)},P(this,la)))},um=function(){Ne(this,ke,lm).call(this),Ne(this,ke,cm).call(this,Ne(this,ke,om).call(this))},fm=function(){P(this,Za)&&(clearTimeout(P(this,Za)),ce(this,Za,void 0))},dm=function(){P(this,Ja)&&(clearInterval(P(this,Ja)),ce(this,Ja,void 0))},hm=function(){const r=P(this,Dt).getQueryCache().build(P(this,Dt),this.options);if(r===P(this,_e))return;const a=P(this,_e);ce(this,_e,r),ce(this,Vl,r.state),this.hasListeners()&&(a==null||a.removeObserver(this),r.addObserver(this))},Kx=function(r){ut.batch(()=>{r.listeners&&this.listeners.forEach(a=>{a(P(this,At))}),P(this,Dt).getQueryCache().notify({query:P(this,_e),type:"observerResultsUpdated"})})},kx);function UA(t,r){return gn(r.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&r.retryOnMount===!1)}function zb(t,r){return UA(t,r)||t.state.data!==void 0&&mm(t,r,r.refetchOnMount)}function mm(t,r,a){if(gn(r.enabled,t)!==!1){const s=typeof a=="function"?a(t):a;return s==="always"||s!==!1&&Ym(t,r)}return!1}function Pb(t,r,a,s){return(t!==r||gn(s.enabled,t)===!1)&&(!a.suspense||t.state.status!=="error")&&Ym(t,a)}function Ym(t,r){return gn(r.enabled,t)!==!1&&t.isStaleByTime(Xi(r.staleTime,t))}function kA(t,r){return!Bc(t.getCurrentResult(),r)}var oa,ca,_t,gr,wr,Oc,pm,Hx,HA=(Hx=class extends vs{constructor(a,s){super();be(this,wr);be(this,oa);be(this,ca);be(this,_t);be(this,gr);ce(this,oa,a),this.setOptions(s),this.bindMethods(),Ne(this,wr,Oc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){var o;const s=this.options;this.options=P(this,oa).defaultMutationOptions(a),Bc(this.options,s)||P(this,oa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:P(this,_t),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&ti(s.mutationKey)!==ti(this.options.mutationKey)?this.reset():((o=P(this,_t))==null?void 0:o.state.status)==="pending"&&P(this,_t).setOptions(this.options)}onUnsubscribe(){var a;this.hasListeners()||(a=P(this,_t))==null||a.removeObserver(this)}onMutationUpdate(a){Ne(this,wr,Oc).call(this),Ne(this,wr,pm).call(this,a)}getCurrentResult(){return P(this,ca)}reset(){var a;(a=P(this,_t))==null||a.removeObserver(this),ce(this,_t,void 0),Ne(this,wr,Oc).call(this),Ne(this,wr,pm).call(this)}mutate(a,s){var o;return ce(this,gr,s),(o=P(this,_t))==null||o.removeObserver(this),ce(this,_t,P(this,oa).getMutationCache().build(P(this,oa),this.options)),P(this,_t).addObserver(this),P(this,_t).execute(a)}},oa=new WeakMap,ca=new WeakMap,_t=new WeakMap,gr=new WeakMap,wr=new WeakSet,Oc=function(){var s;const a=((s=P(this,_t))==null?void 0:s.state)??Xx();ce(this,ca,{...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset})},pm=function(a){ut.batch(()=>{var s,o,c,f,d,m,p,v;if(P(this,gr)&&this.hasListeners()){const b=P(this,ca).variables,x=P(this,ca).context;(a==null?void 0:a.type)==="success"?((o=(s=P(this,gr)).onSuccess)==null||o.call(s,a.data,b,x),(f=(c=P(this,gr)).onSettled)==null||f.call(c,a.data,null,b,x)):(a==null?void 0:a.type)==="error"&&((m=(d=P(this,gr)).onError)==null||m.call(d,a.error,b,x),(v=(p=P(this,gr)).onSettled)==null||v.call(p,void 0,a.error,b,x))}this.listeners.forEach(b=>{b(P(this,ca))})})},Hx),Wx=y.createContext(void 0),qn=t=>{const r=y.useContext(Wx);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},$A=({client:t,children:r})=>(y.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),g.jsx(Wx.Provider,{value:t,children:r})),Zx=y.createContext(!1),qA=()=>y.useContext(Zx);Zx.Provider;function BA(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var IA=y.createContext(BA()),VA=()=>y.useContext(IA);function Jx(t,r){return typeof t=="function"?t(...r):!!t}function gm(){}var YA=(t,r)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(r.isReset()||(t.retryOnMount=!1))},GA=t=>{y.useEffect(()=>{t.clearReset()},[t])},FA=({result:t,errorResetBoundary:r,throwOnError:a,query:s,suspense:o})=>t.isError&&!r.isReset()&&!t.isFetching&&s&&(o&&t.data===void 0||Jx(a,[t.error,s])),QA=t=>{const r=t.staleTime;t.suspense&&(t.staleTime=typeof r=="function"?(...a)=>Math.max(r(...a),1e3):Math.max(r??1e3,1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},XA=(t,r)=>t.isLoading&&t.isFetching&&!r,KA=(t,r)=>(t==null?void 0:t.suspense)&&r.isPending,Ub=(t,r,a)=>r.fetchOptimistic(t).catch(()=>{a.clearReset()});function WA(t,r,a){var b,x,E,T,S;const s=qn(),o=qA(),c=VA(),f=s.defaultQueryOptions(t);(x=(b=s.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||x.call(b,f),f._optimisticResults=o?"isRestoring":"optimistic",QA(f),YA(f,c),GA(c);const d=!s.getQueryCache().get(f.queryHash),[m]=y.useState(()=>new r(s,f)),p=m.getOptimisticResult(f),v=!o&&t.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(w=>{const C=v?m.subscribe(ut.batchCalls(w)):gm;return m.updateResult(),C},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),y.useEffect(()=>{m.setOptions(f,{listeners:!1})},[f,m]),KA(f,p))throw Ub(f,m,c);if(FA({result:p,errorResetBoundary:c,throwOnError:f.throwOnError,query:s.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw p.error;if((T=(E=s.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||T.call(E,f,p),f.experimental_prefetchInRender&&!ei&&XA(p,o)){const w=d?Ub(f,m,c):(S=s.getQueryCache().get(f.queryHash))==null?void 0:S.promise;w==null||w.catch(gm).finally(()=>{m.updateResult()})}return f.notifyOnChangeProps?p:m.trackResult(p)}function ys(t,r){return WA(t,PA)}function Fl(t,r){const a=qn(),[s]=y.useState(()=>new HA(a,t));y.useEffect(()=>{s.setOptions(t)},[s,t]);const o=y.useSyncExternalStore(y.useCallback(f=>s.subscribe(ut.batchCalls(f)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=y.useCallback((f,d)=>{s.mutate(f,d).catch(gm)},[s]);if(o.error&&Jx(s.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}function kb(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function eS(...t){return r=>{let a=!1;const s=t.map(o=>{const c=kb(o,r);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let o=0;o<s.length;o++){const c=s[o];typeof c=="function"?c():kb(t[o],null)}}}}function Ue(...t){return y.useCallback(eS(...t),t)}var sn=y.forwardRef((t,r)=>{const{children:a,...s}=t,o=y.Children.toArray(a),c=o.find(ZA);if(c){const f=c.props.children,d=o.map(m=>m===c?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:m);return g.jsx(vm,{...s,ref:r,children:y.isValidElement(f)?y.cloneElement(f,void 0,d):null})}return g.jsx(vm,{...s,ref:r,children:a})});sn.displayName="Slot";var vm=y.forwardRef((t,r)=>{const{children:a,...s}=t;if(y.isValidElement(a)){const o=eN(a),c=JA(s,a.props);return a.type!==y.Fragment&&(c.ref=r?eS(r,o):o),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});vm.displayName="SlotClone";var tS=({children:t})=>g.jsx(g.Fragment,{children:t});function ZA(t){return y.isValidElement(t)&&t.type===tS}function JA(t,r){const a={...r};for(const s in r){const o=t[s],c=r[s];/^on[A-Z]/.test(s)?o&&c?a[s]=(...d)=>{c(...d),o(...d)}:o&&(a[s]=o):s==="style"?a[s]={...o,...c}:s==="className"&&(a[s]=[o,c].filter(Boolean).join(" "))}return{...t,...a}}function eN(t){var s,o;let r=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,a=r&&"isReactWarning"in r&&r.isReactWarning;return a?t.ref:(r=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}function nS(t){var r,a,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(r=0;r<o;r++)t[r]&&(a=nS(t[r]))&&(s&&(s+=" "),s+=a)}else for(a in t)t[a]&&(s&&(s+=" "),s+=a);return s}function rS(){for(var t,r,a=0,s="",o=arguments.length;a<o;a++)(t=arguments[a])&&(r=nS(t))&&(s&&(s+=" "),s+=r);return s}const Hb=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,$b=rS,ma=(t,r)=>a=>{var s;if((r==null?void 0:r.variants)==null)return $b(t,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:o,defaultVariants:c}=r,f=Object.keys(o).map(p=>{const v=a==null?void 0:a[p],b=c==null?void 0:c[p];if(v===null)return null;const x=Hb(v)||Hb(b);return o[p][x]}),d=a&&Object.entries(a).reduce((p,v)=>{let[b,x]=v;return x===void 0||(p[b]=x),p},{}),m=r==null||(s=r.compoundVariants)===null||s===void 0?void 0:s.reduce((p,v)=>{let{class:b,className:x,...E}=v;return Object.entries(E).every(T=>{let[S,w]=T;return Array.isArray(w)?w.includes({...c,...d}[S]):{...c,...d}[S]===w})?[...p,b,x]:p},[]);return $b(t,f,m,a==null?void 0:a.class,a==null?void 0:a.className)};/**
|
|
50
|
+
* @license lucide-react v0.469.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const tN=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),aS=(...t)=>t.filter((r,a,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===a).join(" ").trim();/**
|
|
55
|
+
* @license lucide-react v0.469.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/var nN={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"};/**
|
|
60
|
+
* @license lucide-react v0.469.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const rN=y.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:o="",children:c,iconNode:f,...d},m)=>y.createElement("svg",{ref:m,...nN,width:r,height:r,stroke:t,strokeWidth:s?Number(a)*24/Number(r):a,className:aS("lucide",o),...d},[...f.map(([p,v])=>y.createElement(p,v)),...Array.isArray(c)?c:[c]]));/**
|
|
65
|
+
* @license lucide-react v0.469.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const Be=(t,r)=>{const a=y.forwardRef(({className:s,...o},c)=>y.createElement(rN,{ref:c,iconNode:r,className:aS(`lucide-${tN(t)}`,s),...o}));return a.displayName=`${t}`,a};/**
|
|
70
|
+
* @license lucide-react v0.469.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const aN=Be("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
75
|
+
* @license lucide-react v0.469.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const iN=Be("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
80
|
+
* @license lucide-react v0.469.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const sN=Be("Book",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/**
|
|
85
|
+
* @license lucide-react v0.469.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const Gm=Be("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
90
|
+
* @license lucide-react v0.469.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const iS=Be("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
95
|
+
* @license lucide-react v0.469.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const lN=Be("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
100
|
+
* @license lucide-react v0.469.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const oN=Be("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|
105
|
+
* @license lucide-react v0.469.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const sS=Be("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
|
|
110
|
+
* @license lucide-react v0.469.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const cN=Be("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
115
|
+
* @license lucide-react v0.469.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const uN=Be("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
|
|
120
|
+
* @license lucide-react v0.469.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const lS=Be("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
125
|
+
* @license lucide-react v0.469.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const fN=Be("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
130
|
+
* @license lucide-react v0.469.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const dN=Be("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
135
|
+
* @license lucide-react v0.469.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const qb=Be("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
140
|
+
* @license lucide-react v0.469.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const hN=Be("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"}]]);/**
|
|
145
|
+
* @license lucide-react v0.469.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const mN=Be("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
|
|
150
|
+
* @license lucide-react v0.469.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const pN=Be("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
155
|
+
* @license lucide-react v0.469.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const gN=Be("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
|
|
160
|
+
* @license lucide-react v0.469.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const vN=Be("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
165
|
+
* @license lucide-react v0.469.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const yN=Be("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
170
|
+
* @license lucide-react v0.469.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const bN=Be("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
175
|
+
* @license lucide-react v0.469.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const xN=Be("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
|
|
180
|
+
* @license lucide-react v0.469.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const oS=Be("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
185
|
+
* @license lucide-react v0.469.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const SN=Be("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
190
|
+
* @license lucide-react v0.469.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const wN=Be("Trash",[["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"}]]);/**
|
|
195
|
+
* @license lucide-react v0.469.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const Bb=Be("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"}]]);/**
|
|
200
|
+
* @license lucide-react v0.469.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const EN=Be("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
|
|
205
|
+
* @license lucide-react v0.469.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const bs=Be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Qd=768;function RN(){const[t,r]=y.useState(void 0);return y.useEffect(()=>{const a=window.matchMedia(`(max-width: ${Qd-1}px)`),s=()=>{r(window.innerWidth<Qd)};return a.addEventListener("change",s),r(window.innerWidth<Qd),()=>a.removeEventListener("change",s)},[]),!!t}const Fm="-",TN=t=>{const r=AN(t),{conflictingClassGroups:a,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:f=>{const d=f.split(Fm);return d[0]===""&&d.length!==1&&d.shift(),cS(d,r)||CN(f)},getConflictingClassGroupIds:(f,d)=>{const m=a[f]||[];return d&&s[f]?[...m,...s[f]]:m}}},cS=(t,r)=>{var f;if(t.length===0)return r.classGroupId;const a=t[0],s=r.nextPart.get(a),o=s?cS(t.slice(1),s):void 0;if(o)return o;if(r.validators.length===0)return;const c=t.join(Fm);return(f=r.validators.find(({validator:d})=>d(c)))==null?void 0:f.classGroupId},Ib=/^\[(.+)\]$/,CN=t=>{if(Ib.test(t)){const r=Ib.exec(t)[1],a=r==null?void 0:r.substring(0,r.indexOf(":"));if(a)return"arbitrary.."+a}},AN=t=>{const{theme:r,prefix:a}=t,s={nextPart:new Map,validators:[]};return ON(Object.entries(t.classGroups),a).forEach(([c,f])=>{ym(f,s,c,r)}),s},ym=(t,r,a,s)=>{t.forEach(o=>{if(typeof o=="string"){const c=o===""?r:Vb(r,o);c.classGroupId=a;return}if(typeof o=="function"){if(NN(o)){ym(o(s),r,a,s);return}r.validators.push({validator:o,classGroupId:a});return}Object.entries(o).forEach(([c,f])=>{ym(f,Vb(r,c),a,s)})})},Vb=(t,r)=>{let a=t;return r.split(Fm).forEach(s=>{a.nextPart.has(s)||a.nextPart.set(s,{nextPart:new Map,validators:[]}),a=a.nextPart.get(s)}),a},NN=t=>t.isThemeGetter,ON=(t,r)=>r?t.map(([a,s])=>{const o=s.map(c=>typeof c=="string"?r+c:typeof c=="object"?Object.fromEntries(Object.entries(c).map(([f,d])=>[r+f,d])):c);return[a,o]}):t,MN=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,a=new Map,s=new Map;const o=(c,f)=>{a.set(c,f),r++,r>t&&(r=0,s=a,a=new Map)};return{get(c){let f=a.get(c);if(f!==void 0)return f;if((f=s.get(c))!==void 0)return o(c,f),f},set(c,f){a.has(c)?a.set(c,f):o(c,f)}}},uS="!",jN=t=>{const{separator:r,experimentalParseClassName:a}=t,s=r.length===1,o=r[0],c=r.length,f=d=>{const m=[];let p=0,v=0,b;for(let w=0;w<d.length;w++){let C=d[w];if(p===0){if(C===o&&(s||d.slice(w,w+c)===r)){m.push(d.slice(v,w)),v=w+c;continue}if(C==="/"){b=w;continue}}C==="["?p++:C==="]"&&p--}const x=m.length===0?d:d.substring(v),E=x.startsWith(uS),T=E?x.substring(1):x,S=b&&b>v?b-v:void 0;return{modifiers:m,hasImportantModifier:E,baseClassName:T,maybePostfixModifierPosition:S}};return a?d=>a({className:d,parseClassName:f}):f},DN=t=>{if(t.length<=1)return t;const r=[];let a=[];return t.forEach(s=>{s[0]==="["?(r.push(...a.sort(),s),a=[]):a.push(s)}),r.push(...a.sort()),r},_N=t=>({cache:MN(t.cacheSize),parseClassName:jN(t),...TN(t)}),LN=/\s+/,zN=(t,r)=>{const{parseClassName:a,getClassGroupId:s,getConflictingClassGroupIds:o}=r,c=[],f=t.trim().split(LN);let d="";for(let m=f.length-1;m>=0;m-=1){const p=f[m],{modifiers:v,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:E}=a(p);let T=!!E,S=s(T?x.substring(0,E):x);if(!S){if(!T){d=p+(d.length>0?" "+d:d);continue}if(S=s(x),!S){d=p+(d.length>0?" "+d:d);continue}T=!1}const w=DN(v).join(":"),C=b?w+uS:w,N=C+S;if(c.includes(N))continue;c.push(N);const O=o(S,T);for(let _=0;_<O.length;++_){const L=O[_];c.push(C+L)}d=p+(d.length>0?" "+d:d)}return d};function PN(){let t=0,r,a,s="";for(;t<arguments.length;)(r=arguments[t++])&&(a=fS(r))&&(s&&(s+=" "),s+=a);return s}const fS=t=>{if(typeof t=="string")return t;let r,a="";for(let s=0;s<t.length;s++)t[s]&&(r=fS(t[s]))&&(a&&(a+=" "),a+=r);return a};function UN(t,...r){let a,s,o,c=f;function f(m){const p=r.reduce((v,b)=>b(v),t());return a=_N(p),s=a.cache.get,o=a.cache.set,c=d,d(m)}function d(m){const p=s(m);if(p)return p;const v=zN(m,a);return o(m,v),v}return function(){return c(PN.apply(null,arguments))}}const Fe=t=>{const r=a=>a[t]||[];return r.isThemeGetter=!0,r},dS=/^\[(?:([a-z-]+):)?(.+)\]$/i,kN=/^\d+\/\d+$/,HN=new Set(["px","full","screen"]),$N=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qN=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,BN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,IN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fr=t=>Ki(t)||HN.has(t)||kN.test(t),Kr=t=>xs(t,"length",ZN),Ki=t=>!!t&&!Number.isNaN(Number(t)),Xd=t=>xs(t,"number",Ki),Cl=t=>!!t&&Number.isInteger(Number(t)),YN=t=>t.endsWith("%")&&Ki(t.slice(0,-1)),Ce=t=>dS.test(t),Wr=t=>$N.test(t),GN=new Set(["length","size","percentage"]),FN=t=>xs(t,GN,hS),QN=t=>xs(t,"position",hS),XN=new Set(["image","url"]),KN=t=>xs(t,XN,eO),WN=t=>xs(t,"",JN),Al=()=>!0,xs=(t,r,a)=>{const s=dS.exec(t);return s?s[1]?typeof r=="string"?s[1]===r:r.has(s[1]):a(s[2]):!1},ZN=t=>qN.test(t)&&!BN.test(t),hS=()=>!1,JN=t=>IN.test(t),eO=t=>VN.test(t),tO=()=>{const t=Fe("colors"),r=Fe("spacing"),a=Fe("blur"),s=Fe("brightness"),o=Fe("borderColor"),c=Fe("borderRadius"),f=Fe("borderSpacing"),d=Fe("borderWidth"),m=Fe("contrast"),p=Fe("grayscale"),v=Fe("hueRotate"),b=Fe("invert"),x=Fe("gap"),E=Fe("gradientColorStops"),T=Fe("gradientColorStopPositions"),S=Fe("inset"),w=Fe("margin"),C=Fe("opacity"),N=Fe("padding"),O=Fe("saturate"),_=Fe("scale"),L=Fe("sepia"),$=Fe("skew"),V=Fe("space"),k=Fe("translate"),U=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],te=()=>["auto",Ce,r],se=()=>[Ce,r],de=()=>["",fr,Kr],q=()=>["auto",Ki,Ce],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",Ce],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[Ki,Ce];return{cacheSize:500,separator:":",theme:{colors:[Al],spacing:[fr,Kr],blur:["none","",Wr,Ce],brightness:G(),borderColor:[t],borderRadius:["none","","full",Wr,Ce],borderSpacing:se(),borderWidth:de(),contrast:G(),grayscale:Q(),hueRotate:G(),invert:Q(),gap:se(),gradientColorStops:[t],gradientColorStopPositions:[YN,Kr],inset:te(),margin:te(),opacity:G(),padding:se(),saturate:G(),scale:G(),sepia:Q(),skew:G(),space:se(),translate:se()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[Wr]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...H(),Ce]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Cl,Ce]}],basis:[{basis:te()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ce]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Cl,Ce]}],"grid-cols":[{"grid-cols":[Al]}],"col-start-end":[{col:["auto",{span:["full",Cl,Ce]},Ce]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[Al]}],"row-start-end":[{row:["auto",{span:[Cl,Ce]},Ce]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ce]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[V]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[V]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ce,r]}],"min-w":[{"min-w":[Ce,r,"min","max","fit"]}],"max-w":[{"max-w":[Ce,r,"none","full","min","max","fit","prose",{screen:[Wr]},Wr]}],h:[{h:[Ce,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ce,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ce,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ce,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Wr,Kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xd]}],"font-family":[{font:[Al]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ce]}],"line-clamp":[{"line-clamp":["none",Ki,Xd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fr,Ce]}],"list-image":[{"list-image":["none",Ce]}],"list-style-type":[{list:["none","disc","decimal",Ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fr,Kr]}],"underline-offset":[{"underline-offset":["auto",fr,Ce]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:se()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),QN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",FN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},KN]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[T]}],"gradient-via-pos":[{via:[T]}],"gradient-to-pos":[{to:[T]}],"gradient-from":[{from:[E]}],"gradient-via":[{via:[E]}],"gradient-to":[{to:[E]}],rounded:[{rounded:[c]}],"rounded-s":[{"rounded-s":[c]}],"rounded-e":[{"rounded-e":[c]}],"rounded-t":[{"rounded-t":[c]}],"rounded-r":[{"rounded-r":[c]}],"rounded-b":[{"rounded-b":[c]}],"rounded-l":[{"rounded-l":[c]}],"rounded-ss":[{"rounded-ss":[c]}],"rounded-se":[{"rounded-se":[c]}],"rounded-ee":[{"rounded-ee":[c]}],"rounded-es":[{"rounded-es":[c]}],"rounded-tl":[{"rounded-tl":[c]}],"rounded-tr":[{"rounded-tr":[c]}],"rounded-br":[{"rounded-br":[c]}],"rounded-bl":[{"rounded-bl":[c]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:j()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[fr,Ce]}],"outline-w":[{outline:[fr,Kr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[fr,Kr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Wr,WN]}],"shadow-color":[{shadow:[Al]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[s]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",Wr,Ce]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[b]}],saturate:[{saturate:[O]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[f]}],"border-spacing-x":[{"border-spacing-x":[f]}],"border-spacing-y":[{"border-spacing-y":[f]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ce]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Cl,Ce]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ce]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ce]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":se()}],"scroll-mx":[{"scroll-mx":se()}],"scroll-my":[{"scroll-my":se()}],"scroll-ms":[{"scroll-ms":se()}],"scroll-me":[{"scroll-me":se()}],"scroll-mt":[{"scroll-mt":se()}],"scroll-mr":[{"scroll-mr":se()}],"scroll-mb":[{"scroll-mb":se()}],"scroll-ml":[{"scroll-ml":se()}],"scroll-p":[{"scroll-p":se()}],"scroll-px":[{"scroll-px":se()}],"scroll-py":[{"scroll-py":se()}],"scroll-ps":[{"scroll-ps":se()}],"scroll-pe":[{"scroll-pe":se()}],"scroll-pt":[{"scroll-pt":se()}],"scroll-pr":[{"scroll-pr":se()}],"scroll-pb":[{"scroll-pb":se()}],"scroll-pl":[{"scroll-pl":se()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ce]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[fr,Kr,Xd]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},nO=UN(tO);var Mc={exports:{}},rO=Mc.exports,Yb;function aO(){return Yb||(Yb=1,function(t,r){(function(a,s){t.exports=s()})(rO,function(){var a=1e3,s=6e4,o=36e5,c="millisecond",f="second",d="minute",m="hour",p="day",v="week",b="month",x="quarter",E="year",T="date",S="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,N={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var H=["th","st","nd","rd"],j=q%100;return"["+q+(H[(j-20)%10]||H[j]||H[0])+"]"}},O=function(q,H,j){var B=String(q);return!B||B.length>=H?q:""+Array(H+1-B.length).join(j)+q},_={s:O,z:function(q){var H=-q.utcOffset(),j=Math.abs(H),B=Math.floor(j/60),z=j%60;return(H<=0?"+":"-")+O(B,2,"0")+":"+O(z,2,"0")},m:function q(H,j){if(H.date()<j.date())return-q(j,H);var B=12*(j.year()-H.year())+(j.month()-H.month()),z=H.clone().add(B,b),Q=j-z<0,M=H.clone().add(B+(Q?-1:1),b);return+(-(B+(j-z)/(Q?z-M:M-z))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:b,y:E,w:v,d:p,D:T,h:m,m:d,s:f,ms:c,Q:x}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},L="en",$={};$[L]=N;var V="$isDayjsObject",k=function(q){return q instanceof se||!(!q||!q[V])},U=function q(H,j,B){var z;if(!H)return L;if(typeof H=="string"){var Q=H.toLowerCase();$[Q]&&(z=Q),j&&($[Q]=j,z=Q);var M=H.split("-");if(!z&&M.length>1)return q(M[0])}else{var G=H.name;$[G]=H,z=G}return!B&&z&&(L=z),z||!B&&L},K=function(q,H){if(k(q))return q.clone();var j=typeof H=="object"?H:{};return j.date=q,j.args=arguments,new se(j)},te=_;te.l=U,te.i=k,te.w=function(q,H){return K(q,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var se=function(){function q(j){this.$L=U(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[V]=!0}var H=q.prototype;return H.parse=function(j){this.$d=function(B){var z=B.date,Q=B.utc;if(z===null)return new Date(NaN);if(te.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var M=z.match(w);if(M){var G=M[2]-1||0,ee=(M[7]||"0").substring(0,3);return Q?new Date(Date.UTC(M[1],G,M[3]||1,M[4]||0,M[5]||0,M[6]||0,ee)):new Date(M[1],G,M[3]||1,M[4]||0,M[5]||0,M[6]||0,ee)}}return new Date(z)}(j),this.init()},H.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},H.$utils=function(){return te},H.isValid=function(){return this.$d.toString()!==S},H.isSame=function(j,B){var z=K(j);return this.startOf(B)<=z&&z<=this.endOf(B)},H.isAfter=function(j,B){return K(j)<this.startOf(B)},H.isBefore=function(j,B){return this.endOf(B)<K(j)},H.$g=function(j,B,z){return te.u(j)?this[B]:this.set(z,j)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(j,B){var z=this,Q=!!te.u(B)||B,M=te.p(j),G=function(Ee,fe){var Se=te.w(z.$u?Date.UTC(z.$y,fe,Ee):new Date(z.$y,fe,Ee),z);return Q?Se:Se.endOf(p)},ee=function(Ee,fe){return te.w(z.toDate()[Ee].apply(z.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(fe)),z)},ae=this.$W,re=this.$M,oe=this.$D,pe="set"+(this.$u?"UTC":"");switch(M){case E:return Q?G(1,0):G(31,11);case b:return Q?G(1,re):G(0,re+1);case v:var ue=this.$locale().weekStart||0,me=(ae<ue?ae+7:ae)-ue;return G(Q?oe-me:oe+(6-me),re);case p:case T:return ee(pe+"Hours",0);case m:return ee(pe+"Minutes",1);case d:return ee(pe+"Seconds",2);case f:return ee(pe+"Milliseconds",3);default:return this.clone()}},H.endOf=function(j){return this.startOf(j,!1)},H.$set=function(j,B){var z,Q=te.p(j),M="set"+(this.$u?"UTC":""),G=(z={},z[p]=M+"Date",z[T]=M+"Date",z[b]=M+"Month",z[E]=M+"FullYear",z[m]=M+"Hours",z[d]=M+"Minutes",z[f]=M+"Seconds",z[c]=M+"Milliseconds",z)[Q],ee=Q===p?this.$D+(B-this.$W):B;if(Q===b||Q===E){var ae=this.clone().set(T,1);ae.$d[G](ee),ae.init(),this.$d=ae.set(T,Math.min(this.$D,ae.daysInMonth())).$d}else G&&this.$d[G](ee);return this.init(),this},H.set=function(j,B){return this.clone().$set(j,B)},H.get=function(j){return this[te.p(j)]()},H.add=function(j,B){var z,Q=this;j=Number(j);var M=te.p(B),G=function(re){var oe=K(Q);return te.w(oe.date(oe.date()+Math.round(re*j)),Q)};if(M===b)return this.set(b,this.$M+j);if(M===E)return this.set(E,this.$y+j);if(M===p)return G(1);if(M===v)return G(7);var ee=(z={},z[d]=s,z[m]=o,z[f]=a,z)[M]||1,ae=this.$d.getTime()+j*ee;return te.w(ae,this)},H.subtract=function(j,B){return this.add(-1*j,B)},H.format=function(j){var B=this,z=this.$locale();if(!this.isValid())return z.invalidDate||S;var Q=j||"YYYY-MM-DDTHH:mm:ssZ",M=te.z(this),G=this.$H,ee=this.$m,ae=this.$M,re=z.weekdays,oe=z.months,pe=z.meridiem,ue=function(fe,Se,Ae,Ie){return fe&&(fe[Se]||fe(B,Q))||Ae[Se].slice(0,Ie)},me=function(fe){return te.s(G%12||12,fe,"0")},Ee=pe||function(fe,Se,Ae){var Ie=fe<12?"AM":"PM";return Ae?Ie.toLowerCase():Ie};return Q.replace(C,function(fe,Se){return Se||function(Ae){switch(Ae){case"YY":return String(B.$y).slice(-2);case"YYYY":return te.s(B.$y,4,"0");case"M":return ae+1;case"MM":return te.s(ae+1,2,"0");case"MMM":return ue(z.monthsShort,ae,oe,3);case"MMMM":return ue(oe,ae);case"D":return B.$D;case"DD":return te.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return ue(z.weekdaysMin,B.$W,re,2);case"ddd":return ue(z.weekdaysShort,B.$W,re,3);case"dddd":return re[B.$W];case"H":return String(G);case"HH":return te.s(G,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return Ee(G,ee,!0);case"A":return Ee(G,ee,!1);case"m":return String(ee);case"mm":return te.s(ee,2,"0");case"s":return String(B.$s);case"ss":return te.s(B.$s,2,"0");case"SSS":return te.s(B.$ms,3,"0");case"Z":return M}return null}(fe)||M.replace(":","")})},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(j,B,z){var Q,M=this,G=te.p(B),ee=K(j),ae=(ee.utcOffset()-this.utcOffset())*s,re=this-ee,oe=function(){return te.m(M,ee)};switch(G){case E:Q=oe()/12;break;case b:Q=oe();break;case x:Q=oe()/3;break;case v:Q=(re-ae)/6048e5;break;case p:Q=(re-ae)/864e5;break;case m:Q=re/o;break;case d:Q=re/s;break;case f:Q=re/a;break;default:Q=re}return z?Q:te.a(Q)},H.daysInMonth=function(){return this.endOf(b).$D},H.$locale=function(){return $[this.$L]},H.locale=function(j,B){if(!j)return this.$L;var z=this.clone(),Q=U(j,B,!0);return Q&&(z.$L=Q),z},H.clone=function(){return te.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},q}(),de=se.prototype;return K.prototype=de,[["$ms",c],["$s",f],["$m",d],["$H",m],["$W",p],["$M",b],["$y",E],["$D",T]].forEach(function(q){de[q[1]]=function(H){return this.$g(H,q[0],q[1])}}),K.extend=function(q,H){return q.$i||(q(H,se,K),q.$i=!0),K},K.locale=U,K.isDayjs=k,K.unix=function(q){return K(1e3*q)},K.en=$[L],K.Ls=$,K.p={},K})}(Mc)),Mc.exports}var iO=aO();const mS=gs(iO);var jc={exports:{}},sO=jc.exports,Gb;function lO(){return Gb||(Gb=1,function(t,r){(function(a,s){t.exports=s()})(sO,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(s,o,c){var f=o.prototype,d=f.format;c.en.formats=a,f.format=function(m){m===void 0&&(m="YYYY-MM-DDTHH:mm:ssZ");var p=this.$locale().formats,v=function(b,x){return b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(E,T,S){var w=S&&S.toUpperCase();return T||x[S]||a[S]||x[w].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(C,N,O){return N||O.slice(1)})})}(m,p===void 0?{}:p);return d.call(this,v)}}})}(jc)),jc.exports}var oO=lO();const cO=gs(oO);function le(...t){return nO(rS(t))}mS.extend(cO);const uO=mS,fO=t=>t.substring(0,2),dO=ma("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"size-[30px] rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),Qe=y.forwardRef(({className:t,variant:r,size:a,asChild:s=!1,...o},c)=>{const f=s?sn:"button";return g.jsx(f,{type:"button",className:le(dO({variant:r,size:a,className:t})),ref:c,...o})});Qe.displayName="Button";const vr=y.forwardRef(({className:t,type:r,...a},s)=>g.jsx("input",{type:r,className:le("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:s,...a}));vr.displayName="Input";var Ss=$x();const hO=gs(Ss);var mO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],we=mO.reduce((t,r)=>{const a=y.forwardRef((s,o)=>{const{asChild:c,...f}=s,d=c?sn:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...f,ref:o})});return a.displayName=`Primitive.${r}`,{...t,[r]:a}},{});function pS(t,r){t&&Ss.flushSync(()=>t.dispatchEvent(r))}var pO="Separator",Fb="horizontal",gO=["horizontal","vertical"],gS=y.forwardRef((t,r)=>{const{decorative:a,orientation:s=Fb,...o}=t,c=vO(s)?s:Fb,d=a?{role:"none"}:{"aria-orientation":c==="vertical"?c:void 0,role:"separator"};return g.jsx(we.div,{"data-orientation":c,...d,...o,ref:r})});gS.displayName=pO;function vO(t){return gO.includes(t)}var vS=gS;const yS=y.forwardRef(({className:t,orientation:r="horizontal",decorative:a=!0,...s},o)=>g.jsx(vS,{ref:o,decorative:a,orientation:r,className:le("shrink-0 bg-border",r==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...s}));yS.displayName=vS.displayName;function ve(t,r,{checkForDefaultPrevented:a=!0}={}){return function(o){if(t==null||t(o),a===!1||!o.defaultPrevented)return r==null?void 0:r(o)}}function yO(t,r){const a=y.createContext(r),s=c=>{const{children:f,...d}=c,m=y.useMemo(()=>d,Object.values(d));return g.jsx(a.Provider,{value:m,children:f})};s.displayName=t+"Provider";function o(c){const f=y.useContext(a);if(f)return f;if(r!==void 0)return r;throw new Error(`\`${c}\` must be used within \`${t}\``)}return[s,o]}function Bn(t,r=[]){let a=[];function s(c,f){const d=y.createContext(f),m=a.length;a=[...a,f];const p=b=>{var C;const{scope:x,children:E,...T}=b,S=((C=x==null?void 0:x[t])==null?void 0:C[m])||d,w=y.useMemo(()=>T,Object.values(T));return g.jsx(S.Provider,{value:w,children:E})};p.displayName=c+"Provider";function v(b,x){var S;const E=((S=x==null?void 0:x[t])==null?void 0:S[m])||d,T=y.useContext(E);if(T)return T;if(f!==void 0)return f;throw new Error(`\`${b}\` must be used within \`${c}\``)}return[p,v]}const o=()=>{const c=a.map(f=>y.createContext(f));return function(d){const m=(d==null?void 0:d[t])||c;return y.useMemo(()=>({[`__scope${t}`]:{...d,[t]:m}}),[d,m])}};return o.scopeName=t,[s,bO(o,...r)]}function bO(...t){const r=t[0];if(t.length===1)return r;const a=()=>{const s=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(c){const f=s.reduce((d,{useScope:m,scopeName:p})=>{const b=m(c)[`__scope${p}`];return{...d,...b}},{});return y.useMemo(()=>({[`__scope${r.scopeName}`]:f}),[f])}};return a.scopeName=r.scopeName,a}var ft=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},xO=mA.useId||(()=>{}),SO=0;function yr(t){const[r,a]=y.useState(xO());return ft(()=>{a(s=>s??String(SO++))},[t]),r?`radix-${r}`:""}function nt(t){const r=y.useRef(t);return y.useEffect(()=>{r.current=t}),y.useMemo(()=>(...a)=>{var s;return(s=r.current)==null?void 0:s.call(r,...a)},[])}function ni({prop:t,defaultProp:r,onChange:a=()=>{}}){const[s,o]=wO({defaultProp:r,onChange:a}),c=t!==void 0,f=c?t:s,d=nt(a),m=y.useCallback(p=>{if(c){const b=typeof p=="function"?p(t):p;b!==t&&d(b)}else o(p)},[c,t,o,d]);return[f,m]}function wO({defaultProp:t,onChange:r}){const a=y.useState(t),[s]=a,o=y.useRef(s),c=nt(r);return y.useEffect(()=>{o.current!==s&&(c(s),o.current=s)},[s,o,c]),a}function EO(t,r=globalThis==null?void 0:globalThis.document){const a=nt(t);y.useEffect(()=>{const s=o=>{o.key==="Escape"&&a(o)};return r.addEventListener("keydown",s,{capture:!0}),()=>r.removeEventListener("keydown",s,{capture:!0})},[a,r])}var RO="DismissableLayer",bm="dismissableLayer.update",TO="dismissableLayer.pointerDownOutside",CO="dismissableLayer.focusOutside",Qb,bS=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ql=y.forwardRef((t,r)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:c,onInteractOutside:f,onDismiss:d,...m}=t,p=y.useContext(bS),[v,b]=y.useState(null),x=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=y.useState({}),T=Ue(r,V=>b(V)),S=Array.from(p.layers),[w]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),C=S.indexOf(w),N=v?S.indexOf(v):-1,O=p.layersWithOutsidePointerEventsDisabled.size>0,_=N>=C,L=NO(V=>{const k=V.target,U=[...p.branches].some(K=>K.contains(k));!_||U||(o==null||o(V),f==null||f(V),V.defaultPrevented||d==null||d())},x),$=OO(V=>{const k=V.target;[...p.branches].some(K=>K.contains(k))||(c==null||c(V),f==null||f(V),V.defaultPrevented||d==null||d())},x);return EO(V=>{N===p.layers.size-1&&(s==null||s(V),!V.defaultPrevented&&d&&(V.preventDefault(),d()))},x),y.useEffect(()=>{if(v)return a&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Qb=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(v)),p.layers.add(v),Xb(),()=>{a&&p.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=Qb)}},[v,x,a,p]),y.useEffect(()=>()=>{v&&(p.layers.delete(v),p.layersWithOutsidePointerEventsDisabled.delete(v),Xb())},[v,p]),y.useEffect(()=>{const V=()=>E({});return document.addEventListener(bm,V),()=>document.removeEventListener(bm,V)},[]),g.jsx(we.div,{...m,ref:T,style:{pointerEvents:O?_?"auto":"none":void 0,...t.style},onFocusCapture:ve(t.onFocusCapture,$.onFocusCapture),onBlurCapture:ve(t.onBlurCapture,$.onBlurCapture),onPointerDownCapture:ve(t.onPointerDownCapture,L.onPointerDownCapture)})});Ql.displayName=RO;var AO="DismissableLayerBranch",xS=y.forwardRef((t,r)=>{const a=y.useContext(bS),s=y.useRef(null),o=Ue(r,s);return y.useEffect(()=>{const c=s.current;if(c)return a.branches.add(c),()=>{a.branches.delete(c)}},[a.branches]),g.jsx(we.div,{...t,ref:o})});xS.displayName=AO;function NO(t,r=globalThis==null?void 0:globalThis.document){const a=nt(t),s=y.useRef(!1),o=y.useRef(()=>{});return y.useEffect(()=>{const c=d=>{if(d.target&&!s.current){let m=function(){SS(TO,a,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(r.removeEventListener("click",o.current),o.current=m,r.addEventListener("click",o.current,{once:!0})):m()}else r.removeEventListener("click",o.current);s.current=!1},f=window.setTimeout(()=>{r.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(f),r.removeEventListener("pointerdown",c),r.removeEventListener("click",o.current)}},[r,a]),{onPointerDownCapture:()=>s.current=!0}}function OO(t,r=globalThis==null?void 0:globalThis.document){const a=nt(t),s=y.useRef(!1);return y.useEffect(()=>{const o=c=>{c.target&&!s.current&&SS(CO,a,{originalEvent:c},{discrete:!1})};return r.addEventListener("focusin",o),()=>r.removeEventListener("focusin",o)},[r,a]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Xb(){const t=new CustomEvent(bm);document.dispatchEvent(t)}function SS(t,r,a,{discrete:s}){const o=a.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:a});r&&o.addEventListener(t,r,{once:!0}),s?pS(o,c):o.dispatchEvent(c)}var MO=Ql,jO=xS,Kd="focusScope.autoFocusOnMount",Wd="focusScope.autoFocusOnUnmount",Kb={bubbles:!1,cancelable:!0},DO="FocusScope",Qm=y.forwardRef((t,r)=>{const{loop:a=!1,trapped:s=!1,onMountAutoFocus:o,onUnmountAutoFocus:c,...f}=t,[d,m]=y.useState(null),p=nt(o),v=nt(c),b=y.useRef(null),x=Ue(r,S=>m(S)),E=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(s){let S=function(O){if(E.paused||!d)return;const _=O.target;d.contains(_)?b.current=_:ea(b.current,{select:!0})},w=function(O){if(E.paused||!d)return;const _=O.relatedTarget;_!==null&&(d.contains(_)||ea(b.current,{select:!0}))},C=function(O){if(document.activeElement===document.body)for(const L of O)L.removedNodes.length>0&&ea(d)};document.addEventListener("focusin",S),document.addEventListener("focusout",w);const N=new MutationObserver(C);return d&&N.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",w),N.disconnect()}}},[s,d,E.paused]),y.useEffect(()=>{if(d){Zb.add(E);const S=document.activeElement;if(!d.contains(S)){const C=new CustomEvent(Kd,Kb);d.addEventListener(Kd,p),d.dispatchEvent(C),C.defaultPrevented||(_O(kO(wS(d)),{select:!0}),document.activeElement===S&&ea(d))}return()=>{d.removeEventListener(Kd,p),setTimeout(()=>{const C=new CustomEvent(Wd,Kb);d.addEventListener(Wd,v),d.dispatchEvent(C),C.defaultPrevented||ea(S??document.body,{select:!0}),d.removeEventListener(Wd,v),Zb.remove(E)},0)}}},[d,p,v,E]);const T=y.useCallback(S=>{if(!a&&!s||E.paused)return;const w=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,C=document.activeElement;if(w&&C){const N=S.currentTarget,[O,_]=LO(N);O&&_?!S.shiftKey&&C===_?(S.preventDefault(),a&&ea(O,{select:!0})):S.shiftKey&&C===O&&(S.preventDefault(),a&&ea(_,{select:!0})):C===N&&S.preventDefault()}},[a,s,E.paused]);return g.jsx(we.div,{tabIndex:-1,...f,ref:x,onKeyDown:T})});Qm.displayName=DO;function _O(t,{select:r=!1}={}){const a=document.activeElement;for(const s of t)if(ea(s,{select:r}),document.activeElement!==a)return}function LO(t){const r=wS(t),a=Wb(r,t),s=Wb(r.reverse(),t);return[a,s]}function wS(t){const r=[],a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)r.push(a.currentNode);return r}function Wb(t,r){for(const a of t)if(!zO(a,{upTo:r}))return a}function zO(t,{upTo:r}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(r!==void 0&&t===r)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function PO(t){return t instanceof HTMLInputElement&&"select"in t}function ea(t,{select:r=!1}={}){if(t&&t.focus){const a=document.activeElement;t.focus({preventScroll:!0}),t!==a&&PO(t)&&r&&t.select()}}var Zb=UO();function UO(){let t=[];return{add(r){const a=t[0];r!==a&&(a==null||a.pause()),t=Jb(t,r),t.unshift(r)},remove(r){var a;t=Jb(t,r),(a=t[0])==null||a.resume()}}}function Jb(t,r){const a=[...t],s=a.indexOf(r);return s!==-1&&a.splice(s,1),a}function kO(t){return t.filter(r=>r.tagName!=="A")}var HO="Portal",Xl=y.forwardRef((t,r)=>{var d;const{container:a,...s}=t,[o,c]=y.useState(!1);ft(()=>c(!0),[]);const f=a||o&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return f?hO.createPortal(g.jsx(we.div,{...s,ref:r}),f):null});Xl.displayName=HO;function $O(t,r){return y.useReducer((a,s)=>r[a][s]??a,t)}var ln=t=>{const{present:r,children:a}=t,s=qO(r),o=typeof a=="function"?a({present:s.isPresent}):y.Children.only(a),c=Ue(s.ref,BO(o));return typeof a=="function"||s.isPresent?y.cloneElement(o,{ref:c}):null};ln.displayName="Presence";function qO(t){const[r,a]=y.useState(),s=y.useRef({}),o=y.useRef(t),c=y.useRef("none"),f=t?"mounted":"unmounted",[d,m]=$O(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const p=bc(s.current);c.current=d==="mounted"?p:"none"},[d]),ft(()=>{const p=s.current,v=o.current;if(v!==t){const x=c.current,E=bc(p);t?m("MOUNT"):E==="none"||(p==null?void 0:p.display)==="none"?m("UNMOUNT"):m(v&&x!==E?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,m]),ft(()=>{if(r){let p;const v=r.ownerDocument.defaultView??window,b=E=>{const S=bc(s.current).includes(E.animationName);if(E.target===r&&S&&(m("ANIMATION_END"),!o.current)){const w=r.style.animationFillMode;r.style.animationFillMode="forwards",p=v.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=w)})}},x=E=>{E.target===r&&(c.current=bc(s.current))};return r.addEventListener("animationstart",x),r.addEventListener("animationcancel",b),r.addEventListener("animationend",b),()=>{v.clearTimeout(p),r.removeEventListener("animationstart",x),r.removeEventListener("animationcancel",b),r.removeEventListener("animationend",b)}}else m("ANIMATION_END")},[r,m]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:y.useCallback(p=>{p&&(s.current=getComputedStyle(p)),a(p)},[])}}function bc(t){return(t==null?void 0:t.animationName)||"none"}function BO(t){var s,o;let r=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,a=r&&"isReactWarning"in r&&r.isReactWarning;return a?t.ref:(r=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var Zd=0;function ES(){y.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??e0()),document.body.insertAdjacentElement("beforeend",t[1]??e0()),Zd++,()=>{Zd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Zd--}},[])}function e0(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var zn=function(){return zn=Object.assign||function(r){for(var a,s=1,o=arguments.length;s<o;s++){a=arguments[s];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(r[c]=a[c])}return r},zn.apply(this,arguments)};function RS(t,r){var a={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&r.indexOf(s)<0&&(a[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)r.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(a[s[o]]=t[s[o]]);return a}function IO(t,r,a){if(a||arguments.length===2)for(var s=0,o=r.length,c;s<o;s++)(c||!(s in r))&&(c||(c=Array.prototype.slice.call(r,0,s)),c[s]=r[s]);return t.concat(c||Array.prototype.slice.call(r))}var Dc="right-scroll-bar-position",_c="width-before-scroll-bar",VO="with-scroll-bars-hidden",YO="--removed-body-scroll-bar-size";function Jd(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function GO(t,r){var a=y.useState(function(){return{value:t,callback:r,facade:{get current(){return a.value},set current(s){var o=a.value;o!==s&&(a.value=s,a.callback(s,o))}}}})[0];return a.callback=r,a.facade}var FO=typeof window<"u"?y.useLayoutEffect:y.useEffect,t0=new WeakMap;function QO(t,r){var a=GO(null,function(s){return t.forEach(function(o){return Jd(o,s)})});return FO(function(){var s=t0.get(a);if(s){var o=new Set(s),c=new Set(t),f=a.current;o.forEach(function(d){c.has(d)||Jd(d,null)}),c.forEach(function(d){o.has(d)||Jd(d,f)})}t0.set(a,t)},[t]),a}function XO(t){return t}function KO(t,r){r===void 0&&(r=XO);var a=[],s=!1,o={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:t},useMedium:function(c){var f=r(c,s);return a.push(f),function(){a=a.filter(function(d){return d!==f})}},assignSyncMedium:function(c){for(s=!0;a.length;){var f=a;a=[],f.forEach(c)}a={push:function(d){return c(d)},filter:function(){return a}}},assignMedium:function(c){s=!0;var f=[];if(a.length){var d=a;a=[],d.forEach(c),f=a}var m=function(){var v=f;f=[],v.forEach(c)},p=function(){return Promise.resolve().then(m)};p(),a={push:function(v){f.push(v),p()},filter:function(v){return f=f.filter(v),a}}}};return o}function WO(t){t===void 0&&(t={});var r=KO(null);return r.options=zn({async:!0,ssr:!1},t),r}var TS=function(t){var r=t.sideCar,a=RS(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=r.read();if(!s)throw new Error("Sidecar medium not found");return y.createElement(s,zn({},a))};TS.isSideCarExport=!0;function ZO(t,r){return t.useMedium(r),TS}var CS=WO(),eh=function(){},tu=y.forwardRef(function(t,r){var a=y.useRef(null),s=y.useState({onScrollCapture:eh,onWheelCapture:eh,onTouchMoveCapture:eh}),o=s[0],c=s[1],f=t.forwardProps,d=t.children,m=t.className,p=t.removeScrollBar,v=t.enabled,b=t.shards,x=t.sideCar,E=t.noIsolation,T=t.inert,S=t.allowPinchZoom,w=t.as,C=w===void 0?"div":w,N=t.gapMode,O=RS(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=x,L=QO([a,r]),$=zn(zn({},O),o);return y.createElement(y.Fragment,null,v&&y.createElement(_,{sideCar:CS,removeScrollBar:p,shards:b,noIsolation:E,inert:T,setCallbacks:c,allowPinchZoom:!!S,lockRef:a,gapMode:N}),f?y.cloneElement(y.Children.only(d),zn(zn({},$),{ref:L})):y.createElement(C,zn({},$,{className:m,ref:L}),d))});tu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};tu.classNames={fullWidth:_c,zeroRight:Dc};var JO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function e2(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=JO();return r&&t.setAttribute("nonce",r),t}function t2(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function n2(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var r2=function(){var t=0,r=null;return{add:function(a){t==0&&(r=e2())&&(t2(r,a),n2(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},a2=function(){var t=r2();return function(r,a){y.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&a])}},AS=function(){var t=a2(),r=function(a){var s=a.styles,o=a.dynamic;return t(s,o),null};return r},i2={left:0,top:0,right:0,gap:0},th=function(t){return parseInt(t||"",10)||0},s2=function(t){var r=window.getComputedStyle(document.body),a=r[t==="padding"?"paddingLeft":"marginLeft"],s=r[t==="padding"?"paddingTop":"marginTop"],o=r[t==="padding"?"paddingRight":"marginRight"];return[th(a),th(s),th(o)]},l2=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return i2;var r=s2(t),a=document.documentElement.clientWidth,s=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,s-a+r[2]-r[0])}},o2=AS(),Wi="data-scroll-locked",c2=function(t,r,a,s){var o=t.left,c=t.top,f=t.right,d=t.gap;return a===void 0&&(a="margin"),`
|
|
210
|
+
.`.concat(VO,` {
|
|
211
|
+
overflow: hidden `).concat(s,`;
|
|
212
|
+
padding-right: `).concat(d,"px ").concat(s,`;
|
|
213
|
+
}
|
|
214
|
+
body[`).concat(Wi,`] {
|
|
215
|
+
overflow: hidden `).concat(s,`;
|
|
216
|
+
overscroll-behavior: contain;
|
|
217
|
+
`).concat([r&&"position: relative ".concat(s,";"),a==="margin"&&`
|
|
218
|
+
padding-left: `.concat(o,`px;
|
|
219
|
+
padding-top: `).concat(c,`px;
|
|
220
|
+
padding-right: `).concat(f,`px;
|
|
221
|
+
margin-left:0;
|
|
222
|
+
margin-top:0;
|
|
223
|
+
margin-right: `).concat(d,"px ").concat(s,`;
|
|
224
|
+
`),a==="padding"&&"padding-right: ".concat(d,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.`).concat(Dc,` {
|
|
228
|
+
right: `).concat(d,"px ").concat(s,`;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.`).concat(_c,` {
|
|
232
|
+
margin-right: `).concat(d,"px ").concat(s,`;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.`).concat(Dc," .").concat(Dc,` {
|
|
236
|
+
right: 0 `).concat(s,`;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.`).concat(_c," .").concat(_c,` {
|
|
240
|
+
margin-right: 0 `).concat(s,`;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
body[`).concat(Wi,`] {
|
|
244
|
+
`).concat(YO,": ").concat(d,`px;
|
|
245
|
+
}
|
|
246
|
+
`)},n0=function(){var t=parseInt(document.body.getAttribute(Wi)||"0",10);return isFinite(t)?t:0},u2=function(){y.useEffect(function(){return document.body.setAttribute(Wi,(n0()+1).toString()),function(){var t=n0()-1;t<=0?document.body.removeAttribute(Wi):document.body.setAttribute(Wi,t.toString())}},[])},f2=function(t){var r=t.noRelative,a=t.noImportant,s=t.gapMode,o=s===void 0?"margin":s;u2();var c=y.useMemo(function(){return l2(o)},[o]);return y.createElement(o2,{styles:c2(c,!r,o,a?"":"!important")})},xm=!1;if(typeof window<"u")try{var xc=Object.defineProperty({},"passive",{get:function(){return xm=!0,!0}});window.addEventListener("test",xc,xc),window.removeEventListener("test",xc,xc)}catch{xm=!1}var Bi=xm?{passive:!1}:!1,d2=function(t){return t.tagName==="TEXTAREA"},NS=function(t,r){if(!(t instanceof Element))return!1;var a=window.getComputedStyle(t);return a[r]!=="hidden"&&!(a.overflowY===a.overflowX&&!d2(t)&&a[r]==="visible")},h2=function(t){return NS(t,"overflowY")},m2=function(t){return NS(t,"overflowX")},r0=function(t,r){var a=r.ownerDocument,s=r;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var o=OS(t,s);if(o){var c=MS(t,s),f=c[1],d=c[2];if(f>d)return!0}s=s.parentNode}while(s&&s!==a.body);return!1},p2=function(t){var r=t.scrollTop,a=t.scrollHeight,s=t.clientHeight;return[r,a,s]},g2=function(t){var r=t.scrollLeft,a=t.scrollWidth,s=t.clientWidth;return[r,a,s]},OS=function(t,r){return t==="v"?h2(r):m2(r)},MS=function(t,r){return t==="v"?p2(r):g2(r)},v2=function(t,r){return t==="h"&&r==="rtl"?-1:1},y2=function(t,r,a,s,o){var c=v2(t,window.getComputedStyle(r).direction),f=c*s,d=a.target,m=r.contains(d),p=!1,v=f>0,b=0,x=0;do{var E=MS(t,d),T=E[0],S=E[1],w=E[2],C=S-w-c*T;(T||C)&&OS(t,d)&&(b+=C,x+=T),d instanceof ShadowRoot?d=d.host:d=d.parentNode}while(!m&&d!==document.body||m&&(r.contains(d)||r===d));return(v&&Math.abs(b)<1||!v&&Math.abs(x)<1)&&(p=!0),p},Sc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},a0=function(t){return[t.deltaX,t.deltaY]},i0=function(t){return t&&"current"in t?t.current:t},b2=function(t,r){return t[0]===r[0]&&t[1]===r[1]},x2=function(t){return`
|
|
247
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
248
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
249
|
+
`)},S2=0,Ii=[];function w2(t){var r=y.useRef([]),a=y.useRef([0,0]),s=y.useRef(),o=y.useState(S2++)[0],c=y.useState(AS)[0],f=y.useRef(t);y.useEffect(function(){f.current=t},[t]),y.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var S=IO([t.lockRef.current],(t.shards||[]).map(i0),!0).filter(Boolean);return S.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),S.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var d=y.useCallback(function(S,w){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!f.current.allowPinchZoom;var C=Sc(S),N=a.current,O="deltaX"in S?S.deltaX:N[0]-C[0],_="deltaY"in S?S.deltaY:N[1]-C[1],L,$=S.target,V=Math.abs(O)>Math.abs(_)?"h":"v";if("touches"in S&&V==="h"&&$.type==="range")return!1;var k=r0(V,$);if(!k)return!0;if(k?L=V:(L=V==="v"?"h":"v",k=r0(V,$)),!k)return!1;if(!s.current&&"changedTouches"in S&&(O||_)&&(s.current=L),!L)return!0;var U=s.current||L;return y2(U,w,S,U==="h"?O:_)},[]),m=y.useCallback(function(S){var w=S;if(!(!Ii.length||Ii[Ii.length-1]!==c)){var C="deltaY"in w?a0(w):Sc(w),N=r.current.filter(function(L){return L.name===w.type&&(L.target===w.target||w.target===L.shadowParent)&&b2(L.delta,C)})[0];if(N&&N.should){w.cancelable&&w.preventDefault();return}if(!N){var O=(f.current.shards||[]).map(i0).filter(Boolean).filter(function(L){return L.contains(w.target)}),_=O.length>0?d(w,O[0]):!f.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),p=y.useCallback(function(S,w,C,N){var O={name:S,delta:w,target:C,should:N,shadowParent:E2(C)};r.current.push(O),setTimeout(function(){r.current=r.current.filter(function(_){return _!==O})},1)},[]),v=y.useCallback(function(S){a.current=Sc(S),s.current=void 0},[]),b=y.useCallback(function(S){p(S.type,a0(S),S.target,d(S,t.lockRef.current))},[]),x=y.useCallback(function(S){p(S.type,Sc(S),S.target,d(S,t.lockRef.current))},[]);y.useEffect(function(){return Ii.push(c),t.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:x}),document.addEventListener("wheel",m,Bi),document.addEventListener("touchmove",m,Bi),document.addEventListener("touchstart",v,Bi),function(){Ii=Ii.filter(function(S){return S!==c}),document.removeEventListener("wheel",m,Bi),document.removeEventListener("touchmove",m,Bi),document.removeEventListener("touchstart",v,Bi)}},[]);var E=t.removeScrollBar,T=t.inert;return y.createElement(y.Fragment,null,T?y.createElement(c,{styles:x2(o)}):null,E?y.createElement(f2,{gapMode:t.gapMode}):null)}function E2(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const R2=ZO(CS,w2);var Xm=y.forwardRef(function(t,r){return y.createElement(tu,zn({},t,{ref:r,sideCar:R2}))});Xm.classNames=tu.classNames;var T2=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},Vi=new WeakMap,wc=new WeakMap,Ec={},nh=0,jS=function(t){return t&&(t.host||jS(t.parentNode))},C2=function(t,r){return r.map(function(a){if(t.contains(a))return a;var s=jS(a);return s&&t.contains(s)?s:(console.error("aria-hidden",a,"in not contained inside",t,". Doing nothing"),null)}).filter(function(a){return!!a})},A2=function(t,r,a,s){var o=C2(r,Array.isArray(t)?t:[t]);Ec[a]||(Ec[a]=new WeakMap);var c=Ec[a],f=[],d=new Set,m=new Set(o),p=function(b){!b||d.has(b)||(d.add(b),p(b.parentNode))};o.forEach(p);var v=function(b){!b||m.has(b)||Array.prototype.forEach.call(b.children,function(x){if(d.has(x))v(x);else try{var E=x.getAttribute(s),T=E!==null&&E!=="false",S=(Vi.get(x)||0)+1,w=(c.get(x)||0)+1;Vi.set(x,S),c.set(x,w),f.push(x),S===1&&T&&wc.set(x,!0),w===1&&x.setAttribute(a,"true"),T||x.setAttribute(s,"true")}catch(C){console.error("aria-hidden: cannot operate on ",x,C)}})};return v(r),d.clear(),nh++,function(){f.forEach(function(b){var x=Vi.get(b)-1,E=c.get(b)-1;Vi.set(b,x),c.set(b,E),x||(wc.has(b)||b.removeAttribute(s),wc.delete(b)),E||b.removeAttribute(a)}),nh--,nh||(Vi=new WeakMap,Vi=new WeakMap,wc=new WeakMap,Ec={})}},DS=function(t,r,a){a===void 0&&(a="data-aria-hidden");var s=Array.from(Array.isArray(t)?t:[t]),o=T2(t);return o?(s.push.apply(s,Array.from(o.querySelectorAll("[aria-live]"))),A2(s,o,a,"aria-hidden")):function(){return null}},Km="Dialog",[_S,dz]=Bn(Km),[N2,bn]=_S(Km),LS=t=>{const{__scopeDialog:r,children:a,open:s,defaultOpen:o,onOpenChange:c,modal:f=!0}=t,d=y.useRef(null),m=y.useRef(null),[p=!1,v]=ni({prop:s,defaultProp:o,onChange:c});return g.jsx(N2,{scope:r,triggerRef:d,contentRef:m,contentId:yr(),titleId:yr(),descriptionId:yr(),open:p,onOpenChange:v,onOpenToggle:y.useCallback(()=>v(b=>!b),[v]),modal:f,children:a})};LS.displayName=Km;var zS="DialogTrigger",PS=y.forwardRef((t,r)=>{const{__scopeDialog:a,...s}=t,o=bn(zS,a),c=Ue(r,o.triggerRef);return g.jsx(we.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Jm(o.open),...s,ref:c,onClick:ve(t.onClick,o.onOpenToggle)})});PS.displayName=zS;var Wm="DialogPortal",[O2,US]=_S(Wm,{forceMount:void 0}),kS=t=>{const{__scopeDialog:r,forceMount:a,children:s,container:o}=t,c=bn(Wm,r);return g.jsx(O2,{scope:r,forceMount:a,children:y.Children.map(s,f=>g.jsx(ln,{present:a||c.open,children:g.jsx(Xl,{asChild:!0,container:o,children:f})}))})};kS.displayName=Wm;var Vc="DialogOverlay",HS=y.forwardRef((t,r)=>{const a=US(Vc,t.__scopeDialog),{forceMount:s=a.forceMount,...o}=t,c=bn(Vc,t.__scopeDialog);return c.modal?g.jsx(ln,{present:s||c.open,children:g.jsx(M2,{...o,ref:r})}):null});HS.displayName=Vc;var M2=y.forwardRef((t,r)=>{const{__scopeDialog:a,...s}=t,o=bn(Vc,a);return g.jsx(Xm,{as:sn,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(we.div,{"data-state":Jm(o.open),...s,ref:r,style:{pointerEvents:"auto",...s.style}})})}),ri="DialogContent",$S=y.forwardRef((t,r)=>{const a=US(ri,t.__scopeDialog),{forceMount:s=a.forceMount,...o}=t,c=bn(ri,t.__scopeDialog);return g.jsx(ln,{present:s||c.open,children:c.modal?g.jsx(j2,{...o,ref:r}):g.jsx(D2,{...o,ref:r})})});$S.displayName=ri;var j2=y.forwardRef((t,r)=>{const a=bn(ri,t.__scopeDialog),s=y.useRef(null),o=Ue(r,a.contentRef,s);return y.useEffect(()=>{const c=s.current;if(c)return DS(c)},[]),g.jsx(qS,{...t,ref:o,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ve(t.onCloseAutoFocus,c=>{var f;c.preventDefault(),(f=a.triggerRef.current)==null||f.focus()}),onPointerDownOutside:ve(t.onPointerDownOutside,c=>{const f=c.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0;(f.button===2||d)&&c.preventDefault()}),onFocusOutside:ve(t.onFocusOutside,c=>c.preventDefault())})}),D2=y.forwardRef((t,r)=>{const a=bn(ri,t.__scopeDialog),s=y.useRef(!1),o=y.useRef(!1);return g.jsx(qS,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var f,d;(f=t.onCloseAutoFocus)==null||f.call(t,c),c.defaultPrevented||(s.current||(d=a.triggerRef.current)==null||d.focus(),c.preventDefault()),s.current=!1,o.current=!1},onInteractOutside:c=>{var m,p;(m=t.onInteractOutside)==null||m.call(t,c),c.defaultPrevented||(s.current=!0,c.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const f=c.target;((p=a.triggerRef.current)==null?void 0:p.contains(f))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&o.current&&c.preventDefault()}})}),qS=y.forwardRef((t,r)=>{const{__scopeDialog:a,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:c,...f}=t,d=bn(ri,a),m=y.useRef(null),p=Ue(r,m);return ES(),g.jsxs(g.Fragment,{children:[g.jsx(Qm,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:o,onUnmountAutoFocus:c,children:g.jsx(Ql,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Jm(d.open),...f,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(_2,{titleId:d.titleId}),g.jsx(z2,{contentRef:m,descriptionId:d.descriptionId})]})]})}),Zm="DialogTitle",BS=y.forwardRef((t,r)=>{const{__scopeDialog:a,...s}=t,o=bn(Zm,a);return g.jsx(we.h2,{id:o.titleId,...s,ref:r})});BS.displayName=Zm;var IS="DialogDescription",VS=y.forwardRef((t,r)=>{const{__scopeDialog:a,...s}=t,o=bn(IS,a);return g.jsx(we.p,{id:o.descriptionId,...s,ref:r})});VS.displayName=IS;var YS="DialogClose",GS=y.forwardRef((t,r)=>{const{__scopeDialog:a,...s}=t,o=bn(YS,a);return g.jsx(we.button,{type:"button",...s,ref:r,onClick:ve(t.onClick,()=>o.onOpenChange(!1))})});GS.displayName=YS;function Jm(t){return t?"open":"closed"}var FS="DialogTitleWarning",[hz,QS]=yO(FS,{contentName:ri,titleName:Zm,docsSlug:"dialog"}),_2=({titleId:t})=>{const r=QS(FS),a=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
250
|
+
|
|
251
|
+
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
252
|
+
|
|
253
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return y.useEffect(()=>{t&&(document.getElementById(t)||console.error(a))},[a,t]),null},L2="DialogDescriptionWarning",z2=({contentRef:t,descriptionId:r})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${QS(L2).contentName}}.`;return y.useEffect(()=>{var c;const o=(c=t.current)==null?void 0:c.getAttribute("aria-describedby");r&&o&&(document.getElementById(r)||console.warn(s))},[s,t,r]),null},XS=LS,P2=PS,KS=kS,nu=HS,ru=$S,au=BS,iu=VS,WS=GS;const U2=XS,k2=KS,ZS=y.forwardRef(({className:t,...r},a)=>g.jsx(nu,{className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r,ref:a}));ZS.displayName=nu.displayName;const H2=ma("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),JS=y.forwardRef(({side:t="right",className:r,children:a,...s},o)=>g.jsxs(k2,{children:[g.jsx(ZS,{}),g.jsxs(ru,{ref:o,className:le(H2({side:t}),r),...s,children:[g.jsxs(WS,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[g.jsx(bs,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));JS.displayName=ru.displayName;const $2=y.forwardRef(({className:t,...r},a)=>g.jsx(au,{ref:a,className:le("text-lg font-semibold text-foreground",t),...r}));$2.displayName=au.displayName;const q2=y.forwardRef(({className:t,...r},a)=>g.jsx(iu,{ref:a,className:le("text-sm text-muted-foreground",t),...r}));q2.displayName=iu.displayName;function s0({className:t,...r}){return g.jsx("div",{className:le("animate-pulse rounded-md bg-primary/10",t),...r})}const B2=["top","right","bottom","left"],ua=Math.min,Bt=Math.max,Yc=Math.round,Rc=Math.floor,Pn=t=>({x:t,y:t}),I2={left:"right",right:"left",bottom:"top",top:"bottom"},V2={start:"end",end:"start"};function Sm(t,r,a){return Bt(t,ua(r,a))}function Er(t,r){return typeof t=="function"?t(r):t}function Rr(t){return t.split("-")[0]}function ws(t){return t.split("-")[1]}function ep(t){return t==="x"?"y":"x"}function tp(t){return t==="y"?"height":"width"}function fa(t){return["top","bottom"].includes(Rr(t))?"y":"x"}function np(t){return ep(fa(t))}function Y2(t,r,a){a===void 0&&(a=!1);const s=ws(t),o=np(t),c=tp(o);let f=o==="x"?s===(a?"end":"start")?"right":"left":s==="start"?"bottom":"top";return r.reference[c]>r.floating[c]&&(f=Gc(f)),[f,Gc(f)]}function G2(t){const r=Gc(t);return[wm(t),r,wm(r)]}function wm(t){return t.replace(/start|end/g,r=>V2[r])}function F2(t,r,a){const s=["left","right"],o=["right","left"],c=["top","bottom"],f=["bottom","top"];switch(t){case"top":case"bottom":return a?r?o:s:r?s:o;case"left":case"right":return r?c:f;default:return[]}}function Q2(t,r,a,s){const o=ws(t);let c=F2(Rr(t),a==="start",s);return o&&(c=c.map(f=>f+"-"+o),r&&(c=c.concat(c.map(wm)))),c}function Gc(t){return t.replace(/left|right|bottom|top/g,r=>I2[r])}function X2(t){return{top:0,right:0,bottom:0,left:0,...t}}function ew(t){return typeof t!="number"?X2(t):{top:t,right:t,bottom:t,left:t}}function Fc(t){const{x:r,y:a,width:s,height:o}=t;return{width:s,height:o,top:a,left:r,right:r+s,bottom:a+o,x:r,y:a}}function l0(t,r,a){let{reference:s,floating:o}=t;const c=fa(r),f=np(r),d=tp(f),m=Rr(r),p=c==="y",v=s.x+s.width/2-o.width/2,b=s.y+s.height/2-o.height/2,x=s[d]/2-o[d]/2;let E;switch(m){case"top":E={x:v,y:s.y-o.height};break;case"bottom":E={x:v,y:s.y+s.height};break;case"right":E={x:s.x+s.width,y:b};break;case"left":E={x:s.x-o.width,y:b};break;default:E={x:s.x,y:s.y}}switch(ws(r)){case"start":E[f]-=x*(a&&p?-1:1);break;case"end":E[f]+=x*(a&&p?-1:1);break}return E}const K2=async(t,r,a)=>{const{placement:s="bottom",strategy:o="absolute",middleware:c=[],platform:f}=a,d=c.filter(Boolean),m=await(f.isRTL==null?void 0:f.isRTL(r));let p=await f.getElementRects({reference:t,floating:r,strategy:o}),{x:v,y:b}=l0(p,s,m),x=s,E={},T=0;for(let S=0;S<d.length;S++){const{name:w,fn:C}=d[S],{x:N,y:O,data:_,reset:L}=await C({x:v,y:b,initialPlacement:s,placement:x,strategy:o,middlewareData:E,rects:p,platform:f,elements:{reference:t,floating:r}});v=N??v,b=O??b,E={...E,[w]:{...E[w],..._}},L&&T<=50&&(T++,typeof L=="object"&&(L.placement&&(x=L.placement),L.rects&&(p=L.rects===!0?await f.getElementRects({reference:t,floating:r,strategy:o}):L.rects),{x:v,y:b}=l0(p,x,m)),S=-1)}return{x:v,y:b,placement:x,strategy:o,middlewareData:E}};async function kl(t,r){var a;r===void 0&&(r={});const{x:s,y:o,platform:c,rects:f,elements:d,strategy:m}=t,{boundary:p="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:x=!1,padding:E=0}=Er(r,t),T=ew(E),w=d[x?b==="floating"?"reference":"floating":b],C=Fc(await c.getClippingRect({element:(a=await(c.isElement==null?void 0:c.isElement(w)))==null||a?w:w.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(d.floating)),boundary:p,rootBoundary:v,strategy:m})),N=b==="floating"?{x:s,y:o,width:f.floating.width,height:f.floating.height}:f.reference,O=await(c.getOffsetParent==null?void 0:c.getOffsetParent(d.floating)),_=await(c.isElement==null?void 0:c.isElement(O))?await(c.getScale==null?void 0:c.getScale(O))||{x:1,y:1}:{x:1,y:1},L=Fc(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:N,offsetParent:O,strategy:m}):N);return{top:(C.top-L.top+T.top)/_.y,bottom:(L.bottom-C.bottom+T.bottom)/_.y,left:(C.left-L.left+T.left)/_.x,right:(L.right-C.right+T.right)/_.x}}const W2=t=>({name:"arrow",options:t,async fn(r){const{x:a,y:s,placement:o,rects:c,platform:f,elements:d,middlewareData:m}=r,{element:p,padding:v=0}=Er(t,r)||{};if(p==null)return{};const b=ew(v),x={x:a,y:s},E=np(o),T=tp(E),S=await f.getDimensions(p),w=E==="y",C=w?"top":"left",N=w?"bottom":"right",O=w?"clientHeight":"clientWidth",_=c.reference[T]+c.reference[E]-x[E]-c.floating[T],L=x[E]-c.reference[E],$=await(f.getOffsetParent==null?void 0:f.getOffsetParent(p));let V=$?$[O]:0;(!V||!await(f.isElement==null?void 0:f.isElement($)))&&(V=d.floating[O]||c.floating[T]);const k=_/2-L/2,U=V/2-S[T]/2-1,K=ua(b[C],U),te=ua(b[N],U),se=K,de=V-S[T]-te,q=V/2-S[T]/2+k,H=Sm(se,q,de),j=!m.arrow&&ws(o)!=null&&q!==H&&c.reference[T]/2-(q<se?K:te)-S[T]/2<0,B=j?q<se?q-se:q-de:0;return{[E]:x[E]+B,data:{[E]:H,centerOffset:q-H-B,...j&&{alignmentOffset:B}},reset:j}}}),Z2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var a,s;const{placement:o,middlewareData:c,rects:f,initialPlacement:d,platform:m,elements:p}=r,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:x,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:S=!0,...w}=Er(t,r);if((a=c.arrow)!=null&&a.alignmentOffset)return{};const C=Rr(o),N=fa(d),O=Rr(d)===d,_=await(m.isRTL==null?void 0:m.isRTL(p.floating)),L=x||(O||!S?[Gc(d)]:G2(d)),$=T!=="none";!x&&$&&L.push(...Q2(d,S,T,_));const V=[d,...L],k=await kl(r,w),U=[];let K=((s=c.flip)==null?void 0:s.overflows)||[];if(v&&U.push(k[C]),b){const q=Y2(o,f,_);U.push(k[q[0]],k[q[1]])}if(K=[...K,{placement:o,overflows:U}],!U.every(q=>q<=0)){var te,se;const q=(((te=c.flip)==null?void 0:te.index)||0)+1,H=V[q];if(H)return{data:{index:q,overflows:K},reset:{placement:H}};let j=(se=K.filter(B=>B.overflows[0]<=0).sort((B,z)=>B.overflows[1]-z.overflows[1])[0])==null?void 0:se.placement;if(!j)switch(E){case"bestFit":{var de;const B=(de=K.filter(z=>{if($){const Q=fa(z.placement);return Q===N||Q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(Q=>Q>0).reduce((Q,M)=>Q+M,0)]).sort((z,Q)=>z[1]-Q[1])[0])==null?void 0:de[0];B&&(j=B);break}case"initialPlacement":j=d;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function o0(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function c0(t){return B2.some(r=>t[r]>=0)}const J2=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:a}=r,{strategy:s="referenceHidden",...o}=Er(t,r);switch(s){case"referenceHidden":{const c=await kl(r,{...o,elementContext:"reference"}),f=o0(c,a.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:c0(f)}}}case"escaped":{const c=await kl(r,{...o,altBoundary:!0}),f=o0(c,a.floating);return{data:{escapedOffsets:f,escaped:c0(f)}}}default:return{}}}}};async function eM(t,r){const{placement:a,platform:s,elements:o}=t,c=await(s.isRTL==null?void 0:s.isRTL(o.floating)),f=Rr(a),d=ws(a),m=fa(a)==="y",p=["left","top"].includes(f)?-1:1,v=c&&m?-1:1,b=Er(r,t);let{mainAxis:x,crossAxis:E,alignmentAxis:T}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return d&&typeof T=="number"&&(E=d==="end"?T*-1:T),m?{x:E*v,y:x*p}:{x:x*p,y:E*v}}const tM=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var a,s;const{x:o,y:c,placement:f,middlewareData:d}=r,m=await eM(r,t);return f===((a=d.offset)==null?void 0:a.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:o+m.x,y:c+m.y,data:{...m,placement:f}}}}},nM=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:a,y:s,placement:o}=r,{mainAxis:c=!0,crossAxis:f=!1,limiter:d={fn:w=>{let{x:C,y:N}=w;return{x:C,y:N}}},...m}=Er(t,r),p={x:a,y:s},v=await kl(r,m),b=fa(Rr(o)),x=ep(b);let E=p[x],T=p[b];if(c){const w=x==="y"?"top":"left",C=x==="y"?"bottom":"right",N=E+v[w],O=E-v[C];E=Sm(N,E,O)}if(f){const w=b==="y"?"top":"left",C=b==="y"?"bottom":"right",N=T+v[w],O=T-v[C];T=Sm(N,T,O)}const S=d.fn({...r,[x]:E,[b]:T});return{...S,data:{x:S.x-a,y:S.y-s,enabled:{[x]:c,[b]:f}}}}}},rM=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:a,y:s,placement:o,rects:c,middlewareData:f}=r,{offset:d=0,mainAxis:m=!0,crossAxis:p=!0}=Er(t,r),v={x:a,y:s},b=fa(o),x=ep(b);let E=v[x],T=v[b];const S=Er(d,r),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(m){const O=x==="y"?"height":"width",_=c.reference[x]-c.floating[O]+w.mainAxis,L=c.reference[x]+c.reference[O]-w.mainAxis;E<_?E=_:E>L&&(E=L)}if(p){var C,N;const O=x==="y"?"width":"height",_=["top","left"].includes(Rr(o)),L=c.reference[b]-c.floating[O]+(_&&((C=f.offset)==null?void 0:C[b])||0)+(_?0:w.crossAxis),$=c.reference[b]+c.reference[O]+(_?0:((N=f.offset)==null?void 0:N[b])||0)-(_?w.crossAxis:0);T<L?T=L:T>$&&(T=$)}return{[x]:E,[b]:T}}}},aM=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var a,s;const{placement:o,rects:c,platform:f,elements:d}=r,{apply:m=()=>{},...p}=Er(t,r),v=await kl(r,p),b=Rr(o),x=ws(o),E=fa(o)==="y",{width:T,height:S}=c.floating;let w,C;b==="top"||b==="bottom"?(w=b,C=x===(await(f.isRTL==null?void 0:f.isRTL(d.floating))?"start":"end")?"left":"right"):(C=b,w=x==="end"?"top":"bottom");const N=S-v.top-v.bottom,O=T-v.left-v.right,_=ua(S-v[w],N),L=ua(T-v[C],O),$=!r.middlewareData.shift;let V=_,k=L;if((a=r.middlewareData.shift)!=null&&a.enabled.x&&(k=O),(s=r.middlewareData.shift)!=null&&s.enabled.y&&(V=N),$&&!x){const K=Bt(v.left,0),te=Bt(v.right,0),se=Bt(v.top,0),de=Bt(v.bottom,0);E?k=T-2*(K!==0||te!==0?K+te:Bt(v.left,v.right)):V=S-2*(se!==0||de!==0?se+de:Bt(v.top,v.bottom))}await m({...r,availableWidth:k,availableHeight:V});const U=await f.getDimensions(d.floating);return T!==U.width||S!==U.height?{reset:{rects:!0}}:{}}}};function su(){return typeof window<"u"}function Es(t){return tw(t)?(t.nodeName||"").toLowerCase():"#document"}function It(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function In(t){var r;return(r=(tw(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function tw(t){return su()?t instanceof Node||t instanceof It(t).Node:!1}function vn(t){return su()?t instanceof Element||t instanceof It(t).Element:!1}function Hn(t){return su()?t instanceof HTMLElement||t instanceof It(t).HTMLElement:!1}function u0(t){return!su()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof It(t).ShadowRoot}function Kl(t){const{overflow:r,overflowX:a,overflowY:s,display:o}=yn(t);return/auto|scroll|overlay|hidden|clip/.test(r+s+a)&&!["inline","contents"].includes(o)}function iM(t){return["table","td","th"].includes(Es(t))}function lu(t){return[":popover-open",":modal"].some(r=>{try{return t.matches(r)}catch{return!1}})}function rp(t){const r=ap(),a=vn(t)?yn(t):t;return["transform","translate","scale","rotate","perspective"].some(s=>a[s]?a[s]!=="none":!1)||(a.containerType?a.containerType!=="normal":!1)||!r&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!r&&(a.filter?a.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(s=>(a.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(a.contain||"").includes(s))}function sM(t){let r=da(t);for(;Hn(r)&&!hs(r);){if(rp(r))return r;if(lu(r))return null;r=da(r)}return null}function ap(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function hs(t){return["html","body","#document"].includes(Es(t))}function yn(t){return It(t).getComputedStyle(t)}function ou(t){return vn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function da(t){if(Es(t)==="html")return t;const r=t.assignedSlot||t.parentNode||u0(t)&&t.host||In(t);return u0(r)?r.host:r}function nw(t){const r=da(t);return hs(r)?t.ownerDocument?t.ownerDocument.body:t.body:Hn(r)&&Kl(r)?r:nw(r)}function Hl(t,r,a){var s;r===void 0&&(r=[]),a===void 0&&(a=!0);const o=nw(t),c=o===((s=t.ownerDocument)==null?void 0:s.body),f=It(o);if(c){const d=Em(f);return r.concat(f,f.visualViewport||[],Kl(o)?o:[],d&&a?Hl(d):[])}return r.concat(o,Hl(o,[],a))}function Em(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function rw(t){const r=yn(t);let a=parseFloat(r.width)||0,s=parseFloat(r.height)||0;const o=Hn(t),c=o?t.offsetWidth:a,f=o?t.offsetHeight:s,d=Yc(a)!==c||Yc(s)!==f;return d&&(a=c,s=f),{width:a,height:s,$:d}}function ip(t){return vn(t)?t:t.contextElement}function Zi(t){const r=ip(t);if(!Hn(r))return Pn(1);const a=r.getBoundingClientRect(),{width:s,height:o,$:c}=rw(r);let f=(c?Yc(a.width):a.width)/s,d=(c?Yc(a.height):a.height)/o;return(!f||!Number.isFinite(f))&&(f=1),(!d||!Number.isFinite(d))&&(d=1),{x:f,y:d}}const lM=Pn(0);function aw(t){const r=It(t);return!ap()||!r.visualViewport?lM:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function oM(t,r,a){return r===void 0&&(r=!1),!a||r&&a!==It(t)?!1:r}function ai(t,r,a,s){r===void 0&&(r=!1),a===void 0&&(a=!1);const o=t.getBoundingClientRect(),c=ip(t);let f=Pn(1);r&&(s?vn(s)&&(f=Zi(s)):f=Zi(t));const d=oM(c,a,s)?aw(c):Pn(0);let m=(o.left+d.x)/f.x,p=(o.top+d.y)/f.y,v=o.width/f.x,b=o.height/f.y;if(c){const x=It(c),E=s&&vn(s)?It(s):s;let T=x,S=Em(T);for(;S&&s&&E!==T;){const w=Zi(S),C=S.getBoundingClientRect(),N=yn(S),O=C.left+(S.clientLeft+parseFloat(N.paddingLeft))*w.x,_=C.top+(S.clientTop+parseFloat(N.paddingTop))*w.y;m*=w.x,p*=w.y,v*=w.x,b*=w.y,m+=O,p+=_,T=It(S),S=Em(T)}}return Fc({width:v,height:b,x:m,y:p})}function sp(t,r){const a=ou(t).scrollLeft;return r?r.left+a:ai(In(t)).left+a}function iw(t,r,a){a===void 0&&(a=!1);const s=t.getBoundingClientRect(),o=s.left+r.scrollLeft-(a?0:sp(t,s)),c=s.top+r.scrollTop;return{x:o,y:c}}function cM(t){let{elements:r,rect:a,offsetParent:s,strategy:o}=t;const c=o==="fixed",f=In(s),d=r?lu(r.floating):!1;if(s===f||d&&c)return a;let m={scrollLeft:0,scrollTop:0},p=Pn(1);const v=Pn(0),b=Hn(s);if((b||!b&&!c)&&((Es(s)!=="body"||Kl(f))&&(m=ou(s)),Hn(s))){const E=ai(s);p=Zi(s),v.x=E.x+s.clientLeft,v.y=E.y+s.clientTop}const x=f&&!b&&!c?iw(f,m,!0):Pn(0);return{width:a.width*p.x,height:a.height*p.y,x:a.x*p.x-m.scrollLeft*p.x+v.x+x.x,y:a.y*p.y-m.scrollTop*p.y+v.y+x.y}}function uM(t){return Array.from(t.getClientRects())}function fM(t){const r=In(t),a=ou(t),s=t.ownerDocument.body,o=Bt(r.scrollWidth,r.clientWidth,s.scrollWidth,s.clientWidth),c=Bt(r.scrollHeight,r.clientHeight,s.scrollHeight,s.clientHeight);let f=-a.scrollLeft+sp(t);const d=-a.scrollTop;return yn(s).direction==="rtl"&&(f+=Bt(r.clientWidth,s.clientWidth)-o),{width:o,height:c,x:f,y:d}}function dM(t,r){const a=It(t),s=In(t),o=a.visualViewport;let c=s.clientWidth,f=s.clientHeight,d=0,m=0;if(o){c=o.width,f=o.height;const p=ap();(!p||p&&r==="fixed")&&(d=o.offsetLeft,m=o.offsetTop)}return{width:c,height:f,x:d,y:m}}function hM(t,r){const a=ai(t,!0,r==="fixed"),s=a.top+t.clientTop,o=a.left+t.clientLeft,c=Hn(t)?Zi(t):Pn(1),f=t.clientWidth*c.x,d=t.clientHeight*c.y,m=o*c.x,p=s*c.y;return{width:f,height:d,x:m,y:p}}function f0(t,r,a){let s;if(r==="viewport")s=dM(t,a);else if(r==="document")s=fM(In(t));else if(vn(r))s=hM(r,a);else{const o=aw(t);s={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return Fc(s)}function sw(t,r){const a=da(t);return a===r||!vn(a)||hs(a)?!1:yn(a).position==="fixed"||sw(a,r)}function mM(t,r){const a=r.get(t);if(a)return a;let s=Hl(t,[],!1).filter(d=>vn(d)&&Es(d)!=="body"),o=null;const c=yn(t).position==="fixed";let f=c?da(t):t;for(;vn(f)&&!hs(f);){const d=yn(f),m=rp(f);!m&&d.position==="fixed"&&(o=null),(c?!m&&!o:!m&&d.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Kl(f)&&!m&&sw(t,f))?s=s.filter(v=>v!==f):o=d,f=da(f)}return r.set(t,s),s}function pM(t){let{element:r,boundary:a,rootBoundary:s,strategy:o}=t;const f=[...a==="clippingAncestors"?lu(r)?[]:mM(r,this._c):[].concat(a),s],d=f[0],m=f.reduce((p,v)=>{const b=f0(r,v,o);return p.top=Bt(b.top,p.top),p.right=ua(b.right,p.right),p.bottom=ua(b.bottom,p.bottom),p.left=Bt(b.left,p.left),p},f0(r,d,o));return{width:m.right-m.left,height:m.bottom-m.top,x:m.left,y:m.top}}function gM(t){const{width:r,height:a}=rw(t);return{width:r,height:a}}function vM(t,r,a){const s=Hn(r),o=In(r),c=a==="fixed",f=ai(t,!0,c,r);let d={scrollLeft:0,scrollTop:0};const m=Pn(0);if(s||!s&&!c)if((Es(r)!=="body"||Kl(o))&&(d=ou(r)),s){const x=ai(r,!0,c,r);m.x=x.x+r.clientLeft,m.y=x.y+r.clientTop}else o&&(m.x=sp(o));const p=o&&!s&&!c?iw(o,d):Pn(0),v=f.left+d.scrollLeft-m.x-p.x,b=f.top+d.scrollTop-m.y-p.y;return{x:v,y:b,width:f.width,height:f.height}}function rh(t){return yn(t).position==="static"}function d0(t,r){if(!Hn(t)||yn(t).position==="fixed")return null;if(r)return r(t);let a=t.offsetParent;return In(t)===a&&(a=a.ownerDocument.body),a}function lw(t,r){const a=It(t);if(lu(t))return a;if(!Hn(t)){let o=da(t);for(;o&&!hs(o);){if(vn(o)&&!rh(o))return o;o=da(o)}return a}let s=d0(t,r);for(;s&&iM(s)&&rh(s);)s=d0(s,r);return s&&hs(s)&&rh(s)&&!rp(s)?a:s||sM(t)||a}const yM=async function(t){const r=this.getOffsetParent||lw,a=this.getDimensions,s=await a(t.floating);return{reference:vM(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function bM(t){return yn(t).direction==="rtl"}const xM={convertOffsetParentRelativeRectToViewportRelativeRect:cM,getDocumentElement:In,getClippingRect:pM,getOffsetParent:lw,getElementRects:yM,getClientRects:uM,getDimensions:gM,getScale:Zi,isElement:vn,isRTL:bM};function ow(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function SM(t,r){let a=null,s;const o=In(t);function c(){var d;clearTimeout(s),(d=a)==null||d.disconnect(),a=null}function f(d,m){d===void 0&&(d=!1),m===void 0&&(m=1),c();const p=t.getBoundingClientRect(),{left:v,top:b,width:x,height:E}=p;if(d||r(),!x||!E)return;const T=Rc(b),S=Rc(o.clientWidth-(v+x)),w=Rc(o.clientHeight-(b+E)),C=Rc(v),O={rootMargin:-T+"px "+-S+"px "+-w+"px "+-C+"px",threshold:Bt(0,ua(1,m))||1};let _=!0;function L($){const V=$[0].intersectionRatio;if(V!==m){if(!_)return f();V?f(!1,V):s=setTimeout(()=>{f(!1,1e-7)},1e3)}V===1&&!ow(p,t.getBoundingClientRect())&&f(),_=!1}try{a=new IntersectionObserver(L,{...O,root:o.ownerDocument})}catch{a=new IntersectionObserver(L,O)}a.observe(t)}return f(!0),c}function wM(t,r,a,s){s===void 0&&(s={});const{ancestorScroll:o=!0,ancestorResize:c=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:m=!1}=s,p=ip(t),v=o||c?[...p?Hl(p):[],...Hl(r)]:[];v.forEach(C=>{o&&C.addEventListener("scroll",a,{passive:!0}),c&&C.addEventListener("resize",a)});const b=p&&d?SM(p,a):null;let x=-1,E=null;f&&(E=new ResizeObserver(C=>{let[N]=C;N&&N.target===p&&E&&(E.unobserve(r),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var O;(O=E)==null||O.observe(r)})),a()}),p&&!m&&E.observe(p),E.observe(r));let T,S=m?ai(t):null;m&&w();function w(){const C=ai(t);S&&!ow(S,C)&&a(),S=C,T=requestAnimationFrame(w)}return a(),()=>{var C;v.forEach(N=>{o&&N.removeEventListener("scroll",a),c&&N.removeEventListener("resize",a)}),b==null||b(),(C=E)==null||C.disconnect(),E=null,m&&cancelAnimationFrame(T)}}const EM=tM,RM=nM,TM=Z2,CM=aM,AM=J2,h0=W2,NM=rM,OM=(t,r,a)=>{const s=new Map,o={platform:xM,...a},c={...o.platform,_c:s};return K2(t,r,{...o,platform:c})};var Lc=typeof document<"u"?y.useLayoutEffect:y.useEffect;function Qc(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let a,s,o;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(a=t.length,a!==r.length)return!1;for(s=a;s--!==0;)if(!Qc(t[s],r[s]))return!1;return!0}if(o=Object.keys(t),a=o.length,a!==Object.keys(r).length)return!1;for(s=a;s--!==0;)if(!{}.hasOwnProperty.call(r,o[s]))return!1;for(s=a;s--!==0;){const c=o[s];if(!(c==="_owner"&&t.$$typeof)&&!Qc(t[c],r[c]))return!1}return!0}return t!==t&&r!==r}function cw(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function m0(t,r){const a=cw(t);return Math.round(r*a)/a}function ah(t){const r=y.useRef(t);return Lc(()=>{r.current=t}),r}function MM(t){t===void 0&&(t={});const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:o,elements:{reference:c,floating:f}={},transform:d=!0,whileElementsMounted:m,open:p}=t,[v,b]=y.useState({x:0,y:0,strategy:a,placement:r,middlewareData:{},isPositioned:!1}),[x,E]=y.useState(s);Qc(x,s)||E(s);const[T,S]=y.useState(null),[w,C]=y.useState(null),N=y.useCallback(z=>{z!==$.current&&($.current=z,S(z))},[]),O=y.useCallback(z=>{z!==V.current&&(V.current=z,C(z))},[]),_=c||T,L=f||w,$=y.useRef(null),V=y.useRef(null),k=y.useRef(v),U=m!=null,K=ah(m),te=ah(o),se=ah(p),de=y.useCallback(()=>{if(!$.current||!V.current)return;const z={placement:r,strategy:a,middleware:x};te.current&&(z.platform=te.current),OM($.current,V.current,z).then(Q=>{const M={...Q,isPositioned:se.current!==!1};q.current&&!Qc(k.current,M)&&(k.current=M,Ss.flushSync(()=>{b(M)}))})},[x,r,a,te,se]);Lc(()=>{p===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,b(z=>({...z,isPositioned:!1})))},[p]);const q=y.useRef(!1);Lc(()=>(q.current=!0,()=>{q.current=!1}),[]),Lc(()=>{if(_&&($.current=_),L&&(V.current=L),_&&L){if(K.current)return K.current(_,L,de);de()}},[_,L,de,K,U]);const H=y.useMemo(()=>({reference:$,floating:V,setReference:N,setFloating:O}),[N,O]),j=y.useMemo(()=>({reference:_,floating:L}),[_,L]),B=y.useMemo(()=>{const z={position:a,left:0,top:0};if(!j.floating)return z;const Q=m0(j.floating,v.x),M=m0(j.floating,v.y);return d?{...z,transform:"translate("+Q+"px, "+M+"px)",...cw(j.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:Q,top:M}},[a,d,j.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:de,refs:H,elements:j,floatingStyles:B}),[v,de,H,j,B])}const jM=t=>{function r(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:t,fn(a){const{element:s,padding:o}=typeof t=="function"?t(a):t;return s&&r(s)?s.current!=null?h0({element:s.current,padding:o}).fn(a):{}:s?h0({element:s,padding:o}).fn(a):{}}}},DM=(t,r)=>({...EM(t),options:[t,r]}),_M=(t,r)=>({...RM(t),options:[t,r]}),LM=(t,r)=>({...NM(t),options:[t,r]}),zM=(t,r)=>({...TM(t),options:[t,r]}),PM=(t,r)=>({...CM(t),options:[t,r]}),UM=(t,r)=>({...AM(t),options:[t,r]}),kM=(t,r)=>({...jM(t),options:[t,r]});var HM="Arrow",uw=y.forwardRef((t,r)=>{const{children:a,width:s=10,height:o=5,...c}=t;return g.jsx(we.svg,{...c,ref:r,width:s,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?a:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});uw.displayName=HM;var $M=uw;function qM(t){const[r,a]=y.useState(void 0);return ft(()=>{if(t){a({width:t.offsetWidth,height:t.offsetHeight});const s=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const c=o[0];let f,d;if("borderBoxSize"in c){const m=c.borderBoxSize,p=Array.isArray(m)?m[0]:m;f=p.inlineSize,d=p.blockSize}else f=t.offsetWidth,d=t.offsetHeight;a({width:f,height:d})});return s.observe(t,{box:"border-box"}),()=>s.unobserve(t)}else a(void 0)},[t]),r}var lp="Popper",[fw,cu]=Bn(lp),[BM,dw]=fw(lp),hw=t=>{const{__scopePopper:r,children:a}=t,[s,o]=y.useState(null);return g.jsx(BM,{scope:r,anchor:s,onAnchorChange:o,children:a})};hw.displayName=lp;var mw="PopperAnchor",pw=y.forwardRef((t,r)=>{const{__scopePopper:a,virtualRef:s,...o}=t,c=dw(mw,a),f=y.useRef(null),d=Ue(r,f);return y.useEffect(()=>{c.onAnchorChange((s==null?void 0:s.current)||f.current)}),s?null:g.jsx(we.div,{...o,ref:d})});pw.displayName=mw;var op="PopperContent",[IM,VM]=fw(op),gw=y.forwardRef((t,r)=>{var ue,me,Ee,fe,Se,Ae;const{__scopePopper:a,side:s="bottom",sideOffset:o=0,align:c="center",alignOffset:f=0,arrowPadding:d=0,avoidCollisions:m=!0,collisionBoundary:p=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:x=!1,updatePositionStrategy:E="optimized",onPlaced:T,...S}=t,w=dw(op,a),[C,N]=y.useState(null),O=Ue(r,Ie=>N(Ie)),[_,L]=y.useState(null),$=qM(_),V=($==null?void 0:$.width)??0,k=($==null?void 0:$.height)??0,U=s+(c!=="center"?"-"+c:""),K=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},te=Array.isArray(p)?p:[p],se=te.length>0,de={padding:K,boundary:te.filter(GM),altBoundary:se},{refs:q,floatingStyles:H,placement:j,isPositioned:B,middlewareData:z}=MM({strategy:"fixed",placement:U,whileElementsMounted:(...Ie)=>wM(...Ie,{animationFrame:E==="always"}),elements:{reference:w.anchor},middleware:[DM({mainAxis:o+k,alignmentAxis:f}),m&&_M({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?LM():void 0,...de}),m&&zM({...de}),PM({...de,apply:({elements:Ie,rects:Et,availableWidth:Rn,availableHeight:Vt})=>{const{width:Fn,height:si}=Et.reference,Cr=Ie.floating.style;Cr.setProperty("--radix-popper-available-width",`${Rn}px`),Cr.setProperty("--radix-popper-available-height",`${Vt}px`),Cr.setProperty("--radix-popper-anchor-width",`${Fn}px`),Cr.setProperty("--radix-popper-anchor-height",`${si}px`)}}),_&&kM({element:_,padding:d}),FM({arrowWidth:V,arrowHeight:k}),x&&UM({strategy:"referenceHidden",...de})]}),[Q,M]=bw(j),G=nt(T);ft(()=>{B&&(G==null||G())},[B,G]);const ee=(ue=z.arrow)==null?void 0:ue.x,ae=(me=z.arrow)==null?void 0:me.y,re=((Ee=z.arrow)==null?void 0:Ee.centerOffset)!==0,[oe,pe]=y.useState();return ft(()=>{C&&pe(window.getComputedStyle(C).zIndex)},[C]),g.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:B?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(fe=z.transformOrigin)==null?void 0:fe.x,(Se=z.transformOrigin)==null?void 0:Se.y].join(" "),...((Ae=z.hide)==null?void 0:Ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(IM,{scope:a,placedSide:Q,onArrowChange:L,arrowX:ee,arrowY:ae,shouldHideArrow:re,children:g.jsx(we.div,{"data-side":Q,"data-align":M,...S,ref:O,style:{...S.style,animation:B?void 0:"none"}})})})});gw.displayName=op;var vw="PopperArrow",YM={top:"bottom",right:"left",bottom:"top",left:"right"},yw=y.forwardRef(function(r,a){const{__scopePopper:s,...o}=r,c=VM(vw,s),f=YM[c.placedSide];return g.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:g.jsx($M,{...o,ref:a,style:{...o.style,display:"block"}})})});yw.displayName=vw;function GM(t){return t!==null}var FM=t=>({name:"transformOrigin",options:t,fn(r){var w,C,N;const{placement:a,rects:s,middlewareData:o}=r,f=((w=o.arrow)==null?void 0:w.centerOffset)!==0,d=f?0:t.arrowWidth,m=f?0:t.arrowHeight,[p,v]=bw(a),b={start:"0%",center:"50%",end:"100%"}[v],x=(((C=o.arrow)==null?void 0:C.x)??0)+d/2,E=(((N=o.arrow)==null?void 0:N.y)??0)+m/2;let T="",S="";return p==="bottom"?(T=f?b:`${x}px`,S=`${-m}px`):p==="top"?(T=f?b:`${x}px`,S=`${s.floating.height+m}px`):p==="right"?(T=`${-m}px`,S=f?b:`${E}px`):p==="left"&&(T=`${s.floating.width+m}px`,S=f?b:`${E}px`),{data:{x:T,y:S}}}});function bw(t){const[r,a="center"]=t.split("-");return[r,a]}var xw=hw,Sw=pw,ww=gw,Ew=yw,QM="VisuallyHidden",Wl=y.forwardRef((t,r)=>g.jsx(we.span,{...t,ref:r,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));Wl.displayName=QM;var XM=Wl,[uu,mz]=Bn("Tooltip",[cu]),fu=cu(),Rw="TooltipProvider",KM=700,Rm="tooltip.open",[WM,cp]=uu(Rw),Tw=t=>{const{__scopeTooltip:r,delayDuration:a=KM,skipDelayDuration:s=300,disableHoverableContent:o=!1,children:c}=t,[f,d]=y.useState(!0),m=y.useRef(!1),p=y.useRef(0);return y.useEffect(()=>{const v=p.current;return()=>window.clearTimeout(v)},[]),g.jsx(WM,{scope:r,isOpenDelayed:f,delayDuration:a,onOpen:y.useCallback(()=>{window.clearTimeout(p.current),d(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>d(!0),s)},[s]),isPointerInTransitRef:m,onPointerInTransitChange:y.useCallback(v=>{m.current=v},[]),disableHoverableContent:o,children:c})};Tw.displayName=Rw;var du="Tooltip",[ZM,Zl]=uu(du),Cw=t=>{const{__scopeTooltip:r,children:a,open:s,defaultOpen:o=!1,onOpenChange:c,disableHoverableContent:f,delayDuration:d}=t,m=cp(du,t.__scopeTooltip),p=fu(r),[v,b]=y.useState(null),x=yr(),E=y.useRef(0),T=f??m.disableHoverableContent,S=d??m.delayDuration,w=y.useRef(!1),[C=!1,N]=ni({prop:s,defaultProp:o,onChange:V=>{V?(m.onOpen(),document.dispatchEvent(new CustomEvent(Rm))):m.onClose(),c==null||c(V)}}),O=y.useMemo(()=>C?w.current?"delayed-open":"instant-open":"closed",[C]),_=y.useCallback(()=>{window.clearTimeout(E.current),E.current=0,w.current=!1,N(!0)},[N]),L=y.useCallback(()=>{window.clearTimeout(E.current),E.current=0,N(!1)},[N]),$=y.useCallback(()=>{window.clearTimeout(E.current),E.current=window.setTimeout(()=>{w.current=!0,N(!0),E.current=0},S)},[S,N]);return y.useEffect(()=>()=>{E.current&&(window.clearTimeout(E.current),E.current=0)},[]),g.jsx(xw,{...p,children:g.jsx(ZM,{scope:r,contentId:x,open:C,stateAttribute:O,trigger:v,onTriggerChange:b,onTriggerEnter:y.useCallback(()=>{m.isOpenDelayed?$():_()},[m.isOpenDelayed,$,_]),onTriggerLeave:y.useCallback(()=>{T?L():(window.clearTimeout(E.current),E.current=0)},[L,T]),onOpen:_,onClose:L,disableHoverableContent:T,children:a})})};Cw.displayName=du;var Tm="TooltipTrigger",Aw=y.forwardRef((t,r)=>{const{__scopeTooltip:a,...s}=t,o=Zl(Tm,a),c=cp(Tm,a),f=fu(a),d=y.useRef(null),m=Ue(r,d,o.onTriggerChange),p=y.useRef(!1),v=y.useRef(!1),b=y.useCallback(()=>p.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",b),[b]),g.jsx(Sw,{asChild:!0,...f,children:g.jsx(we.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...s,ref:m,onPointerMove:ve(t.onPointerMove,x=>{x.pointerType!=="touch"&&!v.current&&!c.isPointerInTransitRef.current&&(o.onTriggerEnter(),v.current=!0)}),onPointerLeave:ve(t.onPointerLeave,()=>{o.onTriggerLeave(),v.current=!1}),onPointerDown:ve(t.onPointerDown,()=>{p.current=!0,document.addEventListener("pointerup",b,{once:!0})}),onFocus:ve(t.onFocus,()=>{p.current||o.onOpen()}),onBlur:ve(t.onBlur,o.onClose),onClick:ve(t.onClick,o.onClose)})})});Aw.displayName=Tm;var up="TooltipPortal",[JM,ej]=uu(up,{forceMount:void 0}),Nw=t=>{const{__scopeTooltip:r,forceMount:a,children:s,container:o}=t,c=Zl(up,r);return g.jsx(JM,{scope:r,forceMount:a,children:g.jsx(ln,{present:a||c.open,children:g.jsx(Xl,{asChild:!0,container:o,children:s})})})};Nw.displayName=up;var ms="TooltipContent",Ow=y.forwardRef((t,r)=>{const a=ej(ms,t.__scopeTooltip),{forceMount:s=a.forceMount,side:o="top",...c}=t,f=Zl(ms,t.__scopeTooltip);return g.jsx(ln,{present:s||f.open,children:f.disableHoverableContent?g.jsx(Mw,{side:o,...c,ref:r}):g.jsx(tj,{side:o,...c,ref:r})})}),tj=y.forwardRef((t,r)=>{const a=Zl(ms,t.__scopeTooltip),s=cp(ms,t.__scopeTooltip),o=y.useRef(null),c=Ue(r,o),[f,d]=y.useState(null),{trigger:m,onClose:p}=a,v=o.current,{onPointerInTransitChange:b}=s,x=y.useCallback(()=>{d(null),b(!1)},[b]),E=y.useCallback((T,S)=>{const w=T.currentTarget,C={x:T.clientX,y:T.clientY},N=ij(C,w.getBoundingClientRect()),O=sj(C,N),_=lj(S.getBoundingClientRect()),L=cj([...O,..._]);d(L),b(!0)},[b]);return y.useEffect(()=>()=>x(),[x]),y.useEffect(()=>{if(m&&v){const T=w=>E(w,v),S=w=>E(w,m);return m.addEventListener("pointerleave",T),v.addEventListener("pointerleave",S),()=>{m.removeEventListener("pointerleave",T),v.removeEventListener("pointerleave",S)}}},[m,v,E,x]),y.useEffect(()=>{if(f){const T=S=>{const w=S.target,C={x:S.clientX,y:S.clientY},N=(m==null?void 0:m.contains(w))||(v==null?void 0:v.contains(w)),O=!oj(C,f);N?x():O&&(x(),p())};return document.addEventListener("pointermove",T),()=>document.removeEventListener("pointermove",T)}},[m,v,f,p,x]),g.jsx(Mw,{...t,ref:c})}),[nj,rj]=uu(du,{isInside:!1}),Mw=y.forwardRef((t,r)=>{const{__scopeTooltip:a,children:s,"aria-label":o,onEscapeKeyDown:c,onPointerDownOutside:f,...d}=t,m=Zl(ms,a),p=fu(a),{onClose:v}=m;return y.useEffect(()=>(document.addEventListener(Rm,v),()=>document.removeEventListener(Rm,v)),[v]),y.useEffect(()=>{if(m.trigger){const b=x=>{const E=x.target;E!=null&&E.contains(m.trigger)&&v()};return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[m.trigger,v]),g.jsx(Ql,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:b=>b.preventDefault(),onDismiss:v,children:g.jsxs(ww,{"data-state":m.stateAttribute,...p,...d,ref:r,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(tS,{children:s}),g.jsx(nj,{scope:a,isInside:!0,children:g.jsx(XM,{id:m.contentId,role:"tooltip",children:o||s})})]})})});Ow.displayName=ms;var jw="TooltipArrow",aj=y.forwardRef((t,r)=>{const{__scopeTooltip:a,...s}=t,o=fu(a);return rj(jw,a).isInside?null:g.jsx(Ew,{...o,...s,ref:r})});aj.displayName=jw;function ij(t,r){const a=Math.abs(r.top-t.y),s=Math.abs(r.bottom-t.y),o=Math.abs(r.right-t.x),c=Math.abs(r.left-t.x);switch(Math.min(a,s,o,c)){case c:return"left";case o:return"right";case a:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function sj(t,r,a=5){const s=[];switch(r){case"top":s.push({x:t.x-a,y:t.y+a},{x:t.x+a,y:t.y+a});break;case"bottom":s.push({x:t.x-a,y:t.y-a},{x:t.x+a,y:t.y-a});break;case"left":s.push({x:t.x+a,y:t.y-a},{x:t.x+a,y:t.y+a});break;case"right":s.push({x:t.x-a,y:t.y-a},{x:t.x-a,y:t.y+a});break}return s}function lj(t){const{top:r,right:a,bottom:s,left:o}=t;return[{x:o,y:r},{x:a,y:r},{x:a,y:s},{x:o,y:s}]}function oj(t,r){const{x:a,y:s}=t;let o=!1;for(let c=0,f=r.length-1;c<r.length;f=c++){const d=r[c].x,m=r[c].y,p=r[f].x,v=r[f].y;m>s!=v>s&&a<(p-d)*(s-m)/(v-m)+d&&(o=!o)}return o}function cj(t){const r=t.slice();return r.sort((a,s)=>a.x<s.x?-1:a.x>s.x?1:a.y<s.y?-1:a.y>s.y?1:0),uj(r)}function uj(t){if(t.length<=1)return t.slice();const r=[];for(let s=0;s<t.length;s++){const o=t[s];for(;r.length>=2;){const c=r[r.length-1],f=r[r.length-2];if((c.x-f.x)*(o.y-f.y)>=(c.y-f.y)*(o.x-f.x))r.pop();else break}r.push(o)}r.pop();const a=[];for(let s=t.length-1;s>=0;s--){const o=t[s];for(;a.length>=2;){const c=a[a.length-1],f=a[a.length-2];if((c.x-f.x)*(o.y-f.y)>=(c.y-f.y)*(o.x-f.x))a.pop();else break}a.push(o)}return a.pop(),r.length===1&&a.length===1&&r[0].x===a[0].x&&r[0].y===a[0].y?r:r.concat(a)}var fj=Tw,dj=Cw,hj=Aw,mj=Nw,Dw=Ow;const _w=fj,br=dj,xr=hj,Un=y.forwardRef(({className:t,sideOffset:r=4,...a},s)=>g.jsx(mj,{children:g.jsx(Dw,{ref:s,sideOffset:r,className:le("z-50 overflow-hidden select-none rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...a})}));Un.displayName=Dw.displayName;const pj="sidebar:state",gj=60*60*24*7,vj="16rem",yj="18rem",bj="3rem",xj="b",Lw=y.createContext(null);function hu(){const t=y.useContext(Lw);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}const zw=y.forwardRef(({defaultOpen:t=!0,open:r,onOpenChange:a,className:s,style:o,children:c,...f},d)=>{const m=RN(),[p,v]=y.useState(!1),[b,x]=y.useState(t),E=r??b,T=y.useCallback(N=>{const O=typeof N=="function"?N(E):N;a?a(O):x(O),document.cookie=`${pj}=${O}; path=/; max-age=${gj}`},[a,E]),S=y.useCallback(()=>m?v(N=>!N):T(N=>!N),[m,T,v]);y.useEffect(()=>{const N=O=>{O.key===xj&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),S())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[S]);const w=E?"expanded":"collapsed",C=y.useMemo(()=>({state:w,open:E,setOpen:T,isMobile:m,openMobile:p,setOpenMobile:v,toggleSidebar:S}),[w,E,T,m,p,v,S]);return g.jsx(Lw.Provider,{value:C,children:g.jsx(_w,{delayDuration:0,children:g.jsx("div",{style:{"--sidebar-width":vj,"--sidebar-width-icon":bj,...o},className:le("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-card",s),ref:d,...f,children:c})})})});zw.displayName="SidebarProvider";const Pw=y.forwardRef(({side:t="left",variant:r="sidebar",collapsible:a="offcanvas",className:s,children:o,...c},f)=>{const{isMobile:d,state:m,openMobile:p,setOpenMobile:v}=hu();return a==="none"?g.jsx("div",{className:le("flex h-full w-[--sidebar-width] flex-col bg-card text-sidebar-foreground",s),ref:f,...c,children:o}):d?g.jsx(U2,{open:p,onOpenChange:v,...c,children:g.jsx(JS,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-card p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":yj},side:t,children:g.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):g.jsxs("div",{ref:f,className:"group peer hidden md:block text-sidebar-foreground","data-state":m,"data-collapsible":m==="collapsed"?a:"","data-variant":r,"data-side":t,children:[g.jsx("div",{className:le("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",r==="floating"||r==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),g.jsx("div",{className:le("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",r==="floating"||r==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...c,children:g.jsx("div",{"data-sidebar":"sidebar",className:"flex m-4 rounded-md border w-full flex-col bg-card group-data-[variant=floating]:rounded-md group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});Pw.displayName="Sidebar";const Sj=y.forwardRef(({className:t,onClick:r,...a},s)=>{const{toggleSidebar:o}=hu();return g.jsxs(Qe,{ref:s,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:le("h-7 w-7",t),onClick:c=>{r==null||r(c),o()},...a,children:[g.jsx(pN,{}),g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Sj.displayName="SidebarTrigger";const wj=y.forwardRef(({className:t,...r},a)=>{const{toggleSidebar:s}=hu();return g.jsx("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:le("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-card-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-card","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t),...r})});wj.displayName="SidebarRail";const Uw=y.forwardRef(({className:t,...r},a)=>g.jsx("main",{ref:a,className:le("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",t),...r}));Uw.displayName="SidebarInset";const Ej=y.forwardRef(({className:t,...r},a)=>g.jsx(vr,{ref:a,"data-sidebar":"input",className:le("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",t),...r}));Ej.displayName="SidebarInput";const kw=y.forwardRef(({className:t,...r},a)=>g.jsx("div",{ref:a,"data-sidebar":"header",className:le("flex flex-col gap-2 p-2",t),...r}));kw.displayName="SidebarHeader";const Hw=y.forwardRef(({className:t,...r},a)=>g.jsx("div",{ref:a,"data-sidebar":"footer",className:le("flex flex-col gap-2 p-2",t),...r}));Hw.displayName="SidebarFooter";const Rj=y.forwardRef(({className:t,...r},a)=>g.jsx(yS,{ref:a,"data-sidebar":"separator",className:le("mx-2 w-auto bg-card-border",t),...r}));Rj.displayName="SidebarSeparator";const $w=y.forwardRef(({className:t,...r},a)=>g.jsx("div",{ref:a,"data-sidebar":"content",className:le("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...r}));$w.displayName="SidebarContent";const qw=y.forwardRef(({className:t,...r},a)=>g.jsx("div",{ref:a,"data-sidebar":"group",className:le("relative flex w-full min-w-0 flex-col p-2",t),...r}));qw.displayName="SidebarGroup";const Bw=y.forwardRef(({className:t,asChild:r=!1,...a},s)=>{const o=r?sn:"div";return g.jsx(o,{ref:s,"data-sidebar":"group-label",className:le("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...a})});Bw.displayName="SidebarGroupLabel";const Tj=y.forwardRef(({className:t,asChild:r=!1,...a},s)=>{const o=r?sn:"button";return g.jsx(o,{ref:s,"data-sidebar":"group-action",className:le("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",t),...a})});Tj.displayName="SidebarGroupAction";const Iw=y.forwardRef(({className:t,...r},a)=>g.jsx("div",{ref:a,"data-sidebar":"group-content",className:le("w-full text-sm",t),...r}));Iw.displayName="SidebarGroupContent";const zc=y.forwardRef(({className:t,...r},a)=>g.jsx("ul",{ref:a,"data-sidebar":"menu",className:le("flex w-full min-w-0 flex-col gap-1",t),...r}));zc.displayName="SidebarMenu";const mr=y.forwardRef(({className:t,...r},a)=>g.jsx("li",{ref:a,"data-sidebar":"menu-item",className:le("group/menu-item relative",t),...r}));mr.displayName="SidebarMenuItem";const Cj=ma("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ia=y.forwardRef(({asChild:t=!1,isActive:r=!1,variant:a="default",size:s="default",tooltip:o,className:c,...f},d)=>{const m=t?sn:"button",{isMobile:p,state:v}=hu(),b=g.jsx(m,{ref:d,"data-sidebar":"menu-button","data-size":s,"data-active":r,className:le(Cj({variant:a,size:s}),c),...f});return o?(typeof o=="string"&&(o={children:o}),g.jsxs(br,{children:[g.jsx(xr,{asChild:!0,children:b}),g.jsx(Un,{side:"right",align:"center",hidden:v!=="collapsed"||p,...o})]})):b});Ia.displayName="SidebarMenuButton";const Aj=y.forwardRef(({className:t,asChild:r=!1,showOnHover:a=!1,...s},o)=>{const c=r?sn:"button";return g.jsx(c,{ref:o,"data-sidebar":"menu-action",className:le("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",t),...s})});Aj.displayName="SidebarMenuAction";const Nj=y.forwardRef(({className:t,...r},a)=>g.jsx("div",{ref:a,"data-sidebar":"menu-badge",className:le("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t),...r}));Nj.displayName="SidebarMenuBadge";const Vw=y.forwardRef(({className:t,showIcon:r=!1,...a},s)=>{const o=y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return g.jsxs("div",{ref:s,"data-sidebar":"menu-skeleton",className:le("rounded-md h-8 flex gap-2 px-2 items-center",t),...a,children:[r&&g.jsx(s0,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),g.jsx(s0,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});Vw.displayName="SidebarMenuSkeleton";const Oj=y.forwardRef(({className:t,...r},a)=>g.jsx("ul",{ref:a,"data-sidebar":"menu-sub",className:le("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...r}));Oj.displayName="SidebarMenuSub";const Mj=y.forwardRef(({...t},r)=>g.jsx("li",{ref:r,...t}));Mj.displayName="SidebarMenuSubItem";const jj=y.forwardRef(({asChild:t=!1,size:r="md",isActive:a,className:s,...o},c)=>{const f=t?sn:"a";return g.jsx(f,{ref:c,"data-sidebar":"menu-sub-button","data-size":r,"data-active":a,className:le("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-card-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-card-accent data-[active=true]:text-sidebar-accent-foreground",r==="sm"&&"text-xs",r==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...o})});jj.displayName="SidebarMenuSubButton";const ih="elizaos-world-id",Ya={getWorldId:()=>{const t=localStorage.getItem(ih);if(t)return t;const r=crypto.randomUUID();return localStorage.setItem(ih,r),r},resetWorldId:()=>{const t=crypto.randomUUID();return localStorage.setItem(ih,t),t},getRoomStorageKey:t=>`room-${Ya.getWorldId()}-${t}`},Dj="http://localhost:3000",lt=async({url:t,method:r,body:a,headers:s})=>{const o={method:r??"GET",headers:s||{Accept:"application/json","Content-Type":"application/json"}};return(r==="POST"||r==="PUT"||r==="PATCH")&&(a instanceof FormData?(o.headers&&typeof o.headers=="object"&&(o.headers=Object.fromEntries(Object.entries(o.headers).filter(([c])=>c!=="Content-Type"))),o.body=a):o.body=JSON.stringify(a)),fetch(`${Dj}${t}`,o).then(async c=>{if(c.headers.get("Content-Type")==="audio/mpeg")return await c.blob();if(!c.ok){const d=await c.text();console.error("Error: ",d);let m="An error occurred.";try{m=JSON.parse(d).message||m}catch{m=d||m}throw new Error(m)}try{return await c.json()}catch(d){return console.error("JSON Parse Error:",d),null}})},Lt={sendMessage:(t,r,a,s)=>{const o=Ya.getWorldId();if(a){const c=new FormData;return c.append("text",r),c.append("name","Anon"),c.append("file",a),s&&c.append("roomId",s),c.append("worldId",o),lt({url:`/agents/${t}/messages`,method:"POST",body:c})}return lt({url:`/agents/${t}/messages`,method:"POST",body:{text:r,name:"Anon",roomId:s||void 0,worldId:o}})},getAgents:()=>lt({url:"/agents"}),getAgent:t=>lt({url:`/agents/${t}`}),tts:(t,r)=>lt({url:`/agents/${t}/speech/generate`,method:"POST",body:{text:r},headers:{"Content-Type":"application/json",Accept:"audio/mpeg","Transfer-Encoding":"chunked"}}),whisper:async(t,r)=>{const a=new FormData;return a.append("file",r,"recording.wav"),lt({url:`/agents/${t}/transcriptions`,method:"POST",body:a})},sendAudioMessage:async(t,r,a)=>{const s=new FormData;if(s.append("file",r,"recording.wav"),a)for(const[o,c]of Object.entries(a))c&&s.append(o,c);return lt({url:`/agents/${t}/audio-messages`,method:"POST",body:s})},speechConversation:async(t,r,a)=>lt({url:`/agents/${t}/speech/conversation`,method:"POST",body:{text:r,...a},headers:{"Content-Type":"application/json",Accept:"audio/mpeg","Transfer-Encoding":"chunked"}}),deleteAgent:t=>lt({url:`/agents/${t}`,method:"DELETE"}),updateAgent:(t,r)=>lt({url:`/agents/${t}`,method:"PATCH",body:r}),createAgent:t=>lt({url:"/agents/",method:"POST",body:t}),startAgent:t=>lt({url:`/agents/${t}`,method:"POST",body:{start:!0}}),stopAgent:t=>lt({url:`/agents/${t}`,method:"PUT"}),getMemories:(t,r,a)=>{const o={worldId:Ya.getWorldId()};return a!=null&&a.limit&&(o.limit=a.limit),a!=null&&a.before&&(o.end=a.before),lt({url:`/agents/${t}/rooms/${r}/memories`,method:"GET",body:o})},getRooms:t=>{const r=Ya.getWorldId();return lt({url:`/agents/${t}/rooms`,method:"GET",body:{worldId:r}})},createRoom:(t,r)=>{const a=Ya.getWorldId();return lt({url:`/agents/${t}/rooms`,method:"POST",body:{name:r,worldId:a}})},getRoom:(t,r)=>lt({url:`/agents/${t}/rooms/${r}`,method:"GET"}),updateRoom:(t,r,a)=>lt({url:`/agents/${t}/rooms/${r}`,method:"PATCH",body:a}),deleteRoom:(t,r)=>lt({url:`/agents/${t}/rooms/${r}`,method:"DELETE"}),getLogs:t=>lt({url:`/logs?level=${t}`,method:"GET"})},_j=1,Lj=1e6;let sh=0;function zj(){return sh=(sh+1)%Number.MAX_SAFE_INTEGER,sh.toString()}const lh=new Map,p0=t=>{if(lh.has(t))return;const r=setTimeout(()=>{lh.delete(t),Pl({type:"REMOVE_TOAST",toastId:t})},Lj);lh.set(t,r)},Pj=(t,r)=>{switch(r.type){case"ADD_TOAST":return{...t,toasts:[r.toast,...t.toasts].slice(0,_j)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(a=>a.id===r.toast.id?{...a,...r.toast}:a)};case"DISMISS_TOAST":{const{toastId:a}=r;if(a)p0(a);else for(const s of t.toasts)p0(s.id);return{...t,toasts:t.toasts.map(s=>s.id===a||a===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return r.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(a=>a.id!==r.toastId)}}},Pc=[];let Uc={toasts:[]};function Pl(t){Uc=Pj(Uc,t);for(const r of Pc)r(Uc)}function Uj({...t}){const r=zj(),a=o=>Pl({type:"UPDATE_TOAST",toast:{...o,id:r}}),s=()=>Pl({type:"DISMISS_TOAST",toastId:r});return Pl({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:o=>{o||s()}}}),{id:r,dismiss:s,update:a}}function xn(){const[t,r]=y.useState(Uc);return y.useEffect(()=>(Pc.push(r),()=>{const a=Pc.indexOf(r);a>-1&&Pc.splice(a,1)}),[]),{...t,toast:Uj,dismiss:a=>Pl({type:"DISMISS_TOAST",toastId:a})}}const kn={FREQUENT:30*1e3,STANDARD:2*60*1e3,RARE:10*60*1e3,NEVER:Number.POSITIVE_INFINITY},Yw=()=>{const t=typeof navigator<"u"&&"connection"in navigator?navigator.connection:null;return{isOffline:typeof navigator<"u"&&!navigator.onLine,effectiveType:(t==null?void 0:t.effectiveType)||"unknown",saveData:(t==null?void 0:t.saveData)||!1}};function Gw(t={}){const r=Yw();return ys({queryKey:["agents"],queryFn:()=>Lt.getAgents(),staleTime:kn.FREQUENT,refetchInterval:r.isOffline?!1:kn.FREQUENT,refetchIntervalInBackground:!1,...!r.isOffline&&r.effectiveType==="slow-2g"&&{refetchInterval:kn.STANDARD},...t})}function kj(t,r={}){const a=Yw();return ys({queryKey:["agent",t],queryFn:()=>Lt.getAgent(t||""),staleTime:kn.FREQUENT,enabled:!!t,refetchInterval:!a.isOffline&&t?kn.FREQUENT:!1,refetchIntervalInBackground:!1,...!a.isOffline&&a.effectiveType==="slow-2g"&&{refetchInterval:kn.STANDARD},...r})}function Hj(){const t=qn(),{toast:r}=xn();return Fl({mutationFn:async a=>{try{return await Lt.startAgent(a)}catch(s){if(s instanceof Error){if(s.message.includes("network"))throw new Error("Network error: Please check your connection and try again.");if(s.message.includes("already running"))throw new Error("Agent is already running.")}throw s}},onMutate:async a=>(r({title:"Starting Agent",description:"Initializing agent..."}),{agentId:a}),onSuccess:a=>{t.invalidateQueries({queryKey:["agents"]}),t.invalidateQueries({queryKey:["active-agents"]}),a!=null&&a.id&&t.invalidateQueries({queryKey:["agent",a.id]}),r({title:"Agent Started",description:`${(a==null?void 0:a.name)||"Agent"} is now running`})},onError:a=>{const s=a instanceof Error?a.message:"Failed to start agent";r({title:"Error Starting Agent",description:`${s}. Please try again.`,variant:"destructive"})}})}function $j(){const t=qn(),{toast:r}=xn();return Fl({mutationFn:a=>Lt.stopAgent(a),onMutate:async a=>{const s=t.getQueryData(["agent",a]);s&&r({title:"Stopping Agent",description:`Stopping ${s.name}...`})},onSuccess:(a,s)=>{t.invalidateQueries({queryKey:["agents"]}),t.invalidateQueries({queryKey:["agent",s]}),r({title:"Agent Stopped",description:"The agent has been successfully stopped"})},onError:(a,s)=>{t.invalidateQueries({queryKey:["agents"]}),t.invalidateQueries({queryKey:["agent",s]}),r({title:"Error",description:a instanceof Error?a.message:"Failed to stop agent",variant:"destructive"})}})}function qj(t){const r=qn(),a=Ya.getWorldId();return{messages:r.getQueryData(["messages",t,a])||[]}}const Bj="1.0.0-alpha.3",Ji={version:Bj};var Nl={},g0;function Ij(){if(g0)return Nl;g0=1,Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.parse=f,Nl.serialize=p;const t=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,r=/^[\u0021-\u003A\u003C-\u007E]*$/,a=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,s=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,c=(()=>{const x=function(){};return x.prototype=Object.create(null),x})();function f(x,E){const T=new c,S=x.length;if(S<2)return T;const w=(E==null?void 0:E.decode)||v;let C=0;do{const N=x.indexOf("=",C);if(N===-1)break;const O=x.indexOf(";",C),_=O===-1?S:O;if(N>_){C=x.lastIndexOf(";",N-1)+1;continue}const L=d(x,C,N),$=m(x,N,L),V=x.slice(L,$);if(T[V]===void 0){let k=d(x,N+1,_),U=m(x,_,k);const K=w(x.slice(k,U));T[V]=K}C=_+1}while(C<S);return T}function d(x,E,T){do{const S=x.charCodeAt(E);if(S!==32&&S!==9)return E}while(++E<T);return T}function m(x,E,T){for(;E>T;){const S=x.charCodeAt(--E);if(S!==32&&S!==9)return E+1}return T}function p(x,E,T){const S=(T==null?void 0:T.encode)||encodeURIComponent;if(!t.test(x))throw new TypeError(`argument name is invalid: ${x}`);const w=S(E);if(!r.test(w))throw new TypeError(`argument val is invalid: ${E}`);let C=x+"="+w;if(!T)return C;if(T.maxAge!==void 0){if(!Number.isInteger(T.maxAge))throw new TypeError(`option maxAge is invalid: ${T.maxAge}`);C+="; Max-Age="+T.maxAge}if(T.domain){if(!a.test(T.domain))throw new TypeError(`option domain is invalid: ${T.domain}`);C+="; Domain="+T.domain}if(T.path){if(!s.test(T.path))throw new TypeError(`option path is invalid: ${T.path}`);C+="; Path="+T.path}if(T.expires){if(!b(T.expires)||!Number.isFinite(T.expires.valueOf()))throw new TypeError(`option expires is invalid: ${T.expires}`);C+="; Expires="+T.expires.toUTCString()}if(T.httpOnly&&(C+="; HttpOnly"),T.secure&&(C+="; Secure"),T.partitioned&&(C+="; Partitioned"),T.priority)switch(typeof T.priority=="string"?T.priority.toLowerCase():void 0){case"low":C+="; Priority=Low";break;case"medium":C+="; Priority=Medium";break;case"high":C+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${T.priority}`)}if(T.sameSite)switch(typeof T.sameSite=="string"?T.sameSite.toLowerCase():T.sameSite){case!0:case"strict":C+="; SameSite=Strict";break;case"lax":C+="; SameSite=Lax";break;case"none":C+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${T.sameSite}`)}return C}function v(x){if(x.indexOf("%")===-1)return x;try{return decodeURIComponent(x)}catch{return x}}function b(x){return o.call(x)==="[object Date]"}return Nl}Ij();/**
|
|
254
|
+
* react-router v7.3.0
|
|
255
|
+
*
|
|
256
|
+
* Copyright (c) Remix Software Inc.
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the MIT license found in the
|
|
259
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
260
|
+
*
|
|
261
|
+
* @license MIT
|
|
262
|
+
*/var v0="popstate";function Vj(t={}){function r(s,o){let{pathname:c,search:f,hash:d}=s.location;return Cm("",{pathname:c,search:f,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function a(s,o){return typeof o=="string"?o:$l(o)}return Gj(r,a,null,t)}function We(t,r){if(t===!1||t===null||typeof t>"u")throw new Error(r)}function $n(t,r){if(!t){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function Yj(){return Math.random().toString(36).substring(2,10)}function y0(t,r){return{usr:t.state,key:t.key,idx:r}}function Cm(t,r,a=null,s){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof r=="string"?Rs(r):r,state:a,key:r&&r.key||s||Yj()}}function $l({pathname:t="/",search:r="",hash:a=""}){return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function Rs(t){let r={};if(t){let a=t.indexOf("#");a>=0&&(r.hash=t.substring(a),t=t.substring(0,a));let s=t.indexOf("?");s>=0&&(r.search=t.substring(s),t=t.substring(0,s)),t&&(r.pathname=t)}return r}function Gj(t,r,a,s={}){let{window:o=document.defaultView,v5Compat:c=!1}=s,f=o.history,d="POP",m=null,p=v();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function v(){return(f.state||{idx:null}).idx}function b(){d="POP";let w=v(),C=w==null?null:w-p;p=w,m&&m({action:d,location:S.location,delta:C})}function x(w,C){d="PUSH";let N=Cm(S.location,w,C);p=v()+1;let O=y0(N,p),_=S.createHref(N);try{f.pushState(O,"",_)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;o.location.assign(_)}c&&m&&m({action:d,location:S.location,delta:1})}function E(w,C){d="REPLACE";let N=Cm(S.location,w,C);p=v();let O=y0(N,p),_=S.createHref(N);f.replaceState(O,"",_),c&&m&&m({action:d,location:S.location,delta:0})}function T(w){let C=o.location.origin!=="null"?o.location.origin:o.location.href,N=typeof w=="string"?w:$l(w);return N=N.replace(/ $/,"%20"),We(C,`No window.location.(origin|href) available to create URL for href: ${N}`),new URL(N,C)}let S={get action(){return d},get location(){return t(o,f)},listen(w){if(m)throw new Error("A history only accepts one active listener");return o.addEventListener(v0,b),m=w,()=>{o.removeEventListener(v0,b),m=null}},createHref(w){return r(o,w)},createURL:T,encodeLocation(w){let C=T(w);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:x,replace:E,go(w){return f.go(w)}};return S}function Fw(t,r,a="/"){return Fj(t,r,a,!1)}function Fj(t,r,a,s){let o=typeof r=="string"?Rs(r):r,c=Tr(o.pathname||"/",a);if(c==null)return null;let f=Qw(t);Qj(f);let d=null;for(let m=0;d==null&&m<f.length;++m){let p=iD(c);d=rD(f[m],p,s)}return d}function Qw(t,r=[],a=[],s=""){let o=(c,f,d)=>{let m={relativePath:d===void 0?c.path||"":d,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};m.relativePath.startsWith("/")&&(We(m.relativePath.startsWith(s),`Absolute route path "${m.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(s.length));let p=Sr([s,m.relativePath]),v=a.concat(m);c.children&&c.children.length>0&&(We(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Qw(c.children,r,v,p)),!(c.path==null&&!c.index)&&r.push({path:p,score:tD(p,c.index),routesMeta:v})};return t.forEach((c,f)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))o(c,f);else for(let m of Xw(c.path))o(c,f,m)}),r}function Xw(t){let r=t.split("/");if(r.length===0)return[];let[a,...s]=r,o=a.endsWith("?"),c=a.replace(/\?$/,"");if(s.length===0)return o?[c,""]:[c];let f=Xw(s.join("/")),d=[];return d.push(...f.map(m=>m===""?c:[c,m].join("/"))),o&&d.push(...f),d.map(m=>t.startsWith("/")&&m===""?"/":m)}function Qj(t){t.sort((r,a)=>r.score!==a.score?a.score-r.score:nD(r.routesMeta.map(s=>s.childrenIndex),a.routesMeta.map(s=>s.childrenIndex)))}var Xj=/^:[\w-]+$/,Kj=3,Wj=2,Zj=1,Jj=10,eD=-2,b0=t=>t==="*";function tD(t,r){let a=t.split("/"),s=a.length;return a.some(b0)&&(s+=eD),r&&(s+=Wj),a.filter(o=>!b0(o)).reduce((o,c)=>o+(Xj.test(c)?Kj:c===""?Zj:Jj),s)}function nD(t,r){return t.length===r.length&&t.slice(0,-1).every((s,o)=>s===r[o])?t[t.length-1]-r[r.length-1]:0}function rD(t,r,a=!1){let{routesMeta:s}=t,o={},c="/",f=[];for(let d=0;d<s.length;++d){let m=s[d],p=d===s.length-1,v=c==="/"?r:r.slice(c.length)||"/",b=Xc({path:m.relativePath,caseSensitive:m.caseSensitive,end:p},v),x=m.route;if(!b&&p&&a&&!s[s.length-1].route.index&&(b=Xc({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},v)),!b)return null;Object.assign(o,b.params),f.push({params:o,pathname:Sr([c,b.pathname]),pathnameBase:cD(Sr([c,b.pathnameBase])),route:x}),b.pathnameBase!=="/"&&(c=Sr([c,b.pathnameBase]))}return f}function Xc(t,r){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[a,s]=aD(t.path,t.caseSensitive,t.end),o=r.match(a);if(!o)return null;let c=o[0],f=c.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:s.reduce((p,{paramName:v,isOptional:b},x)=>{if(v==="*"){let T=d[x]||"";f=c.slice(0,c.length-T.length).replace(/(.)\/+$/,"$1")}const E=d[x];return b&&!E?p[v]=void 0:p[v]=(E||"").replace(/%2F/g,"/"),p},{}),pathname:c,pathnameBase:f,pattern:t}}function aD(t,r=!1,a=!0){$n(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let s=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,d,m)=>(s.push({paramName:d,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(s.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,r?void 0:"i"),s]}function iD(t){try{return t.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return $n(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),t}}function Tr(t,r){if(r==="/")return t;if(!t.toLowerCase().startsWith(r.toLowerCase()))return null;let a=r.endsWith("/")?r.length-1:r.length,s=t.charAt(a);return s&&s!=="/"?null:t.slice(a)||"/"}function sD(t,r="/"){let{pathname:a,search:s="",hash:o=""}=typeof t=="string"?Rs(t):t;return{pathname:a?a.startsWith("/")?a:lD(a,r):r,search:uD(s),hash:fD(o)}}function lD(t,r){let a=r.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?a.length>1&&a.pop():o!=="."&&a.push(o)}),a.length>1?a.join("/"):"/"}function oh(t,r,a,s){return`Cannot include a '${t}' character in a manually specified \`to.${r}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function oD(t){return t.filter((r,a)=>a===0||r.route.path&&r.route.path.length>0)}function Kw(t){let r=oD(t);return r.map((a,s)=>s===r.length-1?a.pathname:a.pathnameBase)}function Ww(t,r,a,s=!1){let o;typeof t=="string"?o=Rs(t):(o={...t},We(!o.pathname||!o.pathname.includes("?"),oh("?","pathname","search",o)),We(!o.pathname||!o.pathname.includes("#"),oh("#","pathname","hash",o)),We(!o.search||!o.search.includes("#"),oh("#","search","hash",o)));let c=t===""||o.pathname==="",f=c?"/":o.pathname,d;if(f==null)d=a;else{let b=r.length-1;if(!s&&f.startsWith("..")){let x=f.split("/");for(;x[0]==="..";)x.shift(),b-=1;o.pathname=x.join("/")}d=b>=0?r[b]:"/"}let m=sD(o,d),p=f&&f!=="/"&&f.endsWith("/"),v=(c||f===".")&&a.endsWith("/");return!m.pathname.endsWith("/")&&(p||v)&&(m.pathname+="/"),m}var Sr=t=>t.join("/").replace(/\/\/+/g,"/"),cD=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),uD=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,fD=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function dD(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var Zw=["POST","PUT","PATCH","DELETE"];new Set(Zw);var hD=["GET",...Zw];new Set(hD);var Ts=y.createContext(null);Ts.displayName="DataRouter";var mu=y.createContext(null);mu.displayName="DataRouterState";var Jw=y.createContext({isTransitioning:!1});Jw.displayName="ViewTransition";var mD=y.createContext(new Map);mD.displayName="Fetchers";var pD=y.createContext(null);pD.displayName="Await";var Vn=y.createContext(null);Vn.displayName="Navigation";var Jl=y.createContext(null);Jl.displayName="Location";var Yn=y.createContext({outlet:null,matches:[],isDataRoute:!1});Yn.displayName="Route";var fp=y.createContext(null);fp.displayName="RouteError";function gD(t,{relative:r}={}){We(eo(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:s}=y.useContext(Vn),{hash:o,pathname:c,search:f}=no(t,{relative:r}),d=c;return a!=="/"&&(d=c==="/"?a:Sr([a,c])),s.createHref({pathname:d,search:f,hash:o})}function eo(){return y.useContext(Jl)!=null}function pa(){return We(eo(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Jl).location}var eE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function tE(t){y.useContext(Vn).static||y.useLayoutEffect(t)}function to(){let{isDataRoute:t}=y.useContext(Yn);return t?OD():vD()}function vD(){We(eo(),"useNavigate() may be used only in the context of a <Router> component.");let t=y.useContext(Ts),{basename:r,navigator:a}=y.useContext(Vn),{matches:s}=y.useContext(Yn),{pathname:o}=pa(),c=JSON.stringify(Kw(s)),f=y.useRef(!1);return tE(()=>{f.current=!0}),y.useCallback((m,p={})=>{if($n(f.current,eE),!f.current)return;if(typeof m=="number"){a.go(m);return}let v=Ww(m,JSON.parse(c),o,p.relative==="path");t==null&&r!=="/"&&(v.pathname=v.pathname==="/"?r:Sr([r,v.pathname])),(p.replace?a.replace:a.push)(v,p.state,p)},[r,a,c,o,t])}y.createContext(null);function nE(){let{matches:t}=y.useContext(Yn),r=t[t.length-1];return r?r.params:{}}function no(t,{relative:r}={}){let{matches:a}=y.useContext(Yn),{pathname:s}=pa(),o=JSON.stringify(Kw(a));return y.useMemo(()=>Ww(t,JSON.parse(o),s,r==="path"),[t,o,s,r])}function yD(t,r){return rE(t,r)}function rE(t,r,a,s){var N;We(eo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o,static:c}=y.useContext(Vn),{matches:f}=y.useContext(Yn),d=f[f.length-1],m=d?d.params:{},p=d?d.pathname:"/",v=d?d.pathnameBase:"/",b=d&&d.route;{let O=b&&b.path||"";aE(p,!b||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
263
|
+
|
|
264
|
+
Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let x=pa(),E;if(r){let O=typeof r=="string"?Rs(r):r;We(v==="/"||((N=O.pathname)==null?void 0:N.startsWith(v)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${v}" but pathname "${O.pathname}" was given in the \`location\` prop.`),E=O}else E=x;let T=E.pathname||"/",S=T;if(v!=="/"){let O=v.replace(/^\//,"").split("/");S="/"+T.replace(/^\//,"").split("/").slice(O.length).join("/")}let w=!c&&a&&a.matches&&a.matches.length>0?a.matches:Fw(t,{pathname:S});$n(b||w!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),$n(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${E.pathname}${E.search}${E.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=ED(w&&w.map(O=>Object.assign({},O,{params:Object.assign({},m,O.params),pathname:Sr([v,o.encodeLocation?o.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?v:Sr([v,o.encodeLocation?o.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),f,a,s);return r&&C?y.createElement(Jl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...E},navigationType:"POP"}},C):C}function bD(){let t=ND(),r=dD(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,s="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:s},c={padding:"2px 4px",backgroundColor:s},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:c},"ErrorBoundary")," or"," ",y.createElement("code",{style:c},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},r),a?y.createElement("pre",{style:o},a):null,f)}var xD=y.createElement(bD,null),SD=class extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?y.createElement(Yn.Provider,{value:this.props.routeContext},y.createElement(fp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function wD({routeContext:t,match:r,children:a}){let s=y.useContext(Ts);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Yn.Provider,{value:t},a)}function ED(t,r=[],a=null,s=null){if(t==null){if(!a)return null;if(a.errors)t=a.matches;else if(r.length===0&&!a.initialized&&a.matches.length>0)t=a.matches;else return null}let o=t,c=a==null?void 0:a.errors;if(c!=null){let m=o.findIndex(p=>p.route.id&&(c==null?void 0:c[p.route.id])!==void 0);We(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let f=!1,d=-1;if(a)for(let m=0;m<o.length;m++){let p=o[m];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=m),p.route.id){let{loaderData:v,errors:b}=a,x=p.route.loader&&!v.hasOwnProperty(p.route.id)&&(!b||b[p.route.id]===void 0);if(p.route.lazy||x){f=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((m,p,v)=>{let b,x=!1,E=null,T=null;a&&(b=c&&p.route.id?c[p.route.id]:void 0,E=p.route.errorElement||xD,f&&(d<0&&v===0?(aE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,T=null):d===v&&(x=!0,T=p.route.hydrateFallbackElement||null)));let S=r.concat(o.slice(0,v+1)),w=()=>{let C;return b?C=E:x?C=T:p.route.Component?C=y.createElement(p.route.Component,null):p.route.element?C=p.route.element:C=m,y.createElement(wD,{match:p,routeContext:{outlet:m,matches:S,isDataRoute:a!=null},children:C})};return a&&(p.route.ErrorBoundary||p.route.errorElement||v===0)?y.createElement(SD,{location:a.location,revalidation:a.revalidation,component:E,error:b,children:w(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):w()},null)}function dp(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function RD(t){let r=y.useContext(Ts);return We(r,dp(t)),r}function TD(t){let r=y.useContext(mu);return We(r,dp(t)),r}function CD(t){let r=y.useContext(Yn);return We(r,dp(t)),r}function hp(t){let r=CD(t),a=r.matches[r.matches.length-1];return We(a.route.id,`${t} can only be used on routes that contain a unique "id"`),a.route.id}function AD(){return hp("useRouteId")}function ND(){var s;let t=y.useContext(fp),r=TD("useRouteError"),a=hp("useRouteError");return t!==void 0?t:(s=r.errors)==null?void 0:s[a]}function OD(){let{router:t}=RD("useNavigate"),r=hp("useNavigate"),a=y.useRef(!1);return tE(()=>{a.current=!0}),y.useCallback(async(o,c={})=>{$n(a.current,eE),a.current&&(typeof o=="number"?t.navigate(o):await t.navigate(o,{fromRouteId:r,...c}))},[t,r])}var x0={};function aE(t,r,a){!r&&!x0[t]&&(x0[t]=!0,$n(!1,a))}y.memo(MD);function MD({routes:t,future:r,state:a}){return rE(t,void 0,a,r)}function qa(t){We(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function jD({basename:t="/",children:r=null,location:a,navigationType:s="POP",navigator:o,static:c=!1}){We(!eo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=t.replace(/^\/*/,"/"),d=y.useMemo(()=>({basename:f,navigator:o,static:c,future:{}}),[f,o,c]);typeof a=="string"&&(a=Rs(a));let{pathname:m="/",search:p="",hash:v="",state:b=null,key:x="default"}=a,E=y.useMemo(()=>{let T=Tr(m,f);return T==null?null:{location:{pathname:T,search:p,hash:v,state:b,key:x},navigationType:s}},[f,m,p,v,b,x,s]);return $n(E!=null,`<Router basename="${f}"> is not able to match the URL "${m}${p}${v}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:y.createElement(Vn.Provider,{value:d},y.createElement(Jl.Provider,{children:r,value:E}))}function DD({children:t,location:r}){return yD(Am(t),r)}function Am(t,r=[]){let a=[];return y.Children.forEach(t,(s,o)=>{if(!y.isValidElement(s))return;let c=[...r,o];if(s.type===y.Fragment){a.push.apply(a,Am(s.props.children,c));return}We(s.type===qa,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),We(!s.props.index||!s.props.children,"An index route cannot have child routes.");let f={id:s.props.id||c.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(f.children=Am(s.props.children,c)),a.push(f)}),a}var kc="get",Hc="application/x-www-form-urlencoded";function pu(t){return t!=null&&typeof t.tagName=="string"}function _D(t){return pu(t)&&t.tagName.toLowerCase()==="button"}function LD(t){return pu(t)&&t.tagName.toLowerCase()==="form"}function zD(t){return pu(t)&&t.tagName.toLowerCase()==="input"}function PD(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function UD(t,r){return t.button===0&&(!r||r==="_self")&&!PD(t)}var Tc=null;function kD(){if(Tc===null)try{new FormData(document.createElement("form"),0),Tc=!1}catch{Tc=!0}return Tc}var HD=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ch(t){return t!=null&&!HD.has(t)?($n(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Hc}"`),null):t}function $D(t,r){let a,s,o,c,f;if(LD(t)){let d=t.getAttribute("action");s=d?Tr(d,r):null,a=t.getAttribute("method")||kc,o=ch(t.getAttribute("enctype"))||Hc,c=new FormData(t)}else if(_D(t)||zD(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=t.getAttribute("formaction")||d.getAttribute("action");if(s=m?Tr(m,r):null,a=t.getAttribute("formmethod")||d.getAttribute("method")||kc,o=ch(t.getAttribute("formenctype"))||ch(d.getAttribute("enctype"))||Hc,c=new FormData(d,t),!kD()){let{name:p,type:v,value:b}=t;if(v==="image"){let x=p?`${p}.`:"";c.append(`${x}x`,"0"),c.append(`${x}y`,"0")}else p&&c.append(p,b)}}else{if(pu(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=kc,s=null,o=Hc,f=t}return c&&o==="text/plain"&&(f=c,c=void 0),{action:s,method:a.toLowerCase(),encType:o,formData:c,body:f}}function mp(t,r){if(t===!1||t===null||typeof t>"u")throw new Error(r)}async function qD(t,r){if(t.id in r)return r[t.id];try{let a=await import(t.module);return r[t.id]=a,a}catch(a){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function BD(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function ID(t,r,a){let s=await Promise.all(t.map(async o=>{let c=r.routes[o.route.id];if(c){let f=await qD(c,a);return f.links?f.links():[]}return[]}));return FD(s.flat(1).filter(BD).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function S0(t,r,a,s,o,c){let f=(m,p)=>a[p]?m.route.id!==a[p].route.id:!0,d=(m,p)=>{var v;return a[p].pathname!==m.pathname||((v=a[p].route.path)==null?void 0:v.endsWith("*"))&&a[p].params["*"]!==m.params["*"]};return c==="assets"?r.filter((m,p)=>f(m,p)||d(m,p)):c==="data"?r.filter((m,p)=>{var b;let v=s.routes[m.route.id];if(!v||!v.hasLoader)return!1;if(f(m,p)||d(m,p))return!0;if(m.route.shouldRevalidate){let x=m.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((b=a[0])==null?void 0:b.params)||{},nextUrl:new URL(t,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function VD(t,r,{includeHydrateFallback:a}={}){return YD(t.map(s=>{let o=r.routes[s.route.id];if(!o)return[];let c=[o.module];return o.clientActionModule&&(c=c.concat(o.clientActionModule)),o.clientLoaderModule&&(c=c.concat(o.clientLoaderModule)),a&&o.hydrateFallbackModule&&(c=c.concat(o.hydrateFallbackModule)),o.imports&&(c=c.concat(o.imports)),c}).flat(1))}function YD(t){return[...new Set(t)]}function GD(t){let r={},a=Object.keys(t).sort();for(let s of a)r[s]=t[s];return r}function FD(t,r){let a=new Set;return new Set(r),t.reduce((s,o)=>{let c=JSON.stringify(GD(o));return a.has(c)||(a.add(c),s.push({key:c,link:o})),s},[])}function QD(t,r){let a=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return a.pathname==="/"?a.pathname="_root.data":r&&Tr(a.pathname,r)==="/"?a.pathname=`${r.replace(/\/$/,"")}/_root.data`:a.pathname=`${a.pathname.replace(/\/$/,"")}.data`,a}function iE(){let t=y.useContext(Ts);return mp(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function XD(){let t=y.useContext(mu);return mp(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var pp=y.createContext(void 0);pp.displayName="FrameworkContext";function sE(){let t=y.useContext(pp);return mp(t,"You must render this element inside a <HydratedRouter> element"),t}function KD(t,r){let a=y.useContext(pp),[s,o]=y.useState(!1),[c,f]=y.useState(!1),{onFocus:d,onBlur:m,onMouseEnter:p,onMouseLeave:v,onTouchStart:b}=r,x=y.useRef(null);y.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let S=C=>{C.forEach(N=>{f(N.isIntersecting)})},w=new IntersectionObserver(S,{threshold:.5});return x.current&&w.observe(x.current),()=>{w.disconnect()}}},[t]),y.useEffect(()=>{if(s){let S=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(S)}}},[s]);let E=()=>{o(!0)},T=()=>{o(!1),f(!1)};return a?t!=="intent"?[c,x,{}]:[c,x,{onFocus:Ol(d,E),onBlur:Ol(m,T),onMouseEnter:Ol(p,E),onMouseLeave:Ol(v,T),onTouchStart:Ol(b,E)}]:[!1,x,{}]}function Ol(t,r){return a=>{t&&t(a),a.defaultPrevented||r(a)}}function WD({page:t,...r}){let{router:a}=iE(),s=y.useMemo(()=>Fw(a.routes,t,a.basename),[a.routes,t,a.basename]);return s?y.createElement(JD,{page:t,matches:s,...r}):null}function ZD(t){let{manifest:r,routeModules:a}=sE(),[s,o]=y.useState([]);return y.useEffect(()=>{let c=!1;return ID(t,r,a).then(f=>{c||o(f)}),()=>{c=!0}},[t,r,a]),s}function JD({page:t,matches:r,...a}){let s=pa(),{manifest:o,routeModules:c}=sE(),{basename:f}=iE(),{loaderData:d,matches:m}=XD(),p=y.useMemo(()=>S0(t,r,m,o,s,"data"),[t,r,m,o,s]),v=y.useMemo(()=>S0(t,r,m,o,s,"assets"),[t,r,m,o,s]),b=y.useMemo(()=>{if(t===s.pathname+s.search+s.hash)return[];let T=new Set,S=!1;if(r.forEach(C=>{var O;let N=o.routes[C.route.id];!N||!N.hasLoader||(!p.some(_=>_.route.id===C.route.id)&&C.route.id in d&&((O=c[C.route.id])!=null&&O.shouldRevalidate)||N.hasClientLoader?S=!0:T.add(C.route.id))}),T.size===0)return[];let w=QD(t,f);return S&&T.size>0&&w.searchParams.set("_routes",r.filter(C=>T.has(C.route.id)).map(C=>C.route.id).join(",")),[w.pathname+w.search]},[f,d,s,o,p,r,t,c]),x=y.useMemo(()=>VD(v,o),[v,o]),E=ZD(v);return y.createElement(y.Fragment,null,b.map(T=>y.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...a})),x.map(T=>y.createElement("link",{key:T,rel:"modulepreload",href:T,...a})),E.map(({key:T,link:S})=>y.createElement("link",{key:T,...S})))}function e_(...t){return r=>{t.forEach(a=>{typeof a=="function"?a(r):a!=null&&(a.current=r)})}}var lE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{lE&&(window.__reactRouterVersion="7.3.0")}catch{}function t_({basename:t,children:r,window:a}){let s=y.useRef();s.current==null&&(s.current=Vj({window:a,v5Compat:!0}));let o=s.current,[c,f]=y.useState({action:o.action,location:o.location}),d=y.useCallback(m=>{y.startTransition(()=>f(m))},[f]);return y.useLayoutEffect(()=>o.listen(d),[o,d]),y.createElement(jD,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:o})}var oE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cE=y.forwardRef(function({onClick:r,discover:a="render",prefetch:s="none",relative:o,reloadDocument:c,replace:f,state:d,target:m,to:p,preventScrollReset:v,viewTransition:b,...x},E){let{basename:T}=y.useContext(Vn),S=typeof p=="string"&&oE.test(p),w,C=!1;if(typeof p=="string"&&S&&(w=p,lE))try{let U=new URL(window.location.href),K=p.startsWith("//")?new URL(U.protocol+p):new URL(p),te=Tr(K.pathname,T);K.origin===U.origin&&te!=null?p=te+K.search+K.hash:C=!0}catch{$n(!1,`<Link to="${p}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let N=gD(p,{relative:o}),[O,_,L]=KD(s,x),$=a_(p,{replace:f,state:d,target:m,preventScrollReset:v,relative:o,viewTransition:b});function V(U){r&&r(U),U.defaultPrevented||$(U)}let k=y.createElement("a",{...x,...L,href:w||N,onClick:C||c?r:V,ref:e_(E,_),target:m,"data-discover":!S&&a==="render"?"true":void 0});return O&&!S?y.createElement(y.Fragment,null,k,y.createElement(WD,{page:N})):k});cE.displayName="Link";var Va=y.forwardRef(function({"aria-current":r="page",caseSensitive:a=!1,className:s="",end:o=!1,style:c,to:f,viewTransition:d,children:m,...p},v){let b=no(f,{relative:p.relative}),x=pa(),E=y.useContext(mu),{navigator:T,basename:S}=y.useContext(Vn),w=E!=null&&c_(b)&&d===!0,C=T.encodeLocation?T.encodeLocation(b).pathname:b.pathname,N=x.pathname,O=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;a||(N=N.toLowerCase(),O=O?O.toLowerCase():null,C=C.toLowerCase()),O&&S&&(O=Tr(O,S)||O);const _=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let L=N===C||!o&&N.startsWith(C)&&N.charAt(_)==="/",$=O!=null&&(O===C||!o&&O.startsWith(C)&&O.charAt(C.length)==="/"),V={isActive:L,isPending:$,isTransitioning:w},k=L?r:void 0,U;typeof s=="function"?U=s(V):U=[s,L?"active":null,$?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let K=typeof c=="function"?c(V):c;return y.createElement(cE,{...p,"aria-current":k,className:U,ref:v,style:K,to:f,viewTransition:d},typeof m=="function"?m(V):m)});Va.displayName="NavLink";var n_=y.forwardRef(({discover:t="render",fetcherKey:r,navigate:a,reloadDocument:s,replace:o,state:c,method:f=kc,action:d,onSubmit:m,relative:p,preventScrollReset:v,viewTransition:b,...x},E)=>{let T=l_(),S=o_(d,{relative:p}),w=f.toLowerCase()==="get"?"get":"post",C=typeof d=="string"&&oE.test(d),N=O=>{if(m&&m(O),O.defaultPrevented)return;O.preventDefault();let _=O.nativeEvent.submitter,L=(_==null?void 0:_.getAttribute("formmethod"))||f;T(_||O.currentTarget,{fetcherKey:r,method:L,navigate:a,replace:o,state:c,relative:p,preventScrollReset:v,viewTransition:b})};return y.createElement("form",{ref:E,method:w,action:S,onSubmit:s?m:N,...x,"data-discover":!C&&t==="render"?"true":void 0})});n_.displayName="Form";function r_(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function uE(t){let r=y.useContext(Ts);return We(r,r_(t)),r}function a_(t,{target:r,replace:a,state:s,preventScrollReset:o,relative:c,viewTransition:f}={}){let d=to(),m=pa(),p=no(t,{relative:c});return y.useCallback(v=>{if(UD(v,r)){v.preventDefault();let b=a!==void 0?a:$l(m)===$l(p);d(t,{replace:b,state:s,preventScrollReset:o,relative:c,viewTransition:f})}},[m,d,p,a,s,r,t,o,c,f])}var i_=0,s_=()=>`__${String(++i_)}__`;function l_(){let{router:t}=uE("useSubmit"),{basename:r}=y.useContext(Vn),a=AD();return y.useCallback(async(s,o={})=>{let{action:c,method:f,encType:d,formData:m,body:p}=$D(s,r);if(o.navigate===!1){let v=o.fetcherKey||s_();await t.fetch(v,a,o.action||c,{preventScrollReset:o.preventScrollReset,formData:m,body:p,formMethod:o.method||f,formEncType:o.encType||d,flushSync:o.flushSync})}else await t.navigate(o.action||c,{preventScrollReset:o.preventScrollReset,formData:m,body:p,formMethod:o.method||f,formEncType:o.encType||d,replace:o.replace,state:o.state,fromRouteId:a,flushSync:o.flushSync,viewTransition:o.viewTransition})},[t,r,a])}function o_(t,{relative:r}={}){let{basename:a}=y.useContext(Vn),s=y.useContext(Yn);We(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),c={...no(t||".",{relative:r})},f=pa();if(t==null){c.search=f.search;let d=new URLSearchParams(c.search),m=d.getAll("index");if(m.some(v=>v==="")){d.delete("index"),m.filter(b=>b).forEach(b=>d.append("index",b));let v=d.toString();c.search=v?`?${v}`:""}}return(!t||t===".")&&o.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(c.pathname=c.pathname==="/"?a:Sr([a,c.pathname])),$l(c)}function c_(t,r={}){let a=y.useContext(Jw);We(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=uE("useViewTransitionState"),o=no(t,{relative:r.relative});if(!a.isTransitioning)return!1;let c=Tr(a.currentLocation.pathname,s)||a.currentLocation.pathname,f=Tr(a.nextLocation.pathname,s)||a.nextLocation.pathname;return Xc(o.pathname,f)!=null||Xc(o.pathname,c)!=null}new TextEncoder;function u_(){const[t,r]=y.useState(null),[a,s]=y.useState(!0),[o,c]=y.useState(typeof navigator<"u"?navigator.onLine:!0),[f,d]=y.useState(!1),m=qn(),[p,v]=y.useState(Date.now()),b=y.useRef(0),x=y.useRef(Date.now());y.useEffect(()=>{const $=()=>{s(document.visibilityState==="visible"),document.visibilityState==="visible"&&(b.current=0,Date.now()-p>1e4&&m.invalidateQueries({queryKey:["status"]}))},V=()=>{c(navigator.onLine),navigator.onLine&&(b.current=0,m.invalidateQueries({queryKey:["status"]}))};return document.addEventListener("visibilitychange",$),window.addEventListener("online",V),window.addEventListener("offline",V),s(document.visibilityState==="visible"),()=>{document.removeEventListener("visibilitychange",$),window.removeEventListener("online",V),window.removeEventListener("offline",V)}},[m,p]);const T=ys({queryKey:["status"],queryFn:async()=>{try{const $=performance.now(),V=await Lt.getAgents(),k=performance.now();return b.current=0,x.current=Date.now(),r(k-$),v(Date.now()),V}catch($){throw b.current+=1,console.error("Connection check failed:",$),$}},refetchInterval:o?b.current>0?Math.min(5e3*2**(b.current-1),6e4):a?3e3:15e3:!1,retry:3,retryDelay:$=>Math.min(1e3*1.5**$,1e4),refetchOnWindowFocus:!0,refetchOnReconnect:!0,staleTime:500,gcTime:kn.STANDARD}),S=(T==null?void 0:T.isSuccess)&&!(T!=null&&T.isError),w=(T==null?void 0:T.isRefetching)||(T==null?void 0:T.isPending),C=S===!1&&b.current>5&&Date.now()-x.current>6e4,N=()=>o?C?"bg-yellow-600":w?"bg-muted-foreground":S?"bg-green-600":"bg-red-600":"bg-orange-600",O=()=>o?C?"Reconnecting...":w?"Connecting...":S?"Connected":"Disconnected":"Offline",_=()=>o?C?"text-yellow-600":w?"text-muted-foreground":S?"text-green-600":"text-red-600":"text-orange-600",L=()=>{b.current=0,m.invalidateQueries({queryKey:["agents"]}),m.invalidateQueries({queryKey:["status"]})};return g.jsx(mr,{children:g.jsxs(br,{children:[g.jsx(xr,{asChild:!0,children:g.jsx(Ia,{onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:L,children:g.jsx("div",{className:"flex flex-col gap-1 select-none transition-all duration-200",children:g.jsxs("div",{className:"flex items-center gap-1",children:[f?g.jsx(bN,{className:"h-3.5 w-3.5 text-muted-foreground animate-pulse"}):g.jsx("div",{className:le(["h-2.5 w-2.5 rounded-full",N()])}),g.jsx("span",{className:le(["text-xs",f?"text-muted-foreground":_()]),children:f?"Refresh":O()})]})})})}),S&&!f?g.jsx(Un,{side:"top",children:g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(aN,{className:"size-4"}),g.jsxs("span",{children:[t==null?void 0:t.toFixed(2)," ms"]})]})}):null]})})}function f_(){const t=pa(),{data:{data:r}={},isPending:a}=Gw();return g.jsxs(Pw,{className:"bg-background",children:[g.jsx(kw,{className:"pb-4",children:g.jsx(zc,{children:g.jsx(mr,{children:g.jsx(Ia,{size:"lg",asChild:!0,children:g.jsxs(Va,{to:"/",className:"px-6 py-4",children:[g.jsx("img",{alt:"elizaos-icon",src:"/elizaos-icon.png",width:"100%",height:"100%",className:"size-9"}),g.jsxs("div",{className:"flex flex-col leading-none ",children:[g.jsx("span",{className:"font-semibold text-lg",children:"ElizaOS"}),g.jsxs("span",{className:"text-sm -mt-0.5 text-muted-foreground",children:["v",Ji==null?void 0:Ji.version]})]})]})})})})}),g.jsx($w,{children:g.jsxs(qw,{children:[g.jsx(Bw,{className:"px-6 py-2 text-sm font-medium text-muted-foreground",children:g.jsx(Va,{to:"/",children:"AGENTS"})}),g.jsx(Iw,{className:"px-2",children:g.jsx(zc,{children:a?g.jsx("div",{children:Array.from({length:5}).map((s,o)=>g.jsx(mr,{children:g.jsx(Vw,{})},`skeleton-item-${o}`))}):g.jsx("div",{children:(()=>{const s=[...(r==null?void 0:r.agents)||[]].sort((f,d)=>f.enabled&&!d.enabled?-1:!f.enabled&&d.enabled?1:f.name.localeCompare(d.name)),o=s.filter(f=>f.status==="active"),c=s.filter(f=>f.status==="inactive");return g.jsxs(g.Fragment,{children:[o.length>0&&g.jsx("div",{className:"px-4 py-2 mt-4",children:g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("div",{className:"size-2.5 rounded-full bg-green-500"}),g.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Active"})]})}),o.map(f=>g.jsx(mr,{children:g.jsx(Va,{to:`/chat/${f.id}`,children:g.jsx(Ia,{isActive:t.pathname.includes(f.id),className:"transition-colors px-4 py-2 my-1 rounded-md",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Bb,{className:"size-5"}),g.jsx("span",{className:"text-base",children:f.name})]})})})},f.id)),c.length>0&&g.jsx("div",{className:"px-4 py-2 mt-4",children:g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("div",{className:"size-2.5 rounded-full bg-muted-foreground/50"}),g.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Inactive"})]})}),c.map(f=>g.jsx(mr,{children:g.jsx("div",{className:"px-4 py-2 my-1 rounded-md",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Bb,{className:"size-5"}),g.jsx("span",{className:"text-base",children:f.name})]})})},f.id))]})})()})})})]})}),g.jsx(Hw,{className:"px-4 py-4",children:g.jsxs(zc,{children:[g.jsx(mr,{children:g.jsx(Va,{to:"https://elizaos.github.io/eliza/docs/intro/",target:"_blank",children:g.jsxs(Ia,{className:"text-muted-foreground rounded-md",children:[g.jsx(sN,{className:"size-5"}),g.jsx("span",{children:"Documentation"})]})})}),g.jsx(mr,{children:g.jsx(Va,{to:"/logs",children:g.jsxs(Ia,{className:"text-muted-foreground rounded-md",children:[g.jsx(xN,{className:"size-5"}),g.jsx("span",{children:"Logs"})]})})}),g.jsx(mr,{children:g.jsxs(Ia,{disabled:!0,className:"text-muted-foreground/50 rounded-md",children:[g.jsx(sS,{className:"size-5"}),g.jsx("span",{children:"Settings"})]})}),g.jsx(u_,{})]})})]})}function gp(t){const r=t+"CollectionProvider",[a,s]=Bn(r),[o,c]=a(r,{collectionRef:{current:null},itemMap:new Map}),f=E=>{const{scope:T,children:S}=E,w=hr.useRef(null),C=hr.useRef(new Map).current;return g.jsx(o,{scope:T,itemMap:C,collectionRef:w,children:S})};f.displayName=r;const d=t+"CollectionSlot",m=hr.forwardRef((E,T)=>{const{scope:S,children:w}=E,C=c(d,S),N=Ue(T,C.collectionRef);return g.jsx(sn,{ref:N,children:w})});m.displayName=d;const p=t+"CollectionItemSlot",v="data-radix-collection-item",b=hr.forwardRef((E,T)=>{const{scope:S,children:w,...C}=E,N=hr.useRef(null),O=Ue(T,N),_=c(p,S);return hr.useEffect(()=>(_.itemMap.set(N,{ref:N,...C}),()=>void _.itemMap.delete(N))),g.jsx(sn,{[v]:"",ref:O,children:w})});b.displayName=p;function x(E){const T=c(t+"CollectionConsumer",E);return hr.useCallback(()=>{const w=T.collectionRef.current;if(!w)return[];const C=Array.from(w.querySelectorAll(`[${v}]`));return Array.from(T.itemMap.values()).sort((_,L)=>C.indexOf(_.ref.current)-C.indexOf(L.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:f,Slot:m,ItemSlot:b},x,s]}var vp="ToastProvider",[yp,d_,h_]=gp("Toast"),[fE,pz]=Bn("Toast",[h_]),[m_,gu]=fE(vp),dE=t=>{const{__scopeToast:r,label:a="Notification",duration:s=5e3,swipeDirection:o="right",swipeThreshold:c=50,children:f}=t,[d,m]=y.useState(null),[p,v]=y.useState(0),b=y.useRef(!1),x=y.useRef(!1);return a.trim()||console.error(`Invalid prop \`label\` supplied to \`${vp}\`. Expected non-empty \`string\`.`),g.jsx(yp.Provider,{scope:r,children:g.jsx(m_,{scope:r,label:a,duration:s,swipeDirection:o,swipeThreshold:c,toastCount:p,viewport:d,onViewportChange:m,onToastAdd:y.useCallback(()=>v(E=>E+1),[]),onToastRemove:y.useCallback(()=>v(E=>E-1),[]),isFocusedToastEscapeKeyDownRef:b,isClosePausedRef:x,children:f})})};dE.displayName=vp;var hE="ToastViewport",p_=["F8"],Nm="toast.viewportPause",Om="toast.viewportResume",mE=y.forwardRef((t,r)=>{const{__scopeToast:a,hotkey:s=p_,label:o="Notifications ({hotkey})",...c}=t,f=gu(hE,a),d=d_(a),m=y.useRef(null),p=y.useRef(null),v=y.useRef(null),b=y.useRef(null),x=Ue(r,b,f.onViewportChange),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=f.toastCount>0;y.useEffect(()=>{const w=C=>{var O;s.length!==0&&s.every(_=>C[_]||C.code===_)&&((O=b.current)==null||O.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[s]),y.useEffect(()=>{const w=m.current,C=b.current;if(T&&w&&C){const N=()=>{if(!f.isClosePausedRef.current){const $=new CustomEvent(Nm);C.dispatchEvent($),f.isClosePausedRef.current=!0}},O=()=>{if(f.isClosePausedRef.current){const $=new CustomEvent(Om);C.dispatchEvent($),f.isClosePausedRef.current=!1}},_=$=>{!w.contains($.relatedTarget)&&O()},L=()=>{w.contains(document.activeElement)||O()};return w.addEventListener("focusin",N),w.addEventListener("focusout",_),w.addEventListener("pointermove",N),w.addEventListener("pointerleave",L),window.addEventListener("blur",N),window.addEventListener("focus",O),()=>{w.removeEventListener("focusin",N),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",N),w.removeEventListener("pointerleave",L),window.removeEventListener("blur",N),window.removeEventListener("focus",O)}}},[T,f.isClosePausedRef]);const S=y.useCallback(({tabbingDirection:w})=>{const N=d().map(O=>{const _=O.ref.current,L=[_,...N_(_)];return w==="forwards"?L:L.reverse()});return(w==="forwards"?N.reverse():N).flat()},[d]);return y.useEffect(()=>{const w=b.current;if(w){const C=N=>{var L,$,V;const O=N.altKey||N.ctrlKey||N.metaKey;if(N.key==="Tab"&&!O){const k=document.activeElement,U=N.shiftKey;if(N.target===w&&U){(L=p.current)==null||L.focus();return}const se=S({tabbingDirection:U?"backwards":"forwards"}),de=se.findIndex(q=>q===k);uh(se.slice(de+1))?N.preventDefault():U?($=p.current)==null||$.focus():(V=v.current)==null||V.focus()}};return w.addEventListener("keydown",C),()=>w.removeEventListener("keydown",C)}},[d,S]),g.jsxs(jO,{ref:m,role:"region","aria-label":o.replace("{hotkey}",E),tabIndex:-1,style:{pointerEvents:T?void 0:"none"},children:[T&&g.jsx(Mm,{ref:p,onFocusFromOutsideViewport:()=>{const w=S({tabbingDirection:"forwards"});uh(w)}}),g.jsx(yp.Slot,{scope:a,children:g.jsx(we.ol,{tabIndex:-1,...c,ref:x})}),T&&g.jsx(Mm,{ref:v,onFocusFromOutsideViewport:()=>{const w=S({tabbingDirection:"backwards"});uh(w)}})]})});mE.displayName=hE;var pE="ToastFocusProxy",Mm=y.forwardRef((t,r)=>{const{__scopeToast:a,onFocusFromOutsideViewport:s,...o}=t,c=gu(pE,a);return g.jsx(Wl,{"aria-hidden":!0,tabIndex:0,...o,ref:r,style:{position:"fixed"},onFocus:f=>{var p;const d=f.relatedTarget;!((p=c.viewport)!=null&&p.contains(d))&&s()}})});Mm.displayName=pE;var vu="Toast",g_="toast.swipeStart",v_="toast.swipeMove",y_="toast.swipeCancel",b_="toast.swipeEnd",gE=y.forwardRef((t,r)=>{const{forceMount:a,open:s,defaultOpen:o,onOpenChange:c,...f}=t,[d=!0,m]=ni({prop:s,defaultProp:o,onChange:c});return g.jsx(ln,{present:a||d,children:g.jsx(w_,{open:d,...f,ref:r,onClose:()=>m(!1),onPause:nt(t.onPause),onResume:nt(t.onResume),onSwipeStart:ve(t.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ve(t.onSwipeMove,p=>{const{x:v,y:b}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${v}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${b}px`)}),onSwipeCancel:ve(t.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ve(t.onSwipeEnd,p=>{const{x:v,y:b}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${v}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${b}px`),m(!1)})})})});gE.displayName=vu;var[x_,S_]=fE(vu,{onClose(){}}),w_=y.forwardRef((t,r)=>{const{__scopeToast:a,type:s="foreground",duration:o,open:c,onClose:f,onEscapeKeyDown:d,onPause:m,onResume:p,onSwipeStart:v,onSwipeMove:b,onSwipeCancel:x,onSwipeEnd:E,...T}=t,S=gu(vu,a),[w,C]=y.useState(null),N=Ue(r,q=>C(q)),O=y.useRef(null),_=y.useRef(null),L=o||S.duration,$=y.useRef(0),V=y.useRef(L),k=y.useRef(0),{onToastAdd:U,onToastRemove:K}=S,te=nt(()=>{var H;(w==null?void 0:w.contains(document.activeElement))&&((H=S.viewport)==null||H.focus()),f()}),se=y.useCallback(q=>{!q||q===1/0||(window.clearTimeout(k.current),$.current=new Date().getTime(),k.current=window.setTimeout(te,q))},[te]);y.useEffect(()=>{const q=S.viewport;if(q){const H=()=>{se(V.current),p==null||p()},j=()=>{const B=new Date().getTime()-$.current;V.current=V.current-B,window.clearTimeout(k.current),m==null||m()};return q.addEventListener(Nm,j),q.addEventListener(Om,H),()=>{q.removeEventListener(Nm,j),q.removeEventListener(Om,H)}}},[S.viewport,L,m,p,se]),y.useEffect(()=>{c&&!S.isClosePausedRef.current&&se(L)},[c,L,S.isClosePausedRef,se]),y.useEffect(()=>(U(),()=>K()),[U,K]);const de=y.useMemo(()=>w?EE(w):null,[w]);return S.viewport?g.jsxs(g.Fragment,{children:[de&&g.jsx(E_,{__scopeToast:a,role:"status","aria-live":s==="foreground"?"assertive":"polite","aria-atomic":!0,children:de}),g.jsx(x_,{scope:a,onClose:te,children:Ss.createPortal(g.jsx(yp.ItemSlot,{scope:a,children:g.jsx(MO,{asChild:!0,onEscapeKeyDown:ve(d,()=>{S.isFocusedToastEscapeKeyDownRef.current||te(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(we.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":c?"open":"closed","data-swipe-direction":S.swipeDirection,...T,ref:N,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ve(t.onKeyDown,q=>{q.key==="Escape"&&(d==null||d(q.nativeEvent),q.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,te()))}),onPointerDown:ve(t.onPointerDown,q=>{q.button===0&&(O.current={x:q.clientX,y:q.clientY})}),onPointerMove:ve(t.onPointerMove,q=>{if(!O.current)return;const H=q.clientX-O.current.x,j=q.clientY-O.current.y,B=!!_.current,z=["left","right"].includes(S.swipeDirection),Q=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,M=z?Q(0,H):0,G=z?0:Q(0,j),ee=q.pointerType==="touch"?10:2,ae={x:M,y:G},re={originalEvent:q,delta:ae};B?(_.current=ae,Cc(v_,b,re,{discrete:!1})):w0(ae,S.swipeDirection,ee)?(_.current=ae,Cc(g_,v,re,{discrete:!1}),q.target.setPointerCapture(q.pointerId)):(Math.abs(H)>ee||Math.abs(j)>ee)&&(O.current=null)}),onPointerUp:ve(t.onPointerUp,q=>{const H=_.current,j=q.target;if(j.hasPointerCapture(q.pointerId)&&j.releasePointerCapture(q.pointerId),_.current=null,O.current=null,H){const B=q.currentTarget,z={originalEvent:q,delta:H};w0(H,S.swipeDirection,S.swipeThreshold)?Cc(b_,E,z,{discrete:!0}):Cc(y_,x,z,{discrete:!0}),B.addEventListener("click",Q=>Q.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),E_=t=>{const{__scopeToast:r,children:a,...s}=t,o=gu(vu,r),[c,f]=y.useState(!1),[d,m]=y.useState(!1);return C_(()=>f(!0)),y.useEffect(()=>{const p=window.setTimeout(()=>m(!0),1e3);return()=>window.clearTimeout(p)},[]),d?null:g.jsx(Xl,{asChild:!0,children:g.jsx(Wl,{...s,children:c&&g.jsxs(g.Fragment,{children:[o.label," ",a]})})})},R_="ToastTitle",vE=y.forwardRef((t,r)=>{const{__scopeToast:a,...s}=t;return g.jsx(we.div,{...s,ref:r})});vE.displayName=R_;var T_="ToastDescription",yE=y.forwardRef((t,r)=>{const{__scopeToast:a,...s}=t;return g.jsx(we.div,{...s,ref:r})});yE.displayName=T_;var bE="ToastAction",xE=y.forwardRef((t,r)=>{const{altText:a,...s}=t;return a.trim()?g.jsx(wE,{altText:a,asChild:!0,children:g.jsx(bp,{...s,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${bE}\`. Expected non-empty \`string\`.`),null)});xE.displayName=bE;var SE="ToastClose",bp=y.forwardRef((t,r)=>{const{__scopeToast:a,...s}=t,o=S_(SE,a);return g.jsx(wE,{asChild:!0,children:g.jsx(we.button,{type:"button",...s,ref:r,onClick:ve(t.onClick,o.onClose)})})});bp.displayName=SE;var wE=y.forwardRef((t,r)=>{const{__scopeToast:a,altText:s,...o}=t;return g.jsx(we.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...o,ref:r})});function EE(t){const r=[];return Array.from(t.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&r.push(s.textContent),A_(s)){const o=s.ariaHidden||s.hidden||s.style.display==="none",c=s.dataset.radixToastAnnounceExclude==="";if(!o)if(c){const f=s.dataset.radixToastAnnounceAlt;f&&r.push(f)}else r.push(...EE(s))}}),r}function Cc(t,r,a,{discrete:s}){const o=a.originalEvent.currentTarget,c=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:a});r&&o.addEventListener(t,r,{once:!0}),s?pS(o,c):o.dispatchEvent(c)}var w0=(t,r,a=0)=>{const s=Math.abs(t.x),o=Math.abs(t.y),c=s>o;return r==="left"||r==="right"?c&&s>a:!c&&o>a};function C_(t=()=>{}){const r=nt(t);ft(()=>{let a=0,s=0;return a=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(a),window.cancelAnimationFrame(s)}},[r])}function A_(t){return t.nodeType===t.ELEMENT_NODE}function N_(t){const r=[],a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)r.push(a.currentNode);return r}function uh(t){const r=document.activeElement;return t.some(a=>a===r?!0:(a.focus(),document.activeElement!==r))}var O_=dE,RE=mE,TE=gE,CE=vE,AE=yE,NE=xE,OE=bp;const M_=O_,ME=y.forwardRef(({className:t,...r},a)=>g.jsx(RE,{ref:a,className:le("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...r}));ME.displayName=RE.displayName;const j_=ma("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),jE=y.forwardRef(({className:t,variant:r,...a},s)=>g.jsx(TE,{ref:s,className:le(j_({variant:r}),t),...a}));jE.displayName=TE.displayName;const DE=y.forwardRef(({className:t,...r},a)=>g.jsx(NE,{ref:a,className:le("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...r}));DE.displayName=NE.displayName;const _E=y.forwardRef(({className:t,...r},a)=>g.jsx(OE,{ref:a,className:le("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...r,children:g.jsx(bs,{className:"h-4 w-4"})}));_E.displayName=OE.displayName;const LE=y.forwardRef(({className:t,...r},a)=>g.jsx(CE,{ref:a,className:le("text-sm font-semibold [&+div]:text-xs",t),...r}));LE.displayName=CE.displayName;const zE=y.forwardRef(({className:t,...r},a)=>g.jsx(AE,{ref:a,className:le("text-sm opacity-90",t),...r}));zE.displayName=AE.displayName;function D_(){const{toasts:t}=xn();return g.jsxs(M_,{children:[t.map(({id:r,title:a,description:s,action:o,...c})=>g.jsxs(jE,{...c,children:[g.jsxs("div",{className:"grid gap-1",children:[a&&g.jsx(LE,{children:a}),s&&g.jsx(zE,{children:s})]}),o,g.jsx(_E,{})]},r)),g.jsx(ME,{})]})}var xp="Avatar",[__,gz]=Bn(xp),[L_,PE]=__(xp),UE=y.forwardRef((t,r)=>{const{__scopeAvatar:a,...s}=t,[o,c]=y.useState("idle");return g.jsx(L_,{scope:a,imageLoadingStatus:o,onImageLoadingStatusChange:c,children:g.jsx(we.span,{...s,ref:r})})});UE.displayName=xp;var kE="AvatarImage",HE=y.forwardRef((t,r)=>{const{__scopeAvatar:a,src:s,onLoadingStatusChange:o=()=>{},...c}=t,f=PE(kE,a),d=z_(s,c.referrerPolicy),m=nt(p=>{o(p),f.onImageLoadingStatusChange(p)});return ft(()=>{d!=="idle"&&m(d)},[d,m]),d==="loaded"?g.jsx(we.img,{...c,ref:r,src:s}):null});HE.displayName=kE;var $E="AvatarFallback",qE=y.forwardRef((t,r)=>{const{__scopeAvatar:a,delayMs:s,...o}=t,c=PE($E,a),[f,d]=y.useState(s===void 0);return y.useEffect(()=>{if(s!==void 0){const m=window.setTimeout(()=>d(!0),s);return()=>window.clearTimeout(m)}},[s]),f&&c.imageLoadingStatus!=="loaded"?g.jsx(we.span,{...o,ref:r}):null});qE.displayName=$E;function z_(t,r){const[a,s]=y.useState("idle");return ft(()=>{if(!t){s("error");return}let o=!0;const c=new window.Image,f=d=>()=>{o&&s(d)};return s("loading"),c.onload=f("loaded"),c.onerror=f("error"),c.src=t,r&&(c.referrerPolicy=r),()=>{o=!1}},[t,r]),a}var BE=UE,IE=HE,VE=qE;const $c=y.forwardRef(({className:t,...r},a)=>g.jsx(BE,{ref:a,className:le("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-md",t),...r}));$c.displayName=BE.displayName;const qc=y.forwardRef(({className:t,...r},a)=>g.jsx(IE,{ref:a,className:le("aspect-square h-full w-full",t),...r}));qc.displayName=IE.displayName;const YE=y.forwardRef(({className:t,...r},a)=>g.jsx(VE,{ref:a,className:le("flex h-full w-full items-center justify-center rounded-md bg-muted",t),...r}));YE.displayName=VE.displayName;function P_(){return g.jsxs("svg",{role:"img","aria-label":"Loading animation",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"text-foreground",children:[g.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:g.jsx("animate",{id:"spinner_qFRN",begin:"0;spinner_OcgL.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),g.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:g.jsx("animate",{begin:"spinner_qFRN.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),g.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:g.jsx("animate",{id:"spinner_OcgL",begin:"spinner_qFRN.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})}const U_=ma("flex gap-2 max-w-[60%] items-end relative group",{variants:{variant:{received:"self-start",sent:"self-end flex-row-reverse"},layout:{default:"",ai:"max-w-full w-full items-center"}},defaultVariants:{variant:"received",layout:"default"}}),GE=y.forwardRef(({className:t,variant:r,layout:a,children:s,...o},c)=>g.jsx("div",{className:le(U_({variant:r,layout:a,className:t}),"relative group"),ref:c,...o,children:y.Children.map(s,f=>y.isValidElement(f)&&typeof f.type!="string"&&f.type!==y.Fragment?y.cloneElement(f,{variant:r,layout:a}):f)}));GE.displayName="ChatBubble";const k_=ma("p-4",{variants:{variant:{received:"bg-secondary text-secondary-foreground rounded-lg rounded-bl-none",sent:"bg-primary text-primary-foreground rounded-lg rounded-br-none"},layout:{default:"",ai:"border-t w-full rounded-none bg-transparent"}},defaultVariants:{variant:"received",layout:"default"}}),FE=y.forwardRef(({className:t,variant:r,layout:a,isLoading:s=!1,children:o,...c},f)=>g.jsx("div",{className:le(k_({variant:r,layout:a,className:t}),"break-words max-w-full whitespace-pre-wrap"),ref:f,...c,children:s?g.jsx("div",{className:"flex items-center space-x-2",children:g.jsx(P_,{})}):o}));FE.displayName="ChatBubbleMessage";const H_=({timestamp:t,className:r,...a})=>g.jsx("div",{className:le("text-xs text-right select-none",r),...a,children:t}),$_=y.forwardRef(({variant:t,className:r,children:a,...s},o)=>g.jsx("div",{ref:o,className:le("absolute top-1/2 -translate-y-1/2 flex opacity-0 group-hover:opacity-100 transition-opacity duration-200",t==="sent"?"-left-1 -translate-x-full flex-row-reverse":"-right-1 translate-x-full",r),...s,children:a}));$_.displayName="ChatBubbleActionWrapper";const Sp=y.forwardRef(({className:t,...r},a)=>g.jsx("textarea",{className:le("flex min-h-[60px] select-none w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:a,...r}));Sp.displayName="Textarea";const QE=y.forwardRef(({className:t,...r},a)=>g.jsx(Sp,{autoComplete:"off",ref:a,name:"message",className:le("max-h-12 px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",t),...r}));QE.displayName="ChatInput";const XE=y.forwardRef(({className:t,children:r,scrollRef:a,isAtBottom:s,scrollToBottom:o,disableAutoScroll:c,...f},d)=>g.jsxs("div",{className:"relative w-full h-full",children:[g.jsx("div",{className:`flex flex-col w-full h-full p-4 overflow-y-auto ${t}`,ref:a,onWheel:c,onTouchMove:c,...f,children:g.jsx("div",{className:"flex flex-col gap-6",children:r})}),!s&&g.jsx(Qe,{onClick:()=>{o()},size:"icon",variant:"outline",className:"absolute bottom-2 left-1/2 transform -translate-x-1/2 inline-flex rounded-full shadow-md",children:g.jsx(iN,{className:"h-4 w-4"})})]}));XE.displayName="ChatMessageList";var Yi={},Gi={},Fi={},E0;function q_(){if(E0)return Fi;E0=1;var t=Fi&&Fi.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Fi,"__esModule",{value:!0});var r=t(Gl()),a=function(s,o){var c=r.default.useRef(null),f=r.default.useRef(s);return r.default.useEffect(function(){f.current=s},[s]),r.default.useEffect(function(){var d=function(){return f.current()};if(typeof o=="number")return c.current=window.setInterval(d,o),function(){return window.clearInterval(c.current)}},[o]),c};return Fi.default=a,Fi}var $a={},R0;function B_(){if(R0)return $a;R0=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.getCurrentNodeOverflow=$a.getStringPosition=void 0;var t=function(a,s,o){return a.split(s,o).join(" ").length};$a.getStringPosition=t;var r=function(a,s){for(var o=0,c=0,f=0;f<a.length&&!(o+a[f]>s);f++)c++,o=o+a[f];return[c,s-o]};return $a.getCurrentNodeOverflow=r,$a}var T0;function I_(){if(T0)return Gi;T0=1;var t=Gi&&Gi.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Gi,"__esModule",{value:!0});var r=t(Gl()),a=t(q_()),s=B_(),o=r.default.memo(function(c){var f=c.children,d=c.delay,m=d===void 0?25:d,p=c.onEnd,v=p===void 0?function(){}:p,b=r.default.useState(0),x=b[0],E=b[1],T=r.default.useMemo(function(){var C=[],N=function(O){var _,L=(_=O==null?void 0:O.props)===null||_===void 0?void 0:_.children;return Array.isArray(O)&&O.forEach(function($){typeof $=="object"?N($):typeof $=="string"&&C.push($.split(" ").length)}),L===void 0&&typeof O=="string"&&C.push(O.split(" ").length),typeof L=="object"&&N(L),typeof L=="string"&&C.push(L.split(" ").length),C};return N(f)},[f]),S=r.default.useMemo(function(){return T.reduce(function(C,N){return C+N},0)},[T]),w=r.default.useMemo(function(){var C=0,N=0,O=function(_){var L;if(C>x)return null;var $=(L=_==null?void 0:_.props)===null||L===void 0?void 0:L.children;if(Array.isArray(_)){var V=[];return _.forEach(function(se){if(typeof se=="object")V.push(O(se));else if(typeof se=="string"){C+=se.split(" ").length,N++;var de=(0,s.getCurrentNodeOverflow)(T,x),q=de[0],H=de[1];q<N&&V.push(se.slice(0,(0,s.getStringPosition)(se," ",H))),V.push(se)}}),V}if($===void 0&&typeof _=="string"){C+=_.split(" ").length,N++;var k=(0,s.getCurrentNodeOverflow)(T,x),U=k[0],K=k[1];return U<N?_.slice(0,(0,s.getStringPosition)(_," ",K)):_}if(typeof $=="object")return r.default.createElement(_.type,_==null?void 0:_.props,O($));if(typeof $=="string"){C+=$.split(" ").length,N++;var te=(0,s.getCurrentNodeOverflow)(T,x),U=te[0],K=te[1];return U<N?r.default.createElement(_.type,_==null?void 0:_.props,$.slice(0,(0,s.getStringPosition)($," ",K))):_}};return O(f)},[f,x,T]);return(0,a.default)(function(){E(function(C){return C+1>=S&&v(),C+1})},S>x?m:null),r.default.useEffect(function(){console.log("hmmm"),E(0)},[f]),w});return o.displayName="AIWriter",Gi.default=o,Gi}var C0;function V_(){if(C0)return Yi;C0=1;var t=Yi&&Yi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Yi,"__esModule",{value:!0});var r=t(I_());return Yi.default=r.default,Yi}var Y_=V_();const G_=gs(Y_);let Ml,jl=[],Ac;const A0=(t,r)=>String(t).padStart(r,"0"),F_=({className:t,timerClassName:r,agentId:a,onChange:s})=>{const{toast:o}=xn(),[c,f]=y.useState(!1),[d,m]=y.useState(!1),[p,v]=y.useState(0),[b,x]=y.useState({id:-1,name:"",file:null}),E=Math.floor(p%3600/60),T=p%60,[S,w]=y.useMemo(()=>A0(E,2).split(""),[E]),[C,N]=y.useMemo(()=>A0(T,2).split(""),[T]),O=y.useRef({stream:null,analyser:null,mediaRecorder:null,audioContext:null}),_=Fl({mutationKey:["whisper"],mutationFn:U=>Lt.whisper(a,U),onSuccess:U=>{var K;(K=U==null?void 0:U.data)!=null&&K.text&&s(U.data.text)},onError:U=>{o({variant:"destructive",title:"Unable to start recording",description:U.message}),console.log(U)}});function L(){var U;(U=navigator.mediaDevices)!=null&&U.getUserMedia&&navigator.mediaDevices.getUserMedia({audio:!0}).then(K=>{f(!0);const te=window.AudioContext,se=new te,de=se.createAnalyser();se.createMediaStreamSource(K).connect(de),O.current={stream:K,analyser:de,mediaRecorder:null,audioContext:se};const j={mimeType:MediaRecorder.isTypeSupported("audio/mpeg")?"audio/mpeg":MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":"audio/wav"};O.current.mediaRecorder=new MediaRecorder(K,j),O.current.mediaRecorder.start(),jl=[],Ml=new MediaRecorder(K),Ml.start(),Ml.ondataavailable=B=>{jl.push(B.data)}}).catch(K=>{o({variant:"destructive",title:"Unable to start recording",description:K.message}),console.log(K)})}function $(){Ml.onstop=()=>{const U=new Blob(jl,{type:"audio/wav"});_.mutate(U),x({...b,file:window.URL.createObjectURL(U)}),jl=[]},Ml.stop(),f(!1),m(!0),v(0),clearTimeout(Ac)}function V(){const{mediaRecorder:U,stream:K,analyser:te,audioContext:se}=O.current;if(U&&(U.onstop=()=>{jl=[]},U.stop()),te&&te.disconnect(),K)for(const de of K.getTracks())de.stop();se&&se.close(),f(!1),m(!0),v(0),clearTimeout(Ac)}const k=()=>{$()};return y.useEffect(()=>(c&&(Ac=setTimeout(()=>{v(p+1)},1e3)),()=>clearTimeout(Ac)),[c,p]),_!=null&&_.isPending?g.jsx(Qe,{variant:"ghost",disabled:!0,size:"icon",children:g.jsx(lS,{className:"size-4"})}):g.jsxs("div",{className:le("flex items-center justify-center gap-2 border-l border-l-transparent border-opacity-0 transition-all duration-300",{"border-opacity-100 border-l-border pl-2":c},t),children:[c?g.jsxs("div",{className:"flex gap-1 items-center",children:[g.jsx("div",{className:"bg-red-500 rounded-full h-2.5 w-2.5 animate-pulse"}),g.jsx(KE,{minuteLeft:S,minuteRight:w,secondLeft:C,secondRight:N,timerClassName:r})]}):null,g.jsxs("div",{className:"flex items-center",children:[c?g.jsxs(br,{children:[g.jsx(xr,{asChild:!0,children:g.jsx(Qe,{onClick:V,size:"icon",variant:"ghost",children:g.jsx(wN,{className:"size-4"})})}),g.jsx(Un,{className:"m-2",children:g.jsx("span",{children:" Reset recording"})})]}):null,g.jsxs(br,{children:[g.jsx(xr,{asChild:!0,children:c?g.jsx(Qe,{onClick:k,variant:"ghost",size:"icon",children:g.jsx(oS,{className:"size-4"})}):g.jsxs(Qe,{variant:"ghost",size:"icon",onClick:()=>L(),children:[g.jsx(mN,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Use Microphone"})]})}),g.jsx(Un,{side:"right",children:g.jsxs("span",{children:[c?"Send":"Start"," "]})})]})]})]})},KE=hr.memo(({minuteLeft:t,minuteRight:r,secondLeft:a,secondRight:s,timerClassName:o})=>g.jsx("div",{className:le("text-sm animate-in duration-1000 fade-in-0 select-none",o),children:g.jsxs("p",{children:[t,r,":",a,s]})}));KE.displayName="Timer";const Q_=({text:t})=>{const[r,a]=y.useState(!1),s=()=>{navigator.clipboard.writeText(t).then(()=>{a(!0),setTimeout(()=>a(!1),2e3)})};return g.jsxs(br,{children:[g.jsx(xr,{asChild:!0,children:g.jsx(Qe,{onClick:s,variant:"ghost",size:"icon",className:"flex items-center space-x-2 text-muted-foreground",children:r?g.jsx(Gm,{className:"size-4"}):g.jsx(cN,{className:"size-4"})})}),g.jsx(Un,{side:"bottom",children:g.jsx("p",{children:"Copy"})})]})},X_=ma("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function jm({className:t,variant:r,...a}){return g.jsx("div",{className:le(X_({variant:r}),t),...a})}function K_({agentId:t,text:r}){const{toast:a}=xn(),[s,o]=y.useState(!1),[c,f]=y.useState(null),d=y.useRef(null),m=Fl({mutationKey:["tts",r],mutationFn:()=>Lt.tts(t,r),onSuccess:E=>{f(E),p()},onError:E=>{a({variant:"destructive",title:"Unable to read message aloud",description:E.message})}}),p=()=>{d.current&&d.current.play().catch(E=>{console.error("Error playing audio:",E)}),o(!0)},v=()=>{d.current&&(d.current.pause(),d.current.currentTime=0),o(!1)},b=()=>{if(!(m!=null&&m.isPending)){if(s){v();return}if(c){p();return}}},x="text-muted-foreground size-4";return g.jsxs("div",{children:[c?g.jsxs("audio",{crossOrigin:"anonymous",playsInline:!0,ref:d,onEnded:()=>{o(!1)},autoPlay:!0,children:[g.jsx("source",{src:URL.createObjectURL(c),type:"audio/mpeg"}),"Your browser does not support the audio element."]}):null,g.jsxs(br,{children:[g.jsx(xr,{asChild:!0,children:g.jsx(Qe,{size:"icon",variant:"ghost",type:"button",onClick:()=>b(),disabled:m==null?void 0:m.isPending,children:m!=null&&m.isPending?g.jsx(lS,{className:x}):s?g.jsx(oN,{className:x}):g.jsx(EN,{className:x})})}),g.jsx(Un,{side:"bottom",children:g.jsx("p",{children:s?"Stop":"Read aloud"})})]})]})}function W_(t={}){const{offset:r=20,smooth:a=!1}=t,s=y.useRef(null),o=y.useRef(0),c=y.useRef(!1),[f,d]=y.useState({isAtBottom:!0,autoScrollEnabled:!0}),m=y.useCallback(x=>{const{scrollTop:E,scrollHeight:T,clientHeight:S}=x;return Math.abs(T-E-S)<=r},[r]),p=y.useCallback(x=>{if(!s.current)return;const E=s.current.scrollHeight-s.current.clientHeight;x?s.current.scrollTop=E:s.current.scrollTo({top:E,behavior:a?"smooth":"auto"}),d({isAtBottom:!0,autoScrollEnabled:!0}),c.current=!1},[a]),v=y.useCallback(()=>{if(!s.current)return;const x=m(s.current);d(E=>({isAtBottom:x,autoScrollEnabled:x?!0:E.autoScrollEnabled}))},[m]);y.useEffect(()=>{const x=s.current;if(x)return x.addEventListener("scroll",v,{passive:!0}),()=>x.removeEventListener("scroll",v)},[v]),y.useEffect(()=>{const x=s.current;if(!x)return;const E=x.scrollHeight;E!==o.current&&(f.autoScrollEnabled&&requestAnimationFrame(()=>{p(o.current===0)}),o.current=E)},[f.autoScrollEnabled,p]),y.useEffect(()=>{const x=s.current;if(!x)return;const E=new ResizeObserver(()=>{f.autoScrollEnabled&&p(!0)});return E.observe(x),()=>E.disconnect()},[f.autoScrollEnabled,p]);const b=y.useCallback(()=>{(s.current?m(s.current):!1)||(c.current=!0,d(E=>({...E,autoScrollEnabled:!1})))},[m]);return{scrollRef:s,isAtBottom:f.isAtBottom,autoScrollEnabled:f.autoScrollEnabled,scrollToBottom:()=>p(!1),disableAutoScroll:b}}function N0({message:t,agentId:r}){var a;return g.jsxs("div",{className:"flex flex-col",children:[g.jsxs(FE,{isLoading:t.isLoading,...t.name==="Anon"?{variant:"sent"}:{},children:[t.name==="Anon"?t.text:g.jsx(G_,{children:t.text}),g.jsx("div",{children:(a=t.attachments)==null?void 0:a.map(s=>g.jsxs("div",{className:"flex flex-col gap-1 mt-2",children:[g.jsx("img",{alt:"attachment",src:s.url,width:"100%",height:"100%",className:"w-64 rounded-md"}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsx("span",{}),g.jsx("span",{})]})]},`${s.url}-${s.title}`))})]}),g.jsxs("div",{className:"flex items-center gap-4 justify-between w-full mt-1",children:[t.text&&!t.isLoading?g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(Q_,{text:t.text}),g.jsx(K_,{agentId:r,text:t.text})]}):null,g.jsxs("div",{className:le([t.isLoading?"mt-2":"","flex items-center justify-between gap-4 select-none"]),children:[t.source?g.jsx(jm,{variant:"outline",children:t.source}):null,t.actions?g.jsx(jm,{variant:"outline",children:t.actions.join(", ")}):null,t.createdAt?g.jsx(H_,{timestamp:uO(t.createdAt).format("LT")}):null]})]})]})}function Z_({agentId:t}){var $,V;const{toast:r}=xn(),[a,s]=y.useState(null),[o,c]=y.useState(""),f=y.useRef(null),d=y.useRef(null),m=y.useRef(null),p=qn(),v=Ya.getWorldId(),{messages:b}=qj(t),x=(V=($=kj(t))==null?void 0:$.data)==null?void 0:V.data,E=k=>k!=="user"?"received":"sent",{scrollRef:T,isAtBottom:S,scrollToBottom:w,disableAutoScroll:C}=W_({smooth:!0});y.useEffect(()=>{w()},[p.getQueryData(["messages",t,v])]),y.useEffect(()=>{w()},[]);const N=k=>{if(k.key==="Enter"&&!k.shiftKey){if(k.preventDefault(),k.nativeEvent.isComposing)return;O(k)}},O=k=>{var te;if(k.preventDefault(),!o)return;const U=a?[{url:URL.createObjectURL(a),contentType:a.type,title:a.name}]:void 0,K=[{text:o,name:"Anon",createdAt:Date.now(),attachments:U,worldId:v},{text:o,name:"system",isLoading:!0,createdAt:Date.now(),worldId:v}];p.setQueryData(["messages",t,v],(se=[])=>[...se,...K]),_.mutate({message:o,selectedFile:a||null}),s(null),c(""),(te=m.current)==null||te.reset()};y.useEffect(()=>{f.current&&f.current.focus()},[]);const _=Fl({mutationKey:["send_message",t],mutationFn:({message:k,selectedFile:U})=>Lt.sendMessage(t,k,U),onSuccess:k=>{k?p.setQueryData(["messages",t,v],(U=[])=>[...U.filter(K=>!K.isLoading),{...k.data.message,createdAt:Date.now()}]):p.setQueryData(["messages",t,v],(U=[])=>[...U.filter(K=>!K.isLoading)])},onError:k=>{r({variant:"destructive",title:"Unable to send message",description:k.message})}}),L=k=>{var K;const U=(K=k.target.files)==null?void 0:K[0];U!=null&&U.type.startsWith("image/")&&s(U)};return g.jsxs("div",{className:"flex flex-col w-full h-[calc(100dvh)] p-4",children:[g.jsx("div",{className:"flex items-center justify-between mb-4 p-3 bg-card rounded-lg border",children:g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx($c,{className:"size-10 border rounded-full",children:g.jsx(qc,{src:"/elizaos-icon.png"})}),g.jsxs("div",{className:"flex flex-col",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("h2",{className:"font-semibold text-lg",children:(x==null?void 0:x.name)||"Agent"}),x!=null&&x.enabled?g.jsxs(br,{children:[g.jsx(xr,{asChild:!0,children:g.jsx("div",{className:"size-2.5 rounded-full bg-green-500 ring-2 ring-green-500/20 animate-pulse"})}),g.jsx(Un,{side:"right",children:g.jsx("p",{children:"Agent is active"})})]}):g.jsxs(br,{children:[g.jsx(xr,{asChild:!0,children:g.jsx("div",{className:"size-2.5 rounded-full bg-gray-300 ring-2 ring-gray-300/20"})}),g.jsx(Un,{side:"right",children:g.jsx("p",{children:"Agent is inactive"})})]})]}),(x==null?void 0:x.bio)&&g.jsx("p",{className:"text-sm text-muted-foreground line-clamp-1",children:Array.isArray(x.bio)?x.bio[0]:x.bio})]})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto",children:g.jsx(XE,{scrollRef:T,isAtBottom:S,scrollToBottom:w,disableAutoScroll:C,children:b.map(k=>g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem",padding:"1rem"},children:g.jsx(GE,{variant:E(k.name),className:"flex flex-row items-center gap-2",children:k.name!=="Anon"?g.jsxs(g.Fragment,{children:[g.jsx($c,{className:"size-8 p-1 border rounded-full select-none",children:g.jsx(qc,{src:"/elizaos-icon.png"})}),g.jsx(N0,{message:k,agentId:t})]}):g.jsxs(g.Fragment,{children:[g.jsx(N0,{message:k,agentId:t}),g.jsxs($c,{className:"size-8 p-1 border rounded-full select-none",children:[g.jsx(qc,{src:"/user-icon.png"}),g.jsx(YE,{children:"U"})]})]})})},k.name+k.createdAt))})}),g.jsx("div",{className:"px-4 pb-4",children:g.jsxs("form",{ref:m,onSubmit:O,className:"relative rounded-md border bg-card",children:[a?g.jsx("div",{className:"p-3 flex",children:g.jsxs("div",{className:"relative rounded-md border p-2",children:[g.jsx(Qe,{onClick:()=>s(null),className:"absolute -right-2 -top-2 size-[22px] ring-2 ring-background",variant:"outline",size:"icon",children:g.jsx(bs,{})}),g.jsx("img",{alt:"Selected file",src:URL.createObjectURL(a),height:"100%",width:"100%",className:"aspect-square object-contain w-16"})]})}):null,g.jsx(QE,{ref:f,onKeyDown:N,value:o,onChange:({target:k})=>c(k.value),placeholder:"Type your message here...",className:"min-h-12 resize-none rounded-md bg-card border-0 p-3 shadow-none focus-visible:ring-0"}),g.jsxs("div",{className:"flex items-center p-3 pt-0",children:[g.jsxs(br,{children:[g.jsx(xr,{asChild:!0,children:g.jsxs("div",{children:[g.jsxs(Qe,{variant:"ghost",size:"icon",onClick:()=>{d.current&&d.current.click()},children:[g.jsx(gN,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Attach file"})]}),g.jsx("input",{type:"file",ref:d,onChange:L,accept:"image/*",className:"hidden"})]})}),g.jsx(Un,{side:"left",children:g.jsx("p",{children:"Attach file"})})]}),g.jsx(F_,{agentId:t,onChange:k=>c(k)}),g.jsxs(Qe,{disabled:!o||(_==null?void 0:_.isPending),type:"submit",size:"sm",className:"ml-auto gap-1.5 h-[30px]",children:[_!=null&&_.isPending?"...":"Send Message",g.jsx(oS,{className:"size-3.5"})]})]})]})})]})}function J_(){const{agentId:t}=nE();return t?g.jsx(Z_,{agentId:t}):g.jsx("div",{children:"No data."})}var eL="Label",WE=y.forwardRef((t,r)=>g.jsx(we.label,{...t,ref:r,onMouseDown:a=>{var o;a.target.closest("button, input, select, textarea")||((o=t.onMouseDown)==null||o.call(t,a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));WE.displayName=eL;var ZE=WE;const tL=ma("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Kc=y.forwardRef(({className:t,...r},a)=>g.jsx(ZE,{ref:a,className:le(tL(),t),...r}));Kc.displayName=ZE.displayName;const nL=({tag:t,onRemove:r})=>g.jsxs(jm,{variant:"outline",className:"flex items-center gap-1.5 pr-1.5 text-sm py-1 px-2 transition-colors hover:bg-white hover:text-black dark:hover:text-black",children:[t,g.jsxs(Qe,{type:"button",variant:"ghost",size:"icon",onClick:()=>r(t),className:"hover:bg-muted/20 rounded-full p-0.5 transition-colors h-auto w-auto min-w-0 min-h-0",children:[g.jsx(bs,{className:"h-3 w-3"}),g.jsxs("span",{className:"sr-only",children:["Remove ",t]})]})]}),rL=({tags:t,onRemove:r})=>g.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:t.map(a=>g.jsx(nL,{tag:a,onRemove:r},a))}),aL=({value:t,onChange:r,onKeyDown:a})=>g.jsx(vr,{value:t,onChange:r,onKeyDown:a,placeholder:"Type and press Enter to add...",className:le("bg-background",!t&&"text-muted-foreground")});function iL({title:t,data:r,onChange:a}){const[s,o]=y.useState(""),c=d=>{if(d.key==="Enter"){d.preventDefault();const m=s.trim();m&&!r.includes(m)&&(a([...r,m]),o(""))}},f=d=>{a(r.filter(m=>m!==d))};return g.jsxs("div",{className:"space-y-2",children:[g.jsx(Kc,{children:t}),g.jsxs("div",{className:"p-2 bg-card rounded-md border",children:[g.jsx(rL,{tags:r,onRemove:f}),g.jsx(aL,{value:s,onChange:d=>o(d.target.value),onKeyDown:c})]})]})}const yu=y.forwardRef(({className:t,...r},a)=>g.jsx("div",{ref:a,className:le("rounded-xl border bg-card text-card-foreground shadow",t),...r}));yu.displayName="Card";const JE=y.forwardRef(({className:t,...r},a)=>g.jsx("div",{ref:a,className:le("flex flex-col space-y-1.5 p-6",t),...r}));JE.displayName="CardHeader";const e1=y.forwardRef(({className:t,...r},a)=>g.jsx("div",{ref:a,className:le("font-semibold leading-none tracking-tight",t),...r}));e1.displayName="CardTitle";const sL=y.forwardRef(({className:t,...r},a)=>g.jsx("div",{ref:a,className:le("text-sm text-muted-foreground",t),...r}));sL.displayName="CardDescription";const wp=y.forwardRef(({className:t,...r},a)=>g.jsx("div",{ref:a,className:le("p-6 pt-0",t),...r}));wp.displayName="CardContent";const t1=y.forwardRef(({className:t,...r},a)=>g.jsx("div",{ref:a,className:le("flex items-center p-6 pt-0",t),...r}));t1.displayName="CardFooter";var lL=y.createContext(void 0);function bu(t){const r=y.useContext(lL);return t||r||"ltr"}var fh="rovingFocusGroup.onEntryFocus",oL={bubbles:!1,cancelable:!0},xu="RovingFocusGroup",[Dm,n1,cL]=gp(xu),[uL,r1]=Bn(xu,[cL]),[fL,dL]=uL(xu),a1=y.forwardRef((t,r)=>g.jsx(Dm.Provider,{scope:t.__scopeRovingFocusGroup,children:g.jsx(Dm.Slot,{scope:t.__scopeRovingFocusGroup,children:g.jsx(hL,{...t,ref:r})})}));a1.displayName=xu;var hL=y.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:a,orientation:s,loop:o=!1,dir:c,currentTabStopId:f,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:m,onEntryFocus:p,preventScrollOnEntryFocus:v=!1,...b}=t,x=y.useRef(null),E=Ue(r,x),T=bu(c),[S=null,w]=ni({prop:f,defaultProp:d,onChange:m}),[C,N]=y.useState(!1),O=nt(p),_=n1(a),L=y.useRef(!1),[$,V]=y.useState(0);return y.useEffect(()=>{const k=x.current;if(k)return k.addEventListener(fh,O),()=>k.removeEventListener(fh,O)},[O]),g.jsx(fL,{scope:a,orientation:s,dir:T,loop:o,currentTabStopId:S,onItemFocus:y.useCallback(k=>w(k),[w]),onItemShiftTab:y.useCallback(()=>N(!0),[]),onFocusableItemAdd:y.useCallback(()=>V(k=>k+1),[]),onFocusableItemRemove:y.useCallback(()=>V(k=>k-1),[]),children:g.jsx(we.div,{tabIndex:C||$===0?-1:0,"data-orientation":s,...b,ref:E,style:{outline:"none",...t.style},onMouseDown:ve(t.onMouseDown,()=>{L.current=!0}),onFocus:ve(t.onFocus,k=>{const U=!L.current;if(k.target===k.currentTarget&&U&&!C){const K=new CustomEvent(fh,oL);if(k.currentTarget.dispatchEvent(K),!K.defaultPrevented){const te=_().filter(j=>j.focusable),se=te.find(j=>j.active),de=te.find(j=>j.id===S),H=[se,de,...te].filter(Boolean).map(j=>j.ref.current);l1(H,v)}}L.current=!1}),onBlur:ve(t.onBlur,()=>N(!1))})})}),i1="RovingFocusGroupItem",s1=y.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:a,focusable:s=!0,active:o=!1,tabStopId:c,...f}=t,d=yr(),m=c||d,p=dL(i1,a),v=p.currentTabStopId===m,b=n1(a),{onFocusableItemAdd:x,onFocusableItemRemove:E}=p;return y.useEffect(()=>{if(s)return x(),()=>E()},[s,x,E]),g.jsx(Dm.ItemSlot,{scope:a,id:m,focusable:s,active:o,children:g.jsx(we.span,{tabIndex:v?0:-1,"data-orientation":p.orientation,...f,ref:r,onMouseDown:ve(t.onMouseDown,T=>{s?p.onItemFocus(m):T.preventDefault()}),onFocus:ve(t.onFocus,()=>p.onItemFocus(m)),onKeyDown:ve(t.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){p.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const S=gL(T,p.orientation,p.dir);if(S!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let C=b().filter(N=>N.focusable).map(N=>N.ref.current);if(S==="last")C.reverse();else if(S==="prev"||S==="next"){S==="prev"&&C.reverse();const N=C.indexOf(T.currentTarget);C=p.loop?vL(C,N+1):C.slice(N+1)}setTimeout(()=>l1(C))}})})})});s1.displayName=i1;var mL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function pL(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function gL(t,r,a){const s=pL(t.key,a);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return mL[s]}function l1(t,r=!1){const a=document.activeElement;for(const s of t)if(s===a||(s.focus({preventScroll:r}),document.activeElement!==a))return}function vL(t,r){return t.map((a,s)=>t[(r+s)%t.length])}var yL=a1,bL=s1,Ep="Tabs",[xL,vz]=Bn(Ep,[r1]),o1=r1(),[SL,Rp]=xL(Ep),c1=y.forwardRef((t,r)=>{const{__scopeTabs:a,value:s,onValueChange:o,defaultValue:c,orientation:f="horizontal",dir:d,activationMode:m="automatic",...p}=t,v=bu(d),[b,x]=ni({prop:s,onChange:o,defaultProp:c});return g.jsx(SL,{scope:a,baseId:yr(),value:b,onValueChange:x,orientation:f,dir:v,activationMode:m,children:g.jsx(we.div,{dir:v,"data-orientation":f,...p,ref:r})})});c1.displayName=Ep;var u1="TabsList",f1=y.forwardRef((t,r)=>{const{__scopeTabs:a,loop:s=!0,...o}=t,c=Rp(u1,a),f=o1(a);return g.jsx(yL,{asChild:!0,...f,orientation:c.orientation,dir:c.dir,loop:s,children:g.jsx(we.div,{role:"tablist","aria-orientation":c.orientation,...o,ref:r})})});f1.displayName=u1;var d1="TabsTrigger",h1=y.forwardRef((t,r)=>{const{__scopeTabs:a,value:s,disabled:o=!1,...c}=t,f=Rp(d1,a),d=o1(a),m=g1(f.baseId,s),p=v1(f.baseId,s),v=s===f.value;return g.jsx(bL,{asChild:!0,...d,focusable:!o,active:v,children:g.jsx(we.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":p,"data-state":v?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:m,...c,ref:r,onMouseDown:ve(t.onMouseDown,b=>{!o&&b.button===0&&b.ctrlKey===!1?f.onValueChange(s):b.preventDefault()}),onKeyDown:ve(t.onKeyDown,b=>{[" ","Enter"].includes(b.key)&&f.onValueChange(s)}),onFocus:ve(t.onFocus,()=>{const b=f.activationMode!=="manual";!v&&!o&&b&&f.onValueChange(s)})})})});h1.displayName=d1;var m1="TabsContent",p1=y.forwardRef((t,r)=>{const{__scopeTabs:a,value:s,forceMount:o,children:c,...f}=t,d=Rp(m1,a),m=g1(d.baseId,s),p=v1(d.baseId,s),v=s===d.value,b=y.useRef(v);return y.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),g.jsx(ln,{present:o||v,children:({present:x})=>g.jsx(we.div,{"data-state":v?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":m,hidden:!x,id:p,tabIndex:0,...f,ref:r,style:{...t.style,animationDuration:b.current?"0s":void 0},children:x&&c})})});p1.displayName=m1;function g1(t,r){return`${t}-trigger-${r}`}function v1(t,r){return`${t}-content-${r}`}var wL=c1,y1=f1,b1=h1,x1=p1;const EL=wL,S1=y.forwardRef(({className:t,...r},a)=>g.jsx(y1,{ref:a,className:le("inline-flex h-9 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...r}));S1.displayName=y1.displayName;const _m=y.forwardRef(({className:t,...r},a)=>g.jsx(b1,{ref:a,className:le("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t),...r}));_m.displayName=b1.displayName;const Lm=y.forwardRef(({className:t,...r},a)=>g.jsx(x1,{ref:a,className:le("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...r}));Lm.displayName=x1.displayName;const O0=[{sectionTitle:"Basic Info",sectionValue:"basic",sectionType:"input",fields:[{title:"Name",name:"name",description:"The display name of your character",fieldType:"text",getValue:t=>t.name||""},{title:"Username",name:"username",description:"Unique identifier for your character",fieldType:"text",getValue:t=>t.username||""},{title:"System",name:"system",description:"System prompt for character behavior",fieldType:"textarea",getValue:t=>t.system||""},{title:"Voice Model",name:"settings.voice.model",description:"Voice model used for speech synthesis",fieldType:"text",getValue:t=>{var r,a;return((a=(r=t.settings)==null?void 0:r.voice)==null?void 0:a.model)||""}}]},{sectionTitle:"Content",sectionValue:"content",sectionType:"array",fields:[{title:"Bio",description:"Key information about your character",path:"bio",getData:t=>Array.isArray(t.bio)?t.bio:[]},{title:"Topics",description:"Topics your character is knowledgeable about",path:"topics",getData:t=>t.topics||[]},{title:"Adjectives",description:"Words that describe your character's personality",path:"adjectives",getData:t=>t.adjectives||[]}]},{sectionTitle:"Style",sectionValue:"style",sectionType:"array",fields:[{title:"All",description:"Style rules applied to all interactions",path:"style.all",getData:t=>{var r;return((r=t.style)==null?void 0:r.all)||[]}},{title:"Chat",description:"Style rules for chat interactions",path:"style.chat",getData:t=>{var r;return((r=t.style)==null?void 0:r.chat)||[]}},{title:"Post",description:"Style rules for social media posts",path:"style.post",getData:t=>{var r;return((r=t.style)==null?void 0:r.post)||[]}}]}];function w1({characterValue:t,setCharacterValue:r,title:a,description:s,onSubmit:o,onDelete:c,onReset:f,customComponents:d=[]}){const{toast:m}=xn(),[p,v]=y.useState(!1),b=w=>{const{name:C,value:N,type:O}=w.target,_=w.target.checked;if(C.includes(".")){const L=C.split(".");r($=>{const V={...$};let k=V;for(let U=0;U<L.length-1;U++)k[L[U]]||(k[L[U]]={}),k=k[L[U]];return k[L[L.length-1]]=O==="checkbox"?_:N,V})}else r(L=>({...L,[C]:O==="checkbox"?_:N}))},x=(w,C)=>{r(N=>{const O={...N},_=w.split(".");let L=O;for(let $=0;$<_.length-1;$++){const V=_[$];(!L[V]||typeof L[V]!="object")&&(L[V]={}),L=L[V]}return L[_[_.length-1]]=C,O})},E=async w=>{w.preventDefault(),v(!0);try{await o(t)}catch(C){m({title:"Error",description:C instanceof Error?C.message:"Failed to update",variant:"destructive"})}finally{v(!1)}},T=w=>g.jsxs("div",{className:"space-y-2",children:[g.jsx(Kc,{htmlFor:w.name,children:w.title}),w.description&&g.jsx("p",{className:"text-sm text-muted-foreground",children:w.description}),w.fieldType==="textarea"?g.jsx(Sp,{id:w.name,name:w.name,value:w.getValue(t),onChange:b,className:"min-h-[120px] resize-y"}):w.fieldType==="checkbox"?g.jsx(vr,{id:w.name,name:w.name,type:"checkbox",checked:t[w.name]==="true",onChange:b}):g.jsx(vr,{id:w.name,name:w.name,type:w.fieldType,value:w.getValue(t),onChange:b})]},w.name),S=w=>g.jsxs("div",{className:"space-y-2",children:[g.jsx(Kc,{htmlFor:w.path,children:w.title}),w.description&&g.jsx("p",{className:"text-sm text-muted-foreground",children:w.description}),g.jsx(iL,{data:w.getData(t),onChange:C=>x(w.path,C)})]},w.path);return g.jsxs("div",{className:"container max-w-4xl mx-auto p-6",children:[g.jsx("div",{className:"flex items-center justify-between mb-6",children:g.jsxs("div",{children:[g.jsx("h1",{className:"text-3xl font-bold",children:a}),g.jsx("p",{className:"text-muted-foreground mt-1",children:s})]})}),g.jsxs("form",{onSubmit:E,children:[g.jsxs(EL,{defaultValue:"basic",className:"w-full",children:[g.jsxs(S1,{className:"grid w-full mb-6",style:{gridTemplateColumns:`repeat(${d.length+3}, minmax(0, 1fr))`},children:[O0.map(w=>g.jsx(_m,{value:w.sectionValue,children:w.sectionTitle},w.sectionValue)),d.map((w,C)=>g.jsx(_m,{value:`custom-${C}`,children:w.name},`custom-${C}`))]}),g.jsx(yu,{children:g.jsxs(wp,{className:"p-6",children:[O0.map(w=>g.jsx(Lm,{value:w.sectionValue,className:"space-y-6",children:w.sectionType==="input"?w.fields.map(T):w.fields.map(S)},w.sectionValue)),d.map((w,C)=>g.jsx(Lm,{value:`custom-${C}`,children:w.component},`custom-${C}`))]})})]}),g.jsxs("div",{className:"flex justify-between gap-4 mt-6",children:[g.jsx("div",{className:"flex gap-4 text-red-500",children:g.jsx(Qe,{type:"button",variant:"outline",onClick:()=>{c==null||c()},children:"Delete Character"})}),g.jsxs("div",{className:"flex gap-4",children:[g.jsx(Qe,{type:"button",variant:"outline",onClick:()=>{f==null||f()},children:"Reset Changes"}),g.jsx(Qe,{type:"submit",disabled:p,children:p?"Saving...":"Save Changes"})]})]})]})]})}function RL(){return ys({queryKey:["plugins"],queryFn:async()=>(await fetch("https://raw.githubusercontent.com/elizaos-plugins/registry/refs/heads/main/index.json")).json()})}const TL=XS,CL=P2,AL=KS,E1=y.forwardRef(({className:t,...r},a)=>g.jsx(nu,{ref:a,className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r}));E1.displayName=nu.displayName;const R1=y.forwardRef(({className:t,children:r,...a},s)=>g.jsxs(AL,{children:[g.jsx(E1,{}),g.jsxs(ru,{ref:s,className:le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...a,children:[r,g.jsxs(WS,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[g.jsx(bs,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));R1.displayName=ru.displayName;const T1=({className:t,...r})=>g.jsx("div",{className:le("flex flex-col space-y-1.5 text-center sm:text-left",t),...r});T1.displayName="DialogHeader";const C1=y.forwardRef(({className:t,...r},a)=>g.jsx(au,{ref:a,className:le("text-lg font-semibold leading-none tracking-tight",t),...r}));C1.displayName=au.displayName;const NL=y.forwardRef(({className:t,...r},a)=>g.jsx(iu,{ref:a,className:le("text-sm text-muted-foreground",t),...r}));NL.displayName=iu.displayName;function A1({characterValue:t,setCharacterValue:r}){const{data:a,error:s}=RL(),[o,c]=y.useState(""),[f,d]=y.useState(!1),m=y.useMemo(()=>a?Object.keys(a).map(x=>x.replace(/^@elizaos-plugins\//,"@elizaos/")):[],[a]),p=y.useMemo(()=>Array.isArray(t==null?void 0:t.plugins)?t.plugins:[],[t==null?void 0:t.plugins]),v=y.useMemo(()=>m.filter(x=>!p.includes(x)).filter(x=>x.toLowerCase().includes(o.toLowerCase())),[m,p,o]),b=x=>{r(E=>{const T=Array.isArray(E.plugins)?E.plugins:[],S=T.includes(x)?T.filter(w=>w!==x):[...T,x];return{...E,plugins:S}})};return g.jsx("div",{className:"space-y-6",children:g.jsx("div",{className:"space-y-4",children:g.jsxs("div",{children:[g.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Plugins"}),s?g.jsxs("p",{className:"text-destructive",children:["Failed to load plugins: ",s.message]}):g.jsxs("div",{className:"space-y-4",children:[p.length>0&&g.jsxs("div",{className:"rounded-md bg-muted p-4",children:[g.jsx("h4",{className:"text-sm font-medium mb-2",children:"Currently Enabled"}),g.jsx("div",{className:"flex flex-wrap gap-2",children:p.map(x=>g.jsxs(Qe,{type:"button",variant:"ghost",size:"sm",className:"inline-flex items-center rounded-full bg-primary/10 px-2.5 py-0.5 text-xs font-medium text-primary hover:bg-primary/20 h-auto",onClick:()=>b(x),children:[x," ×"]},x))})]}),g.jsx("div",{className:"space-y-2",children:g.jsxs(TL,{open:f,onOpenChange:d,children:[g.jsx(CL,{asChild:!0,children:g.jsx(Qe,{variant:"outline",className:"w-full justify-start",children:"Search and add plugins..."})}),g.jsxs(R1,{className:"max-w-[400px]",children:[g.jsx(T1,{children:g.jsx(C1,{children:"Add Plugins"})}),g.jsxs("div",{className:"space-y-4 py-4",children:[g.jsx("div",{className:"space-y-2",children:g.jsx(vr,{type:"search",placeholder:"Search plugins...",value:o,onChange:x=>c(x.target.value)})}),g.jsx("div",{className:"max-h-[300px] overflow-y-auto space-y-2",children:v.length===0?g.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins found."}):v.map(x=>g.jsx(Qe,{variant:"ghost",className:"w-full justify-start font-normal",onClick:()=>{b(x),c(""),d(!1)},children:x},x))})]})]})]})})]})]})})})}function N1({characterValue:t,setCharacterValue:r}){var L;const[a,s]=y.useState(Object.entries(((L=t==null?void 0:t.settings)==null?void 0:L.secrets)||{}).map(([$,V])=>({name:$,value:String(V)}))),[o,c]=y.useState(""),[f,d]=y.useState(""),[m,p]=y.useState(!1),[v,b]=y.useState(null),[x,E]=y.useState(null),[T,S]=y.useState(""),w=y.useRef(null),C=()=>{o&&f&&(s([...a,{name:o,value:f}]),c(""),d(""))},N=$=>{E($),S(a[$].value),b(null)},O=$=>{const V=[...a];V[$].value=T,s(V),E(null)},_=$=>{s(a.filter((V,k)=>k!==$)),b(null),E(null)};return y.useEffect(()=>{const $=V=>{w.current&&!w.current.contains(V.target)&&b(null)};return document.addEventListener("mousedown",$),()=>{document.removeEventListener("mousedown",$)}},[]),y.useEffect(()=>{r($=>({...$,settings:{...$.settings,secrets:Object.fromEntries(a.map(({name:V,value:k})=>[V,k]))}}))},[a,r]),g.jsxs("div",{className:"rounded-lg w-full",children:[g.jsx("h2",{className:"text-xl font-bold mb-4 pb-5 ml-1",children:"Environment Settings"}),g.jsxs("div",{className:"grid grid-cols-[1fr_2fr_auto] gap-4 items-end w-full pb-4",children:[g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("label",{className:"ml-2 text-xs font-medium text-gray-400",children:"NAME"}),g.jsx(vr,{placeholder:"VARIABLE_NAME",value:o,onChange:$=>c($.target.value)})]}),g.jsxs("div",{className:"flex flex-col gap-1 relative",children:[g.jsx("label",{className:"ml-2 text-xs font-medium text-gray-400",children:"VALUE"}),g.jsxs("div",{className:"relative",children:[g.jsx(vr,{type:m?"text":"password",placeholder:"i9ju23nfsdf56",value:f,onChange:$=>d($.target.value),className:"pr-10"}),g.jsx("div",{className:"absolute inset-y-0 right-3 flex items-center cursor-pointer text-gray-500",onClick:()=>p(!m),children:m?g.jsx(fN,{}):g.jsx(dN,{})})]})]}),g.jsx(Qe,{className:"shrink-0",onClick:C,children:"Add"})]}),a.length>0&&g.jsxs("div",{className:"grid grid-cols-[1fr_2fr_auto] gap-4 mt-6 font-medium text-gray-400 border-b pb-2 ml-1",children:[g.jsx("div",{children:"Name"}),g.jsx("div",{children:"Value"}),g.jsx("div",{children:"Action"})]}),g.jsx("div",{className:"mt-2",children:a.map(($,V)=>g.jsxs("div",{className:"grid grid-cols-[1fr_2fr_auto] gap-4 items-center border-b py-2 ml-1 relative",children:[g.jsx("div",{children:$.name}),g.jsx("div",{children:x===V?g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(vr,{value:T,onChange:k=>S(k.target.value),className:"w-full"}),g.jsx(Qe,{variant:"ghost",onClick:()=>O(V),children:g.jsx(Gm,{className:"w-5 h-5 text-green-500"})}),g.jsx(Qe,{variant:"ghost",onClick:()=>E(null),children:g.jsx(bs,{className:"w-5 h-5 text-red-500"})})]}):g.jsx("div",{className:"truncate text-gray-500",children:"Encrypted"})}),g.jsxs("div",{className:"relative",children:[g.jsx(Qe,{variant:"ghost",className:"p-2 text-gray-500",onClick:()=>b(v===V?null:V),children:g.jsx(uN,{className:"w-5 h-5"})}),v===V&&g.jsxs("div",{className:"absolute right-0 -top-2 mt-2 w-24 bg-muted border rounded shadow-md z-10",ref:w,children:[g.jsx("div",{className:"w-full px-4 py-2 text-left hover:opacity-50 cursor-pointer",onClick:()=>N(V),children:"Edit"}),g.jsx("div",{className:"w-full px-4 py-2 text-left text-red-500 hover:opacity-50 cursor-pointer",onClick:()=>_(V),children:"Remove"})]})]})]},V))})]})}function OL({agent:t,agentId:r}){const{toast:a}=xn(),s=to(),o=qn(),[c,f]=y.useState(t),d=async p=>{try{if(!r)throw new Error("Agent ID is missing");const v={...p,plugins:c.plugins};await Lt.updateAgent(r,v),o.invalidateQueries({queryKey:["agent",r]}),o.invalidateQueries({queryKey:["agents"]}),s("/"),a({title:"Success",description:"Agent updated and restarted successfully"})}catch(v){throw a({title:"Error",description:v instanceof Error?v.message:"Failed to update agent",variant:"destructive"}),v}},m=async p=>{try{await Lt.deleteAgent(p.id),o.invalidateQueries({queryKey:["agents"]}),s("/")}catch(v){console.error("Error deleting agent:",v)}};return g.jsx(w1,{characterValue:c,setCharacterValue:f,title:"Character Settings",description:"Configure your AI character's behavior and capabilities",onSubmit:d,onReset:()=>f(t),onDelete:()=>m(t),isAgent:!0,customComponents:[{name:"Plugins",component:g.jsx(A1,{characterValue:c,setCharacterValue:f})},{name:"Secret",component:g.jsx(N1,{characterValue:c,setCharacterValue:f})}]})}function ML(){var s;const{agentId:t}=nE(),r=ys({queryKey:["agent",t],queryFn:()=>Lt.getAgent(t??""),staleTime:kn.FREQUENT,refetchInterval:5e3,enabled:!!t});if(!t)return g.jsx("div",{children:"No data."});const a=(s=r==null?void 0:r.data)==null?void 0:s.data;return a?g.jsx(OL,{agent:a,agentId:t}):null}function O1({title:t,subtitle:r}){return g.jsxs("div",{className:"space-y-0.5",children:[g.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:t}),r?g.jsx("p",{className:"text-muted-foreground",children:r}):null]})}function jL({title:t,content:r,buttons:a}){return g.jsxs(yu,{className:"h-full",children:[g.jsx(JE,{className:"pb-2 pt-3",children:g.jsx(e1,{className:"text-base",children:t})}),g.jsx(wp,{className:"p-3",children:g.jsx("div",{className:"rounded-md bg-muted w-full mb-3",style:{aspectRatio:"1 / 1"},children:g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("div",{className:"text-4xl font-bold uppercase",children:r})})})}),g.jsx(t1,{className:"p-3 pb-4",children:g.jsx("div",{className:"flex items-center gap-2 w-full",children:a.map(({label:s,icon:o,action:c,className:f,variant:d,size:m,disabled:p},v)=>g.jsxs(Qe,{variant:d,className:f,onClick:c,size:m,disabled:p,children:[o,s&&g.jsx("span",{children:s})]},v))})})]})}function DL(){const t=to(),r=qn(),{toast:a}=xn(),s=Hj(),o=$j(),[c,f]=y.useState([]),[d,m]=y.useState([]);return{startAgent:async E=>{if(!E.id){a({title:"Error",description:"Agent ID is missing",variant:"destructive"});return}const T=E.id;if(!c.includes(T))try{f(S=>[...S,T]),await s.mutateAsync(T),r.invalidateQueries({queryKey:["active-agents"]}),t(`/chat/${T}`)}catch(S){console.error("Failed to start agent:",S),a({title:"Error Starting Agent",description:S instanceof Error?S.message:"Failed to start agent",variant:"destructive"})}finally{f(S=>S.filter(w=>w!==T))}},stopAgent:async E=>{if(!E.id){a({title:"Error",description:"Agent ID is missing",variant:"destructive"});return}const T=E.id;if(!d.includes(T))try{m(S=>[...S,T]),await o.mutateAsync(T),r.invalidateQueries({queryKey:["active-agents"]}),a({title:"Agent Stopped",description:`${E.name} has been stopped`})}catch(S){console.error("Failed to stop agent:",S),a({title:"Error Stopping Agent",description:S instanceof Error?S.message:"Failed to stop agent",variant:"destructive"})}finally{m(S=>S.filter(w=>w!==T))}},isAgentStarting:E=>E?c.includes(E):!1,isAgentStopping:E=>E?d.includes(E):!1,startingAgents:c,stoppingAgents:d}}function _L(){const{data:{data:t}={},isLoading:r,isError:a,error:s}=Gw(),o=to(),{startAgent:c,stopAgent:f,isAgentStarting:d,isAgentStopping:m}=DL(),p=(t==null?void 0:t.agents)||[];return g.jsxs("div",{className:"flex flex-col gap-4 h-full p-4",children:[g.jsx("div",{className:"flex items-center justify-between",children:g.jsx(O1,{title:"Agents"})}),r&&g.jsx("div",{className:"text-center py-8",children:"Loading agents..."}),a&&g.jsxs("div",{className:"text-center py-8 text-destructive",children:["Error loading agents:"," ",s instanceof Error?s.message:"Unknown error"]}),p.length===0&&!r&&g.jsx("div",{className:"text-center py-8 flex flex-col items-center gap-4",children:g.jsx("p",{className:"text-muted-foreground",children:"No agents currently running. Start a character to begin."})}),!r&&!a&&g.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[p==null?void 0:p.sort((v,b)=>Number(b==null?void 0:b.enabled)-Number(v==null?void 0:v.enabled)).map(v=>{const b=v.status==="active",x=d(v.id),E=m(v.id),T=x||E;let S="Start",w=g.jsx(vN,{});return x?(S="Starting...",w=g.jsx(qb,{className:"animate-spin"})):E?(S="Stopping...",w=g.jsx(qb,{className:"animate-spin"})):b&&(S="Stop",w=g.jsx(SN,{fill:"#EF4444",size:16})),g.jsx(jL,{title:v.name,content:fO(v.name),buttons:[{label:S,icon:w,action:()=>{T||(b?f(v):c(v))},className:`w-full grow ${b?"text-red-500":""} ${T?"opacity-80 cursor-not-allowed":""}`,variant:b?"secondary":"default",disabled:T},{icon:g.jsx(hN,{style:{height:14,width:14}}),className:"w-10 h-10 rounded-full",action:()=>o(`/chat/${v.id}`),variant:"outline",disabled:!b},{icon:g.jsx(sS,{style:{height:16,width:16}}),className:"w-10 h-10 rounded-full",action:()=>o(`/settings/${v.id}`),variant:"outline"}]},v.id)}),g.jsx(yu,{className:"flex flex-col items-center justify-center h-full cursor-pointer hover:bg-accent/50 transition-colors",onClick:()=>o("/create"),children:g.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 p-8",children:[g.jsx(yN,{size:40,className:"text-muted-foreground"}),g.jsx("span",{className:"text-muted-foreground whitespace-nowrap",children:"Create New Agent"})]})})]})]})}var Nc={exports:{}},dh,M0;function Su(){if(M0)return dh;M0=1;const t="2.0.0",r=256,a=Number.MAX_SAFE_INTEGER||9007199254740991,s=16,o=r-6;return dh={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:o,MAX_SAFE_INTEGER:a,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},dh}var hh,j0;function wu(){if(j0)return hh;j0=1;var t={};return hh=typeof process=="object"&&t&&t.NODE_DEBUG&&/\bsemver\b/i.test(t.NODE_DEBUG)?(...a)=>console.error("SEMVER",...a):()=>{},hh}var D0;function ro(){return D0||(D0=1,function(t,r){const{MAX_SAFE_COMPONENT_LENGTH:a,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:o}=Su(),c=wu();r=t.exports={};const f=r.re=[],d=r.safeRe=[],m=r.src=[],p=r.safeSrc=[],v=r.t={};let b=0;const x="[a-zA-Z0-9-]",E=[["\\s",1],["\\d",o],[x,s]],T=w=>{for(const[C,N]of E)w=w.split(`${C}*`).join(`${C}{0,${N}}`).split(`${C}+`).join(`${C}{1,${N}}`);return w},S=(w,C,N)=>{const O=T(C),_=b++;c(w,_,C),v[w]=_,m[_]=C,p[_]=O,f[_]=new RegExp(C,N?"g":void 0),d[_]=new RegExp(O,N?"g":void 0)};S("NUMERICIDENTIFIER","0|[1-9]\\d*"),S("NUMERICIDENTIFIERLOOSE","\\d+"),S("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${x}*`),S("MAINVERSION",`(${m[v.NUMERICIDENTIFIER]})\\.(${m[v.NUMERICIDENTIFIER]})\\.(${m[v.NUMERICIDENTIFIER]})`),S("MAINVERSIONLOOSE",`(${m[v.NUMERICIDENTIFIERLOOSE]})\\.(${m[v.NUMERICIDENTIFIERLOOSE]})\\.(${m[v.NUMERICIDENTIFIERLOOSE]})`),S("PRERELEASEIDENTIFIER",`(?:${m[v.NUMERICIDENTIFIER]}|${m[v.NONNUMERICIDENTIFIER]})`),S("PRERELEASEIDENTIFIERLOOSE",`(?:${m[v.NUMERICIDENTIFIERLOOSE]}|${m[v.NONNUMERICIDENTIFIER]})`),S("PRERELEASE",`(?:-(${m[v.PRERELEASEIDENTIFIER]}(?:\\.${m[v.PRERELEASEIDENTIFIER]})*))`),S("PRERELEASELOOSE",`(?:-?(${m[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${m[v.PRERELEASEIDENTIFIERLOOSE]})*))`),S("BUILDIDENTIFIER",`${x}+`),S("BUILD",`(?:\\+(${m[v.BUILDIDENTIFIER]}(?:\\.${m[v.BUILDIDENTIFIER]})*))`),S("FULLPLAIN",`v?${m[v.MAINVERSION]}${m[v.PRERELEASE]}?${m[v.BUILD]}?`),S("FULL",`^${m[v.FULLPLAIN]}$`),S("LOOSEPLAIN",`[v=\\s]*${m[v.MAINVERSIONLOOSE]}${m[v.PRERELEASELOOSE]}?${m[v.BUILD]}?`),S("LOOSE",`^${m[v.LOOSEPLAIN]}$`),S("GTLT","((?:<|>)?=?)"),S("XRANGEIDENTIFIERLOOSE",`${m[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),S("XRANGEIDENTIFIER",`${m[v.NUMERICIDENTIFIER]}|x|X|\\*`),S("XRANGEPLAIN",`[v=\\s]*(${m[v.XRANGEIDENTIFIER]})(?:\\.(${m[v.XRANGEIDENTIFIER]})(?:\\.(${m[v.XRANGEIDENTIFIER]})(?:${m[v.PRERELEASE]})?${m[v.BUILD]}?)?)?`),S("XRANGEPLAINLOOSE",`[v=\\s]*(${m[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[v.XRANGEIDENTIFIERLOOSE]})(?:${m[v.PRERELEASELOOSE]})?${m[v.BUILD]}?)?)?`),S("XRANGE",`^${m[v.GTLT]}\\s*${m[v.XRANGEPLAIN]}$`),S("XRANGELOOSE",`^${m[v.GTLT]}\\s*${m[v.XRANGEPLAINLOOSE]}$`),S("COERCEPLAIN",`(^|[^\\d])(\\d{1,${a}})(?:\\.(\\d{1,${a}}))?(?:\\.(\\d{1,${a}}))?`),S("COERCE",`${m[v.COERCEPLAIN]}(?:$|[^\\d])`),S("COERCEFULL",m[v.COERCEPLAIN]+`(?:${m[v.PRERELEASE]})?(?:${m[v.BUILD]})?(?:$|[^\\d])`),S("COERCERTL",m[v.COERCE],!0),S("COERCERTLFULL",m[v.COERCEFULL],!0),S("LONETILDE","(?:~>?)"),S("TILDETRIM",`(\\s*)${m[v.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",S("TILDE",`^${m[v.LONETILDE]}${m[v.XRANGEPLAIN]}$`),S("TILDELOOSE",`^${m[v.LONETILDE]}${m[v.XRANGEPLAINLOOSE]}$`),S("LONECARET","(?:\\^)"),S("CARETTRIM",`(\\s*)${m[v.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",S("CARET",`^${m[v.LONECARET]}${m[v.XRANGEPLAIN]}$`),S("CARETLOOSE",`^${m[v.LONECARET]}${m[v.XRANGEPLAINLOOSE]}$`),S("COMPARATORLOOSE",`^${m[v.GTLT]}\\s*(${m[v.LOOSEPLAIN]})$|^$`),S("COMPARATOR",`^${m[v.GTLT]}\\s*(${m[v.FULLPLAIN]})$|^$`),S("COMPARATORTRIM",`(\\s*)${m[v.GTLT]}\\s*(${m[v.LOOSEPLAIN]}|${m[v.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",S("HYPHENRANGE",`^\\s*(${m[v.XRANGEPLAIN]})\\s+-\\s+(${m[v.XRANGEPLAIN]})\\s*$`),S("HYPHENRANGELOOSE",`^\\s*(${m[v.XRANGEPLAINLOOSE]})\\s+-\\s+(${m[v.XRANGEPLAINLOOSE]})\\s*$`),S("STAR","(<|>)?=?\\s*\\*"),S("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),S("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Nc,Nc.exports)),Nc.exports}var mh,_0;function Tp(){if(_0)return mh;_0=1;const t=Object.freeze({loose:!0}),r=Object.freeze({});return mh=s=>s?typeof s!="object"?t:s:r,mh}var ph,L0;function M1(){if(L0)return ph;L0=1;const t=/^[0-9]+$/,r=(s,o)=>{const c=t.test(s),f=t.test(o);return c&&f&&(s=+s,o=+o),s===o?0:c&&!f?-1:f&&!c?1:s<o?-1:1};return ph={compareIdentifiers:r,rcompareIdentifiers:(s,o)=>r(o,s)},ph}var gh,z0;function Nt(){if(z0)return gh;z0=1;const t=wu(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:a}=Su(),{safeRe:s,safeSrc:o,t:c}=ro(),f=Tp(),{compareIdentifiers:d}=M1();class m{constructor(v,b){if(b=f(b),v instanceof m){if(v.loose===!!b.loose&&v.includePrerelease===!!b.includePrerelease)return v;v=v.version}else if(typeof v!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof v}".`);if(v.length>r)throw new TypeError(`version is longer than ${r} characters`);t("SemVer",v,b),this.options=b,this.loose=!!b.loose,this.includePrerelease=!!b.includePrerelease;const x=v.trim().match(b.loose?s[c.LOOSE]:s[c.FULL]);if(!x)throw new TypeError(`Invalid Version: ${v}`);if(this.raw=v,this.major=+x[1],this.minor=+x[2],this.patch=+x[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");x[4]?this.prerelease=x[4].split(".").map(E=>{if(/^[0-9]+$/.test(E)){const T=+E;if(T>=0&&T<a)return T}return E}):this.prerelease=[],this.build=x[5]?x[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(v){if(t("SemVer.compare",this.version,this.options,v),!(v instanceof m)){if(typeof v=="string"&&v===this.version)return 0;v=new m(v,this.options)}return v.version===this.version?0:this.compareMain(v)||this.comparePre(v)}compareMain(v){return v instanceof m||(v=new m(v,this.options)),d(this.major,v.major)||d(this.minor,v.minor)||d(this.patch,v.patch)}comparePre(v){if(v instanceof m||(v=new m(v,this.options)),this.prerelease.length&&!v.prerelease.length)return-1;if(!this.prerelease.length&&v.prerelease.length)return 1;if(!this.prerelease.length&&!v.prerelease.length)return 0;let b=0;do{const x=this.prerelease[b],E=v.prerelease[b];if(t("prerelease compare",b,x,E),x===void 0&&E===void 0)return 0;if(E===void 0)return 1;if(x===void 0)return-1;if(x===E)continue;return d(x,E)}while(++b)}compareBuild(v){v instanceof m||(v=new m(v,this.options));let b=0;do{const x=this.build[b],E=v.build[b];if(t("build compare",b,x,E),x===void 0&&E===void 0)return 0;if(E===void 0)return 1;if(x===void 0)return-1;if(x===E)continue;return d(x,E)}while(++b)}inc(v,b,x){if(v.startsWith("pre")){if(!b&&x===!1)throw new Error("invalid increment argument: identifier is empty");if(b){const E=new RegExp(`^${this.options.loose?o[c.PRERELEASELOOSE]:o[c.PRERELEASE]}$`),T=`-${b}`.match(E);if(!T||T[1]!==b)throw new Error(`invalid identifier: ${b}`)}}switch(v){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",b,x);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",b,x);break;case"prepatch":this.prerelease.length=0,this.inc("patch",b,x),this.inc("pre",b,x);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",b,x),this.inc("pre",b,x);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const E=Number(x)?1:0;if(this.prerelease.length===0)this.prerelease=[E];else{let T=this.prerelease.length;for(;--T>=0;)typeof this.prerelease[T]=="number"&&(this.prerelease[T]++,T=-2);if(T===-1){if(b===this.prerelease.join(".")&&x===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(E)}}if(b){let T=[b,E];x===!1&&(T=[b]),d(this.prerelease[0],b)===0?isNaN(this.prerelease[1])&&(this.prerelease=T):this.prerelease=T}break}default:throw new Error(`invalid increment argument: ${v}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return gh=m,gh}var vh,P0;function Cs(){if(P0)return vh;P0=1;const t=Nt();return vh=(a,s,o=!1)=>{if(a instanceof t)return a;try{return new t(a,s)}catch(c){if(!o)return null;throw c}},vh}var yh,U0;function LL(){if(U0)return yh;U0=1;const t=Cs();return yh=(a,s)=>{const o=t(a,s);return o?o.version:null},yh}var bh,k0;function zL(){if(k0)return bh;k0=1;const t=Cs();return bh=(a,s)=>{const o=t(a.trim().replace(/^[=v]+/,""),s);return o?o.version:null},bh}var xh,H0;function PL(){if(H0)return xh;H0=1;const t=Nt();return xh=(a,s,o,c,f)=>{typeof o=="string"&&(f=c,c=o,o=void 0);try{return new t(a instanceof t?a.version:a,o).inc(s,c,f).version}catch{return null}},xh}var Sh,$0;function UL(){if($0)return Sh;$0=1;const t=Cs();return Sh=(a,s)=>{const o=t(a,null,!0),c=t(s,null,!0),f=o.compare(c);if(f===0)return null;const d=f>0,m=d?o:c,p=d?c:o,v=!!m.prerelease.length;if(!!p.prerelease.length&&!v){if(!p.patch&&!p.minor)return"major";if(p.compareMain(m)===0)return p.minor&&!p.patch?"minor":"patch"}const x=v?"pre":"";return o.major!==c.major?x+"major":o.minor!==c.minor?x+"minor":o.patch!==c.patch?x+"patch":"prerelease"},Sh}var wh,q0;function kL(){if(q0)return wh;q0=1;const t=Nt();return wh=(a,s)=>new t(a,s).major,wh}var Eh,B0;function HL(){if(B0)return Eh;B0=1;const t=Nt();return Eh=(a,s)=>new t(a,s).minor,Eh}var Rh,I0;function $L(){if(I0)return Rh;I0=1;const t=Nt();return Rh=(a,s)=>new t(a,s).patch,Rh}var Th,V0;function qL(){if(V0)return Th;V0=1;const t=Cs();return Th=(a,s)=>{const o=t(a,s);return o&&o.prerelease.length?o.prerelease:null},Th}var Ch,Y0;function Sn(){if(Y0)return Ch;Y0=1;const t=Nt();return Ch=(a,s,o)=>new t(a,o).compare(new t(s,o)),Ch}var Ah,G0;function BL(){if(G0)return Ah;G0=1;const t=Sn();return Ah=(a,s,o)=>t(s,a,o),Ah}var Nh,F0;function IL(){if(F0)return Nh;F0=1;const t=Sn();return Nh=(a,s)=>t(a,s,!0),Nh}var Oh,Q0;function Cp(){if(Q0)return Oh;Q0=1;const t=Nt();return Oh=(a,s,o)=>{const c=new t(a,o),f=new t(s,o);return c.compare(f)||c.compareBuild(f)},Oh}var Mh,X0;function VL(){if(X0)return Mh;X0=1;const t=Cp();return Mh=(a,s)=>a.sort((o,c)=>t(o,c,s)),Mh}var jh,K0;function YL(){if(K0)return jh;K0=1;const t=Cp();return jh=(a,s)=>a.sort((o,c)=>t(c,o,s)),jh}var Dh,W0;function Eu(){if(W0)return Dh;W0=1;const t=Sn();return Dh=(a,s,o)=>t(a,s,o)>0,Dh}var _h,Z0;function Ap(){if(Z0)return _h;Z0=1;const t=Sn();return _h=(a,s,o)=>t(a,s,o)<0,_h}var Lh,J0;function j1(){if(J0)return Lh;J0=1;const t=Sn();return Lh=(a,s,o)=>t(a,s,o)===0,Lh}var zh,ex;function D1(){if(ex)return zh;ex=1;const t=Sn();return zh=(a,s,o)=>t(a,s,o)!==0,zh}var Ph,tx;function Np(){if(tx)return Ph;tx=1;const t=Sn();return Ph=(a,s,o)=>t(a,s,o)>=0,Ph}var Uh,nx;function Op(){if(nx)return Uh;nx=1;const t=Sn();return Uh=(a,s,o)=>t(a,s,o)<=0,Uh}var kh,rx;function _1(){if(rx)return kh;rx=1;const t=j1(),r=D1(),a=Eu(),s=Np(),o=Ap(),c=Op();return kh=(d,m,p,v)=>{switch(m){case"===":return typeof d=="object"&&(d=d.version),typeof p=="object"&&(p=p.version),d===p;case"!==":return typeof d=="object"&&(d=d.version),typeof p=="object"&&(p=p.version),d!==p;case"":case"=":case"==":return t(d,p,v);case"!=":return r(d,p,v);case">":return a(d,p,v);case">=":return s(d,p,v);case"<":return o(d,p,v);case"<=":return c(d,p,v);default:throw new TypeError(`Invalid operator: ${m}`)}},kh}var Hh,ax;function GL(){if(ax)return Hh;ax=1;const t=Nt(),r=Cs(),{safeRe:a,t:s}=ro();return Hh=(c,f)=>{if(c instanceof t)return c;if(typeof c=="number"&&(c=String(c)),typeof c!="string")return null;f=f||{};let d=null;if(!f.rtl)d=c.match(f.includePrerelease?a[s.COERCEFULL]:a[s.COERCE]);else{const E=f.includePrerelease?a[s.COERCERTLFULL]:a[s.COERCERTL];let T;for(;(T=E.exec(c))&&(!d||d.index+d[0].length!==c.length);)(!d||T.index+T[0].length!==d.index+d[0].length)&&(d=T),E.lastIndex=T.index+T[1].length+T[2].length;E.lastIndex=-1}if(d===null)return null;const m=d[2],p=d[3]||"0",v=d[4]||"0",b=f.includePrerelease&&d[5]?`-${d[5]}`:"",x=f.includePrerelease&&d[6]?`+${d[6]}`:"";return r(`${m}.${p}.${v}${b}${x}`,f)},Hh}var $h,ix;function FL(){if(ix)return $h;ix=1;class t{constructor(){this.max=1e3,this.map=new Map}get(a){const s=this.map.get(a);if(s!==void 0)return this.map.delete(a),this.map.set(a,s),s}delete(a){return this.map.delete(a)}set(a,s){if(!this.delete(a)&&s!==void 0){if(this.map.size>=this.max){const c=this.map.keys().next().value;this.delete(c)}this.map.set(a,s)}return this}}return $h=t,$h}var qh,sx;function wn(){if(sx)return qh;sx=1;const t=/\s+/g;class r{constructor(H,j){if(j=o(j),H instanceof r)return H.loose===!!j.loose&&H.includePrerelease===!!j.includePrerelease?H:new r(H.raw,j);if(H instanceof c)return this.raw=H.value,this.set=[[H]],this.formatted=void 0,this;if(this.options=j,this.loose=!!j.loose,this.includePrerelease=!!j.includePrerelease,this.raw=H.trim().replace(t," "),this.set=this.raw.split("||").map(B=>this.parseRange(B.trim())).filter(B=>B.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const B=this.set[0];if(this.set=this.set.filter(z=>!S(z[0])),this.set.length===0)this.set=[B];else if(this.set.length>1){for(const z of this.set)if(z.length===1&&w(z[0])){this.set=[z];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let H=0;H<this.set.length;H++){H>0&&(this.formatted+="||");const j=this.set[H];for(let B=0;B<j.length;B++)B>0&&(this.formatted+=" "),this.formatted+=j[B].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(H){const B=((this.options.includePrerelease&&E)|(this.options.loose&&T))+":"+H,z=s.get(B);if(z)return z;const Q=this.options.loose,M=Q?m[p.HYPHENRANGELOOSE]:m[p.HYPHENRANGE];H=H.replace(M,se(this.options.includePrerelease)),f("hyphen replace",H),H=H.replace(m[p.COMPARATORTRIM],v),f("comparator trim",H),H=H.replace(m[p.TILDETRIM],b),f("tilde trim",H),H=H.replace(m[p.CARETTRIM],x),f("caret trim",H);let G=H.split(" ").map(oe=>N(oe,this.options)).join(" ").split(/\s+/).map(oe=>te(oe,this.options));Q&&(G=G.filter(oe=>(f("loose invalid filter",oe,this.options),!!oe.match(m[p.COMPARATORLOOSE])))),f("range list",G);const ee=new Map,ae=G.map(oe=>new c(oe,this.options));for(const oe of ae){if(S(oe))return[oe];ee.set(oe.value,oe)}ee.size>1&&ee.has("")&&ee.delete("");const re=[...ee.values()];return s.set(B,re),re}intersects(H,j){if(!(H instanceof r))throw new TypeError("a Range is required");return this.set.some(B=>C(B,j)&&H.set.some(z=>C(z,j)&&B.every(Q=>z.every(M=>Q.intersects(M,j)))))}test(H){if(!H)return!1;if(typeof H=="string")try{H=new d(H,this.options)}catch{return!1}for(let j=0;j<this.set.length;j++)if(de(this.set[j],H,this.options))return!0;return!1}}qh=r;const a=FL(),s=new a,o=Tp(),c=Ru(),f=wu(),d=Nt(),{safeRe:m,t:p,comparatorTrimReplace:v,tildeTrimReplace:b,caretTrimReplace:x}=ro(),{FLAG_INCLUDE_PRERELEASE:E,FLAG_LOOSE:T}=Su(),S=q=>q.value==="<0.0.0-0",w=q=>q.value==="",C=(q,H)=>{let j=!0;const B=q.slice();let z=B.pop();for(;j&&B.length;)j=B.every(Q=>z.intersects(Q,H)),z=B.pop();return j},N=(q,H)=>(f("comp",q,H),q=$(q,H),f("caret",q),q=_(q,H),f("tildes",q),q=k(q,H),f("xrange",q),q=K(q,H),f("stars",q),q),O=q=>!q||q.toLowerCase()==="x"||q==="*",_=(q,H)=>q.trim().split(/\s+/).map(j=>L(j,H)).join(" "),L=(q,H)=>{const j=H.loose?m[p.TILDELOOSE]:m[p.TILDE];return q.replace(j,(B,z,Q,M,G)=>{f("tilde",q,B,z,Q,M,G);let ee;return O(z)?ee="":O(Q)?ee=`>=${z}.0.0 <${+z+1}.0.0-0`:O(M)?ee=`>=${z}.${Q}.0 <${z}.${+Q+1}.0-0`:G?(f("replaceTilde pr",G),ee=`>=${z}.${Q}.${M}-${G} <${z}.${+Q+1}.0-0`):ee=`>=${z}.${Q}.${M} <${z}.${+Q+1}.0-0`,f("tilde return",ee),ee})},$=(q,H)=>q.trim().split(/\s+/).map(j=>V(j,H)).join(" "),V=(q,H)=>{f("caret",q,H);const j=H.loose?m[p.CARETLOOSE]:m[p.CARET],B=H.includePrerelease?"-0":"";return q.replace(j,(z,Q,M,G,ee)=>{f("caret",q,z,Q,M,G,ee);let ae;return O(Q)?ae="":O(M)?ae=`>=${Q}.0.0${B} <${+Q+1}.0.0-0`:O(G)?Q==="0"?ae=`>=${Q}.${M}.0${B} <${Q}.${+M+1}.0-0`:ae=`>=${Q}.${M}.0${B} <${+Q+1}.0.0-0`:ee?(f("replaceCaret pr",ee),Q==="0"?M==="0"?ae=`>=${Q}.${M}.${G}-${ee} <${Q}.${M}.${+G+1}-0`:ae=`>=${Q}.${M}.${G}-${ee} <${Q}.${+M+1}.0-0`:ae=`>=${Q}.${M}.${G}-${ee} <${+Q+1}.0.0-0`):(f("no pr"),Q==="0"?M==="0"?ae=`>=${Q}.${M}.${G}${B} <${Q}.${M}.${+G+1}-0`:ae=`>=${Q}.${M}.${G}${B} <${Q}.${+M+1}.0-0`:ae=`>=${Q}.${M}.${G} <${+Q+1}.0.0-0`),f("caret return",ae),ae})},k=(q,H)=>(f("replaceXRanges",q,H),q.split(/\s+/).map(j=>U(j,H)).join(" ")),U=(q,H)=>{q=q.trim();const j=H.loose?m[p.XRANGELOOSE]:m[p.XRANGE];return q.replace(j,(B,z,Q,M,G,ee)=>{f("xRange",q,B,z,Q,M,G,ee);const ae=O(Q),re=ae||O(M),oe=re||O(G),pe=oe;return z==="="&&pe&&(z=""),ee=H.includePrerelease?"-0":"",ae?z===">"||z==="<"?B="<0.0.0-0":B="*":z&&pe?(re&&(M=0),G=0,z===">"?(z=">=",re?(Q=+Q+1,M=0,G=0):(M=+M+1,G=0)):z==="<="&&(z="<",re?Q=+Q+1:M=+M+1),z==="<"&&(ee="-0"),B=`${z+Q}.${M}.${G}${ee}`):re?B=`>=${Q}.0.0${ee} <${+Q+1}.0.0-0`:oe&&(B=`>=${Q}.${M}.0${ee} <${Q}.${+M+1}.0-0`),f("xRange return",B),B})},K=(q,H)=>(f("replaceStars",q,H),q.trim().replace(m[p.STAR],"")),te=(q,H)=>(f("replaceGTE0",q,H),q.trim().replace(m[H.includePrerelease?p.GTE0PRE:p.GTE0],"")),se=q=>(H,j,B,z,Q,M,G,ee,ae,re,oe,pe)=>(O(B)?j="":O(z)?j=`>=${B}.0.0${q?"-0":""}`:O(Q)?j=`>=${B}.${z}.0${q?"-0":""}`:M?j=`>=${j}`:j=`>=${j}${q?"-0":""}`,O(ae)?ee="":O(re)?ee=`<${+ae+1}.0.0-0`:O(oe)?ee=`<${ae}.${+re+1}.0-0`:pe?ee=`<=${ae}.${re}.${oe}-${pe}`:q?ee=`<${ae}.${re}.${+oe+1}-0`:ee=`<=${ee}`,`${j} ${ee}`.trim()),de=(q,H,j)=>{for(let B=0;B<q.length;B++)if(!q[B].test(H))return!1;if(H.prerelease.length&&!j.includePrerelease){for(let B=0;B<q.length;B++)if(f(q[B].semver),q[B].semver!==c.ANY&&q[B].semver.prerelease.length>0){const z=q[B].semver;if(z.major===H.major&&z.minor===H.minor&&z.patch===H.patch)return!0}return!1}return!0};return qh}var Bh,lx;function Ru(){if(lx)return Bh;lx=1;const t=Symbol("SemVer ANY");class r{static get ANY(){return t}constructor(v,b){if(b=a(b),v instanceof r){if(v.loose===!!b.loose)return v;v=v.value}v=v.trim().split(/\s+/).join(" "),f("comparator",v,b),this.options=b,this.loose=!!b.loose,this.parse(v),this.semver===t?this.value="":this.value=this.operator+this.semver.version,f("comp",this)}parse(v){const b=this.options.loose?s[o.COMPARATORLOOSE]:s[o.COMPARATOR],x=v.match(b);if(!x)throw new TypeError(`Invalid comparator: ${v}`);this.operator=x[1]!==void 0?x[1]:"",this.operator==="="&&(this.operator=""),x[2]?this.semver=new d(x[2],this.options.loose):this.semver=t}toString(){return this.value}test(v){if(f("Comparator.test",v,this.options.loose),this.semver===t||v===t)return!0;if(typeof v=="string")try{v=new d(v,this.options)}catch{return!1}return c(v,this.operator,this.semver,this.options)}intersects(v,b){if(!(v instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new m(v.value,b).test(this.value):v.operator===""?v.value===""?!0:new m(this.value,b).test(v.semver):(b=a(b),b.includePrerelease&&(this.value==="<0.0.0-0"||v.value==="<0.0.0-0")||!b.includePrerelease&&(this.value.startsWith("<0.0.0")||v.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&v.operator.startsWith(">")||this.operator.startsWith("<")&&v.operator.startsWith("<")||this.semver.version===v.semver.version&&this.operator.includes("=")&&v.operator.includes("=")||c(this.semver,"<",v.semver,b)&&this.operator.startsWith(">")&&v.operator.startsWith("<")||c(this.semver,">",v.semver,b)&&this.operator.startsWith("<")&&v.operator.startsWith(">")))}}Bh=r;const a=Tp(),{safeRe:s,t:o}=ro(),c=_1(),f=wu(),d=Nt(),m=wn();return Bh}var Ih,ox;function Tu(){if(ox)return Ih;ox=1;const t=wn();return Ih=(a,s,o)=>{try{s=new t(s,o)}catch{return!1}return s.test(a)},Ih}var Vh,cx;function QL(){if(cx)return Vh;cx=1;const t=wn();return Vh=(a,s)=>new t(a,s).set.map(o=>o.map(c=>c.value).join(" ").trim().split(" ")),Vh}var Yh,ux;function XL(){if(ux)return Yh;ux=1;const t=Nt(),r=wn();return Yh=(s,o,c)=>{let f=null,d=null,m=null;try{m=new r(o,c)}catch{return null}return s.forEach(p=>{m.test(p)&&(!f||d.compare(p)===-1)&&(f=p,d=new t(f,c))}),f},Yh}var Gh,fx;function KL(){if(fx)return Gh;fx=1;const t=Nt(),r=wn();return Gh=(s,o,c)=>{let f=null,d=null,m=null;try{m=new r(o,c)}catch{return null}return s.forEach(p=>{m.test(p)&&(!f||d.compare(p)===1)&&(f=p,d=new t(f,c))}),f},Gh}var Fh,dx;function WL(){if(dx)return Fh;dx=1;const t=Nt(),r=wn(),a=Eu();return Fh=(o,c)=>{o=new r(o,c);let f=new t("0.0.0");if(o.test(f)||(f=new t("0.0.0-0"),o.test(f)))return f;f=null;for(let d=0;d<o.set.length;++d){const m=o.set[d];let p=null;m.forEach(v=>{const b=new t(v.semver.version);switch(v.operator){case">":b.prerelease.length===0?b.patch++:b.prerelease.push(0),b.raw=b.format();case"":case">=":(!p||a(b,p))&&(p=b);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${v.operator}`)}}),p&&(!f||a(f,p))&&(f=p)}return f&&o.test(f)?f:null},Fh}var Qh,hx;function ZL(){if(hx)return Qh;hx=1;const t=wn();return Qh=(a,s)=>{try{return new t(a,s).range||"*"}catch{return null}},Qh}var Xh,mx;function Mp(){if(mx)return Xh;mx=1;const t=Nt(),r=Ru(),{ANY:a}=r,s=wn(),o=Tu(),c=Eu(),f=Ap(),d=Op(),m=Np();return Xh=(v,b,x,E)=>{v=new t(v,E),b=new s(b,E);let T,S,w,C,N;switch(x){case">":T=c,S=d,w=f,C=">",N=">=";break;case"<":T=f,S=m,w=c,C="<",N="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(v,b,E))return!1;for(let O=0;O<b.set.length;++O){const _=b.set[O];let L=null,$=null;if(_.forEach(V=>{V.semver===a&&(V=new r(">=0.0.0")),L=L||V,$=$||V,T(V.semver,L.semver,E)?L=V:w(V.semver,$.semver,E)&&($=V)}),L.operator===C||L.operator===N||(!$.operator||$.operator===C)&&S(v,$.semver))return!1;if($.operator===N&&w(v,$.semver))return!1}return!0},Xh}var Kh,px;function JL(){if(px)return Kh;px=1;const t=Mp();return Kh=(a,s,o)=>t(a,s,">",o),Kh}var Wh,gx;function e4(){if(gx)return Wh;gx=1;const t=Mp();return Wh=(a,s,o)=>t(a,s,"<",o),Wh}var Zh,vx;function t4(){if(vx)return Zh;vx=1;const t=wn();return Zh=(a,s,o)=>(a=new t(a,o),s=new t(s,o),a.intersects(s,o)),Zh}var Jh,yx;function n4(){if(yx)return Jh;yx=1;const t=Tu(),r=Sn();return Jh=(a,s,o)=>{const c=[];let f=null,d=null;const m=a.sort((x,E)=>r(x,E,o));for(const x of m)t(x,s,o)?(d=x,f||(f=x)):(d&&c.push([f,d]),d=null,f=null);f&&c.push([f,null]);const p=[];for(const[x,E]of c)x===E?p.push(x):!E&&x===m[0]?p.push("*"):E?x===m[0]?p.push(`<=${E}`):p.push(`${x} - ${E}`):p.push(`>=${x}`);const v=p.join(" || "),b=typeof s.raw=="string"?s.raw:String(s);return v.length<b.length?v:s},Jh}var em,bx;function r4(){if(bx)return em;bx=1;const t=wn(),r=Ru(),{ANY:a}=r,s=Tu(),o=Sn(),c=(b,x,E={})=>{if(b===x)return!0;b=new t(b,E),x=new t(x,E);let T=!1;e:for(const S of b.set){for(const w of x.set){const C=m(S,w,E);if(T=T||C!==null,C)continue e}if(T)return!1}return!0},f=[new r(">=0.0.0-0")],d=[new r(">=0.0.0")],m=(b,x,E)=>{if(b===x)return!0;if(b.length===1&&b[0].semver===a){if(x.length===1&&x[0].semver===a)return!0;E.includePrerelease?b=f:b=d}if(x.length===1&&x[0].semver===a){if(E.includePrerelease)return!0;x=d}const T=new Set;let S,w;for(const k of b)k.operator===">"||k.operator===">="?S=p(S,k,E):k.operator==="<"||k.operator==="<="?w=v(w,k,E):T.add(k.semver);if(T.size>1)return null;let C;if(S&&w){if(C=o(S.semver,w.semver,E),C>0)return null;if(C===0&&(S.operator!==">="||w.operator!=="<="))return null}for(const k of T){if(S&&!s(k,String(S),E)||w&&!s(k,String(w),E))return null;for(const U of x)if(!s(k,String(U),E))return!1;return!0}let N,O,_,L,$=w&&!E.includePrerelease&&w.semver.prerelease.length?w.semver:!1,V=S&&!E.includePrerelease&&S.semver.prerelease.length?S.semver:!1;$&&$.prerelease.length===1&&w.operator==="<"&&$.prerelease[0]===0&&($=!1);for(const k of x){if(L=L||k.operator===">"||k.operator===">=",_=_||k.operator==="<"||k.operator==="<=",S){if(V&&k.semver.prerelease&&k.semver.prerelease.length&&k.semver.major===V.major&&k.semver.minor===V.minor&&k.semver.patch===V.patch&&(V=!1),k.operator===">"||k.operator===">="){if(N=p(S,k,E),N===k&&N!==S)return!1}else if(S.operator===">="&&!s(S.semver,String(k),E))return!1}if(w){if($&&k.semver.prerelease&&k.semver.prerelease.length&&k.semver.major===$.major&&k.semver.minor===$.minor&&k.semver.patch===$.patch&&($=!1),k.operator==="<"||k.operator==="<="){if(O=v(w,k,E),O===k&&O!==w)return!1}else if(w.operator==="<="&&!s(w.semver,String(k),E))return!1}if(!k.operator&&(w||S)&&C!==0)return!1}return!(S&&_&&!w&&C!==0||w&&L&&!S&&C!==0||V||$)},p=(b,x,E)=>{if(!b)return x;const T=o(b.semver,x.semver,E);return T>0?b:T<0||x.operator===">"&&b.operator===">="?x:b},v=(b,x,E)=>{if(!b)return x;const T=o(b.semver,x.semver,E);return T<0?b:T>0||x.operator==="<"&&b.operator==="<="?x:b};return em=c,em}var tm,xx;function a4(){if(xx)return tm;xx=1;const t=ro(),r=Su(),a=Nt(),s=M1(),o=Cs(),c=LL(),f=zL(),d=PL(),m=UL(),p=kL(),v=HL(),b=$L(),x=qL(),E=Sn(),T=BL(),S=IL(),w=Cp(),C=VL(),N=YL(),O=Eu(),_=Ap(),L=j1(),$=D1(),V=Np(),k=Op(),U=_1(),K=GL(),te=Ru(),se=wn(),de=Tu(),q=QL(),H=XL(),j=KL(),B=WL(),z=ZL(),Q=Mp(),M=JL(),G=e4(),ee=t4(),ae=n4(),re=r4();return tm={parse:o,valid:c,clean:f,inc:d,diff:m,major:p,minor:v,patch:b,prerelease:x,compare:E,rcompare:T,compareLoose:S,compareBuild:w,sort:C,rsort:N,gt:O,lt:_,eq:L,neq:$,gte:V,lte:k,cmp:U,coerce:K,Comparator:te,Range:se,satisfies:de,toComparators:q,maxSatisfying:H,minSatisfying:j,minVersion:B,validRange:z,outside:Q,gtr:M,ltr:G,intersects:ee,simplifyRange:ae,subset:re,SemVer:a,re:t.re,src:t.src,tokens:t.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers},tm}var i4=a4();const s4=gs(i4);function l4(){const{toast:t}=xn();async function r(s){const o=`https://api.github.com/repos/${s}/releases/latest`;try{const c=await fetch(o,{headers:{Accept:"application/vnd.github.v3+json","User-Agent":"fetch-latest-release"}});if(!c.ok)throw new Error(`Failed to fetch latest release: ${c.status} ${c.statusText}`);return(await c.json()).tag_name}catch{}}const a=async()=>{try{const s=await r("elizaos/eliza"),o=Ji==null?void 0:Ji.version;s&&o&&s4.gt(s.replace("v",""),o.replace("v",""))&&t({variant:"default",title:`New version ${s} is available.`,description:"Visit GitHub for more information.",action:g.jsx(Va,{to:"https://github.com/elizaos/eliza/releases",target:"_blank",children:g.jsx(DE,{altText:"Update",children:"Update"})})})}catch(s){console.error(`Unable to retrieve latest version from GitHub: ${s}`)}};return y.useEffect(()=>{a()},[a]),null}const Sx={name:"",username:"",system:"",bio:[],topics:[],adjectives:[]};function L1(){const t=to(),{toast:r}=xn(),a=qn(),[s,o]=y.useState({...Sx}),c=d=>{var m,p,v;return{...d,bio:d.bio??[],messageExamples:d.messageExamples??[],postExamples:d.postExamples??[],topics:d.topics??[],adjectives:d.adjectives??[],plugins:d.plugins??[],style:{all:((m=d.style)==null?void 0:m.all)??[],chat:((p=d.style)==null?void 0:p.chat)??[],post:((v=d.style)==null?void 0:v.post)??[]}}},f=async d=>{try{const m=c(d);await Lt.createAgent({characterJson:m}),a.invalidateQueries({queryKey:["characters"]}),r({title:"Success",description:"Character created successfully!"}),a.invalidateQueries({queryKey:["agents"]}),t("/")}catch(m){r({title:"Error",description:m instanceof Error?m.message:"Failed to create character",variant:"destructive"})}};return g.jsx(w1,{characterValue:s,setCharacterValue:o,title:"Character Settings",description:"Configure your AI character's behavior and capabilities",onSubmit:f,onReset:()=>o(Sx),onDelete:()=>{t("/")},isAgent:!0,customComponents:[{name:"Plugins",component:g.jsx(A1,{characterValue:s,setCharacterValue:o})},{name:"Secret",component:g.jsx(N1,{characterValue:s,setCharacterValue:o})}]})}function o4(){return g.jsx(L1,{})}const z1=6048e5,c4=864e5,wx=Symbol.for("constructDateFrom");function ha(t,r){return typeof t=="function"?t(r):t&&typeof t=="object"&&wx in t?t[wx](r):t instanceof Date?new t.constructor(r):new Date(r)}function En(t,r){return ha(r||t,t)}let u4={};function Cu(){return u4}function ql(t,r){var d,m,p,v;const a=Cu(),s=(r==null?void 0:r.weekStartsOn)??((m=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:m.weekStartsOn)??a.weekStartsOn??((v=(p=a.locale)==null?void 0:p.options)==null?void 0:v.weekStartsOn)??0,o=En(t,r==null?void 0:r.in),c=o.getDay(),f=(c<s?7:0)+c-s;return o.setDate(o.getDate()-f),o.setHours(0,0,0,0),o}function Wc(t,r){return ql(t,{...r,weekStartsOn:1})}function P1(t,r){const a=En(t,r==null?void 0:r.in),s=a.getFullYear(),o=ha(a,0);o.setFullYear(s+1,0,4),o.setHours(0,0,0,0);const c=Wc(o),f=ha(a,0);f.setFullYear(s,0,4),f.setHours(0,0,0,0);const d=Wc(f);return a.getTime()>=c.getTime()?s+1:a.getTime()>=d.getTime()?s:s-1}function Ex(t){const r=En(t),a=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return a.setUTCFullYear(r.getFullYear()),+t-+a}function f4(t,...r){const a=ha.bind(null,r.find(s=>typeof s=="object"));return r.map(a)}function Rx(t,r){const a=En(t,r==null?void 0:r.in);return a.setHours(0,0,0,0),a}function d4(t,r,a){const[s,o]=f4(a==null?void 0:a.in,t,r),c=Rx(s),f=Rx(o),d=+c-Ex(c),m=+f-Ex(f);return Math.round((d-m)/c4)}function h4(t,r){const a=P1(t,r),s=ha(t,0);return s.setFullYear(a,0,4),s.setHours(0,0,0,0),Wc(s)}function m4(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function p4(t){return!(!m4(t)&&typeof t!="number"||isNaN(+En(t)))}function g4(t,r){const a=En(t,r==null?void 0:r.in);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}const v4={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},y4=(t,r,a)=>{let s;const o=v4[t];return typeof o=="string"?s=o:r===1?s=o.one:s=o.other.replace("{{count}}",r.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+s:s+" ago":s};function nm(t){return(r={})=>{const a=r.width?String(r.width):t.defaultWidth;return t.formats[a]||t.formats[t.defaultWidth]}}const b4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},x4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},S4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},w4={date:nm({formats:b4,defaultWidth:"full"}),time:nm({formats:x4,defaultWidth:"full"}),dateTime:nm({formats:S4,defaultWidth:"full"})},E4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},R4=(t,r,a,s)=>E4[t];function Dl(t){return(r,a)=>{const s=a!=null&&a.context?String(a.context):"standalone";let o;if(s==="formatting"&&t.formattingValues){const f=t.defaultFormattingWidth||t.defaultWidth,d=a!=null&&a.width?String(a.width):f;o=t.formattingValues[d]||t.formattingValues[f]}else{const f=t.defaultWidth,d=a!=null&&a.width?String(a.width):t.defaultWidth;o=t.values[d]||t.values[f]}const c=t.argumentCallback?t.argumentCallback(r):r;return o[c]}}const T4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},C4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},A4={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},N4={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},O4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},M4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},j4=(t,r)=>{const a=Number(t),s=a%100;if(s>20||s<10)switch(s%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},D4={ordinalNumber:j4,era:Dl({values:T4,defaultWidth:"wide"}),quarter:Dl({values:C4,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Dl({values:A4,defaultWidth:"wide"}),day:Dl({values:N4,defaultWidth:"wide"}),dayPeriod:Dl({values:O4,defaultWidth:"wide",formattingValues:M4,defaultFormattingWidth:"wide"})};function _l(t){return(r,a={})=>{const s=a.width,o=s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth],c=r.match(o);if(!c)return null;const f=c[0],d=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],m=Array.isArray(d)?L4(d,b=>b.test(f)):_4(d,b=>b.test(f));let p;p=t.valueCallback?t.valueCallback(m):m,p=a.valueCallback?a.valueCallback(p):p;const v=r.slice(f.length);return{value:p,rest:v}}}function _4(t,r){for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&r(t[a]))return a}function L4(t,r){for(let a=0;a<t.length;a++)if(r(t[a]))return a}function z4(t){return(r,a={})=>{const s=r.match(t.matchPattern);if(!s)return null;const o=s[0],c=r.match(t.parsePattern);if(!c)return null;let f=t.valueCallback?t.valueCallback(c[0]):c[0];f=a.valueCallback?a.valueCallback(f):f;const d=r.slice(o.length);return{value:f,rest:d}}}const P4=/^(\d+)(th|st|nd|rd)?/i,U4=/\d+/i,k4={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},H4={any:[/^b/i,/^(a|c)/i]},$4={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},q4={any:[/1/i,/2/i,/3/i,/4/i]},B4={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},I4={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},V4={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Y4={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},G4={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},F4={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Q4={ordinalNumber:z4({matchPattern:P4,parsePattern:U4,valueCallback:t=>parseInt(t,10)}),era:_l({matchPatterns:k4,defaultMatchWidth:"wide",parsePatterns:H4,defaultParseWidth:"any"}),quarter:_l({matchPatterns:$4,defaultMatchWidth:"wide",parsePatterns:q4,defaultParseWidth:"any",valueCallback:t=>t+1}),month:_l({matchPatterns:B4,defaultMatchWidth:"wide",parsePatterns:I4,defaultParseWidth:"any"}),day:_l({matchPatterns:V4,defaultMatchWidth:"wide",parsePatterns:Y4,defaultParseWidth:"any"}),dayPeriod:_l({matchPatterns:G4,defaultMatchWidth:"any",parsePatterns:F4,defaultParseWidth:"any"})},X4={code:"en-US",formatDistance:y4,formatLong:w4,formatRelative:R4,localize:D4,match:Q4,options:{weekStartsOn:0,firstWeekContainsDate:1}};function K4(t,r){const a=En(t,r==null?void 0:r.in);return d4(a,g4(a))+1}function W4(t,r){const a=En(t,r==null?void 0:r.in),s=+Wc(a)-+h4(a);return Math.round(s/z1)+1}function U1(t,r){var v,b,x,E;const a=En(t,r==null?void 0:r.in),s=a.getFullYear(),o=Cu(),c=(r==null?void 0:r.firstWeekContainsDate)??((b=(v=r==null?void 0:r.locale)==null?void 0:v.options)==null?void 0:b.firstWeekContainsDate)??o.firstWeekContainsDate??((E=(x=o.locale)==null?void 0:x.options)==null?void 0:E.firstWeekContainsDate)??1,f=ha((r==null?void 0:r.in)||t,0);f.setFullYear(s+1,0,c),f.setHours(0,0,0,0);const d=ql(f,r),m=ha((r==null?void 0:r.in)||t,0);m.setFullYear(s,0,c),m.setHours(0,0,0,0);const p=ql(m,r);return+a>=+d?s+1:+a>=+p?s:s-1}function Z4(t,r){var d,m,p,v;const a=Cu(),s=(r==null?void 0:r.firstWeekContainsDate)??((m=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??a.firstWeekContainsDate??((v=(p=a.locale)==null?void 0:p.options)==null?void 0:v.firstWeekContainsDate)??1,o=U1(t,r),c=ha((r==null?void 0:r.in)||t,0);return c.setFullYear(o,0,s),c.setHours(0,0,0,0),ql(c,r)}function J4(t,r){const a=En(t,r==null?void 0:r.in),s=+ql(a,r)-+Z4(a,r);return Math.round(s/z1)+1}function He(t,r){const a=t<0?"-":"",s=Math.abs(t).toString().padStart(r,"0");return a+s}const Zr={y(t,r){const a=t.getFullYear(),s=a>0?a:1-a;return He(r==="yy"?s%100:s,r.length)},M(t,r){const a=t.getMonth();return r==="M"?String(a+1):He(a+1,2)},d(t,r){return He(t.getDate(),r.length)},a(t,r){const a=t.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(t,r){return He(t.getHours()%12||12,r.length)},H(t,r){return He(t.getHours(),r.length)},m(t,r){return He(t.getMinutes(),r.length)},s(t,r){return He(t.getSeconds(),r.length)},S(t,r){const a=r.length,s=t.getMilliseconds(),o=Math.trunc(s*Math.pow(10,a-3));return He(o,r.length)}},Qi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Tx={G:function(t,r,a){const s=t.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return a.era(s,{width:"abbreviated"});case"GGGGG":return a.era(s,{width:"narrow"});case"GGGG":default:return a.era(s,{width:"wide"})}},y:function(t,r,a){if(r==="yo"){const s=t.getFullYear(),o=s>0?s:1-s;return a.ordinalNumber(o,{unit:"year"})}return Zr.y(t,r)},Y:function(t,r,a,s){const o=U1(t,s),c=o>0?o:1-o;if(r==="YY"){const f=c%100;return He(f,2)}return r==="Yo"?a.ordinalNumber(c,{unit:"year"}):He(c,r.length)},R:function(t,r){const a=P1(t);return He(a,r.length)},u:function(t,r){const a=t.getFullYear();return He(a,r.length)},Q:function(t,r,a){const s=Math.ceil((t.getMonth()+1)/3);switch(r){case"Q":return String(s);case"QQ":return He(s,2);case"Qo":return a.ordinalNumber(s,{unit:"quarter"});case"QQQ":return a.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,r,a){const s=Math.ceil((t.getMonth()+1)/3);switch(r){case"q":return String(s);case"qq":return He(s,2);case"qo":return a.ordinalNumber(s,{unit:"quarter"});case"qqq":return a.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,r,a){const s=t.getMonth();switch(r){case"M":case"MM":return Zr.M(t,r);case"Mo":return a.ordinalNumber(s+1,{unit:"month"});case"MMM":return a.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(s,{width:"wide",context:"formatting"})}},L:function(t,r,a){const s=t.getMonth();switch(r){case"L":return String(s+1);case"LL":return He(s+1,2);case"Lo":return a.ordinalNumber(s+1,{unit:"month"});case"LLL":return a.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(s,{width:"wide",context:"standalone"})}},w:function(t,r,a,s){const o=J4(t,s);return r==="wo"?a.ordinalNumber(o,{unit:"week"}):He(o,r.length)},I:function(t,r,a){const s=W4(t);return r==="Io"?a.ordinalNumber(s,{unit:"week"}):He(s,r.length)},d:function(t,r,a){return r==="do"?a.ordinalNumber(t.getDate(),{unit:"date"}):Zr.d(t,r)},D:function(t,r,a){const s=K4(t);return r==="Do"?a.ordinalNumber(s,{unit:"dayOfYear"}):He(s,r.length)},E:function(t,r,a){const s=t.getDay();switch(r){case"E":case"EE":case"EEE":return a.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(s,{width:"short",context:"formatting"});case"EEEE":default:return a.day(s,{width:"wide",context:"formatting"})}},e:function(t,r,a,s){const o=t.getDay(),c=(o-s.weekStartsOn+8)%7||7;switch(r){case"e":return String(c);case"ee":return He(c,2);case"eo":return a.ordinalNumber(c,{unit:"day"});case"eee":return a.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(o,{width:"short",context:"formatting"});case"eeee":default:return a.day(o,{width:"wide",context:"formatting"})}},c:function(t,r,a,s){const o=t.getDay(),c=(o-s.weekStartsOn+8)%7||7;switch(r){case"c":return String(c);case"cc":return He(c,r.length);case"co":return a.ordinalNumber(c,{unit:"day"});case"ccc":return a.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(o,{width:"narrow",context:"standalone"});case"cccccc":return a.day(o,{width:"short",context:"standalone"});case"cccc":default:return a.day(o,{width:"wide",context:"standalone"})}},i:function(t,r,a){const s=t.getDay(),o=s===0?7:s;switch(r){case"i":return String(o);case"ii":return He(o,r.length);case"io":return a.ordinalNumber(o,{unit:"day"});case"iii":return a.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(s,{width:"short",context:"formatting"});case"iiii":default:return a.day(s,{width:"wide",context:"formatting"})}},a:function(t,r,a){const o=t.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,r,a){const s=t.getHours();let o;switch(s===12?o=Qi.noon:s===0?o=Qi.midnight:o=s/12>=1?"pm":"am",r){case"b":case"bb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,r,a){const s=t.getHours();let o;switch(s>=17?o=Qi.evening:s>=12?o=Qi.afternoon:s>=4?o=Qi.morning:o=Qi.night,r){case"B":case"BB":case"BBB":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,r,a){if(r==="ho"){let s=t.getHours()%12;return s===0&&(s=12),a.ordinalNumber(s,{unit:"hour"})}return Zr.h(t,r)},H:function(t,r,a){return r==="Ho"?a.ordinalNumber(t.getHours(),{unit:"hour"}):Zr.H(t,r)},K:function(t,r,a){const s=t.getHours()%12;return r==="Ko"?a.ordinalNumber(s,{unit:"hour"}):He(s,r.length)},k:function(t,r,a){let s=t.getHours();return s===0&&(s=24),r==="ko"?a.ordinalNumber(s,{unit:"hour"}):He(s,r.length)},m:function(t,r,a){return r==="mo"?a.ordinalNumber(t.getMinutes(),{unit:"minute"}):Zr.m(t,r)},s:function(t,r,a){return r==="so"?a.ordinalNumber(t.getSeconds(),{unit:"second"}):Zr.s(t,r)},S:function(t,r){return Zr.S(t,r)},X:function(t,r,a){const s=t.getTimezoneOffset();if(s===0)return"Z";switch(r){case"X":return Ax(s);case"XXXX":case"XX":return Ba(s);case"XXXXX":case"XXX":default:return Ba(s,":")}},x:function(t,r,a){const s=t.getTimezoneOffset();switch(r){case"x":return Ax(s);case"xxxx":case"xx":return Ba(s);case"xxxxx":case"xxx":default:return Ba(s,":")}},O:function(t,r,a){const s=t.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Cx(s,":");case"OOOO":default:return"GMT"+Ba(s,":")}},z:function(t,r,a){const s=t.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Cx(s,":");case"zzzz":default:return"GMT"+Ba(s,":")}},t:function(t,r,a){const s=Math.trunc(+t/1e3);return He(s,r.length)},T:function(t,r,a){return He(+t,r.length)}};function Cx(t,r=""){const a=t>0?"-":"+",s=Math.abs(t),o=Math.trunc(s/60),c=s%60;return c===0?a+String(o):a+String(o)+r+He(c,2)}function Ax(t,r){return t%60===0?(t>0?"-":"+")+He(Math.abs(t)/60,2):Ba(t,r)}function Ba(t,r=""){const a=t>0?"-":"+",s=Math.abs(t),o=He(Math.trunc(s/60),2),c=He(s%60,2);return a+o+r+c}const Nx=(t,r)=>{switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},k1=(t,r)=>{switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},e3=(t,r)=>{const a=t.match(/(P+)(p+)?/)||[],s=a[1],o=a[2];if(!o)return Nx(t,r);let c;switch(s){case"P":c=r.dateTime({width:"short"});break;case"PP":c=r.dateTime({width:"medium"});break;case"PPP":c=r.dateTime({width:"long"});break;case"PPPP":default:c=r.dateTime({width:"full"});break}return c.replace("{{date}}",Nx(s,r)).replace("{{time}}",k1(o,r))},t3={p:k1,P:e3},n3=/^D+$/,r3=/^Y+$/,a3=["D","DD","YY","YYYY"];function i3(t){return n3.test(t)}function s3(t){return r3.test(t)}function l3(t,r,a){const s=o3(t,r,a);if(console.warn(s),a3.includes(t))throw new RangeError(s)}function o3(t,r,a){const s=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${r}\`) for formatting ${s} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const c3=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,u3=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,f3=/^'([^]*?)'?$/,d3=/''/g,h3=/[a-zA-Z]/;function m3(t,r,a){var v,b,x,E;const s=Cu(),o=s.locale??X4,c=s.firstWeekContainsDate??((b=(v=s.locale)==null?void 0:v.options)==null?void 0:b.firstWeekContainsDate)??1,f=s.weekStartsOn??((E=(x=s.locale)==null?void 0:x.options)==null?void 0:E.weekStartsOn)??0,d=En(t,a==null?void 0:a.in);if(!p4(d))throw new RangeError("Invalid time value");let m=r.match(u3).map(T=>{const S=T[0];if(S==="p"||S==="P"){const w=t3[S];return w(T,o.formatLong)}return T}).join("").match(c3).map(T=>{if(T==="''")return{isToken:!1,value:"'"};const S=T[0];if(S==="'")return{isToken:!1,value:p3(T)};if(Tx[S])return{isToken:!0,value:T};if(S.match(h3))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:T}});o.localize.preprocessor&&(m=o.localize.preprocessor(d,m));const p={firstWeekContainsDate:c,weekStartsOn:f,locale:o};return m.map(T=>{if(!T.isToken)return T.value;const S=T.value;(s3(S)||i3(S))&&l3(S,r,String(t));const w=Tx[S[0]];return w(d,S,o.localize,p)}).join("")}function p3(t){const r=t.match(f3);return r?r[1].replace(d3,"'"):t}function zm(t,[r,a]){return Math.min(a,Math.max(r,t))}function g3(t,r){return y.useReducer((a,s)=>r[a][s]??a,t)}var jp="ScrollArea",[H1,yz]=Bn(jp),[v3,on]=H1(jp),$1=y.forwardRef((t,r)=>{const{__scopeScrollArea:a,type:s="hover",dir:o,scrollHideDelay:c=600,...f}=t,[d,m]=y.useState(null),[p,v]=y.useState(null),[b,x]=y.useState(null),[E,T]=y.useState(null),[S,w]=y.useState(null),[C,N]=y.useState(0),[O,_]=y.useState(0),[L,$]=y.useState(!1),[V,k]=y.useState(!1),U=Ue(r,te=>m(te)),K=bu(o);return g.jsx(v3,{scope:a,type:s,dir:K,scrollHideDelay:c,scrollArea:d,viewport:p,onViewportChange:v,content:b,onContentChange:x,scrollbarX:E,onScrollbarXChange:T,scrollbarXEnabled:L,onScrollbarXEnabledChange:$,scrollbarY:S,onScrollbarYChange:w,scrollbarYEnabled:V,onScrollbarYEnabledChange:k,onCornerWidthChange:N,onCornerHeightChange:_,children:g.jsx(we.div,{dir:K,...f,ref:U,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":O+"px",...t.style}})})});$1.displayName=jp;var q1="ScrollAreaViewport",B1=y.forwardRef((t,r)=>{const{__scopeScrollArea:a,children:s,nonce:o,...c}=t,f=on(q1,a),d=y.useRef(null),m=Ue(r,d,f.onViewportChange);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),g.jsx(we.div,{"data-radix-scroll-area-viewport":"",...c,ref:m,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...t.style},children:g.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});B1.displayName=q1;var Gn="ScrollAreaScrollbar",Dp=y.forwardRef((t,r)=>{const{forceMount:a,...s}=t,o=on(Gn,t.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:f}=o,d=t.orientation==="horizontal";return y.useEffect(()=>(d?c(!0):f(!0),()=>{d?c(!1):f(!1)}),[d,c,f]),o.type==="hover"?g.jsx(y3,{...s,ref:r,forceMount:a}):o.type==="scroll"?g.jsx(b3,{...s,ref:r,forceMount:a}):o.type==="auto"?g.jsx(I1,{...s,ref:r,forceMount:a}):o.type==="always"?g.jsx(_p,{...s,ref:r}):null});Dp.displayName=Gn;var y3=y.forwardRef((t,r)=>{const{forceMount:a,...s}=t,o=on(Gn,t.__scopeScrollArea),[c,f]=y.useState(!1);return y.useEffect(()=>{const d=o.scrollArea;let m=0;if(d){const p=()=>{window.clearTimeout(m),f(!0)},v=()=>{m=window.setTimeout(()=>f(!1),o.scrollHideDelay)};return d.addEventListener("pointerenter",p),d.addEventListener("pointerleave",v),()=>{window.clearTimeout(m),d.removeEventListener("pointerenter",p),d.removeEventListener("pointerleave",v)}}},[o.scrollArea,o.scrollHideDelay]),g.jsx(ln,{present:a||c,children:g.jsx(I1,{"data-state":c?"visible":"hidden",...s,ref:r})})}),b3=y.forwardRef((t,r)=>{const{forceMount:a,...s}=t,o=on(Gn,t.__scopeScrollArea),c=t.orientation==="horizontal",f=Nu(()=>m("SCROLL_END"),100),[d,m]=g3("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(d==="idle"){const p=window.setTimeout(()=>m("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(p)}},[d,o.scrollHideDelay,m]),y.useEffect(()=>{const p=o.viewport,v=c?"scrollLeft":"scrollTop";if(p){let b=p[v];const x=()=>{const E=p[v];b!==E&&(m("SCROLL"),f()),b=E};return p.addEventListener("scroll",x),()=>p.removeEventListener("scroll",x)}},[o.viewport,c,m,f]),g.jsx(ln,{present:a||d!=="hidden",children:g.jsx(_p,{"data-state":d==="hidden"?"hidden":"visible",...s,ref:r,onPointerEnter:ve(t.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:ve(t.onPointerLeave,()=>m("POINTER_LEAVE"))})})}),I1=y.forwardRef((t,r)=>{const a=on(Gn,t.__scopeScrollArea),{forceMount:s,...o}=t,[c,f]=y.useState(!1),d=t.orientation==="horizontal",m=Nu(()=>{if(a.viewport){const p=a.viewport.offsetWidth<a.viewport.scrollWidth,v=a.viewport.offsetHeight<a.viewport.scrollHeight;f(d?p:v)}},10);return ps(a.viewport,m),ps(a.content,m),g.jsx(ln,{present:s||c,children:g.jsx(_p,{"data-state":c?"visible":"hidden",...o,ref:r})})}),_p=y.forwardRef((t,r)=>{const{orientation:a="vertical",...s}=t,o=on(Gn,t.__scopeScrollArea),c=y.useRef(null),f=y.useRef(0),[d,m]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=Q1(d.viewport,d.content),v={...s,sizes:d,onSizesChange:m,hasThumb:p>0&&p<1,onThumbChange:x=>c.current=x,onThumbPointerUp:()=>f.current=0,onThumbPointerDown:x=>f.current=x};function b(x,E){return T3(x,f.current,d,E)}return a==="horizontal"?g.jsx(x3,{...v,ref:r,onThumbPositionChange:()=>{if(o.viewport&&c.current){const x=o.viewport.scrollLeft,E=Ox(x,d,o.dir);c.current.style.transform=`translate3d(${E}px, 0, 0)`}},onWheelScroll:x=>{o.viewport&&(o.viewport.scrollLeft=x)},onDragScroll:x=>{o.viewport&&(o.viewport.scrollLeft=b(x,o.dir))}}):a==="vertical"?g.jsx(S3,{...v,ref:r,onThumbPositionChange:()=>{if(o.viewport&&c.current){const x=o.viewport.scrollTop,E=Ox(x,d);c.current.style.transform=`translate3d(0, ${E}px, 0)`}},onWheelScroll:x=>{o.viewport&&(o.viewport.scrollTop=x)},onDragScroll:x=>{o.viewport&&(o.viewport.scrollTop=b(x))}}):null}),x3=y.forwardRef((t,r)=>{const{sizes:a,onSizesChange:s,...o}=t,c=on(Gn,t.__scopeScrollArea),[f,d]=y.useState(),m=y.useRef(null),p=Ue(r,m,c.onScrollbarXChange);return y.useEffect(()=>{m.current&&d(getComputedStyle(m.current))},[m]),g.jsx(Y1,{"data-orientation":"horizontal",...o,ref:p,sizes:a,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Au(a)+"px",...t.style},onThumbPointerDown:v=>t.onThumbPointerDown(v.x),onDragScroll:v=>t.onDragScroll(v.x),onWheelScroll:(v,b)=>{if(c.viewport){const x=c.viewport.scrollLeft+v.deltaX;t.onWheelScroll(x),K1(x,b)&&v.preventDefault()}},onResize:()=>{m.current&&c.viewport&&f&&s({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:m.current.clientWidth,paddingStart:Jc(f.paddingLeft),paddingEnd:Jc(f.paddingRight)}})}})}),S3=y.forwardRef((t,r)=>{const{sizes:a,onSizesChange:s,...o}=t,c=on(Gn,t.__scopeScrollArea),[f,d]=y.useState(),m=y.useRef(null),p=Ue(r,m,c.onScrollbarYChange);return y.useEffect(()=>{m.current&&d(getComputedStyle(m.current))},[m]),g.jsx(Y1,{"data-orientation":"vertical",...o,ref:p,sizes:a,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Au(a)+"px",...t.style},onThumbPointerDown:v=>t.onThumbPointerDown(v.y),onDragScroll:v=>t.onDragScroll(v.y),onWheelScroll:(v,b)=>{if(c.viewport){const x=c.viewport.scrollTop+v.deltaY;t.onWheelScroll(x),K1(x,b)&&v.preventDefault()}},onResize:()=>{m.current&&c.viewport&&f&&s({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:m.current.clientHeight,paddingStart:Jc(f.paddingTop),paddingEnd:Jc(f.paddingBottom)}})}})}),[w3,V1]=H1(Gn),Y1=y.forwardRef((t,r)=>{const{__scopeScrollArea:a,sizes:s,hasThumb:o,onThumbChange:c,onThumbPointerUp:f,onThumbPointerDown:d,onThumbPositionChange:m,onDragScroll:p,onWheelScroll:v,onResize:b,...x}=t,E=on(Gn,a),[T,S]=y.useState(null),w=Ue(r,U=>S(U)),C=y.useRef(null),N=y.useRef(""),O=E.viewport,_=s.content-s.viewport,L=nt(v),$=nt(m),V=Nu(b,10);function k(U){if(C.current){const K=U.clientX-C.current.left,te=U.clientY-C.current.top;p({x:K,y:te})}}return y.useEffect(()=>{const U=K=>{const te=K.target;(T==null?void 0:T.contains(te))&&L(K,_)};return document.addEventListener("wheel",U,{passive:!1}),()=>document.removeEventListener("wheel",U,{passive:!1})},[O,T,_,L]),y.useEffect($,[s,$]),ps(T,V),ps(E.content,V),g.jsx(w3,{scope:a,scrollbar:T,hasThumb:o,onThumbChange:nt(c),onThumbPointerUp:nt(f),onThumbPositionChange:$,onThumbPointerDown:nt(d),children:g.jsx(we.div,{...x,ref:w,style:{position:"absolute",...x.style},onPointerDown:ve(t.onPointerDown,U=>{U.button===0&&(U.target.setPointerCapture(U.pointerId),C.current=T.getBoundingClientRect(),N.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E.viewport&&(E.viewport.style.scrollBehavior="auto"),k(U))}),onPointerMove:ve(t.onPointerMove,k),onPointerUp:ve(t.onPointerUp,U=>{const K=U.target;K.hasPointerCapture(U.pointerId)&&K.releasePointerCapture(U.pointerId),document.body.style.webkitUserSelect=N.current,E.viewport&&(E.viewport.style.scrollBehavior=""),C.current=null})})})}),Zc="ScrollAreaThumb",G1=y.forwardRef((t,r)=>{const{forceMount:a,...s}=t,o=V1(Zc,t.__scopeScrollArea);return g.jsx(ln,{present:a||o.hasThumb,children:g.jsx(E3,{ref:r,...s})})}),E3=y.forwardRef((t,r)=>{const{__scopeScrollArea:a,style:s,...o}=t,c=on(Zc,a),f=V1(Zc,a),{onThumbPositionChange:d}=f,m=Ue(r,b=>f.onThumbChange(b)),p=y.useRef(void 0),v=Nu(()=>{p.current&&(p.current(),p.current=void 0)},100);return y.useEffect(()=>{const b=c.viewport;if(b){const x=()=>{if(v(),!p.current){const E=C3(b,d);p.current=E,d()}};return d(),b.addEventListener("scroll",x),()=>b.removeEventListener("scroll",x)}},[c.viewport,v,d]),g.jsx(we.div,{"data-state":f.hasThumb?"visible":"hidden",...o,ref:m,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:ve(t.onPointerDownCapture,b=>{const E=b.target.getBoundingClientRect(),T=b.clientX-E.left,S=b.clientY-E.top;f.onThumbPointerDown({x:T,y:S})}),onPointerUp:ve(t.onPointerUp,f.onThumbPointerUp)})});G1.displayName=Zc;var Lp="ScrollAreaCorner",F1=y.forwardRef((t,r)=>{const a=on(Lp,t.__scopeScrollArea),s=!!(a.scrollbarX&&a.scrollbarY);return a.type!=="scroll"&&s?g.jsx(R3,{...t,ref:r}):null});F1.displayName=Lp;var R3=y.forwardRef((t,r)=>{const{__scopeScrollArea:a,...s}=t,o=on(Lp,a),[c,f]=y.useState(0),[d,m]=y.useState(0),p=!!(c&&d);return ps(o.scrollbarX,()=>{var b;const v=((b=o.scrollbarX)==null?void 0:b.offsetHeight)||0;o.onCornerHeightChange(v),m(v)}),ps(o.scrollbarY,()=>{var b;const v=((b=o.scrollbarY)==null?void 0:b.offsetWidth)||0;o.onCornerWidthChange(v),f(v)}),p?g.jsx(we.div,{...s,ref:r,style:{width:c,height:d,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function Jc(t){return t?parseInt(t,10):0}function Q1(t,r){const a=t/r;return isNaN(a)?0:a}function Au(t){const r=Q1(t.viewport,t.content),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=(t.scrollbar.size-a)*r;return Math.max(s,18)}function T3(t,r,a,s="ltr"){const o=Au(a),c=o/2,f=r||c,d=o-f,m=a.scrollbar.paddingStart+f,p=a.scrollbar.size-a.scrollbar.paddingEnd-d,v=a.content-a.viewport,b=s==="ltr"?[0,v]:[v*-1,0];return X1([m,p],b)(t)}function Ox(t,r,a="ltr"){const s=Au(r),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,c=r.scrollbar.size-o,f=r.content-r.viewport,d=c-s,m=a==="ltr"?[0,f]:[f*-1,0],p=zm(t,m);return X1([0,f],[0,d])(p)}function X1(t,r){return a=>{if(t[0]===t[1]||r[0]===r[1])return r[0];const s=(r[1]-r[0])/(t[1]-t[0]);return r[0]+s*(a-t[0])}}function K1(t,r){return t>0&&t<r}var C3=(t,r=()=>{})=>{let a={left:t.scrollLeft,top:t.scrollTop},s=0;return function o(){const c={left:t.scrollLeft,top:t.scrollTop},f=a.left!==c.left,d=a.top!==c.top;(f||d)&&r(),a=c,s=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(s)};function Nu(t,r){const a=nt(t),s=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(s.current),[]),y.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(a,r)},[a,r])}function ps(t,r){const a=nt(r);ft(()=>{let s=0;if(t){const o=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(a)});return o.observe(t),()=>{window.cancelAnimationFrame(s),o.unobserve(t)}}},[t,a])}var W1=$1,A3=B1,N3=F1;const Z1=y.forwardRef(({className:t,children:r,...a},s)=>g.jsxs(W1,{ref:s,className:le("relative overflow-hidden",t),...a,children:[g.jsx(A3,{className:"h-full w-full rounded-[inherit]",children:r}),g.jsx(J1,{}),g.jsx(N3,{})]}));Z1.displayName=W1.displayName;const J1=y.forwardRef(({className:t,orientation:r="vertical",...a},s)=>g.jsx(Dp,{ref:s,orientation:r,className:le("flex touch-none select-none transition-colors",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...a,children:g.jsx(G1,{className:"relative flex-1 rounded-full bg-border"})}));J1.displayName=Dp.displayName;function O3(t){const r=y.useRef({value:t,previous:t});return y.useMemo(()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous),[t])}var M3=[" ","Enter","ArrowUp","ArrowDown"],j3=[" ","Enter"],ao="Select",[Ou,Mu,D3]=gp(ao),[As,bz]=Bn(ao,[D3,cu]),ju=cu(),[_3,ga]=As(ao),[L3,z3]=As(ao),eR=t=>{const{__scopeSelect:r,children:a,open:s,defaultOpen:o,onOpenChange:c,value:f,defaultValue:d,onValueChange:m,dir:p,name:v,autoComplete:b,disabled:x,required:E,form:T}=t,S=ju(r),[w,C]=y.useState(null),[N,O]=y.useState(null),[_,L]=y.useState(!1),$=bu(p),[V=!1,k]=ni({prop:s,defaultProp:o,onChange:c}),[U,K]=ni({prop:f,defaultProp:d,onChange:m}),te=y.useRef(null),se=w?T||!!w.closest("form"):!0,[de,q]=y.useState(new Set),H=Array.from(de).map(j=>j.props.value).join(";");return g.jsx(xw,{...S,children:g.jsxs(_3,{required:E,scope:r,trigger:w,onTriggerChange:C,valueNode:N,onValueNodeChange:O,valueNodeHasChildren:_,onValueNodeHasChildrenChange:L,contentId:yr(),value:U,onValueChange:K,open:V,onOpenChange:k,dir:$,triggerPointerDownPosRef:te,disabled:x,children:[g.jsx(Ou.Provider,{scope:r,children:g.jsx(L3,{scope:t.__scopeSelect,onNativeOptionAdd:y.useCallback(j=>{q(B=>new Set(B).add(j))},[]),onNativeOptionRemove:y.useCallback(j=>{q(B=>{const z=new Set(B);return z.delete(j),z})},[]),children:a})}),se?g.jsxs(TR,{"aria-hidden":!0,required:E,tabIndex:-1,name:v,autoComplete:b,value:U,onChange:j=>K(j.target.value),disabled:x,form:T,children:[U===void 0?g.jsx("option",{value:""}):null,Array.from(de)]},H):null]})})};eR.displayName=ao;var tR="SelectTrigger",nR=y.forwardRef((t,r)=>{const{__scopeSelect:a,disabled:s=!1,...o}=t,c=ju(a),f=ga(tR,a),d=f.disabled||s,m=Ue(r,f.onTriggerChange),p=Mu(a),v=y.useRef("touch"),[b,x,E]=CR(S=>{const w=p().filter(O=>!O.disabled),C=w.find(O=>O.value===f.value),N=AR(w,S,C);N!==void 0&&f.onValueChange(N.value)}),T=S=>{d||(f.onOpenChange(!0),E()),S&&(f.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return g.jsx(Sw,{asChild:!0,...c,children:g.jsx(we.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":RR(f.value)?"":void 0,...o,ref:m,onClick:ve(o.onClick,S=>{S.currentTarget.focus(),v.current!=="mouse"&&T(S)}),onPointerDown:ve(o.onPointerDown,S=>{v.current=S.pointerType;const w=S.target;w.hasPointerCapture(S.pointerId)&&w.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(T(S),S.preventDefault())}),onKeyDown:ve(o.onKeyDown,S=>{const w=b.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&x(S.key),!(w&&S.key===" ")&&M3.includes(S.key)&&(T(),S.preventDefault())})})})});nR.displayName=tR;var rR="SelectValue",aR=y.forwardRef((t,r)=>{const{__scopeSelect:a,className:s,style:o,children:c,placeholder:f="",...d}=t,m=ga(rR,a),{onValueNodeHasChildrenChange:p}=m,v=c!==void 0,b=Ue(r,m.onValueNodeChange);return ft(()=>{p(v)},[p,v]),g.jsx(we.span,{...d,ref:b,style:{pointerEvents:"none"},children:RR(m.value)?g.jsx(g.Fragment,{children:f}):c})});aR.displayName=rR;var P3="SelectIcon",iR=y.forwardRef((t,r)=>{const{__scopeSelect:a,children:s,...o}=t;return g.jsx(we.span,{"aria-hidden":!0,...o,ref:r,children:s||"▼"})});iR.displayName=P3;var U3="SelectPortal",sR=t=>g.jsx(Xl,{asChild:!0,...t});sR.displayName=U3;var ii="SelectContent",lR=y.forwardRef((t,r)=>{const a=ga(ii,t.__scopeSelect),[s,o]=y.useState();if(ft(()=>{o(new DocumentFragment)},[]),!a.open){const c=s;return c?Ss.createPortal(g.jsx(oR,{scope:t.__scopeSelect,children:g.jsx(Ou.Slot,{scope:t.__scopeSelect,children:g.jsx("div",{children:t.children})})}),c):null}return g.jsx(cR,{...t,ref:r})});lR.displayName=ii;var hn=10,[oR,va]=As(ii),k3="SelectContentImpl",cR=y.forwardRef((t,r)=>{const{__scopeSelect:a,position:s="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:c,onPointerDownOutside:f,side:d,sideOffset:m,align:p,alignOffset:v,arrowPadding:b,collisionBoundary:x,collisionPadding:E,sticky:T,hideWhenDetached:S,avoidCollisions:w,...C}=t,N=ga(ii,a),[O,_]=y.useState(null),[L,$]=y.useState(null),V=Ue(r,ue=>_(ue)),[k,U]=y.useState(null),[K,te]=y.useState(null),se=Mu(a),[de,q]=y.useState(!1),H=y.useRef(!1);y.useEffect(()=>{if(O)return DS(O)},[O]),ES();const j=y.useCallback(ue=>{const[me,...Ee]=se().map(Ae=>Ae.ref.current),[fe]=Ee.slice(-1),Se=document.activeElement;for(const Ae of ue)if(Ae===Se||(Ae==null||Ae.scrollIntoView({block:"nearest"}),Ae===me&&L&&(L.scrollTop=0),Ae===fe&&L&&(L.scrollTop=L.scrollHeight),Ae==null||Ae.focus(),document.activeElement!==Se))return},[se,L]),B=y.useCallback(()=>j([k,O]),[j,k,O]);y.useEffect(()=>{de&&B()},[de,B]);const{onOpenChange:z,triggerPointerDownPosRef:Q}=N;y.useEffect(()=>{if(O){let ue={x:0,y:0};const me=fe=>{var Se,Ae;ue={x:Math.abs(Math.round(fe.pageX)-(((Se=Q.current)==null?void 0:Se.x)??0)),y:Math.abs(Math.round(fe.pageY)-(((Ae=Q.current)==null?void 0:Ae.y)??0))}},Ee=fe=>{ue.x<=10&&ue.y<=10?fe.preventDefault():O.contains(fe.target)||z(!1),document.removeEventListener("pointermove",me),Q.current=null};return Q.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",Ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",Ee,{capture:!0})}}},[O,z,Q]),y.useEffect(()=>{const ue=()=>z(!1);return window.addEventListener("blur",ue),window.addEventListener("resize",ue),()=>{window.removeEventListener("blur",ue),window.removeEventListener("resize",ue)}},[z]);const[M,G]=CR(ue=>{const me=se().filter(Se=>!Se.disabled),Ee=me.find(Se=>Se.ref.current===document.activeElement),fe=AR(me,ue,Ee);fe&&setTimeout(()=>fe.ref.current.focus())}),ee=y.useCallback((ue,me,Ee)=>{const fe=!H.current&&!Ee;(N.value!==void 0&&N.value===me||fe)&&(U(ue),fe&&(H.current=!0))},[N.value]),ae=y.useCallback(()=>O==null?void 0:O.focus(),[O]),re=y.useCallback((ue,me,Ee)=>{const fe=!H.current&&!Ee;(N.value!==void 0&&N.value===me||fe)&&te(ue)},[N.value]),oe=s==="popper"?Pm:uR,pe=oe===Pm?{side:d,sideOffset:m,align:p,alignOffset:v,arrowPadding:b,collisionBoundary:x,collisionPadding:E,sticky:T,hideWhenDetached:S,avoidCollisions:w}:{};return g.jsx(oR,{scope:a,content:O,viewport:L,onViewportChange:$,itemRefCallback:ee,selectedItem:k,onItemLeave:ae,itemTextRefCallback:re,focusSelectedItem:B,selectedItemText:K,position:s,isPositioned:de,searchRef:M,children:g.jsx(Xm,{as:sn,allowPinchZoom:!0,children:g.jsx(Qm,{asChild:!0,trapped:N.open,onMountAutoFocus:ue=>{ue.preventDefault()},onUnmountAutoFocus:ve(o,ue=>{var me;(me=N.trigger)==null||me.focus({preventScroll:!0}),ue.preventDefault()}),children:g.jsx(Ql,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:ue=>ue.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:g.jsx(oe,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:ue=>ue.preventDefault(),...C,...pe,onPlaced:()=>q(!0),ref:V,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:ve(C.onKeyDown,ue=>{const me=ue.ctrlKey||ue.altKey||ue.metaKey;if(ue.key==="Tab"&&ue.preventDefault(),!me&&ue.key.length===1&&G(ue.key),["ArrowUp","ArrowDown","Home","End"].includes(ue.key)){let fe=se().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(ue.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ue.key)){const Se=ue.target,Ae=fe.indexOf(Se);fe=fe.slice(Ae+1)}setTimeout(()=>j(fe)),ue.preventDefault()}})})})})})})});cR.displayName=k3;var H3="SelectItemAlignedPosition",uR=y.forwardRef((t,r)=>{const{__scopeSelect:a,onPlaced:s,...o}=t,c=ga(ii,a),f=va(ii,a),[d,m]=y.useState(null),[p,v]=y.useState(null),b=Ue(r,V=>v(V)),x=Mu(a),E=y.useRef(!1),T=y.useRef(!0),{viewport:S,selectedItem:w,selectedItemText:C,focusSelectedItem:N}=f,O=y.useCallback(()=>{if(c.trigger&&c.valueNode&&d&&p&&S&&w&&C){const V=c.trigger.getBoundingClientRect(),k=p.getBoundingClientRect(),U=c.valueNode.getBoundingClientRect(),K=C.getBoundingClientRect();if(c.dir!=="rtl"){const Se=K.left-k.left,Ae=U.left-Se,Ie=V.left-Ae,Et=V.width+Ie,Rn=Math.max(Et,k.width),Vt=window.innerWidth-hn,Fn=zm(Ae,[hn,Math.max(hn,Vt-Rn)]);d.style.minWidth=Et+"px",d.style.left=Fn+"px"}else{const Se=k.right-K.right,Ae=window.innerWidth-U.right-Se,Ie=window.innerWidth-V.right-Ae,Et=V.width+Ie,Rn=Math.max(Et,k.width),Vt=window.innerWidth-hn,Fn=zm(Ae,[hn,Math.max(hn,Vt-Rn)]);d.style.minWidth=Et+"px",d.style.right=Fn+"px"}const te=x(),se=window.innerHeight-hn*2,de=S.scrollHeight,q=window.getComputedStyle(p),H=parseInt(q.borderTopWidth,10),j=parseInt(q.paddingTop,10),B=parseInt(q.borderBottomWidth,10),z=parseInt(q.paddingBottom,10),Q=H+j+de+z+B,M=Math.min(w.offsetHeight*5,Q),G=window.getComputedStyle(S),ee=parseInt(G.paddingTop,10),ae=parseInt(G.paddingBottom,10),re=V.top+V.height/2-hn,oe=se-re,pe=w.offsetHeight/2,ue=w.offsetTop+pe,me=H+j+ue,Ee=Q-me;if(me<=re){const Se=te.length>0&&w===te[te.length-1].ref.current;d.style.bottom="0px";const Ae=p.clientHeight-S.offsetTop-S.offsetHeight,Ie=Math.max(oe,pe+(Se?ae:0)+Ae+B),Et=me+Ie;d.style.height=Et+"px"}else{const Se=te.length>0&&w===te[0].ref.current;d.style.top="0px";const Ie=Math.max(re,H+S.offsetTop+(Se?ee:0)+pe)+Ee;d.style.height=Ie+"px",S.scrollTop=me-re+S.offsetTop}d.style.margin=`${hn}px 0`,d.style.minHeight=M+"px",d.style.maxHeight=se+"px",s==null||s(),requestAnimationFrame(()=>E.current=!0)}},[x,c.trigger,c.valueNode,d,p,S,w,C,c.dir,s]);ft(()=>O(),[O]);const[_,L]=y.useState();ft(()=>{p&&L(window.getComputedStyle(p).zIndex)},[p]);const $=y.useCallback(V=>{V&&T.current===!0&&(O(),N==null||N(),T.current=!1)},[O,N]);return g.jsx(q3,{scope:a,contentWrapper:d,shouldExpandOnScrollRef:E,onScrollButtonChange:$,children:g.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:g.jsx(we.div,{...o,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});uR.displayName=H3;var $3="SelectPopperPosition",Pm=y.forwardRef((t,r)=>{const{__scopeSelect:a,align:s="start",collisionPadding:o=hn,...c}=t,f=ju(a);return g.jsx(ww,{...f,...c,ref:r,align:s,collisionPadding:o,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Pm.displayName=$3;var[q3,zp]=As(ii,{}),Um="SelectViewport",fR=y.forwardRef((t,r)=>{const{__scopeSelect:a,nonce:s,...o}=t,c=va(Um,a),f=zp(Um,a),d=Ue(r,c.onViewportChange),m=y.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),g.jsx(Ou.Slot,{scope:a,children:g.jsx(we.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ve(o.onScroll,p=>{const v=p.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:x}=f;if(x!=null&&x.current&&b){const E=Math.abs(m.current-v.scrollTop);if(E>0){const T=window.innerHeight-hn*2,S=parseFloat(b.style.minHeight),w=parseFloat(b.style.height),C=Math.max(S,w);if(C<T){const N=C+E,O=Math.min(T,N),_=N-O;b.style.height=O+"px",b.style.bottom==="0px"&&(v.scrollTop=_>0?_:0,b.style.justifyContent="flex-end")}}}m.current=v.scrollTop})})})]})});fR.displayName=Um;var dR="SelectGroup",[B3,I3]=As(dR),V3=y.forwardRef((t,r)=>{const{__scopeSelect:a,...s}=t,o=yr();return g.jsx(B3,{scope:a,id:o,children:g.jsx(we.div,{role:"group","aria-labelledby":o,...s,ref:r})})});V3.displayName=dR;var hR="SelectLabel",mR=y.forwardRef((t,r)=>{const{__scopeSelect:a,...s}=t,o=I3(hR,a);return g.jsx(we.div,{id:o.id,...s,ref:r})});mR.displayName=hR;var eu="SelectItem",[Y3,pR]=As(eu),gR=y.forwardRef((t,r)=>{const{__scopeSelect:a,value:s,disabled:o=!1,textValue:c,...f}=t,d=ga(eu,a),m=va(eu,a),p=d.value===s,[v,b]=y.useState(c??""),[x,E]=y.useState(!1),T=Ue(r,N=>{var O;return(O=m.itemRefCallback)==null?void 0:O.call(m,N,s,o)}),S=yr(),w=y.useRef("touch"),C=()=>{o||(d.onValueChange(s),d.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(Y3,{scope:a,value:s,disabled:o,textId:S,isSelected:p,onItemTextChange:y.useCallback(N=>{b(O=>O||((N==null?void 0:N.textContent)??"").trim())},[]),children:g.jsx(Ou.ItemSlot,{scope:a,value:s,disabled:o,textValue:v,children:g.jsx(we.div,{role:"option","aria-labelledby":S,"data-highlighted":x?"":void 0,"aria-selected":p&&x,"data-state":p?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...f,ref:T,onFocus:ve(f.onFocus,()=>E(!0)),onBlur:ve(f.onBlur,()=>E(!1)),onClick:ve(f.onClick,()=>{w.current!=="mouse"&&C()}),onPointerUp:ve(f.onPointerUp,()=>{w.current==="mouse"&&C()}),onPointerDown:ve(f.onPointerDown,N=>{w.current=N.pointerType}),onPointerMove:ve(f.onPointerMove,N=>{var O;w.current=N.pointerType,o?(O=m.onItemLeave)==null||O.call(m):w.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ve(f.onPointerLeave,N=>{var O;N.currentTarget===document.activeElement&&((O=m.onItemLeave)==null||O.call(m))}),onKeyDown:ve(f.onKeyDown,N=>{var _;((_=m.searchRef)==null?void 0:_.current)!==""&&N.key===" "||(j3.includes(N.key)&&C(),N.key===" "&&N.preventDefault())})})})})});gR.displayName=eu;var zl="SelectItemText",vR=y.forwardRef((t,r)=>{const{__scopeSelect:a,className:s,style:o,...c}=t,f=ga(zl,a),d=va(zl,a),m=pR(zl,a),p=z3(zl,a),[v,b]=y.useState(null),x=Ue(r,C=>b(C),m.onItemTextChange,C=>{var N;return(N=d.itemTextRefCallback)==null?void 0:N.call(d,C,m.value,m.disabled)}),E=v==null?void 0:v.textContent,T=y.useMemo(()=>g.jsx("option",{value:m.value,disabled:m.disabled,children:E},m.value),[m.disabled,m.value,E]),{onNativeOptionAdd:S,onNativeOptionRemove:w}=p;return ft(()=>(S(T),()=>w(T)),[S,w,T]),g.jsxs(g.Fragment,{children:[g.jsx(we.span,{id:m.textId,...c,ref:x}),m.isSelected&&f.valueNode&&!f.valueNodeHasChildren?Ss.createPortal(c.children,f.valueNode):null]})});vR.displayName=zl;var yR="SelectItemIndicator",bR=y.forwardRef((t,r)=>{const{__scopeSelect:a,...s}=t;return pR(yR,a).isSelected?g.jsx(we.span,{"aria-hidden":!0,...s,ref:r}):null});bR.displayName=yR;var km="SelectScrollUpButton",xR=y.forwardRef((t,r)=>{const a=va(km,t.__scopeSelect),s=zp(km,t.__scopeSelect),[o,c]=y.useState(!1),f=Ue(r,s.onScrollButtonChange);return ft(()=>{if(a.viewport&&a.isPositioned){let d=function(){const p=m.scrollTop>0;c(p)};const m=a.viewport;return d(),m.addEventListener("scroll",d),()=>m.removeEventListener("scroll",d)}},[a.viewport,a.isPositioned]),o?g.jsx(wR,{...t,ref:f,onAutoScroll:()=>{const{viewport:d,selectedItem:m}=a;d&&m&&(d.scrollTop=d.scrollTop-m.offsetHeight)}}):null});xR.displayName=km;var Hm="SelectScrollDownButton",SR=y.forwardRef((t,r)=>{const a=va(Hm,t.__scopeSelect),s=zp(Hm,t.__scopeSelect),[o,c]=y.useState(!1),f=Ue(r,s.onScrollButtonChange);return ft(()=>{if(a.viewport&&a.isPositioned){let d=function(){const p=m.scrollHeight-m.clientHeight,v=Math.ceil(m.scrollTop)<p;c(v)};const m=a.viewport;return d(),m.addEventListener("scroll",d),()=>m.removeEventListener("scroll",d)}},[a.viewport,a.isPositioned]),o?g.jsx(wR,{...t,ref:f,onAutoScroll:()=>{const{viewport:d,selectedItem:m}=a;d&&m&&(d.scrollTop=d.scrollTop+m.offsetHeight)}}):null});SR.displayName=Hm;var wR=y.forwardRef((t,r)=>{const{__scopeSelect:a,onAutoScroll:s,...o}=t,c=va("SelectScrollButton",a),f=y.useRef(null),d=Mu(a),m=y.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return y.useEffect(()=>()=>m(),[m]),ft(()=>{var v;const p=d().find(b=>b.ref.current===document.activeElement);(v=p==null?void 0:p.ref.current)==null||v.scrollIntoView({block:"nearest"})},[d]),g.jsx(we.div,{"aria-hidden":!0,...o,ref:r,style:{flexShrink:0,...o.style},onPointerDown:ve(o.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(s,50))}),onPointerMove:ve(o.onPointerMove,()=>{var p;(p=c.onItemLeave)==null||p.call(c),f.current===null&&(f.current=window.setInterval(s,50))}),onPointerLeave:ve(o.onPointerLeave,()=>{m()})})}),G3="SelectSeparator",ER=y.forwardRef((t,r)=>{const{__scopeSelect:a,...s}=t;return g.jsx(we.div,{"aria-hidden":!0,...s,ref:r})});ER.displayName=G3;var $m="SelectArrow",F3=y.forwardRef((t,r)=>{const{__scopeSelect:a,...s}=t,o=ju(a),c=ga($m,a),f=va($m,a);return c.open&&f.position==="popper"?g.jsx(Ew,{...o,...s,ref:r}):null});F3.displayName=$m;function RR(t){return t===""||t===void 0}var TR=y.forwardRef((t,r)=>{const{value:a,...s}=t,o=y.useRef(null),c=Ue(r,o),f=O3(a);return y.useEffect(()=>{const d=o.current,m=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(m,"value").set;if(f!==a&&v){const b=new Event("change",{bubbles:!0});v.call(d,a),d.dispatchEvent(b)}},[f,a]),g.jsx(Wl,{asChild:!0,children:g.jsx("select",{...s,ref:c,defaultValue:a})})});TR.displayName="BubbleSelect";function CR(t){const r=nt(t),a=y.useRef(""),s=y.useRef(0),o=y.useCallback(f=>{const d=a.current+f;r(d),function m(p){a.current=p,window.clearTimeout(s.current),p!==""&&(s.current=window.setTimeout(()=>m(""),1e3))}(d)},[r]),c=y.useCallback(()=>{a.current="",window.clearTimeout(s.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(s.current),[]),[a,o,c]}function AR(t,r,a){const o=r.length>1&&Array.from(r).every(p=>p===r[0])?r[0]:r,c=a?t.indexOf(a):-1;let f=Q3(t,Math.max(c,0));o.length===1&&(f=f.filter(p=>p!==a));const m=f.find(p=>p.textValue.toLowerCase().startsWith(o.toLowerCase()));return m!==a?m:void 0}function Q3(t,r){return t.map((a,s)=>t[(r+s)%t.length])}var X3=eR,NR=nR,K3=aR,W3=iR,Z3=sR,OR=lR,J3=fR,MR=mR,jR=gR,ez=vR,tz=bR,DR=xR,_R=SR,LR=ER;const nz=X3,rz=K3,zR=y.forwardRef(({className:t,children:r,...a},s)=>g.jsxs(NR,{ref:s,className:le("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...a,children:[r,g.jsx(W3,{asChild:!0,children:g.jsx(iS,{className:"h-4 w-4 opacity-50"})})]}));zR.displayName=NR.displayName;const PR=y.forwardRef(({className:t,...r},a)=>g.jsx(DR,{ref:a,className:le("flex cursor-default items-center justify-center py-1",t),...r,children:g.jsx(lN,{className:"h-4 w-4"})}));PR.displayName=DR.displayName;const UR=y.forwardRef(({className:t,...r},a)=>g.jsx(_R,{ref:a,className:le("flex cursor-default items-center justify-center py-1",t),...r,children:g.jsx(iS,{className:"h-4 w-4"})}));UR.displayName=_R.displayName;const kR=y.forwardRef(({className:t,children:r,position:a="popper",...s},o)=>g.jsx(Z3,{children:g.jsxs(OR,{ref:o,className:le("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...s,children:[g.jsx(PR,{}),g.jsx(J3,{className:le("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),g.jsx(UR,{})]})}));kR.displayName=OR.displayName;const az=y.forwardRef(({className:t,...r},a)=>g.jsx(MR,{ref:a,className:le("px-2 py-1.5 text-sm font-semibold",t),...r}));az.displayName=MR.displayName;const qm=y.forwardRef(({className:t,children:r,...a},s)=>g.jsxs(jR,{ref:s,className:le("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[g.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(tz,{children:g.jsx(Gm,{className:"h-4 w-4"})})}),g.jsx(ez,{children:r})]}));qm.displayName=jR.displayName;const iz=y.forwardRef(({className:t,...r},a)=>g.jsx(LR,{ref:a,className:le("-mx-1 my-1 h-px bg-muted",t),...r}));iz.displayName=LR.displayName;const sz={10:"TRACE",20:"DEBUG",27:"SUCCESS",28:"PROGRESS",29:"LOG",30:"INFO",40:"WARN",50:"ERROR",60:"FATAL"},lz={10:"text-gray-400",20:"text-blue-400",27:"text-green-600",28:"text-purple-400",29:"text-gray-300",30:"text-emerald-400",40:"text-yellow-400",50:"text-red-400",60:"text-red-600"};function oz(){const[t,r]=y.useState("all"),[a,s]=y.useState(!0),o=y.useRef(null),c=y.useRef(!1),f=y.useRef(""),{data:d,error:m,isLoading:p}=ys({queryKey:["logs",t],queryFn:()=>Lt.getLogs(t==="all"?"":t),refetchInterval:1e3,staleTime:1e3}),v=()=>{if(!o.current)return;const w=o.current,C=w.scrollHeight,N=w.clientHeight;w.scrollTo({top:C-N,behavior:"instant"})};y.useEffect(()=>{var N;if(!((N=d==null?void 0:d.logs)!=null&&N.length))return;const w=d.logs[d.logs.length-1],C=`${w.time}-${w.msg}`;a&&C!==f.current&&(setTimeout(v,0),f.current=C)},[d==null?void 0:d.logs,a]);const b=w=>{if(c.current)return;const{scrollTop:C,scrollHeight:N,clientHeight:O}=w.currentTarget,L=N-(C+O)<100;s(L),c.current=!0,setTimeout(()=>{c.current=!1},150)},x=()=>{s(!0),v()};y.useEffect(()=>{setTimeout(v,100)},[d==null?void 0:d.logs]);const E=w=>sz[w]||"UNKNOWN",T=w=>lz[w]||"text-gray-400",S=w=>{const C=m3(w.time,"yyyy-MM-dd HH:mm:ss"),N=E(w.level),O=Object.entries(w).filter(([L])=>!Number.isNaN(Number(L))).sort((L,$)=>Number(L[0])-Number($[0])),_=O.length>0?`
|
|
265
|
+
${O.map(([L,$])=>$).join(`
|
|
266
|
+
`)}`:"";return g.jsxs("div",{className:"whitespace-pre-wrap font-mono",children:[g.jsxs("span",{className:"text-gray-500",children:["[",C,"]"]})," ",g.jsxs("span",{className:T(w.level),children:[N,":"]})," ",g.jsx("span",{className:"text-white",children:w.msg}),g.jsx("span",{className:"text-gray-300",children:_})]},`${w.time}-${w.msg}`)};return g.jsxs("div",{className:"p-4",children:[g.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[g.jsx(O1,{title:"System Logs"}),g.jsxs("div",{className:"flex items-center gap-4",children:[!a&&g.jsx("button",{type:"button",onClick:x,className:"text-xs text-gray-400 hover:text-white transition-colors",children:"Resume auto-scroll"}),g.jsxs(nz,{value:t,onValueChange:r,children:[g.jsx(zR,{className:"w-32",children:g.jsx(rz,{placeholder:"Select level"})}),g.jsxs(kR,{children:[g.jsx(qm,{value:"all",children:"ALL"}),d==null?void 0:d.levels.map(w=>g.jsx(qm,{value:w,children:w.toUpperCase()},w))]})]})]})]}),p?g.jsx("div",{className:"font-mono p-4",children:"Loading logs..."}):m?g.jsx("div",{className:"text-red-500 font-mono p-4",children:m instanceof Error?m.message:"Failed to fetch logs"}):g.jsx(Z1,{className:"h-[600px] rounded-md border bg-black",children:g.jsx("div",{ref:o,onScroll:b,className:"p-4 text-sm space-y-1 h-full overflow-auto",children:(d==null?void 0:d.logs.length)===0?g.jsxs("div",{className:"text-gray-500 font-mono",children:["No ",t==="all"?"":t.toUpperCase()," ","logs found"]}):d==null?void 0:d.logs.map(w=>S(w))})})]})}const HR=new zA({defaultOptions:{queries:{staleTime:kn.STANDARD,refetchInterval:!1,retry:3,retryDelay:t=>Math.min(1e3*2**t,3e4),refetchOnWindowFocus:!0,refetchOnReconnect:!0},mutations:{retry:3,retryDelay:t=>Math.min(1e3*2**t,3e4)}}}),$R=async()=>{try{await HR.prefetchQuery({queryKey:["agents"],queryFn:()=>Lt.getAgents(),staleTime:kn.FREQUENT})}catch(t){console.error("Error prefetching initial data:",t)}};$R();function cz(){return l4(),y.useEffect(()=>{$R()},[]),g.jsx($A,{client:HR,children:g.jsx("div",{className:"dark antialiased",style:{colorScheme:"dark"},children:g.jsx(t_,{children:g.jsxs(_w,{delayDuration:0,children:[g.jsxs(zw,{children:[g.jsx(f_,{}),g.jsx(Uw,{children:g.jsx("div",{className:"flex flex-1 flex-col gap-4 size-full container",children:g.jsxs(DD,{children:[g.jsx(qa,{path:"/",element:g.jsx(_L,{})}),g.jsx(qa,{path:"chat/:agentId",element:g.jsx(J_,{})}),g.jsx(qa,{path:"settings/:agentId",element:g.jsx(ML,{})}),g.jsx(qa,{path:"agents/new",element:g.jsx(o4,{})}),g.jsx(qa,{path:"/create",element:g.jsx(L1,{})}),g.jsx(qa,{path:"/logs",element:g.jsx(oz,{})})]})})})]}),g.jsx(D_,{})]})})})})}const qR=document.getElementById("root");if(!qR)throw new Error("Root element not found");xA.createRoot(qR).render(g.jsx(y.StrictMode,{children:g.jsx(cz,{})}));
|