@tyanxie/paimon-darwin-arm64 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,270 @@
1
+ var Dv=Object.defineProperty;var kv=(n,l,i)=>l in n?Dv(n,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[l]=i;var Im=(n,l,i)=>kv(n,typeof l!="symbol"?l+"":l,i);import{f as Af,r as b,R as Ou,g as m0,j as y,a as Uv,p as Mi,o as Bv,h as Hv,s as qv,b as Ru,m as _u,e as Yv,M as Vv,c as Gv,d as Fv}from"./markdown-Cx3yqksU.js";(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))u(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const d of o.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&u(d)}).observe(document,{childList:!0,subtree:!0});function i(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function u(s){if(s.ep)return;s.ep=!0;const o=i(s);fetch(s.href,o)}})();var Tc={exports:{}},zi={},Oc={exports:{}},Rc={};/**
2
+ * @license React
3
+ * scheduler.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 Wm;function $v(){return Wm||(Wm=1,(function(n){function l(M,Q){var $=M.length;M.push(Q);e:for(;0<$;){var Z=$-1>>>1,W=M[Z];if(0<s(W,Q))M[Z]=Q,M[$]=W,$=Z;else break e}}function i(M){return M.length===0?null:M[0]}function u(M){if(M.length===0)return null;var Q=M[0],$=M.pop();if($!==Q){M[0]=$;e:for(var Z=0,W=M.length,H=W>>>1;Z<H;){var P=2*(Z+1)-1,ne=M[P],de=P+1,fe=M[de];if(0>s(ne,$))de<W&&0>s(fe,ne)?(M[Z]=fe,M[de]=$,Z=de):(M[Z]=ne,M[P]=$,Z=P);else if(de<W&&0>s(fe,$))M[Z]=fe,M[de]=$,Z=de;else break e}}return Q}function s(M,Q){var $=M.sortIndex-Q.sortIndex;return $!==0?$:M.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var p=[],m=[],v=1,x=null,E=3,C=!1,N=!1,w=!1,j=!1,R=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function U(M){for(var Q=i(m);Q!==null;){if(Q.callback===null)u(m);else if(Q.startTime<=M)u(m),Q.sortIndex=Q.expirationTime,l(p,Q);else break;Q=i(m)}}function X(M){if(w=!1,U(M),!N)if(i(p)!==null)N=!0,J||(J=!0,ee());else{var Q=i(m);Q!==null&&re(X,Q.startTime-M)}}var J=!1,G=-1,K=5,q=-1;function I(){return j?!0:!(n.unstable_now()-q<K)}function oe(){if(j=!1,J){var M=n.unstable_now();q=M;var Q=!0;try{e:{N=!1,w&&(w=!1,T(G),G=-1),C=!0;var $=E;try{t:{for(U(M),x=i(p);x!==null&&!(x.expirationTime>M&&I());){var Z=x.callback;if(typeof Z=="function"){x.callback=null,E=x.priorityLevel;var W=Z(x.expirationTime<=M);if(M=n.unstable_now(),typeof W=="function"){x.callback=W,U(M),Q=!0;break t}x===i(p)&&u(p),U(M)}else u(p);x=i(p)}if(x!==null)Q=!0;else{var H=i(m);H!==null&&re(X,H.startTime-M),Q=!1}}break e}finally{x=null,E=$,C=!1}Q=void 0}}finally{Q?ee():J=!1}}}var ee;if(typeof z=="function")ee=function(){z(oe)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,te=ae.port2;ae.port1.onmessage=oe,ee=function(){te.postMessage(null)}}else ee=function(){R(oe,0)};function re(M,Q){G=R(function(){M(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(M){M.callback=null},n.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<M?Math.floor(1e3/M):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(M){switch(E){case 1:case 2:case 3:var Q=3;break;default:Q=E}var $=E;E=Q;try{return M()}finally{E=$}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(M,Q){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var $=E;E=M;try{return Q()}finally{E=$}},n.unstable_scheduleCallback=function(M,Q,$){var Z=n.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?Z+$:Z):$=Z,M){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=$+W,M={id:v++,callback:Q,priorityLevel:M,startTime:$,expirationTime:W,sortIndex:-1},$>Z?(M.sortIndex=$,l(m,M),i(p)===null&&M===i(m)&&(w?(T(G),G=-1):w=!0,re(X,$-Z))):(M.sortIndex=W,l(p,M),N||C||(N=!0,J||(J=!0,ee()))),M},n.unstable_shouldYield=I,n.unstable_wrapCallback=function(M){var Q=E;return function(){var $=E;E=Q;try{return M.apply(this,arguments)}finally{E=$}}}})(Rc)),Rc}var Pm;function Kv(){return Pm||(Pm=1,Oc.exports=$v()),Oc.exports}var _c={exports:{}},lt={};/**
10
+ * @license React
11
+ * react-dom.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 eg;function Xv(){if(eg)return lt;eg=1;var n=Af();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var u={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(p,m,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:""+x,children:p,containerInfo:m,implementation:v}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return lt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,lt.createPortal=function(p,m){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return o(p,m,null,v)},lt.flushSync=function(p){var m=d.T,v=u.p;try{if(d.T=null,u.p=2,p)return p()}finally{d.T=m,u.p=v,u.d.f()}},lt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,u.d.C(p,m))},lt.prefetchDNS=function(p){typeof p=="string"&&u.d.D(p)},lt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var v=m.as,x=h(v,m.crossOrigin),E=typeof m.integrity=="string"?m.integrity:void 0,C=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?u.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:E,fetchPriority:C}):v==="script"&&u.d.X(p,{crossOrigin:x,integrity:E,fetchPriority:C,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},lt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=h(m.as,m.crossOrigin);u.d.M(p,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&u.d.M(p)},lt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,x=h(v,m.crossOrigin);u.d.L(p,v,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},lt.preloadModule=function(p,m){if(typeof p=="string")if(m){var v=h(m.as,m.crossOrigin);u.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else u.d.m(p)},lt.requestFormReset=function(p){u.d.r(p)},lt.unstable_batchedUpdates=function(p,m){return p(m)},lt.useFormState=function(p,m,v){return d.H.useFormState(p,m,v)},lt.useFormStatus=function(){return d.H.useHostTransitionStatus()},lt.version="19.2.6",lt}var tg;function g0(){if(tg)return _c.exports;tg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),_c.exports=Xv(),_c.exports}/**
18
+ * @license React
19
+ * react-dom-client.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 ng;function Qv(){if(ng)return zi;ng=1;var n=Kv(),l=Af(),i=g0();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(o(e)!==e)throw Error(u(188))}function m(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,r=t;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(r=c.return,r!==null){a=r;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return p(c),e;if(f===r)return p(c),t;f=f.sibling}throw Error(u(188))}if(a.return!==r.return)a=c,r=f;else{for(var g=!1,S=c.child;S;){if(S===a){g=!0,a=c,r=f;break}if(S===r){g=!0,r=c,a=f;break}S=S.sibling}if(!g){for(S=f.child;S;){if(S===a){g=!0,a=f,r=c;break}if(S===r){g=!0,r=f,a=c;break}S=S.sibling}if(!g)throw Error(u(189))}}if(a.alternate!==r)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,E=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),z=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function ee(e){return e===null||typeof e!="object"?null:(e=oe&&e[oe]||e["@@iterator"],typeof e=="function"?e:null)}var ae=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case R:return"Profiler";case j:return"StrictMode";case X:return"Suspense";case J:return"SuspenseList";case q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case z:return e.displayName||"Context";case T:return(e._context.displayName||"Context")+".Consumer";case U:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var re=Array.isArray,M=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},Z=[],W=-1;function H(e){return{current:e}}function P(e){0>W||(e.current=Z[W],Z[W]=null,W--)}function ne(e,t){W++,Z[W]=e.current,e.current=t}var de=H(null),fe=H(null),Ae=H(null),ot=H(null);function Gt(e,t){switch(ne(Ae,t),ne(fe,e),ne(de,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=bm(t),e=Sm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P(de),ne(de,e)}function _n(){P(de),P(fe),P(Ae)}function La(e){e.memoizedState!==null&&ne(ot,e);var t=de.current,a=Sm(t,e.type);t!==a&&(ne(fe,e),ne(de,a))}function Da(e){fe.current===e&&(P(de),P(fe)),ot.current===e&&(P(ot),Ti._currentValue=$)}var Ml,zl;function ln(e){if(Ml===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ml=t&&t[1]||"",zl=-1<a.stack.indexOf(`
26
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
27
+ `+Ml+e+zl}var ka=!1;function Ll(e,t){if(!e||ka)return"";ka=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(B){var k=B}Reflect.construct(e,[],F)}else{try{F.call()}catch(B){k=B}e.call(F.prototype)}}else{try{throw Error()}catch(B){k=B}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(B){if(B&&k&&typeof B.stack=="string")return[B.stack,k.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=r.DetermineComponentFrameRoot(),g=f[0],S=f[1];if(g&&S){var A=g.split(`
28
+ `),D=S.split(`
29
+ `);for(c=r=0;r<A.length&&!A[r].includes("DetermineComponentFrameRoot");)r++;for(;c<D.length&&!D[c].includes("DetermineComponentFrameRoot");)c++;if(r===A.length||c===D.length)for(r=A.length-1,c=D.length-1;1<=r&&0<=c&&A[r]!==D[c];)c--;for(;1<=r&&0<=c;r--,c--)if(A[r]!==D[c]){if(r!==1||c!==1)do if(r--,c--,0>c||A[r]!==D[c]){var Y=`
30
+ `+A[r].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=r&&0<=c);break}}}finally{ka=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ln(a):""}function Dl(e,t){switch(e.tag){case 26:case 27:case 5:return ln(e.type);case 16:return ln("Lazy");case 13:return e.child!==t&&t!==null?ln("Suspense Fallback"):ln("Suspense");case 19:return ln("SuspenseList");case 0:case 15:return Ll(e.type,!1);case 11:return Ll(e.type.render,!1);case 1:return Ll(e.type,!0);case 31:return ln("Activity");default:return""}}function cr(e){try{var t="",a=null;do t+=Dl(e,a),a=e,e=e.return;while(e);return t}catch(r){return`
31
+ Error generating stack: `+r.message+`
32
+ `+r.stack}}var kl=Object.prototype.hasOwnProperty,Ul=n.unstable_scheduleCallback,Bl=n.unstable_cancelCallback,ed=n.unstable_shouldYield,fr=n.unstable_requestPaint,pe=n.unstable_now,ct=n.unstable_getCurrentPriorityLevel,oa=n.unstable_ImmediatePriority,ca=n.unstable_UserBlockingPriority,Mn=n.unstable_NormalPriority,ps=n.unstable_LowPriority,Hl=n.unstable_IdlePriority,dr=n.log,x1=n.unstable_setDisableYieldValue,ql=null,St=null;function zn(e){if(typeof dr=="function"&&x1(e),St&&typeof St.setStrictMode=="function")try{St.setStrictMode(ql,e)}catch{}}var Et=Math.clz32?Math.clz32:S1,v1=Math.log,b1=Math.LN2;function S1(e){return e>>>=0,e===0?32:31-(v1(e)/b1|0)|0}var hr=256,pr=262144,mr=4194304;function fa(e){var t=e&42;if(t!==0)return t;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:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;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 gr(e,t,a){var r=e.pendingLanes;if(r===0)return 0;var c=0,f=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=r&134217727;return S!==0?(r=S&~f,r!==0?c=fa(r):(g&=S,g!==0?c=fa(g):a||(a=S&~e,a!==0&&(c=fa(a))))):(S=r&~f,S!==0?c=fa(S):g!==0?c=fa(g):a||(a=r&~e,a!==0&&(c=fa(a)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:c}function Yl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function E1(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+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 td(){var e=mr;return mr<<=1,(mr&62914560)===0&&(mr=4194304),e}function ms(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Vl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function C1(e,t,a,r,c,f){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,A=e.expirationTimes,D=e.hiddenUpdates;for(a=g&~a;0<a;){var Y=31-Et(a),F=1<<Y;S[Y]=0,A[Y]=-1;var k=D[Y];if(k!==null)for(D[Y]=null,Y=0;Y<k.length;Y++){var B=k[Y];B!==null&&(B.lane&=-536870913)}a&=~F}r!==0&&nd(e,r,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(g&~t))}function nd(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Et(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|a&261930}function ad(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-Et(a),c=1<<r;c&t|e[r]&t&&(e[r]|=t),a&=~c}}function ld(e,t){var a=t&-t;return a=(a&42)!==0?1:gs(a),(a&(e.suspendedLanes|t))!==0?0:a}function gs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ys(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function id(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Fm(e.type))}function rd(e,t){var a=Q.p;try{return Q.p=e,t()}finally{Q.p=a}}var Ln=Math.random().toString(36).slice(2),Ie="__reactFiber$"+Ln,ft="__reactProps$"+Ln,Ua="__reactContainer$"+Ln,xs="__reactEvents$"+Ln,N1="__reactListeners$"+Ln,A1="__reactHandles$"+Ln,ud="__reactResources$"+Ln,Gl="__reactMarker$"+Ln;function vs(e){delete e[Ie],delete e[ft],delete e[xs],delete e[N1],delete e[A1]}function Ba(e){var t=e[Ie];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ua]||a[Ie]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Tm(e);e!==null;){if(a=e[Ie])return a;e=Tm(e)}return t}e=a,a=e.parentNode}return null}function Ha(e){if(e=e[Ie]||e[Ua]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Fl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function qa(e){var t=e[ud];return t||(t=e[ud]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ze(e){e[Gl]=!0}var sd=new Set,od={};function da(e,t){Ya(e,t),Ya(e+"Capture",t)}function Ya(e,t){for(od[e]=t,e=0;e<t.length;e++)sd.add(t[e])}var j1=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]*$"),cd={},fd={};function w1(e){return kl.call(fd,e)?!0:kl.call(cd,e)?!1:j1.test(e)?fd[e]=!0:(cd[e]=!0,!1)}function yr(e,t,a){if(w1(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function xr(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function rn(e,t,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+r)}}function _t(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function dd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function T1(e,t,a){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,f=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(g){a=""+g,f.call(this,g)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bs(e){if(!e._valueTracker){var t=dd(e)?"checked":"value";e._valueTracker=T1(e,t,""+e[t])}}function hd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=dd(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}function vr(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 O1=/[\n"\\]/g;function Mt(e){return e.replace(O1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ss(e,t,a,r,c,f,g,S){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+_t(t)):e.value!==""+_t(t)&&(e.value=""+_t(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Es(e,g,_t(t)):a!=null?Es(e,g,_t(a)):r!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+_t(S):e.removeAttribute("name")}function pd(e,t,a,r,c,f,g,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){bs(e);return}a=a!=null?""+_t(a):"",t=t!=null?""+_t(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}r=r??c,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=S?e.checked:!!r,e.defaultChecked=!!r,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),bs(e)}function Es(e,t,a){t==="number"&&vr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Va(e,t,a,r){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&r&&(e[a].defaultSelected=!0)}else{for(a=""+_t(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,r&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function md(e,t,a){if(t!=null&&(t=""+_t(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+_t(a):""}function gd(e,t,a,r){if(t==null){if(r!=null){if(a!=null)throw Error(u(92));if(re(r)){if(1<r.length)throw Error(u(93));r=r[0]}a=r}a==null&&(a=""),t=a}a=_t(t),e.defaultValue=a,r=e.textContent,r===a&&r!==""&&r!==null&&(e.value=r),bs(e)}function Ga(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var R1=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 yd(e,t,a){var r=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,a):typeof a!="number"||a===0||R1.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function xd(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var c in t)r=t[c],t.hasOwnProperty(c)&&a[c]!==r&&yd(e,c,r)}else for(var f in t)t.hasOwnProperty(f)&&yd(e,f,t[f])}function Cs(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 _1=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"]]),M1=/^[\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 br(e){return M1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function un(){}var Ns=null;function As(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fa=null,$a=null;function vd(e){var t=Ha(e);if(t&&(e=t.stateNode)){var a=e[ft]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ss(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Mt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var r=a[t];if(r!==e&&r.form===e.form){var c=r[ft]||null;if(!c)throw Error(u(90));Ss(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)r=a[t],r.form===e.form&&hd(r)}break e;case"textarea":md(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Va(e,!!a.multiple,t,!1)}}}var js=!1;function bd(e,t,a){if(js)return e(t,a);js=!0;try{var r=e(t);return r}finally{if(js=!1,(Fa!==null||$a!==null)&&(uu(),Fa&&(t=Fa,e=$a,$a=Fa=null,vd(t),e)))for(t=0;t<e.length;t++)vd(e[t])}}function $l(e,t){var a=e.stateNode;if(a===null)return null;var r=a[ft]||null;if(r===null)return null;a=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ws=!1;if(sn)try{var Kl={};Object.defineProperty(Kl,"passive",{get:function(){ws=!0}}),window.addEventListener("test",Kl,Kl),window.removeEventListener("test",Kl,Kl)}catch{ws=!1}var Dn=null,Ts=null,Sr=null;function Sd(){if(Sr)return Sr;var e,t=Ts,a=t.length,r,c="value"in Dn?Dn.value:Dn.textContent,f=c.length;for(e=0;e<a&&t[e]===c[e];e++);var g=a-e;for(r=1;r<=g&&t[a-r]===c[f-r];r++);return Sr=c.slice(e,1<r?1-r:void 0)}function Er(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Cr(){return!0}function Ed(){return!1}function dt(e){function t(a,r,c,f,g){this._reactName=a,this._targetInst=c,this.type=r,this.nativeEvent=f,this.target=g,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Cr:Ed,this.isPropagationStopped=Ed,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Cr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Cr)},persist:function(){},isPersistent:Cr}),t}var ha={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nr=dt(ha),Xl=x({},ha,{view:0,detail:0}),z1=dt(Xl),Os,Rs,Ql,Ar=x({},Xl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ms,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!==Ql&&(Ql&&e.type==="mousemove"?(Os=e.screenX-Ql.screenX,Rs=e.screenY-Ql.screenY):Rs=Os=0,Ql=e),Os)},movementY:function(e){return"movementY"in e?e.movementY:Rs}}),Cd=dt(Ar),L1=x({},Ar,{dataTransfer:0}),D1=dt(L1),k1=x({},Xl,{relatedTarget:0}),_s=dt(k1),U1=x({},ha,{animationName:0,elapsedTime:0,pseudoElement:0}),B1=dt(U1),H1=x({},ha,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),q1=dt(H1),Y1=x({},ha,{data:0}),Nd=dt(Y1),V1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},G1={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"},F1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=F1[e])?!!t[e]:!1}function Ms(){return $1}var K1=x({},Xl,{key:function(e){if(e.key){var t=V1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Er(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?G1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ms,charCode:function(e){return e.type==="keypress"?Er(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Er(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),X1=dt(K1),Q1=x({},Ar,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ad=dt(Q1),Z1=x({},Xl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ms}),J1=dt(Z1),I1=x({},ha,{propertyName:0,elapsedTime:0,pseudoElement:0}),W1=dt(I1),P1=x({},Ar,{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}),ex=dt(P1),tx=x({},ha,{newState:0,oldState:0}),nx=dt(tx),ax=[9,13,27,32],zs=sn&&"CompositionEvent"in window,Zl=null;sn&&"documentMode"in document&&(Zl=document.documentMode);var lx=sn&&"TextEvent"in window&&!Zl,jd=sn&&(!zs||Zl&&8<Zl&&11>=Zl),wd=" ",Td=!1;function Od(e,t){switch(e){case"keyup":return ax.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ka=!1;function ix(e,t){switch(e){case"compositionend":return Rd(t);case"keypress":return t.which!==32?null:(Td=!0,wd);case"textInput":return e=t.data,e===wd&&Td?null:e;default:return null}}function rx(e,t){if(Ka)return e==="compositionend"||!zs&&Od(e,t)?(e=Sd(),Sr=Ts=Dn=null,Ka=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return jd&&t.locale!=="ko"?null:t.data;default:return null}}var ux={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 _d(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ux[e.type]:t==="textarea"}function Md(e,t,a,r){Fa?$a?$a.push(r):$a=[r]:Fa=r,t=pu(t,"onChange"),0<t.length&&(a=new Nr("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var Jl=null,Il=null;function sx(e){pm(e,0)}function jr(e){var t=Fl(e);if(hd(t))return e}function zd(e,t){if(e==="change")return t}var Ld=!1;if(sn){var Ls;if(sn){var Ds="oninput"in document;if(!Ds){var Dd=document.createElement("div");Dd.setAttribute("oninput","return;"),Ds=typeof Dd.oninput=="function"}Ls=Ds}else Ls=!1;Ld=Ls&&(!document.documentMode||9<document.documentMode)}function kd(){Jl&&(Jl.detachEvent("onpropertychange",Ud),Il=Jl=null)}function Ud(e){if(e.propertyName==="value"&&jr(Il)){var t=[];Md(t,Il,e,As(e)),bd(sx,t)}}function ox(e,t,a){e==="focusin"?(kd(),Jl=t,Il=a,Jl.attachEvent("onpropertychange",Ud)):e==="focusout"&&kd()}function cx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return jr(Il)}function fx(e,t){if(e==="click")return jr(t)}function dx(e,t){if(e==="input"||e==="change")return jr(t)}function hx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ct=typeof Object.is=="function"?Object.is:hx;function Wl(e,t){if(Ct(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var c=a[r];if(!kl.call(t,c)||!Ct(e[c],t[c]))return!1}return!0}function Bd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hd(e,t){var a=Bd(e);e=0;for(var r;a;){if(a.nodeType===3){if(r=e+a.textContent.length,e<=t&&r>=t)return{node:a,offset:t-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Bd(a)}}function qd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=vr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=vr(e.document)}return t}function ks(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var px=sn&&"documentMode"in document&&11>=document.documentMode,Xa=null,Us=null,Pl=null,Bs=!1;function Vd(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Bs||Xa==null||Xa!==vr(r)||(r=Xa,"selectionStart"in r&&ks(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pl&&Wl(Pl,r)||(Pl=r,r=pu(Us,"onSelect"),0<r.length&&(t=new Nr("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=Xa)))}function pa(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Qa={animationend:pa("Animation","AnimationEnd"),animationiteration:pa("Animation","AnimationIteration"),animationstart:pa("Animation","AnimationStart"),transitionrun:pa("Transition","TransitionRun"),transitionstart:pa("Transition","TransitionStart"),transitioncancel:pa("Transition","TransitionCancel"),transitionend:pa("Transition","TransitionEnd")},Hs={},Gd={};sn&&(Gd=document.createElement("div").style,"AnimationEvent"in window||(delete Qa.animationend.animation,delete Qa.animationiteration.animation,delete Qa.animationstart.animation),"TransitionEvent"in window||delete Qa.transitionend.transition);function ma(e){if(Hs[e])return Hs[e];if(!Qa[e])return e;var t=Qa[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Gd)return Hs[e]=t[a];return e}var Fd=ma("animationend"),$d=ma("animationiteration"),Kd=ma("animationstart"),mx=ma("transitionrun"),gx=ma("transitionstart"),yx=ma("transitioncancel"),Xd=ma("transitionend"),Qd=new Map,qs="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 toggle touchMove waiting wheel".split(" ");qs.push("scrollEnd");function Ft(e,t){Qd.set(e,t),da(t,[e])}var wr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=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(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},zt=[],Za=0,Ys=0;function Tr(){for(var e=Za,t=Ys=Za=0;t<e;){var a=zt[t];zt[t++]=null;var r=zt[t];zt[t++]=null;var c=zt[t];zt[t++]=null;var f=zt[t];if(zt[t++]=null,r!==null&&c!==null){var g=r.pending;g===null?c.next=c:(c.next=g.next,g.next=c),r.pending=c}f!==0&&Zd(a,c,f)}}function Or(e,t,a,r){zt[Za++]=e,zt[Za++]=t,zt[Za++]=a,zt[Za++]=r,Ys|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Vs(e,t,a,r){return Or(e,t,a,r),Rr(e)}function ga(e,t){return Or(e,null,null,t),Rr(e)}function Zd(e,t,a){e.lanes|=a;var r=e.alternate;r!==null&&(r.lanes|=a);for(var c=!1,f=e.return;f!==null;)f.childLanes|=a,r=f.alternate,r!==null&&(r.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-Et(a),e=f.hiddenUpdates,r=e[c],r===null?e[c]=[t]:r.push(t),t.lane=a|536870912),f):null}function Rr(e){if(50<Si)throw Si=0,Wo=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ja={};function xx(e,t,a,r){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nt(e,t,a,r){return new xx(e,t,a,r)}function Gs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function on(e,t){var a=e.alternate;return a===null?(a=Nt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Jd(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function _r(e,t,a,r,c,f){var g=0;if(r=e,typeof e=="function")Gs(e)&&(g=1);else if(typeof e=="string")g=Cv(e,a,de.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case q:return e=Nt(31,a,t,c),e.elementType=q,e.lanes=f,e;case w:return ya(a.children,c,f,t);case j:g=8,c|=24;break;case R:return e=Nt(12,a,t,c|2),e.elementType=R,e.lanes=f,e;case X:return e=Nt(13,a,t,c),e.elementType=X,e.lanes=f,e;case J:return e=Nt(19,a,t,c),e.elementType=J,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:g=10;break e;case T:g=9;break e;case U:g=11;break e;case G:g=14;break e;case K:g=16,r=null;break e}g=29,a=Error(u(130,e===null?"null":typeof e,"")),r=null}return t=Nt(g,a,t,c),t.elementType=e,t.type=r,t.lanes=f,t}function ya(e,t,a,r){return e=Nt(7,e,r,t),e.lanes=a,e}function Fs(e,t,a){return e=Nt(6,e,null,t),e.lanes=a,e}function Id(e){var t=Nt(18,null,null,0);return t.stateNode=e,t}function $s(e,t,a){return t=Nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wd=new WeakMap;function Lt(e,t){if(typeof e=="object"&&e!==null){var a=Wd.get(e);return a!==void 0?a:(t={value:e,source:t,stack:cr(t)},Wd.set(e,t),t)}return{value:e,source:t,stack:cr(t)}}var Ia=[],Wa=0,Mr=null,ei=0,Dt=[],kt=0,kn=null,Zt=1,Jt="";function cn(e,t){Ia[Wa++]=ei,Ia[Wa++]=Mr,Mr=e,ei=t}function Pd(e,t,a){Dt[kt++]=Zt,Dt[kt++]=Jt,Dt[kt++]=kn,kn=e;var r=Zt;e=Jt;var c=32-Et(r)-1;r&=~(1<<c),a+=1;var f=32-Et(t)+c;if(30<f){var g=c-c%5;f=(r&(1<<g)-1).toString(32),r>>=g,c-=g,Zt=1<<32-Et(t)+c|a<<c|r,Jt=f+e}else Zt=1<<f|a<<c|r,Jt=e}function Ks(e){e.return!==null&&(cn(e,1),Pd(e,1,0))}function Xs(e){for(;e===Mr;)Mr=Ia[--Wa],Ia[Wa]=null,ei=Ia[--Wa],Ia[Wa]=null;for(;e===kn;)kn=Dt[--kt],Dt[kt]=null,Jt=Dt[--kt],Dt[kt]=null,Zt=Dt[--kt],Dt[kt]=null}function eh(e,t){Dt[kt++]=Zt,Dt[kt++]=Jt,Dt[kt++]=kn,Zt=t.id,Jt=t.overflow,kn=e}var We=null,ze=null,Se=!1,Un=null,Ut=!1,Qs=Error(u(519));function Bn(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ti(Lt(t,e)),Qs}function th(e){var t=e.stateNode,a=e.type,r=e.memoizedProps;switch(t[Ie]=e,t[ft]=r,a){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(a=0;a<Ci.length;a++)xe(Ci[a],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),pd(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),gd(t,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||r.suppressHydrationWarning===!0||xm(t.textContent,a)?(r.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),r.onScroll!=null&&xe("scroll",t),r.onScrollEnd!=null&&xe("scrollend",t),r.onClick!=null&&(t.onclick=un),t=!0):t=!1,t||Bn(e,!0)}function nh(e){for(We=e.return;We;)switch(We.tag){case 5:case 31:case 13:Ut=!1;return;case 27:case 3:Ut=!0;return;default:We=We.return}}function Pa(e){if(e!==We)return!1;if(!Se)return nh(e),Se=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||hc(e.type,e.memoizedProps)),a=!a),a&&ze&&Bn(e),nh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));ze=wm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));ze=wm(e)}else t===27?(t=ze,Wn(e.type)?(e=xc,xc=null,ze=e):ze=t):ze=We?Ht(e.stateNode.nextSibling):null;return!0}function xa(){ze=We=null,Se=!1}function Zs(){var e=Un;return e!==null&&(gt===null?gt=e:gt.push.apply(gt,e),Un=null),e}function ti(e){Un===null?Un=[e]:Un.push(e)}var Js=H(null),va=null,fn=null;function Hn(e,t,a){ne(Js,t._currentValue),t._currentValue=a}function dn(e){e._currentValue=Js.current,P(Js)}function Is(e,t,a){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===a)break;e=e.return}}function Ws(e,t,a,r){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var g=c.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=c;for(var A=0;A<t.length;A++)if(S.context===t[A]){f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),Is(f.return,a,e),r||(g=null);break e}f=S.next}}else if(c.tag===18){if(g=c.return,g===null)throw Error(u(341));g.lanes|=a,f=g.alternate,f!==null&&(f.lanes|=a),Is(g,a,e),g=null}else g=c.child;if(g!==null)g.return=c;else for(g=c;g!==null;){if(g===e){g=null;break}if(c=g.sibling,c!==null){c.return=g.return,g=c;break}g=g.return}c=g}}function el(e,t,a,r){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var g=c.alternate;if(g===null)throw Error(u(387));if(g=g.memoizedProps,g!==null){var S=c.type;Ct(c.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(c===ot.current){if(g=c.alternate,g===null)throw Error(u(387));g.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Ti):e=[Ti])}c=c.return}e!==null&&Ws(t,e,a,r),t.flags|=262144}function zr(e){for(e=e.firstContext;e!==null;){if(!Ct(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ba(e){va=e,fn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pe(e){return ah(va,e)}function Lr(e,t){return va===null&&ba(e),ah(e,t)}function ah(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},fn===null){if(e===null)throw Error(u(308));fn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else fn=fn.next=t;return a}var vx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},bx=n.unstable_scheduleCallback,Sx=n.unstable_NormalPriority,Ve={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ps(){return{controller:new vx,data:new Map,refCount:0}}function ni(e){e.refCount--,e.refCount===0&&bx(Sx,function(){e.controller.abort()})}var ai=null,eo=0,tl=0,nl=null;function Ex(e,t){if(ai===null){var a=ai=[];eo=0,tl=lc(),nl={status:"pending",value:void 0,then:function(r){a.push(r)}}}return eo++,t.then(lh,lh),t}function lh(){if(--eo===0&&ai!==null){nl!==null&&(nl.status="fulfilled");var e=ai;ai=null,tl=0,nl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Cx(e,t){var a=[],r={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(r.status="rejected",r.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),r}var ih=M.S;M.S=function(e,t){Vp=pe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ex(e,t),ih!==null&&ih(e,t)};var Sa=H(null);function to(){var e=Sa.current;return e!==null?e:Me.pooledCache}function Dr(e,t){t===null?ne(Sa,Sa.current):ne(Sa,t.pool)}function rh(){var e=to();return e===null?null:{parent:Ve._currentValue,pool:e}}var al=Error(u(460)),no=Error(u(474)),kr=Error(u(542)),Ur={then:function(){}};function uh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function sh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(un,un),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ch(e),e;default:if(typeof t.status=="string")t.then(un,un);else{if(e=Me,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=r}},function(r){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ch(e),e}throw Ca=t,al}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ca=a,al):a}}var Ca=null;function oh(){if(Ca===null)throw Error(u(459));var e=Ca;return Ca=null,e}function ch(e){if(e===al||e===kr)throw Error(u(483))}var ll=null,li=0;function Br(e){var t=li;return li+=1,ll===null&&(ll=[]),sh(ll,e,t)}function ii(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Hr(e,t){throw t.$$typeof===E?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function fh(e){function t(_,O){if(e){var L=_.deletions;L===null?(_.deletions=[O],_.flags|=16):L.push(O)}}function a(_,O){if(!e)return null;for(;O!==null;)t(_,O),O=O.sibling;return null}function r(_){for(var O=new Map;_!==null;)_.key!==null?O.set(_.key,_):O.set(_.index,_),_=_.sibling;return O}function c(_,O){return _=on(_,O),_.index=0,_.sibling=null,_}function f(_,O,L){return _.index=L,e?(L=_.alternate,L!==null?(L=L.index,L<O?(_.flags|=67108866,O):L):(_.flags|=67108866,O)):(_.flags|=1048576,O)}function g(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function S(_,O,L,V){return O===null||O.tag!==6?(O=Fs(L,_.mode,V),O.return=_,O):(O=c(O,L),O.return=_,O)}function A(_,O,L,V){var se=L.type;return se===w?Y(_,O,L.props.children,V,L.key):O!==null&&(O.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===K&&Ea(se)===O.type)?(O=c(O,L.props),ii(O,L),O.return=_,O):(O=_r(L.type,L.key,L.props,null,_.mode,V),ii(O,L),O.return=_,O)}function D(_,O,L,V){return O===null||O.tag!==4||O.stateNode.containerInfo!==L.containerInfo||O.stateNode.implementation!==L.implementation?(O=$s(L,_.mode,V),O.return=_,O):(O=c(O,L.children||[]),O.return=_,O)}function Y(_,O,L,V,se){return O===null||O.tag!==7?(O=ya(L,_.mode,V,se),O.return=_,O):(O=c(O,L),O.return=_,O)}function F(_,O,L){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Fs(""+O,_.mode,L),O.return=_,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case C:return L=_r(O.type,O.key,O.props,null,_.mode,L),ii(L,O),L.return=_,L;case N:return O=$s(O,_.mode,L),O.return=_,O;case K:return O=Ea(O),F(_,O,L)}if(re(O)||ee(O))return O=ya(O,_.mode,L,null),O.return=_,O;if(typeof O.then=="function")return F(_,Br(O),L);if(O.$$typeof===z)return F(_,Lr(_,O),L);Hr(_,O)}return null}function k(_,O,L,V){var se=O!==null?O.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return se!==null?null:S(_,O,""+L,V);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case C:return L.key===se?A(_,O,L,V):null;case N:return L.key===se?D(_,O,L,V):null;case K:return L=Ea(L),k(_,O,L,V)}if(re(L)||ee(L))return se!==null?null:Y(_,O,L,V,null);if(typeof L.then=="function")return k(_,O,Br(L),V);if(L.$$typeof===z)return k(_,O,Lr(_,L),V);Hr(_,L)}return null}function B(_,O,L,V,se){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return _=_.get(L)||null,S(O,_,""+V,se);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case C:return _=_.get(V.key===null?L:V.key)||null,A(O,_,V,se);case N:return _=_.get(V.key===null?L:V.key)||null,D(O,_,V,se);case K:return V=Ea(V),B(_,O,L,V,se)}if(re(V)||ee(V))return _=_.get(L)||null,Y(O,_,V,se,null);if(typeof V.then=="function")return B(_,O,L,Br(V),se);if(V.$$typeof===z)return B(_,O,L,Lr(O,V),se);Hr(O,V)}return null}function le(_,O,L,V){for(var se=null,Ee=null,ie=O,ge=O=0,be=null;ie!==null&&ge<L.length;ge++){ie.index>ge?(be=ie,ie=null):be=ie.sibling;var Ce=k(_,ie,L[ge],V);if(Ce===null){ie===null&&(ie=be);break}e&&ie&&Ce.alternate===null&&t(_,ie),O=f(Ce,O,ge),Ee===null?se=Ce:Ee.sibling=Ce,Ee=Ce,ie=be}if(ge===L.length)return a(_,ie),Se&&cn(_,ge),se;if(ie===null){for(;ge<L.length;ge++)ie=F(_,L[ge],V),ie!==null&&(O=f(ie,O,ge),Ee===null?se=ie:Ee.sibling=ie,Ee=ie);return Se&&cn(_,ge),se}for(ie=r(ie);ge<L.length;ge++)be=B(ie,_,ge,L[ge],V),be!==null&&(e&&be.alternate!==null&&ie.delete(be.key===null?ge:be.key),O=f(be,O,ge),Ee===null?se=be:Ee.sibling=be,Ee=be);return e&&ie.forEach(function(aa){return t(_,aa)}),Se&&cn(_,ge),se}function ce(_,O,L,V){if(L==null)throw Error(u(151));for(var se=null,Ee=null,ie=O,ge=O=0,be=null,Ce=L.next();ie!==null&&!Ce.done;ge++,Ce=L.next()){ie.index>ge?(be=ie,ie=null):be=ie.sibling;var aa=k(_,ie,Ce.value,V);if(aa===null){ie===null&&(ie=be);break}e&&ie&&aa.alternate===null&&t(_,ie),O=f(aa,O,ge),Ee===null?se=aa:Ee.sibling=aa,Ee=aa,ie=be}if(Ce.done)return a(_,ie),Se&&cn(_,ge),se;if(ie===null){for(;!Ce.done;ge++,Ce=L.next())Ce=F(_,Ce.value,V),Ce!==null&&(O=f(Ce,O,ge),Ee===null?se=Ce:Ee.sibling=Ce,Ee=Ce);return Se&&cn(_,ge),se}for(ie=r(ie);!Ce.done;ge++,Ce=L.next())Ce=B(ie,_,ge,Ce.value,V),Ce!==null&&(e&&Ce.alternate!==null&&ie.delete(Ce.key===null?ge:Ce.key),O=f(Ce,O,ge),Ee===null?se=Ce:Ee.sibling=Ce,Ee=Ce);return e&&ie.forEach(function(Lv){return t(_,Lv)}),Se&&cn(_,ge),se}function _e(_,O,L,V){if(typeof L=="object"&&L!==null&&L.type===w&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case C:e:{for(var se=L.key;O!==null;){if(O.key===se){if(se=L.type,se===w){if(O.tag===7){a(_,O.sibling),V=c(O,L.props.children),V.return=_,_=V;break e}}else if(O.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===K&&Ea(se)===O.type){a(_,O.sibling),V=c(O,L.props),ii(V,L),V.return=_,_=V;break e}a(_,O);break}else t(_,O);O=O.sibling}L.type===w?(V=ya(L.props.children,_.mode,V,L.key),V.return=_,_=V):(V=_r(L.type,L.key,L.props,null,_.mode,V),ii(V,L),V.return=_,_=V)}return g(_);case N:e:{for(se=L.key;O!==null;){if(O.key===se)if(O.tag===4&&O.stateNode.containerInfo===L.containerInfo&&O.stateNode.implementation===L.implementation){a(_,O.sibling),V=c(O,L.children||[]),V.return=_,_=V;break e}else{a(_,O);break}else t(_,O);O=O.sibling}V=$s(L,_.mode,V),V.return=_,_=V}return g(_);case K:return L=Ea(L),_e(_,O,L,V)}if(re(L))return le(_,O,L,V);if(ee(L)){if(se=ee(L),typeof se!="function")throw Error(u(150));return L=se.call(L),ce(_,O,L,V)}if(typeof L.then=="function")return _e(_,O,Br(L),V);if(L.$$typeof===z)return _e(_,O,Lr(_,L),V);Hr(_,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,O!==null&&O.tag===6?(a(_,O.sibling),V=c(O,L),V.return=_,_=V):(a(_,O),V=Fs(L,_.mode,V),V.return=_,_=V),g(_)):a(_,O)}return function(_,O,L,V){try{li=0;var se=_e(_,O,L,V);return ll=null,se}catch(ie){if(ie===al||ie===kr)throw ie;var Ee=Nt(29,ie,null,_.mode);return Ee.lanes=V,Ee.return=_,Ee}finally{}}}var Na=fh(!0),dh=fh(!1),qn=!1;function ao(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Yn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Vn(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ne&2)!==0){var c=r.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),r.pending=t,t=Rr(e),Zd(e,null,a),t}return Or(e,r,t,a),Rr(e)}function ri(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,ad(e,a)}}function io(e,t){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var c=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?c=f=g:f=f.next=g,a=a.next}while(a!==null);f===null?c=f=t:f=f.next=t}else c=f=t;a={baseState:r.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:r.shared,callbacks:r.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var ro=!1;function ui(){if(ro){var e=nl;if(e!==null)throw e}}function si(e,t,a,r){ro=!1;var c=e.updateQueue;qn=!1;var f=c.firstBaseUpdate,g=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var A=S,D=A.next;A.next=null,g===null?f=D:g.next=D,g=A;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==g&&(S===null?Y.firstBaseUpdate=D:S.next=D,Y.lastBaseUpdate=A))}if(f!==null){var F=c.baseState;g=0,Y=D=A=null,S=f;do{var k=S.lane&-536870913,B=k!==S.lane;if(B?(ve&k)===k:(r&k)===k){k!==0&&k===tl&&(ro=!0),Y!==null&&(Y=Y.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var le=e,ce=S;k=t;var _e=a;switch(ce.tag){case 1:if(le=ce.payload,typeof le=="function"){F=le.call(_e,F,k);break e}F=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=ce.payload,k=typeof le=="function"?le.call(_e,F,k):le,k==null)break e;F=x({},F,k);break e;case 2:qn=!0}}k=S.callback,k!==null&&(e.flags|=64,B&&(e.flags|=8192),B=c.callbacks,B===null?c.callbacks=[k]:B.push(k))}else B={lane:k,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Y===null?(D=Y=B,A=F):Y=Y.next=B,g|=k;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;B=S,S=B.next,B.next=null,c.lastBaseUpdate=B,c.shared.pending=null}}while(!0);Y===null&&(A=F),c.baseState=A,c.firstBaseUpdate=D,c.lastBaseUpdate=Y,f===null&&(c.shared.lanes=0),Xn|=g,e.lanes=g,e.memoizedState=F}}function hh(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function ph(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)hh(a[e],t)}var il=H(null),qr=H(0);function mh(e,t){e=Sn,ne(qr,e),ne(il,t),Sn=e|t.baseLanes}function uo(){ne(qr,Sn),ne(il,il.current)}function so(){Sn=qr.current,P(il),P(qr)}var At=H(null),Bt=null;function Gn(e){var t=e.alternate;ne(qe,qe.current&1),ne(At,e),Bt===null&&(t===null||il.current!==null||t.memoizedState!==null)&&(Bt=e)}function oo(e){ne(qe,qe.current),ne(At,e),Bt===null&&(Bt=e)}function gh(e){e.tag===22?(ne(qe,qe.current),ne(At,e),Bt===null&&(Bt=e)):Fn()}function Fn(){ne(qe,qe.current),ne(At,At.current)}function jt(e){P(At),Bt===e&&(Bt=null),P(qe)}var qe=H(0);function Yr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||gc(a)||yc(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var hn=0,me=null,Oe=null,Ge=null,Vr=!1,rl=!1,Aa=!1,Gr=0,oi=0,ul=null,Nx=0;function Be(){throw Error(u(321))}function co(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Ct(e[a],t[a]))return!1;return!0}function fo(e,t,a,r,c,f){return hn=f,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Ph:wo,Aa=!1,f=a(r,c),Aa=!1,rl&&(f=xh(t,a,r,c)),yh(e),f}function yh(e){M.H=di;var t=Oe!==null&&Oe.next!==null;if(hn=0,Ge=Oe=me=null,Vr=!1,oi=0,ul=null,t)throw Error(u(300));e===null||Fe||(e=e.dependencies,e!==null&&zr(e)&&(Fe=!0))}function xh(e,t,a,r){me=e;var c=0;do{if(rl&&(ul=null),oi=0,rl=!1,25<=c)throw Error(u(301));if(c+=1,Ge=Oe=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}M.H=ep,f=t(a,r)}while(rl);return f}function Ax(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?ci(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(me.flags|=1024),t}function ho(){var e=Gr!==0;return Gr=0,e}function po(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function mo(e){if(Vr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Vr=!1}hn=0,Ge=Oe=me=null,rl=!1,oi=Gr=0,ul=null}function rt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?me.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function Ye(){if(Oe===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Ge===null?me.memoizedState:Ge.next;if(t!==null)Ge=t,Oe=e;else{if(e===null)throw me.alternate===null?Error(u(467)):Error(u(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Ge===null?me.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function Fr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ci(e){var t=oi;return oi+=1,ul===null&&(ul=[]),e=sh(ul,e,t),t=me,(Ge===null?t.memoizedState:Ge.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Ph:wo),e}function $r(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ci(e);if(e.$$typeof===z)return Pe(e)}throw Error(u(438,String(e)))}function go(e){var t=null,a=me.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var r=me.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Fr(),me.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),r=0;r<e;r++)a[r]=I;return t.index++,a}function pn(e,t){return typeof t=="function"?t(e):t}function Kr(e){var t=Ye();return yo(t,Oe,e)}function yo(e,t,a){var r=e.queue;if(r===null)throw Error(u(311));r.lastRenderedReducer=a;var c=e.baseQueue,f=r.pending;if(f!==null){if(c!==null){var g=c.next;c.next=f.next,f.next=g}t.baseQueue=c=f,r.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var S=g=null,A=null,D=t,Y=!1;do{var F=D.lane&-536870913;if(F!==D.lane?(ve&F)===F:(hn&F)===F){var k=D.revertLane;if(k===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),F===tl&&(Y=!0);else if((hn&k)===k){D=D.next,k===tl&&(Y=!0);continue}else F={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(S=A=F,g=f):A=A.next=F,me.lanes|=k,Xn|=k;F=D.action,Aa&&a(f,F),f=D.hasEagerState?D.eagerState:a(f,F)}else k={lane:F,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(S=A=k,g=f):A=A.next=k,me.lanes|=F,Xn|=F;D=D.next}while(D!==null&&D!==t);if(A===null?g=f:A.next=S,!Ct(f,e.memoizedState)&&(Fe=!0,Y&&(a=nl,a!==null)))throw a;e.memoizedState=f,e.baseState=g,e.baseQueue=A,r.lastRenderedState=f}return c===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function xo(e){var t=Ye(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var r=a.dispatch,c=a.pending,f=t.memoizedState;if(c!==null){a.pending=null;var g=c=c.next;do f=e(f,g.action),g=g.next;while(g!==c);Ct(f,t.memoizedState)||(Fe=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,r]}function vh(e,t,a){var r=me,c=Ye(),f=Se;if(f){if(a===void 0)throw Error(u(407));a=a()}else a=t();var g=!Ct((Oe||c).memoizedState,a);if(g&&(c.memoizedState=a,Fe=!0),c=c.queue,So(Eh.bind(null,r,c,e),[e]),c.getSnapshot!==t||g||Ge!==null&&Ge.memoizedState.tag&1){if(r.flags|=2048,sl(9,{destroy:void 0},Sh.bind(null,r,c,a,t),null),Me===null)throw Error(u(349));f||(hn&127)!==0||bh(r,t,a)}return a}function bh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=me.updateQueue,t===null?(t=Fr(),me.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Sh(e,t,a,r){t.value=a,t.getSnapshot=r,Ch(t)&&Nh(e)}function Eh(e,t,a){return a(function(){Ch(t)&&Nh(e)})}function Ch(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Ct(e,a)}catch{return!0}}function Nh(e){var t=ga(e,2);t!==null&&yt(t,e,2)}function vo(e){var t=rt();if(typeof e=="function"){var a=e;if(e=a(),Aa){zn(!0);try{a()}finally{zn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pn,lastRenderedState:e},t}function Ah(e,t,a,r){return e.baseState=a,yo(e,Oe,typeof r=="function"?r:pn)}function jx(e,t,a,r,c){if(Zr(e))throw Error(u(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){f.listeners.push(g)}};M.T!==null?a(!0):f.isTransition=!1,r(f),a=t.pending,a===null?(f.next=t.pending=f,jh(t,f)):(f.next=a.next,t.pending=a.next=f)}}function jh(e,t){var a=t.action,r=t.payload,c=e.state;if(t.isTransition){var f=M.T,g={};M.T=g;try{var S=a(c,r),A=M.S;A!==null&&A(g,S),wh(e,t,S)}catch(D){bo(e,t,D)}finally{f!==null&&g.types!==null&&(f.types=g.types),M.T=f}}else try{f=a(c,r),wh(e,t,f)}catch(D){bo(e,t,D)}}function wh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){Th(e,t,r)},function(r){return bo(e,t,r)}):Th(e,t,a)}function Th(e,t,a){t.status="fulfilled",t.value=a,Oh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,jh(e,a)))}function bo(e,t,a){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=a,Oh(t),t=t.next;while(t!==r)}e.action=null}function Oh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Rh(e,t){return t}function _h(e,t){if(Se){var a=Me.formState;if(a!==null){e:{var r=me;if(Se){if(ze){t:{for(var c=ze,f=Ut;c.nodeType!==8;){if(!f){c=null;break t}if(c=Ht(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){ze=Ht(c.nextSibling),r=c.data==="F!";break e}}Bn(r)}r=!1}r&&(t=a[0])}}return a=rt(),a.memoizedState=a.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rh,lastRenderedState:t},a.queue=r,a=Jh.bind(null,me,r),r.dispatch=a,r=vo(!1),f=jo.bind(null,me,!1,r.queue),r=rt(),c={state:t,dispatch:null,action:e,pending:null},r.queue=c,a=jx.bind(null,me,c,f,a),c.dispatch=a,r.memoizedState=e,[t,a,!1]}function Mh(e){var t=Ye();return zh(t,Oe,e)}function zh(e,t,a){if(t=yo(e,t,Rh)[0],e=Kr(pn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ci(t)}catch(g){throw g===al?kr:g}else r=t;t=Ye();var c=t.queue,f=c.dispatch;return a!==t.memoizedState&&(me.flags|=2048,sl(9,{destroy:void 0},wx.bind(null,c,a),null)),[r,f,e]}function wx(e,t){e.action=t}function Lh(e){var t=Ye(),a=Oe;if(a!==null)return zh(t,a,e);Ye(),t=t.memoizedState,a=Ye();var r=a.queue.dispatch;return a.memoizedState=e,[t,r,!1]}function sl(e,t,a,r){return e={tag:e,create:a,deps:r,inst:t,next:null},t=me.updateQueue,t===null&&(t=Fr(),me.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(r=a.next,a.next=e,e.next=r,t.lastEffect=e),e}function Dh(){return Ye().memoizedState}function Xr(e,t,a,r){var c=rt();me.flags|=e,c.memoizedState=sl(1|t,{destroy:void 0},a,r===void 0?null:r)}function Qr(e,t,a,r){var c=Ye();r=r===void 0?null:r;var f=c.memoizedState.inst;Oe!==null&&r!==null&&co(r,Oe.memoizedState.deps)?c.memoizedState=sl(t,f,a,r):(me.flags|=e,c.memoizedState=sl(1|t,f,a,r))}function kh(e,t){Xr(8390656,8,e,t)}function So(e,t){Qr(2048,8,e,t)}function Tx(e){me.flags|=4;var t=me.updateQueue;if(t===null)t=Fr(),me.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Uh(e){var t=Ye().memoizedState;return Tx({ref:t,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Bh(e,t){return Qr(4,2,e,t)}function Hh(e,t){return Qr(4,4,e,t)}function qh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Yh(e,t,a){a=a!=null?a.concat([e]):null,Qr(4,4,qh.bind(null,t,e),a)}function Eo(){}function Vh(e,t){var a=Ye();t=t===void 0?null:t;var r=a.memoizedState;return t!==null&&co(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function Gh(e,t){var a=Ye();t=t===void 0?null:t;var r=a.memoizedState;if(t!==null&&co(t,r[1]))return r[0];if(r=e(),Aa){zn(!0);try{e()}finally{zn(!1)}}return a.memoizedState=[r,t],r}function Co(e,t,a){return a===void 0||(hn&1073741824)!==0&&(ve&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Fp(),me.lanes|=e,Xn|=e,a)}function Fh(e,t,a,r){return Ct(a,t)?a:il.current!==null?(e=Co(e,a,r),Ct(e,t)||(Fe=!0),e):(hn&42)===0||(hn&1073741824)!==0&&(ve&261930)===0?(Fe=!0,e.memoizedState=a):(e=Fp(),me.lanes|=e,Xn|=e,t)}function $h(e,t,a,r,c){var f=Q.p;Q.p=f!==0&&8>f?f:8;var g=M.T,S={};M.T=S,jo(e,!1,t,a);try{var A=c(),D=M.S;if(D!==null&&D(S,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var Y=Cx(A,r);fi(e,t,Y,Ot(e))}else fi(e,t,r,Ot(e))}catch(F){fi(e,t,{then:function(){},status:"rejected",reason:F},Ot())}finally{Q.p=f,g!==null&&S.types!==null&&(g.types=S.types),M.T=g}}function Ox(){}function No(e,t,a,r){if(e.tag!==5)throw Error(u(476));var c=Kh(e).queue;$h(e,c,t,$,a===null?Ox:function(){return Xh(e),a(r)})}function Kh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pn,lastRenderedState:$},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xh(e){var t=Kh(e);t.next===null&&(t=e.alternate.memoizedState),fi(e,t.next.queue,{},Ot())}function Ao(){return Pe(Ti)}function Qh(){return Ye().memoizedState}function Zh(){return Ye().memoizedState}function Rx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ot();e=Yn(a);var r=Vn(t,e,a);r!==null&&(yt(r,t,a),ri(r,t,a)),t={cache:Ps()},e.payload=t;return}t=t.return}}function _x(e,t,a){var r=Ot();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Zr(e)?Ih(t,a):(a=Vs(e,t,a,r),a!==null&&(yt(a,e,r),Wh(a,t,r)))}function Jh(e,t,a){var r=Ot();fi(e,t,a,r)}function fi(e,t,a,r){var c={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Zr(e))Ih(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var g=t.lastRenderedState,S=f(g,a);if(c.hasEagerState=!0,c.eagerState=S,Ct(S,g))return Or(e,t,c,0),Me===null&&Tr(),!1}catch{}finally{}if(a=Vs(e,t,c,r),a!==null)return yt(a,e,r),Wh(a,t,r),!0}return!1}function jo(e,t,a,r){if(r={lane:2,revertLane:lc(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Zr(e)){if(t)throw Error(u(479))}else t=Vs(e,a,r,2),t!==null&&yt(t,e,2)}function Zr(e){var t=e.alternate;return e===me||t!==null&&t===me}function Ih(e,t){rl=Vr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Wh(e,t,a){if((a&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,ad(e,a)}}var di={readContext:Pe,use:$r,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useLayoutEffect:Be,useInsertionEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useSyncExternalStore:Be,useId:Be,useHostTransitionStatus:Be,useFormState:Be,useActionState:Be,useOptimistic:Be,useMemoCache:Be,useCacheRefresh:Be};di.useEffectEvent=Be;var Ph={readContext:Pe,use:$r,useCallback:function(e,t){return rt().memoizedState=[e,t===void 0?null:t],e},useContext:Pe,useEffect:kh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Xr(4194308,4,qh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Xr(4194308,4,e,t)},useInsertionEffect:function(e,t){Xr(4,2,e,t)},useMemo:function(e,t){var a=rt();t=t===void 0?null:t;var r=e();if(Aa){zn(!0);try{e()}finally{zn(!1)}}return a.memoizedState=[r,t],r},useReducer:function(e,t,a){var r=rt();if(a!==void 0){var c=a(t);if(Aa){zn(!0);try{a(t)}finally{zn(!1)}}}else c=t;return r.memoizedState=r.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},r.queue=e,e=e.dispatch=_x.bind(null,me,e),[r.memoizedState,e]},useRef:function(e){var t=rt();return e={current:e},t.memoizedState=e},useState:function(e){e=vo(e);var t=e.queue,a=Jh.bind(null,me,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Eo,useDeferredValue:function(e,t){var a=rt();return Co(a,e,t)},useTransition:function(){var e=vo(!1);return e=$h.bind(null,me,e.queue,!0,!1),rt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var r=me,c=rt();if(Se){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Me===null)throw Error(u(349));(ve&127)!==0||bh(r,t,a)}c.memoizedState=a;var f={value:a,getSnapshot:t};return c.queue=f,kh(Eh.bind(null,r,f,e),[e]),r.flags|=2048,sl(9,{destroy:void 0},Sh.bind(null,r,f,a,t),null),a},useId:function(){var e=rt(),t=Me.identifierPrefix;if(Se){var a=Jt,r=Zt;a=(r&~(1<<32-Et(r)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Gr++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Nx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ao,useFormState:_h,useActionState:_h,useOptimistic:function(e){var t=rt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=jo.bind(null,me,!0,a),a.dispatch=t,[e,t]},useMemoCache:go,useCacheRefresh:function(){return rt().memoizedState=Rx.bind(null,me)},useEffectEvent:function(e){var t=rt(),a={impl:e};return t.memoizedState=a,function(){if((Ne&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},wo={readContext:Pe,use:$r,useCallback:Vh,useContext:Pe,useEffect:So,useImperativeHandle:Yh,useInsertionEffect:Bh,useLayoutEffect:Hh,useMemo:Gh,useReducer:Kr,useRef:Dh,useState:function(){return Kr(pn)},useDebugValue:Eo,useDeferredValue:function(e,t){var a=Ye();return Fh(a,Oe.memoizedState,e,t)},useTransition:function(){var e=Kr(pn)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:ci(e),t]},useSyncExternalStore:vh,useId:Qh,useHostTransitionStatus:Ao,useFormState:Mh,useActionState:Mh,useOptimistic:function(e,t){var a=Ye();return Ah(a,Oe,e,t)},useMemoCache:go,useCacheRefresh:Zh};wo.useEffectEvent=Uh;var ep={readContext:Pe,use:$r,useCallback:Vh,useContext:Pe,useEffect:So,useImperativeHandle:Yh,useInsertionEffect:Bh,useLayoutEffect:Hh,useMemo:Gh,useReducer:xo,useRef:Dh,useState:function(){return xo(pn)},useDebugValue:Eo,useDeferredValue:function(e,t){var a=Ye();return Oe===null?Co(a,e,t):Fh(a,Oe.memoizedState,e,t)},useTransition:function(){var e=xo(pn)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:ci(e),t]},useSyncExternalStore:vh,useId:Qh,useHostTransitionStatus:Ao,useFormState:Lh,useActionState:Lh,useOptimistic:function(e,t){var a=Ye();return Oe!==null?Ah(a,Oe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:go,useCacheRefresh:Zh};ep.useEffectEvent=Uh;function To(e,t,a,r){t=e.memoizedState,a=a(r,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Oo={enqueueSetState:function(e,t,a){e=e._reactInternals;var r=Ot(),c=Yn(r);c.payload=t,a!=null&&(c.callback=a),t=Vn(e,c,r),t!==null&&(yt(t,e,r),ri(t,e,r))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=Ot(),c=Yn(r);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Vn(e,c,r),t!==null&&(yt(t,e,r),ri(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ot(),r=Yn(a);r.tag=2,t!=null&&(r.callback=t),t=Vn(e,r,a),t!==null&&(yt(t,e,a),ri(t,e,a))}};function tp(e,t,a,r,c,f,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,f,g):t.prototype&&t.prototype.isPureReactComponent?!Wl(a,r)||!Wl(c,f):!0}function np(e,t,a,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,r),t.state!==e&&Oo.enqueueReplaceState(t,t.state,null)}function ja(e,t){var a=t;if("ref"in t){a={};for(var r in t)r!=="ref"&&(a[r]=t[r])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function ap(e){wr(e)}function lp(e){console.error(e)}function ip(e){wr(e)}function Jr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function rp(e,t,a){try{var r=e.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Ro(e,t,a){return a=Yn(a),a.tag=3,a.payload={element:null},a.callback=function(){Jr(e,t)},a}function up(e){return e=Yn(e),e.tag=3,e}function sp(e,t,a,r){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=r.value;e.payload=function(){return c(f)},e.callback=function(){rp(t,a,r)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){rp(t,a,r),typeof c!="function"&&(Qn===null?Qn=new Set([this]):Qn.add(this));var S=r.stack;this.componentDidCatch(r.value,{componentStack:S!==null?S:""})})}function Mx(e,t,a,r,c){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=a.alternate,t!==null&&el(t,a,c,!0),a=At.current,a!==null){switch(a.tag){case 31:case 13:return Bt===null?su():a.alternate===null&&He===0&&(He=3),a.flags&=-257,a.flags|=65536,a.lanes=c,r===Ur?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([r]):t.add(r),tc(e,r,c)),!1;case 22:return a.flags|=65536,r===Ur?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([r]):a.add(r)),tc(e,r,c)),!1}throw Error(u(435,a.tag))}return tc(e,r,c),su(),!1}if(Se)return t=At.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,r!==Qs&&(e=Error(u(422),{cause:r}),ti(Lt(e,a)))):(r!==Qs&&(t=Error(u(423),{cause:r}),ti(Lt(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,r=Lt(r,a),c=Ro(e.stateNode,r,c),io(e,c),He!==4&&(He=2)),!1;var f=Error(u(520),{cause:r});if(f=Lt(f,a),bi===null?bi=[f]:bi.push(f),He!==4&&(He=2),t===null)return!0;r=Lt(r,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Ro(a.stateNode,r,e),io(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Qn===null||!Qn.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=up(c),sp(c,e,a,r),io(a,c),!1}a=a.return}while(a!==null);return!1}var _o=Error(u(461)),Fe=!1;function et(e,t,a,r){t.child=e===null?dh(t,null,a,r):Na(t,e.child,a,r)}function op(e,t,a,r,c){a=a.render;var f=t.ref;if("ref"in r){var g={};for(var S in r)S!=="ref"&&(g[S]=r[S])}else g=r;return ba(t),r=fo(e,t,a,g,f,c),S=ho(),e!==null&&!Fe?(po(e,t,c),mn(e,t,c)):(Se&&S&&Ks(t),t.flags|=1,et(e,t,r,c),t.child)}function cp(e,t,a,r,c){if(e===null){var f=a.type;return typeof f=="function"&&!Gs(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,fp(e,t,f,r,c)):(e=_r(a.type,null,r,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Ho(e,c)){var g=f.memoizedProps;if(a=a.compare,a=a!==null?a:Wl,a(g,r)&&e.ref===t.ref)return mn(e,t,c)}return t.flags|=1,e=on(f,r),e.ref=t.ref,e.return=t,t.child=e}function fp(e,t,a,r,c){if(e!==null){var f=e.memoizedProps;if(Wl(f,r)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=r=f,Ho(e,c))(e.flags&131072)!==0&&(Fe=!0);else return t.lanes=e.lanes,mn(e,t,c)}return Mo(e,t,a,r,c)}function dp(e,t,a,r){var c=r.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(r=t.child=e.child,c=0;r!==null;)c=c|r.lanes|r.childLanes,r=r.sibling;r=c&~f}else r=0,t.child=null;return hp(e,t,f,a,r)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Dr(t,f!==null?f.cachePool:null),f!==null?mh(t,f):uo(),gh(t);else return r=t.lanes=536870912,hp(e,t,f!==null?f.baseLanes|a:a,a,r)}else f!==null?(Dr(t,f.cachePool),mh(t,f),Fn(),t.memoizedState=null):(e!==null&&Dr(t,null),uo(),Fn());return et(e,t,c,a),t.child}function hi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function hp(e,t,a,r,c){var f=to();return f=f===null?null:{parent:Ve._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&Dr(t,null),uo(),gh(t),e!==null&&el(e,t,r,!0),t.childLanes=c,null}function Ir(e,t){return t=Pr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pp(e,t,a){return Na(t,e.child,null,a),e=Ir(t,t.pendingProps),e.flags|=2,jt(t),t.memoizedState=null,e}function zx(e,t,a){var r=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(r.mode==="hidden")return e=Ir(t,r),t.lanes=536870912,hi(null,e);if(oo(t),(e=ze)?(e=jm(e,Ut),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:kn!==null?{id:Zt,overflow:Jt}:null,retryLane:536870912,hydrationErrors:null},a=Id(e),a.return=t,t.child=a,We=t,ze=null)):e=null,e===null)throw Bn(t);return t.lanes=536870912,null}return Ir(t,r)}var f=e.memoizedState;if(f!==null){var g=f.dehydrated;if(oo(t),c)if(t.flags&256)t.flags&=-257,t=pp(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(Fe||el(e,t,a,!1),c=(a&e.childLanes)!==0,Fe||c){if(r=Me,r!==null&&(g=ld(r,a),g!==0&&g!==f.retryLane))throw f.retryLane=g,ga(e,g),yt(r,e,g),_o;su(),t=pp(e,t,a)}else e=f.treeContext,ze=Ht(g.nextSibling),We=t,Se=!0,Un=null,Ut=!1,e!==null&&eh(t,e),t=Ir(t,r),t.flags|=4096;return t}return e=on(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wr(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Mo(e,t,a,r,c){return ba(t),a=fo(e,t,a,r,void 0,c),r=ho(),e!==null&&!Fe?(po(e,t,c),mn(e,t,c)):(Se&&r&&Ks(t),t.flags|=1,et(e,t,a,c),t.child)}function mp(e,t,a,r,c,f){return ba(t),t.updateQueue=null,a=xh(t,r,a,c),yh(e),r=ho(),e!==null&&!Fe?(po(e,t,f),mn(e,t,f)):(Se&&r&&Ks(t),t.flags|=1,et(e,t,a,f),t.child)}function gp(e,t,a,r,c){if(ba(t),t.stateNode===null){var f=Ja,g=a.contextType;typeof g=="object"&&g!==null&&(f=Pe(g)),f=new a(r,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Oo,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=r,f.state=t.memoizedState,f.refs={},ao(t),g=a.contextType,f.context=typeof g=="object"&&g!==null?Pe(g):Ja,f.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(To(t,a,g,r),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(g=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),g!==f.state&&Oo.enqueueReplaceState(f,f.state,null),si(t,r,f,c),ui(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){f=t.stateNode;var S=t.memoizedProps,A=ja(a,S);f.props=A;var D=f.context,Y=a.contextType;g=Ja,typeof Y=="object"&&Y!==null&&(g=Pe(Y));var F=a.getDerivedStateFromProps;Y=typeof F=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Y||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||D!==g)&&np(t,f,r,g),qn=!1;var k=t.memoizedState;f.state=k,si(t,r,f,c),ui(),D=t.memoizedState,S||k!==D||qn?(typeof F=="function"&&(To(t,a,F,r),D=t.memoizedState),(A=qn||tp(t,a,A,r,k,D,g))?(Y||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=D),f.props=r,f.state=D,f.context=g,r=A):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{f=t.stateNode,lo(e,t),g=t.memoizedProps,Y=ja(a,g),f.props=Y,F=t.pendingProps,k=f.context,D=a.contextType,A=Ja,typeof D=="object"&&D!==null&&(A=Pe(D)),S=a.getDerivedStateFromProps,(D=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==F||k!==A)&&np(t,f,r,A),qn=!1,k=t.memoizedState,f.state=k,si(t,r,f,c),ui();var B=t.memoizedState;g!==F||k!==B||qn||e!==null&&e.dependencies!==null&&zr(e.dependencies)?(typeof S=="function"&&(To(t,a,S,r),B=t.memoizedState),(Y=qn||tp(t,a,Y,r,k,B,A)||e!==null&&e.dependencies!==null&&zr(e.dependencies))?(D||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(r,B,A),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(r,B,A)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=B),f.props=r,f.state=B,f.context=A,r=Y):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),r=!1)}return f=r,Wr(e,t),r=(t.flags&128)!==0,f||r?(f=t.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&r?(t.child=Na(t,e.child,null,c),t.child=Na(t,null,a,c)):et(e,t,a,c),t.memoizedState=f.state,e=t.child):e=mn(e,t,c),e}function yp(e,t,a,r){return xa(),t.flags|=256,et(e,t,a,r),t.child}var zo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lo(e){return{baseLanes:e,cachePool:rh()}}function Do(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Tt),e}function xp(e,t,a){var r=t.pendingProps,c=!1,f=(t.flags&128)!==0,g;if((g=f)||(g=e!==null&&e.memoizedState===null?!1:(qe.current&2)!==0),g&&(c=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(c?Gn(t):Fn(),(e=ze)?(e=jm(e,Ut),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:kn!==null?{id:Zt,overflow:Jt}:null,retryLane:536870912,hydrationErrors:null},a=Id(e),a.return=t,t.child=a,We=t,ze=null)):e=null,e===null)throw Bn(t);return yc(e)?t.lanes=32:t.lanes=536870912,null}var S=r.children;return r=r.fallback,c?(Fn(),c=t.mode,S=Pr({mode:"hidden",children:S},c),r=ya(r,c,a,null),S.return=t,r.return=t,S.sibling=r,t.child=S,r=t.child,r.memoizedState=Lo(a),r.childLanes=Do(e,g,a),t.memoizedState=zo,hi(null,r)):(Gn(t),ko(t,S))}var A=e.memoizedState;if(A!==null&&(S=A.dehydrated,S!==null)){if(f)t.flags&256?(Gn(t),t.flags&=-257,t=Uo(e,t,a)):t.memoizedState!==null?(Fn(),t.child=e.child,t.flags|=128,t=null):(Fn(),S=r.fallback,c=t.mode,r=Pr({mode:"visible",children:r.children},c),S=ya(S,c,a,null),S.flags|=2,r.return=t,S.return=t,r.sibling=S,t.child=r,Na(t,e.child,null,a),r=t.child,r.memoizedState=Lo(a),r.childLanes=Do(e,g,a),t.memoizedState=zo,t=hi(null,r));else if(Gn(t),yc(S)){if(g=S.nextSibling&&S.nextSibling.dataset,g)var D=g.dgst;g=D,r=Error(u(419)),r.stack="",r.digest=g,ti({value:r,source:null,stack:null}),t=Uo(e,t,a)}else if(Fe||el(e,t,a,!1),g=(a&e.childLanes)!==0,Fe||g){if(g=Me,g!==null&&(r=ld(g,a),r!==0&&r!==A.retryLane))throw A.retryLane=r,ga(e,r),yt(g,e,r),_o;gc(S)||su(),t=Uo(e,t,a)}else gc(S)?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,ze=Ht(S.nextSibling),We=t,Se=!0,Un=null,Ut=!1,e!==null&&eh(t,e),t=ko(t,r.children),t.flags|=4096);return t}return c?(Fn(),S=r.fallback,c=t.mode,A=e.child,D=A.sibling,r=on(A,{mode:"hidden",children:r.children}),r.subtreeFlags=A.subtreeFlags&65011712,D!==null?S=on(D,S):(S=ya(S,c,a,null),S.flags|=2),S.return=t,r.return=t,r.sibling=S,t.child=r,hi(null,r),r=t.child,S=e.child.memoizedState,S===null?S=Lo(a):(c=S.cachePool,c!==null?(A=Ve._currentValue,c=c.parent!==A?{parent:A,pool:A}:c):c=rh(),S={baseLanes:S.baseLanes|a,cachePool:c}),r.memoizedState=S,r.childLanes=Do(e,g,a),t.memoizedState=zo,hi(e.child,r)):(Gn(t),a=e.child,e=a.sibling,a=on(a,{mode:"visible",children:r.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function ko(e,t){return t=Pr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Pr(e,t){return e=Nt(22,e,null,t),e.lanes=0,e}function Uo(e,t,a){return Na(t,e.child,null,a),e=ko(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vp(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Is(e.return,t,a)}function Bo(e,t,a,r,c,f){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:c,treeForkCount:f}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=r,g.tail=a,g.tailMode=c,g.treeForkCount=f)}function bp(e,t,a){var r=t.pendingProps,c=r.revealOrder,f=r.tail;r=r.children;var g=qe.current,S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,ne(qe,g),et(e,t,r,a),r=Se?ei:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vp(e,a,t);else if(e.tag===19)vp(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&Yr(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),Bo(t,!1,c,a,f,r);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Yr(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Bo(t,!0,a,null,f,r);break;case"together":Bo(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function mn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Xn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(el(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=on(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=on(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Ho(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&zr(e)))}function Lx(e,t,a){switch(t.tag){case 3:Gt(t,t.stateNode.containerInfo),Hn(t,Ve,e.memoizedState.cache),xa();break;case 27:case 5:La(t);break;case 4:Gt(t,t.stateNode.containerInfo);break;case 10:Hn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Gn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?xp(e,t,a):(Gn(t),e=mn(e,t,a),e!==null?e.sibling:null);Gn(t);break;case 19:var c=(e.flags&128)!==0;if(r=(a&t.childLanes)!==0,r||(el(e,t,a,!1),r=(a&t.childLanes)!==0),c){if(r)return bp(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),ne(qe,qe.current),r)break;return null;case 22:return t.lanes=0,dp(e,t,a,t.pendingProps);case 24:Hn(t,Ve,e.memoizedState.cache)}return mn(e,t,a)}function Sp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Fe=!0;else{if(!Ho(e,a)&&(t.flags&128)===0)return Fe=!1,Lx(e,t,a);Fe=(e.flags&131072)!==0}else Fe=!1,Se&&(t.flags&1048576)!==0&&Pd(t,ei,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e=="function")Gs(e)?(r=ja(e,r),t.tag=1,t=gp(null,t,e,r,a)):(t.tag=0,t=Mo(null,t,e,r,a));else{if(e!=null){var c=e.$$typeof;if(c===U){t.tag=11,t=op(null,t,e,r,a);break e}else if(c===G){t.tag=14,t=cp(null,t,e,r,a);break e}}throw t=te(e)||e,Error(u(306,t,""))}}return t;case 0:return Mo(e,t,t.type,t.pendingProps,a);case 1:return r=t.type,c=ja(r,t.pendingProps),gp(e,t,r,c,a);case 3:e:{if(Gt(t,t.stateNode.containerInfo),e===null)throw Error(u(387));r=t.pendingProps;var f=t.memoizedState;c=f.element,lo(e,t),si(t,r,null,a);var g=t.memoizedState;if(r=g.cache,Hn(t,Ve,r),r!==f.cache&&Ws(t,[Ve],a,!0),ui(),r=g.element,f.isDehydrated)if(f={element:r,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=yp(e,t,r,a);break e}else if(r!==c){c=Lt(Error(u(424)),t),ti(c),t=yp(e,t,r,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ze=Ht(e.firstChild),We=t,Se=!0,Un=null,Ut=!0,a=dh(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(xa(),r===c){t=mn(e,t,a);break e}et(e,t,r,a)}t=t.child}return t;case 26:return Wr(e,t),e===null?(a=Mm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Se||(a=t.type,e=t.pendingProps,r=mu(Ae.current).createElement(a),r[Ie]=t,r[ft]=e,tt(r,a,e),Ze(r),t.stateNode=r):t.memoizedState=Mm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return La(t),e===null&&Se&&(r=t.stateNode=Om(t.type,t.pendingProps,Ae.current),We=t,Ut=!0,c=ze,Wn(t.type)?(xc=c,ze=Ht(r.firstChild)):ze=c),et(e,t,t.pendingProps.children,a),Wr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((c=r=ze)&&(r=cv(r,t.type,t.pendingProps,Ut),r!==null?(t.stateNode=r,We=t,ze=Ht(r.firstChild),Ut=!1,c=!0):c=!1),c||Bn(t)),La(t),c=t.type,f=t.pendingProps,g=e!==null?e.memoizedProps:null,r=f.children,hc(c,f)?r=null:g!==null&&hc(c,g)&&(t.flags|=32),t.memoizedState!==null&&(c=fo(e,t,Ax,null,null,a),Ti._currentValue=c),Wr(e,t),et(e,t,r,a),t.child;case 6:return e===null&&Se&&((e=a=ze)&&(a=fv(a,t.pendingProps,Ut),a!==null?(t.stateNode=a,We=t,ze=null,e=!0):e=!1),e||Bn(t)),null;case 13:return xp(e,t,a);case 4:return Gt(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Na(t,null,r,a):et(e,t,r,a),t.child;case 11:return op(e,t,t.type,t.pendingProps,a);case 7:return et(e,t,t.pendingProps,a),t.child;case 8:return et(e,t,t.pendingProps.children,a),t.child;case 12:return et(e,t,t.pendingProps.children,a),t.child;case 10:return r=t.pendingProps,Hn(t,t.type,r.value),et(e,t,r.children,a),t.child;case 9:return c=t.type._context,r=t.pendingProps.children,ba(t),c=Pe(c),r=r(c),t.flags|=1,et(e,t,r,a),t.child;case 14:return cp(e,t,t.type,t.pendingProps,a);case 15:return fp(e,t,t.type,t.pendingProps,a);case 19:return bp(e,t,a);case 31:return zx(e,t,a);case 22:return dp(e,t,a,t.pendingProps);case 24:return ba(t),r=Pe(Ve),e===null?(c=to(),c===null&&(c=Me,f=Ps(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),t.memoizedState={parent:r,cache:c},ao(t),Hn(t,Ve,c)):((e.lanes&a)!==0&&(lo(e,t),si(t,null,null,a),ui()),c=e.memoizedState,f=t.memoizedState,c.parent!==r?(c={parent:r,cache:r},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Hn(t,Ve,r)):(r=f.cache,Hn(t,Ve,r),r!==c.cache&&Ws(t,[Ve],a,!0))),et(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function gn(e){e.flags|=4}function qo(e,t,a,r,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Qp())e.flags|=8192;else throw Ca=Ur,no}else e.flags&=-16777217}function Ep(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Um(t))if(Qp())e.flags|=8192;else throw Ca=Ur,no}function eu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?td():536870912,e.lanes|=t,dl|=t)}function pi(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Le(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,r=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,r|=c.subtreeFlags&65011712,r|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,r|=c.subtreeFlags,r|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=r,e.childLanes=a,t}function Dx(e,t,a){var r=t.pendingProps;switch(Xs(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Le(t),null;case 1:return Le(t),null;case 3:return a=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),dn(Ve),_n(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Pa(t)?gn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Zs())),Le(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(gn(t),f!==null?(Le(t),Ep(t,f)):(Le(t),qo(t,c,null,r,a))):f?f!==e.memoizedState?(gn(t),Le(t),Ep(t,f)):(Le(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&gn(t),Le(t),qo(t,c,e,r,a)),null;case 27:if(Da(t),a=Ae.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gn(t);else{if(!r){if(t.stateNode===null)throw Error(u(166));return Le(t),null}e=de.current,Pa(t)?th(t):(e=Om(c,r,a),t.stateNode=e,gn(t))}return Le(t),null;case 5:if(Da(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gn(t);else{if(!r){if(t.stateNode===null)throw Error(u(166));return Le(t),null}if(f=de.current,Pa(t))th(t);else{var g=mu(Ae.current);switch(f){case 1:f=g.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=g.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=g.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=g.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=g.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof r.is=="string"?g.createElement("select",{is:r.is}):g.createElement("select"),r.multiple?f.multiple=!0:r.size&&(f.size=r.size);break;default:f=typeof r.is=="string"?g.createElement(c,{is:r.is}):g.createElement(c)}}f[Ie]=t,f[ft]=r;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)f.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=f;e:switch(tt(f,c,r),c){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&gn(t)}}return Le(t),qo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&gn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(u(166));if(e=Ae.current,Pa(t)){if(e=t.stateNode,a=t.memoizedProps,r=null,c=We,c!==null)switch(c.tag){case 27:case 5:r=c.memoizedProps}e[Ie]=t,e=!!(e.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||xm(e.nodeValue,a)),e||Bn(t,!0)}else e=mu(e).createTextNode(r),e[Ie]=t,t.stateNode=e}return Le(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(r=Pa(t),a!==null){if(e===null){if(!r)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Ie]=t}else xa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),e=!1}else a=Zs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(jt(t),t):(jt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Le(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Pa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!c)throw Error(u(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(u(317));c[Ie]=t}else xa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),c=!1}else c=Zs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(jt(t),t):(jt(t),null)}return jt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=r!==null,e=e!==null&&e.memoizedState!==null,a&&(r=t.child,c=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(c=r.alternate.memoizedState.cachePool.pool),f=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(f=r.memoizedState.cachePool.pool),f!==c&&(r.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),eu(t,t.updateQueue),Le(t),null);case 4:return _n(),e===null&&sc(t.stateNode.containerInfo),Le(t),null;case 10:return dn(t.type),Le(t),null;case 19:if(P(qe),r=t.memoizedState,r===null)return Le(t),null;if(c=(t.flags&128)!==0,f=r.rendering,f===null)if(c)pi(r,!1);else{if(He!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Yr(e),f!==null){for(t.flags|=128,pi(r,!1),e=f.updateQueue,t.updateQueue=e,eu(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Jd(a,e),a=a.sibling;return ne(qe,qe.current&1|2),Se&&cn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&pe()>iu&&(t.flags|=128,c=!0,pi(r,!1),t.lanes=4194304)}else{if(!c)if(e=Yr(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,eu(t,e),pi(r,!0),r.tail===null&&r.tailMode==="hidden"&&!f.alternate&&!Se)return Le(t),null}else 2*pe()-r.renderingStartTime>iu&&a!==536870912&&(t.flags|=128,c=!0,pi(r,!1),t.lanes=4194304);r.isBackwards?(f.sibling=t.child,t.child=f):(e=r.last,e!==null?e.sibling=f:t.child=f,r.last=f)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=pe(),e.sibling=null,a=qe.current,ne(qe,c?a&1|2:a&1),Se&&cn(t,r.treeForkCount),e):(Le(t),null);case 22:case 23:return jt(t),so(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(a&536870912)!==0&&(t.flags&128)===0&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),a=t.updateQueue,a!==null&&eu(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==a&&(t.flags|=2048),e!==null&&P(Sa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),dn(Ve),Le(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function kx(e,t){switch(Xs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dn(Ve),_n(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Da(t),null;case 31:if(t.memoizedState!==null){if(jt(t),t.alternate===null)throw Error(u(340));xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return P(qe),null;case 4:return _n(),null;case 10:return dn(t.type),null;case 22:case 23:return jt(t),so(),e!==null&&P(Sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return dn(Ve),null;case 25:return null;default:return null}}function Cp(e,t){switch(Xs(t),t.tag){case 3:dn(Ve),_n();break;case 26:case 27:case 5:Da(t);break;case 4:_n();break;case 31:t.memoizedState!==null&&jt(t);break;case 13:jt(t);break;case 19:P(qe);break;case 10:dn(t.type);break;case 22:case 23:jt(t),so(),e!==null&&P(Sa);break;case 24:dn(Ve)}}function mi(e,t){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var c=r.next;a=c;do{if((a.tag&e)===e){r=void 0;var f=a.create,g=a.inst;r=f(),g.destroy=r}a=a.next}while(a!==c)}}catch(S){we(t,t.return,S)}}function $n(e,t,a){try{var r=t.updateQueue,c=r!==null?r.lastEffect:null;if(c!==null){var f=c.next;r=f;do{if((r.tag&e)===e){var g=r.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,c=t;var A=a,D=S;try{D()}catch(Y){we(c,A,Y)}}}r=r.next}while(r!==f)}}catch(Y){we(t,t.return,Y)}}function Np(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ph(t,a)}catch(r){we(e,e.return,r)}}}function Ap(e,t,a){a.props=ja(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(r){we(e,t,r)}}function gi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof a=="function"?e.refCleanup=a(r):a.current=r}}catch(c){we(e,t,c)}}function It(e,t){var a=e.ref,r=e.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(c){we(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){we(e,t,c)}else a.current=null}function jp(e){var t=e.type,a=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(c){we(e,e.return,c)}}function Yo(e,t,a){try{var r=e.stateNode;lv(r,e.type,a,t),r[ft]=t}catch(c){we(e,e.return,c)}}function wp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Wn(e.type)||e.tag===4}function Vo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Wn(e.type)||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 Go(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=un));else if(r!==4&&(r===27&&Wn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Go(e,t,a),e=e.sibling;e!==null;)Go(e,t,a),e=e.sibling}function tu(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(r!==4&&(r===27&&Wn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(tu(e,t,a),e=e.sibling;e!==null;)tu(e,t,a),e=e.sibling}function Tp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var r=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);tt(t,r,a),t[Ie]=e,t[ft]=a}catch(f){we(e,e.return,f)}}var yn=!1,$e=!1,Fo=!1,Op=typeof WeakSet=="function"?WeakSet:Set,Je=null;function Ux(e,t){if(e=e.containerInfo,fc=Eu,e=Yd(e),ks(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var c=r.anchorOffset,f=r.focusNode;r=r.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var g=0,S=-1,A=-1,D=0,Y=0,F=e,k=null;t:for(;;){for(var B;F!==a||c!==0&&F.nodeType!==3||(S=g+c),F!==f||r!==0&&F.nodeType!==3||(A=g+r),F.nodeType===3&&(g+=F.nodeValue.length),(B=F.firstChild)!==null;)k=F,F=B;for(;;){if(F===e)break t;if(k===a&&++D===c&&(S=g),k===f&&++Y===r&&(A=g),(B=F.nextSibling)!==null)break;F=k,k=F.parentNode}F=B}a=S===-1||A===-1?null:{start:S,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(dc={focusedElem:e,selectionRange:a},Eu=!1,Je=t;Je!==null;)if(t=Je,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Je=e;else for(;Je!==null;){switch(t=Je,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,c=f.memoizedProps,f=f.memoizedState,r=a.stateNode;try{var le=ja(a.type,c);e=r.getSnapshotBeforeUpdate(le,f),r.__reactInternalSnapshotBeforeUpdate=e}catch(ce){we(a,a.return,ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)mc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":mc(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(u(163))}if(e=t.sibling,e!==null){e.return=t.return,Je=e;break}Je=t.return}}function Rp(e,t,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:vn(e,a),r&4&&mi(5,a);break;case 1:if(vn(e,a),r&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){we(a,a.return,g)}else{var c=ja(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){we(a,a.return,g)}}r&64&&Np(a),r&512&&gi(a,a.return);break;case 3:if(vn(e,a),r&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{ph(e,t)}catch(g){we(a,a.return,g)}}break;case 27:t===null&&r&4&&Tp(a);case 26:case 5:vn(e,a),t===null&&r&4&&jp(a),r&512&&gi(a,a.return);break;case 12:vn(e,a);break;case 31:vn(e,a),r&4&&zp(e,a);break;case 13:vn(e,a),r&4&&Lp(e,a),r&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Kx.bind(null,a),dv(e,a))));break;case 22:if(r=a.memoizedState!==null||yn,!r){t=t!==null&&t.memoizedState!==null||$e,c=yn;var f=$e;yn=r,($e=t)&&!f?bn(e,a,(a.subtreeFlags&8772)!==0):vn(e,a),yn=c,$e=f}break;case 30:break;default:vn(e,a)}}function _p(e){var t=e.alternate;t!==null&&(e.alternate=null,_p(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&vs(t)),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 De=null,ht=!1;function xn(e,t,a){for(a=a.child;a!==null;)Mp(e,t,a),a=a.sibling}function Mp(e,t,a){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(ql,a)}catch{}switch(a.tag){case 26:$e||It(a,t),xn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:$e||It(a,t);var r=De,c=ht;Wn(a.type)&&(De=a.stateNode,ht=!1),xn(e,t,a),Ai(a.stateNode),De=r,ht=c;break;case 5:$e||It(a,t);case 6:if(r=De,c=ht,De=null,xn(e,t,a),De=r,ht=c,De!==null)if(ht)try{(De.nodeType===9?De.body:De.nodeName==="HTML"?De.ownerDocument.body:De).removeChild(a.stateNode)}catch(f){we(a,t,f)}else try{De.removeChild(a.stateNode)}catch(f){we(a,t,f)}break;case 18:De!==null&&(ht?(e=De,Nm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),bl(e)):Nm(De,a.stateNode));break;case 4:r=De,c=ht,De=a.stateNode.containerInfo,ht=!0,xn(e,t,a),De=r,ht=c;break;case 0:case 11:case 14:case 15:$n(2,a,t),$e||$n(4,a,t),xn(e,t,a);break;case 1:$e||(It(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"&&Ap(a,t,r)),xn(e,t,a);break;case 21:xn(e,t,a);break;case 22:$e=(r=$e)||a.memoizedState!==null,xn(e,t,a),$e=r;break;default:xn(e,t,a)}}function zp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{bl(e)}catch(a){we(t,t.return,a)}}}function Lp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{bl(e)}catch(a){we(t,t.return,a)}}function Bx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Op),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Op),t;default:throw Error(u(435,e.tag))}}function nu(e,t){var a=Bx(e);t.forEach(function(r){if(!a.has(r)){a.add(r);var c=Xx.bind(null,e,r);r.then(c,c)}})}function pt(e,t){var a=t.deletions;if(a!==null)for(var r=0;r<a.length;r++){var c=a[r],f=e,g=t,S=g;e:for(;S!==null;){switch(S.tag){case 27:if(Wn(S.type)){De=S.stateNode,ht=!1;break e}break;case 5:De=S.stateNode,ht=!1;break e;case 3:case 4:De=S.stateNode.containerInfo,ht=!0;break e}S=S.return}if(De===null)throw Error(u(160));Mp(f,g,c),De=null,ht=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Dp(t,e),t=t.sibling}var $t=null;function Dp(e,t){var a=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pt(t,e),mt(e),r&4&&($n(3,e,e.return),mi(3,e),$n(5,e,e.return));break;case 1:pt(t,e),mt(e),r&512&&($e||a===null||It(a,a.return)),r&64&&yn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:var c=$t;if(pt(t,e),mt(e),r&512&&($e||a===null||It(a,a.return)),r&4){var f=a!==null?a.memoizedState:null;if(r=e.memoizedState,a===null)if(r===null)if(e.stateNode===null){e:{r=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(r){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Gl]||f[Ie]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(r),c.head.insertBefore(f,c.querySelector("head > title"))),tt(f,r,a),f[Ie]=e,Ze(f),r=f;break e;case"link":var g=Dm("link","href",c).get(r+(a.href||""));if(g){for(var S=0;S<g.length;S++)if(f=g[S],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(S,1);break t}}f=c.createElement(r),tt(f,r,a),c.head.appendChild(f);break;case"meta":if(g=Dm("meta","content",c).get(r+(a.content||""))){for(S=0;S<g.length;S++)if(f=g[S],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(S,1);break t}}f=c.createElement(r),tt(f,r,a),c.head.appendChild(f);break;default:throw Error(u(468,r))}f[Ie]=e,Ze(f),r=f}e.stateNode=r}else km(c,e.type,e.stateNode);else e.stateNode=Lm(c,r,e.memoizedProps);else f!==r?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,r===null?km(c,e.type,e.stateNode):Lm(c,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Yo(e,e.memoizedProps,a.memoizedProps)}break;case 27:pt(t,e),mt(e),r&512&&($e||a===null||It(a,a.return)),a!==null&&r&4&&Yo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(pt(t,e),mt(e),r&512&&($e||a===null||It(a,a.return)),e.flags&32){c=e.stateNode;try{Ga(c,"")}catch(le){we(e,e.return,le)}}r&4&&e.stateNode!=null&&(c=e.memoizedProps,Yo(e,c,a!==null?a.memoizedProps:c)),r&1024&&(Fo=!0);break;case 6:if(pt(t,e),mt(e),r&4){if(e.stateNode===null)throw Error(u(162));r=e.memoizedProps,a=e.stateNode;try{a.nodeValue=r}catch(le){we(e,e.return,le)}}break;case 3:if(xu=null,c=$t,$t=gu(t.containerInfo),pt(t,e),$t=c,mt(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{bl(t.containerInfo)}catch(le){we(e,e.return,le)}Fo&&(Fo=!1,kp(e));break;case 4:r=$t,$t=gu(e.stateNode.containerInfo),pt(t,e),mt(e),$t=r;break;case 12:pt(t,e),mt(e);break;case 31:pt(t,e),mt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,nu(e,r)));break;case 13:pt(t,e),mt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(lu=pe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,nu(e,r)));break;case 22:c=e.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,D=yn,Y=$e;if(yn=D||c,$e=Y||A,pt(t,e),$e=Y,yn=D,mt(e),r&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||A||yn||$e||wa(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){A=a=t;try{if(f=A.stateNode,c)g=f.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{S=A.stateNode;var F=A.memoizedProps.style,k=F!=null&&F.hasOwnProperty("display")?F.display:null;S.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(le){we(A,A.return,le)}}}else if(t.tag===6){if(a===null){A=t;try{A.stateNode.nodeValue=c?"":A.memoizedProps}catch(le){we(A,A.return,le)}}}else if(t.tag===18){if(a===null){A=t;try{var B=A.stateNode;c?Am(B,!0):Am(A.stateNode,!1)}catch(le){we(A,A.return,le)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,nu(e,a))));break;case 19:pt(t,e),mt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,nu(e,r)));break;case 30:break;case 21:break;default:pt(t,e),mt(e)}}function mt(e){var t=e.flags;if(t&2){try{for(var a,r=e.return;r!==null;){if(wp(r)){a=r;break}r=r.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var c=a.stateNode,f=Vo(e);tu(e,f,c);break;case 5:var g=a.stateNode;a.flags&32&&(Ga(g,""),a.flags&=-33);var S=Vo(e);tu(e,S,g);break;case 3:case 4:var A=a.stateNode.containerInfo,D=Vo(e);Go(e,D,A);break;default:throw Error(u(161))}}catch(Y){we(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function kp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;kp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Rp(e,t.alternate,t),t=t.sibling}function wa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:$n(4,t,t.return),wa(t);break;case 1:It(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Ap(t,t.return,a),wa(t);break;case 27:Ai(t.stateNode);case 26:case 5:It(t,t.return),wa(t);break;case 22:t.memoizedState===null&&wa(t);break;case 30:wa(t);break;default:wa(t)}e=e.sibling}}function bn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,c=e,f=t,g=f.flags;switch(f.tag){case 0:case 11:case 15:bn(c,f,a),mi(4,f);break;case 1:if(bn(c,f,a),r=f,c=r.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(D){we(r,r.return,D)}if(r=f,c=r.updateQueue,c!==null){var S=r.stateNode;try{var A=c.shared.hiddenCallbacks;if(A!==null)for(c.shared.hiddenCallbacks=null,c=0;c<A.length;c++)hh(A[c],S)}catch(D){we(r,r.return,D)}}a&&g&64&&Np(f),gi(f,f.return);break;case 27:Tp(f);case 26:case 5:bn(c,f,a),a&&r===null&&g&4&&jp(f),gi(f,f.return);break;case 12:bn(c,f,a);break;case 31:bn(c,f,a),a&&g&4&&zp(c,f);break;case 13:bn(c,f,a),a&&g&4&&Lp(c,f);break;case 22:f.memoizedState===null&&bn(c,f,a),gi(f,f.return);break;case 30:break;default:bn(c,f,a)}t=t.sibling}}function $o(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&ni(a))}function Ko(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ni(e))}function Kt(e,t,a,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Up(e,t,a,r),t=t.sibling}function Up(e,t,a,r){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Kt(e,t,a,r),c&2048&&mi(9,t);break;case 1:Kt(e,t,a,r);break;case 3:Kt(e,t,a,r),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ni(e)));break;case 12:if(c&2048){Kt(e,t,a,r),e=t.stateNode;try{var f=t.memoizedProps,g=f.id,S=f.onPostCommit;typeof S=="function"&&S(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){we(t,t.return,A)}}else Kt(e,t,a,r);break;case 31:Kt(e,t,a,r);break;case 13:Kt(e,t,a,r);break;case 23:break;case 22:f=t.stateNode,g=t.alternate,t.memoizedState!==null?f._visibility&2?Kt(e,t,a,r):yi(e,t):f._visibility&2?Kt(e,t,a,r):(f._visibility|=2,ol(e,t,a,r,(t.subtreeFlags&10256)!==0||!1)),c&2048&&$o(g,t);break;case 24:Kt(e,t,a,r),c&2048&&Ko(t.alternate,t);break;default:Kt(e,t,a,r)}}function ol(e,t,a,r,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,g=t,S=a,A=r,D=g.flags;switch(g.tag){case 0:case 11:case 15:ol(f,g,S,A,c),mi(8,g);break;case 23:break;case 22:var Y=g.stateNode;g.memoizedState!==null?Y._visibility&2?ol(f,g,S,A,c):yi(f,g):(Y._visibility|=2,ol(f,g,S,A,c)),c&&D&2048&&$o(g.alternate,g);break;case 24:ol(f,g,S,A,c),c&&D&2048&&Ko(g.alternate,g);break;default:ol(f,g,S,A,c)}t=t.sibling}}function yi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,r=t,c=r.flags;switch(r.tag){case 22:yi(a,r),c&2048&&$o(r.alternate,r);break;case 24:yi(a,r),c&2048&&Ko(r.alternate,r);break;default:yi(a,r)}t=t.sibling}}var xi=8192;function cl(e,t,a){if(e.subtreeFlags&xi)for(e=e.child;e!==null;)Bp(e,t,a),e=e.sibling}function Bp(e,t,a){switch(e.tag){case 26:cl(e,t,a),e.flags&xi&&e.memoizedState!==null&&Nv(a,$t,e.memoizedState,e.memoizedProps);break;case 5:cl(e,t,a);break;case 3:case 4:var r=$t;$t=gu(e.stateNode.containerInfo),cl(e,t,a),$t=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=xi,xi=16777216,cl(e,t,a),xi=r):cl(e,t,a));break;default:cl(e,t,a)}}function Hp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function vi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];Je=r,Yp(r,e)}Hp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)qp(e),e=e.sibling}function qp(e){switch(e.tag){case 0:case 11:case 15:vi(e),e.flags&2048&&$n(9,e,e.return);break;case 3:vi(e);break;case 12:vi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,au(e)):vi(e);break;default:vi(e)}}function au(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];Je=r,Yp(r,e)}Hp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:$n(8,t,t.return),au(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,au(t));break;default:au(t)}e=e.sibling}}function Yp(e,t){for(;Je!==null;){var a=Je;switch(a.tag){case 0:case 11:case 15:$n(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ni(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,Je=r;else e:for(a=e;Je!==null;){r=Je;var c=r.sibling,f=r.return;if(_p(r),r===a){Je=null;break e}if(c!==null){c.return=f,Je=c;break e}Je=f}}}var Hx={getCacheForType:function(e){var t=Pe(Ve),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Pe(Ve).controller.signal}},qx=typeof WeakMap=="function"?WeakMap:Map,Ne=0,Me=null,ye=null,ve=0,je=0,wt=null,Kn=!1,fl=!1,Xo=!1,Sn=0,He=0,Xn=0,Ta=0,Qo=0,Tt=0,dl=0,bi=null,gt=null,Zo=!1,lu=0,Vp=0,iu=1/0,ru=null,Qn=null,Xe=0,Zn=null,hl=null,En=0,Jo=0,Io=null,Gp=null,Si=0,Wo=null;function Ot(){return(Ne&2)!==0&&ve!==0?ve&-ve:M.T!==null?lc():id()}function Fp(){if(Tt===0)if((ve&536870912)===0||Se){var e=pr;pr<<=1,(pr&3932160)===0&&(pr=262144),Tt=e}else Tt=536870912;return e=At.current,e!==null&&(e.flags|=32),Tt}function yt(e,t,a){(e===Me&&(je===2||je===9)||e.cancelPendingCommit!==null)&&(pl(e,0),Jn(e,ve,Tt,!1)),Vl(e,a),((Ne&2)===0||e!==Me)&&(e===Me&&((Ne&2)===0&&(Ta|=a),He===4&&Jn(e,ve,Tt,!1)),Wt(e))}function $p(e,t,a){if((Ne&6)!==0)throw Error(u(327));var r=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Yl(e,t),c=r?Gx(e,t):ec(e,t,!0),f=r;do{if(c===0){fl&&!r&&Jn(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!Yx(a)){c=ec(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var S=e;c=bi;var A=S.current.memoizedState.isDehydrated;if(A&&(pl(S,g).flags|=256),g=ec(S,g,!1),g!==2){if(Xo&&!A){S.errorRecoveryDisabledLanes|=f,Ta|=f,c=4;break e}f=gt,gt=c,f!==null&&(gt===null?gt=f:gt.push.apply(gt,f))}c=g}if(f=!1,c!==2)continue}}if(c===1){pl(e,0),Jn(e,t,0,!0);break}e:{switch(r=e,f=c,f){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Jn(r,t,Tt,!Kn);break e;case 2:gt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(c=lu+300-pe(),10<c)){if(Jn(r,t,Tt,!Kn),gr(r,0,!0)!==0)break e;En=t,r.timeoutHandle=Em(Kp.bind(null,r,a,gt,ru,Zo,t,Tt,Ta,dl,Kn,f,"Throttled",-0,0),c);break e}Kp(r,a,gt,ru,Zo,t,Tt,Ta,dl,Kn,f,null,-0,0)}}break}while(!0);Wt(e)}function Kp(e,t,a,r,c,f,g,S,A,D,Y,F,k,B){if(e.timeoutHandle=-1,F=t.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:un},Bp(t,f,F);var le=(f&62914560)===f?lu-pe():(f&4194048)===f?Vp-pe():0;if(le=Av(F,le),le!==null){En=f,e.cancelPendingCommit=le(em.bind(null,e,t,f,a,r,c,g,S,A,Y,F,null,k,B)),Jn(e,f,g,!D);return}}em(e,t,f,a,r,c,g,S,A)}function Yx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var r=0;r<a.length;r++){var c=a[r],f=c.getSnapshot;c=c.value;try{if(!Ct(f(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Jn(e,t,a,r){t&=~Qo,t&=~Ta,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var c=t;0<c;){var f=31-Et(c),g=1<<f;r[f]=-1,c&=~g}a!==0&&nd(e,a,t)}function uu(){return(Ne&6)===0?(Ei(0),!1):!0}function Po(){if(ye!==null){if(je===0)var e=ye.return;else e=ye,fn=va=null,mo(e),ll=null,li=0,e=ye;for(;e!==null;)Cp(e.alternate,e),e=e.return;ye=null}}function pl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,uv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),En=0,Po(),Me=e,ye=a=on(e.current,null),ve=t,je=0,wt=null,Kn=!1,fl=Yl(e,t),Xo=!1,dl=Tt=Qo=Ta=Xn=He=0,gt=bi=null,Zo=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var c=31-Et(r),f=1<<c;t|=e[c],r&=~f}return Sn=t,Tr(),a}function Xp(e,t){me=null,M.H=di,t===al||t===kr?(t=oh(),je=3):t===no?(t=oh(),je=4):je=t===_o?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,wt=t,ye===null&&(He=1,Jr(e,Lt(t,e.current)))}function Qp(){var e=At.current;return e===null?!0:(ve&4194048)===ve?Bt===null:(ve&62914560)===ve||(ve&536870912)!==0?e===Bt:!1}function Zp(){var e=M.H;return M.H=di,e===null?di:e}function Jp(){var e=M.A;return M.A=Hx,e}function su(){He=4,Kn||(ve&4194048)!==ve&&At.current!==null||(fl=!0),(Xn&134217727)===0&&(Ta&134217727)===0||Me===null||Jn(Me,ve,Tt,!1)}function ec(e,t,a){var r=Ne;Ne|=2;var c=Zp(),f=Jp();(Me!==e||ve!==t)&&(ru=null,pl(e,t)),t=!1;var g=He;e:do try{if(je!==0&&ye!==null){var S=ye,A=wt;switch(je){case 8:Po(),g=6;break e;case 3:case 2:case 9:case 6:At.current===null&&(t=!0);var D=je;if(je=0,wt=null,ml(e,S,A,D),a&&fl){g=0;break e}break;default:D=je,je=0,wt=null,ml(e,S,A,D)}}Vx(),g=He;break}catch(Y){Xp(e,Y)}while(!0);return t&&e.shellSuspendCounter++,fn=va=null,Ne=r,M.H=c,M.A=f,ye===null&&(Me=null,ve=0,Tr()),g}function Vx(){for(;ye!==null;)Ip(ye)}function Gx(e,t){var a=Ne;Ne|=2;var r=Zp(),c=Jp();Me!==e||ve!==t?(ru=null,iu=pe()+500,pl(e,t)):fl=Yl(e,t);e:do try{if(je!==0&&ye!==null){t=ye;var f=wt;t:switch(je){case 1:je=0,wt=null,ml(e,t,f,1);break;case 2:case 9:if(uh(f)){je=0,wt=null,Wp(t);break}t=function(){je!==2&&je!==9||Me!==e||(je=7),Wt(e)},f.then(t,t);break e;case 3:je=7;break e;case 4:je=5;break e;case 7:uh(f)?(je=0,wt=null,Wp(t)):(je=0,wt=null,ml(e,t,f,7));break;case 5:var g=null;switch(ye.tag){case 26:g=ye.memoizedState;case 5:case 27:var S=ye;if(g?Um(g):S.stateNode.complete){je=0,wt=null;var A=S.sibling;if(A!==null)ye=A;else{var D=S.return;D!==null?(ye=D,ou(D)):ye=null}break t}}je=0,wt=null,ml(e,t,f,5);break;case 6:je=0,wt=null,ml(e,t,f,6);break;case 8:Po(),He=6;break e;default:throw Error(u(462))}}Fx();break}catch(Y){Xp(e,Y)}while(!0);return fn=va=null,M.H=r,M.A=c,Ne=a,ye!==null?0:(Me=null,ve=0,Tr(),He)}function Fx(){for(;ye!==null&&!ed();)Ip(ye)}function Ip(e){var t=Sp(e.alternate,e,Sn);e.memoizedProps=e.pendingProps,t===null?ou(e):ye=t}function Wp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=mp(a,t,t.pendingProps,t.type,void 0,ve);break;case 11:t=mp(a,t,t.pendingProps,t.type.render,t.ref,ve);break;case 5:mo(t);default:Cp(a,t),t=ye=Jd(t,Sn),t=Sp(a,t,Sn)}e.memoizedProps=e.pendingProps,t===null?ou(e):ye=t}function ml(e,t,a,r){fn=va=null,mo(t),ll=null,li=0;var c=t.return;try{if(Mx(e,c,t,a,ve)){He=1,Jr(e,Lt(a,e.current)),ye=null;return}}catch(f){if(c!==null)throw ye=c,f;He=1,Jr(e,Lt(a,e.current)),ye=null;return}t.flags&32768?(Se||r===1?e=!0:fl||(ve&536870912)!==0?e=!1:(Kn=e=!0,(r===2||r===9||r===3||r===6)&&(r=At.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pp(t,e)):ou(t)}function ou(e){var t=e;do{if((t.flags&32768)!==0){Pp(t,Kn);return}e=t.return;var a=Dx(t.alternate,t,Sn);if(a!==null){ye=a;return}if(t=t.sibling,t!==null){ye=t;return}ye=t=e}while(t!==null);He===0&&(He=5)}function Pp(e,t){do{var a=kx(e.alternate,e);if(a!==null){a.flags&=32767,ye=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ye=e;return}ye=e=a}while(e!==null);He=6,ye=null}function em(e,t,a,r,c,f,g,S,A){e.cancelPendingCommit=null;do cu();while(Xe!==0);if((Ne&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(f=t.lanes|t.childLanes,f|=Ys,C1(e,a,f,g,S,A),e===Me&&(ye=Me=null,ve=0),hl=t,Zn=e,En=a,Jo=f,Io=c,Gp=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Qx(Mn,function(){return im(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=M.T,M.T=null,c=Q.p,Q.p=2,g=Ne,Ne|=4;try{Ux(e,t,a)}finally{Ne=g,Q.p=c,M.T=r}}Xe=1,tm(),nm(),am()}}function tm(){if(Xe===1){Xe=0;var e=Zn,t=hl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var r=Q.p;Q.p=2;var c=Ne;Ne|=4;try{Dp(t,e);var f=dc,g=Yd(e.containerInfo),S=f.focusedElem,A=f.selectionRange;if(g!==S&&S&&S.ownerDocument&&qd(S.ownerDocument.documentElement,S)){if(A!==null&&ks(S)){var D=A.start,Y=A.end;if(Y===void 0&&(Y=D),"selectionStart"in S)S.selectionStart=D,S.selectionEnd=Math.min(Y,S.value.length);else{var F=S.ownerDocument||document,k=F&&F.defaultView||window;if(k.getSelection){var B=k.getSelection(),le=S.textContent.length,ce=Math.min(A.start,le),_e=A.end===void 0?ce:Math.min(A.end,le);!B.extend&&ce>_e&&(g=_e,_e=ce,ce=g);var _=Hd(S,ce),O=Hd(S,_e);if(_&&O&&(B.rangeCount!==1||B.anchorNode!==_.node||B.anchorOffset!==_.offset||B.focusNode!==O.node||B.focusOffset!==O.offset)){var L=F.createRange();L.setStart(_.node,_.offset),B.removeAllRanges(),ce>_e?(B.addRange(L),B.extend(O.node,O.offset)):(L.setEnd(O.node,O.offset),B.addRange(L))}}}}for(F=[],B=S;B=B.parentNode;)B.nodeType===1&&F.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<F.length;S++){var V=F[S];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Eu=!!fc,dc=fc=null}finally{Ne=c,Q.p=r,M.T=a}}e.current=t,Xe=2}}function nm(){if(Xe===2){Xe=0;var e=Zn,t=hl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var r=Q.p;Q.p=2;var c=Ne;Ne|=4;try{Rp(e,t.alternate,t)}finally{Ne=c,Q.p=r,M.T=a}}Xe=3}}function am(){if(Xe===4||Xe===3){Xe=0,fr();var e=Zn,t=hl,a=En,r=Gp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Xe=5:(Xe=0,hl=Zn=null,lm(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Qn=null),ys(a),t=t.stateNode,St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(ql,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=M.T,c=Q.p,Q.p=2,M.T=null;try{for(var f=e.onRecoverableError,g=0;g<r.length;g++){var S=r[g];f(S.value,{componentStack:S.stack})}}finally{M.T=t,Q.p=c}}(En&3)!==0&&cu(),Wt(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Wo?Si++:(Si=0,Wo=e):Si=0,Ei(0)}}function lm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ni(t)))}function cu(){return tm(),nm(),am(),im()}function im(){if(Xe!==5)return!1;var e=Zn,t=Jo;Jo=0;var a=ys(En),r=M.T,c=Q.p;try{Q.p=32>a?32:a,M.T=null,a=Io,Io=null;var f=Zn,g=En;if(Xe=0,hl=Zn=null,En=0,(Ne&6)!==0)throw Error(u(331));var S=Ne;if(Ne|=4,qp(f.current),Up(f,f.current,g,a),Ne=S,Ei(0,!1),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(ql,f)}catch{}return!0}finally{Q.p=c,M.T=r,lm(e,t)}}function rm(e,t,a){t=Lt(a,t),t=Ro(e.stateNode,t,2),e=Vn(e,t,2),e!==null&&(Vl(e,2),Wt(e))}function we(e,t,a){if(e.tag===3)rm(e,e,a);else for(;t!==null;){if(t.tag===3){rm(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Qn===null||!Qn.has(r))){e=Lt(a,e),a=up(2),r=Vn(t,a,2),r!==null&&(sp(a,r,t,e),Vl(r,2),Wt(r));break}}t=t.return}}function tc(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new qx;var c=new Set;r.set(t,c)}else c=r.get(t),c===void 0&&(c=new Set,r.set(t,c));c.has(a)||(Xo=!0,c.add(a),e=$x.bind(null,e,t,a),t.then(e,e))}function $x(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Me===e&&(ve&a)===a&&(He===4||He===3&&(ve&62914560)===ve&&300>pe()-lu?(Ne&2)===0&&pl(e,0):Qo|=a,dl===ve&&(dl=0)),Wt(e)}function um(e,t){t===0&&(t=td()),e=ga(e,t),e!==null&&(Vl(e,t),Wt(e))}function Kx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),um(e,a)}function Xx(e,t){var a=0;switch(e.tag){case 31:case 13:var r=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(u(314))}r!==null&&r.delete(t),um(e,a)}function Qx(e,t){return Ul(e,t)}var fu=null,gl=null,nc=!1,du=!1,ac=!1,In=0;function Wt(e){e!==gl&&e.next===null&&(gl===null?fu=gl=e:gl=gl.next=e),du=!0,nc||(nc=!0,Jx())}function Ei(e,t){if(!ac&&du){ac=!0;do for(var a=!1,r=fu;r!==null;){if(e!==0){var c=r.pendingLanes;if(c===0)var f=0;else{var g=r.suspendedLanes,S=r.pingedLanes;f=(1<<31-Et(42|e)+1)-1,f&=c&~(g&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,fm(r,f))}else f=ve,f=gr(r,r===Me?f:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(f&3)===0||Yl(r,f)||(a=!0,fm(r,f));r=r.next}while(a);ac=!1}}function Zx(){sm()}function sm(){du=nc=!1;var e=0;In!==0&&rv()&&(e=In);for(var t=pe(),a=null,r=fu;r!==null;){var c=r.next,f=om(r,t);f===0?(r.next=null,a===null?fu=c:a.next=c,c===null&&(gl=a)):(a=r,(e!==0||(f&3)!==0)&&(du=!0)),r=c}Xe!==0&&Xe!==5||Ei(e),In!==0&&(In=0)}function om(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var g=31-Et(f),S=1<<g,A=c[g];A===-1?((S&a)===0||(S&r)!==0)&&(c[g]=E1(S,t)):A<=t&&(e.expiredLanes|=S),f&=~S}if(t=Me,a=ve,a=gr(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,a===0||e===t&&(je===2||je===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Bl(r),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Yl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(r!==null&&Bl(r),ys(a)){case 2:case 8:a=ca;break;case 32:a=Mn;break;case 268435456:a=Hl;break;default:a=Mn}return r=cm.bind(null,e),a=Ul(a,r),e.callbackPriority=t,e.callbackNode=a,t}return r!==null&&r!==null&&Bl(r),e.callbackPriority=2,e.callbackNode=null,2}function cm(e,t){if(Xe!==0&&Xe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(cu()&&e.callbackNode!==a)return null;var r=ve;return r=gr(e,e===Me?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:($p(e,r,t),om(e,pe()),e.callbackNode!=null&&e.callbackNode===a?cm.bind(null,e):null)}function fm(e,t){if(cu())return null;$p(e,t,!0)}function Jx(){sv(function(){(Ne&6)!==0?Ul(oa,Zx):sm()})}function lc(){if(In===0){var e=tl;e===0&&(e=hr,hr<<=1,(hr&261888)===0&&(hr=256)),In=e}return In}function dm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:br(""+e)}function hm(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Ix(e,t,a,r,c){if(t==="submit"&&a&&a.stateNode===c){var f=dm((c[ft]||null).action),g=r.submitter;g&&(t=(t=g[ft]||null)?dm(t.formAction):g.getAttribute("formAction"),t!==null&&(f=t,g=null));var S=new Nr("action","action",null,r,c);e.push({event:S,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(In!==0){var A=g?hm(c,g):new FormData(c);No(a,{pending:!0,data:A,method:c.method,action:f},null,A)}}else typeof f=="function"&&(S.preventDefault(),A=g?hm(c,g):new FormData(c),No(a,{pending:!0,data:A,method:c.method,action:f},f,A))},currentTarget:c}]})}}for(var ic=0;ic<qs.length;ic++){var rc=qs[ic],Wx=rc.toLowerCase(),Px=rc[0].toUpperCase()+rc.slice(1);Ft(Wx,"on"+Px)}Ft(Fd,"onAnimationEnd"),Ft($d,"onAnimationIteration"),Ft(Kd,"onAnimationStart"),Ft("dblclick","onDoubleClick"),Ft("focusin","onFocus"),Ft("focusout","onBlur"),Ft(mx,"onTransitionRun"),Ft(gx,"onTransitionStart"),Ft(yx,"onTransitionCancel"),Ft(Xd,"onTransitionEnd"),Ya("onMouseEnter",["mouseout","mouseover"]),Ya("onMouseLeave",["mouseout","mouseover"]),Ya("onPointerEnter",["pointerout","pointerover"]),Ya("onPointerLeave",["pointerout","pointerover"]),da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),da("onBeforeInput",["compositionend","keypress","textInput","paste"]),da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ci="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(" "),ev=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ci));function pm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var r=e[a],c=r.event;r=r.listeners;e:{var f=void 0;if(t)for(var g=r.length-1;0<=g;g--){var S=r[g],A=S.instance,D=S.currentTarget;if(S=S.listener,A!==f&&c.isPropagationStopped())break e;f=S,c.currentTarget=D;try{f(c)}catch(Y){wr(Y)}c.currentTarget=null,f=A}else for(g=0;g<r.length;g++){if(S=r[g],A=S.instance,D=S.currentTarget,S=S.listener,A!==f&&c.isPropagationStopped())break e;f=S,c.currentTarget=D;try{f(c)}catch(Y){wr(Y)}c.currentTarget=null,f=A}}}}function xe(e,t){var a=t[xs];a===void 0&&(a=t[xs]=new Set);var r=e+"__bubble";a.has(r)||(mm(t,e,2,!1),a.add(r))}function uc(e,t,a){var r=0;t&&(r|=4),mm(a,e,r,t)}var hu="_reactListening"+Math.random().toString(36).slice(2);function sc(e){if(!e[hu]){e[hu]=!0,sd.forEach(function(a){a!=="selectionchange"&&(ev.has(a)||uc(a,!1,e),uc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hu]||(t[hu]=!0,uc("selectionchange",!1,t))}}function mm(e,t,a,r){switch(Fm(t)){case 2:var c=Tv;break;case 8:c=Ov;break;default:c=Cc}a=c.bind(null,t,a,e),c=void 0,!ws||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),r?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function oc(e,t,a,r,c){var f=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var g=r.tag;if(g===3||g===4){var S=r.stateNode.containerInfo;if(S===c)break;if(g===4)for(g=r.return;g!==null;){var A=g.tag;if((A===3||A===4)&&g.stateNode.containerInfo===c)return;g=g.return}for(;S!==null;){if(g=Ba(S),g===null)return;if(A=g.tag,A===5||A===6||A===26||A===27){r=f=g;continue e}S=S.parentNode}}r=r.return}bd(function(){var D=f,Y=As(a),F=[];e:{var k=Qd.get(e);if(k!==void 0){var B=Nr,le=e;switch(e){case"keypress":if(Er(a)===0)break e;case"keydown":case"keyup":B=X1;break;case"focusin":le="focus",B=_s;break;case"focusout":le="blur",B=_s;break;case"beforeblur":case"afterblur":B=_s;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=Cd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=D1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=J1;break;case Fd:case $d:case Kd:B=B1;break;case Xd:B=W1;break;case"scroll":case"scrollend":B=z1;break;case"wheel":B=ex;break;case"copy":case"cut":case"paste":B=q1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Ad;break;case"toggle":case"beforetoggle":B=nx}var ce=(t&4)!==0,_e=!ce&&(e==="scroll"||e==="scrollend"),_=ce?k!==null?k+"Capture":null:k;ce=[];for(var O=D,L;O!==null;){var V=O;if(L=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||L===null||_===null||(V=$l(O,_),V!=null&&ce.push(Ni(O,V,L))),_e)break;O=O.return}0<ce.length&&(k=new B(k,le,null,a,Y),F.push({event:k,listeners:ce}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",k&&a!==Ns&&(le=a.relatedTarget||a.fromElement)&&(Ba(le)||le[Ua]))break e;if((B||k)&&(k=Y.window===Y?Y:(k=Y.ownerDocument)?k.defaultView||k.parentWindow:window,B?(le=a.relatedTarget||a.toElement,B=D,le=le?Ba(le):null,le!==null&&(_e=o(le),ce=le.tag,le!==_e||ce!==5&&ce!==27&&ce!==6)&&(le=null)):(B=null,le=D),B!==le)){if(ce=Cd,V="onMouseLeave",_="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(ce=Ad,V="onPointerLeave",_="onPointerEnter",O="pointer"),_e=B==null?k:Fl(B),L=le==null?k:Fl(le),k=new ce(V,O+"leave",B,a,Y),k.target=_e,k.relatedTarget=L,V=null,Ba(Y)===D&&(ce=new ce(_,O+"enter",le,a,Y),ce.target=L,ce.relatedTarget=_e,V=ce),_e=V,B&&le)t:{for(ce=tv,_=B,O=le,L=0,V=_;V;V=ce(V))L++;V=0;for(var se=O;se;se=ce(se))V++;for(;0<L-V;)_=ce(_),L--;for(;0<V-L;)O=ce(O),V--;for(;L--;){if(_===O||O!==null&&_===O.alternate){ce=_;break t}_=ce(_),O=ce(O)}ce=null}else ce=null;B!==null&&gm(F,k,B,ce,!1),le!==null&&_e!==null&&gm(F,_e,le,ce,!0)}}e:{if(k=D?Fl(D):window,B=k.nodeName&&k.nodeName.toLowerCase(),B==="select"||B==="input"&&k.type==="file")var Ee=zd;else if(_d(k))if(Ld)Ee=dx;else{Ee=cx;var ie=ox}else B=k.nodeName,!B||B.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?D&&Cs(D.elementType)&&(Ee=zd):Ee=fx;if(Ee&&(Ee=Ee(e,D))){Md(F,Ee,a,Y);break e}ie&&ie(e,k,D),e==="focusout"&&D&&k.type==="number"&&D.memoizedProps.value!=null&&Es(k,"number",k.value)}switch(ie=D?Fl(D):window,e){case"focusin":(_d(ie)||ie.contentEditable==="true")&&(Xa=ie,Us=D,Pl=null);break;case"focusout":Pl=Us=Xa=null;break;case"mousedown":Bs=!0;break;case"contextmenu":case"mouseup":case"dragend":Bs=!1,Vd(F,a,Y);break;case"selectionchange":if(px)break;case"keydown":case"keyup":Vd(F,a,Y)}var ge;if(zs)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else Ka?Od(e,a)&&(be="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(be="onCompositionStart");be&&(jd&&a.locale!=="ko"&&(Ka||be!=="onCompositionStart"?be==="onCompositionEnd"&&Ka&&(ge=Sd()):(Dn=Y,Ts="value"in Dn?Dn.value:Dn.textContent,Ka=!0)),ie=pu(D,be),0<ie.length&&(be=new Nd(be,e,null,a,Y),F.push({event:be,listeners:ie}),ge?be.data=ge:(ge=Rd(a),ge!==null&&(be.data=ge)))),(ge=lx?ix(e,a):rx(e,a))&&(be=pu(D,"onBeforeInput"),0<be.length&&(ie=new Nd("onBeforeInput","beforeinput",null,a,Y),F.push({event:ie,listeners:be}),ie.data=ge)),Ix(F,e,D,a,Y)}pm(F,t)})}function Ni(e,t,a){return{instance:e,listener:t,currentTarget:a}}function pu(e,t){for(var a=t+"Capture",r=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=$l(e,a),c!=null&&r.unshift(Ni(e,c,f)),c=$l(e,t),c!=null&&r.push(Ni(e,c,f))),e.tag===3)return r;e=e.return}return[]}function tv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function gm(e,t,a,r,c){for(var f=t._reactName,g=[];a!==null&&a!==r;){var S=a,A=S.alternate,D=S.stateNode;if(S=S.tag,A!==null&&A===r)break;S!==5&&S!==26&&S!==27||D===null||(A=D,c?(D=$l(a,f),D!=null&&g.unshift(Ni(a,D,A))):c||(D=$l(a,f),D!=null&&g.push(Ni(a,D,A)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var nv=/\r\n?/g,av=/\u0000|\uFFFD/g;function ym(e){return(typeof e=="string"?e:""+e).replace(nv,`
33
+ `).replace(av,"")}function xm(e,t){return t=ym(t),ym(e)===t}function Re(e,t,a,r,c,f){switch(a){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Ga(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Ga(e,""+r);break;case"className":xr(e,"class",r);break;case"tabIndex":xr(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":xr(e,a,r);break;case"style":xd(e,r,f);break;case"data":if(t!=="object"){xr(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=br(""+r),e.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(a,"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 f=="function"&&(a==="formAction"?(t!=="input"&&Re(e,t,"name",c.name,c,null),Re(e,t,"formEncType",c.formEncType,c,null),Re(e,t,"formMethod",c.formMethod,c,null),Re(e,t,"formTarget",c.formTarget,c,null)):(Re(e,t,"encType",c.encType,c,null),Re(e,t,"method",c.method,c,null),Re(e,t,"target",c.target,c,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=br(""+r),e.setAttribute(a,r);break;case"onClick":r!=null&&(e.onclick=un);break;case"onScroll":r!=null&&xe("scroll",e);break;case"onScrollEnd":r!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(u(61));if(a=r.__html,a!=null){if(c.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}a=br(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""+r):e.removeAttribute(a);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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":r===!0?e.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,r):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(a,r):e.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(a):e.setAttribute(a,r);break;case"popover":xe("beforetoggle",e),xe("toggle",e),yr(e,"popover",r);break;case"xlinkActuate":rn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":rn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":rn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":rn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":rn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":rn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":rn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":rn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":rn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":yr(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=_1.get(a)||a,yr(e,a,r))}}function cc(e,t,a,r,c,f){switch(a){case"style":xd(e,r,f);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(u(61));if(a=r.__html,a!=null){if(c.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof r=="string"?Ga(e,r):(typeof r=="number"||typeof r=="bigint")&&Ga(e,""+r);break;case"onScroll":r!=null&&xe("scroll",e);break;case"onScrollEnd":r!=null&&xe("scrollend",e);break;case"onClick":r!=null&&(e.onclick=un);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!od.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),f=e[ft]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof r=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,r,c);break e}a in e?e[a]=r:r===!0?e.setAttribute(a,""):yr(e,a,r)}}}function tt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var r=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var g=a[f];if(g!=null)switch(f){case"src":r=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Re(e,t,f,g,a,null)}}c&&Re(e,t,"srcSet",a.srcSet,a,null),r&&Re(e,t,"src",a.src,a,null);return;case"input":xe("invalid",e);var S=f=g=c=null,A=null,D=null;for(r in a)if(a.hasOwnProperty(r)){var Y=a[r];if(Y!=null)switch(r){case"name":c=Y;break;case"type":g=Y;break;case"checked":A=Y;break;case"defaultChecked":D=Y;break;case"value":f=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(u(137,t));break;default:Re(e,t,r,Y,a,null)}}pd(e,f,S,A,D,g,c,!1);return;case"select":xe("invalid",e),r=g=f=null;for(c in a)if(a.hasOwnProperty(c)&&(S=a[c],S!=null))switch(c){case"value":f=S;break;case"defaultValue":g=S;break;case"multiple":r=S;default:Re(e,t,c,S,a,null)}t=f,a=g,e.multiple=!!r,t!=null?Va(e,!!r,t,!1):a!=null&&Va(e,!!r,a,!0);return;case"textarea":xe("invalid",e),f=c=r=null;for(g in a)if(a.hasOwnProperty(g)&&(S=a[g],S!=null))switch(g){case"value":r=S;break;case"defaultValue":c=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(u(91));break;default:Re(e,t,g,S,a,null)}gd(e,r,c,f);return;case"option":for(A in a)if(a.hasOwnProperty(A)&&(r=a[A],r!=null))switch(A){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Re(e,t,A,r,a,null)}return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(r=0;r<Ci.length;r++)xe(Ci[r],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("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(D in a)if(a.hasOwnProperty(D)&&(r=a[D],r!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Re(e,t,D,r,a,null)}return;default:if(Cs(t)){for(Y in a)a.hasOwnProperty(Y)&&(r=a[Y],r!==void 0&&cc(e,t,Y,r,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(r=a[S],r!=null&&Re(e,t,S,r,a,null))}function lv(e,t,a,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,g=null,S=null,A=null,D=null,Y=null;for(B in a){var F=a[B];if(a.hasOwnProperty(B)&&F!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":A=F;default:r.hasOwnProperty(B)||Re(e,t,B,null,r,F)}}for(var k in r){var B=r[k];if(F=a[k],r.hasOwnProperty(k)&&(B!=null||F!=null))switch(k){case"type":f=B;break;case"name":c=B;break;case"checked":D=B;break;case"defaultChecked":Y=B;break;case"value":g=B;break;case"defaultValue":S=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(u(137,t));break;default:B!==F&&Re(e,t,k,B,r,F)}}Ss(e,g,S,A,D,Y,f,c);return;case"select":B=g=S=k=null;for(f in a)if(A=a[f],a.hasOwnProperty(f)&&A!=null)switch(f){case"value":break;case"multiple":B=A;default:r.hasOwnProperty(f)||Re(e,t,f,null,r,A)}for(c in r)if(f=r[c],A=a[c],r.hasOwnProperty(c)&&(f!=null||A!=null))switch(c){case"value":k=f;break;case"defaultValue":S=f;break;case"multiple":g=f;default:f!==A&&Re(e,t,c,f,r,A)}t=S,a=g,r=B,k!=null?Va(e,!!a,k,!1):!!r!=!!a&&(t!=null?Va(e,!!a,t,!0):Va(e,!!a,a?[]:"",!1));return;case"textarea":B=k=null;for(S in a)if(c=a[S],a.hasOwnProperty(S)&&c!=null&&!r.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Re(e,t,S,null,r,c)}for(g in r)if(c=r[g],f=a[g],r.hasOwnProperty(g)&&(c!=null||f!=null))switch(g){case"value":k=c;break;case"defaultValue":B=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(u(91));break;default:c!==f&&Re(e,t,g,c,r,f)}md(e,k,B);return;case"option":for(var le in a)if(k=a[le],a.hasOwnProperty(le)&&k!=null&&!r.hasOwnProperty(le))switch(le){case"selected":e.selected=!1;break;default:Re(e,t,le,null,r,k)}for(A in r)if(k=r[A],B=a[A],r.hasOwnProperty(A)&&k!==B&&(k!=null||B!=null))switch(A){case"selected":e.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:Re(e,t,A,k,r,B)}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 ce in a)k=a[ce],a.hasOwnProperty(ce)&&k!=null&&!r.hasOwnProperty(ce)&&Re(e,t,ce,null,r,k);for(D in r)if(k=r[D],B=a[D],r.hasOwnProperty(D)&&k!==B&&(k!=null||B!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(u(137,t));break;default:Re(e,t,D,k,r,B)}return;default:if(Cs(t)){for(var _e in a)k=a[_e],a.hasOwnProperty(_e)&&k!==void 0&&!r.hasOwnProperty(_e)&&cc(e,t,_e,void 0,r,k);for(Y in r)k=r[Y],B=a[Y],!r.hasOwnProperty(Y)||k===B||k===void 0&&B===void 0||cc(e,t,Y,k,r,B);return}}for(var _ in a)k=a[_],a.hasOwnProperty(_)&&k!=null&&!r.hasOwnProperty(_)&&Re(e,t,_,null,r,k);for(F in r)k=r[F],B=a[F],!r.hasOwnProperty(F)||k===B||k==null&&B==null||Re(e,t,F,k,r,B)}function vm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function iv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var c=a[r],f=c.transferSize,g=c.initiatorType,S=c.duration;if(f&&S&&vm(g)){for(g=0,S=c.responseEnd,r+=1;r<a.length;r++){var A=a[r],D=A.startTime;if(D>S)break;var Y=A.transferSize,F=A.initiatorType;Y&&vm(F)&&(A=A.responseEnd,g+=Y*(A<S?1:(S-D)/(A-D)))}if(--r,t+=8*(f+g)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var fc=null,dc=null;function mu(e){return e.nodeType===9?e:e.ownerDocument}function bm(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 Sm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function hc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var pc=null;function rv(){var e=window.event;return e&&e.type==="popstate"?e===pc?!1:(pc=e,!0):(pc=null,!1)}var Em=typeof setTimeout=="function"?setTimeout:void 0,uv=typeof clearTimeout=="function"?clearTimeout:void 0,Cm=typeof Promise=="function"?Promise:void 0,sv=typeof queueMicrotask=="function"?queueMicrotask:typeof Cm<"u"?function(e){return Cm.resolve(null).then(e).catch(ov)}:Em;function ov(e){setTimeout(function(){throw e})}function Wn(e){return e==="head"}function Nm(e,t){var a=t,r=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(r===0){e.removeChild(c),bl(t);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")Ai(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ai(a);for(var f=a.firstChild;f;){var g=f.nextSibling,S=f.nodeName;f[Gl]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=g}}else a==="body"&&Ai(e.ownerDocument.body);a=c}while(a);bl(t)}function Am(e,t){var a=e;e=0;do{var r=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=r}while(a)}function mc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":mc(a),vs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function cv(e,t,a,r){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Gl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Ht(e.nextSibling),e===null)break}return null}function fv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ht(e.nextSibling),e===null))return null;return e}function jm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ht(e.nextSibling),e===null))return null;return e}function gc(e){return e.data==="$?"||e.data==="$~"}function yc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function dv(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var r=function(){t(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Ht(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var xc=null;function wm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ht(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Tm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Om(e,t,a){switch(t=mu(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Ai(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);vs(e)}var qt=new Map,Rm=new Set;function gu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Cn=Q.d;Q.d={f:hv,r:pv,D:mv,C:gv,L:yv,m:xv,X:bv,S:vv,M:Sv};function hv(){var e=Cn.f(),t=uu();return e||t}function pv(e){var t=Ha(e);t!==null&&t.tag===5&&t.type==="form"?Xh(t):Cn.r(e)}var yl=typeof document>"u"?null:document;function _m(e,t,a){var r=yl;if(r&&typeof t=="string"&&t){var c=Mt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Rm.has(c)||(Rm.add(c),e={rel:e,crossOrigin:a,href:t},r.querySelector(c)===null&&(t=r.createElement("link"),tt(t,"link",e),Ze(t),r.head.appendChild(t)))}}function mv(e){Cn.D(e),_m("dns-prefetch",e,null)}function gv(e,t){Cn.C(e,t),_m("preconnect",e,t)}function yv(e,t,a){Cn.L(e,t,a);var r=yl;if(r&&e&&t){var c='link[rel="preload"][as="'+Mt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Mt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Mt(a.imageSizes)+'"]')):c+='[href="'+Mt(e)+'"]';var f=c;switch(t){case"style":f=xl(e);break;case"script":f=vl(e)}qt.has(f)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),qt.set(f,e),r.querySelector(c)!==null||t==="style"&&r.querySelector(ji(f))||t==="script"&&r.querySelector(wi(f))||(t=r.createElement("link"),tt(t,"link",e),Ze(t),r.head.appendChild(t)))}}function xv(e,t){Cn.m(e,t);var a=yl;if(a&&e){var r=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Mt(r)+'"][href="'+Mt(e)+'"]',f=c;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=vl(e)}if(!qt.has(f)&&(e=x({rel:"modulepreload",href:e},t),qt.set(f,e),a.querySelector(c)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(wi(f)))return}r=a.createElement("link"),tt(r,"link",e),Ze(r),a.head.appendChild(r)}}}function vv(e,t,a){Cn.S(e,t,a);var r=yl;if(r&&e){var c=qa(r).hoistableStyles,f=xl(e);t=t||"default";var g=c.get(f);if(!g){var S={loading:0,preload:null};if(g=r.querySelector(ji(f)))S.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=qt.get(f))&&vc(e,a);var A=g=r.createElement("link");Ze(A),tt(A,"link",e),A._p=new Promise(function(D,Y){A.onload=D,A.onerror=Y}),A.addEventListener("load",function(){S.loading|=1}),A.addEventListener("error",function(){S.loading|=2}),S.loading|=4,yu(g,t,r)}g={type:"stylesheet",instance:g,count:1,state:S},c.set(f,g)}}}function bv(e,t){Cn.X(e,t);var a=yl;if(a&&e){var r=qa(a).hoistableScripts,c=vl(e),f=r.get(c);f||(f=a.querySelector(wi(c)),f||(e=x({src:e,async:!0},t),(t=qt.get(c))&&bc(e,t),f=a.createElement("script"),Ze(f),tt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(c,f))}}function Sv(e,t){Cn.M(e,t);var a=yl;if(a&&e){var r=qa(a).hoistableScripts,c=vl(e),f=r.get(c);f||(f=a.querySelector(wi(c)),f||(e=x({src:e,async:!0,type:"module"},t),(t=qt.get(c))&&bc(e,t),f=a.createElement("script"),Ze(f),tt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(c,f))}}function Mm(e,t,a,r){var c=(c=Ae.current)?gu(c):null;if(!c)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=xl(a.href),a=qa(c).hoistableStyles,r=a.get(t),r||(r={type:"style",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=xl(a.href);var f=qa(c).hoistableStyles,g=f.get(e);if(g||(c=c.ownerDocument||c,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,g),(f=c.querySelector(ji(e)))&&!f._p&&(g.instance=f,g.state.loading=5),qt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},qt.set(e,a),f||Ev(c,e,a,g.state))),t&&r===null)throw Error(u(528,""));return g}if(t&&r!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=vl(a),a=qa(c).hoistableScripts,r=a.get(t),r||(r={type:"script",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function xl(e){return'href="'+Mt(e)+'"'}function ji(e){return'link[rel="stylesheet"]['+e+"]"}function zm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Ev(e,t,a,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),tt(t,"link",a),Ze(t),e.head.appendChild(t))}function vl(e){return'[src="'+Mt(e)+'"]'}function wi(e){return"script[async]"+e}function Lm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Mt(a.href)+'"]');if(r)return t.instance=r,Ze(r),r;var c=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Ze(r),tt(r,"style",c),yu(r,a.precedence,e),t.instance=r;case"stylesheet":c=xl(a.href);var f=e.querySelector(ji(c));if(f)return t.state.loading|=4,t.instance=f,Ze(f),f;r=zm(a),(c=qt.get(c))&&vc(r,c),f=(e.ownerDocument||e).createElement("link"),Ze(f);var g=f;return g._p=new Promise(function(S,A){g.onload=S,g.onerror=A}),tt(f,"link",r),t.state.loading|=4,yu(f,a.precedence,e),t.instance=f;case"script":return f=vl(a.src),(c=e.querySelector(wi(f)))?(t.instance=c,Ze(c),c):(r=a,(c=qt.get(f))&&(r=x({},a),bc(r,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ze(c),tt(c,"link",r),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,yu(r,a.precedence,e));return t.instance}function yu(e,t,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=r.length?r[r.length-1]:null,f=c,g=0;g<r.length;g++){var S=r[g];if(S.dataset.precedence===t)f=S;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xu=null;function Dm(e,t,a){if(xu===null){var r=new Map,c=xu=new Map;c.set(a,r)}else c=xu,r=c.get(a),r||(r=new Map,c.set(a,r));if(r.has(e))return r;for(r.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var f=a[c];if(!(f[Gl]||f[Ie]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var g=f.getAttribute(t)||"";g=e+g;var S=r.get(g);S?S.push(f):r.set(g,[f])}}return r}function km(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Cv(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Um(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Nv(e,t,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=xl(r.href),f=t.querySelector(ji(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=vu.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,Ze(f);return}f=t.ownerDocument||t,r=zm(r),(c=qt.get(c))&&vc(r,c),f=f.createElement("link"),Ze(f);var g=f;g._p=new Promise(function(S,A){g.onload=S,g.onerror=A}),tt(f,"link",r),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=vu.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Sc=0;function Av(e,t){return e.stylesheets&&e.count===0&&Su(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var r=setTimeout(function(){if(e.stylesheets&&Su(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Sc===0&&(Sc=62500*iv());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Su(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Sc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(c)}}:null}function vu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Su(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var bu=null;function Su(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,bu=new Map,t.forEach(jv,e),bu=null,vu.call(e))}function jv(e,t){if(!(t.state.loading&4)){var a=bu.get(e);if(a)var r=a.get(null);else{a=new Map,bu.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var g=c[f];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),r=g)}r&&a.set(null,r)}c=t.instance,g=c.getAttribute("data-precedence"),f=a.get(g)||r,f===r&&a.set(null,c),a.set(g,c),this.count++,r=vu.bind(this),c.addEventListener("load",r),c.addEventListener("error",r),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Ti={$$typeof:z,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function wv(e,t,a,r,c,f,g,S,A){this.tag=1,this.containerInfo=e,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=ms(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ms(0),this.hiddenUpdates=ms(null),this.identifierPrefix=r,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function Bm(e,t,a,r,c,f,g,S,A,D,Y,F){return e=new wv(e,t,a,g,A,D,Y,F,S),t=1,f===!0&&(t|=24),f=Nt(3,null,null,t),e.current=f,f.stateNode=e,t=Ps(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:r,isDehydrated:a,cache:t},ao(f),e}function Hm(e){return e?(e=Ja,e):Ja}function qm(e,t,a,r,c,f){c=Hm(c),r.context===null?r.context=c:r.pendingContext=c,r=Yn(t),r.payload={element:a},f=f===void 0?null:f,f!==null&&(r.callback=f),a=Vn(e,r,t),a!==null&&(yt(a,e,t),ri(a,e,t))}function Ym(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Ec(e,t){Ym(e,t),(e=e.alternate)&&Ym(e,t)}function Vm(e){if(e.tag===13||e.tag===31){var t=ga(e,67108864);t!==null&&yt(t,e,67108864),Ec(e,67108864)}}function Gm(e){if(e.tag===13||e.tag===31){var t=Ot();t=gs(t);var a=ga(e,t);a!==null&&yt(a,e,t),Ec(e,t)}}var Eu=!0;function Tv(e,t,a,r){var c=M.T;M.T=null;var f=Q.p;try{Q.p=2,Cc(e,t,a,r)}finally{Q.p=f,M.T=c}}function Ov(e,t,a,r){var c=M.T;M.T=null;var f=Q.p;try{Q.p=8,Cc(e,t,a,r)}finally{Q.p=f,M.T=c}}function Cc(e,t,a,r){if(Eu){var c=Nc(r);if(c===null)oc(e,t,r,Cu,a),$m(e,r);else if(_v(c,e,t,a,r))r.stopPropagation();else if($m(e,r),t&4&&-1<Rv.indexOf(e)){for(;c!==null;){var f=Ha(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var g=fa(f.pendingLanes);if(g!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var A=1<<31-Et(g);S.entanglements[1]|=A,g&=~A}Wt(f),(Ne&6)===0&&(iu=pe()+500,Ei(0))}}break;case 31:case 13:S=ga(f,2),S!==null&&yt(S,f,2),uu(),Ec(f,2)}if(f=Nc(r),f===null&&oc(e,t,r,Cu,a),f===c)break;c=f}c!==null&&r.stopPropagation()}else oc(e,t,r,null,a)}}function Nc(e){return e=As(e),Ac(e)}var Cu=null;function Ac(e){if(Cu=null,e=Ba(e),e!==null){var t=o(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=h(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Cu=e,null}function Fm(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(ct()){case oa:return 2;case ca:return 8;case Mn:case ps:return 32;case Hl:return 268435456;default:return 32}default:return 32}}var jc=!1,Pn=null,ea=null,ta=null,Oi=new Map,Ri=new Map,na=[],Rv="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 $m(e,t){switch(e){case"focusin":case"focusout":Pn=null;break;case"dragenter":case"dragleave":ea=null;break;case"mouseover":case"mouseout":ta=null;break;case"pointerover":case"pointerout":Oi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ri.delete(t.pointerId)}}function _i(e,t,a,r,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:r,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Ha(t),t!==null&&Vm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function _v(e,t,a,r,c){switch(t){case"focusin":return Pn=_i(Pn,e,t,a,r,c),!0;case"dragenter":return ea=_i(ea,e,t,a,r,c),!0;case"mouseover":return ta=_i(ta,e,t,a,r,c),!0;case"pointerover":var f=c.pointerId;return Oi.set(f,_i(Oi.get(f)||null,e,t,a,r,c)),!0;case"gotpointercapture":return f=c.pointerId,Ri.set(f,_i(Ri.get(f)||null,e,t,a,r,c)),!0}return!1}function Km(e){var t=Ba(e.target);if(t!==null){var a=o(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,rd(e.priority,function(){Gm(a)});return}}else if(t===31){if(t=h(a),t!==null){e.blockedOn=t,rd(e.priority,function(){Gm(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Nu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Nc(e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);Ns=r,a.target.dispatchEvent(r),Ns=null}else return t=Ha(a),t!==null&&Vm(t),e.blockedOn=a,!1;t.shift()}return!0}function Xm(e,t,a){Nu(e)&&a.delete(t)}function Mv(){jc=!1,Pn!==null&&Nu(Pn)&&(Pn=null),ea!==null&&Nu(ea)&&(ea=null),ta!==null&&Nu(ta)&&(ta=null),Oi.forEach(Xm),Ri.forEach(Xm)}function Au(e,t){e.blockedOn===t&&(e.blockedOn=null,jc||(jc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Mv)))}var ju=null;function Qm(e){ju!==e&&(ju=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ju===e&&(ju=null);for(var t=0;t<e.length;t+=3){var a=e[t],r=e[t+1],c=e[t+2];if(typeof r!="function"){if(Ac(r||a)===null)continue;break}var f=Ha(a);f!==null&&(e.splice(t,3),t-=3,No(f,{pending:!0,data:c,method:a.method,action:r},r,c))}}))}function bl(e){function t(A){return Au(A,e)}Pn!==null&&Au(Pn,e),ea!==null&&Au(ea,e),ta!==null&&Au(ta,e),Oi.forEach(t),Ri.forEach(t);for(var a=0;a<na.length;a++){var r=na[a];r.blockedOn===e&&(r.blockedOn=null)}for(;0<na.length&&(a=na[0],a.blockedOn===null);)Km(a),a.blockedOn===null&&na.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var c=a[r],f=a[r+1],g=c[ft]||null;if(typeof f=="function")g||Qm(a);else if(g){var S=null;if(f&&f.hasAttribute("formAction")){if(c=f,g=f[ft]||null)S=g.formAction;else if(Ac(c)!==null)continue}else S=g.action;typeof S=="function"?a[r+1]=S:(a.splice(r,3),r-=3),Qm(a)}}}function Zm(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(g){return c=g})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function wc(e){this._internalRoot=e}wu.prototype.render=wc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,r=Ot();qm(a,r,e,t,null,null)},wu.prototype.unmount=wc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qm(e.current,2,null,e,null,null),uu(),t[Ua]=null}};function wu(e){this._internalRoot=e}wu.prototype.unstable_scheduleHydration=function(e){if(e){var t=id();e={blockedOn:null,target:e,priority:t};for(var a=0;a<na.length&&t!==0&&t<na[a].priority;a++);na.splice(a,0,e),a===0&&Km(e)}};var Jm=l.version;if(Jm!=="19.2.6")throw Error(u(527,Jm,"19.2.6"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=m(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var zv={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tu.isDisabled&&Tu.supportsFiber)try{ql=Tu.inject(zv),St=Tu}catch{}}return zi.createRoot=function(e,t){if(!s(e))throw Error(u(299));var a=!1,r="",c=ap,f=lp,g=ip;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=Bm(e,1,!1,null,null,a,r,null,c,f,g,Zm),e[Ua]=t.current,sc(e),new wc(t)},zi.hydrateRoot=function(e,t,a){if(!s(e))throw Error(u(299));var r=!1,c="",f=ap,g=lp,S=ip,A=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(A=a.formState)),t=Bm(e,1,!0,t,a??null,r,c,A,f,g,S,Zm),t.context=Hm(null),a=t.current,r=Ot(),r=gs(r),c=Yn(r),c.callback=null,Vn(a,c,r),a=r,t.current.lanes=a,Vl(t,a),Wt(t),e[Ua]=t.current,sc(e),new wu(t)},zi.version="19.2.6",zi}var ag;function Zv(){if(ag)return Tc.exports;ag=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Tc.exports=Qv(),Tc.exports}var Jv=Zv();/**
34
+ * react-router v7.15.1
35
+ *
36
+ * Copyright (c) Remix Software Inc.
37
+ *
38
+ * This source code is licensed under the MIT license found in the
39
+ * LICENSE.md file in the root directory of this source tree.
40
+ *
41
+ * @license MIT
42
+ */var lg="popstate";function ig(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function Iv(n={}){function l(u,s){var m;let o=(m=s.state)==null?void 0:m.masked,{pathname:d,search:h,hash:p}=o||u.location;return tf("",{pathname:d,search:h,hash:p},s.state&&s.state.usr||null,s.state&&s.state.key||"default",o?{pathname:u.location.pathname,search:u.location.search,hash:u.location.hash}:void 0)}function i(u,s){return typeof s=="string"?s:Fi(s)}return Pv(l,i,null,n)}function ke(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function nn(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Wv(){return Math.random().toString(36).substring(2,10)}function rg(n,l){return{usr:n.state,key:n.key,idx:l,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function tf(n,l,i=null,u,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?Rl(l):l,state:i,key:l&&l.key||u||Wv(),mask:s}}function Fi({pathname:n="/",search:l="",hash:i=""}){return l&&l!=="?"&&(n+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function Rl(n){let l={};if(n){let i=n.indexOf("#");i>=0&&(l.hash=n.substring(i),n=n.substring(0,i));let u=n.indexOf("?");u>=0&&(l.search=n.substring(u),n=n.substring(0,u)),n&&(l.pathname=n)}return l}function Pv(n,l,i,u={}){let{window:s=document.defaultView,v5Compat:o=!1}=u,d=s.history,h="POP",p=null,m=v();m==null&&(m=0,d.replaceState({...d.state,idx:m},""));function v(){return(d.state||{idx:null}).idx}function x(){h="POP";let j=v(),R=j==null?null:j-m;m=j,p&&p({action:h,location:w.location,delta:R})}function E(j,R){h="PUSH";let T=ig(j)?j:tf(w.location,j,R);m=v()+1;let z=rg(T,m),U=w.createHref(T.mask||T);try{d.pushState(z,"",U)}catch(X){if(X instanceof DOMException&&X.name==="DataCloneError")throw X;s.location.assign(U)}o&&p&&p({action:h,location:w.location,delta:1})}function C(j,R){h="REPLACE";let T=ig(j)?j:tf(w.location,j,R);m=v();let z=rg(T,m),U=w.createHref(T.mask||T);d.replaceState(z,"",U),o&&p&&p({action:h,location:w.location,delta:0})}function N(j){return eb(j)}let w={get action(){return h},get location(){return n(s,d)},listen(j){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(lg,x),p=j,()=>{s.removeEventListener(lg,x),p=null}},createHref(j){return l(s,j)},createURL:N,encodeLocation(j){let R=N(j);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:E,replace:C,go(j){return d.go(j)}};return w}function eb(n,l=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),ke(i,"No window.location.(origin|href) available to create URL");let u=typeof n=="string"?n:Fi(n);return u=u.replace(/ $/,"%20"),!l&&u.startsWith("//")&&(u=i+u),new URL(u,i)}function y0(n,l,i="/"){return tb(n,l,i,!1)}function tb(n,l,i,u,s){let o=typeof l=="string"?Rl(l):l,d=wn(o.pathname||"/",i);if(d==null)return null;let h=nb(n),p=null,m=pb(d);for(let v=0;p==null&&v<h.length;++v)p=db(h[v],m,u);return p}function nb(n){let l=x0(n);return ab(l),l}function x0(n,l=[],i=[],u="",s=!1){let o=(d,h,p=s,m)=>{let v={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:h,route:d};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(u)&&p)return;ke(v.relativePath.startsWith(u),`Absolute route path "${v.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(u.length)}let x=Xt([u,v.relativePath]),E=i.concat(v);d.children&&d.children.length>0&&(ke(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),x0(d.children,l,E,x,p)),!(d.path==null&&!d.index)&&l.push({path:x,score:cb(x,d.index),routesMeta:E})};return n.forEach((d,h)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))o(d,h);else for(let m of v0(d.path))o(d,h,!0,m)}),l}function v0(n){let l=n.split("/");if(l.length===0)return[];let[i,...u]=l,s=i.endsWith("?"),o=i.replace(/\?$/,"");if(u.length===0)return s?[o,""]:[o];let d=v0(u.join("/")),h=[];return h.push(...d.map(p=>p===""?o:[o,p].join("/"))),s&&h.push(...d),h.map(p=>n.startsWith("/")&&p===""?"/":p)}function ab(n){n.sort((l,i)=>l.score!==i.score?i.score-l.score:fb(l.routesMeta.map(u=>u.childrenIndex),i.routesMeta.map(u=>u.childrenIndex)))}var lb=/^:[\w-]+$/,ib=3,rb=2,ub=1,sb=10,ob=-2,ug=n=>n==="*";function cb(n,l){let i=n.split("/"),u=i.length;return i.some(ug)&&(u+=ob),l&&(u+=rb),i.filter(s=>!ug(s)).reduce((s,o)=>s+(lb.test(o)?ib:o===""?ub:sb),u)}function fb(n,l){return n.length===l.length&&n.slice(0,-1).every((u,s)=>u===l[s])?n[n.length-1]-l[l.length-1]:0}function db(n,l,i=!1){let{routesMeta:u}=n,s={},o="/",d=[];for(let h=0;h<u.length;++h){let p=u[h],m=h===u.length-1,v=o==="/"?l:l.slice(o.length)||"/",x=Fu({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},v),E=p.route;if(!x&&m&&i&&!u[u.length-1].route.index&&(x=Fu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},v)),!x)return null;Object.assign(s,x.params),d.push({params:s,pathname:Xt([o,x.pathname]),pathnameBase:xb(Xt([o,x.pathnameBase])),route:E}),x.pathnameBase!=="/"&&(o=Xt([o,x.pathnameBase]))}return d}function Fu(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,u]=hb(n.path,n.caseSensitive,n.end),s=l.match(i);if(!s)return null;let o=s[0],d=o.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:u.reduce((m,{paramName:v,isOptional:x},E)=>{if(v==="*"){let N=h[E]||"";d=o.slice(0,o.length-N.length).replace(/(.)\/+$/,"$1")}const C=h[E];return x&&!C?m[v]=void 0:m[v]=(C||"").replace(/%2F/g,"/"),m},{}),pathname:o,pathnameBase:d,pattern:n}}function hb(n,l=!1,i=!0){nn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let u=[],s="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,p,m,v)=>{if(u.push({paramName:h,isOptional:p!=null}),p){let x=v.charAt(m+d.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(u.push({paramName:"*"}),s+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?s+="\\/*$":n!==""&&n!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,l?void 0:"i"),u]}function pb(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return nn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),n}}function wn(n,l){if(l==="/")return n;if(!n.toLowerCase().startsWith(l.toLowerCase()))return null;let i=l.endsWith("/")?l.length-1:l.length,u=n.charAt(i);return u&&u!=="/"?null:n.slice(i)||"/"}var mb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function gb(n,l="/"){let{pathname:i,search:u="",hash:s=""}=typeof n=="string"?Rl(n):n,o;return i?(i=S0(i),i.startsWith("/")?o=sg(i.substring(1),"/"):o=sg(i,l)):o=l,{pathname:o,search:vb(u),hash:bb(s)}}function sg(n,l){let i=$u(l).split("/");return n.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function Mc(n,l,i,u){return`Cannot include a '${n}' character in a manually specified \`to.${l}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function yb(n){return n.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function b0(n){let l=yb(n);return l.map((i,u)=>u===l.length-1?i.pathname:i.pathnameBase)}function jf(n,l,i,u=!1){let s;typeof n=="string"?s=Rl(n):(s={...n},ke(!s.pathname||!s.pathname.includes("?"),Mc("?","pathname","search",s)),ke(!s.pathname||!s.pathname.includes("#"),Mc("#","pathname","hash",s)),ke(!s.search||!s.search.includes("#"),Mc("#","search","hash",s)));let o=n===""||s.pathname==="",d=o?"/":s.pathname,h;if(d==null)h=i;else{let x=l.length-1;if(!u&&d.startsWith("..")){let E=d.split("/");for(;E[0]==="..";)E.shift(),x-=1;s.pathname=E.join("/")}h=x>=0?l[x]:"/"}let p=gb(s,h),m=d&&d!=="/"&&d.endsWith("/"),v=(o||d===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(m||v)&&(p.pathname+="/"),p}var S0=n=>n.replace(/\/\/+/g,"/"),Xt=n=>S0(n.join("/")),$u=n=>n.replace(/\/+$/,""),xb=n=>$u(n).replace(/^\/*/,"/"),vb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,bb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Sb=class{constructor(n,l,i,u=!1){this.status=n,this.statusText=l||"",this.internal=u,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Eb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Cb(n){let l=n.map(i=>i.route.path).filter(Boolean);return Xt(l)||"/"}var E0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function C0(n,l){let i=n;if(typeof i!="string"||!mb.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let u=i,s=!1;if(E0)try{let o=new URL(window.location.href),d=i.startsWith("//")?new URL(o.protocol+i):new URL(i),h=wn(d.pathname,l);d.origin===o.origin&&h!=null?i=h+d.search+d.hash:s=!0}catch{nn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:s,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var N0=["POST","PUT","PATCH","DELETE"];new Set(N0);var Nb=["GET",...N0];new Set(Nb);var _l=b.createContext(null);_l.displayName="DataRouter";var os=b.createContext(null);os.displayName="DataRouterState";var A0=b.createContext(!1);function Ab(){return b.useContext(A0)}var j0=b.createContext({isTransitioning:!1});j0.displayName="ViewTransition";var jb=b.createContext(new Map);jb.displayName="Fetchers";var wb=b.createContext(null);wb.displayName="Await";var Vt=b.createContext(null);Vt.displayName="Navigation";var er=b.createContext(null);er.displayName="Location";var Qt=b.createContext({outlet:null,matches:[],isDataRoute:!1});Qt.displayName="Route";var wf=b.createContext(null);wf.displayName="RouteError";var w0="REACT_ROUTER_ERROR",Tb="REDIRECT",Ob="ROUTE_ERROR_RESPONSE";function Rb(n){if(n.startsWith(`${w0}:${Tb}:{`))try{let l=JSON.parse(n.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function _b(n){if(n.startsWith(`${w0}:${Ob}:{`))try{let l=JSON.parse(n.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new Sb(l.status,l.statusText,l.data)}catch{}}function Mb(n,{relative:l}={}){ke(tr(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:u}=b.useContext(Vt),{hash:s,pathname:o,search:d}=ar(n,{relative:l}),h=o;return i!=="/"&&(h=o==="/"?i:Xt([i,o])),u.createHref({pathname:h,search:d,hash:s})}function tr(){return b.useContext(er)!=null}function an(){return ke(tr(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(er).location}var T0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function O0(n){b.useContext(Vt).static||b.useLayoutEffect(n)}function nr(){let{isDataRoute:n}=b.useContext(Qt);return n?Qb():zb()}function zb(){ke(tr(),"useNavigate() may be used only in the context of a <Router> component.");let n=b.useContext(_l),{basename:l,navigator:i}=b.useContext(Vt),{matches:u}=b.useContext(Qt),{pathname:s}=an(),o=JSON.stringify(b0(u)),d=b.useRef(!1);return O0(()=>{d.current=!0}),b.useCallback((p,m={})=>{if(nn(d.current,T0),!d.current)return;if(typeof p=="number"){i.go(p);return}let v=jf(p,JSON.parse(o),s,m.relative==="path");n==null&&l!=="/"&&(v.pathname=v.pathname==="/"?l:Xt([l,v.pathname])),(m.replace?i.replace:i.push)(v,m.state,m)},[l,i,o,s,n])}var Lb=b.createContext(null);function Db(n){let l=b.useContext(Qt).outlet;return b.useMemo(()=>l&&b.createElement(Lb.Provider,{value:n},l),[l,n])}function kb(){let{matches:n}=b.useContext(Qt),l=n[n.length-1];return(l==null?void 0:l.params)??{}}function ar(n,{relative:l}={}){let{matches:i}=b.useContext(Qt),{pathname:u}=an(),s=JSON.stringify(b0(i));return b.useMemo(()=>jf(n,JSON.parse(s),u,l==="path"),[n,s,u,l])}function Ub(n,l){return R0(n,l)}function R0(n,l,i){var j;ke(tr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=b.useContext(Vt),{matches:s}=b.useContext(Qt),o=s[s.length-1],d=o?o.params:{},h=o?o.pathname:"/",p=o?o.pathnameBase:"/",m=o&&o.route;{let R=m&&m.path||"";M0(h,!m||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${R}">) 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.
43
+
44
+ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let v=an(),x;if(l){let R=typeof l=="string"?Rl(l):l;ke(p==="/"||((j=R.pathname)==null?void 0:j.startsWith(p)),`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 "${p}" but pathname "${R.pathname}" was given in the \`location\` prop.`),x=R}else x=v;let E=x.pathname||"/",C=E;if(p!=="/"){let R=p.replace(/^\//,"").split("/");C="/"+E.replace(/^\//,"").split("/").slice(R.length).join("/")}let N=i&&i.state.matches.length?i.state.matches.map(R=>Object.assign(R,{route:i.manifest[R.route.id]||R.route})):y0(n,{pathname:C});nn(m||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),nn(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.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 w=Vb(N&&N.map(R=>Object.assign({},R,{params:Object.assign({},d,R.params),pathname:Xt([p,u.encodeLocation?u.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?p:Xt([p,u.encodeLocation?u.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),s,i);return l&&w?b.createElement(er.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},w):w}function Bb(){let n=Xb(),l=Eb(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,u="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:u},o={padding:"2px 4px",backgroundColor:u},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:o},"ErrorBoundary")," or"," ",b.createElement("code",{style:o},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},l),i?b.createElement("pre",{style:s},i):null,d)}var Hb=b.createElement(Bb,null),_0=class extends b.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,l){return l.location!==n.location||l.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:l.error,location:l.location,revalidation:n.revalidation||l.revalidation}}componentDidCatch(n,l){this.props.onError?this.props.onError(n,l):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=_b(n.digest);i&&(n=i)}let l=n!==void 0?b.createElement(Qt.Provider,{value:this.props.routeContext},b.createElement(wf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?b.createElement(qb,{error:n},l):l}};_0.contextType=A0;var zc=new WeakMap;function qb({children:n,error:l}){let{basename:i}=b.useContext(Vt);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let u=Rb(l.digest);if(u){let s=zc.get(l);if(s)throw s;let o=C0(u.location,i);if(E0&&!zc.get(l))if(o.isExternal||u.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:u.replace}));throw zc.set(l,d),d}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return n}function Yb({routeContext:n,match:l,children:i}){let u=b.useContext(_l);return u&&u.static&&u.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=l.route.id),b.createElement(Qt.Provider,{value:n},i)}function Vb(n,l=[],i){let u=i==null?void 0:i.state;if(n==null){if(!u)return null;if(u.errors)n=u.matches;else if(l.length===0&&!u.initialized&&u.matches.length>0)n=u.matches;else return null}let s=n,o=u==null?void 0:u.errors;if(o!=null){let v=s.findIndex(x=>x.route.id&&(o==null?void 0:o[x.route.id])!==void 0);ke(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,v+1))}let d=!1,h=-1;if(i&&u){d=u.renderFallback;for(let v=0;v<s.length;v++){let x=s[v];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(h=v),x.route.id){let{loaderData:E,errors:C}=u,N=x.route.loader&&!E.hasOwnProperty(x.route.id)&&(!C||C[x.route.id]===void 0);if(x.route.lazy||N){i.isStatic&&(d=!0),h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}}let p=i==null?void 0:i.onError,m=u&&p?(v,x)=>{var E,C;p(v,{location:u.location,params:((C=(E=u.matches)==null?void 0:E[0])==null?void 0:C.params)??{},pattern:Cb(u.matches),errorInfo:x})}:void 0;return s.reduceRight((v,x,E)=>{let C,N=!1,w=null,j=null;u&&(C=o&&x.route.id?o[x.route.id]:void 0,w=x.route.errorElement||Hb,d&&(h<0&&E===0?(M0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,j=null):h===E&&(N=!0,j=x.route.hydrateFallbackElement||null)));let R=l.concat(s.slice(0,E+1)),T=()=>{let z;return C?z=w:N?z=j:x.route.Component?z=b.createElement(x.route.Component,null):x.route.element?z=x.route.element:z=v,b.createElement(Yb,{match:x,routeContext:{outlet:v,matches:R,isDataRoute:u!=null},children:z})};return u&&(x.route.ErrorBoundary||x.route.errorElement||E===0)?b.createElement(_0,{location:u.location,revalidation:u.revalidation,component:w,error:C,children:T(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:m}):T()},null)}function Tf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gb(n){let l=b.useContext(_l);return ke(l,Tf(n)),l}function Fb(n){let l=b.useContext(os);return ke(l,Tf(n)),l}function $b(n){let l=b.useContext(Qt);return ke(l,Tf(n)),l}function Of(n){let l=$b(n),i=l.matches[l.matches.length-1];return ke(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function Kb(){return Of("useRouteId")}function Xb(){var u;let n=b.useContext(wf),l=Fb("useRouteError"),i=Of("useRouteError");return n!==void 0?n:(u=l.errors)==null?void 0:u[i]}function Qb(){let{router:n}=Gb("useNavigate"),l=Of("useNavigate"),i=b.useRef(!1);return O0(()=>{i.current=!0}),b.useCallback(async(s,o={})=>{nn(i.current,T0),i.current&&(typeof s=="number"?await n.navigate(s):await n.navigate(s,{fromRouteId:l,...o}))},[n,l])}var og={};function M0(n,l,i){!l&&!og[n]&&(og[n]=!0,nn(!1,i))}b.memo(Zb);function Zb({routes:n,manifest:l,future:i,state:u,isStatic:s,onError:o}){return R0(n,void 0,{manifest:l,state:u,isStatic:s,onError:o})}function Jb(n){return Db(n.context)}function ki(n){ke(!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 Ib({basename:n="/",children:l=null,location:i,navigationType:u="POP",navigator:s,static:o=!1,useTransitions:d}){ke(!tr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=n.replace(/^\/*/,"/"),p=b.useMemo(()=>({basename:h,navigator:s,static:o,useTransitions:d,future:{}}),[h,s,o,d]);typeof i=="string"&&(i=Rl(i));let{pathname:m="/",search:v="",hash:x="",state:E=null,key:C="default",mask:N}=i,w=b.useMemo(()=>{let j=wn(m,h);return j==null?null:{location:{pathname:j,search:v,hash:x,state:E,key:C,mask:N},navigationType:u}},[h,m,v,x,E,C,u,N]);return nn(w!=null,`<Router basename="${h}"> is not able to match the URL "${m}${v}${x}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:b.createElement(Vt.Provider,{value:p},b.createElement(er.Provider,{children:l,value:w}))}function Wb({children:n,location:l}){return Ub(nf(n),l)}function nf(n,l=[]){let i=[];return b.Children.forEach(n,(u,s)=>{if(!b.isValidElement(u))return;let o=[...l,s];if(u.type===b.Fragment){i.push.apply(i,nf(u.props.children,o));return}ke(u.type===ki,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ke(!u.props.index||!u.props.children,"An index route cannot have child routes.");let d={id:u.props.id||o.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(d.children=nf(u.props.children,o)),i.push(d)}),i}var Uu="get",Bu="application/x-www-form-urlencoded";function cs(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Pb(n){return cs(n)&&n.tagName.toLowerCase()==="button"}function e2(n){return cs(n)&&n.tagName.toLowerCase()==="form"}function t2(n){return cs(n)&&n.tagName.toLowerCase()==="input"}function n2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function a2(n,l){return n.button===0&&(!l||l==="_self")&&!n2(n)}var Mu=null;function l2(){if(Mu===null)try{new FormData(document.createElement("form"),0),Mu=!1}catch{Mu=!0}return Mu}var i2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lc(n){return n!=null&&!i2.has(n)?(nn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Bu}"`),null):n}function r2(n,l){let i,u,s,o,d;if(e2(n)){let h=n.getAttribute("action");u=h?wn(h,l):null,i=n.getAttribute("method")||Uu,s=Lc(n.getAttribute("enctype"))||Bu,o=new FormData(n)}else if(Pb(n)||t2(n)&&(n.type==="submit"||n.type==="image")){let h=n.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||h.getAttribute("action");if(u=p?wn(p,l):null,i=n.getAttribute("formmethod")||h.getAttribute("method")||Uu,s=Lc(n.getAttribute("formenctype"))||Lc(h.getAttribute("enctype"))||Bu,o=new FormData(h,n),!l2()){let{name:m,type:v,value:x}=n;if(v==="image"){let E=m?`${m}.`:"";o.append(`${E}x`,"0"),o.append(`${E}y`,"0")}else m&&o.append(m,x)}}else{if(cs(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Uu,u=null,s=Bu,d=n}return o&&s==="text/plain"&&(d=o,o=void 0),{action:u,method:i.toLowerCase(),encType:s,formData:o,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Rf(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function z0(n,l,i,u){let s=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${u}`:s.pathname=`${s.pathname}.${u}`:s.pathname==="/"?s.pathname=`_root.${u}`:l&&wn(s.pathname,l)==="/"?s.pathname=`${$u(l)}/_root.${u}`:s.pathname=`${$u(s.pathname)}.${u}`,s}async function u2(n,l){if(n.id in l)return l[n.id];try{let i=await import(n.module);return l[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function s2(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function o2(n,l,i){let u=await Promise.all(n.map(async s=>{let o=l.routes[s.route.id];if(o){let d=await u2(o,i);return d.links?d.links():[]}return[]}));return h2(u.flat(1).filter(s2).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function cg(n,l,i,u,s,o){let d=(p,m)=>i[m]?p.route.id!==i[m].route.id:!0,h=(p,m)=>{var v;return i[m].pathname!==p.pathname||((v=i[m].route.path)==null?void 0:v.endsWith("*"))&&i[m].params["*"]!==p.params["*"]};return o==="assets"?l.filter((p,m)=>d(p,m)||h(p,m)):o==="data"?l.filter((p,m)=>{var x;let v=u.routes[p.route.id];if(!v||!v.hasLoader)return!1;if(d(p,m)||h(p,m))return!0;if(p.route.shouldRevalidate){let E=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((x=i[0])==null?void 0:x.params)||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof E=="boolean")return E}return!0}):[]}function c2(n,l,{includeHydrateFallback:i}={}){return f2(n.map(u=>{let s=l.routes[u.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),i&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function f2(n){return[...new Set(n)]}function d2(n){let l={},i=Object.keys(n).sort();for(let u of i)l[u]=n[u];return l}function h2(n,l){let i=new Set;return new Set(l),n.reduce((u,s)=>{let o=JSON.stringify(d2(s));return i.has(o)||(i.add(o),u.push({key:o,link:s})),u},[])}function _f(){let n=b.useContext(_l);return Rf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function p2(){let n=b.useContext(os);return Rf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Mf=b.createContext(void 0);Mf.displayName="FrameworkContext";function zf(){let n=b.useContext(Mf);return Rf(n,"You must render this element inside a <HydratedRouter> element"),n}function m2(n,l){let i=b.useContext(Mf),[u,s]=b.useState(!1),[o,d]=b.useState(!1),{onFocus:h,onBlur:p,onMouseEnter:m,onMouseLeave:v,onTouchStart:x}=l,E=b.useRef(null);b.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let w=R=>{R.forEach(T=>{d(T.isIntersecting)})},j=new IntersectionObserver(w,{threshold:.5});return E.current&&j.observe(E.current),()=>{j.disconnect()}}},[n]),b.useEffect(()=>{if(u){let w=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(w)}}},[u]);let C=()=>{s(!0)},N=()=>{s(!1),d(!1)};return i?n!=="intent"?[o,E,{}]:[o,E,{onFocus:Li(h,C),onBlur:Li(p,N),onMouseEnter:Li(m,C),onMouseLeave:Li(v,N),onTouchStart:Li(x,C)}]:[!1,E,{}]}function Li(n,l){return i=>{n&&n(i),i.defaultPrevented||l(i)}}function g2({page:n,...l}){let i=Ab(),{router:u}=_f(),s=b.useMemo(()=>y0(u.routes,n,u.basename),[u.routes,n,u.basename]);return s?i?b.createElement(x2,{page:n,matches:s,...l}):b.createElement(v2,{page:n,matches:s,...l}):null}function y2(n){let{manifest:l,routeModules:i}=zf(),[u,s]=b.useState([]);return b.useEffect(()=>{let o=!1;return o2(n,l,i).then(d=>{o||s(d)}),()=>{o=!0}},[n,l,i]),u}function x2({page:n,matches:l,...i}){let u=an(),{future:s}=zf(),{basename:o}=_f(),d=b.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let h=z0(n,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),p=!1,m=[];for(let v of l)typeof v.route.shouldRevalidate=="function"?p=!0:m.push(v.route.id);return p&&m.length>0&&h.searchParams.set("_routes",m.join(",")),[h.pathname+h.search]},[o,s.unstable_trailingSlashAwareDataRequests,n,u,l]);return b.createElement(b.Fragment,null,d.map(h=>b.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...i})))}function v2({page:n,matches:l,...i}){let u=an(),{future:s,manifest:o,routeModules:d}=zf(),{basename:h}=_f(),{loaderData:p,matches:m}=p2(),v=b.useMemo(()=>cg(n,l,m,o,u,"data"),[n,l,m,o,u]),x=b.useMemo(()=>cg(n,l,m,o,u,"assets"),[n,l,m,o,u]),E=b.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let w=new Set,j=!1;if(l.forEach(T=>{var U;let z=o.routes[T.route.id];!z||!z.hasLoader||(!v.some(X=>X.route.id===T.route.id)&&T.route.id in p&&((U=d[T.route.id])!=null&&U.shouldRevalidate)||z.hasClientLoader?j=!0:w.add(T.route.id))}),w.size===0)return[];let R=z0(n,h,s.unstable_trailingSlashAwareDataRequests,"data");return j&&w.size>0&&R.searchParams.set("_routes",l.filter(T=>w.has(T.route.id)).map(T=>T.route.id).join(",")),[R.pathname+R.search]},[h,s.unstable_trailingSlashAwareDataRequests,p,u,o,v,l,n,d]),C=b.useMemo(()=>c2(x,o),[x,o]),N=y2(x);return b.createElement(b.Fragment,null,E.map(w=>b.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...i})),C.map(w=>b.createElement("link",{key:w,rel:"modulepreload",href:w,...i})),N.map(({key:w,link:j})=>b.createElement("link",{key:w,nonce:i.nonce,...j,crossOrigin:j.crossOrigin??i.crossOrigin})))}function b2(...n){return l=>{n.forEach(i=>{typeof i=="function"?i(l):i!=null&&(i.current=l)})}}var S2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{S2&&(window.__reactRouterVersion="7.15.1")}catch{}function E2({basename:n,children:l,useTransitions:i,window:u}){let s=b.useRef();s.current==null&&(s.current=Iv({window:u,v5Compat:!0}));let o=s.current,[d,h]=b.useState({action:o.action,location:o.location}),p=b.useCallback(m=>{i===!1?h(m):b.startTransition(()=>h(m))},[i]);return b.useLayoutEffect(()=>o.listen(p),[o,p]),b.createElement(Ib,{basename:n,children:l,location:d.location,navigationType:d.action,navigator:o,useTransitions:i})}var L0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,D0=b.forwardRef(function({onClick:l,discover:i="render",prefetch:u="none",relative:s,reloadDocument:o,replace:d,mask:h,state:p,target:m,to:v,preventScrollReset:x,viewTransition:E,defaultShouldRevalidate:C,...N},w){let{basename:j,navigator:R,useTransitions:T}=b.useContext(Vt),z=typeof v=="string"&&L0.test(v),U=C0(v,j);v=U.to;let X=Mb(v,{relative:s}),J=an(),G=null;if(h){let re=jf(h,[],J.mask?J.mask.pathname:"/",!0);j!=="/"&&(re.pathname=re.pathname==="/"?j:Xt([j,re.pathname])),G=R.createHref(re)}let[K,q,I]=m2(u,N),oe=j2(v,{replace:d,mask:h,state:p,target:m,preventScrollReset:x,relative:s,viewTransition:E,defaultShouldRevalidate:C,useTransitions:T});function ee(re){l&&l(re),re.defaultPrevented||oe(re)}let ae=!(U.isExternal||o),te=b.createElement("a",{...N,...I,href:(ae?G:void 0)||U.absoluteURL||X,onClick:ae?ee:l,ref:b2(w,q),target:m,"data-discover":!z&&i==="render"?"true":void 0});return K&&!z?b.createElement(b.Fragment,null,te,b.createElement(g2,{page:X})):te});D0.displayName="Link";var C2=b.forwardRef(function({"aria-current":l="page",caseSensitive:i=!1,className:u="",end:s=!1,style:o,to:d,viewTransition:h,children:p,...m},v){let x=ar(d,{relative:m.relative}),E=an(),C=b.useContext(os),{navigator:N,basename:w}=b.useContext(Vt),j=C!=null&&_2(x)&&h===!0,R=N.encodeLocation?N.encodeLocation(x).pathname:x.pathname,T=E.pathname,z=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;i||(T=T.toLowerCase(),z=z?z.toLowerCase():null,R=R.toLowerCase()),z&&w&&(z=wn(z,w)||z);const U=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let X=T===R||!s&&T.startsWith(R)&&T.charAt(U)==="/",J=z!=null&&(z===R||!s&&z.startsWith(R)&&z.charAt(R.length)==="/"),G={isActive:X,isPending:J,isTransitioning:j},K=X?l:void 0,q;typeof u=="function"?q=u(G):q=[u,X?"active":null,J?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let I=typeof o=="function"?o(G):o;return b.createElement(D0,{...m,"aria-current":K,className:q,ref:v,style:I,to:d,viewTransition:h},typeof p=="function"?p(G):p)});C2.displayName="NavLink";var N2=b.forwardRef(({discover:n="render",fetcherKey:l,navigate:i,reloadDocument:u,replace:s,state:o,method:d=Uu,action:h,onSubmit:p,relative:m,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:E,...C},N)=>{let{useTransitions:w}=b.useContext(Vt),j=O2(),R=R2(h,{relative:m}),T=d.toLowerCase()==="get"?"get":"post",z=typeof h=="string"&&L0.test(h),U=X=>{if(p&&p(X),X.defaultPrevented)return;X.preventDefault();let J=X.nativeEvent.submitter,G=(J==null?void 0:J.getAttribute("formmethod"))||d,K=()=>j(J||X.currentTarget,{fetcherKey:l,method:G,navigate:i,replace:s,state:o,relative:m,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:E});w&&i!==!1?b.startTransition(()=>K()):K()};return b.createElement("form",{ref:N,method:T,action:R,onSubmit:u?p:U,...C,"data-discover":!z&&n==="render"?"true":void 0})});N2.displayName="Form";function A2(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function k0(n){let l=b.useContext(_l);return ke(l,A2(n)),l}function j2(n,{target:l,replace:i,mask:u,state:s,preventScrollReset:o,relative:d,viewTransition:h,defaultShouldRevalidate:p,useTransitions:m}={}){let v=nr(),x=an(),E=ar(n,{relative:d});return b.useCallback(C=>{if(a2(C,l)){C.preventDefault();let N=i!==void 0?i:Fi(x)===Fi(E),w=()=>v(n,{replace:N,mask:u,state:s,preventScrollReset:o,relative:d,viewTransition:h,defaultShouldRevalidate:p});m?b.startTransition(()=>w()):w()}},[x,v,E,i,u,s,l,n,o,d,h,p,m])}var w2=0,T2=()=>`__${String(++w2)}__`;function O2(){let{router:n}=k0("useSubmit"),{basename:l}=b.useContext(Vt),i=Kb(),u=n.fetch,s=n.navigate;return b.useCallback(async(o,d={})=>{let{action:h,method:p,encType:m,formData:v,body:x}=r2(o,l);if(d.navigate===!1){let E=d.fetcherKey||T2();await u(E,i,d.action||h,{defaultShouldRevalidate:d.defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:v,body:x,formMethod:d.method||p,formEncType:d.encType||m,flushSync:d.flushSync})}else await s(d.action||h,{defaultShouldRevalidate:d.defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:v,body:x,formMethod:d.method||p,formEncType:d.encType||m,replace:d.replace,state:d.state,fromRouteId:i,flushSync:d.flushSync,viewTransition:d.viewTransition})},[u,s,l,i])}function R2(n,{relative:l}={}){let{basename:i}=b.useContext(Vt),u=b.useContext(Qt);ke(u,"useFormAction must be used inside a RouteContext");let[s]=u.matches.slice(-1),o={...ar(n||".",{relative:l})},d=an();if(n==null){o.search=d.search;let h=new URLSearchParams(o.search),p=h.getAll("index");if(p.some(v=>v==="")){h.delete("index"),p.filter(x=>x).forEach(x=>h.append("index",x));let v=h.toString();o.search=v?`?${v}`:""}}return(!n||n===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(o.pathname=o.pathname==="/"?i:Xt([i,o.pathname])),Fi(o)}function _2(n,{relative:l}={}){let i=b.useContext(j0);ke(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=k0("useViewTransitionState"),s=ar(n,{relative:l});if(!i.isTransitioning)return!1;let o=wn(i.currentLocation.pathname,u)||i.currentLocation.pathname,d=wn(i.nextLocation.pathname,u)||i.nextLocation.pathname;return Fu(s.pathname,d)!=null||Fu(s.pathname,o)!=null}function M2(){b.useEffect(()=>{const n=window.visualViewport;if(!n)return;const l=document.documentElement;function i(){if(!n)return;window.innerHeight-n.height>1?(l.style.setProperty("--app-viewport-height",`${n.height}px`),window.scrollY>0&&window.scrollTo(0,0)):l.style.removeProperty("--app-viewport-height")}return n.addEventListener("resize",i),n.addEventListener("scroll",i),()=>{n.removeEventListener("resize",i),n.removeEventListener("scroll",i),l.style.removeProperty("--app-viewport-height")}},[])}const Lf="paimon:accessToken";function U0(){return localStorage.getItem(Lf)}function z2(n){localStorage.setItem(Lf,n)}function B0(){localStorage.removeItem(Lf)}function L2(){const[n,l]=b.useState(U0()),[i,u]=b.useState(!1),s=b.useCallback(d=>{u(!1),l(d)},[]),o=b.useCallback(()=>{B0(),l(null),u(!0)},[]);return{authToken:n,authError:i,handleLogin:s,handleAuthError:o}}const fg=n=>{let l;const i=new Set,u=(m,v)=>{const x=typeof m=="function"?m(l):m;if(!Object.is(x,l)){const E=l;l=v??(typeof x!="object"||x===null)?x:Object.assign({},l,x),i.forEach(C=>C(l,E))}},s=()=>l,h={setState:u,getState:s,getInitialState:()=>p,subscribe:m=>(i.add(m),()=>i.delete(m))},p=l=n(u,s,h);return h},D2=(n=>n?fg(n):fg),k2=n=>n;function U2(n,l=k2){const i=Ou.useSyncExternalStore(n.subscribe,Ou.useCallback(()=>l(n.getState()),[n,l]),Ou.useCallback(()=>l(n.getInitialState()),[n,l]));return Ou.useDebugValue(i),i}const dg=n=>{const l=D2(n),i=u=>U2(l,u);return Object.assign(i,l),i},fs=(n=>n?dg(n):dg),hg={BROWSER_HEARTBEAT_INTERVAL:3e4,BROWSER_PONG_TIMEOUT:1e4};let An=null;const af=new Set;let wl=!1,Hu=null,Ra=null,qu=null,Hi=null,Cl=null,qi,Dc=!1;const B2=3e3,H2=3e3;function q2(n){for(const l of af)try{l(n)}catch(i){console.error("[useWebSocket] listener error:",i)}}function Y2(n){Hu=setInterval(()=>{n.readyState===WebSocket.OPEN&&(n.send(JSON.stringify({type:"ping"})),Ra=setTimeout(()=>{n.close()},hg.BROWSER_PONG_TIMEOUT))},hg.BROWSER_HEARTBEAT_INTERVAL)}function H0(){Hu&&(clearInterval(Hu),Hu=null),Ra&&(clearTimeout(Ra),Ra=null)}function kc(){wl||(qu=setTimeout(q0,H2))}function lf(){Hi&&(clearTimeout(Hi),Hi=null)}function q0(){if(wl||!Cl)return;const i=`${`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/browser`}?token=${encodeURIComponent(Cl)}`;Dc=!1;const u=new WebSocket(i);An=u,Rt.setState({connectionState:"connecting"}),Hi=setTimeout(()=>{Hi=null,u.readyState===WebSocket.CONNECTING&&u.close()},B2),u.onopen=()=>{lf(),Dc=!0,Rt.setState({connectionState:"connected"}),u.send(JSON.stringify({type:"list"})),Y2(u)},u.onmessage=s=>{try{const o=JSON.parse(s.data);if(o.type==="pong"){Ra&&(clearTimeout(Ra),Ra=null);return}q2(o)}catch{}},u.onclose=s=>{if(lf(),Rt.setState({connectionState:"disconnected"}),An=null,H0(),!wl&&!Dc){const o={};Cl&&(o.Authorization=`Bearer ${Cl}`),fetch("/api/instances",{headers:o}).then(d=>{d.status===401?qi==null||qi():kc()}).catch(()=>{kc()});return}wl||kc()},u.onerror=()=>{u.close()}}const Rt=fs((n,l)=>({connectionState:"idle",send:i=>{(An==null?void 0:An.readyState)===WebSocket.OPEN&&An.send(JSON.stringify(i))},subscribe:i=>(af.add(i),()=>{af.delete(i)}),connect:(i,u)=>{l().disconnect(),wl=!1,Cl=i,qi=u,q0()},disconnect:()=>{wl=!0,Cl=null,qi=void 0,H0(),lf(),qu&&(clearTimeout(qu),qu=null),An&&(An.close(),An=null),n({connectionState:"idle"})}}));function V2(n,l){let i;try{i=n()}catch{return}return{getItem:s=>{var o;const d=p=>p===null?null:JSON.parse(p,void 0),h=(o=i.getItem(s))!=null?o:null;return h instanceof Promise?h.then(d):d(h)},setItem:(s,o)=>i.setItem(s,JSON.stringify(o,void 0)),removeItem:s=>i.removeItem(s)}}const rf=n=>l=>{try{const i=n(l);return i instanceof Promise?i:{then(u){return rf(u)(i)},catch(u){return this}}}catch(i){return{then(u){return this},catch(u){return rf(u)(i)}}}},G2=(n,l)=>(i,u,s)=>{let o={storage:V2(()=>window.localStorage),partialize:j=>j,version:0,merge:(j,R)=>({...R,...j}),...l},d=!1,h=0;const p=new Set,m=new Set;let v=o.storage;if(!v)return n((...j)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),i(...j)},u,s);const x=()=>{const j=o.partialize({...u()});return v.setItem(o.name,{state:j,version:o.version})},E=s.setState;s.setState=(j,R)=>(E(j,R),x());const C=n((...j)=>(i(...j),x()),u,s);s.getInitialState=()=>C;let N;const w=()=>{var j,R;if(!v)return;const T=++h;d=!1,p.forEach(U=>{var X;return U((X=u())!=null?X:C)});const z=((R=o.onRehydrateStorage)==null?void 0:R.call(o,(j=u())!=null?j:C))||void 0;return rf(v.getItem.bind(v))(o.name).then(U=>{if(U)if(typeof U.version=="number"&&U.version!==o.version){if(o.migrate){const X=o.migrate(U.state,U.version);return X instanceof Promise?X.then(J=>[!0,J]):[!0,X]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,U.state];return[!1,void 0]}).then(U=>{var X;if(T!==h)return;const[J,G]=U;if(N=o.merge(G,(X=u())!=null?X:C),i(N,!0),J)return x()}).then(()=>{T===h&&(z==null||z(u(),void 0),N=u(),d=!0,m.forEach(U=>U(N)))}).catch(U=>{T===h&&(z==null||z(void 0,U))})};return s.persist={setOptions:j=>{o={...o,...j},j.storage&&(v=j.storage)},clearStorage:()=>{v==null||v.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>w(),hasHydrated:()=>d,onHydrate:j=>(p.add(j),()=>{p.delete(j)}),onFinishHydration:j=>(m.add(j),()=>{m.delete(j)})},o.skipHydration||w(),N||C},F2=G2,Nl=fs()(F2((n,l)=>({instances:[],instanceListReady:!1,handleMessage:i=>{switch(i.type){case"instance_list":n({instances:i.payload.instances,instanceListReady:!0});break;case"instance_update":{const{instance:u,action:s}=i.payload;s==="connected"?n(o=>({instances:o.instances.some(h=>h.id===u.id)?o.instances.map(h=>h.id===u.id?u:h):[...o.instances,u]})):s==="disconnected"?n(o=>({instances:o.instances.filter(d=>d.id!==u.id)})):s==="updated"&&n(o=>({instances:o.instances.map(d=>d.id===u.id?u:d)}));break}}}}),{name:"paimon:instances",partialize:n=>({instances:n.instances})}));function $2(n){return l=>n?l.instances.find(i=>i.id===n):void 0}const he=n=>typeof n=="string",Di=()=>{let n,l;const i=new Promise((u,s)=>{n=u,l=s});return i.resolve=n,i.reject=l,i},pg=n=>n==null?"":String(n),K2=(n,l,i)=>{n.forEach(u=>{l[u]&&(i[u]=l[u])})},X2=/###/g,mg=n=>n&&n.includes("###")?n.replace(X2,"."):n,gg=n=>!n||he(n),Yi=(n,l,i)=>{const u=he(l)?l.split("."):l;let s=0;for(;s<u.length-1;){if(gg(n))return{};const o=mg(u[s]);!n[o]&&i&&(n[o]=new i),Object.prototype.hasOwnProperty.call(n,o)?n=n[o]:n={},++s}return gg(n)?{}:{obj:n,k:mg(u[s])}},yg=(n,l,i)=>{const{obj:u,k:s}=Yi(n,l,Object);if(u!==void 0||l.length===1){u[s]=i;return}let o=l[l.length-1],d=l.slice(0,l.length-1),h=Yi(n,d,Object);for(;h.obj===void 0&&d.length;)o=`${d[d.length-1]}.${o}`,d=d.slice(0,d.length-1),h=Yi(n,d,Object),h!=null&&h.obj&&typeof h.obj[`${h.k}.${o}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${o}`]=i},Q2=(n,l,i,u)=>{const{obj:s,k:o}=Yi(n,l,Object);s[o]=s[o]||[],s[o].push(i)},Ku=(n,l)=>{const{obj:i,k:u}=Yi(n,l);if(i&&Object.prototype.hasOwnProperty.call(i,u))return i[u]},Z2=(n,l,i)=>{const u=Ku(n,i);return u!==void 0?u:Ku(l,i)},Y0=(n,l,i)=>{for(const u in l)u!=="__proto__"&&u!=="constructor"&&(u in n?he(n[u])||n[u]instanceof String||he(l[u])||l[u]instanceof String?i&&(n[u]=l[u]):Y0(n[u],l[u],i):n[u]=l[u]);return n},Nn=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),J2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},I2=n=>he(n)?n.replace(/[&<>"'\/]/g,l=>J2[l]):n;class W2{constructor(l){this.capacity=l,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(l){const i=this.regExpMap.get(l);if(i!==void 0)return i;const u=new RegExp(l);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(l,u),this.regExpQueue.push(l),u}}const P2=[" ",",","?","!",";"],eS=new W2(20),tS=(n,l,i)=>{l=l||"",i=i||"";const u=P2.filter(d=>!l.includes(d)&&!i.includes(d));if(u.length===0)return!0;const s=eS.getRegExp(`(${u.map(d=>d==="?"?"\\?":d).join("|")})`);let o=!s.test(n);if(!o){const d=n.indexOf(i);d>0&&!s.test(n.substring(0,d))&&(o=!0)}return o},uf=(n,l,i=".")=>{if(!n)return;if(n[l])return Object.prototype.hasOwnProperty.call(n,l)?n[l]:void 0;const u=l.split(i);let s=n;for(let o=0;o<u.length;){if(!s||typeof s!="object")return;let d,h="";for(let p=o;p<u.length;++p)if(p!==o&&(h+=i),h+=u[p],d=s[h],d!==void 0){if(["string","number","boolean"].includes(typeof d)&&p<u.length-1)continue;o+=p-o+1;break}s=d}return s},$i=n=>n==null?void 0:n.replace(/_/g,"-"),nS={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,l){var i,u;(u=(i=console==null?void 0:console[n])==null?void 0:i.apply)==null||u.call(i,console,l)}};class Xu{constructor(l,i={}){this.init(l,i)}init(l,i={}){this.prefix=i.prefix||"i18next:",this.logger=l||nS,this.options=i,this.debug=i.debug}log(...l){return this.forward(l,"log","",!0)}warn(...l){return this.forward(l,"warn","",!0)}error(...l){return this.forward(l,"error","")}deprecate(...l){return this.forward(l,"warn","WARNING DEPRECATED: ",!0)}forward(l,i,u,s){return s&&!this.debug?null:(l=l.map(o=>he(o)?o.replace(/[\r\n\x00-\x1F\x7F]/g," "):o),he(l[0])&&(l[0]=`${u}${this.prefix} ${l[0]}`),this.logger[i](l))}create(l){return new Xu(this.logger,{prefix:`${this.prefix}:${l}:`,...this.options})}clone(l){return l=l||this.options,l.prefix=l.prefix||this.prefix,new Xu(this.logger,l)}}var Pt=new Xu;class ds{constructor(){this.observers={}}on(l,i){return l.split(" ").forEach(u=>{this.observers[u]||(this.observers[u]=new Map);const s=this.observers[u].get(i)||0;this.observers[u].set(i,s+1)}),this}off(l,i){if(this.observers[l]){if(!i){delete this.observers[l];return}this.observers[l].delete(i)}}once(l,i){const u=(...s)=>{i(...s),this.off(l,u)};return this.on(l,u),this}emit(l,...i){this.observers[l]&&Array.from(this.observers[l].entries()).forEach(([s,o])=>{for(let d=0;d<o;d++)s(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,o])=>{for(let d=0;d<o;d++)s(l,...i)})}}class xg extends ds{constructor(l,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=l||{},this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(l){this.options.ns.includes(l)||this.options.ns.push(l)}removeNamespaces(l){const i=this.options.ns.indexOf(l);i>-1&&this.options.ns.splice(i,1)}getResource(l,i,u,s={}){var m,v;const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,d=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let h;l.includes(".")?h=l.split("."):(h=[l,i],u&&(Array.isArray(u)?h.push(...u):he(u)&&o?h.push(...u.split(o)):h.push(u)));const p=Ku(this.data,h);return!p&&!i&&!u&&l.includes(".")&&(l=h[0],i=h[1],u=h.slice(2).join(".")),p||!d||!he(u)?p:uf((v=(m=this.data)==null?void 0:m[l])==null?void 0:v[i],u,o)}addResource(l,i,u,s,o={silent:!1}){const d=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let h=[l,i];u&&(h=h.concat(d?u.split(d):u)),l.includes(".")&&(h=l.split("."),s=i,i=h[1]),this.addNamespaces(i),yg(this.data,h,s),o.silent||this.emit("added",l,i,u,s)}addResources(l,i,u,s={silent:!1}){for(const o in u)(he(u[o])||Array.isArray(u[o]))&&this.addResource(l,i,o,u[o],{silent:!0});s.silent||this.emit("added",l,i,u)}addResourceBundle(l,i,u,s,o,d={silent:!1,skipCopy:!1}){let h=[l,i];l.includes(".")&&(h=l.split("."),s=u,u=i,i=h[1]),this.addNamespaces(i);let p=Ku(this.data,h)||{};d.skipCopy||(u=JSON.parse(JSON.stringify(u))),s?Y0(p,u,o):p={...p,...u},yg(this.data,h,p),d.silent||this.emit("added",l,i,u)}removeResourceBundle(l,i){this.hasResourceBundle(l,i)&&delete this.data[l][i],this.removeNamespaces(i),this.emit("removed",l,i)}hasResourceBundle(l,i){return this.getResource(l,i)!==void 0}getResourceBundle(l,i){return i||(i=this.options.defaultNS),this.getResource(l,i)}getDataByLanguage(l){return this.data[l]}hasLanguageSomeTranslations(l){const i=this.getDataByLanguage(l);return!!(i&&Object.keys(i)||[]).find(s=>i[s]&&Object.keys(i[s]).length>0)}toJSON(){return this.data}}var V0={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,l,i,u,s){return n.forEach(o=>{var d;l=((d=this.processors[o])==null?void 0:d.process(l,i,u,s))??l}),l}};const G0=Symbol("i18next/PATH_KEY");function aS(){const n=[],l=Object.create(null);let i;return l.get=(u,s)=>{var o;return(o=i==null?void 0:i.revoke)==null||o.call(i),s===G0?n:(n.push(s),i=Proxy.revocable(u,l),i.proxy)},Proxy.revocable(Object.create(null),l).proxy}function _a(n,l){const{[G0]:i}=n(aS()),u=(l==null?void 0:l.keySeparator)??".",s=(l==null?void 0:l.nsSeparator)??":",o=(l==null?void 0:l.enableSelector)==="strict";if(i.length>1&&s){const d=l==null?void 0:l.ns,h=o?Array.isArray(d)?d:d?[d]:null:Array.isArray(d)?d:null;if(h&&(o?h:h.length>1?h.slice(1):[]).includes(i[0]))return`${i[0]}${s}${i.slice(1).join(u)}`}return i.join(u)}const Uc=n=>!he(n)&&typeof n!="boolean"&&typeof n!="number";class Qu extends ds{constructor(l,i={}){super(),K2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],l,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Pt.create("translator"),this.checkedLoadedFor={}}changeLanguage(l){l&&(this.language=l)}exists(l,i={interpolation:{}}){const u={...i};if(l==null)return!1;const s=this.resolve(l,u);if((s==null?void 0:s.res)===void 0)return!1;const o=Uc(s.res);return!(u.returnObjects===!1&&o)}extractFromKey(l,i){let u=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let o=i.ns||this.options.defaultNS||[];const d=u&&l.includes(u),h=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!tS(l,u,s);if(d&&!h){const p=l.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:l,namespaces:he(o)?[o]:o};const m=l.split(u);(u!==s||u===s&&this.options.ns.includes(m[0]))&&(o=m.shift()),l=m.join(s)}return{key:l,namespaces:he(o)?[o]:o}}translate(l,i,u){let s=typeof i=="object"?{...i}:i;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),l==null)return"";typeof l=="function"&&(l=_a(l,{...this.options,...s})),Array.isArray(l)||(l=[String(l)]),l=l.map(ae=>typeof ae=="function"?_a(ae,{...this.options,...s}):String(ae));const o=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,d=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:h,namespaces:p}=this.extractFromKey(l[l.length-1],s),m=p[p.length-1];let v=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const x=s.lng||this.language,E=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((x==null?void 0:x.toLowerCase())==="cimode")return E?o?{res:`${m}${v}${h}`,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:`${m}${v}${h}`:o?{res:h,usedKey:h,exactUsedKey:h,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(s)}:h;const C=this.resolve(l,s);let N=C==null?void 0:C.res;const w=(C==null?void 0:C.usedKey)||h,j=(C==null?void 0:C.exactUsedKey)||h,R=["[object Number]","[object Function]","[object RegExp]"],T=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,z=!this.i18nFormat||this.i18nFormat.handleAsObject,U=s.count!==void 0&&!he(s.count),X=Qu.hasDefaultValue(s),J=U?this.pluralResolver.getSuffix(x,s.count,s):"",G=s.ordinal&&U?this.pluralResolver.getSuffix(x,s.count,{ordinal:!1}):"",K=U&&!s.ordinal&&s.count===0,q=K&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${J}`]||s[`defaultValue${G}`]||s.defaultValue;let I=N;z&&!N&&X&&(I=q);const oe=Uc(I),ee=Object.prototype.toString.apply(I);if(z&&I&&oe&&!R.includes(ee)&&!(he(T)&&Array.isArray(I))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ae=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,I,{...s,ns:p}):`key '${h} (${this.language})' returned an object instead of string.`;return o?(C.res=ae,C.usedParams=this.getUsedParamsDetails(s),C):ae}if(d){const ae=Array.isArray(I),te=ae?[]:{},re=ae?j:w;for(const M in I)if(Object.prototype.hasOwnProperty.call(I,M)){const Q=`${re}${d}${M}`;X&&!N?te[M]=this.translate(Q,{...s,defaultValue:Uc(q)?q[M]:void 0,joinArrays:!1,ns:p}):te[M]=this.translate(Q,{...s,joinArrays:!1,ns:p}),te[M]===Q&&(te[M]=I[M])}N=te}}else if(z&&he(T)&&Array.isArray(N))N=N.join(T),N&&(N=this.extendTranslation(N,l,s,u));else{let ae=!1,te=!1;!this.isValidLookup(N)&&X&&(ae=!0,N=q),this.isValidLookup(N)||(te=!0,N=h);const M=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&te?void 0:N,Q=X&&q!==N&&this.options.updateMissing;if(te||ae||Q){if(this.logger.log(Q?"updateKey":"missingKey",x,m,U&&!Q?`${h}${this.pluralResolver.getSuffix(x,s.count,s)}`:h,Q?q:N),d){const H=this.resolve(h,{...s,keySeparator:!1});H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[];const Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(let H=0;H<Z.length;H++)$.push(Z[H]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(s.lng||this.language):$.push(s.lng||this.language);const W=(H,P,ne)=>{var fe;const de=X&&ne!==N?ne:M;this.options.missingKeyHandler?this.options.missingKeyHandler(H,m,P,de,Q,s):(fe=this.backendConnector)!=null&&fe.saveMissing&&this.backendConnector.saveMissing(H,m,P,de,Q,s),this.emit("missingKey",H,m,P,N)};this.options.saveMissing&&(this.options.saveMissingPlurals&&U?$.forEach(H=>{const P=this.pluralResolver.getSuffixes(H,s);K&&s[`defaultValue${this.options.pluralSeparator}zero`]&&!P.includes(`${this.options.pluralSeparator}zero`)&&P.push(`${this.options.pluralSeparator}zero`),P.forEach(ne=>{W([H],h+ne,s[`defaultValue${ne}`]||q)})}):W($,h,q))}N=this.extendTranslation(N,l,s,C,u),te&&N===h&&this.options.appendNamespaceToMissingKey&&(N=`${m}${v}${h}`),(te||ae)&&this.options.parseMissingKeyHandler&&(N=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${v}${h}`:h,ae?N:void 0,s))}return o?(C.res=N,C.usedParams=this.getUsedParamsDetails(s),C):N}extendTranslation(l,i,u,s,o){var p,m;if((p=this.i18nFormat)!=null&&p.parse)l=this.i18nFormat.parse(l,{...this.options.interpolation.defaultVariables,...u},u.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!u.skipInterpolation){u.interpolation&&this.interpolator.init({...u,interpolation:{...this.options.interpolation,...u.interpolation}});const v=he(l)&&(((m=u==null?void 0:u.interpolation)==null?void 0:m.skipOnVariables)!==void 0?u.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let x;if(v){const C=l.match(this.interpolator.nestingRegexp);x=C&&C.length}let E=u.replace&&!he(u.replace)?u.replace:u;if(this.options.interpolation.defaultVariables&&(E={...this.options.interpolation.defaultVariables,...E}),l=this.interpolator.interpolate(l,E,u.lng||this.language||s.usedLng,u),v){const C=l.match(this.interpolator.nestingRegexp),N=C&&C.length;x<N&&(u.nest=!1)}!u.lng&&s&&s.res&&(u.lng=this.language||s.usedLng),u.nest!==!1&&(l=this.interpolator.nest(l,(...C)=>(o==null?void 0:o[0])===C[0]&&!u.context?(this.logger.warn(`It seems you are nesting recursively key: ${C[0]} in key: ${i[0]}`),null):this.translate(...C,i),u)),u.interpolation&&this.interpolator.reset()}const d=u.postProcess||this.options.postProcess,h=he(d)?[d]:d;return l!=null&&(h!=null&&h.length)&&u.applyPostProcessor!==!1&&(l=V0.handle(h,l,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(u)},...u}:u,this)),l}resolve(l,i={}){let u,s,o,d,h;return he(l)&&(l=[l]),Array.isArray(l)&&(l=l.map(p=>typeof p=="function"?_a(p,{...this.options,...i}):p)),l.forEach(p=>{if(this.isValidLookup(u))return;const m=this.extractFromKey(p,i),v=m.key;s=v;let x=m.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const E=i.count!==void 0&&!he(i.count),C=E&&!i.ordinal&&i.count===0,N=i.context!==void 0&&(he(i.context)||typeof i.context=="number")&&i.context!=="",w=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);x.forEach(j=>{var R,T;this.isValidLookup(u)||(h=j,!this.checkedLoadedFor[`${w[0]}-${j}`]&&((R=this.utils)!=null&&R.hasLoadedNamespace)&&!((T=this.utils)!=null&&T.hasLoadedNamespace(h))&&(this.checkedLoadedFor[`${w[0]}-${j}`]=!0,this.logger.warn(`key "${s}" for languages "${w.join(", ")}" won't get resolved as namespace "${h}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(z=>{var J;if(this.isValidLookup(u))return;d=z;const U=[v];if((J=this.i18nFormat)!=null&&J.addLookupKeys)this.i18nFormat.addLookupKeys(U,v,z,j,i);else{let G;E&&(G=this.pluralResolver.getSuffix(z,i.count,i));const K=`${this.options.pluralSeparator}zero`,q=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(E&&(i.ordinal&&G.startsWith(q)&&U.push(v+G.replace(q,this.options.pluralSeparator)),U.push(v+G),C&&U.push(v+K)),N){const I=`${v}${this.options.contextSeparator||"_"}${i.context}`;U.push(I),E&&(i.ordinal&&G.startsWith(q)&&U.push(I+G.replace(q,this.options.pluralSeparator)),U.push(I+G),C&&U.push(I+K))}}let X;for(;X=U.pop();)this.isValidLookup(u)||(o=X,u=this.getResource(z,j,X,i))}))})}),{res:u,usedKey:s,exactUsedKey:o,usedLng:d,usedNS:h}}isValidLookup(l){return l!==void 0&&!(!this.options.returnNull&&l===null)&&!(!this.options.returnEmptyString&&l==="")}getResource(l,i,u,s={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(l,i,u,s):this.resourceStore.getResource(l,i,u,s)}getUsedParamsDetails(l={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],u=l.replace&&!he(l.replace);let s=u?l.replace:l;if(u&&typeof l.count<"u"&&(s.count=l.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!u){s={...s};for(const o of i)delete s[o]}return s}static hasDefaultValue(l){const i="defaultValue";for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u)&&u.startsWith(i)&&l[u]!==void 0)return!0;return!1}}class vg{constructor(l){this.options=l,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Pt.create("languageUtils")}getScriptPartFromCode(l){if(l=$i(l),!l||!l.includes("-"))return null;const i=l.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}getLanguagePartFromCode(l){if(l=$i(l),!l||!l.includes("-"))return l;const i=l.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(l){if(he(l)&&l.includes("-")){let i;try{i=Intl.getCanonicalLocales(l)[0]}catch{}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?l.toLowerCase():l)}return this.options.cleanCode||this.options.lowerCaseLng?l.toLowerCase():l}isSupportedCode(l){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(l=this.getLanguagePartFromCode(l)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(l)}getBestMatchFromCodes(l){if(!l)return null;let i;return l.forEach(u=>{if(i)return;const s=this.formatLanguageCode(u);(!this.options.supportedLngs||this.isSupportedCode(s))&&(i=s)}),!i&&this.options.supportedLngs&&l.forEach(u=>{if(i)return;const s=this.getScriptPartFromCode(u);if(this.isSupportedCode(s))return i=s;const o=this.getLanguagePartFromCode(u);if(this.isSupportedCode(o))return i=o;i=this.options.supportedLngs.find(d=>d===o?!0:!d.includes("-")&&!o.includes("-")?!1:!!(d.includes("-")&&!o.includes("-")&&d.slice(0,d.indexOf("-"))===o||d.startsWith(o)&&o.length>1))}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(l,i){if(!l)return[];if(typeof l=="function"&&(l=l(i)),he(l)&&(l=[l]),Array.isArray(l))return l;if(!i)return l.default||[];let u=l[i];return u||(u=l[this.getScriptPartFromCode(i)]),u||(u=l[this.formatLanguageCode(i)]),u||(u=l[this.getLanguagePartFromCode(i)]),u||(u=l.default),u||[]}toResolveHierarchy(l,i){const u=this.getFallbackCodes((i===!1?[]:i)||this.options.fallbackLng||[],l),s=[],o=d=>{d&&(this.isSupportedCode(d)?s.push(d):this.logger.warn(`rejecting language code not found in supportedLngs: ${d}`))};return he(l)&&(l.includes("-")||l.includes("_"))?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(l)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(l)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(l))):he(l)&&o(this.formatLanguageCode(l)),u.forEach(d=>{s.includes(d)||o(this.formatLanguageCode(d))}),s}}const bg={zero:0,one:1,two:2,few:3,many:4,other:5},Sg={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class lS{constructor(l,i={}){this.languageUtils=l,this.options=i,this.logger=Pt.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(l,i={}){const u=$i(l==="dev"?"en":l),s=i.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:u,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let d;try{d=new Intl.PluralRules(u,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Sg;if(!l.match(/-|_/))return Sg;const p=this.languageUtils.getLanguagePartFromCode(l);d=this.getRule(p,i)}return this.pluralRulesCache[o]=d,d}needsPlural(l,i={}){let u=this.getRule(l,i);return u||(u=this.getRule("dev",i)),(u==null?void 0:u.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(l,i,u={}){return this.getSuffixes(l,u).map(s=>`${i}${s}`)}getSuffixes(l,i={}){let u=this.getRule(l,i);return u||(u=this.getRule("dev",i)),u?u.resolvedOptions().pluralCategories.sort((s,o)=>bg[s]-bg[o]).map(s=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(l,i,u={}){const s=this.getRule(l,u);return s?`${this.options.prepend}${u.ordinal?`ordinal${this.options.prepend}`:""}${s.select(i)}`:(this.logger.warn(`no plural rule found for: ${l}`),this.getSuffix("dev",i,u))}}const Eg=(n,l,i,u=".",s=!0)=>{let o=Z2(n,l,i);return!o&&s&&he(i)&&(o=uf(n,i,u),o===void 0&&(o=uf(l,i,u))),o},Bc=n=>n.replace(/\$/g,"$$$$");class Cg{constructor(l={}){var i;this.logger=Pt.create("interpolator"),this.options=l,this.format=((i=l==null?void 0:l.interpolation)==null?void 0:i.format)||(u=>u),this.init(l)}init(l={}){l.interpolation||(l.interpolation={escapeValue:!0});const{escape:i,escapeValue:u,useRawValueToEscape:s,prefix:o,prefixEscaped:d,suffix:h,suffixEscaped:p,formatSeparator:m,unescapeSuffix:v,unescapePrefix:x,nestingPrefix:E,nestingPrefixEscaped:C,nestingSuffix:N,nestingSuffixEscaped:w,nestingOptionsSeparator:j,maxReplaces:R,alwaysFormat:T}=l.interpolation;this.escape=i!==void 0?i:I2,this.escapeValue=u!==void 0?u:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?Nn(o):d||"{{",this.suffix=h?Nn(h):p||"}}",this.formatSeparator=m||",",this.unescapePrefix=v?"":x?Nn(x):"-",this.unescapeSuffix=this.unescapePrefix?"":v?Nn(v):"",this.nestingPrefix=E?Nn(E):C||Nn("$t("),this.nestingSuffix=N?Nn(N):w||Nn(")"),this.nestingOptionsSeparator=j||",",this.maxReplaces=R||1e3,this.alwaysFormat=T!==void 0?T:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const l=(i,u)=>(i==null?void 0:i.source)===u?(i.lastIndex=0,i):new RegExp(u,"g");this.regexp=l(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=l(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=l(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(l,i,u,s){var C;let o,d,h;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=N=>{if(!N.includes(this.formatSeparator)){const T=Eg(i,p,N,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(T,void 0,u,{...s,...i,interpolationkey:N}):T}const w=N.split(this.formatSeparator),j=w.shift().trim(),R=w.join(this.formatSeparator).trim();return this.format(Eg(i,p,j,this.options.keySeparator,this.options.ignoreJSONStructure),R,u,{...s,...i,interpolationkey:j})};this.resetRegExp(),!this.escapeValue&&typeof l=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(l)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const v=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,x=((C=s==null?void 0:s.interpolation)==null?void 0:C.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:N=>Bc(N)},{regex:this.regexp,safeValue:N=>this.escapeValue?Bc(this.escape(N)):Bc(N)}].forEach(N=>{for(h=0;o=N.regex.exec(l);){const w=o[1].trim();if(d=m(w),d===void 0)if(typeof v=="function"){const R=v(l,o,s);d=he(R)?R:""}else if(s&&Object.prototype.hasOwnProperty.call(s,w))d="";else if(x){d=o[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${l}`),d="";else!he(d)&&!this.useRawValueToEscape&&(d=pg(d));const j=N.safeValue(d);if(l=l.replace(o[0],j),x?(N.regex.lastIndex+=d.length,N.regex.lastIndex-=o[0].length):N.regex.lastIndex=0,h++,h>=this.maxReplaces)break}}),l}nest(l,i,u={}){let s,o,d;const h=(p,m)=>{const v=this.nestingOptionsSeparator;if(!p.includes(v))return p;const x=p.split(new RegExp(`${Nn(v)}[ ]*{`));let E=`{${x[1]}`;p=x[0],E=this.interpolate(E,d);const C=E.match(/'/g),N=E.match(/"/g);(((C==null?void 0:C.length)??0)%2===0&&!N||((N==null?void 0:N.length)??0)%2!==0)&&(E=E.replace(/'/g,'"'));try{d=JSON.parse(E),m&&(d={...m,...d})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,w),`${p}${v}${E}`}return d.defaultValue&&d.defaultValue.includes(this.prefix)&&delete d.defaultValue,p};for(;s=this.nestingRegexp.exec(l);){let p=[];d={...u},d=d.replace&&!he(d.replace)?d.replace:d,d.applyPostProcessor=!1,delete d.defaultValue;const m=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(m!==-1&&(p=s[1].slice(m).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),s[1]=s[1].slice(0,m)),o=i(h.call(this,s[1].trim(),d),d),o&&s[0]===l&&!he(o))return o;he(o)||(o=pg(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${l}`),o=""),p.length&&(o=p.reduce((v,x)=>this.format(v,x,u.lng,{...u,interpolationkey:s[1].trim()}),o.trim())),l=l.replace(s[0],o),this.regexp.lastIndex=0}return l}}const iS=n=>{let l=n.toLowerCase().trim();const i={};if(n.includes("(")){const u=n.split("(");l=u[0].toLowerCase().trim();const s=u[1].slice(0,-1);l==="currency"&&!s.includes(":")?i.currency||(i.currency=s.trim()):l==="relativetime"&&!s.includes(":")?i.range||(i.range=s.trim()):s.split(";").forEach(d=>{if(d){const[h,...p]=d.split(":"),m=p.join(":").trim().replace(/^'+|'+$/g,""),v=h.trim();i[v]||(i[v]=m),m==="false"&&(i[v]=!1),m==="true"&&(i[v]=!0),isNaN(m)||(i[v]=parseInt(m,10))}})}return{formatName:l,formatOptions:i}},Ng=n=>{const l={};return(i,u,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const d=u+JSON.stringify(o);let h=l[d];return h||(h=n($i(u),s),l[d]=h),h(i)}},rS=n=>(l,i,u)=>n($i(i),u)(l);class uS{constructor(l={}){this.logger=Pt.create("formatter"),this.options=l,this.init(l)}init(l,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const u=i.cacheInBuiltFormats?Ng:rS;this.formats={number:u((s,o)=>{const d=new Intl.NumberFormat(s,{...o});return h=>d.format(h)}),currency:u((s,o)=>{const d=new Intl.NumberFormat(s,{...o,style:"currency"});return h=>d.format(h)}),datetime:u((s,o)=>{const d=new Intl.DateTimeFormat(s,{...o});return h=>d.format(h)}),relativetime:u((s,o)=>{const d=new Intl.RelativeTimeFormat(s,{...o});return h=>d.format(h,o.range||"day")}),list:u((s,o)=>{const d=new Intl.ListFormat(s,{...o});return h=>d.format(h)})}}add(l,i){this.formats[l.toLowerCase().trim()]=i}addCached(l,i){this.formats[l.toLowerCase().trim()]=Ng(i)}format(l,i,u,s={}){if(!i||l==null)return l;const o=i.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&!o[0].includes(")")&&o.find(h=>h.includes(")"))){const h=o.findIndex(p=>p.includes(")"));o[0]=[o[0],...o.splice(1,h)].join(this.formatSeparator)}return o.reduce((h,p)=>{var x;const{formatName:m,formatOptions:v}=iS(p);if(this.formats[m]){let E=h;try{const C=((x=s==null?void 0:s.formatParams)==null?void 0:x[s.interpolationkey])||{},N=C.locale||C.lng||s.locale||s.lng||u;E=this.formats[m](h,N,{...v,...s,...C})}catch(C){this.logger.warn(C)}return E}else this.logger.warn(`there was no format function for ${m}`);return h},l)}}const sS=(n,l)=>{n.pending[l]!==void 0&&(delete n.pending[l],n.pendingCount--)};class oS extends ds{constructor(l,i,u,s={}){var o,d;super(),this.backend=l,this.store=i,this.services=u,this.languageUtils=u.languageUtils,this.options=s,this.logger=Pt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(d=(o=this.backend)==null?void 0:o.init)==null||d.call(o,u,s.backend,s)}queueLoad(l,i,u,s){const o={},d={},h={},p={};return l.forEach(m=>{let v=!0;i.forEach(x=>{const E=`${m}|${x}`;!u.reload&&this.store.hasResourceBundle(m,x)?this.state[E]=2:this.state[E]<0||(this.state[E]===1?d[E]===void 0&&(d[E]=!0):(this.state[E]=1,v=!1,d[E]===void 0&&(d[E]=!0),o[E]===void 0&&(o[E]=!0),p[x]===void 0&&(p[x]=!0)))}),v||(h[m]=!0)}),(Object.keys(o).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(d),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(p)}}loaded(l,i,u){const s=l.split("|"),o=s[0],d=s[1];i&&this.emit("failedLoading",o,d,i),!i&&u&&this.store.addResourceBundle(o,d,u,void 0,void 0,{skipCopy:!0}),this.state[l]=i?-1:2,i&&u&&(this.state[l]=0);const h={};this.queue.forEach(p=>{Q2(p.loaded,[o],d),sS(p,l),i&&p.errors.push(i),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(m=>{h[m]||(h[m]={});const v=p.loaded[m];v.length&&v.forEach(x=>{h[m][x]===void 0&&(h[m][x]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(p=>!p.done)}read(l,i,u,s=0,o=this.retryTimeout,d){if(!l.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:l,ns:i,fcName:u,tried:s,wait:o,callback:d});return}this.readingCalls++;const h=(m,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(m&&v&&s<this.maxRetries){setTimeout(()=>{this.read(l,i,u,s+1,o*2,d)},o);return}d(m,v)},p=this.backend[u].bind(this.backend);if(p.length===2){try{const m=p(l,i);m&&typeof m.then=="function"?m.then(v=>h(null,v)).catch(h):h(null,m)}catch(m){h(m)}return}return p(l,i,h)}prepareLoading(l,i,u={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();he(l)&&(l=this.languageUtils.toResolveHierarchy(l)),he(i)&&(i=[i]);const o=this.queueLoad(l,i,u,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(d=>{this.loadOne(d)})}load(l,i,u){this.prepareLoading(l,i,{},u)}reload(l,i,u){this.prepareLoading(l,i,{reload:!0},u)}loadOne(l,i=""){const u=l.split("|"),s=u[0],o=u[1];this.read(s,o,"read",void 0,void 0,(d,h)=>{d&&this.logger.warn(`${i}loading namespace ${o} for language ${s} failed`,d),!d&&h&&this.logger.log(`${i}loaded namespace ${o} for language ${s}`,h),this.loaded(l,d,h)})}saveMissing(l,i,u,s,o,d={},h=()=>{}){var p,m,v,x,E;if((m=(p=this.services)==null?void 0:p.utils)!=null&&m.hasLoadedNamespace&&!((x=(v=this.services)==null?void 0:v.utils)!=null&&x.hasLoadedNamespace(i))){this.logger.warn(`did not save key "${u}" as the namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(u==null||u==="")){if((E=this.backend)!=null&&E.create){const C={...d,isUpdate:o},N=this.backend.create.bind(this.backend);if(N.length<6)try{let w;N.length===5?w=N(l,i,u,s,C):w=N(l,i,u,s),w&&typeof w.then=="function"?w.then(j=>h(null,j)).catch(h):h(null,w)}catch(w){h(w)}else N(l,i,u,s,h,C)}!l||!l[0]||this.store.addResource(l[0],i,u,s)}}}const Hc=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let l={};if(typeof n[1]=="object"&&(l=n[1]),he(n[1])&&(l.defaultValue=n[1]),he(n[2])&&(l.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const i=n[3]||n[2];Object.keys(i).forEach(u=>{l[u]=i[u]})}return l},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ag=n=>(he(n.ns)&&(n.ns=[n.ns]),he(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),he(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&!n.supportedLngs.includes("cimode")&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),zu=()=>{},cS=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(i=>{typeof n[i]=="function"&&(n[i]=n[i].bind(n))})};class Vi extends ds{constructor(l={},i){if(super(),this.options=Ag(l),this.services={},this.logger=Pt,this.modules={external:[]},cS(this),i&&!this.isInitialized&&!l.isClone){if(!this.options.initAsync)return this.init(l,i),this;setTimeout(()=>{this.init(l,i)},0)}}init(l={},i){this.isInitializing=!0,typeof l=="function"&&(i=l,l={}),l.defaultNS==null&&l.ns&&(he(l.ns)?l.defaultNS=l.ns:l.ns.includes("translation")||(l.defaultNS=l.ns[0]));const u=Hc();this.options={...u,...this.options,...Ag(l)},this.options.interpolation={...u.interpolation,...this.options.interpolation},l.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=l.keySeparator),l.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=l.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=u.overloadTranslationOptionHandler);const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Pt.init(s(this.modules.logger),this.options):Pt.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=uS;const v=new vg(this.options);this.store=new xg(this.options.resources,this.options);const x=this.services;x.logger=Pt,x.resourceStore=this.store,x.languageUtils=v,x.pluralResolver=new lS(v,{prepend:this.options.pluralSeparator}),m&&(x.formatter=s(m),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new Cg(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new oS(s(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(E,...C)=>{this.emit(E,...C)}),this.modules.languageDetector&&(x.languageDetector=s(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=s(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new Qu(this.services,this.options),this.translator.on("*",(E,...C)=>{this.emit(E,...C)}),this.modules.external.forEach(E=>{E.init&&E.init(this)})}if(this.format=this.options.interpolation.format,i||(i=zu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=(...v)=>this.store[m](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...v)=>(this.store[m](...v),this)});const h=Di(),p=()=>{const m=(v,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(x),i(v,x)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),h}loadResources(l,i=zu){var o,d;let u=i;const s=he(l)?l:this.language;if(typeof l=="function"&&(u=l),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return u();const h=[],p=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(x=>{x!=="cimode"&&(h.includes(x)||h.push(x))})};s?p(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(v=>p(v)),(d=(o=this.options.preload)==null?void 0:o.forEach)==null||d.call(o,m=>p(m)),this.services.backendConnector.load(h,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),u(m)})}else u(null)}reloadResources(l,i,u){const s=Di();return typeof l=="function"&&(u=l,l=void 0),typeof i=="function"&&(u=i,i=void 0),l||(l=this.languages),i||(i=this.options.ns),u||(u=zu),this.services.backendConnector.reload(l,i,o=>{s.resolve(),u(o)}),s}use(l){if(!l)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!l.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return l.type==="backend"&&(this.modules.backend=l),(l.type==="logger"||l.log&&l.warn&&l.error)&&(this.modules.logger=l),l.type==="languageDetector"&&(this.modules.languageDetector=l),l.type==="i18nFormat"&&(this.modules.i18nFormat=l),l.type==="postProcessor"&&V0.addPostProcessor(l),l.type==="formatter"&&(this.modules.formatter=l),l.type==="3rdParty"&&this.modules.external.push(l),this}setResolvedLanguage(l){if(!(!l||!this.languages)&&!["cimode","dev"].includes(l)){for(let i=0;i<this.languages.length;i++){const u=this.languages[i];if(!["cimode","dev"].includes(u)&&this.store.hasLanguageSomeTranslations(u)){this.resolvedLanguage=u;break}}!this.resolvedLanguage&&!this.languages.includes(l)&&this.store.hasLanguageSomeTranslations(l)&&(this.resolvedLanguage=l,this.languages.unshift(l))}}changeLanguage(l,i){this.isLanguageChangingTo=l;const u=Di();this.emit("languageChanging",l);const s=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},o=(h,p)=>{p?this.isLanguageChangingTo===l&&(s(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,u.resolve((...m)=>this.t(...m)),i&&i(h,(...m)=>this.t(...m))},d=h=>{var v,x;!l&&!h&&this.services.languageDetector&&(h=[]);const p=he(h)?h:h&&h[0],m=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(he(h)?[h]:h);m&&(this.language||s(m),this.translator.language||this.translator.changeLanguage(m),(x=(v=this.services.languageDetector)==null?void 0:v.cacheUserLanguage)==null||x.call(v,m)),this.loadResources(m,E=>{o(E,m)})};return!l&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!l&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(l),u}getFixedT(l,i,u,s){const o=s==null?void 0:s.scopeNs,d=(h,p,...m)=>{let v;typeof p!="object"?v=this.options.overloadTranslationOptionHandler([h,p].concat(m)):v={...p},v.lng=v.lng||d.lng,v.lngs=v.lngs||d.lngs;const x=v.ns!==void 0&&v.ns!==null;v.ns=v.ns||d.ns,v.keyPrefix!==""&&(v.keyPrefix=v.keyPrefix||u||d.keyPrefix);const E={...this.options,...v};Array.isArray(o)&&!x&&(E.ns=o),typeof v.keyPrefix=="function"&&(v.keyPrefix=_a(v.keyPrefix,E));const C=this.options.keySeparator||".";let N;return v.keyPrefix&&Array.isArray(h)?N=h.map(w=>(typeof w=="function"&&(w=_a(w,E)),`${v.keyPrefix}${C}${w}`)):(typeof h=="function"&&(h=_a(h,E)),N=v.keyPrefix?`${v.keyPrefix}${C}${h}`:h),this.t(N,v)};return he(l)?d.lng=l:d.lngs=l,d.ns=i,d.keyPrefix=u,d}t(...l){var i;return(i=this.translator)==null?void 0:i.translate(...l)}exists(...l){var i;return(i=this.translator)==null?void 0:i.exists(...l)}setDefaultNamespace(l){this.options.defaultNS=l}hasLoadedNamespace(l,i={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const u=i.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(u.toLowerCase()==="cimode")return!0;const d=(h,p)=>{const m=this.services.backendConnector.state[`${h}|${p}`];return m===-1||m===0||m===2};if(i.precheck){const h=i.precheck(this,d);if(h!==void 0)return h}return!!(this.hasResourceBundle(u,l)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(u,l)&&(!s||d(o,l)))}loadNamespaces(l,i){const u=Di();return this.options.ns?(he(l)&&(l=[l]),l.forEach(s=>{this.options.ns.includes(s)||this.options.ns.push(s)}),this.loadResources(s=>{u.resolve(),i&&i(s)}),u):(i&&i(),Promise.resolve())}loadLanguages(l,i){const u=Di();he(l)&&(l=[l]);const s=this.options.preload||[],o=l.filter(d=>!s.includes(d)&&this.services.languageUtils.isSupportedCode(d));return o.length?(this.options.preload=s.concat(o),this.loadResources(d=>{u.resolve(),i&&i(d)}),u):(i&&i(),Promise.resolve())}dir(l){var s,o;if(l||(l=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!l)return"rtl";try{const d=new Intl.Locale(l);if(d&&d.getTextInfo){const h=d.getTextInfo();if(h&&h.direction)return h.direction}}catch{}const i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],u=((o=this.services)==null?void 0:o.languageUtils)||new vg(Hc());return l.toLowerCase().indexOf("-latn")>1?"ltr":i.includes(u.getLanguagePartFromCode(l))||l.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(l={},i){const u=new Vi(l,i);return u.createInstance=Vi.createInstance,u}cloneInstance(l={},i=zu){const u=l.forkResourceStore;u&&delete l.forkResourceStore;const s={...this.options,...l,isClone:!0},o=new Vi(s);if((l.debug!==void 0||l.prefix!==void 0)&&(o.logger=o.logger.clone(l)),["store","services","language"].forEach(h=>{o[h]=this[h]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},u){const h=Object.keys(this.store.data).reduce((p,m)=>(p[m]={...this.store.data[m]},p[m]=Object.keys(p[m]).reduce((v,x)=>(v[x]={...p[m][x]},v),p[m]),p),{});o.store=new xg(h,s),o.services.resourceStore=o.store}if(l.interpolation){const p={...Hc().interpolation,...this.options.interpolation,...l.interpolation},m={...s,interpolation:p};o.services.interpolator=new Cg(m)}return o.translator=new Qu(o.services,s),o.translator.on("*",(h,...p)=>{o.emit(h,...p)}),o.init(s,i),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const at=Vi.createInstance();at.createInstance;at.dir;at.init;at.loadResources;at.reloadResources;at.use;at.changeLanguage;at.getFixedT;at.t;at.exists;at.setDefaultNamespace;at.hasLoadedNamespace;at.loadNamespaces;at.loadLanguages;const Tl={appearance:"paimon:appearance",background:"paimon:background",notification:"paimon:notification"};function sf(){const n=localStorage.getItem(Tl.appearance);return n==="light"||n==="dark"||n==="system"?n:"system"}function F0(){const n=localStorage.getItem(Tl.background);return n==="mist"||n==="aurora"||n==="ember"?n:"mist"}function fS(){return localStorage.getItem(Tl.notification)==="true"}function $0(n){return n==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n}function Zu(n,l){const i=$0(n);return document.documentElement.setAttribute("data-theme",i),document.documentElement.setAttribute("data-bg",l),i}const bt=fs(n=>({appearance:sf(),background:F0(),resolvedTheme:$0(sf()),notification:fS(),setAppearance:l=>{localStorage.setItem(Tl.appearance,l);const i=Zu(l,bt.getState().background);n({appearance:l,resolvedTheme:i})},setBackground:l=>{localStorage.setItem(Tl.background,l),Zu(bt.getState().appearance,l),n({background:l})},setNotification:l=>{localStorage.setItem(Tl.notification,String(l)),n({notification:l})}})),dS=window.matchMedia("(prefers-color-scheme: dark)");dS.addEventListener("change",()=>{const{appearance:n,background:l}=bt.getState();if(n==="system"){const i=Zu(n,l);bt.setState({resolvedTheme:i})}});function hS(){const n=bt(i=>i.appearance),l=bt(i=>i.setAppearance);return[n,l]}function K0(){const n=bt(i=>i.background),l=bt(i=>i.setBackground);return[n,l]}function pS(){return bt(n=>n.resolvedTheme)}function mS(){const n=bt(i=>i.notification),l=bt(i=>i.setNotification);return[n,l]}Zu(sf(),F0());const gS="/logos/mist/light/paimon-logo.png";function X0(n,l){return!n||!l?gS:`/logos/${n}/${l}/paimon-logo.png`}function Df(){const[n]=K0(),l=pS();return X0(n,l)}function yS(){const{background:n,resolvedTheme:l}=bt.getState();return X0(n,l)}const Q0="Notification"in window;function xS(n,l){return(n==="streaming"||n==="compacting")&&l==="idle"}function vS(){const n=Rt(o=>o.subscribe),l=nr(),i=b.useRef(l);b.useEffect(()=>{i.current=l},[l]);const u=b.useRef(bt.getState().notification);b.useEffect(()=>bt.subscribe(o=>{u.current=o.notification}),[]);const s=b.useRef(new Map);b.useEffect(()=>{const o=Nl.getState().instances;for(const d of o)s.current.set(d.id,d.status)},[]),b.useEffect(()=>n(o=>{if(o.type==="instance_list"){s.current.clear();for(const d of o.payload.instances)s.current.set(d.id,d.status);return}if(o.type==="instance_update"){const{action:d,instance:h}=o.payload;if(d==="disconnected"){s.current.delete(h.id);return}const p=s.current.get(h.id);s.current.set(h.id,h.status),d==="updated"&&u.current&&xS(p,h.status)&&bS(h.id,h.cwd,i)}}),[n])}function bS(n,l,i){if(document.hasFocus()||!Q0||Notification.permission!=="granted")return;const u=l.split("/").pop()||l,s=new Notification("Paimon",{body:at.t("notification.taskComplete",{name:u}),icon:yS()});s.onclick=()=>{var o;window.focus(),(o=i.current)==null||o.call(i,`/instance/${n}`),s.close()}}/**
45
+ * @license lucide-react v1.16.0 - ISC
46
+ *
47
+ * This source code is licensed under the ISC license.
48
+ * See the LICENSE file in the root directory of this source tree.
49
+ */const Z0=(...n)=>n.filter((l,i,u)=>!!l&&l.trim()!==""&&u.indexOf(l)===i).join(" ").trim();/**
50
+ * @license lucide-react v1.16.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 SS=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
55
+ * @license lucide-react v1.16.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
+ */const ES=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,i,u)=>u?u.toUpperCase():i.toLowerCase());/**
60
+ * @license lucide-react v1.16.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 jg=n=>{const l=ES(n);return l.charAt(0).toUpperCase()+l.slice(1)};/**
65
+ * @license lucide-react v1.16.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
+ */var qc={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"};/**
70
+ * @license lucide-react v1.16.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 CS=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1},NS=b.createContext({}),AS=()=>b.useContext(NS),jS=b.forwardRef(({color:n,size:l,strokeWidth:i,absoluteStrokeWidth:u,className:s="",children:o,iconNode:d,...h},p)=>{const{size:m=24,strokeWidth:v=2,absoluteStrokeWidth:x=!1,color:E="currentColor",className:C=""}=AS()??{},N=u??x?Number(i??v)*24/Number(l??m):i??v;return b.createElement("svg",{ref:p,...qc,width:l??m??qc.width,height:l??m??qc.height,stroke:n??E,strokeWidth:N,className:Z0("lucide",C,s),...!o&&!CS(h)&&{"aria-hidden":"true"},...h},[...d.map(([w,j])=>b.createElement(w,j)),...Array.isArray(o)?o:[o]])});/**
75
+ * @license lucide-react v1.16.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 Te=(n,l)=>{const i=b.forwardRef(({className:u,...s},o)=>b.createElement(jS,{ref:o,iconNode:l,className:Z0(`lucide-${SS(jg(n))}`,`lucide-${n}`,u),...s}));return i.displayName=jg(n),i};/**
80
+ * @license lucide-react v1.16.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 wS=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],TS=Te("arrow-up",wS);/**
85
+ * @license lucide-react v1.16.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 OS=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],lr=Te("check",OS);/**
90
+ * @license lucide-react v1.16.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 RS=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],J0=Te("chevron-down",RS);/**
95
+ * @license lucide-react v1.16.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 _S=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],MS=Te("chevron-left",_S);/**
100
+ * @license lucide-react v1.16.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 zS=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],kf=Te("chevron-right",zS);/**
105
+ * @license lucide-react v1.16.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 LS=[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]],DS=Te("chevrons-down",LS);/**
110
+ * @license lucide-react v1.16.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 kS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],of=Te("circle-alert",kS);/**
115
+ * @license lucide-react v1.16.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 US=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],BS=Te("circle-check-big",US);/**
120
+ * @license lucide-react v1.16.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 HS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],I0=Te("circle-x",HS);/**
125
+ * @license lucide-react v1.16.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 qS=[["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"}]],W0=Te("copy",qS);/**
130
+ * @license lucide-react v1.16.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 YS=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],VS=Te("file-text",YS);/**
135
+ * @license lucide-react v1.16.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 GS=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],FS=Te("folder-plus",GS);/**
140
+ * @license lucide-react v1.16.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 $S=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],P0=Te("folder",$S);/**
145
+ * @license lucide-react v1.16.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 KS=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],XS=Te("git-branch",KS);/**
150
+ * @license lucide-react v1.16.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 QS=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],ZS=Te("history",QS);/**
155
+ * @license lucide-react v1.16.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 JS=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],IS=Te("image-plus",JS);/**
160
+ * @license lucide-react v1.16.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 WS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],PS=Te("info",WS);/**
165
+ * @license lucide-react v1.16.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 e3=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ki=Te("loader-circle",e3);/**
170
+ * @license lucide-react v1.16.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 t3=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],n3=Te("log-out",t3);/**
175
+ * @license lucide-react v1.16.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 a3=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],l3=Te("minimize-2",a3);/**
180
+ * @license lucide-react v1.16.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 i3=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],wg=Te("pencil",i3);/**
185
+ * @license lucide-react v1.16.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 r3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ey=Te("plus",r3);/**
190
+ * @license lucide-react v1.16.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 u3=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],s3=Te("settings",u3);/**
195
+ * @license lucide-react v1.16.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 o3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],c3=Te("square",o3);/**
200
+ * @license lucide-react v1.16.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 f3=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],d3=Te("terminal",f3);/**
205
+ * @license lucide-react v1.16.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 h3=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],p3=Te("timer",h3);/**
210
+ * @license lucide-react v1.16.0 - ISC
211
+ *
212
+ * This source code is licensed under the ISC license.
213
+ * See the LICENSE file in the root directory of this source tree.
214
+ */const m3=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],g3=Te("triangle-alert",m3);/**
215
+ * @license lucide-react v1.16.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */const y3=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],x3=Te("wrench",y3);/**
220
+ * @license lucide-react v1.16.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */const v3=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Uf=Te("x",v3);var Yc,Tg;function b3(){return Tg||(Tg=1,Yc={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Yc}var S3=b3();const E3=m0(S3);var C3=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Og(n){var l={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},i=n.match(/<\/?([^\s]+?)[/\s>]/);if(i&&(l.name=i[1],(E3[i[1]]||n.charAt(n.length-2)==="/")&&(l.voidElement=!0),l.name.startsWith("!--"))){var u=n.indexOf("-->");return{type:"comment",comment:u!==-1?n.slice(4,u):""}}for(var s=new RegExp(C3),o=null;(o=s.exec(n))!==null;)if(o[0].trim())if(o[1]){var d=o[1].trim(),h=[d,""];d.indexOf("=")>-1&&(h=d.split("=")),l.attrs[h[0]]=h[1],s.lastIndex--}else o[2]&&(l.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return l}var N3=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,A3=/^\s*$/,j3=Object.create(null);function ty(n,l){switch(l.type){case"text":return n+l.content;case"tag":return n+="<"+l.name+(l.attrs?(function(i){var u=[];for(var s in i)u.push(s+'="'+i[s]+'"');return u.length?" "+u.join(" "):""})(l.attrs):"")+(l.voidElement?"/>":">"),l.voidElement?n:n+l.children.reduce(ty,"")+"</"+l.name+">";case"comment":return n+"<!--"+l.comment+"-->"}}var w3={parse:function(n,l){l||(l={}),l.components||(l.components=j3);var i,u=[],s=[],o=-1,d=!1;if(n.indexOf("<")!==0){var h=n.indexOf("<");u.push({type:"text",content:h===-1?n:n.substring(0,h)})}return n.replace(N3,function(p,m){if(d){if(p!=="</"+i.name+">")return;d=!1}var v,x=p.charAt(1)!=="/",E=p.startsWith("<!--"),C=m+p.length,N=n.charAt(C);if(E){var w=Og(p);return o<0?(u.push(w),u):((v=s[o]).children.push(w),u)}if(x&&(o++,(i=Og(p)).type==="tag"&&l.components[i.name]&&(i.type="component",d=!0),i.voidElement||d||!N||N==="<"||i.children.push({type:"text",content:n.slice(C,n.indexOf("<",C))}),o===0&&u.push(i),(v=s[o-1])&&v.children.push(i),s[o]=i),(!x||i.voidElement)&&(o>-1&&(i.voidElement||i.name===p.slice(2,-1))&&(o--,i=o===-1?u:s[o]),!d&&N!=="<"&&N)){v=o===-1?u:s[o].children;var j=n.indexOf("<",C),R=n.slice(C,j===-1?void 0:j);A3.test(R)&&(R=" "),(j>-1&&o+v.length>=0||R!==" ")&&v.push({type:"text",content:R})}}),u},stringify:function(n){return n.reduce(function(l,i){return l+ty("",i)},"")}};const Yu=(n,l,i,u)=>{var o,d,h,p;const s=[i,{code:l,...u||{}}];if((d=(o=n==null?void 0:n.services)==null?void 0:o.logger)!=null&&d.forward)return n.services.logger.forward(s,"warn","react-i18next::",!0);vt(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(p=(h=n==null?void 0:n.services)==null?void 0:h.logger)!=null&&p.warn?n.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},Rg={},Xi=(n,l,i,u)=>{vt(i)&&Rg[i]||(vt(i)&&(Rg[i]=new Date),Yu(n,l,i,u))},ny=(n,l)=>()=>{if(n.isInitialized)l();else{const i=()=>{setTimeout(()=>{n.off("initialized",i)},0),l()};n.on("initialized",i)}},cf=(n,l,i)=>{n.loadNamespaces(l,ny(n,i))},_g=(n,l,i,u)=>{if(vt(i)&&(i=[i]),n.options.preload&&n.options.preload.indexOf(l)>-1)return cf(n,i,u);i.forEach(s=>{n.options.ns.indexOf(s)<0&&n.options.ns.push(s)}),n.loadLanguages(l,ny(n,u))},T3=(n,l,i={})=>!l.languages||!l.languages.length?(Xi(l,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:l.languages}),!0):l.hasLoadedNamespace(n,{lng:i.lng,precheck:(u,s)=>{if(i.bindI18n&&i.bindI18n.indexOf("languageChanging")>-1&&u.services.backendConnector.backend&&u.isLanguageChangingTo&&!s(u.isLanguageChangingTo,n))return!1}}),vt=n=>typeof n=="string",jn=n=>typeof n=="object"&&n!==null,O3=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,R3={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},_3=n=>R3[n],ay=n=>n.replace(O3,_3);let ff={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ay,transDefaultProps:void 0};const M3=(n={})=>{ff={...ff,...n}},Bf=()=>ff;let ly;const z3=n=>{ly=n},Hf=()=>ly,Vu=(n,l)=>{var u;if(!n)return!1;const i=((u=n.props)==null?void 0:u.children)??n.children;return l?i.length>0:!!i},Ui=n=>{var i,u;if(!n)return[];const l=((i=n.props)==null?void 0:i.children)??n.children;return(u=n.props)!=null&&u.i18nIsDynamicList?ia(l):l},L3=n=>Array.isArray(n)&&n.every(b.isValidElement),ia=n=>Array.isArray(n)?n:[n],D3=(n,l)=>{const i={...l};return i.props={...l.props,...n.props},i},k3=n=>{const l={};if(!n)return l;const i=u=>{ia(u).forEach(o=>{vt(o)||(Vu(o)?i(Ui(o)):jn(o)&&!b.isValidElement(o)&&Object.assign(l,o))})};return i(n),l},df=(n,l,i,u)=>{if(!n)return"";let s="";const o=ia(n),d=l!=null&&l.transSupportBasicHtmlNodes?l.transKeepBasicHtmlNodesFor??[]:[];return o.forEach((h,p)=>{if(vt(h)){s+=`${h}`;return}if(b.isValidElement(h)){const{props:m,type:v}=h,x=Object.keys(m).length,E=d.indexOf(v)>-1,C=m.children;if(!C&&E&&!x){s+=`<${v}/>`;return}if(!C&&(!E||x)||m.i18nIsDynamicList){s+=`<${p}></${p}>`;return}if(E&&x<=1){const w=vt(C)?C:df(C,l,i,u);s+=`<${v}>${w}</${v}>`;return}const N=df(C,l,i,u);s+=`<${p}>${N}</${p}>`;return}if(h===null){Yu(i,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:u});return}if(jn(h)){const{format:m,...v}=h,x=Object.keys(v);if(x.length===1){const E=m?`${x[0]}, ${m}`:x[0];s+=`{{${E}}}`;return}Yu(i,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:u,child:h});return}Yu(i,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:u,child:h})}),s},U3=(n,l=[],i={})=>{if(!n)return n;const u=Object.keys(i),s=[...l,...u];let o="",d=0;for(;d<n.length;)if(n[d]==="<"){let h=!1;const p=n.slice(d).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(p){const m=p[1];(/^\d+$/.test(m)||s.includes(m))&&(h=!0,o+=p[0],d+=p[0].length)}if(!h){const m=n.slice(d).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(m){const v=m[1];(/^\d+$/.test(v)||s.includes(v))&&(h=!0,o+=m[0],d+=m[0].length)}}h||(o+="&lt;",d+=1)}else o+=n[d],d+=1;return o},B3=(n,l,i,u,s,o,d)=>{if(i==="")return[];const h=s.transKeepBasicHtmlNodesFor||[],p=i&&new RegExp(h.map(T=>`<${T}`).join("|")).test(i);if(!n&&!l&&!p&&!d)return[i];const m=l??{},v=T=>{ia(T).forEach(U=>{vt(U)||(Vu(U)?v(Ui(U)):jn(U)&&!b.isValidElement(U)&&Object.assign(m,U))})};v(n);const x=U3(i,h,m),E=w3.parse(`<0>${x}</0>`),C={...m,...o},N=(T,z,U)=>{var G;const X=Ui(T),J=j(X,z.children,U);return L3(X)&&J.length===0||(G=T.props)!=null&&G.i18nIsDynamicList?X:J},w=(T,z,U,X,J)=>{T.dummy?(T.children=z,U.push(b.cloneElement(T,{key:X},J?void 0:z))):U.push(...b.Children.map([T],G=>{var q;if(G.type===b.Fragment||((q=G.props)==null?void 0:q.i18nIsDynamicList)!==void 0){const I={key:X};return G&&G.props&&Object.keys(G.props).forEach(oe=>{oe==="children"||oe==="i18nIsDynamicList"||(I[oe]=G.props[oe])}),b.createElement(G.type,I,J?null:z)}const K={key:X};return G&&G.props&&Object.keys(G.props).forEach(I=>{I==="ref"||I==="children"||(K[I]=G.props[I])}),b.cloneElement(G,K,J?null:z)}))},j=(T,z,U)=>{const X=ia(T),J=ia(z),G={};return J.reduce((K,q,I)=>{var ee,ae;const oe=((ae=(ee=q.children)==null?void 0:ee[0])==null?void 0:ae.content)&&u.services.interpolator.interpolate(q.children[0].content,C,u.language);if(q.type==="tag"){let te=X[parseInt(q.name,10)];!te&&l&&(te=l[q.name]),U.length===1&&!te&&(te=U[0][q.name]),te||(te={});const re={...q.attrs};d&&Object.keys(re).forEach(H=>{const P=re[H];vt(P)&&(re[H]=ay(P))});const M=Object.keys(re).length!==0?D3({props:re},te):te,Q=b.isValidElement(M),$=Q&&Vu(q,!0)&&!q.voidElement,Z=p&&jn(M)&&M.dummy&&!Q,W=jn(l)&&Object.hasOwnProperty.call(l,q.name);if(vt(M)){const H=u.services.interpolator.interpolate(M,C,u.language);K.push(H)}else if(Vu(M)||$){const H=N(M,q,U);w(M,H,K,I)}else if(Z){const H=j(X,q.children,U);w(M,H,K,I)}else if(Number.isNaN(parseFloat(q.name)))if(W){const H=N(M,q,U);w(M,H,K,I,q.voidElement)}else if(s.transSupportBasicHtmlNodes&&h.indexOf(q.name)>-1)if(q.voidElement)K.push(b.createElement(q.name,{key:`${q.name}-${I}`}));else{const H=G[q.name]||0;G[q.name]=H+1;let P,ne=0;for(let Ae=0;Ae<X.length;Ae+=1){const ot=X[Ae];if(b.isValidElement(ot)&&ot.type===q.name){if(ne===H){P=ot;break}ne+=1}}const de=P?ia(Ui(P)):X,fe=j(de,q.children,U);K.push(b.createElement(q.name,{key:`${q.name}-${I}`},fe))}else if(q.voidElement)K.push(`<${q.name} />`);else{const H=j(X,q.children,U);K.push(`<${q.name}>${H}</${q.name}>`)}else if(jn(M)&&!Q){const H=q.children[0]?oe:null;H&&K.push(H)}else w(M,oe,K,I,q.children.length!==1||!oe)}else if(q.type==="text"){const te=s.transWrapTextNodes,re=typeof s.unescape=="function"?s.unescape:Bf().unescape,M=d?re(u.services.interpolator.interpolate(q.content,C,u.language)):u.services.interpolator.interpolate(q.content,C,u.language);te?K.push(b.createElement(te,{key:`${q.name}-${I}`},M)):K.push(M)}return K},[])},R=j([{dummy:!0,children:n||[]}],E,ia(n||[]));return Ui(R[0])},iy=(n,l,i)=>{const u=n.key||l,s=b.cloneElement(n,{key:u});if(!s.props||!s.props.children||i.indexOf(`${l}/>`)<0&&i.indexOf(`${l} />`)<0)return s;function o(){return b.createElement(b.Fragment,null,s)}return b.createElement(o,{key:u})},H3=(n,l)=>n.map((i,u)=>iy(i,u,l)),q3=(n,l)=>{const i={};return Object.keys(n).forEach(u=>{Object.assign(i,{[u]:iy(n[u],u,l)})}),i},Y3=(n,l,i,u)=>n?Array.isArray(n)?H3(n,l):jn(n)?q3(n,l):(Xi(i,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:u}),null):null,V3=n=>!jn(n)||Array.isArray(n)?!1:Object.keys(n).reduce((l,i)=>l&&Number.isNaN(Number.parseFloat(i)),!0);function G3({children:n,count:l,parent:i,i18nKey:u,context:s,tOptions:o={},values:d,defaults:h,components:p,ns:m,i18n:v,t:x,shouldUnescape:E,...C}){var W,H,P,ne,de,fe;const N=v||Hf();if(!N)return Xi(N,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:u}),n;const w=x||N.t.bind(N)||(Ae=>Ae),j={...Bf(),...(W=N.options)==null?void 0:W.react};let R=m||w.ns||((H=N.options)==null?void 0:H.defaultNS);R=vt(R)?[R]:R||["translation"];const{transDefaultProps:T}=j,z=T!=null&&T.tOptions?{...T.tOptions,...o}:o,U=E??(T==null?void 0:T.shouldUnescape),X=T!=null&&T.values?{...T.values,...d}:d,J=T!=null&&T.components?{...T.components,...p}:p,G=df(n,j,N,u),K=h||(z==null?void 0:z.defaultValue)||G||j.transEmptyNodeValue||(typeof u=="function"?_a(u):u),{hashTransKey:q}=j,I=u||(q?q(G||K):G||K);(ne=(P=N.options)==null?void 0:P.interpolation)!=null&&ne.defaultVariables?d=X&&Object.keys(X).length>0?{...X,...N.options.interpolation.defaultVariables}:{...N.options.interpolation.defaultVariables}:d=X;const oe=k3(n);oe&&typeof oe.count=="number"&&l===void 0&&(l=oe.count);const ee=d||l!==void 0&&!((fe=(de=N.options)==null?void 0:de.interpolation)!=null&&fe.alwaysFormat)||!n?z.interpolation:{interpolation:{...z.interpolation,prefix:"#$?",suffix:"?$#"}},ae={...z,context:s||z.context,count:l,...d,...ee,defaultValue:K,ns:R};let te=I?w(I,ae):K;te===I&&K&&(te=K);const re=Y3(J,te,N,u);let M=re||n,Q=null;V3(re)&&(Q=re,M=n);const $=B3(M,Q,te,N,j,ae,U),Z=i??j.defaultTransParent;return Z?b.createElement(Z,C,$):$}const F3={type:"3rdParty",init(n){M3(n.options.react),z3(n)}},ry=b.createContext();class $3{constructor(){this.usedNamespaces={}}addUsedNamespaces(l){l.forEach(i=>{this.usedNamespaces[i]||(this.usedNamespaces[i]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function K3({children:n,count:l,parent:i,i18nKey:u,context:s,tOptions:o={},values:d,defaults:h,components:p,ns:m,i18n:v,t:x,shouldUnescape:E,...C}){var T;const{i18n:N,defaultNS:w}=b.useContext(ry)||{},j=v||N||Hf(),R=x||(j==null?void 0:j.t.bind(j));return G3({children:n,count:l,parent:i,i18nKey:u,context:s,tOptions:o,values:d,defaults:h,components:p,ns:m||(R==null?void 0:R.ns)||w||((T=j==null?void 0:j.options)==null?void 0:T.defaultNS),i18n:j,t:x,shouldUnescape:E,...C})}var Vc={exports:{}},Gc={};/**
225
+ * @license React
226
+ * use-sync-external-store-shim.production.js
227
+ *
228
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
229
+ *
230
+ * This source code is licensed under the MIT license found in the
231
+ * LICENSE file in the root directory of this source tree.
232
+ */var Mg;function X3(){if(Mg)return Gc;Mg=1;var n=Af();function l(x,E){return x===E&&(x!==0||1/x===1/E)||x!==x&&E!==E}var i=typeof Object.is=="function"?Object.is:l,u=n.useState,s=n.useEffect,o=n.useLayoutEffect,d=n.useDebugValue;function h(x,E){var C=E(),N=u({inst:{value:C,getSnapshot:E}}),w=N[0].inst,j=N[1];return o(function(){w.value=C,w.getSnapshot=E,p(w)&&j({inst:w})},[x,C,E]),s(function(){return p(w)&&j({inst:w}),x(function(){p(w)&&j({inst:w})})},[x]),d(C),C}function p(x){var E=x.getSnapshot;x=x.value;try{var C=E();return!i(x,C)}catch{return!0}}function m(x,E){return E()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return Gc.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,Gc}var zg;function Q3(){return zg||(zg=1,Vc.exports=X3()),Vc.exports}var Z3=Q3();const J3=(n,l)=>{if(vt(l))return l;if(jn(l)&&vt(l.defaultValue))return l.defaultValue;if(typeof n=="function")return"";if(Array.isArray(n)){const i=n[n.length-1];return typeof i=="function"?"":i}return n},I3={t:J3,ready:!1},W3=()=>()=>{},Ue=(n,l={})=>{var q,I,oe;const{i18n:i}=l,{i18n:u,defaultNS:s}=b.useContext(ry)||{},o=i||u||Hf();o&&!o.reportNamespaces&&(o.reportNamespaces=new $3),o||Xi(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const d=b.useMemo(()=>{var ee;return{...Bf(),...(ee=o==null?void 0:o.options)==null?void 0:ee.react,...l}},[o,l]),{useSuspense:h,keyPrefix:p}=d,m=s||((q=o==null?void 0:o.options)==null?void 0:q.defaultNS),v=vt(m)?[m]:m||["translation"],x=b.useMemo(()=>v,v);(oe=(I=o==null?void 0:o.reportNamespaces)==null?void 0:I.addUsedNamespaces)==null||oe.call(I,x);const E=b.useRef(0),C=b.useCallback(ee=>{if(!o)return W3;const{bindI18n:ae,bindI18nStore:te}=d,re=()=>{E.current+=1,ee()};return ae&&o.on(ae,re),te&&o.store.on(te,re),()=>{ae&&ae.split(" ").forEach(M=>o.off(M,re)),te&&te.split(" ").forEach(M=>o.store.off(M,re))}},[o,d]),N=b.useRef(),w=b.useCallback(()=>{if(!o)return I3;const ee=!!(o.isInitialized||o.initializedStoreOnce)&&x.every($=>T3($,o,d)),ae=l.lng||o.language,te=E.current,re=N.current;if(re&&re.ready===ee&&re.lng===ae&&re.keyPrefix===p&&re.revision===te)return re;const Q={t:o.getFixedT(ae,d.nsMode==="fallback"?x:x[0],p,{scopeNs:x}),ready:ee,lng:ae,keyPrefix:p,revision:te};return N.current=Q,Q},[o,x,p,d,l.lng]),[j,R]=b.useState(0),{t:T,ready:z}=Z3.useSyncExternalStore(C,w,w);b.useEffect(()=>{if(o&&!z&&!h){const ee=()=>R(ae=>ae+1);l.lng?_g(o,l.lng,x,ee):cf(o,x,ee)}},[o,l.lng,x,z,h,j]);const U=o||{},X=b.useRef(null),J=b.useRef(),G=ee=>{const ae=Object.getOwnPropertyDescriptors(ee);ae.__original&&delete ae.__original;const te=Object.create(Object.getPrototypeOf(ee),ae);if(!Object.prototype.hasOwnProperty.call(te,"__original"))try{Object.defineProperty(te,"__original",{value:ee,writable:!1,enumerable:!1,configurable:!1})}catch{}return te},K=b.useMemo(()=>{const ee=U,ae=ee==null?void 0:ee.language;let te=ee;ee&&(X.current&&X.current.__original===ee?J.current!==ae?(te=G(ee),X.current=te,J.current=ae):te=X.current:(te=G(ee),X.current=te,J.current=ae));const re=!z&&!h?(...Q)=>(Xi(o,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),T(...Q)):T,M=[re,te,z];return M.t=re,M.i18n=te,M.ready=z,M},[T,U,z,U.resolvedLanguage,U.language,U.languages]);if(o&&h&&!z)throw new Promise(ee=>{const ae=()=>ee();l.lng?_g(o,l.lng,x,ae):cf(o,x,ae)});return K};function P3(){const{t:n}=Ue(),l=Rt(s=>s.connectionState),i=b.useRef(!1);l==="disconnected"&&(i.current=!0),l==="connected"&&(i.current=!1);const u=i.current&&l!=="connected";return y.jsx("span",{className:`w-2 h-2 rounded-full transition-colors ${u?"bg-red-500":"bg-green-500"}`,title:n(u?"common.offline":"common.online")})}var qf=g0();function eE(n,l,i=12){const{innerWidth:u,innerHeight:s}=window;let o=n.x,d=n.y;return o+l.width+i>u&&(o=u-l.width-i),d+l.height+i>s&&(d=s-l.height-i),o=Math.max(i,o),d=Math.max(i,d),{left:o,top:d}}function tE({position:n,onClose:l,children:i}){const u=b.useRef(null),s=b.useRef(l);s.current=l;const o=b.useCallback(()=>s.current(),[]);return b.useEffect(()=>{function d(m){u.current&&!u.current.contains(m.target)&&o()}function h(m){u.current&&!u.current.contains(m.target)&&o()}function p(m){m.key==="Escape"&&o()}return document.addEventListener("mousedown",d),document.addEventListener("contextmenu",h),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("contextmenu",h),document.removeEventListener("keydown",p)}},[o]),b.useEffect(()=>{if(u.current){const d=u.current.getBoundingClientRect(),h=eE(n,{width:d.width,height:d.height});u.current.style.left=`${h.left}px`,u.current.style.top=`${h.top}px`,u.current.style.opacity="1"}},[n]),qf.createPortal(y.jsx("div",{ref:u,className:"glass-popover z-50 py-1.5 min-w-[160px]",style:{position:"fixed",left:n.x,top:n.y,opacity:0},children:i}),document.body)}function nE({icon:n,label:l,danger:i=!1,disabled:u=!1,onClick:s}){return y.jsxs("button",{onClick:o=>{o.stopPropagation(),u||s()},disabled:u,className:`w-full text-left flex items-center gap-2 px-3 py-1.5 text-[13px] leading-[18px] transition-colors ${u?"opacity-40 cursor-default":i?"text-red-500 hover:bg-[var(--fill-tertiary)]":"text-[var(--label-primary)] hover:bg-[var(--fill-tertiary)]"}`,children:[n&&y.jsx("span",{className:"flex-shrink-0 w-4 h-4 flex items-center justify-center",children:n}),y.jsx("span",{children:l})]})}const aE=500;function Lg({instances:n,selectedId:l,onSelect:i,onShutdown:u,onNewInstance:s}){const{t:o}=Ue(),d=nr(),h=Df(),[p,m]=b.useState(null),v=b.useRef(null),x=b.useRef(!1),E=b.useCallback((J,G)=>{J.preventDefault(),J.stopPropagation(),m({position:{x:J.clientX,y:J.clientY},instanceId:G})},[]),C=b.useCallback((J,G)=>{x.current=!1;const K=J.touches[0],q={x:K.clientX,y:K.clientY};v.current=setTimeout(()=>{var I;x.current=!0,(I=navigator.vibrate)==null||I.call(navigator,10),m({position:q,instanceId:G})},aE)},[]),N=b.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]),w=b.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]),j=b.useCallback(()=>m(null),[]),[R,T]=b.useState(null),z=b.useRef(null);b.useEffect(()=>()=>{z.current&&clearTimeout(z.current)},[]);const U=b.useCallback(J=>{navigator.clipboard.writeText(J).then(()=>{T(J),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>T(null),1500)},()=>{})},[]),X=b.useMemo(()=>{const J=new Map;for(const G of n){const K=J.get(G.edgeId);K?K.push(G):J.set(G.edgeId,[G])}return[...J.entries()].sort((G,K)=>G[0].localeCompare(K[0]))},[n]);return y.jsxs("aside",{className:"glass-panel select-none w-[240px] md:w-[240px] flex-shrink-0 flex flex-col overflow-hidden max-md:w-full max-md:flex-1",children:[y.jsx("div",{className:"px-4 pt-4 pb-2",children:y.jsxs("div",{className:"grid grid-cols-[auto_1fr] grid-rows-[auto_auto] gap-x-2.5 items-center",children:[y.jsx("div",{className:"row-span-2",children:y.jsx("img",{src:h,alt:"Paimon",className:"h-[34px] aspect-square object-contain"})}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("h1",{className:"text-[16px] leading-[20px] max-md:text-[18px] max-md:leading-[24px] font-semibold text-[var(--label-primary)]",children:"Paimon"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("button",{onClick:s,title:o("sidebar.newInstance"),className:"select-none w-6 h-6 flex items-center justify-center rounded-full text-[var(--label-secondary)] hover:text-[var(--label-primary)] hover:bg-[var(--fill-tertiary)] transition-all duration-150",children:y.jsx(ey,{size:16})}),y.jsx(P3,{})]})]}),y.jsxs("div",{className:"text-[12px] leading-[15px] max-md:text-[13px] max-md:leading-[18px] text-[var(--label-tertiary)]",children:[o("sidebar.machine",{count:X.length})," · ",o("sidebar.instance",{count:n.length})]})]})}),y.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-1 scrollbar-auto",children:n.length===0?y.jsx("div",{className:"px-3 py-8 text-center text-[var(--label-tertiary)] text-[12px] leading-[16px] max-md:text-[13px] max-md:leading-[18px]",children:o("sidebar.noInstances")}):y.jsx("div",{children:X.map(([J,G],K)=>y.jsxs("div",{children:[y.jsxs("button",{type:"button",onClick:()=>U(J),title:J,className:`flex items-center gap-1 px-2.5 pb-1 text-[11px] leading-[14px] font-semibold text-[var(--label-tertiary)] max-w-full max-md:px-3 rounded-[4px] hover:text-[var(--label-secondary)] transition-colors cursor-pointer ${K===0?"pt-1":"pt-3"}`,children:[y.jsx("span",{className:"truncate",children:J}),y.jsx("span",{className:"shrink-0 opacity-60",children:R===J?y.jsx(lr,{size:10,className:"text-green-500"}):y.jsx(W0,{size:10})})]}),y.jsx("ul",{className:"space-y-0.5 max-md:space-y-1",children:G.map(q=>{var I;return y.jsx("li",{children:y.jsxs("button",{onClick:()=>{x.current||i(q.id)},onContextMenu:oe=>E(oe,q.id),onTouchStart:oe=>C(oe,q.id),onTouchEnd:N,onTouchMove:w,className:`w-full text-left px-2.5 py-1.5 max-md:px-3 max-md:py-2.5 rounded-[8px] transition-all duration-150 ${l===q.id?"bg-[rgba(0,145,255,0.08)] dark:bg-[rgba(0,145,255,0.12)]":"hover:bg-[var(--fill-tertiary)]"}`,children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:`w-1.5 h-1.5 max-md:w-2 max-md:h-2 rounded-full flex-shrink-0 transition-colors ${q.status==="streaming"?"bg-[var(--color-accent)] animate-pulse":q.status==="compacting"?"bg-amber-500 animate-pulse":"bg-green-500"}`,title:q.status==="streaming"?o("sidebar.statusStreaming"):q.status==="compacting"?o("sidebar.statusCompacting"):o("sidebar.statusIdle")}),y.jsx("span",{className:"text-[14px] leading-[18px] max-md:text-[15px] max-md:leading-[21px] text-[var(--label-primary)] truncate",children:q.cwd.split("/").pop()||q.cwd})]}),y.jsx("div",{className:"ml-3.5 text-[11px] leading-[14px] max-md:text-[12px] max-md:leading-[16px] text-[var(--label-secondary)] truncate mt-0.5",children:q.model.name||`${q.model.provider}/${q.model.id}`}),((I=q.contextUsage)==null?void 0:I.percent)!=null&&q.contextUsage.percent>0&&y.jsx("div",{className:"ml-3.5 mt-1.5 h-[3px] rounded-full bg-[var(--fill-quaternary)] overflow-hidden",children:y.jsx("div",{className:"h-full rounded-full transition-all duration-300",style:{width:`${Math.max(2,Math.min(100,q.contextUsage.percent))}%`,backgroundColor:q.contextUsage.percent>=90?"#ff4245":q.contextUsage.percent>=60?"#ff9230":"#30d158"}})})]})},q.id)})})]},J))})}),p&&y.jsx(tE,{position:p.position,onClose:j,children:y.jsx(nE,{icon:y.jsx(n3,{size:14}),label:o("sidebar.shutdown"),danger:!0,onClick:()=>{u(p.instanceId),j()}})}),y.jsx("div",{className:"px-3 py-2 border-t border-[var(--separator)]",children:y.jsxs("button",{onClick:()=>d("/settings"),className:"flex items-center gap-2 w-full px-2.5 py-1.5 max-md:py-2.5 rounded-[8px] text-[var(--label-secondary)] hover:text-[var(--label-primary)] hover:bg-[var(--fill-tertiary)] transition-all duration-150",children:[y.jsx(s3,{size:15,className:"max-md:w-4 max-md:h-4"}),y.jsx("span",{className:"text-[13px] leading-[18px] max-md:text-[14px] max-md:leading-[20px]",children:o("sidebar.settings")})]})})]})}function hf(n){const l=n.id??n.__renderKey;if(!l)throw new Error(`SessionEntry missing stable render key: type=${n.type}`);return l}const Yf=Object.freeze({text:"",images:[]}),Ju=fs((n,l)=>({drafts:new Map,setDraft:(i,u)=>{n(s=>{const o=s.drafts.get(i)??Yf,d=typeof u=="function"?u(o):u,h=new Map(s.drafts);return d.text||d.images.length>0?h.set(i,d):h.delete(i),{drafts:h}})}})),Qi=n=>n!==void 0&&n!=="idle",st={eof:null,asterisk:42,underscore:95},Iu={characterGroupPunctuation:2,characterGroupWhitespace:1},la={emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",strong:"strong",strongSequence:"strongSequence",strongText:"strongText"},lE=161,iE=1114109,rE=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],uE=12288,sE=65510,oE=[12288,12288,65281,65376,65504,65510],cE=8361,fE=65518,dE=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],hE=32,pE=10630,mE=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],gE=4352,yE=262141,uy=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],ir=(n,l)=>{let i=0,u=Math.floor(n.length/2)-1;for(;i<=u;){const s=Math.floor((i+u)/2),o=s*2;if(l<n[o])u=s-1;else if(l>n[o+1])i=s+1;else return!0}return!1},Dg=19968,[xE,vE]=bE(uy);function bE(n){let l=n[0],i=n[1];for(let u=0;u<n.length;u+=2){const s=n[u],o=n[u+1];if(Dg>=s&&Dg<=o)return[s,o];o-s>i-l&&(l=s,i=o)}return[l,i]}const SE=n=>n<lE||n>iE?!1:ir(rE,n),EE=n=>n<uE||n>sE?!1:ir(oE,n),CE=n=>n<cE||n>fE?!1:ir(dE,n),NE=n=>n<hE||n>pE?!1:ir(mE,n),AE=n=>n>=xE&&n<=vE?!0:n<gE||n>yE?!1:ir(uy,n);function jE(n){return SE(n)?"ambiguous":EE(n)?"fullwidth":CE(n)?"halfwidth":NE(n)?"narrow":AE(n)?"wide":"neutral"}function wE(n){if(!Number.isSafeInteger(n))throw new TypeError(`Expected a code point, got \`${typeof n}\`.`)}function TE(n){return wE(n),jE(n)}function OE(n){return new RegExp("^\\p{Emoji_Presentation}","u").test(String.fromCodePoint(n))}function RE(n){if(!n||n<4352)return!1;switch(TE(n)){case"fullwidth":case"halfwidth":return!0;case"wide":return!OE(n);case"narrow":return!1;case"ambiguous":return 917760<=n&&n<=917999?null:!1;case"neutral":return new RegExp("^\\p{sc=Hangul}","u").test(String.fromCodePoint(n))}}function _E(n,l){return l!==65025||!n||n<8216?!1:n===8216||n===8217||n===8220||n===8221}function ME(n){return n!==null&&n>=65024&&n<=65038}const zE=sy(new RegExp("\\p{P}|\\p{S}","u")),LE=sy(/\s/);function sy(n){return l;function l(i){return i!==null&&i>-1&&n.test(String.fromCodePoint(i))}}function en(n){return!!(n&Iu.characterGroupWhitespace)}function Zi(n){return(n&Yt.cjkPunctuation)===Iu.characterGroupPunctuation}function oy(n){return!!(n&Yt.cjk)}function Wu(n){return!!(n&Yt.cjkOrIvs)}function Vf(n){return n===Yt.nonEmojiGeneralUseVS}function Pu(n){return!!(n&Yt.spaceOrPunctuation)}let Yt;(function(n){n.spaceOrPunctuation=3,n.cjk=4096,n.cjkPunctuation=4098,n.ivs=8192,n.cjkOrIvs=12288,n.nonEmojiGeneralUseVS=16384,n.variationSelector=24576,n.ivsToCjkRightShift=1})(Yt||(Yt={}));function ua(n){if(n===st.eof||Uv(n)||LE(n))return Iu.characterGroupWhitespace;let l=0;if(n>=4352){if(ME(n))return Yt.nonEmojiGeneralUseVS;switch(RE(n)){case null:return Yt.ivs;case!0:l|=Yt.cjk;break}}return zE(n)&&(l|=Iu.characterGroupPunctuation),l}function cy(n,l,i){if(!Vf(n))return n;const u=l(),s=ua(u);return!u||en(s)?n:_E(u,i)?Yt.cjkPunctuation:DE(s)}function DE(n){return n&~Yt.ivs}function kE(n){return!!(n&&n>=55296&&n<=56319)}function UE(n){return!!(n&&n>=56320&&n<=57343)}function BE(n,l,i){if(l._bufferIndex<2)return n;const u=i({start:{...l,_bufferIndex:l._bufferIndex-2},end:l}).codePointAt(0);return u&&u>=65536?u:n}function HE(n,l,i){const u=n>=65536?2:1;if(l._bufferIndex<1+u)return null;const s=l._bufferIndex-u-2,o=i({start:{...l,_bufferIndex:s>=0?s:0},end:{...l,_bufferIndex:l._bufferIndex-u}}),d=o.charCodeAt(o.length-1);if(Number.isNaN(d))return null;if(o.length<2||d<56320||57343<d)return d;const h=o.codePointAt(0);return h&&h>=65536?h:d}var qE=class{constructor(n,l,i){Im(this,"cachedValue");this.previousCode=n,this.nowPoint=l,this.sliceSerialize=i}value(){return this.cachedValue===void 0&&(this.cachedValue=HE(this.previousCode,this.nowPoint,this.sliceSerialize)),this.cachedValue}};function YE(n,l,i){const u=i({start:l,end:{...l,_bufferIndex:l._bufferIndex+2}}).codePointAt(0);return u&&u>=65536?u:n}const Fc={name:"attention",resolveAll:VE,tokenize:GE};function VE(n,l){let i=-1,u,s,o,d,h,p,m,v;for(;++i<n.length;)if(n[i][0]==="enter"&&n[i][1].type==="attentionSequence"&&n[i][1]._close){for(u=i;u--;)if(n[u][0]==="exit"&&n[u][1].type==="attentionSequence"&&n[u][1]._open&&l.sliceSerialize(n[u][1]).charCodeAt(0)===l.sliceSerialize(n[i][1]).charCodeAt(0)){if((n[u][1]._close||n[i][1]._open)&&(n[i][1].end.offset-n[i][1].start.offset)%3&&!((n[u][1].end.offset-n[u][1].start.offset+n[i][1].end.offset-n[i][1].start.offset)%3))continue;p=n[u][1].end.offset-n[u][1].start.offset>1&&n[i][1].end.offset-n[i][1].start.offset>1?2:1;const x={...n[u][1].end},E={...n[i][1].start};kg(x,-p),kg(E,p),d={type:p>1?la.strongSequence:la.emphasisSequence,start:x,end:{...n[u][1].end}},h={type:p>1?la.strongSequence:la.emphasisSequence,start:{...n[i][1].start},end:E},o={type:p>1?la.strongText:la.emphasisText,start:{...n[u][1].end},end:{...n[i][1].start}},s={type:p>1?la.strong:la.emphasis,start:{...d.start},end:{...h.end}},n[u][1].end={...d.start},n[i][1].start={...h.end},m=[],n[u][1].end.offset-n[u][1].start.offset&&(m=Mi(m,[["enter",n[u][1],l],["exit",n[u][1],l]])),m=Mi(m,[["enter",s,l],["enter",d,l],["exit",d,l],["enter",o,l]]),Bv(l.parser.constructs.insideSpan.null),m=Mi(m,Hv(l.parser.constructs.insideSpan.null,n.slice(u+1,i),l)),m=Mi(m,[["exit",o,l],["enter",h,l],["exit",h,l],["exit",s,l]]),n[i][1].end.offset-n[i][1].start.offset?(v=2,m=Mi(m,[["enter",n[i][1],l],["exit",n[i][1],l]])):v=0,qv(n,u-1,i-u+3,m),i=u+m.length-v-2;break}}for(i=-1;++i<n.length;)n[i][1].type==="attentionSequence"&&(n[i][1].type="data");return n}function GE(n,l){const i=this.parser.constructs.attentionMarkers.null,{now:u,sliceSerialize:s,previous:o}=this,d=UE(o)?BE(o,u(),s):o,h=ua(d),p=new qE(d,u(),s),m=cy(h,p.value.bind(p),d);let v;return x;function x(C){return v=C,n.enter("attentionSequence"),E(C)}function E(C){if(C===v)return n.consume(C),E;const N=n.exit("attentionSequence"),w=ua(kE(C)?YE(C,u(),s):C),j=Zi(m),R=j||en(m),T=Zi(w),z=T||en(w),U=Wu(m),X=!z||T&&(R||U)||i.includes(C),J=!R||j&&(z||oy(w))||i.includes(d);return N._open=!!(v===st.asterisk?X:X&&(Pu(m)||!J)),N._close=!!(v===st.asterisk?J:J&&(Pu(w)||!X)),l(C)}}function kg(n,l){n.column+=l,n.offset+=l,n._bufferIndex+=l}function FE(){return{text:{[st.asterisk]:Fc,[st.underscore]:Fc},insideSpan:{null:[Fc]}}}function $E(){const n=this.data();(n.micromarkExtensions||(n.micromarkExtensions=[])).push(FE())}const KE=";".codePointAt(0)??st.eof,XE="&".codePointAt(0)??st.eof;function QE(){return{handlers:{emphasis:fy,strong:dy,text:ZE}}}fy.peek=hy;dy.peek=py;function fy(n,l,i,u){return my(n,l,i,u,hy(n,l,i),1)}function dy(n,l,i,u){return my(n,l,i,u,py(n,l,i),2)}function hy(n,l,i){return i.options.emphasis||"*"}function py(n,l,i){return i.options.strong||"*"}function my(n,l,i,u,s,o){const d=s.repeat(o),h=i.enter(o===1?"emphasis":"strong"),p=i.createTracker(u),m=p.move(d);let v=p.move(i.containerPhrasing(n,{after:s,before:m,...p.current()}));const x=WE(n,l,i,u.before),E=PE(n,l,i,u.after),C=Ug(x,es(v),s,"open");C.inside&&v&&(v=lC(v));const N=Ug({current:mf(v),previous:pf(v)},E,s,"close");N.inside&&v&&(v=iC(v));const w=p.move(d);h();const j=N.outside&&aC(l,i);return i.attentionEncodeSurroundingInfo={after:N.outside&&!j,before:C.outside},i.cjkFriendlyEncodeAfterSupplementaryText=j,m+v+w}function ZE(n,l,i,u){const s=i;if(!s.cjkFriendlyEncodeAfterSupplementaryText)return i.safe(n.value,u);s.cjkFriendlyEncodeAfterSupplementaryText=!1;const[o=""]=[...n.value],d=n.value.slice(o.length);return`${Ff(o.codePointAt(0)??st.eof)}${i.safe(d,{...u,before:";"})}`}function Ug(n,l,i,u){const s=Gf(n),o=ua(l);if(!Wu(s)&&!Wu(o))return u==="open"?Bg(s,o,i):Bg(o,s,i);const d={inside:!1,outside:!1},h={inside:!0,outside:!1},p={inside:!1,outside:!0},m={inside:!0,outside:!0};for(const v of[d,h,p,m]){const x=u==="open"?v.outside?Hg:n:v.inside?Hg:n,E=u==="open"?v.inside?qg:l:v.outside?qg:l;if(u==="open"?JE(i,x,E):IE(i,x,E))return v}return m}function Bg(n,l,i){return $c(n)?$c(l)?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:en(l)?{inside:!0,outside:!0}:{inside:!1,outside:!0}:en(n)?$c(l)?{inside:!1,outside:!1}:en(l)?{inside:!0,outside:!0}:{inside:!1,outside:!1}:en(l)?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function JE(n,l,i){const u=Gf(l),{close:s,open:o}=gy(u,ua(i));return n==="_"?o&&(Pu(u)||!s):o}function IE(n,l,i){const u=ua(i),{close:s,open:o}=gy(Gf(l),u);return n==="_"?s&&(Pu(u)||!o):s}function gy(n,l){const i=Zi(n),u=i||en(n),s=Zi(l),o=s||en(l);return{open:!o||s&&(u||Wu(n)),close:!u||i&&(o||oy(l))}}function $c(n){return!en(n)&&!Zi(n)}function Gf(n){const l=ua(n.current);return n.current===null||!Vf(l)?l:cy(l,()=>n.previous,n.current)}function WE(n,l,i,u){let s=mf(u),o=pf(u);if(eC(s)||nC(s,o)){const d=yy(n,l,i,-1);d&&(s=mf(d),o=pf(d))}return{current:s,previous:o}}function PE(n,l,i,u){const s=es(u);if(!tC(s))return s;const o=yy(n,l,i,1);return o?es(o):s}function eC(n){return n!==null&&56320<=n&&n<=57343}function tC(n){return n!==null&&55296<=n&&n<=56319}function nC(n,l){return Vf(ua(n))&&(l===null||l===st.eof)}function yy(n,l,i,u){if(!l)return;const s=i.indexStack.at(-1),o=l.children,d=typeof s=="number"?s:o.indexOf(n);if(d<0)return;const h=o[d+u];return xy(h)||void 0}function aC(n,l){if(!n)return!1;const i=l.indexStack.at(-1);if(typeof i!="number")return!1;const u=n.children[i+1];return(u==null?void 0:u.type)==="text"&&(es(u.value)??0)>65535}function xy(n){return!n||typeof n!="object"?"":"value"in n&&typeof n.value=="string"?n.value:"alt"in n&&typeof n.alt=="string"?n.alt:"children"in n&&Array.isArray(n.children)?n.children.map(xy).join(""):""}function Ff(n){return`&#x${(n??0).toString(16).toUpperCase()};`}function lC(n){const[l=""]=[...n];return Ff(l.codePointAt(0)??st.eof)+n.slice(l.length)}function iC(n){const l=[...n],i=l.pop();return`${l.join("")}${Ff((i==null?void 0:i.codePointAt(0))??st.eof)}`}function pf(n){var i;const l=[...n];return l.pop(),((i=l.at(-1))==null?void 0:i.codePointAt(0))??st.eof}function es(n){return n.codePointAt(0)??st.eof}function mf(n){var l;return((l=[...n].at(-1))==null?void 0:l.codePointAt(0))??st.eof}const Hg={current:KE,previous:st.eof},qg=XE;function rC(){const n=this.data();(n.toMarkdownExtensions||(n.toMarkdownExtensions=[])).push(QE())}function uC(){$E.call(this),rC.call(this)}var sC=uC,Kc={exports:{}},Yg;function oC(){return Yg||(Yg=1,(function(n){(function(){var l;l=n.exports=s,l.format=s,l.vsprintf=u,typeof console<"u"&&typeof console.log=="function"&&(l.printf=i);function i(){console.log(s.apply(null,arguments))}function u(o,d){return s.apply(null,[o].concat(d))}function s(o){for(var d=1,h=[].slice.call(arguments),p=0,m=o.length,v="",x,E=!1,C,N,w=!1,j,R=function(){return h[d++]},T=function(){for(var z="";/\d/.test(o[p]);)z+=o[p++],x=o[p];return z.length>0?parseInt(z):null};p<m;++p)if(x=o[p],E)switch(E=!1,x=="."?(w=!1,x=o[++p]):x=="0"&&o[p+1]=="."?(w=!0,p+=2,x=o[p]):w=!0,j=T(),x){case"b":v+=parseInt(R(),10).toString(2);break;case"c":C=R(),typeof C=="string"||C instanceof String?v+=C:v+=String.fromCharCode(parseInt(C,10));break;case"d":v+=parseInt(R(),10);break;case"f":N=String(parseFloat(R()).toFixed(j||6)),v+=w?N:N.replace(/^0/,"");break;case"j":v+=JSON.stringify(R());break;case"o":v+="0"+parseInt(R(),10).toString(8);break;case"s":v+=R();break;case"x":v+="0x"+parseInt(R(),10).toString(16);break;case"X":v+="0x"+parseInt(R(),10).toString(16).toUpperCase();break;default:v+=x;break}else x==="%"?E=!0:v+=x;return v}})()})(Kc)),Kc.exports}var cC=oC();const fC=m0(cC),Lu=Object.assign(Oa(Error),{eval:Oa(EvalError),range:Oa(RangeError),reference:Oa(ReferenceError),syntax:Oa(SyntaxError),type:Oa(TypeError),uri:Oa(URIError)});function Oa(n){return l.displayName=n.displayName||n.name,l;function l(i,...u){const s=i&&fC(i,...u);return new n(s)}}const Du={}.hasOwnProperty,Vg={yaml:"-",toml:"+"};function $f(n){const l=[];let i=-1;const u=Array.isArray(n)?n:n?[n]:["yaml"];for(;++i<u.length;)l[i]=dC(u[i]);return l}function dC(n){let l=n;if(typeof l=="string"){if(!Du.call(Vg,l))throw Lu("Missing matter definition for `%s`",l);l={type:l,marker:Vg[l]}}else if(typeof l!="object")throw Lu("Expected matter to be an object, not `%j`",l);if(!Du.call(l,"type"))throw Lu("Missing `type` in matter `%j`",l);if(!Du.call(l,"fence")&&!Du.call(l,"marker"))throw Lu("Missing `marker` or `fence` in matter `%j`",l);return l}function hC(n){const l=$f(n),i={};let u=-1;for(;++u<l.length;){const s=l[u],o=gf(s,"open").charCodeAt(0),d=pC(s),h=i[o];Array.isArray(h)?h.push(d):i[o]=[d]}return{flow:i}}function pC(n){const l=n.anywhere,i=n.type,u=i+"Fence",s=u+"Sequence",o=i+"Value",d={tokenize:v,partial:!0};let h,p=0;return{tokenize:m,concrete:!0};function m(x,E,C){const N=this;return w;function w(G){const K=N.now();return K.column===1&&(K.line===1||l)&&(h=gf(n,"open"),p=0,G===h.charCodeAt(p))?(x.enter(i),x.enter(u),x.enter(s),j(G)):C(G)}function j(G){return p===h.length?(x.exit(s),Ru(G)?(x.enter("whitespace"),R(G)):T(G)):G===h.charCodeAt(p++)?(x.consume(G),j):C(G)}function R(G){return Ru(G)?(x.consume(G),R):(x.exit("whitespace"),T(G))}function T(G){return _u(G)?(x.exit(u),x.enter("lineEnding"),x.consume(G),x.exit("lineEnding"),h=gf(n,"close"),p=0,x.attempt(d,J,z)):C(G)}function z(G){return G===null||_u(G)?X(G):(x.enter(o),U(G))}function U(G){return G===null||_u(G)?(x.exit(o),X(G)):(x.consume(G),U)}function X(G){return G===null?C(G):(x.enter("lineEnding"),x.consume(G),x.exit("lineEnding"),x.attempt(d,J,z))}function J(G){return x.exit(i),E(G)}}function v(x,E,C){let N=0;return w;function w(z){return z===h.charCodeAt(N)?(x.enter(u),x.enter(s),j(z)):C(z)}function j(z){return N===h.length?(x.exit(s),Ru(z)?(x.enter("whitespace"),R(z)):T(z)):z===h.charCodeAt(N++)?(x.consume(z),j):C(z)}function R(z){return Ru(z)?(x.consume(z),R):(x.exit("whitespace"),T(z))}function T(z){return z===null||_u(z)?(x.exit(u),E(z)):C(z)}}}function gf(n,l){return n.marker?Gg(n.marker,l).repeat(3):Gg(n.fence,l)}function Gg(n,l){return typeof n=="string"?n:n[l]}function mC(n){const l=$f(n),i={},u={};let s=-1;for(;++s<l.length;){const o=l[s];i[o.type]=gC(o),u[o.type]=yC,u[o.type+"Value"]=xC}return{enter:i,exit:u}}function gC(n){return l;function l(i){this.enter({type:n.type,value:""},i),this.buffer()}}function yC(n){const l=this.resume(),i=this.stack[this.stack.length-1];this.exit(n),i.value=l.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function xC(n){this.config.enter.data.call(this,n),this.config.exit.data.call(this,n)}function vC(n){const l=[],i={},u=$f(n);let s=-1;for(;++s<u.length;){const o=u[s];i[o.type]=bC(o);const d=yf(o,"open");l.push({atBreak:!0,character:d.charAt(0),after:Yv(d.charAt(1))})}return{unsafe:l,handlers:i}}function bC(n){const l=yf(n,"open"),i=yf(n,"close");return u;function u(s){return l+(s.value?`
233
+ `+s.value:"")+`
234
+ `+i}}function yf(n,l){return n.marker?Fg(n.marker,l).repeat(3):Fg(n.fence,l)}function Fg(n,l){return typeof n=="string"?n:n[l]}const SC="yaml";function EC(n){const l=this,i=n||SC,u=l.data(),s=u.micromarkExtensions||(u.micromarkExtensions=[]),o=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),d=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);s.push(hC(i)),o.push(mC(i)),d.push(vC(i))}/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function vy(n){return typeof n>"u"||n===null}function CC(n){return typeof n=="object"&&n!==null}function NC(n){return Array.isArray(n)?n:vy(n)?[]:[n]}function AC(n,l){var i,u,s,o;if(l)for(o=Object.keys(l),i=0,u=o.length;i<u;i+=1)s=o[i],n[s]=l[s];return n}function jC(n,l){var i="",u;for(u=0;u<l;u+=1)i+=n;return i}function wC(n){return n===0&&Number.NEGATIVE_INFINITY===1/n}var TC=vy,OC=CC,RC=NC,_C=jC,MC=wC,zC=AC,Qe={isNothing:TC,isObject:OC,toArray:RC,repeat:_C,isNegativeZero:MC,extend:zC};function by(n,l){var i="",u=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(i+='in "'+n.mark.name+'" '),i+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!l&&n.mark.snippet&&(i+=`
235
+
236
+ `+n.mark.snippet),u+" "+i):u}function Ji(n,l){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=l,this.message=by(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ji.prototype=Object.create(Error.prototype);Ji.prototype.constructor=Ji;Ji.prototype.toString=function(l){return this.name+": "+by(this,l)};var ut=Ji;function Xc(n,l,i,u,s){var o="",d="",h=Math.floor(s/2)-1;return u-l>h&&(o=" ... ",l=u-h+o.length),i-u>h&&(d=" ...",i=u+h-d.length),{str:o+n.slice(l,i).replace(/\t/g,"→")+d,pos:u-l+o.length}}function Qc(n,l){return Qe.repeat(" ",l-n.length)+n}function LC(n,l){if(l=Object.create(l||null),!n.buffer)return null;l.maxLength||(l.maxLength=79),typeof l.indent!="number"&&(l.indent=1),typeof l.linesBefore!="number"&&(l.linesBefore=3),typeof l.linesAfter!="number"&&(l.linesAfter=2);for(var i=/\r?\n|\r|\0/g,u=[0],s=[],o,d=-1;o=i.exec(n.buffer);)s.push(o.index),u.push(o.index+o[0].length),n.position<=o.index&&d<0&&(d=u.length-2);d<0&&(d=u.length-1);var h="",p,m,v=Math.min(n.line+l.linesAfter,s.length).toString().length,x=l.maxLength-(l.indent+v+3);for(p=1;p<=l.linesBefore&&!(d-p<0);p++)m=Xc(n.buffer,u[d-p],s[d-p],n.position-(u[d]-u[d-p]),x),h=Qe.repeat(" ",l.indent)+Qc((n.line-p+1).toString(),v)+" | "+m.str+`
237
+ `+h;for(m=Xc(n.buffer,u[d],s[d],n.position,x),h+=Qe.repeat(" ",l.indent)+Qc((n.line+1).toString(),v)+" | "+m.str+`
238
+ `,h+=Qe.repeat("-",l.indent+v+3+m.pos)+`^
239
+ `,p=1;p<=l.linesAfter&&!(d+p>=s.length);p++)m=Xc(n.buffer,u[d+p],s[d+p],n.position-(u[d]-u[d+p]),x),h+=Qe.repeat(" ",l.indent)+Qc((n.line+p+1).toString(),v)+" | "+m.str+`
240
+ `;return h.replace(/\n$/,"")}var DC=LC,kC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],UC=["scalar","sequence","mapping"];function BC(n){var l={};return n!==null&&Object.keys(n).forEach(function(i){n[i].forEach(function(u){l[String(u)]=i})}),l}function HC(n,l){if(l=l||{},Object.keys(l).forEach(function(i){if(kC.indexOf(i)===-1)throw new ut('Unknown option "'+i+'" is met in definition of "'+n+'" YAML type.')}),this.options=l,this.tag=n,this.kind=l.kind||null,this.resolve=l.resolve||function(){return!0},this.construct=l.construct||function(i){return i},this.instanceOf=l.instanceOf||null,this.predicate=l.predicate||null,this.represent=l.represent||null,this.representName=l.representName||null,this.defaultStyle=l.defaultStyle||null,this.multi=l.multi||!1,this.styleAliases=BC(l.styleAliases||null),UC.indexOf(this.kind)===-1)throw new ut('Unknown kind "'+this.kind+'" is specified for "'+n+'" YAML type.')}var nt=HC;function $g(n,l){var i=[];return n[l].forEach(function(u){var s=i.length;i.forEach(function(o,d){o.tag===u.tag&&o.kind===u.kind&&o.multi===u.multi&&(s=d)}),i[s]=u}),i}function qC(){var n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},l,i;function u(s){s.multi?(n.multi[s.kind].push(s),n.multi.fallback.push(s)):n[s.kind][s.tag]=n.fallback[s.tag]=s}for(l=0,i=arguments.length;l<i;l+=1)arguments[l].forEach(u);return n}function xf(n){return this.extend(n)}xf.prototype.extend=function(l){var i=[],u=[];if(l instanceof nt)u.push(l);else if(Array.isArray(l))u=u.concat(l);else if(l&&(Array.isArray(l.implicit)||Array.isArray(l.explicit)))l.implicit&&(i=i.concat(l.implicit)),l.explicit&&(u=u.concat(l.explicit));else throw new ut("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(o){if(!(o instanceof nt))throw new ut("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new ut("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new ut("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),u.forEach(function(o){if(!(o instanceof nt))throw new ut("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(xf.prototype);return s.implicit=(this.implicit||[]).concat(i),s.explicit=(this.explicit||[]).concat(u),s.compiledImplicit=$g(s,"implicit"),s.compiledExplicit=$g(s,"explicit"),s.compiledTypeMap=qC(s.compiledImplicit,s.compiledExplicit),s};var Sy=xf,Ey=new nt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(n){return n!==null?n:""}}),Cy=new nt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(n){return n!==null?n:[]}}),Ny=new nt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(n){return n!==null?n:{}}}),Ay=new Sy({explicit:[Ey,Cy,Ny]});function YC(n){if(n===null)return!0;var l=n.length;return l===1&&n==="~"||l===4&&(n==="null"||n==="Null"||n==="NULL")}function VC(){return null}function GC(n){return n===null}var jy=new nt("tag:yaml.org,2002:null",{kind:"scalar",resolve:YC,construct:VC,predicate:GC,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function FC(n){if(n===null)return!1;var l=n.length;return l===4&&(n==="true"||n==="True"||n==="TRUE")||l===5&&(n==="false"||n==="False"||n==="FALSE")}function $C(n){return n==="true"||n==="True"||n==="TRUE"}function KC(n){return Object.prototype.toString.call(n)==="[object Boolean]"}var wy=new nt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:FC,construct:$C,predicate:KC,represent:{lowercase:function(n){return n?"true":"false"},uppercase:function(n){return n?"TRUE":"FALSE"},camelcase:function(n){return n?"True":"False"}},defaultStyle:"lowercase"});function XC(n){return 48<=n&&n<=57||65<=n&&n<=70||97<=n&&n<=102}function QC(n){return 48<=n&&n<=55}function ZC(n){return 48<=n&&n<=57}function JC(n){if(n===null)return!1;var l=n.length,i=0,u=!1,s;if(!l)return!1;if(s=n[i],(s==="-"||s==="+")&&(s=n[++i]),s==="0"){if(i+1===l)return!0;if(s=n[++i],s==="b"){for(i++;i<l;i++)if(s=n[i],s!=="_"){if(s!=="0"&&s!=="1")return!1;u=!0}return u&&s!=="_"}if(s==="x"){for(i++;i<l;i++)if(s=n[i],s!=="_"){if(!XC(n.charCodeAt(i)))return!1;u=!0}return u&&s!=="_"}if(s==="o"){for(i++;i<l;i++)if(s=n[i],s!=="_"){if(!QC(n.charCodeAt(i)))return!1;u=!0}return u&&s!=="_"}}if(s==="_")return!1;for(;i<l;i++)if(s=n[i],s!=="_"){if(!ZC(n.charCodeAt(i)))return!1;u=!0}return!(!u||s==="_")}function IC(n){var l=n,i=1,u;if(l.indexOf("_")!==-1&&(l=l.replace(/_/g,"")),u=l[0],(u==="-"||u==="+")&&(u==="-"&&(i=-1),l=l.slice(1),u=l[0]),l==="0")return 0;if(u==="0"){if(l[1]==="b")return i*parseInt(l.slice(2),2);if(l[1]==="x")return i*parseInt(l.slice(2),16);if(l[1]==="o")return i*parseInt(l.slice(2),8)}return i*parseInt(l,10)}function WC(n){return Object.prototype.toString.call(n)==="[object Number]"&&n%1===0&&!Qe.isNegativeZero(n)}var Ty=new nt("tag:yaml.org,2002:int",{kind:"scalar",resolve:JC,construct:IC,predicate:WC,represent:{binary:function(n){return n>=0?"0b"+n.toString(2):"-0b"+n.toString(2).slice(1)},octal:function(n){return n>=0?"0o"+n.toString(8):"-0o"+n.toString(8).slice(1)},decimal:function(n){return n.toString(10)},hexadecimal:function(n){return n>=0?"0x"+n.toString(16).toUpperCase():"-0x"+n.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),PC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function eN(n){return!(n===null||!PC.test(n)||n[n.length-1]==="_")}function tN(n){var l,i;return l=n.replace(/_/g,"").toLowerCase(),i=l[0]==="-"?-1:1,"+-".indexOf(l[0])>=0&&(l=l.slice(1)),l===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:l===".nan"?NaN:i*parseFloat(l,10)}var nN=/^[-+]?[0-9]+e/;function aN(n,l){var i;if(isNaN(n))switch(l){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===n)switch(l){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===n)switch(l){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Qe.isNegativeZero(n))return"-0.0";return i=n.toString(10),nN.test(i)?i.replace("e",".e"):i}function lN(n){return Object.prototype.toString.call(n)==="[object Number]"&&(n%1!==0||Qe.isNegativeZero(n))}var Oy=new nt("tag:yaml.org,2002:float",{kind:"scalar",resolve:eN,construct:tN,predicate:lN,represent:aN,defaultStyle:"lowercase"}),Ry=Ay.extend({implicit:[jy,wy,Ty,Oy]}),_y=Ry,My=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),zy=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function iN(n){return n===null?!1:My.exec(n)!==null||zy.exec(n)!==null}function rN(n){var l,i,u,s,o,d,h,p=0,m=null,v,x,E;if(l=My.exec(n),l===null&&(l=zy.exec(n)),l===null)throw new Error("Date resolve error");if(i=+l[1],u=+l[2]-1,s=+l[3],!l[4])return new Date(Date.UTC(i,u,s));if(o=+l[4],d=+l[5],h=+l[6],l[7]){for(p=l[7].slice(0,3);p.length<3;)p+="0";p=+p}return l[9]&&(v=+l[10],x=+(l[11]||0),m=(v*60+x)*6e4,l[9]==="-"&&(m=-m)),E=new Date(Date.UTC(i,u,s,o,d,h,p)),m&&E.setTime(E.getTime()-m),E}function uN(n){return n.toISOString()}var Ly=new nt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:iN,construct:rN,instanceOf:Date,represent:uN});function sN(n){return n==="<<"||n===null}var Dy=new nt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:sN}),Kf=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
241
+ \r`;function oN(n){if(n===null)return!1;var l,i,u=0,s=n.length,o=Kf;for(i=0;i<s;i++)if(l=o.indexOf(n.charAt(i)),!(l>64)){if(l<0)return!1;u+=6}return u%8===0}function cN(n){var l,i,u=n.replace(/[\r\n=]/g,""),s=u.length,o=Kf,d=0,h=[];for(l=0;l<s;l++)l%4===0&&l&&(h.push(d>>16&255),h.push(d>>8&255),h.push(d&255)),d=d<<6|o.indexOf(u.charAt(l));return i=s%4*6,i===0?(h.push(d>>16&255),h.push(d>>8&255),h.push(d&255)):i===18?(h.push(d>>10&255),h.push(d>>2&255)):i===12&&h.push(d>>4&255),new Uint8Array(h)}function fN(n){var l="",i=0,u,s,o=n.length,d=Kf;for(u=0;u<o;u++)u%3===0&&u&&(l+=d[i>>18&63],l+=d[i>>12&63],l+=d[i>>6&63],l+=d[i&63]),i=(i<<8)+n[u];return s=o%3,s===0?(l+=d[i>>18&63],l+=d[i>>12&63],l+=d[i>>6&63],l+=d[i&63]):s===2?(l+=d[i>>10&63],l+=d[i>>4&63],l+=d[i<<2&63],l+=d[64]):s===1&&(l+=d[i>>2&63],l+=d[i<<4&63],l+=d[64],l+=d[64]),l}function dN(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}var ky=new nt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:oN,construct:cN,predicate:dN,represent:fN}),hN=Object.prototype.hasOwnProperty,pN=Object.prototype.toString;function mN(n){if(n===null)return!0;var l=[],i,u,s,o,d,h=n;for(i=0,u=h.length;i<u;i+=1){if(s=h[i],d=!1,pN.call(s)!=="[object Object]")return!1;for(o in s)if(hN.call(s,o))if(!d)d=!0;else return!1;if(!d)return!1;if(l.indexOf(o)===-1)l.push(o);else return!1}return!0}function gN(n){return n!==null?n:[]}var Uy=new nt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:mN,construct:gN}),yN=Object.prototype.toString;function xN(n){if(n===null)return!0;var l,i,u,s,o,d=n;for(o=new Array(d.length),l=0,i=d.length;l<i;l+=1){if(u=d[l],yN.call(u)!=="[object Object]"||(s=Object.keys(u),s.length!==1))return!1;o[l]=[s[0],u[s[0]]]}return!0}function vN(n){if(n===null)return[];var l,i,u,s,o,d=n;for(o=new Array(d.length),l=0,i=d.length;l<i;l+=1)u=d[l],s=Object.keys(u),o[l]=[s[0],u[s[0]]];return o}var By=new nt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:xN,construct:vN}),bN=Object.prototype.hasOwnProperty;function SN(n){if(n===null)return!0;var l,i=n;for(l in i)if(bN.call(i,l)&&i[l]!==null)return!1;return!0}function EN(n){return n!==null?n:{}}var Hy=new nt("tag:yaml.org,2002:set",{kind:"mapping",resolve:SN,construct:EN}),Xf=_y.extend({implicit:[Ly,Dy],explicit:[ky,Uy,By,Hy]}),sa=Object.prototype.hasOwnProperty,ts=1,qy=2,Yy=3,ns=4,Zc=1,CN=2,Kg=3,NN=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,AN=/[\x85\u2028\u2029]/,jN=/[,\[\]\{\}]/,Vy=/^(?:!|!!|![a-z\-]+!)$/i,Gy=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Xg(n){return Object.prototype.toString.call(n)}function tn(n){return n===10||n===13}function Ma(n){return n===9||n===32}function xt(n){return n===9||n===32||n===10||n===13}function Al(n){return n===44||n===91||n===93||n===123||n===125}function wN(n){var l;return 48<=n&&n<=57?n-48:(l=n|32,97<=l&&l<=102?l-97+10:-1)}function TN(n){return n===120?2:n===117?4:n===85?8:0}function ON(n){return 48<=n&&n<=57?n-48:-1}function Qg(n){return n===48?"\0":n===97?"\x07":n===98?"\b":n===116||n===9?" ":n===110?`
242
+ `:n===118?"\v":n===102?"\f":n===114?"\r":n===101?"\x1B":n===32?" ":n===34?'"':n===47?"/":n===92?"\\":n===78?"…":n===95?" ":n===76?"\u2028":n===80?"\u2029":""}function RN(n){return n<=65535?String.fromCharCode(n):String.fromCharCode((n-65536>>10)+55296,(n-65536&1023)+56320)}function Fy(n,l,i){l==="__proto__"?Object.defineProperty(n,l,{configurable:!0,enumerable:!0,writable:!0,value:i}):n[l]=i}var $y=new Array(256),Ky=new Array(256);for(var Sl=0;Sl<256;Sl++)$y[Sl]=Qg(Sl)?1:0,Ky[Sl]=Qg(Sl);function _N(n,l){this.input=n,this.filename=l.filename||null,this.schema=l.schema||Xf,this.onWarning=l.onWarning||null,this.legacy=l.legacy||!1,this.json=l.json||!1,this.listener=l.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=n.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Xy(n,l){var i={name:n.filename,buffer:n.input.slice(0,-1),position:n.position,line:n.line,column:n.position-n.lineStart};return i.snippet=DC(i),new ut(l,i)}function ue(n,l){throw Xy(n,l)}function as(n,l){n.onWarning&&n.onWarning.call(null,Xy(n,l))}var Zg={YAML:function(l,i,u){var s,o,d;l.version!==null&&ue(l,"duplication of %YAML directive"),u.length!==1&&ue(l,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(u[0]),s===null&&ue(l,"ill-formed argument of the YAML directive"),o=parseInt(s[1],10),d=parseInt(s[2],10),o!==1&&ue(l,"unacceptable YAML version of the document"),l.version=u[0],l.checkLineBreaks=d<2,d!==1&&d!==2&&as(l,"unsupported YAML version of the document")},TAG:function(l,i,u){var s,o;u.length!==2&&ue(l,"TAG directive accepts exactly two arguments"),s=u[0],o=u[1],Vy.test(s)||ue(l,"ill-formed tag handle (first argument) of the TAG directive"),sa.call(l.tagMap,s)&&ue(l,'there is a previously declared suffix for "'+s+'" tag handle'),Gy.test(o)||ue(l,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{ue(l,"tag prefix is malformed: "+o)}l.tagMap[s]=o}};function ra(n,l,i,u){var s,o,d,h;if(l<i){if(h=n.input.slice(l,i),u)for(s=0,o=h.length;s<o;s+=1)d=h.charCodeAt(s),d===9||32<=d&&d<=1114111||ue(n,"expected valid JSON character");else NN.test(h)&&ue(n,"the stream contains non-printable characters");n.result+=h}}function Jg(n,l,i,u){var s,o,d,h;for(Qe.isObject(i)||ue(n,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(i),d=0,h=s.length;d<h;d+=1)o=s[d],sa.call(l,o)||(Fy(l,o,i[o]),u[o]=!0)}function jl(n,l,i,u,s,o,d,h,p){var m,v;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),m=0,v=s.length;m<v;m+=1)Array.isArray(s[m])&&ue(n,"nested arrays are not supported inside keys"),typeof s=="object"&&Xg(s[m])==="[object Object]"&&(s[m]="[object Object]");if(typeof s=="object"&&Xg(s)==="[object Object]"&&(s="[object Object]"),s=String(s),l===null&&(l={}),u==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(m=0,v=o.length;m<v;m+=1)Jg(n,l,o[m],i);else Jg(n,l,o,i);else!n.json&&!sa.call(i,s)&&sa.call(l,s)&&(n.line=d||n.line,n.lineStart=h||n.lineStart,n.position=p||n.position,ue(n,"duplicated mapping key")),Fy(l,s,o),delete i[s];return l}function Qf(n){var l;l=n.input.charCodeAt(n.position),l===10?n.position++:l===13?(n.position++,n.input.charCodeAt(n.position)===10&&n.position++):ue(n,"a line break is expected"),n.line+=1,n.lineStart=n.position,n.firstTabInLine=-1}function Ke(n,l,i){for(var u=0,s=n.input.charCodeAt(n.position);s!==0;){for(;Ma(s);)s===9&&n.firstTabInLine===-1&&(n.firstTabInLine=n.position),s=n.input.charCodeAt(++n.position);if(l&&s===35)do s=n.input.charCodeAt(++n.position);while(s!==10&&s!==13&&s!==0);if(tn(s))for(Qf(n),s=n.input.charCodeAt(n.position),u++,n.lineIndent=0;s===32;)n.lineIndent++,s=n.input.charCodeAt(++n.position);else break}return i!==-1&&u!==0&&n.lineIndent<i&&as(n,"deficient indentation"),u}function hs(n){var l=n.position,i;return i=n.input.charCodeAt(l),!!((i===45||i===46)&&i===n.input.charCodeAt(l+1)&&i===n.input.charCodeAt(l+2)&&(l+=3,i=n.input.charCodeAt(l),i===0||xt(i)))}function Zf(n,l){l===1?n.result+=" ":l>1&&(n.result+=Qe.repeat(`
243
+ `,l-1))}function MN(n,l,i){var u,s,o,d,h,p,m,v,x=n.kind,E=n.result,C;if(C=n.input.charCodeAt(n.position),xt(C)||Al(C)||C===35||C===38||C===42||C===33||C===124||C===62||C===39||C===34||C===37||C===64||C===96||(C===63||C===45)&&(s=n.input.charCodeAt(n.position+1),xt(s)||i&&Al(s)))return!1;for(n.kind="scalar",n.result="",o=d=n.position,h=!1;C!==0;){if(C===58){if(s=n.input.charCodeAt(n.position+1),xt(s)||i&&Al(s))break}else if(C===35){if(u=n.input.charCodeAt(n.position-1),xt(u))break}else{if(n.position===n.lineStart&&hs(n)||i&&Al(C))break;if(tn(C))if(p=n.line,m=n.lineStart,v=n.lineIndent,Ke(n,!1,-1),n.lineIndent>=l){h=!0,C=n.input.charCodeAt(n.position);continue}else{n.position=d,n.line=p,n.lineStart=m,n.lineIndent=v;break}}h&&(ra(n,o,d,!1),Zf(n,n.line-p),o=d=n.position,h=!1),Ma(C)||(d=n.position+1),C=n.input.charCodeAt(++n.position)}return ra(n,o,d,!1),n.result?!0:(n.kind=x,n.result=E,!1)}function zN(n,l){var i,u,s;if(i=n.input.charCodeAt(n.position),i!==39)return!1;for(n.kind="scalar",n.result="",n.position++,u=s=n.position;(i=n.input.charCodeAt(n.position))!==0;)if(i===39)if(ra(n,u,n.position,!0),i=n.input.charCodeAt(++n.position),i===39)u=n.position,n.position++,s=n.position;else return!0;else tn(i)?(ra(n,u,s,!0),Zf(n,Ke(n,!1,l)),u=s=n.position):n.position===n.lineStart&&hs(n)?ue(n,"unexpected end of the document within a single quoted scalar"):(n.position++,s=n.position);ue(n,"unexpected end of the stream within a single quoted scalar")}function LN(n,l){var i,u,s,o,d,h;if(h=n.input.charCodeAt(n.position),h!==34)return!1;for(n.kind="scalar",n.result="",n.position++,i=u=n.position;(h=n.input.charCodeAt(n.position))!==0;){if(h===34)return ra(n,i,n.position,!0),n.position++,!0;if(h===92){if(ra(n,i,n.position,!0),h=n.input.charCodeAt(++n.position),tn(h))Ke(n,!1,l);else if(h<256&&$y[h])n.result+=Ky[h],n.position++;else if((d=TN(h))>0){for(s=d,o=0;s>0;s--)h=n.input.charCodeAt(++n.position),(d=wN(h))>=0?o=(o<<4)+d:ue(n,"expected hexadecimal character");n.result+=RN(o),n.position++}else ue(n,"unknown escape sequence");i=u=n.position}else tn(h)?(ra(n,i,u,!0),Zf(n,Ke(n,!1,l)),i=u=n.position):n.position===n.lineStart&&hs(n)?ue(n,"unexpected end of the document within a double quoted scalar"):(n.position++,u=n.position)}ue(n,"unexpected end of the stream within a double quoted scalar")}function DN(n,l){var i=!0,u,s,o,d=n.tag,h,p=n.anchor,m,v,x,E,C,N=Object.create(null),w,j,R,T;if(T=n.input.charCodeAt(n.position),T===91)v=93,C=!1,h=[];else if(T===123)v=125,C=!0,h={};else return!1;for(n.anchor!==null&&(n.anchorMap[n.anchor]=h),T=n.input.charCodeAt(++n.position);T!==0;){if(Ke(n,!0,l),T=n.input.charCodeAt(n.position),T===v)return n.position++,n.tag=d,n.anchor=p,n.kind=C?"mapping":"sequence",n.result=h,!0;i?T===44&&ue(n,"expected the node content, but found ','"):ue(n,"missed comma between flow collection entries"),j=w=R=null,x=E=!1,T===63&&(m=n.input.charCodeAt(n.position+1),xt(m)&&(x=E=!0,n.position++,Ke(n,!0,l))),u=n.line,s=n.lineStart,o=n.position,Ol(n,l,ts,!1,!0),j=n.tag,w=n.result,Ke(n,!0,l),T=n.input.charCodeAt(n.position),(E||n.line===u)&&T===58&&(x=!0,T=n.input.charCodeAt(++n.position),Ke(n,!0,l),Ol(n,l,ts,!1,!0),R=n.result),C?jl(n,h,N,j,w,R,u,s,o):x?h.push(jl(n,null,N,j,w,R,u,s,o)):h.push(w),Ke(n,!0,l),T=n.input.charCodeAt(n.position),T===44?(i=!0,T=n.input.charCodeAt(++n.position)):i=!1}ue(n,"unexpected end of the stream within a flow collection")}function kN(n,l){var i,u,s=Zc,o=!1,d=!1,h=l,p=0,m=!1,v,x;if(x=n.input.charCodeAt(n.position),x===124)u=!1;else if(x===62)u=!0;else return!1;for(n.kind="scalar",n.result="";x!==0;)if(x=n.input.charCodeAt(++n.position),x===43||x===45)Zc===s?s=x===43?Kg:CN:ue(n,"repeat of a chomping mode identifier");else if((v=ON(x))>=0)v===0?ue(n,"bad explicit indentation width of a block scalar; it cannot be less than one"):d?ue(n,"repeat of an indentation width identifier"):(h=l+v-1,d=!0);else break;if(Ma(x)){do x=n.input.charCodeAt(++n.position);while(Ma(x));if(x===35)do x=n.input.charCodeAt(++n.position);while(!tn(x)&&x!==0)}for(;x!==0;){for(Qf(n),n.lineIndent=0,x=n.input.charCodeAt(n.position);(!d||n.lineIndent<h)&&x===32;)n.lineIndent++,x=n.input.charCodeAt(++n.position);if(!d&&n.lineIndent>h&&(h=n.lineIndent),tn(x)){p++;continue}if(n.lineIndent<h){s===Kg?n.result+=Qe.repeat(`
244
+ `,o?1+p:p):s===Zc&&o&&(n.result+=`
245
+ `);break}for(u?Ma(x)?(m=!0,n.result+=Qe.repeat(`
246
+ `,o?1+p:p)):m?(m=!1,n.result+=Qe.repeat(`
247
+ `,p+1)):p===0?o&&(n.result+=" "):n.result+=Qe.repeat(`
248
+ `,p):n.result+=Qe.repeat(`
249
+ `,o?1+p:p),o=!0,d=!0,p=0,i=n.position;!tn(x)&&x!==0;)x=n.input.charCodeAt(++n.position);ra(n,i,n.position,!1)}return!0}function Ig(n,l){var i,u=n.tag,s=n.anchor,o=[],d,h=!1,p;if(n.firstTabInLine!==-1)return!1;for(n.anchor!==null&&(n.anchorMap[n.anchor]=o),p=n.input.charCodeAt(n.position);p!==0&&(n.firstTabInLine!==-1&&(n.position=n.firstTabInLine,ue(n,"tab characters must not be used in indentation")),!(p!==45||(d=n.input.charCodeAt(n.position+1),!xt(d))));){if(h=!0,n.position++,Ke(n,!0,-1)&&n.lineIndent<=l){o.push(null),p=n.input.charCodeAt(n.position);continue}if(i=n.line,Ol(n,l,Yy,!1,!0),o.push(n.result),Ke(n,!0,-1),p=n.input.charCodeAt(n.position),(n.line===i||n.lineIndent>l)&&p!==0)ue(n,"bad indentation of a sequence entry");else if(n.lineIndent<l)break}return h?(n.tag=u,n.anchor=s,n.kind="sequence",n.result=o,!0):!1}function UN(n,l,i){var u,s,o,d,h,p,m=n.tag,v=n.anchor,x={},E=Object.create(null),C=null,N=null,w=null,j=!1,R=!1,T;if(n.firstTabInLine!==-1)return!1;for(n.anchor!==null&&(n.anchorMap[n.anchor]=x),T=n.input.charCodeAt(n.position);T!==0;){if(!j&&n.firstTabInLine!==-1&&(n.position=n.firstTabInLine,ue(n,"tab characters must not be used in indentation")),u=n.input.charCodeAt(n.position+1),o=n.line,(T===63||T===58)&&xt(u))T===63?(j&&(jl(n,x,E,C,N,null,d,h,p),C=N=w=null),R=!0,j=!0,s=!0):j?(j=!1,s=!0):ue(n,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),n.position+=1,T=u;else{if(d=n.line,h=n.lineStart,p=n.position,!Ol(n,i,qy,!1,!0))break;if(n.line===o){for(T=n.input.charCodeAt(n.position);Ma(T);)T=n.input.charCodeAt(++n.position);if(T===58)T=n.input.charCodeAt(++n.position),xt(T)||ue(n,"a whitespace character is expected after the key-value separator within a block mapping"),j&&(jl(n,x,E,C,N,null,d,h,p),C=N=w=null),R=!0,j=!1,s=!1,C=n.tag,N=n.result;else if(R)ue(n,"can not read an implicit mapping pair; a colon is missed");else return n.tag=m,n.anchor=v,!0}else if(R)ue(n,"can not read a block mapping entry; a multiline key may not be an implicit key");else return n.tag=m,n.anchor=v,!0}if((n.line===o||n.lineIndent>l)&&(j&&(d=n.line,h=n.lineStart,p=n.position),Ol(n,l,ns,!0,s)&&(j?N=n.result:w=n.result),j||(jl(n,x,E,C,N,w,d,h,p),C=N=w=null),Ke(n,!0,-1),T=n.input.charCodeAt(n.position)),(n.line===o||n.lineIndent>l)&&T!==0)ue(n,"bad indentation of a mapping entry");else if(n.lineIndent<l)break}return j&&jl(n,x,E,C,N,null,d,h,p),R&&(n.tag=m,n.anchor=v,n.kind="mapping",n.result=x),R}function BN(n){var l,i=!1,u=!1,s,o,d;if(d=n.input.charCodeAt(n.position),d!==33)return!1;if(n.tag!==null&&ue(n,"duplication of a tag property"),d=n.input.charCodeAt(++n.position),d===60?(i=!0,d=n.input.charCodeAt(++n.position)):d===33?(u=!0,s="!!",d=n.input.charCodeAt(++n.position)):s="!",l=n.position,i){do d=n.input.charCodeAt(++n.position);while(d!==0&&d!==62);n.position<n.length?(o=n.input.slice(l,n.position),d=n.input.charCodeAt(++n.position)):ue(n,"unexpected end of the stream within a verbatim tag")}else{for(;d!==0&&!xt(d);)d===33&&(u?ue(n,"tag suffix cannot contain exclamation marks"):(s=n.input.slice(l-1,n.position+1),Vy.test(s)||ue(n,"named tag handle cannot contain such characters"),u=!0,l=n.position+1)),d=n.input.charCodeAt(++n.position);o=n.input.slice(l,n.position),jN.test(o)&&ue(n,"tag suffix cannot contain flow indicator characters")}o&&!Gy.test(o)&&ue(n,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{ue(n,"tag name is malformed: "+o)}return i?n.tag=o:sa.call(n.tagMap,s)?n.tag=n.tagMap[s]+o:s==="!"?n.tag="!"+o:s==="!!"?n.tag="tag:yaml.org,2002:"+o:ue(n,'undeclared tag handle "'+s+'"'),!0}function HN(n){var l,i;if(i=n.input.charCodeAt(n.position),i!==38)return!1;for(n.anchor!==null&&ue(n,"duplication of an anchor property"),i=n.input.charCodeAt(++n.position),l=n.position;i!==0&&!xt(i)&&!Al(i);)i=n.input.charCodeAt(++n.position);return n.position===l&&ue(n,"name of an anchor node must contain at least one character"),n.anchor=n.input.slice(l,n.position),!0}function qN(n){var l,i,u;if(u=n.input.charCodeAt(n.position),u!==42)return!1;for(u=n.input.charCodeAt(++n.position),l=n.position;u!==0&&!xt(u)&&!Al(u);)u=n.input.charCodeAt(++n.position);return n.position===l&&ue(n,"name of an alias node must contain at least one character"),i=n.input.slice(l,n.position),sa.call(n.anchorMap,i)||ue(n,'unidentified alias "'+i+'"'),n.result=n.anchorMap[i],Ke(n,!0,-1),!0}function Ol(n,l,i,u,s){var o,d,h,p=1,m=!1,v=!1,x,E,C,N,w,j;if(n.listener!==null&&n.listener("open",n),n.tag=null,n.anchor=null,n.kind=null,n.result=null,o=d=h=ns===i||Yy===i,u&&Ke(n,!0,-1)&&(m=!0,n.lineIndent>l?p=1:n.lineIndent===l?p=0:n.lineIndent<l&&(p=-1)),p===1)for(;BN(n)||HN(n);)Ke(n,!0,-1)?(m=!0,h=o,n.lineIndent>l?p=1:n.lineIndent===l?p=0:n.lineIndent<l&&(p=-1)):h=!1;if(h&&(h=m||s),(p===1||ns===i)&&(ts===i||qy===i?w=l:w=l+1,j=n.position-n.lineStart,p===1?h&&(Ig(n,j)||UN(n,j,w))||DN(n,w)?v=!0:(d&&kN(n,w)||zN(n,w)||LN(n,w)?v=!0:qN(n)?(v=!0,(n.tag!==null||n.anchor!==null)&&ue(n,"alias node should not have any properties")):MN(n,w,ts===i)&&(v=!0,n.tag===null&&(n.tag="?")),n.anchor!==null&&(n.anchorMap[n.anchor]=n.result)):p===0&&(v=h&&Ig(n,j))),n.tag===null)n.anchor!==null&&(n.anchorMap[n.anchor]=n.result);else if(n.tag==="?"){for(n.result!==null&&n.kind!=="scalar"&&ue(n,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+n.kind+'"'),x=0,E=n.implicitTypes.length;x<E;x+=1)if(N=n.implicitTypes[x],N.resolve(n.result)){n.result=N.construct(n.result),n.tag=N.tag,n.anchor!==null&&(n.anchorMap[n.anchor]=n.result);break}}else if(n.tag!=="!"){if(sa.call(n.typeMap[n.kind||"fallback"],n.tag))N=n.typeMap[n.kind||"fallback"][n.tag];else for(N=null,C=n.typeMap.multi[n.kind||"fallback"],x=0,E=C.length;x<E;x+=1)if(n.tag.slice(0,C[x].tag.length)===C[x].tag){N=C[x];break}N||ue(n,"unknown tag !<"+n.tag+">"),n.result!==null&&N.kind!==n.kind&&ue(n,"unacceptable node kind for !<"+n.tag+'> tag; it should be "'+N.kind+'", not "'+n.kind+'"'),N.resolve(n.result,n.tag)?(n.result=N.construct(n.result,n.tag),n.anchor!==null&&(n.anchorMap[n.anchor]=n.result)):ue(n,"cannot resolve a node with !<"+n.tag+"> explicit tag")}return n.listener!==null&&n.listener("close",n),n.tag!==null||n.anchor!==null||v}function YN(n){var l=n.position,i,u,s,o=!1,d;for(n.version=null,n.checkLineBreaks=n.legacy,n.tagMap=Object.create(null),n.anchorMap=Object.create(null);(d=n.input.charCodeAt(n.position))!==0&&(Ke(n,!0,-1),d=n.input.charCodeAt(n.position),!(n.lineIndent>0||d!==37));){for(o=!0,d=n.input.charCodeAt(++n.position),i=n.position;d!==0&&!xt(d);)d=n.input.charCodeAt(++n.position);for(u=n.input.slice(i,n.position),s=[],u.length<1&&ue(n,"directive name must not be less than one character in length");d!==0;){for(;Ma(d);)d=n.input.charCodeAt(++n.position);if(d===35){do d=n.input.charCodeAt(++n.position);while(d!==0&&!tn(d));break}if(tn(d))break;for(i=n.position;d!==0&&!xt(d);)d=n.input.charCodeAt(++n.position);s.push(n.input.slice(i,n.position))}d!==0&&Qf(n),sa.call(Zg,u)?Zg[u](n,u,s):as(n,'unknown document directive "'+u+'"')}if(Ke(n,!0,-1),n.lineIndent===0&&n.input.charCodeAt(n.position)===45&&n.input.charCodeAt(n.position+1)===45&&n.input.charCodeAt(n.position+2)===45?(n.position+=3,Ke(n,!0,-1)):o&&ue(n,"directives end mark is expected"),Ol(n,n.lineIndent-1,ns,!1,!0),Ke(n,!0,-1),n.checkLineBreaks&&AN.test(n.input.slice(l,n.position))&&as(n,"non-ASCII line breaks are interpreted as content"),n.documents.push(n.result),n.position===n.lineStart&&hs(n)){n.input.charCodeAt(n.position)===46&&(n.position+=3,Ke(n,!0,-1));return}if(n.position<n.length-1)ue(n,"end of the stream or a document separator is expected");else return}function Qy(n,l){n=String(n),l=l||{},n.length!==0&&(n.charCodeAt(n.length-1)!==10&&n.charCodeAt(n.length-1)!==13&&(n+=`
250
+ `),n.charCodeAt(0)===65279&&(n=n.slice(1)));var i=new _N(n,l),u=n.indexOf("\0");for(u!==-1&&(i.position=u,ue(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)YN(i);return i.documents}function VN(n,l,i){l!==null&&typeof l=="object"&&typeof i>"u"&&(i=l,l=null);var u=Qy(n,i);if(typeof l!="function")return u;for(var s=0,o=u.length;s<o;s+=1)l(u[s])}function GN(n,l){var i=Qy(n,l);if(i.length!==0){if(i.length===1)return i[0];throw new ut("expected a single document in the stream, but found more")}}var FN=VN,$N=GN,Zy={loadAll:FN,load:$N},Jy=Object.prototype.toString,Iy=Object.prototype.hasOwnProperty,Jf=65279,KN=9,Ii=10,XN=13,QN=32,ZN=33,JN=34,vf=35,IN=37,WN=38,PN=39,e4=42,Wy=44,t4=45,ls=58,n4=61,a4=62,l4=63,i4=64,Py=91,e1=93,r4=96,t1=123,u4=124,n1=125,it={};it[0]="\\0";it[7]="\\a";it[8]="\\b";it[9]="\\t";it[10]="\\n";it[11]="\\v";it[12]="\\f";it[13]="\\r";it[27]="\\e";it[34]='\\"';it[92]="\\\\";it[133]="\\N";it[160]="\\_";it[8232]="\\L";it[8233]="\\P";var s4=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],o4=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function c4(n,l){var i,u,s,o,d,h,p;if(l===null)return{};for(i={},u=Object.keys(l),s=0,o=u.length;s<o;s+=1)d=u[s],h=String(l[d]),d.slice(0,2)==="!!"&&(d="tag:yaml.org,2002:"+d.slice(2)),p=n.compiledTypeMap.fallback[d],p&&Iy.call(p.styleAliases,h)&&(h=p.styleAliases[h]),i[d]=h;return i}function f4(n){var l,i,u;if(l=n.toString(16).toUpperCase(),n<=255)i="x",u=2;else if(n<=65535)i="u",u=4;else if(n<=4294967295)i="U",u=8;else throw new ut("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Qe.repeat("0",u-l.length)+l}var d4=1,Wi=2;function h4(n){this.schema=n.schema||Xf,this.indent=Math.max(1,n.indent||2),this.noArrayIndent=n.noArrayIndent||!1,this.skipInvalid=n.skipInvalid||!1,this.flowLevel=Qe.isNothing(n.flowLevel)?-1:n.flowLevel,this.styleMap=c4(this.schema,n.styles||null),this.sortKeys=n.sortKeys||!1,this.lineWidth=n.lineWidth||80,this.noRefs=n.noRefs||!1,this.noCompatMode=n.noCompatMode||!1,this.condenseFlow=n.condenseFlow||!1,this.quotingType=n.quotingType==='"'?Wi:d4,this.forceQuotes=n.forceQuotes||!1,this.replacer=typeof n.replacer=="function"?n.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Wg(n,l){for(var i=Qe.repeat(" ",l),u=0,s=-1,o="",d,h=n.length;u<h;)s=n.indexOf(`
251
+ `,u),s===-1?(d=n.slice(u),u=h):(d=n.slice(u,s+1),u=s+1),d.length&&d!==`
252
+ `&&(o+=i),o+=d;return o}function bf(n,l){return`
253
+ `+Qe.repeat(" ",n.indent*l)}function p4(n,l){var i,u,s;for(i=0,u=n.implicitTypes.length;i<u;i+=1)if(s=n.implicitTypes[i],s.resolve(l))return!0;return!1}function is(n){return n===QN||n===KN}function Pi(n){return 32<=n&&n<=126||161<=n&&n<=55295&&n!==8232&&n!==8233||57344<=n&&n<=65533&&n!==Jf||65536<=n&&n<=1114111}function Pg(n){return Pi(n)&&n!==Jf&&n!==XN&&n!==Ii}function e0(n,l,i){var u=Pg(n),s=u&&!is(n);return(i?u:u&&n!==Wy&&n!==Py&&n!==e1&&n!==t1&&n!==n1)&&n!==vf&&!(l===ls&&!s)||Pg(l)&&!is(l)&&n===vf||l===ls&&s}function m4(n){return Pi(n)&&n!==Jf&&!is(n)&&n!==t4&&n!==l4&&n!==ls&&n!==Wy&&n!==Py&&n!==e1&&n!==t1&&n!==n1&&n!==vf&&n!==WN&&n!==e4&&n!==ZN&&n!==u4&&n!==n4&&n!==a4&&n!==PN&&n!==JN&&n!==IN&&n!==i4&&n!==r4}function g4(n){return!is(n)&&n!==ls}function Bi(n,l){var i=n.charCodeAt(l),u;return i>=55296&&i<=56319&&l+1<n.length&&(u=n.charCodeAt(l+1),u>=56320&&u<=57343)?(i-55296)*1024+u-56320+65536:i}function a1(n){var l=/^\n* /;return l.test(n)}var l1=1,Sf=2,i1=3,r1=4,El=5;function y4(n,l,i,u,s,o,d,h){var p,m=0,v=null,x=!1,E=!1,C=u!==-1,N=-1,w=m4(Bi(n,0))&&g4(Bi(n,n.length-1));if(l||d)for(p=0;p<n.length;m>=65536?p+=2:p++){if(m=Bi(n,p),!Pi(m))return El;w=w&&e0(m,v,h),v=m}else{for(p=0;p<n.length;m>=65536?p+=2:p++){if(m=Bi(n,p),m===Ii)x=!0,C&&(E=E||p-N-1>u&&n[N+1]!==" ",N=p);else if(!Pi(m))return El;w=w&&e0(m,v,h),v=m}E=E||C&&p-N-1>u&&n[N+1]!==" "}return!x&&!E?w&&!d&&!s(n)?l1:o===Wi?El:Sf:i>9&&a1(n)?El:d?o===Wi?El:Sf:E?r1:i1}function x4(n,l,i,u,s){n.dump=(function(){if(l.length===0)return n.quotingType===Wi?'""':"''";if(!n.noCompatMode&&(s4.indexOf(l)!==-1||o4.test(l)))return n.quotingType===Wi?'"'+l+'"':"'"+l+"'";var o=n.indent*Math.max(1,i),d=n.lineWidth===-1?-1:Math.max(Math.min(n.lineWidth,40),n.lineWidth-o),h=u||n.flowLevel>-1&&i>=n.flowLevel;function p(m){return p4(n,m)}switch(y4(l,h,n.indent,d,p,n.quotingType,n.forceQuotes&&!u,s)){case l1:return l;case Sf:return"'"+l.replace(/'/g,"''")+"'";case i1:return"|"+t0(l,n.indent)+n0(Wg(l,o));case r1:return">"+t0(l,n.indent)+n0(Wg(v4(l,d),o));case El:return'"'+b4(l)+'"';default:throw new ut("impossible error: invalid scalar style")}})()}function t0(n,l){var i=a1(n)?String(l):"",u=n[n.length-1]===`
254
+ `,s=u&&(n[n.length-2]===`
255
+ `||n===`
256
+ `),o=s?"+":u?"":"-";return i+o+`
257
+ `}function n0(n){return n[n.length-1]===`
258
+ `?n.slice(0,-1):n}function v4(n,l){for(var i=/(\n+)([^\n]*)/g,u=(function(){var m=n.indexOf(`
259
+ `);return m=m!==-1?m:n.length,i.lastIndex=m,a0(n.slice(0,m),l)})(),s=n[0]===`
260
+ `||n[0]===" ",o,d;d=i.exec(n);){var h=d[1],p=d[2];o=p[0]===" ",u+=h+(!s&&!o&&p!==""?`
261
+ `:"")+a0(p,l),s=o}return u}function a0(n,l){if(n===""||n[0]===" ")return n;for(var i=/ [^ ]/g,u,s=0,o,d=0,h=0,p="";u=i.exec(n);)h=u.index,h-s>l&&(o=d>s?d:h,p+=`
262
+ `+n.slice(s,o),s=o+1),d=h;return p+=`
263
+ `,n.length-s>l&&d>s?p+=n.slice(s,d)+`
264
+ `+n.slice(d+1):p+=n.slice(s),p.slice(1)}function b4(n){for(var l="",i=0,u,s=0;s<n.length;i>=65536?s+=2:s++)i=Bi(n,s),u=it[i],!u&&Pi(i)?(l+=n[s],i>=65536&&(l+=n[s+1])):l+=u||f4(i);return l}function S4(n,l,i){var u="",s=n.tag,o,d,h;for(o=0,d=i.length;o<d;o+=1)h=i[o],n.replacer&&(h=n.replacer.call(i,String(o),h)),(Tn(n,l,h,!1,!1)||typeof h>"u"&&Tn(n,l,null,!1,!1))&&(u!==""&&(u+=","+(n.condenseFlow?"":" ")),u+=n.dump);n.tag=s,n.dump="["+u+"]"}function l0(n,l,i,u){var s="",o=n.tag,d,h,p;for(d=0,h=i.length;d<h;d+=1)p=i[d],n.replacer&&(p=n.replacer.call(i,String(d),p)),(Tn(n,l+1,p,!0,!0,!1,!0)||typeof p>"u"&&Tn(n,l+1,null,!0,!0,!1,!0))&&((!u||s!=="")&&(s+=bf(n,l)),n.dump&&Ii===n.dump.charCodeAt(0)?s+="-":s+="- ",s+=n.dump);n.tag=o,n.dump=s||"[]"}function E4(n,l,i){var u="",s=n.tag,o=Object.keys(i),d,h,p,m,v;for(d=0,h=o.length;d<h;d+=1)v="",u!==""&&(v+=", "),n.condenseFlow&&(v+='"'),p=o[d],m=i[p],n.replacer&&(m=n.replacer.call(i,p,m)),Tn(n,l,p,!1,!1)&&(n.dump.length>1024&&(v+="? "),v+=n.dump+(n.condenseFlow?'"':"")+":"+(n.condenseFlow?"":" "),Tn(n,l,m,!1,!1)&&(v+=n.dump,u+=v));n.tag=s,n.dump="{"+u+"}"}function C4(n,l,i,u){var s="",o=n.tag,d=Object.keys(i),h,p,m,v,x,E;if(n.sortKeys===!0)d.sort();else if(typeof n.sortKeys=="function")d.sort(n.sortKeys);else if(n.sortKeys)throw new ut("sortKeys must be a boolean or a function");for(h=0,p=d.length;h<p;h+=1)E="",(!u||s!=="")&&(E+=bf(n,l)),m=d[h],v=i[m],n.replacer&&(v=n.replacer.call(i,m,v)),Tn(n,l+1,m,!0,!0,!0)&&(x=n.tag!==null&&n.tag!=="?"||n.dump&&n.dump.length>1024,x&&(n.dump&&Ii===n.dump.charCodeAt(0)?E+="?":E+="? "),E+=n.dump,x&&(E+=bf(n,l)),Tn(n,l+1,v,!0,x)&&(n.dump&&Ii===n.dump.charCodeAt(0)?E+=":":E+=": ",E+=n.dump,s+=E));n.tag=o,n.dump=s||"{}"}function i0(n,l,i){var u,s,o,d,h,p;for(s=i?n.explicitTypes:n.implicitTypes,o=0,d=s.length;o<d;o+=1)if(h=s[o],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof l=="object"&&l instanceof h.instanceOf)&&(!h.predicate||h.predicate(l))){if(i?h.multi&&h.representName?n.tag=h.representName(l):n.tag=h.tag:n.tag="?",h.represent){if(p=n.styleMap[h.tag]||h.defaultStyle,Jy.call(h.represent)==="[object Function]")u=h.represent(l,p);else if(Iy.call(h.represent,p))u=h.represent[p](l,p);else throw new ut("!<"+h.tag+'> tag resolver accepts not "'+p+'" style');n.dump=u}return!0}return!1}function Tn(n,l,i,u,s,o,d){n.tag=null,n.dump=i,i0(n,i,!1)||i0(n,i,!0);var h=Jy.call(n.dump),p=u,m;u&&(u=n.flowLevel<0||n.flowLevel>l);var v=h==="[object Object]"||h==="[object Array]",x,E;if(v&&(x=n.duplicates.indexOf(i),E=x!==-1),(n.tag!==null&&n.tag!=="?"||E||n.indent!==2&&l>0)&&(s=!1),E&&n.usedDuplicates[x])n.dump="*ref_"+x;else{if(v&&E&&!n.usedDuplicates[x]&&(n.usedDuplicates[x]=!0),h==="[object Object]")u&&Object.keys(n.dump).length!==0?(C4(n,l,n.dump,s),E&&(n.dump="&ref_"+x+n.dump)):(E4(n,l,n.dump),E&&(n.dump="&ref_"+x+" "+n.dump));else if(h==="[object Array]")u&&n.dump.length!==0?(n.noArrayIndent&&!d&&l>0?l0(n,l-1,n.dump,s):l0(n,l,n.dump,s),E&&(n.dump="&ref_"+x+n.dump)):(S4(n,l,n.dump),E&&(n.dump="&ref_"+x+" "+n.dump));else if(h==="[object String]")n.tag!=="?"&&x4(n,n.dump,l,o,p);else{if(h==="[object Undefined]")return!1;if(n.skipInvalid)return!1;throw new ut("unacceptable kind of an object to dump "+h)}n.tag!==null&&n.tag!=="?"&&(m=encodeURI(n.tag[0]==="!"?n.tag.slice(1):n.tag).replace(/!/g,"%21"),n.tag[0]==="!"?m="!"+m:m.slice(0,18)==="tag:yaml.org,2002:"?m="!!"+m.slice(18):m="!<"+m+">",n.dump=m+" "+n.dump)}return!0}function N4(n,l){var i=[],u=[],s,o;for(Ef(n,i,u),s=0,o=u.length;s<o;s+=1)l.duplicates.push(i[u[s]]);l.usedDuplicates=new Array(o)}function Ef(n,l,i){var u,s,o;if(n!==null&&typeof n=="object")if(s=l.indexOf(n),s!==-1)i.indexOf(s)===-1&&i.push(s);else if(l.push(n),Array.isArray(n))for(s=0,o=n.length;s<o;s+=1)Ef(n[s],l,i);else for(u=Object.keys(n),s=0,o=u.length;s<o;s+=1)Ef(n[u[s]],l,i)}function A4(n,l){l=l||{};var i=new h4(l);i.noRefs||N4(n,i);var u=n;return i.replacer&&(u=i.replacer.call({"":u},"",u)),Tn(i,0,u,!0,!0)?i.dump+`
265
+ `:""}var j4=A4,w4={dump:j4};function If(n,l){return function(){throw new Error("Function yaml."+n+" is removed in js-yaml 4. Use yaml."+l+" instead, which is now safe by default.")}}var T4=nt,O4=Sy,R4=Ay,_4=Ry,M4=_y,z4=Xf,L4=Zy.load,D4=Zy.loadAll,k4=w4.dump,U4=ut,B4={binary:ky,float:Oy,map:Ny,null:jy,pairs:By,set:Hy,timestamp:Ly,bool:wy,int:Ty,merge:Dy,omap:Uy,seq:Cy,str:Ey},H4=If("safeLoad","load"),q4=If("safeLoadAll","loadAll"),Y4=If("safeDump","dump"),u1={Type:T4,Schema:O4,FAILSAFE_SCHEMA:R4,JSON_SCHEMA:_4,CORE_SCHEMA:M4,DEFAULT_SCHEMA:z4,load:L4,loadAll:D4,dump:k4,YAMLException:U4,types:B4,safeLoad:H4,safeLoadAll:q4,safeDump:Y4};function V4(){return n=>{var l;((l=n.children[0])==null?void 0:l.type)==="yaml"&&(n.children[0]={type:"code",lang:"__frontmatter__",value:n.children[0].value})}}function G4({yamlText:n}){let l=[];try{const i=u1.load(n);i&&typeof i=="object"&&!Array.isArray(i)&&(l=Object.entries(i).map(([u,s])=>{const o=typeof s=="string"?s:JSON.stringify(s,null,2);return[u,o]}))}catch{l=[["raw",n]]}return l.length===0?null:y.jsx("div",{className:"my-2 rounded-[8px] border border-[var(--separator)] overflow-hidden",children:y.jsx("table",{className:"w-full text-[13px]",children:y.jsx("tbody",{children:l.map(([i,u])=>y.jsxs("tr",{className:"border-b last:border-b-0 border-[var(--separator)]",children:[y.jsx("td",{className:"px-3 py-1.5 bg-[var(--fill-quaternary)] text-[var(--label-secondary)] font-medium whitespace-nowrap align-top w-[1%]",children:i}),y.jsx("td",{className:"px-3 py-1.5 text-[var(--label-primary)] whitespace-pre-wrap break-all",children:u})]},i))})})})}function rs(n){return n==null||typeof n=="boolean"?"":typeof n=="string"||typeof n=="number"?String(n):Array.isArray(n)?n.map(rs).join(""):typeof n=="object"&&"props"in n?rs(n.props.children):""}function r0({language:n,children:l}){const{t:i}=Ue(),[u,s]=b.useState(!1),o=rs(l).replace(/\n$/,""),d=b.useCallback(()=>{navigator.clipboard.writeText(o),s(!0),setTimeout(()=>s(!1),2e3)},[o]);return y.jsxs("div",{className:"group/code relative my-2 rounded-[8px] bg-[var(--fill-card)] border border-[var(--separator)] overflow-hidden",children:[y.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-[var(--separator)]",children:[y.jsx("span",{className:"text-[11px] text-[var(--label-tertiary)] font-medium",children:n||"code"}),y.jsxs("button",{onClick:d,className:"flex items-center gap-1 text-[11px] text-[var(--label-tertiary)] hover:text-[var(--label-secondary)] transition-colors",children:[u?y.jsx(lr,{size:12}):y.jsx(W0,{size:12}),i(u?"entries.copied":"entries.copy")]})]}),y.jsx("pre",{className:"px-3 py-2.5 overflow-x-auto text-[13px] leading-[20px]",children:y.jsx("code",{children:l})})]})}const F4={code({className:n,children:l,...i}){const u=/language-(\w+)/.exec(n||"");if((u==null?void 0:u[1])==="__frontmatter__"){const s=rs(l).replace(/\n$/,"");return y.jsx(G4,{yamlText:s})}return u?y.jsx(r0,{language:u[1],children:l}):String(l).includes(`
266
+ `)?y.jsx(r0,{language:"",children:l}):y.jsx("code",{className:"px-1.5 py-0.5 rounded-[4px] bg-[var(--fill-secondary)] text-[13px] font-mono break-words",...i,children:l})},pre({children:n}){return y.jsx(y.Fragment,{children:n})},p({children:n}){return y.jsx("p",{className:"text-[14px] leading-[22px] text-[var(--label-primary)] mb-2 last:mb-0",children:n})},h1({children:n}){return y.jsx("h1",{className:"text-[20px] leading-[26px] font-semibold text-[var(--label-primary)] mt-4 mb-2",children:n})},h2({children:n}){return y.jsx("h2",{className:"text-[17px] leading-[23px] font-semibold text-[var(--label-primary)] mt-3 mb-1.5",children:n})},h3({children:n}){return y.jsx("h3",{className:"text-[15px] leading-[21px] font-semibold text-[var(--label-primary)] mt-2 mb-1",children:n})},ul({children:n}){return y.jsx("ul",{className:"text-[14px] leading-[22px] text-[var(--label-primary)] pl-5 mb-2 list-disc space-y-0.5",children:n})},ol({children:n}){return y.jsx("ol",{className:"text-[14px] leading-[22px] text-[var(--label-primary)] pl-5 mb-2 list-decimal space-y-0.5",children:n})},li({children:n}){return y.jsx("li",{className:"text-[14px] leading-[22px]",children:n})},blockquote({children:n}){return y.jsx("blockquote",{className:"pl-3 border-l-2 border-[var(--color-accent)] text-[14px] leading-[22px] text-[var(--label-secondary)] my-2",children:n})},table({children:n}){return y.jsx("div",{className:"overflow-x-auto my-2 rounded-[8px] border border-[var(--separator)]",children:y.jsx("table",{className:"w-full text-[13px]",children:n})})},thead({children:n}){return y.jsx("thead",{className:"bg-[var(--fill-tertiary)] text-[var(--label-secondary)]",children:n})},th({children:n}){return y.jsx("th",{className:"px-3 py-1.5 text-left font-medium border-b border-[var(--separator)]",children:n})},td({children:n}){return y.jsx("td",{className:"px-3 py-1.5 border-b border-[var(--separator)]",children:n})},hr(){return y.jsx("hr",{className:"my-3 border-[var(--separator)]"})},a({href:n,children:l}){return y.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-accent)] hover:underline",children:l})},strong({children:n}){return y.jsx("strong",{className:"font-semibold text-[var(--label-primary)]",children:n})},em({children:n}){return y.jsx("em",{className:"italic text-[var(--label-primary)]",children:n})}};function $4(n){if(!/^---\s*\n/.test(n))return n;const l=n.match(/\n---\s*(?:\n|$)/);if(!l||l.index===void 0)return n;const i=n.slice(4,l.index);let u=!1;try{const s=u1.load(i);u=typeof s=="object"&&s!==null&&!Array.isArray(s)&&Object.keys(s).length>0}catch{}return u?n:"***"+n.slice(3)}function On({content:n}){if(!n.trim())return null;const l=b.useMemo(()=>$4(n),[n]);return y.jsx("div",{className:"markdown-body min-w-0 max-w-full break-words",children:y.jsx(Vv,{remarkPlugins:[Fv,sC,EC,V4],rehypePlugins:[Gv],components:F4,children:l})})}function K4({content:n,streaming:l,autoCollapse:i}){const{t:u}=Ue(),[s,o]=b.useState(i),d=b.useRef(!1);return b.useEffect(()=>{i&&!d.current&&(d.current=!0,o(!0))},[i]),y.jsxs("div",{className:`rounded-[8px] bg-[var(--fill-card)] border border-[var(--separator)] overflow-hidden transition-all ${s?"max-w-[640px]":""}`,children:[y.jsxs("button",{onClick:()=>o(!s),className:"w-full flex items-center gap-1.5 px-3 py-1.5 text-left hover:bg-[var(--fill-quaternary)] transition-colors",children:[y.jsx(kf,{size:12,className:`text-[var(--label-tertiary)] transition-transform ${s?"":"rotate-90"}`}),y.jsx("span",{className:"text-[12px] font-medium text-[var(--label-tertiary)]",children:u(l?"entries.thinkingStreaming":"entries.thinking")})]}),!s&&y.jsx("div",{className:"px-3 pb-2.5 pt-0.5 text-[var(--label-secondary)] italic",children:y.jsx(On,{content:n})})]})}function Rn({title:n,trailing:l,onClose:i,children:u}){return y.jsx("div",{className:"fixed-viewport z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm",onClick:i,children:y.jsxs("div",{className:"w-[90%] max-w-[640px] max-h-[80vh] rounded-[18px] bg-[var(--material-modal)] backdrop-blur-[30px] border border-[var(--separator)] shadow-[0_8px_40px_rgba(0,0,0,0.12)] flex flex-col overflow-hidden",onClick:s=>s.stopPropagation(),children:[y.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-[var(--separator)]",children:[y.jsx("div",{className:"flex items-center gap-2 text-[15px] font-semibold text-[var(--label-primary)] select-text",children:n}),y.jsxs("div",{className:"flex items-center gap-2 select-text",children:[l,y.jsx("button",{onClick:i,className:"select-none w-7 h-7 flex items-center justify-center rounded-full hover:bg-[var(--fill-secondary)] transition-colors text-[var(--label-secondary)]",children:y.jsx(Uf,{size:14})})]})]}),u]})})}function s1(n){return{read:y.jsx(VS,{size:14}),bash:y.jsx(d3,{size:14}),edit:y.jsx(wg,{size:14}),write:y.jsx(wg,{size:14})}[n]??y.jsx(x3,{size:14})}function X4(n,l){switch(n){case"read":{const i=l.path??"",u=l.offset,s=l.limit;if(u!=null||s!=null){const o=u??"",d=s!=null?(u??1)+s-1:"";return`${i} [${o}:${d}]`}return i}case"bash":return l.command?String(l.command).slice(0,80):"";case"edit":return l.path??"";case"write":return l.path??"";default:return""}}function us(n,l){let i=0;const u=/`+/g;let s;for(;(s=u.exec(n))!==null;)s[0].length>i&&(i=s[0].length);const o="`".repeat(Math.max(3,i+1));return`${o}${l}
267
+ ${n}
268
+ ${o}`}const Q4={ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",json:"json",css:"css",scss:"scss",less:"less",html:"xml",htm:"xml",xml:"xml",svg:"xml",md:"markdown",mdx:"markdown",yaml:"yaml",yml:"yaml",toml:"ini",ini:"ini",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",py:"python",rb:"ruby",rs:"rust",go:"go",java:"java",kt:"kotlin",swift:"swift",c:"c",h:"c",cpp:"cpp",hpp:"cpp",cs:"csharp",php:"php",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"dockerfile",makefile:"makefile",lua:"lua",vim:"vim",diff:"diff",patch:"diff"};function o1(n){var s;const l=n.split("/").pop()??"",i=l.toLowerCase();if(i==="dockerfile")return"dockerfile";if(i==="makefile"||i==="gnumakefile")return"makefile";const u=(s=l.split(".").pop())==null?void 0:s.toLowerCase();if(u)return Q4[u]}function Z4(n,l){for(const i of n){const u=i.message;if((u==null?void 0:u.role)==="toolResult"&&u.toolCallId===l)return{content:Array.isArray(u.content)?u.content.filter(o=>o.type==="text").map(o=>o.text).join(`
269
+ `):String(u.content??""),isError:u.isError??!1,details:u.details??void 0}}return null}function J4({name:n,args:l,toolCallId:i,entries:u,isAborted:s=!1}){const[o,d]=b.useState(!1),h=X4(n,l),p=b.useMemo(()=>i?Z4(u,i):null,[u,i]),m=p!==null,x=((p==null?void 0:p.isError)??!1)||!m&&s,E=n==="read"?I4:n==="bash"?W4:n==="write"?P4:n==="edit"?t8:n8;return y.jsxs(y.Fragment,{children:[y.jsxs("button",{onClick:()=>d(!0),className:"w-full max-w-[640px] flex items-center gap-2.5 px-3 py-2 rounded-[8px] bg-[var(--fill-card)] border border-[var(--separator)] hover:bg-[var(--fill-tertiary)] transition-colors text-left group select-none",children:[y.jsx("span",{className:"text-[var(--label-secondary)] group-hover:text-[var(--color-accent)] transition-colors",children:s1(n)}),y.jsx("span",{className:"text-[13px] font-medium text-[var(--label-primary)]",children:n}),h&&y.jsx("span",{className:"text-[12px] text-[var(--label-tertiary)] truncate flex-1 min-w-0",children:h}),y.jsx("span",{className:"flex-shrink-0 ml-auto",children:!m&&!s?y.jsx(Ki,{size:14,className:"text-[var(--label-tertiary)] animate-spin"}):x?y.jsx(I0,{size:14,className:"text-red-400"}):y.jsx(kf,{size:14,className:"text-[var(--label-tertiary)] group-hover:text-[var(--label-secondary)] transition-colors"})})]}),o&&y.jsx(E,{name:n,args:l,result:p,isAborted:s,onClose:()=>d(!1)})]})}function rr(){const{t:n}=Ue();return y.jsxs("div",{className:"flex items-center gap-2 text-[12px] text-[var(--label-tertiary)]",children:[y.jsx(Ki,{size:14,className:"animate-spin"}),y.jsx("span",{children:n("entries.running")})]})}function ur(){const{t:n}=Ue();return y.jsxs("div",{className:"flex items-center gap-2 text-[12px] text-red-400",children:[y.jsx(I0,{size:14}),y.jsx("span",{children:n("entries.aborted")})]})}function sr({name:n}){return y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"text-[var(--label-secondary)] select-none",children:s1(n)}),n]})}function I4({name:n,args:l,result:i,isAborted:u,onClose:s}){const o=l.path??"",d=l.offset,h=l.limit,p=o1(o);let m=o;if(d!=null||h!=null){const E=d??"",C=h!=null?(d??1)+h-1:"";m+=` [${E}:${C}]`}const v=p==="markdown",x=i&&!i.isError&&!v?us(i.content,p??""):null;return y.jsxs(Rn,{title:y.jsx(sr,{name:n}),onClose:s,children:[y.jsx("div",{className:"px-5 py-2 border-b border-[var(--separator)] bg-[var(--fill-quaternary)]",children:y.jsx("p",{className:"text-[13px] text-[var(--label-secondary)] break-all leading-[20px] font-mono",children:m})}),y.jsx("div",{className:"flex-1 overflow-y-auto px-5 pt-3 pb-5 scrollbar-auto",children:i!==null?i.isError?y.jsx("pre",{className:"text-[13px] leading-[20px] whitespace-pre-wrap break-words rounded-[8px] px-3 py-2 text-red-400 bg-red-400/5",children:i.content}):v?y.jsx(On,{content:i.content}):y.jsx(On,{content:x}):u?y.jsx(ur,{}):y.jsx(rr,{})})]})}function W4({name:n,args:l,result:i,isAborted:u,onClose:s}){const o=l.command??"",d=l.timeout,h=us(o,"bash"),p=i&&!i.isError?us(i.content.trim(),"plaintext"):null;return y.jsx(Rn,{title:y.jsx(sr,{name:n}),onClose:s,trailing:d!=null?y.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-[var(--label-tertiary)]",children:[y.jsx(p3,{size:12}),d,"s"]}):void 0,children:y.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-auto",children:[y.jsx("div",{className:"px-5 pt-3 pb-3 bg-[var(--fill-quaternary)]",children:y.jsx(On,{content:h})}),y.jsxs("div",{className:"px-5 pt-3 pb-5",children:[y.jsx("h4",{className:"text-[11px] font-semibold text-[var(--label-tertiary)] uppercase tracking-wide mb-2",children:"Output"}),i!==null?i.isError?y.jsx("pre",{className:"text-[13px] leading-[20px] whitespace-pre-wrap break-words rounded-[8px] px-3 py-2 text-red-400 bg-red-400/5",children:i.content}):y.jsx(On,{content:p}):u?y.jsx(ur,{}):y.jsx(rr,{})]})]})})}function P4({name:n,args:l,result:i,isAborted:u,onClose:s}){const{t:o}=Ue(),d=l.path??"",h=l.content??"",p=o1(d),m=p==="markdown",v=m?null:us(h,p??"");return y.jsxs(Rn,{title:y.jsx(sr,{name:n}),onClose:s,children:[y.jsx("div",{className:"px-5 py-2 border-b border-[var(--separator)] bg-[var(--fill-quaternary)]",children:y.jsx("p",{className:"text-[13px] text-[var(--label-secondary)] break-all leading-[20px] font-mono",children:d})}),y.jsxs("div",{className:"flex-1 overflow-y-auto px-5 pt-3 pb-5 space-y-3 scrollbar-auto",children:[y.jsx("section",{children:y.jsx(On,{content:m?h:v})}),i!==null&&y.jsxs("section",{children:[y.jsx("h4",{className:"text-[11px] font-semibold text-[var(--label-tertiary)] uppercase tracking-wide mb-1.5",children:o("entries.result")}),y.jsx("pre",{className:`text-[13px] leading-[20px] whitespace-pre-wrap break-words rounded-[8px] px-3 py-2 ${i.isError?"text-red-400 bg-red-400/5":"text-[var(--label-secondary)] bg-[var(--fill-tertiary)]"}`,children:i.content})]}),i===null&&(u?y.jsx(ur,{}):y.jsx(rr,{}))]})]})}function e8({diff:n}){const l=n.split(`
270
+ `);return y.jsx("pre",{className:"text-[13px] leading-[20px] font-mono overflow-x-auto",children:y.jsx("div",{style:{minWidth:"fit-content"},children:l.map((i,u)=>{const s=i[0];return s==="+"?y.jsx("div",{className:"px-3 rounded-[2px]",style:{backgroundColor:"var(--diff-add-bg)",color:"var(--diff-add-text)"},children:i},u):s==="-"?y.jsx("div",{className:"px-3 rounded-[2px]",style:{backgroundColor:"var(--diff-del-bg)",color:"var(--diff-del-text)"},children:i},u):y.jsx("div",{className:"px-3",style:{color:"var(--diff-context-text)"},children:i},u)})})})}function t8({name:n,args:l,result:i,isAborted:u,onClose:s}){var h;const o=l.path??"",d=(h=i==null?void 0:i.details)==null?void 0:h.diff;return y.jsxs(Rn,{title:y.jsx(sr,{name:n}),onClose:s,children:[y.jsx("div",{className:"px-5 py-2 border-b border-[var(--separator)] bg-[var(--fill-quaternary)]",children:y.jsx("p",{className:"text-[13px] text-[var(--label-secondary)] break-all leading-[20px] font-mono",children:o})}),y.jsx("div",{className:"flex-1 overflow-y-auto pt-3 pb-5 scrollbar-auto",children:i!==null?i.isError?y.jsx("pre",{className:"text-[13px] leading-[20px] whitespace-pre-wrap break-words rounded-[8px] mx-5 px-3 py-2 text-red-400 bg-red-400/5",children:i.content}):d?y.jsx(e8,{diff:d}):y.jsx("pre",{className:"text-[13px] leading-[20px] whitespace-pre-wrap break-words mx-5 px-3 py-2 text-[var(--label-secondary)] bg-[var(--fill-tertiary)] rounded-[8px]",children:i.content}):u?y.jsx("div",{className:"px-5",children:y.jsx(ur,{})}):y.jsx("div",{className:"px-5",children:y.jsx(rr,{})})})]})}function n8({name:n,args:l,result:i,isAborted:u,onClose:s}){const{t:o}=Ue();return y.jsx(Rn,{title:y.jsx(sr,{name:n}),onClose:s,children:y.jsxs("div",{className:"flex-1 overflow-y-auto px-5 pt-3 pb-5 space-y-3 scrollbar-auto",children:[y.jsxs("section",{children:[y.jsx("h4",{className:"text-[11px] font-semibold text-[var(--label-tertiary)] uppercase tracking-wide mb-1.5",children:o("entries.params")}),y.jsx("pre",{className:"text-[13px] leading-[20px] text-[var(--label-secondary)] whitespace-pre-wrap break-words bg-[var(--fill-tertiary)] rounded-[8px] px-3 py-2 overflow-x-auto",children:JSON.stringify(l,null,2)})]}),i!==null&&y.jsxs("section",{children:[y.jsx("h4",{className:"text-[11px] font-semibold text-[var(--label-tertiary)] uppercase tracking-wide mb-1.5",children:o("entries.result")}),y.jsx("pre",{className:`text-[13px] leading-[20px] whitespace-pre-wrap break-words rounded-[8px] px-3 py-2 overflow-x-auto ${i.isError?"text-red-400 bg-red-400/5":"text-[var(--label-secondary)] bg-[var(--fill-tertiary)]"}`,children:i.content})]}),i===null&&y.jsx("section",{children:u?y.jsx(ur,{}):y.jsx(rr,{})})]})})}function c1({src:n,alt:l,onClose:i}){const u=b.useCallback(s=>{s.key==="Escape"&&i()},[i]);return b.useEffect(()=>(document.addEventListener("keydown",u),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",u),document.body.style.overflow=""}),[u]),y.jsxs("div",{className:"fixed-viewport z-[9999] flex items-center justify-center bg-black/60 backdrop-blur-[30px] animate-in fade-in duration-150",onClick:i,children:[y.jsx("button",{onClick:i,className:"absolute top-4 right-4 z-10 w-9 h-9 rounded-full bg-[var(--badge-bg)] hover:bg-[var(--badge-bg-hover)] text-[var(--badge-text)] flex items-center justify-center transition-colors","aria-label":"Close",children:y.jsx(Uf,{size:18})}),y.jsx("img",{src:n,alt:l??"Image preview",onClick:s=>s.stopPropagation(),className:"max-w-[90vw] max-h-[90vh] object-contain rounded-lg shadow-2xl select-none",draggable:!1})]})}function a8({entry:n,entries:l,isLast:i,isStreaming:u,onReEdit:s}){const o=i&&u;switch(n.type){case"message":return y.jsx(l8,{entry:n,entries:l,streaming:o,onReEdit:s});case"compaction":case"branch_summary":return y.jsx(s8,{type:n.type,summary:n.summary??""});default:return null}}function l8({entry:n,entries:l,streaming:i,onReEdit:u}){const s=n.message;if(!s)return null;switch(s.role){case"user":return y.jsx(i8,{content:s.content});case"assistant":return y.jsx(r8,{content:s.content,entries:l,streaming:i,stopReason:s.stopReason,errorMessage:s.errorMessage,onReEdit:u});case"toolResult":return null;default:return null}}function i8({content:n}){const[l,i]=b.useState(null);let u="",s=[];return typeof n=="string"?u=n:Array.isArray(n)?(u=n.filter(o=>o.type==="text").map(o=>o.text).join(""),s=n.filter(o=>o.type==="image")):u=JSON.stringify(n),y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"flex justify-end px-4 py-1.5",children:y.jsxs("div",{className:"max-w-[80%] rounded-[16px] rounded-br-[4px] bg-[var(--color-accent)] text-white",children:[s.length>0&&y.jsx("div",{className:"flex flex-wrap gap-1.5 p-2 pb-0",children:s.map((o,d)=>{const h=`data:${o.mimeType};base64,${o.data}`;return y.jsx("button",{onClick:()=>i(h),className:"block rounded-[8px] overflow-hidden hover:opacity-90 transition-opacity",children:y.jsx("img",{src:h,alt:`Attached image ${d+1}`,className:"max-w-[200px] max-h-[150px] object-cover",draggable:!1})},d)})}),u&&y.jsx("p",{className:"text-[14px] leading-[21px] whitespace-pre-wrap break-words px-3.5 py-2",children:u}),!u&&s.length>0&&y.jsx("div",{className:"h-2"})]})}),l&&y.jsx(c1,{src:l,onClose:()=>i(null)})]})}function r8({content:n,entries:l,streaming:i,stopReason:u,errorMessage:s,onReEdit:o}){if((u==="error"||u==="aborted")&&s&&(!Array.isArray(n)||n.length===0))return y.jsx("div",{className:"px-4",children:y.jsx(u0,{message:s,onReEdit:u==="aborted"?o:void 0})});if(!Array.isArray(n))return y.jsx("div",{className:"px-4",children:y.jsx(On,{content:String(n)})});const d=u==="aborted"||u==="error",h=n[n.length-1],p=i&&(h==null?void 0:h.type)==="thinking",m=n.some(v=>v.type==="text"||v.type==="toolCall")||d;return y.jsxs("div",{className:"px-4 space-y-2",children:[n.map((v,x)=>y.jsx(u8,{block:v,entries:l,streaming:i&&x===n.length-1,autoCollapse:v.type==="thinking"&&m&&!p,isAborted:d},x)),(u==="error"||u==="aborted")&&s&&y.jsx(u0,{message:s,onReEdit:u==="aborted"&&!i?o:void 0}),i&&(h==null?void 0:h.type)!=="thinking"&&y.jsx("span",{className:"inline-block w-2 h-4 bg-[var(--label-tertiary)] rounded-sm animate-pulse"})]})}function u8({block:n,entries:l,streaming:i,autoCollapse:u,isAborted:s}){var o;switch(n.type){case"text":return y.jsx(On,{content:n.text});case"thinking":return(o=n.thinking)!=null&&o.trim()?y.jsx(K4,{content:n.thinking,streaming:i,autoCollapse:u}):null;case"toolCall":return y.jsx(J4,{name:n.name,args:n.arguments,toolCallId:n.id,entries:l,isAborted:s});default:return null}}function s8({type:n,summary:l}){const{t:i}=Ue(),[u,s]=b.useState(!1),o=i(n==="compaction"?"entries.contextCompacted":"entries.branchSummary");return y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"flex justify-center px-4 py-2",children:y.jsxs("button",{onClick:()=>l&&s(!0),className:`px-3 py-1 rounded-full bg-[var(--fill-tertiary)] text-[11px] text-[var(--label-tertiary)] transition-colors ${l?"hover:bg-[var(--fill-secondary)] cursor-pointer":""}`,children:[o,l&&y.jsxs("span",{className:"ml-1.5 opacity-70",children:["— ",l.slice(0,60),l.length>60?"...":""]})]})}),u&&y.jsx(Rn,{title:o,onClose:()=>s(!1),children:y.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4 scrollbar-auto",children:y.jsx(On,{content:l})})})]})}function u0({message:n,onReEdit:l}){var x,E;const{t:i}=Ue(),[u,s]=b.useState(!1);let o=n,d="",h="",p="";const m=n.indexOf("{");if(m>0){o=n.slice(0,m).trim();try{const C=JSON.parse(n.slice(m));d=((x=C==null?void 0:C.error)==null?void 0:x.message)??n.slice(m),h=((E=C==null?void 0:C.error)==null?void 0:E.type)??"";const N=d.match(/request id:\s*([\w]+)/i);N&&(p=N[1])}catch{d=n.slice(m)}}const v=d.length>200;return y.jsxs(y.Fragment,{children:[y.jsx("div",{onClick:v?()=>s(!0):void 0,className:`rounded-[10px] border border-[rgba(255,66,69,0.3)] bg-[rgba(255,66,69,0.06)] dark:bg-[rgba(255,66,69,0.1)] px-3.5 py-2.5 max-w-[640px] ${v?"cursor-pointer":""}`,children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx(of,{size:14,className:"text-[#ff4245] flex-shrink-0 mt-0.5"}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center justify-between gap-2",children:[y.jsx("p",{className:"text-[12px] font-medium text-[#ff4245]",children:o}),y.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[l&&y.jsx("button",{onClick:C=>{C.stopPropagation(),l()},className:"text-[12px] leading-[15px] text-[var(--color-accent)] hover:opacity-70 active:opacity-50 transition-opacity select-none",children:i("reEdit.button")}),v&&y.jsx(kf,{size:12,className:"text-[var(--label-tertiary)] flex-shrink-0"})]})]}),d&&!v&&y.jsx("p",{className:"text-[11px] text-[var(--label-secondary)] mt-1.5 break-all whitespace-pre-wrap",children:d})]})]})}),u&&y.jsx(Rn,{title:i("error.title"),onClose:()=>s(!1),children:y.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-6 scrollbar-auto",children:[y.jsxs("div",{className:"flex flex-col items-center text-center mb-5",children:[y.jsx("div",{className:"w-10 h-10 rounded-full bg-[rgba(255,66,69,0.1)] dark:bg-[rgba(255,66,69,0.15)] flex items-center justify-center mb-3",children:y.jsx(of,{size:20,className:"text-[#ff4245]"})}),y.jsx("p",{className:"text-[15px] font-semibold text-[#ff4245]",children:o})]}),y.jsxs("div",{className:"rounded-[10px] bg-[var(--fill-card)] p-4 space-y-3",children:[y.jsx(Jc,{label:i("error.message"),value:d}),h&&y.jsx(Jc,{label:i("error.type"),value:h}),p&&y.jsx(Jc,{label:i("error.requestId"),value:p,mono:!0})]})]})})]})}function Jc({label:n,value:l,mono:i}){return y.jsxs("div",{children:[y.jsx("p",{className:"text-[11px] text-[var(--label-tertiary)] mb-0.5",children:n}),y.jsx("p",{className:`text-[14px] leading-[22px] text-[var(--label-primary)] break-all whitespace-pre-wrap ${i?"font-mono text-[13px] leading-[20px]":""}`,children:l})]})}function f1({title:n,subtitle:l,backTo:i="/",actions:u,children:s}){const o=nr();return y.jsxs("div",{className:"md:hidden flex items-center gap-2",children:[y.jsx("button",{onClick:()=>o(i),"aria-label":"Back to instances",className:"flex select-none items-center text-[var(--label-secondary)] active:opacity-60 transition-opacity",children:y.jsx(MS,{size:20})}),s??y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:"text-[14px] font-medium text-[var(--label-primary)] truncate select-text",children:n}),l&&y.jsx("div",{className:"text-[11px] text-[var(--label-tertiary)] truncate select-text",children:l})]}),u]})]})}function o8(n,l){if(l&&n.startsWith(l)){const i=n.slice(l.length);return!i||i==="/"?"~":"~"+(i.startsWith("/")?i:"/"+i)}return n}function Cf(n,l){if(n.length<=l)return n;const i=Math.floor((l-1)/2),u=l-1-i;return n.slice(0,u)+"…"+n.slice(-i)}function c8(n){const l=n.split("/").filter(Boolean);return l.length<=2?n.length:l.slice(-2).join("/").length}function s0(n,l){if(n.length<=l)return n;const i=c8(n);if(i+2<=l){const u=l-1-i;return n.slice(0,u)+"…"+n.slice(-i)}return Cf(n,l)}const f8=6.2,d8=20,h8=8;function o0({icon:n,text:l,copyText:i,title:u}){const[s,o]=b.useState(!1),d=b.useRef(null);b.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const h=b.useCallback(()=>{navigator.clipboard.writeText(i),o(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>o(!1),1500)},[i]);return y.jsxs("button",{type:"button",onClick:h,title:u??i,className:"inline-flex min-w-0 items-center gap-1 rounded-[4px] px-1 py-0.5 -mx-1 transition-colors hover:bg-[var(--fill-tertiary)] active:bg-[var(--fill-secondary)] cursor-pointer select-none",children:[y.jsx("span",{className:"shrink-0 opacity-70",children:s?y.jsx(lr,{size:11,className:"text-green-500"}):n}),y.jsx("span",{className:"truncate",children:l})]})}function c0({title:n,cwd:l,homedir:i,gitBranch:u,actions:s}){const o=l?o8(l,i):null,d=b.useRef(null),[h,p]=b.useState(o),[m,v]=b.useState(u),x=b.useCallback(()=>{const E=d.current;if(!E)return;const C=E.getBoundingClientRect().width;if(C<=0)return;const N=(o?1:0)+(u?1:0),w=N*d8+(N-1)*h8,j=Math.floor((C-w)/f8);if(o&&u){const R=Math.max(10,Math.floor(j*.6)),T=Math.max(8,j-R);p(s0(o,R)),v(Cf(u,T))}else o?p(s0(o,Math.max(10,j))):u&&v(Cf(u,Math.max(8,j)))},[o,u]);return b.useEffect(()=>{const E=d.current;if(!E)return;const C=new ResizeObserver(()=>x());return C.observe(E),x(),()=>C.disconnect()},[x]),b.useEffect(()=>{p(o),v(u),x()},[o,u,x]),y.jsxs("div",{className:"flex items-center justify-between gap-2 min-w-0 flex-1 min-h-[40px]",children:[y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsx("div",{className:"truncate text-[14px] leading-[20px] font-medium text-[var(--label-primary)] select-text",children:n}),(o||u)&&y.jsxs("div",{ref:d,className:"mt-0.5 flex min-w-0 items-center gap-2 text-[11px] leading-[14px] text-[var(--label-secondary)]",children:[h&&y.jsx(o0,{icon:y.jsx(P0,{size:11}),text:h,copyText:l,title:l},l),m&&y.jsx(o0,{icon:y.jsx(XS,{size:11}),text:m,copyText:u},u)]})]}),s]})}function p8(n,l="top",i="right",u=8,s=12){const{innerWidth:o,innerHeight:d}=window,h=i==="left"?{left:Math.max(s,n.left)}:{right:Math.max(s,o-n.right)};return l==="bottom"?{...h,top:Math.max(s,n.bottom+u)}:{...h,bottom:Math.max(s,d-n.top+u)}}function Wf({trigger:n,width:l=200,children:i,disabled:u=!1,placement:s="top",align:o="right"}){const[d,h]=b.useState(!1),[p,m]=b.useState(null),v=b.useRef(null),x=b.useRef(null);b.useEffect(()=>{if(!d)return;function w(j){var T,z;const R=j.target;!((T=v.current)!=null&&T.contains(R))&&!((z=x.current)!=null&&z.contains(R))&&h(!1)}return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[d]),b.useEffect(()=>{if(!d)return;const w=()=>h(!1);return window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}},[d]);const E=()=>{var j;if(u)return;if(d){h(!1);return}const w=(j=v.current)==null?void 0:j.getBoundingClientRect();w&&(m(p8(w,s,o)),h(!0))},C=()=>h(!1),N=d&&p?qf.createPortal(y.jsx("div",{ref:x,className:"glass-popover z-50",style:{position:"fixed",...p.left!==void 0?{left:p.left}:{right:p.right},...p.top!==void 0?{top:p.top}:{bottom:p.bottom},width:`${l}px`},children:i(C)}),document.body):null;return y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"relative",ref:v,onClick:E,children:n({open:d})}),N]})}function m8(n,l){const i=new Date(n),s=Date.now()-i.getTime(),o=Math.floor(s/6e4);if(o<1)return l("session.timeJustNow");if(o<60)return`${o}m`;const d=Math.floor(o/60);if(d<24)return`${d}h`;const h=Math.floor(d/24);if(h<7)return`${h}d`;const p=Math.floor(h/7);return p<4?`${p}w`:i.toLocaleDateString()}function g8({sessions:n,loading:l,hasMore:i,total:u,disabled:s,onOpen:o,onNewSession:d,onSwitchSession:h,onLoadMore:p,onFilterChange:m}){const{t:v}=Ue(),[x,E]=b.useState(""),C=b.useRef(null),N=b.useRef(null),w=b.useCallback(R=>{E(R),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{m(R)},300)},[m]),j=b.useCallback(R=>{if(!i||l)return;const T=R.currentTarget;T.scrollHeight-T.scrollTop-T.clientHeight<40&&p(n.length,x)},[i,l,n.length,x,p]);return y.jsx(Wf,{trigger:({open:R})=>y.jsx("button",{className:`flex items-center justify-center w-9 h-9 rounded-[8px] transition-colors ${R?"bg-[rgba(0,0,0,0.11)] dark:bg-[rgba(255,255,255,0.11)]":"hover:bg-[var(--fill-tertiary)]"} ${s?"opacity-40 pointer-events-none":""}`,title:v("session.title"),onClick:()=>{R||(E(""),o())},children:y.jsx(ZS,{size:16,className:"text-[var(--label-secondary)]"})}),width:320,disabled:s,placement:"bottom",children:R=>y.jsxs("div",{className:"flex flex-col max-h-[360px]",children:[y.jsxs("div",{className:"flex items-center justify-between px-3 pt-2.5 pb-2",children:[y.jsxs("span",{className:"text-[13px] font-medium text-[var(--label-primary)] select-none",children:[v("session.title"),u>0&&y.jsxs("span",{className:"ml-1.5 text-[11px] font-normal text-[var(--label-tertiary)]",children:["(",u,")"]})]}),y.jsxs("button",{onClick:()=>{d(),R()},disabled:s,className:"flex items-center gap-1 px-2 py-1 rounded-[6px] text-[12px] text-[var(--label-secondary)] hover:text-[var(--label-primary)] hover:bg-[var(--fill-tertiary)] transition-colors disabled:opacity-40",children:[y.jsx(ey,{size:12}),y.jsx("span",{children:v("session.new")})]})]}),y.jsx("div",{className:"px-3 pb-2",children:y.jsx("input",{type:"text",placeholder:v("session.filter"),value:x,onChange:T=>w(T.target.value),className:"w-full px-2.5 py-1.5 rounded-[6px] bg-[var(--fill-tertiary)] text-[12px] text-[var(--label-primary)] placeholder:text-[var(--label-tertiary)] outline-none border border-transparent focus:border-[var(--separator)]",autoFocus:!0})}),y.jsx("div",{className:"h-px bg-[var(--separator)] mx-2"}),y.jsx("div",{ref:N,className:"flex-1 overflow-y-auto scrollbar-auto py-1.5 px-1.5",onScroll:j,children:l&&n.length===0?y.jsx("div",{className:"flex items-center justify-center py-6",children:y.jsx(Ki,{size:16,className:"animate-spin text-[var(--label-tertiary)]"})}):n.length===0?y.jsx("div",{className:"py-4 text-center text-[12px] text-[var(--label-tertiary)] select-none",children:v(x?"session.noMatch":"session.noPrevious")}):y.jsxs(y.Fragment,{children:[n.map(T=>y.jsxs("button",{onClick:()=>{T.isCurrent||(h(T.path),R())},disabled:T.isCurrent,className:`w-full text-left px-2.5 py-2 rounded-[8px] transition-colors mb-0.5 ${T.isCurrent?"bg-[var(--fill-secondary)] cursor-default":"hover:bg-[var(--fill-tertiary)] cursor-pointer"}`,children:[y.jsxs("div",{className:"flex items-center justify-between gap-2",children:[y.jsx("span",{className:`text-[13px] leading-[18px] truncate ${T.isCurrent?"font-medium text-[var(--color-accent)]":"text-[var(--label-primary)]"}`,children:T.name||T.firstMessage||v("session.empty")}),y.jsx("span",{className:"text-[11px] text-[var(--label-tertiary)] whitespace-nowrap shrink-0",children:m8(T.modified,v)})]}),T.name&&T.firstMessage&&y.jsx("div",{className:"mt-0.5 text-[11px] leading-[15px] text-[var(--label-tertiary)] truncate",children:T.firstMessage}),y.jsx("div",{className:"mt-0.5 text-[10px] text-[var(--label-quaternary)]",children:v("session.messageCount",{count:T.messageCount})})]},T.id)),l&&n.length>0&&y.jsx("div",{className:"flex items-center justify-center py-2",children:y.jsx(Ki,{size:14,className:"animate-spin text-[var(--label-tertiary)]"})})]})})]})})}const y8=["image/png","image/jpeg","image/gif","image/webp"],x8=2048,v8=2048,f0=.85,Ic=5*1024*1024;function d1(){return`img_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}async function d0(n){if(!y8.includes(n.type))throw new Error(`Unsupported image type: ${n.type}`);const l=await createImageBitmap(n),{width:i,height:u}=S8(l.width,l.height,x8,v8),s=document.createElement("canvas");s.width=i,s.height=u,s.getContext("2d").drawImage(l,0,0,i,u),l.close();let d=n.type,h=f0;n.type!=="image/png"&&n.type!=="image/gif"&&(d="image/jpeg");let p=s.toDataURL(d,h);if(d==="image/jpeg"||d==="image/webp")for(;Wc(p)>Ic&&h>.3;)h-=.1,p=s.toDataURL(d,h);if(d==="image/png"&&Wc(p)>Ic)for(d="image/jpeg",h=f0,p=s.toDataURL(d,h);Wc(p)>Ic&&h>.3;)h-=.1,p=s.toDataURL(d,h);const m=p.split(",")[1];return{id:d1(),data:m,mimeType:d,previewUrl:p}}function b8(n){const l=[];for(let i=0;i<n.items.length;i++){const u=n.items[i];if(u.type.startsWith("image/")){const s=u.getAsFile();s&&l.push(s)}}return l}function S8(n,l,i,u){if(n<=i&&l<=u)return{width:n,height:l};const s=Math.min(i/n,u/l);return{width:Math.round(n*s),height:Math.round(l*s)}}function Wc(n){const l=n.split(",")[1];return l?Math.ceil(l.length*3/4):0}let E8=0,Gu=[];function za(n,l="info"){const i={id:++E8,message:n,level:l,phase:"entering"};Gu.forEach(u=>u(i))}const C8=16,N8=300,A8={info:3e3,success:3e3,warning:4e3,error:5e3},j8={info:PS,success:BS,warning:g3,error:of},w8={info:"var(--toast-icon-info)",success:"var(--toast-icon-success)",warning:"var(--toast-icon-warning)",error:"var(--toast-icon-error)"};function T8(){const[n,l]=b.useState([]),i=b.useRef(new Set);return b.useEffect(()=>{const u=s=>{l(p=>[...p,s]);const o=setTimeout(()=>{i.current.delete(o),l(p=>p.map(m=>m.id===s.id?{...m,phase:"visible"}:m))},C8);i.current.add(o);const d=A8[s.level],h=setTimeout(()=>{i.current.delete(h),l(m=>m.map(v=>v.id===s.id?{...v,phase:"exiting"}:v));const p=setTimeout(()=>{i.current.delete(p),l(m=>m.filter(v=>v.id!==s.id))},N8);i.current.add(p)},d);i.current.add(h)};return Gu.push(u),()=>{Gu=Gu.filter(s=>s!==u),i.current.forEach(s=>clearTimeout(s)),i.current.clear()}},[]),n.length===0?null:y.jsx("div",{className:"fixed top-[max(1rem,env(safe-area-inset-top))] left-1/2 -translate-x-1/2 z-[100] flex flex-col items-center gap-2 pointer-events-none",children:n.map(u=>{const s=j8[u.level],o=w8[u.level];return y.jsxs("div",{className:"pointer-events-auto flex items-center gap-2 rounded-full bg-[var(--panel-bg)] backdrop-blur-[30px] border-[0.5px] border-[var(--panel-border)] shadow-[var(--panel-shadow)] px-4 py-2.5 text-[13px] leading-[16px] text-[var(--label-primary)] select-none transition-all duration-300 ease-out",style:u.phase==="entering"?{opacity:0,transform:"translateY(-8px)"}:u.phase==="exiting"?{opacity:0,transform:"translateY(-4px)"}:{opacity:1,transform:"translateY(0)"},children:[y.jsx(s,{size:14,className:"shrink-0",style:{color:o}}),y.jsx("span",{children:u.message})]},u.id)})})}function O8({currentModel:n,availableModels:l,onSelect:i}){const s=l&&l.length>0&&i,o=new Map;if(l)for(const h of l){const p=o.get(h.provider)??[];p.push(h),o.set(h.provider,p)}const d=h=>h.provider===n.provider&&h.id===n.id;return y.jsx(Wf,{disabled:!s,width:280,align:"left",trigger:({open:h})=>y.jsxs("button",{className:`inline-flex items-center gap-1 px-2 py-1 rounded-[9px] bg-[var(--fill-tertiary)] text-[12px] transition-colors ${s?"hover:bg-[var(--fill-secondary)] hover:text-[var(--label-primary)] cursor-pointer":"cursor-default"} text-[var(--label-secondary)]`,children:[y.jsx("span",{className:"max-w-[140px] truncate select-text",children:n.name||n.id}),s&&y.jsx(J0,{size:10,className:`transition-transform ${h?"rotate-180":""}`})]}),children:h=>y.jsx("div",{className:"max-h-[320px] overflow-y-auto py-1.5 px-1.5 scrollbar-auto",children:Array.from(o.entries()).map(([p,m],v)=>y.jsxs("div",{children:[v>0&&y.jsx("div",{className:"mx-1 my-1 h-px bg-[var(--separator)]"}),y.jsx("div",{className:"px-2.5 pt-2 pb-1 text-[11px] font-bold text-[var(--label-tertiary)] uppercase select-none",children:p}),m.map(x=>{const E=d(x);return y.jsxs("button",{onClick:()=>{E||i==null||i(x.provider,x.id),h()},className:`w-full text-left px-2.5 py-2 rounded-[8px] flex items-center gap-2 transition-colors select-none mb-0.5 ${E?"bg-[var(--fill-secondary)]":"hover:bg-[var(--fill-tertiary)]"}`,children:[y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:"text-[13px] text-[var(--label-primary)] truncate select-text",children:x.name||x.id}),y.jsx("div",{className:"text-[11px] text-[var(--label-tertiary)] truncate select-text",children:x.id})]}),E&&y.jsx(lr,{size:14,className:"text-[var(--color-accent)] flex-shrink-0"})]},`${x.provider}/${x.id}`)})]},p))})})}const R8=["off","minimal","low","medium","high"];function _8({currentLevel:n,onSelect:l}){const i=!!l;return y.jsx(Wf,{disabled:!i,width:160,align:"left",trigger:({open:u})=>y.jsxs("button",{className:`inline-flex items-center gap-1 px-2 py-1 rounded-[9px] bg-[var(--fill-tertiary)] text-[12px] transition-colors ${i?"hover:bg-[var(--fill-secondary)] hover:text-[var(--label-primary)] cursor-pointer":"cursor-default"} text-[var(--label-secondary)]`,children:[y.jsx("span",{className:"select-text",children:n}),i&&y.jsx(J0,{size:10,className:`transition-transform ${u?"rotate-180":""}`})]}),children:u=>y.jsx("div",{className:"py-1.5 px-1.5",children:R8.map(s=>{const o=s===n;return y.jsxs("button",{onClick:()=>{o||l==null||l(s),u()},className:`w-full text-left px-2.5 py-2 rounded-[8px] flex items-center gap-2 transition-colors select-none mb-0.5 ${o?"bg-[var(--fill-secondary)]":"hover:bg-[var(--fill-tertiary)]"}`,children:[y.jsx("span",{className:"flex-1 text-[13px] text-[var(--label-primary)]",children:s}),o&&y.jsx(lr,{size:14,className:"text-[var(--color-accent)] flex-shrink-0"})]},s)})})})}function M8({onClose:n,onConfirm:l}){const{t:i}=Ue(),[u,s]=b.useState(""),o=b.useCallback(()=>{l(u.trim()||void 0)},[u,l]);return y.jsx(Rn,{title:i("compact.title"),onClose:n,children:y.jsxs("div",{className:"px-5 py-4 space-y-3",children:[y.jsx("p",{className:"text-[13px] leading-[18px] text-[var(--label-secondary)] select-none",children:i("compact.description")}),y.jsx("textarea",{value:u,onChange:d=>s(d.target.value),placeholder:i("compact.placeholder"),rows:3,className:"w-full px-3 py-2 rounded-[10px] bg-[var(--fill-tertiary)] border border-[var(--separator)] text-[14px] leading-[20px] text-[var(--label-primary)] placeholder:text-[var(--label-tertiary)] outline-none resize-none focus:border-[var(--color-accent)] transition-colors"}),y.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[y.jsx("button",{onClick:n,className:"px-3.5 py-1.5 rounded-[8px] text-[13px] text-[var(--label-secondary)] hover:bg-[var(--fill-tertiary)] transition-colors",children:i("common.cancel")}),y.jsx("button",{onClick:o,className:"px-3.5 py-1.5 rounded-[8px] text-[13px] font-medium text-white bg-[var(--color-accent)] hover:opacity-90 active:opacity-80 transition-opacity",children:i("compact.start")})]})]})})}function z8({ref:n,instance:l,draft:i,onDraftChange:u,onSendMessage:s,onAbort:o,onSetModel:d,onSetThinkingLevel:h,onCompact:p,buttonMode:m,showCompactButton:v,compactDisabled:x,onImageLightbox:E,startBottomFollow:C}){const{t:N}=Ue(),w=b.useRef(null);b.useImperativeHandle(n,()=>({focus(){const $=w.current;if(!$)return;$.focus();const Z=$.value.length;$.selectionStart=$.selectionEnd=Z,$.scrollTop=$.scrollHeight}}));const j=b.useRef(null),R=b.useRef(i);R.current=i;const[T,z]=b.useState(!1),U=l==null?void 0:l.status,X=l==null?void 0:l.contextUsage,J=l==null?void 0:l.model,G=l==null?void 0:l.availableModels,K=l==null?void 0:l.thinkingLevel,q=!!X&&X.tokens!=null&&X.percent!=null,I=b.useCallback($=>{$.style.height="auto";const Z=Math.min($.scrollHeight,150);$.style.height=`${Z}px`,$.style.overflowY=$.scrollHeight>150?"auto":"hidden"},[]);b.useLayoutEffect(()=>{w.current&&I(w.current)},[i.text,I]);const oe=b.useCallback($=>{u(Z=>({...Z,text:$.target.value})),I($.target)},[u,I]),ee=!Qi(U)&&(!!i.text.trim()||i.images.length>0),ae=b.useCallback(()=>{const $=R.current;if(Qi(U)||!$.text.trim()&&$.images.length===0)return;const Z=$.images.length?$.images.map(W=>({data:W.data,mimeType:W.mimeType})):void 0;s($.text.trim(),Z),w.current&&(w.current.style.height="auto"),C()},[U,s,C]),te=b.useCallback($=>{$.nativeEvent.isComposing||$.keyCode===229||$.key==="Enter"&&!$.shiftKey&&($.preventDefault(),ae())},[ae]),re=b.useCallback($=>{const Z=b8($.clipboardData);Z.length!==0&&($.preventDefault(),Promise.all(Z.map(d0)).then(W=>{u(H=>({...H,images:[...H.images,...W]}))}).catch(W=>{za(N("eventStream.imageProcessFailed"),"error"),console.error("Image process failed:",W)}))},[u,N]),M=b.useCallback($=>{const Z=Array.from($.target.files??[]);Z.length!==0&&(Promise.all(Z.map(d0)).then(W=>{u(H=>({...H,images:[...H.images,...W]}))}).catch(W=>{za(N("eventStream.imageProcessFailed"),"error"),console.error("Image process failed:",W)}),$.target.value="")},[u,N]),Q=b.useCallback($=>{u(Z=>({...Z,images:Z.images.filter(W=>W.id!==$)}))},[u]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"glass-panel glass-panel-input px-3 py-2 md:px-4",children:[(U||q)&&y.jsxs("div",{className:"mb-1.5 flex items-center gap-2 px-1 text-[12px] leading-[15px] text-[var(--label-secondary)]",children:[y.jsx(L8,{status:U}),q&&y.jsxs("span",{className:"min-w-0 flex items-center gap-1",children:[y.jsx("span",{className:"min-w-0 truncate",children:y.jsx(D8,{contextUsage:X})}),v&&y.jsx("button",{onClick:()=>z(!0),disabled:x,title:N("eventStream.compactContext"),className:"shrink-0 inline-flex items-center justify-center p-0.5 rounded-[4px] text-[var(--label-secondary)] hover:text-[var(--color-accent)] hover:bg-[var(--fill-tertiary)] transition-colors disabled:opacity-40 disabled:pointer-events-none",children:y.jsx(l3,{size:12})})]})]}),y.jsxs("div",{className:"flex flex-col overflow-hidden rounded-[14px] border border-[var(--separator)]",children:[i.images.length>0&&y.jsx("div",{className:"flex gap-2 px-3 pt-2 pb-0 overflow-x-auto scrollbar-none md:px-4",children:i.images.map($=>y.jsxs("div",{className:"relative flex-shrink-0 group",children:[y.jsx("button",{onClick:()=>E($.previewUrl),className:"block rounded-[8px] overflow-hidden border border-[var(--separator)] hover:border-[var(--color-accent)] transition-colors",children:y.jsx("img",{src:$.previewUrl,alt:"Attached",className:"w-[60px] h-[60px] object-cover",draggable:!1})}),y.jsx("button",{onClick:()=>Q($.id),className:"absolute -top-1 -right-1 w-[14px] h-[14px] rounded-full bg-[var(--badge-bg)] text-[var(--badge-text)] flex items-center justify-center hover:bg-[var(--badge-bg-hover)] transition-colors","aria-label":"Remove image",children:y.jsx(Uf,{size:8})})]},$.id))}),y.jsx("textarea",{ref:w,rows:1,placeholder:N("eventStream.sendPlaceholder"),value:i.text,onChange:oe,onKeyDown:te,onPaste:re,className:"resize-none bg-transparent text-[var(--label-primary)] placeholder:text-[var(--label-tertiary)] text-[16px] leading-[24px] px-3 pt-[9px] pb-0 outline-none overflow-hidden md:px-4 md:pt-[10px] md:text-[14px] md:leading-[22px]"}),y.jsxs("div",{className:"flex items-center justify-between px-1.5 pt-[9px] pb-1.5 md:pt-[10px]",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[J&&y.jsx(O8,{currentModel:J,availableModels:G,onSelect:d}),K&&y.jsx(_8,{currentLevel:K,onSelect:h}),y.jsx("button",{onClick:()=>{var $;return($=j.current)==null?void 0:$.click()},className:"select-none h-[26px] px-1.5 rounded-[6px] flex items-center justify-center text-[var(--label-secondary)] hover:text-[var(--label-primary)] hover:bg-[var(--fill-tertiary)] transition-colors",title:N("eventStream.attachImage"),children:y.jsx(IS,{size:15})}),y.jsx("input",{ref:j,type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",multiple:!0,onChange:M,className:"hidden"})]}),y.jsx("div",{className:"flex-shrink-0",children:m==="stop"?y.jsx("button",{onClick:o,className:"select-none w-[28px] h-[28px] rounded-full bg-red-500 text-white flex items-center justify-center hover:opacity-90 active:opacity-80 transition-opacity",title:N("eventStream.stop"),children:y.jsx(c3,{size:12,fill:"currentColor"})}):y.jsx("button",{onClick:ae,disabled:!ee,className:`select-none w-[28px] h-[28px] rounded-full flex items-center justify-center transition-opacity ${ee?"bg-[var(--color-accent)] text-white hover:opacity-90 active:opacity-80":"bg-[var(--fill-secondary)] text-[var(--label-tertiary)] opacity-50 cursor-default"}`,title:N("eventStream.send"),children:y.jsx(TS,{size:16,strokeWidth:2.5})})})]})]})]}),T&&y.jsx(M8,{onClose:()=>z(!1),onConfirm:$=>{p($),z(!1)}})]})}function L8({status:n}){const{t:l}=Ue();if(!n)return null;const i=n==="streaming",u=n==="compacting",s=i?"bg-[color-mix(in_srgb,var(--color-accent)_12%,transparent)] text-[var(--color-accent)]":u?"bg-amber-500/10 text-amber-500":"bg-green-500/10 text-green-500",o=i?"bg-[var(--color-accent)] animate-pulse":u?"bg-amber-500 animate-pulse":"bg-green-500",d=l(i?"eventStream.statusRunning":u?"eventStream.statusCompacting":"eventStream.statusOnline");return y.jsxs("span",{className:`flex shrink-0 items-center gap-1 rounded-full px-1.5 py-0.5 ${s}`,title:d,role:"status","aria-live":"polite","aria-label":d,children:[y.jsx("span",{"aria-hidden":"true",className:`h-2 w-2 rounded-full ${o}`}),y.jsx("span",{className:"text-[11px] font-medium leading-none",children:d})]})}function D8({contextUsage:n}){const{tokens:l,contextWindow:i,percent:u}=n;if(l==null||u==null)return null;const s=u>90?"#ff4245":u>60?"#ff9230":"#30d158",o=d=>{if(d<1e3)return String(d);if(d<1e4)return`${(d/1e3).toFixed(1)}k`;if(d<1e6)return`${Math.round(d/1e3)}k`;const h=d/1e6;return h%1===0?`${h}M`:`${h.toFixed(1)}M`};return y.jsxs("span",{className:"select-text",style:{color:s},children:[o(l)," / ",o(i)," (",Math.round(u),"%)"]})}let k8=0;function h1(n,l){return`${n}:${l}:${k8++}`}function Pc(n,l,i){return l.id||l.__renderKey?l:{...l,__renderKey:h1(n,i)}}function U8(n,l){const{t:i}=Ue(),u=Rt(H=>H.send),s=Rt(H=>H.subscribe),o=Rt(H=>H.connectionState==="connected"),[d,h]=b.useState([]),[p,m]=b.useState(null),v=b.useRef(null),[x,E]=b.useState("idle"),[C,N]=b.useState(null),[w,j]=b.useState(!1),[R,T]=b.useState([]),[z,U]=b.useState(!1),[X,J]=b.useState(!1),[G,K]=b.useState(0),q=b.useRef(0),I=b.useRef(d);I.current=d;const oe=b.useRef(x);oe.current=x;const ee=b.useRef(w);ee.current=w;const ae=b.useCallback(()=>{h([]),m(null),E("refreshing"),N(null),j(!1),T([]),U(!1),J(!1),K(0)},[]);b.useEffect(()=>s(H=>{switch(H.type){case"forwarded_event":{if(H.payload.instanceId!==n)return;Q(n,H.payload.event,H.payload.data);break}case"history":{if(H.payload.instanceId!==n)return;const P=H.payload.messages,ne=H.payload.hasMore??!1;$(n,P,ne);break}case"session_list":{if(H.payload.instanceId!==n)return;q.current>0?T(P=>[...P,...H.payload.sessions]):T(H.payload.sessions),J(H.payload.hasMore??!1),K(H.payload.total??H.payload.sessions.length),U(!1);break}case"error":{console.error("[Paimon]",H.payload.message),E("error"),N(H.payload.message);break}case"instance_error":{if(H.payload.instanceId!==n)return;const P=H.payload.action?`error.action.${H.payload.action}`:null,ne=P?i(P,{message:H.payload.message,defaultValue:H.payload.message}):H.payload.message;za(ne,"error");break}}}),[n,s]),b.useEffect(()=>{if(o)return ae(),u({type:"subscribe",payload:{instanceId:n}}),u({type:"get_history",payload:{instanceId:n}}),()=>{u({type:"unsubscribe",payload:{instanceId:n}})}},[n,o,u,ae]);const te=b.useRef(l==null?void 0:l.sessionId),re=b.useRef(n);b.useEffect(()=>{const H=l==null?void 0:l.sessionId;if(n!==re.current){re.current=n,H!==void 0&&(te.current=H);return}te.current!==void 0&&H!==void 0&&H!==te.current&&(ae(),u({type:"get_history",payload:{instanceId:n}})),H!==void 0&&(te.current=H)},[l==null?void 0:l.sessionId,n,u,ae]);const M=b.useRef(l==null?void 0:l.status);b.useEffect(()=>{const H=l==null?void 0:l.status;M.current==="compacting"&&H!=="compacting"&&(ae(),u({type:"get_history",payload:{instanceId:n}})),M.current=H},[l==null?void 0:l.status,n,u,ae]);function Q(H,P,ne){const de=ne;switch(P){case"message_start":{const fe=de.message;if(!fe||fe.role!=="assistant")break;const Ae=Pc(H,{type:"message",timestamp:new Date().toISOString(),message:fe},"streaming");v.current=Ae.__renderKey??Ae.id??null,m(Ae);break}case"message_update":{const fe=de.message;if(!fe)break;m(Ae=>Ae?{...Ae,message:fe}:Pc(H,{type:"message",timestamp:new Date().toISOString(),message:fe},"streaming"));break}case"message_end":{const fe=de.message;if(fe){const Ae=v.current??h1(H,"live"),ot={type:"message",timestamp:new Date().toISOString(),message:fe,__renderKey:Ae};h(Gt=>[...Gt,ot])}v.current=null,m(null);break}}}function $(H,P,ne){const de=P.map(fe=>Pc(H,fe,"history"));oe.current==="loadingMore"?h(fe=>[...de,...fe]):h(de),j(ne),E("idle"),N(null)}const Z=b.useCallback(()=>{if(!ee.current||oe.current!=="idle")return;const H=I.current.length;E("loadingMore"),u({type:"get_history",payload:{instanceId:n,offset:H}})},[n,u]),W=b.useCallback(H=>{const P=(H==null?void 0:H.offset)??0;q.current=P,P===0&&T([]),U(!0),u({type:"list_sessions",payload:{instanceId:n,offset:P,limit:H==null?void 0:H.limit,filter:H==null?void 0:H.filter}})},[n,u]);return{entries:p?[...d,p]:d,streamingEntry:p,isStreaming:p!==null,loadState:x,errorMessage:C,hasMore:w,sessionList:R,sessionListLoading:z,sessionHasMore:X,sessionTotal:G,loadMore:Z,requestSessionList:W}}const B8=.5;function H8({topChromeHeight:n,bottomChromeHeight:l,bottomSafeGap:i=0}){const u=Math.max(0,l-i),s=Math.max(40,u+12);return{paddingTop:Math.max(24,n-4),paddingBottom:s,scrollButtonBottom:i+s}}function q8({previousScrollTop:n,previousScrollHeight:l,nextScrollHeight:i}){return n+i-l}function Y8(n){return n==="streaming"||n==="compacting"?"stop":"send"}function ss(n){return Math.max(0,n)}function V8({isAtBottom:n,isLoadingMore:l,distanceToBottom:i,overlap:u,force:s=!1,scrollToBottom:o}){return!n||l||!s&&i<=B8&&u<=0?!1:(o(),!0)}function G8({rawScrollTop:n,hasMore:l,canLoadMore:i,isLoadingMore:u,isSuppressed:s}){return n>=0&&ss(n)<100&&l&&i&&!u&&!s}const F8=350,or="data-entry-key",p1=.5,$8=3,K8=2e3;function Pf(n){return n.getAttribute(or)??void 0}function m1(n,l){const i=l.closest(`[${or}]`);return!i||!n.contains(i)?null:i}function g1(n,l){const i=n.querySelectorAll(`[${or}]`);for(const u of i)if(Pf(u)===l)return u;return null}function Gi(n,l){return l.getBoundingClientRect().top-n.top}function X8(n){const l=n.getBoundingClientRect(),i=l.top+8,u=n.querySelectorAll(`[${or}]`);for(const s of u){const o=s.getBoundingClientRect();if(o.bottom>i&&o.top<l.bottom)return s}return null}function Q8(n){const l={fallbackScrollTop:ss(n.scrollTop),fallbackScrollHeight:n.scrollHeight},i=n.getBoundingClientRect(),u=X8(n);if(!u)return l;const s=Pf(u);if(!s)return l;const o=u.getBoundingClientRect(),d=Math.min(Math.max(i.top+12,o.top+8),Math.min(o.bottom-1,i.bottom-1)),h=[{x:i.left+i.width/2,y:d},{x:i.left+24,y:d},{x:i.right-24,y:d}];for(const p of h){const m=document.elementsFromPoint(p.x,p.y);for(const v of m){if(v===n||!n.contains(v))continue;const x=m1(n,v);if(!x||x!==u)continue;const E=v.getBoundingClientRect();if(!(E.bottom<=i.top||E.top>=i.bottom))return{...l,entryKey:s,element:v,elementTop:Gi(i,v),entryTop:Gi(i,u)}}}return{...l,entryKey:s,entryTop:Gi(i,u)}}function h0(n,l){return Math.abs(l)<=p1?!1:(n.scrollTop+=l,!0)}function p0(n,l,{allowDiffFallback:i}){const u=n.getBoundingClientRect();if(l.element&&l.elementTop!=null&&l.element.isConnected&&n.contains(l.element)){const s=m1(n,l.element),o=s?Pf(s):void 0;if(!l.entryKey||o===l.entryKey){const d=Gi(u,l.element)-l.elementTop;return{mode:"deep",delta:d,adjusted:h0(n,d)}}}if(l.entryKey&&l.entryTop!=null){const s=g1(n,l.entryKey);if(s){const o=Gi(u,s)-l.entryTop;return{mode:"entry",delta:o,adjusted:h0(n,o)}}}if(i){const s=q8({previousScrollTop:l.fallbackScrollTop,previousScrollHeight:l.fallbackScrollHeight,nextScrollHeight:n.scrollHeight}),o=s-n.scrollTop;return n.scrollTop=s,{mode:"diff",delta:o,adjusted:Math.abs(o)>p1}}return{mode:"none",delta:0,adjusted:!1}}function Z8({scrollRef:n,contentRef:l,bottomChromeRef:i,entries:u,entriesRef:s,instanceId:o,hasMore:d,shouldScrollToBottom:h,onScrollToBottomHandled:p,onLoadMore:m,bottomChromeHeight:v,bottomSafeGap:x}){const E=b.useRef(!0),[C,N]=b.useState(!1),w=b.useRef(!1),j=b.useRef(!1),R=b.useRef(null),T=b.useRef(null),z=b.useRef(!1),U=b.useRef(null),X=b.useRef(u.length),J=b.useRef(void 0),G=b.useRef(0),K=b.useRef(null),q=b.useCallback(Z=>{R.current!=null&&cancelAnimationFrame(R.current),j.current=!0,w.current=!0,Z(),R.current=requestAnimationFrame(()=>{j.current=!1,w.current=!1,R.current=null})},[]),I=b.useCallback(()=>{var W;const Z=K.current;Z&&(Z.rafId!=null&&cancelAnimationFrame(Z.rafId),(W=Z.observer)==null||W.disconnect(),K.current=null)},[]),oe=b.useCallback(({force:Z=!1}={})=>{const W=n.current,H=l.current,P=i.current;if(!W||!H||!P)return!1;const ne=H.querySelectorAll(`[${or}]`),de=ne[ne.length-1],fe=de==null?void 0:de.getBoundingClientRect(),Ae=P.getBoundingClientRect(),ot=W.scrollHeight-ss(W.scrollTop)-W.clientHeight,Gt=fe?fe.bottom-Ae.top:0;return V8({isAtBottom:E.current,isLoadingMore:z.current,distanceToBottom:ot,overlap:Gt,force:Z,scrollToBottom:()=>{I(),q(()=>{W.scrollTop=W.scrollHeight}),N(!1)}})},[n,l,i,q,I]),ee=b.useCallback(()=>{var Z;(Z=T.current)==null||Z.call(T),T.current=null},[]),ae=b.useCallback(()=>{ee();const Z=performance.now();let W=null,H=!1;const P=(ne=performance.now())=>{W=null,!(H||ne-Z>=K8)&&(!E.current||z.current||(oe(),W=requestAnimationFrame(P)))};P(),T.current=()=>{H=!0,W!=null&&(cancelAnimationFrame(W),W=null)}},[oe,ee]);b.useLayoutEffect(()=>{z.current||oe()},[v,x,oe]),b.useLayoutEffect(()=>{const Z=l.current;if(!Z||typeof ResizeObserver>"u")return;const W=new ResizeObserver(()=>{oe()});return W.observe(Z),()=>W.disconnect()},[o,l,oe]);const te=b.useCallback(()=>{const Z=n.current,W=K.current;if(!Z||!W)return;let H={mode:"none"};q(()=>{H=p0(Z,W.snapshot,{allowDiffFallback:!1})}),H.mode==="none"&&I()},[n,q,I]),re=b.useCallback(()=>{const Z=K.current;!Z||Z.rafId!=null||(Z.rafId=requestAnimationFrame(()=>{const W=K.current;!W||W!==Z||(W.rafId=null,te())}))},[te]),M=b.useCallback(Z=>{const W=n.current,H=l.current;if(!W||!H||!Z.entryKey)return;I();const P={snapshot:Z,observer:null,rafId:null,warmupFrame:0};if(K.current=P,typeof ResizeObserver<"u"){const de=new ResizeObserver(()=>{re()});de.observe(H);const fe=g1(W,Z.entryKey);fe&&fe!==H&&de.observe(fe),P.observer=de}const ne=()=>{const de=K.current;!de||de!==P||de.warmupFrame>=$8||(de.rafId=requestAnimationFrame(()=>{const fe=K.current;!fe||fe!==P||(fe.rafId=null,fe.warmupFrame+=1,te(),ne())}))};ne()},[n,l,te,re,I]);b.useLayoutEffect(()=>(z.current=!1,U.current=null,J.current=void 0,G.current=0,X.current=s.current.length,E.current=!0,N(!1),()=>{ee(),I(),R.current!=null&&(cancelAnimationFrame(R.current),R.current=null),j.current=!1,w.current=!1,z.current=!1,U.current=null,J.current=void 0,G.current=0}),[o,s,I,ee]),b.useLayoutEffect(()=>{n.current&&(z.current||oe())},[u,o,n,oe]),b.useLayoutEffect(()=>{if(!h)return;if(!n.current){p();return}E.current=!0,oe({force:!0}),N(!1),p()},[h,u,n,oe,p]),b.useLayoutEffect(()=>{const Z=n.current;if(z.current&&Z&&u.length>X.current){const W=u[0]?hf(u[0]):void 0;if(!J.current||W!==J.current){const P=U.current;let ne={mode:"none"};P&&q(()=>{ne=p0(Z,P,{allowDiffFallback:!0})}),G.current=performance.now()+F8,P&&P.entryKey&&ne.mode!=="none"&&M(P),z.current=!1,U.current=null,J.current=void 0}else U.current&&(U.current={...U.current,fallbackScrollHeight:Z.scrollHeight})}z.current&&!d&&(z.current=!1,U.current=null,J.current=void 0),X.current=u.length},[u,d,o,n,q,M]);const Q=b.useCallback(()=>{const Z=n.current;if(!Z)return;const W=Z.scrollTop,H=ss(W),P=performance.now()<G.current;if(W<0||w.current||j.current)return;K.current&&I();const ne=Z.scrollHeight-H-Z.clientHeight<60;if(E.current=ne,ne||ee(),N(!ne),G8({rawScrollTop:W,hasMore:d,canLoadMore:!!m,isLoadingMore:z.current,isSuppressed:P})&&m){ee(),I(),z.current=!0;const fe=s.current,Ae=Q8(Z);U.current=Ae,J.current=fe[0]?hf(fe[0]):void 0,m()}},[n,s,d,m,I,ee]),$=b.useCallback(()=>{n.current&&(I(),q(()=>{n.current.scrollTop=n.current.scrollHeight}),E.current=!0,N(!1))},[n,q,I]);return{handleScroll:Q,scrollToBottom:$,showScrollBtn:C,startBottomFollow:ae}}function J8(n,l,i,u){const{t:s}=Ue(),o=Ju(m=>m.setDraft),{canReEdit:d,userContent:h}=b.useMemo(()=>{var v,x;if(i!=="idle"||l.length===0)return{canReEdit:!1,userContent:null};const m=l[l.length-1];if(m.type!=="message"||((v=m.message)==null?void 0:v.role)!=="assistant"||m.message.stopReason!=="aborted")return{canReEdit:!1,userContent:null};for(let E=l.length-2;E>=0;E--){const C=l[E];if(C.type==="message"&&((x=C.message)==null?void 0:x.role)==="user")return{canReEdit:!0,userContent:C.message.content}}return{canReEdit:!1,userContent:null}},[l,i]),p=b.useCallback(()=>{if(!d||h==null)return;const m=Ju.getState().drafts.get(n)??Yf;if(m.text.trim()||m.images.length>0){za(s("reEdit.draftNotEmpty"),"warning");return}const v=I8(h);qf.flushSync(()=>{o(n,v)}),u==null||u()},[d,h,n,o,s,u]);return d?p:void 0}function I8(n){let l="";const i=[];if(typeof n=="string")l=n;else if(Array.isArray(n)){const u=[];for(const s of n)if(s.type==="text")u.push(s.text);else if(s.type==="image"){const o=s,d=d1();i.push({id:d,data:o.data,mimeType:o.mimeType,previewUrl:`data:${o.mimeType};base64,${o.data}`})}l=u.join("")}return{text:l,images:i}}function W8(){const{t:n}=Ue(),{id:l}=kb(),i=l,u=Rt(pe=>pe.send),s=Nl($2(i)),o=Ju(pe=>pe.drafts.get(i)??Yf),d=Ju(pe=>pe.setDraft),{entries:h,isStreaming:p,loadState:m,errorMessage:v,hasMore:x,sessionList:E,sessionListLoading:C,sessionHasMore:N,sessionTotal:w,loadMore:j,requestSessionList:R}=U8(i,s),T=b.useCallback(pe=>{d(i,pe)},[i,d]),z=b.useCallback((pe,ct)=>{u({type:"prompt",payload:{instanceId:i,message:pe,images:ct!=null&&ct.length?ct:void 0}}),d(i,{text:"",images:[]})},[i,u,d]),U=b.useCallback(()=>{u({type:"abort",payload:{instanceId:i}})},[i,u]),X=b.useCallback((pe,ct)=>{u({type:"set_model",payload:{instanceId:i,provider:pe,id:ct}})},[i,u]),J=b.useCallback(pe=>{u({type:"set_thinking_level",payload:{instanceId:i,level:pe}})},[i,u]),G=b.useCallback(()=>{R({offset:0})},[R]),K=b.useCallback((pe,ct)=>{R({offset:pe,filter:ct})},[R]),q=b.useCallback(pe=>{R({offset:0,filter:pe||void 0})},[R]),I=b.useCallback(()=>{u({type:"new_session",payload:{instanceId:i}})},[i,u]),oe=b.useCallback(pe=>{u({type:"switch_session",payload:{instanceId:i,path:pe}})},[i,u]),ee=b.useCallback(pe=>{u({type:"compact",payload:{instanceId:i,customInstructions:pe}})},[i,u]),ae=b.useRef(null),te=J8(i,h,s==null?void 0:s.status,()=>{var pe;(pe=ae.current)==null||pe.focus()}),re=b.useRef(null),M=b.useRef(null),Q=b.useRef(null),$=b.useRef(null),Z=b.useRef(null),[W,H]=b.useState(null),P=b.useRef(h);P.current=h;const ne=m==="refreshing",de=Y8(s==null?void 0:s.status),fe=h.length>0&&h[h.length-1].type==="compaction",Ae=Qi(s==null?void 0:s.status),[ot,Gt]=b.useState(!1),_n=b.useCallback(()=>{Gt(!1)},[]),La=b.useRef(m);b.useLayoutEffect(()=>{La.current==="refreshing"&&m==="idle"&&Gt(!0),La.current=m},[m]);const[Da,Ml]=b.useState(64),[zl,ln]=b.useState(96),[ka,Ll]=b.useState(12),Dl=H8({topChromeHeight:Da,bottomChromeHeight:zl,bottomSafeGap:ka});b.useLayoutEffect(()=>{const pe=(Mn,ps)=>{if(!Mn)return()=>{};const Hl=()=>{ps(Math.ceil(Mn.getBoundingClientRect().height))};if(Hl(),typeof ResizeObserver>"u")return()=>{};const dr=new ResizeObserver(Hl);return dr.observe(Mn),()=>dr.disconnect()},ct=pe(Q.current,Ml),oa=pe($.current,ln),ca=pe(Z.current,Ll);return()=>{ct(),oa(),ca()}},[i]);const{handleScroll:cr,scrollToBottom:kl,showScrollBtn:Ul,startBottomFollow:Bl}=Z8({scrollRef:re,contentRef:M,bottomChromeRef:$,entries:h,entriesRef:P,instanceId:i,hasMore:x,shouldScrollToBottom:ot,onScrollToBottomHandled:_n,onLoadMore:j,bottomChromeHeight:zl,bottomSafeGap:ka}),fr={title:(s==null?void 0:s.cwd.split("/").pop())||(s==null?void 0:s.cwd)||"",cwd:s==null?void 0:s.cwd,homedir:s==null?void 0:s.homedir,gitBranch:s==null?void 0:s.gitBranch,actions:y.jsx(g8,{sessions:E,loading:C,hasMore:N,total:w,disabled:Qi(s==null?void 0:s.status),onOpen:G,onNewSession:I,onSwitchSession:oe,onLoadMore:K,onFilterChange:q})};return y.jsxs("div",{className:"relative flex-1 min-w-0 overflow-hidden",children:[y.jsxs("main",{className:"absolute inset-0 flex min-h-0 flex-col overflow-hidden",children:[y.jsx("div",{className:"pointer-events-none absolute left-0 right-0 top-0 z-20 px-3 pt-3 md:px-4 md:pt-4",children:y.jsxs("div",{ref:Q,className:"glass-panel pointer-events-auto mx-auto w-full max-w-[920px] px-3 py-2 md:px-4 md:py-2.5",role:"region","aria-label":"Instance info",children:[y.jsx("div",{className:"hidden md:flex",children:y.jsx(c0,{...fr})}),y.jsx(f1,{children:y.jsx(c0,{...fr})})]})}),y.jsx("div",{ref:re,onScroll:cr,style:{overflowAnchor:"none"},"aria-busy":ne,className:"absolute bottom-[var(--bottom-safe-gap)] left-0 right-0 top-6 overflow-y-auto scrollbar-auto px-3 md:bottom-0 md:top-7 md:px-4",children:y.jsxs("div",{ref:M,style:{paddingTop:Dl.paddingTop,paddingBottom:Dl.paddingBottom},className:"mx-auto max-w-[920px] space-y-2",children:[m==="loadingMore"&&y.jsx("div",{className:"text-center text-[var(--label-tertiary)] text-[11px] py-2 select-none",children:"Loading earlier messages..."}),ne?y.jsx(P8,{}):m==="error"?y.jsxs("div",{className:"mx-auto mt-8 max-w-[520px] rounded-[12px] border border-[var(--separator)] bg-[var(--fill-card)] px-4 py-3 text-center",children:[y.jsx("div",{className:"text-[13px] text-[var(--label-primary)] select-none",children:"Failed to load conversation"}),v&&y.jsx("div",{className:"mt-1 text-[12px] text-[var(--label-secondary)] break-words select-text",children:v})]}):h.length===0&&!x?y.jsx("div",{className:"text-center text-[var(--label-tertiary)] text-[12px] pt-8 select-none",children:"No messages yet"}):h.map((pe,ct)=>{const oa=hf(pe),ca=ct===h.length-1;return y.jsx("div",{"data-entry-key":oa,children:y.jsx(a8,{entry:pe,entries:h,isLast:ca,isStreaming:p,onReEdit:ca?te:void 0})},oa)})]})}),Ul&&y.jsx("div",{style:{bottom:Dl.scrollButtonBottom},className:"absolute left-1/2 z-30 -translate-x-1/2",children:y.jsx("button",{onClick:kl,className:"select-none w-9 h-9 rounded-full bg-[var(--btn-solid)] border border-[var(--separator)] text-[var(--label-secondary)] flex items-center justify-center hover:bg-[var(--btn-solid-hover)] active:scale-95 transition-all shadow-[0_4px_20px_rgba(0,0,0,0.12)]",title:n("eventStream.scrollToBottom"),children:y.jsx(DS,{size:16})})}),y.jsx("div",{ref:$,className:"pointer-events-none absolute bottom-0 left-0 right-0 z-20 px-3 pb-0 md:px-4",children:y.jsxs("div",{className:"pointer-events-auto mx-auto w-full max-w-[920px]",children:[y.jsx(z8,{ref:ae,instance:s,draft:o,onDraftChange:T,onSendMessage:z,onAbort:U,onSetModel:X,onSetThinkingLevel:J,onCompact:ee,buttonMode:de,showCompactButton:!fe,compactDisabled:Ae,onImageLightbox:H,startBottomFollow:Bl}),y.jsx("div",{ref:Z,className:"h-[var(--bottom-safe-gap)] md:h-0","aria-hidden":"true"})]})})]}),W&&y.jsx(c1,{src:W,onClose:()=>H(null)})]})}function P8(){return y.jsx("div",{className:"space-y-3 pt-3 select-none","aria-label":"Loading conversation",children:[0,1,2,3].map(n=>y.jsxs("div",{className:"space-y-1.5 animate-pulse",children:[y.jsx("div",{className:"h-3 w-20 rounded-full bg-[var(--fill-tertiary)]"}),y.jsxs("div",{className:"max-w-[680px] space-y-1.5 rounded-[10px] border border-[var(--separator)] bg-[var(--fill-card)] p-3",children:[y.jsx("div",{className:"h-3 w-[82%] rounded-full bg-[var(--fill-secondary)]"}),y.jsx("div",{className:"h-3 w-[64%] rounded-full bg-[var(--fill-tertiary)]"})]})]},n))})}function eA(){const{t:n}=Ue(),l=Df();return y.jsx("div",{className:"flex-1 flex items-center justify-center",children:y.jsxs("div",{className:"text-center select-none",children:[y.jsx("img",{src:l,alt:"Paimon",className:"w-16 h-16 mx-auto mb-4 opacity-80"}),y.jsx("div",{className:"text-[14px] text-[var(--label-tertiary)] tracking-wide",children:n("eventStream.tagline")})]})})}function tA(){return y.jsx("div",{className:"relative flex-1 min-w-0 overflow-hidden flex flex-col",children:y.jsx(Jb,{})})}const nA={common:{cancel:"取消",confirm:"确认",loading:"加载中…",online:"在线",offline:"离线"},login:{subtitle:"输入 Access Token 以连接",placeholder:"Access Token",invalidToken:"Token 无效,请检查后重试。",connect:"连接",verifying:"验证中…",tokenHint:"Token 可在 <1>~/.paimon/hub.json</1> 中找到"},sidebar:{newInstance:"新建实例",machine_one:"{{count}} 台机器",machine_other:"{{count}} 台机器",instance_one:"{{count}} 个实例",instance_other:"{{count}} 个实例",noInstances:"暂无 pi 实例连接",settings:"设置",shutdown:"退出实例",shutdownBusy:"实例正在执行中,请等待完成后再退出",statusStreaming:"生成中",statusCompacting:"压缩中",statusIdle:"空闲"},eventStream:{tagline:"守望 · 交互 · 掌控",sendPlaceholder:"发送消息…",scrollToBottom:"滚到底部",stop:"停止",send:"发送",attachImage:"添加图片",imageProcessFailed:"图片处理失败,请检查图片格式",statusRunning:"执行中",statusCompacting:"压缩中",statusOnline:"在线",compactContext:"压缩上下文",instanceNotFound:"实例不存在"},compact:{title:"压缩上下文",description:"压缩将总结旧的对话内容以释放上下文空间。可选填自定义提示词来指定压缩时关注的方向。",placeholder:"例如:重点保留关于数据库设计的讨论…",start:"开始压缩"},settings:{title:"设置",appearance:"外观",theme:"主题",themeLight:"浅色",themeDark:"深色",themeSystem:"系统",background:"背景",bgMist:"雾",bgAurora:"极光",bgEmber:"余烬",language:"语言",langZhCN:"简体中文",langEn:"English"},notification:{title:"通知",label:"任务完成通知",on:"开启",off:"关闭",denied:"通知权限已被浏览器拒绝,请在浏览器设置中允许",taskComplete:"✅ {{name}} 任务完成"},newInstance:{title:"新建实例",edgeNode:"Edge 节点",noEdges:"没有可用的 Edge 节点",workingDir:"工作目录",pathPlaceholder:"/path/to/your/project",create:"创建",creating:"创建中…",truncatedHint:"输入更多字符以缩小范围…",fetchEdgeError:"获取 Edge 列表失败",noEdgeSelected:"未选择 Edge 节点",requestTimeout:"请求超时",networkError:"网络错误",requestFailed:"请求失败 (HTTP {{status}})"},session:{title:"Sessions",new:"新建",filter:"筛选…",noMatch:"无匹配的 Session",noPrevious:"暂无历史 Session",empty:"空 Session",messageCount_one:"{{count}} 条消息",messageCount_other:"{{count}} 条消息",timeJustNow:"刚刚"},entries:{contextCompacted:"上下文已压缩",branchSummary:"分支摘要",thinking:"思考",thinkingStreaming:"思考中...",running:"执行中...",aborted:"已终止",copied:"已复制",copy:"复制",result:"结果",params:"参数"},reEdit:{button:"重新编辑",draftNotEmpty:"输入框已有内容,请先清空"},error:{title:"错误详情",message:"错误信息",type:"错误类型",requestId:"请求 ID",action:{compact:"压缩失败:{{message}}"}}},aA={common:{cancel:"Cancel",confirm:"Confirm",loading:"Loading…",online:"Online",offline:"Offline"},login:{subtitle:"Enter access token to connect",placeholder:"Access Token",invalidToken:"Invalid token. Please check and try again.",connect:"Connect",verifying:"Verifying…",tokenHint:"Find your token in <1>~/.paimon/hub.json</1>"},sidebar:{newInstance:"New instance",machine_one:"{{count}} machine",machine_other:"{{count}} machines",instance_one:"{{count}} instance",instance_other:"{{count}} instances",noInstances:"No pi instances connected",settings:"Settings",shutdown:"Shutdown instance",shutdownBusy:"Instance is running, please wait before shutting down",statusStreaming:"Streaming",statusCompacting:"Compacting",statusIdle:"Idle"},eventStream:{tagline:"Watch · Interact · Control",sendPlaceholder:"Send a message...",scrollToBottom:"Scroll to bottom",stop:"Stop",send:"Send",attachImage:"Attach image",imageProcessFailed:"Image processing failed, please check the format",statusRunning:"Running",statusCompacting:"Compacting",statusOnline:"Online",compactContext:"Compact context",instanceNotFound:"Instance not found"},compact:{title:"Compact Context",description:"Compaction summarizes older conversation to free up context space. Optionally provide custom instructions to guide what to focus on.",placeholder:"e.g. Keep the discussion about database design…",start:"Start compaction"},settings:{title:"Settings",appearance:"Appearance",theme:"Theme",themeLight:"Light",themeDark:"Dark",themeSystem:"System",background:"Background",bgMist:"Mist",bgAurora:"Aurora",bgEmber:"Ember",language:"Language",langZhCN:"简体中文",langEn:"English"},notification:{title:"Notification",label:"Task Completion Notification",on:"On",off:"Off",denied:"Notification permission denied. Please allow in browser settings",taskComplete:"✅ {{name}} task completed"},newInstance:{title:"New Instance",edgeNode:"Edge Node",noEdges:"No available Edge nodes",workingDir:"Working Directory",pathPlaceholder:"/path/to/your/project",create:"Create",creating:"Creating…",truncatedHint:"Type more to narrow results…",fetchEdgeError:"Failed to fetch edge list",noEdgeSelected:"No edge selected",requestTimeout:"Request timed out",networkError:"Network error",requestFailed:"Request failed (HTTP {{status}})"},session:{title:"Sessions",new:"New",filter:"Filter…",noMatch:"No matching sessions",noPrevious:"No previous sessions",empty:"Empty session",messageCount_one:"{{count}} message",messageCount_other:"{{count}} messages",timeJustNow:"just now"},entries:{contextCompacted:"Context compacted",branchSummary:"Branch summary",thinking:"Thinking",thinkingStreaming:"Thinking...",running:"Running...",aborted:"Aborted",copied:"Copied",copy:"Copy",result:"Result",params:"Parameters"},reEdit:{button:"Edit",draftNotEmpty:"Input is not empty, please clear first"},error:{title:"Error Details",message:"Error message",type:"Error type",requestId:"Request ID",action:{compact:"Compaction failed: {{message}}"}}},y1="paimon:language";function lA(){const n=localStorage.getItem(y1);return n==="zh-CN"||n==="en"?n:"zh-CN"}function iA(n){localStorage.setItem(y1,n),at.changeLanguage(n)}at.use(F3).init({resources:{"zh-CN":{translation:nA},en:{translation:aA}},lng:lA(),fallbackLng:"zh-CN",interpolation:{escapeValue:!1}});function ef({options:n,value:l,onChange:i}){return y.jsx("div",{className:"flex rounded-[8px] bg-[var(--fill-secondary)] p-[2px] select-none",children:n.map(u=>y.jsx("button",{onClick:()=>i(u.value),className:`px-3 py-1.5 rounded-[6px] text-[13px] leading-[18px] transition-all ${l===u.value?"bg-[var(--panel-bg)] text-[var(--label-primary)] font-semibold shadow-sm backdrop-blur-sm":"text-[var(--label-secondary)] font-normal hover:text-[var(--label-primary)]"}`,children:u.label},u.value))})}function ku({label:n,children:l,showSeparator:i=!0}){return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex items-center justify-between px-4 py-3 select-none",children:[y.jsx("span",{className:"text-[14px] leading-[20px] font-semibold text-[var(--label-primary)]",children:n}),l]}),i&&y.jsx("div",{className:"ml-4 border-b border-[var(--separator)]"})]})}function rA({value:n,onChange:l,options:i}){return y.jsx("div",{className:"flex items-center gap-3 select-none",children:i.map(u=>y.jsxs("button",{onClick:()=>l(u.value),className:"flex flex-col items-center gap-1",children:[y.jsx("div",{className:`w-7 h-7 rounded-full transition-all ${n===u.value?"ring-2 ring-[var(--color-accent)] ring-offset-1":"hover:scale-110"}`,style:{background:`conic-gradient(${u.colors.join(", ")})`}}),y.jsx("span",{className:`text-[12px] leading-[16px] ${n===u.value?"text-[var(--label-primary)] font-semibold":"text-[var(--label-secondary)] font-normal"}`,children:u.label})]},u.value))})}function uA(){const{t:n,i18n:l}=Ue(),[i,u]=hS(),[s,o]=K0(),[d,h]=mS(),p=[{value:"light",label:n("settings.themeLight")},{value:"dark",label:n("settings.themeDark")},{value:"system",label:n("settings.themeSystem")}],m=[{value:"mist",label:n("settings.bgMist"),colors:["#e8f0fe","#f5e6f0","#e6f0f5","#f0f5e6"]},{value:"aurora",label:n("settings.bgAurora"),colors:["#a8d8ea","#aa96da","#8fd3c4","#c4a8d8"]},{value:"ember",label:n("settings.bgEmber"),colors:["#f8d4b0","#f0b0c0","#f8e0a0","#e8c0d0"]}],v=[{value:"zh-CN",label:n("settings.langZhCN")},{value:"en",label:n("settings.langEn")}],x=[{value:"on",label:n("notification.on")},{value:"off",label:n("notification.off")}];return y.jsx("div",{className:"flex-1 flex items-start justify-center p-4 md:p-6 overflow-y-auto scrollbar-auto",children:y.jsxs("div",{className:"w-full max-w-[480px]",children:[y.jsx(f1,{title:n("settings.title")}),y.jsx("h1",{className:"hidden md:block text-[22px] font-semibold text-[var(--label-primary)] mb-6 px-4 select-none",children:n("settings.title")}),y.jsx("div",{className:"text-[14px] leading-[20px] font-semibold text-[var(--label-primary)] mb-2 px-4 select-none",children:n("settings.appearance")}),y.jsxs("section",{className:"glass-panel overflow-hidden",children:[y.jsx(ku,{label:n("settings.theme"),children:y.jsx(ef,{options:p,value:i,onChange:u})}),y.jsx(ku,{label:n("settings.background"),showSeparator:!1,children:y.jsx(rA,{value:s,onChange:o,options:m})})]}),y.jsx("div",{className:"text-[14px] leading-[20px] font-semibold text-[var(--label-primary)] mb-2 mt-6 px-4 select-none",children:n("settings.language")}),y.jsx("section",{className:"glass-panel overflow-hidden",children:y.jsx(ku,{label:n("settings.language"),showSeparator:!1,children:y.jsx(ef,{options:v,value:l.language,onChange:iA})})}),Q0&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"text-[14px] leading-[20px] font-semibold text-[var(--label-primary)] mb-2 mt-6 px-4 select-none",children:n("notification.title")}),y.jsx("section",{className:"glass-panel overflow-hidden",children:y.jsx(ku,{label:n("notification.label"),showSeparator:!1,children:y.jsx(ef,{options:x,value:d?"on":"off",onChange:async E=>{E==="on"?await Notification.requestPermission()==="granted"?h(!0):za(n("notification.denied"),"warning"):h(!1)}})})})]})]})})}async function Nf(n,l){const i=U0(),u=new Headers(l==null?void 0:l.headers);i&&u.set("Authorization",`Bearer ${i}`);const s=await fetch(n,{...l,headers:u});return s.status===401&&(B0(),window.location.reload()),s}function sA({value:n,onChange:l,edgeId:i,disabled:u=!1,autoFocus:s=!1,onSubmit:o}){const{t:d}=Ue(),[h,p]=b.useState([]),[m,v]=b.useState(!1),[x,E]=b.useState(!1),[C,N]=b.useState(-1),[w,j]=b.useState(!1),R=b.useRef(null),T=b.useRef(null),z=b.useRef(null),U=b.useRef(null);b.useEffect(()=>()=>{var K;(K=z.current)==null||K.abort()},[]),b.useEffect(()=>{var K;s&&((K=R.current)==null||K.focus())},[s]);const X=b.useCallback(async(K,q)=>{z.current&&z.current.abort();const I=new AbortController;z.current=I,E(!0);try{const ee=await(await Nf(`/api/edges/${encodeURIComponent(K)}/browse?path=${encodeURIComponent(q)}`,{signal:I.signal})).json();if(I.signal.aborted)return;ee.error?(p([]),v(!1),j(!1)):(p(ee.entries??[]),v(ee.truncated??!1),j((ee.entries??[]).length>0||ee.truncated)),N(-1)}catch{I.signal.aborted||(p([]),j(!1))}finally{I.signal.aborted||E(!1)}},[]);b.useEffect(()=>{if(!i||!n||!n.startsWith("/")){p([]),j(!1);return}return U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{X(i,n)},250),()=>{U.current&&clearTimeout(U.current)}},[n,i,X]);const J=b.useCallback(K=>{var ee;const oe=(n.endsWith("/")?n:n.substring(0,n.lastIndexOf("/")+1))+K.name+"/";l(oe),N(-1),(ee=R.current)==null||ee.focus()},[n,l]),G=b.useCallback(K=>{if(w&&h.length>0){if(K.key==="ArrowDown"){K.preventDefault(),N(q=>q<h.length-1?q+1:0);return}if(K.key==="ArrowUp"){K.preventDefault(),N(q=>q>0?q-1:h.length-1);return}if(K.key==="Tab"){K.preventDefault(),C>=0&&C<h.length?J(h[C]):h.length===1&&J(h[0]);return}if(K.key==="Enter"&&C>=0&&C<h.length){K.preventDefault(),J(h[C]);return}if(K.key==="Escape"){K.preventDefault(),j(!1),N(-1);return}}K.key==="Enter"&&(K.preventDefault(),o==null||o())},[w,h,C,J,o]);return b.useEffect(()=>{if(C<0||!T.current)return;const q=T.current.children[C];q==null||q.scrollIntoView({block:"nearest"})},[C]),b.useEffect(()=>{p([]),j(!1),N(-1)},[i]),y.jsxs("div",{className:"flex flex-col gap-1.5",children:[y.jsxs("div",{className:"relative",children:[y.jsx("input",{ref:R,type:"text",value:n,onChange:K=>l(K.target.value),onKeyDown:G,onFocus:()=>{h.length>0&&j(!0)},onBlur:()=>{setTimeout(()=>j(!1),150)},placeholder:d("newInstance.pathPlaceholder"),disabled:u,spellCheck:!1,autoComplete:"off",className:"w-full rounded-[10px] px-3 py-2 bg-[var(--fill-tertiary)] border border-[var(--separator)] text-[14px] leading-[20px] text-[var(--label-primary)] placeholder:text-[var(--label-tertiary)] outline-none focus:border-[var(--color-accent)] transition-colors disabled:opacity-50 pr-8"}),x&&y.jsx("div",{className:"absolute right-2.5 top-1/2 -translate-y-1/2",children:y.jsx(Ki,{size:14,className:"animate-spin text-[var(--label-tertiary)]"})})]}),w&&y.jsxs("div",{ref:T,className:"max-h-[200px] overflow-y-auto rounded-[10px] border border-[var(--separator)] bg-[var(--fill-quaternary)]",children:[h.map((K,q)=>y.jsxs("button",{type:"button",onMouseDown:I=>{I.preventDefault(),J(K)},onMouseEnter:()=>N(q),className:`w-full flex items-center gap-2 px-3 py-1.5 text-left text-[13px] transition-colors ${q===C?"bg-[var(--fill-secondary)]":"hover:bg-[var(--fill-tertiary)]"}`,children:[y.jsx(P0,{size:14,className:"shrink-0 text-[var(--label-tertiary)]"}),y.jsx("span",{className:"text-[var(--label-primary)] truncate",children:K.name})]},K.name)),m&&y.jsx("div",{className:"px-3 py-1.5 text-[12px] text-[var(--label-tertiary)] border-t border-[var(--separator)]",children:d("newInstance.truncatedHint")})]})]})}function oA({onClose:n,onCreated:l}){const{t:i}=Ue(),[u,s]=b.useState(""),[o,d]=b.useState([]),[h,p]=b.useState(""),[m,v]=b.useState(!0),[x,E]=b.useState(!1),[C,N]=b.useState(null);b.useEffect(()=>{Nf("/api/edges").then(R=>R.json()).then(R=>{if(d(R.edges),R.edges.length>0){p(R.edges[0].edgeId);const T=R.edges[0].homedir;if(T){const z=T.endsWith("/")?T:T+"/";s(z)}}v(!1)}).catch(()=>{v(!1),N(i("newInstance.fetchEdgeError"))})},[]);const w=b.useCallback(R=>{p(R);const T=o.find(z=>z.edgeId===R);if(T!=null&&T.homedir){const z=T.homedir.endsWith("/")?T.homedir:T.homedir+"/";s(z)}},[o]),j=b.useCallback(async()=>{const R=u.trim();if(!(!R||x)){if(!h){N(i("newInstance.noEdgeSelected"));return}E(!0),N(null);try{const T=await Nf("/api/instances",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:R,edgeId:h}),signal:AbortSignal.timeout(2e4)}),z=await T.json();if(!T.ok||!z.instanceId){N(z.error||i("newInstance.requestFailed",{status:T.status})),E(!1);return}l(z.instanceId)}catch(T){const z=T.name==="TimeoutError"?i("newInstance.requestTimeout"):T.message||i("newInstance.networkError");N(z),E(!1)}}},[u,x,h,l]);return y.jsx(Rn,{title:y.jsxs(y.Fragment,{children:[y.jsx(FS,{size:16}),y.jsx("span",{children:i("newInstance.title")})]}),onClose:n,children:y.jsxs("div",{className:"px-5 py-4 flex flex-col gap-3",children:[y.jsxs("div",{className:"flex flex-col gap-1.5",children:[y.jsx("label",{className:"text-[13px] text-[var(--label-secondary)]",children:i("newInstance.edgeNode")}),m?y.jsx("div",{className:"text-[13px] text-[var(--label-tertiary)]",children:i("common.loading")}):o.length===0?y.jsx("div",{className:"text-[12px] text-[#ff4245]",children:i("newInstance.noEdges")}):o.length===1?y.jsxs("div",{className:"text-[13px] text-[var(--label-primary)]",children:[o[0].hostname,y.jsxs("span",{className:"text-[var(--label-tertiary)] ml-1.5",children:["(",o[0].edgeId,")"]})]}):y.jsx("select",{value:h,onChange:R=>w(R.target.value),disabled:x,className:"w-full rounded-[10px] px-3 py-2 bg-[var(--fill-tertiary)] border border-[var(--separator)] text-[14px] text-[var(--label-primary)] outline-none focus:border-[var(--color-accent)] transition-colors disabled:opacity-50",children:o.map(R=>y.jsxs("option",{value:R.edgeId,children:[R.hostname," (",R.edgeId,")"]},R.edgeId))})]}),y.jsxs("div",{className:"flex flex-col gap-1.5",children:[y.jsx("label",{className:"text-[13px] text-[var(--label-secondary)]",children:i("newInstance.workingDir")}),y.jsx(sA,{value:u,onChange:s,edgeId:h,disabled:x||m,autoFocus:!m,onSubmit:j})]}),C&&y.jsx("div",{className:"text-[12px] leading-[16px] text-[#ff4245] whitespace-pre-wrap break-words",children:C}),y.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[y.jsx("button",{onClick:n,disabled:x,className:"px-3.5 py-1.5 rounded-[8px] text-[13px] text-[var(--label-secondary)] hover:bg-[var(--fill-tertiary)] transition-colors disabled:opacity-50",children:i("common.cancel")}),y.jsx("button",{onClick:j,disabled:x||!u.trim()||!h,className:"px-3.5 py-1.5 rounded-[8px] text-[13px] font-medium text-white bg-[var(--color-accent)] hover:opacity-90 transition-opacity disabled:opacity-40",children:i(x?"newInstance.creating":"newInstance.create")})]})]})})}function cA({onLogin:n,error:l}){const{t:i}=Ue(),[u,s]=b.useState(""),[o,d]=b.useState(!1),[h,p]=b.useState(!1),m=Df(),v=b.useCallback(async x=>{x.preventDefault();const E=u.trim();if(!(!E||o)){d(!0),p(!1);try{if((await fetch("/api/instances",{headers:{Authorization:`Bearer ${E}`}})).status===401){p(!0),d(!1);return}}catch{}d(!1),z2(E),n(E)}},[u,o,n]);return y.jsx("div",{className:"fixed-viewport flex items-center justify-center p-4 overflow-y-auto",children:y.jsxs("form",{onSubmit:v,className:"glass-panel w-full max-w-[380px] p-8 flex flex-col items-center gap-6",children:[y.jsx("img",{src:m,alt:"Paimon",className:"w-16 h-16 select-none",draggable:!1}),y.jsxs("div",{className:"text-center",children:[y.jsx("h1",{className:"text-[17px] font-semibold text-[var(--label-primary)]",children:"Paimon"}),y.jsx("p",{className:"mt-1 text-[13px] text-[var(--label-secondary)]",children:i("login.subtitle")})]}),y.jsxs("div",{className:"w-full",children:[y.jsx("input",{type:"password",value:u,onChange:x=>s(x.target.value),placeholder:i("login.placeholder"),autoFocus:!0,className:`w-full h-9 px-3 rounded-[9px] text-[13px] bg-[var(--fill-primary)] text-[var(--label-primary)] placeholder:text-[var(--label-tertiary)] border outline-none transition-colors ${l||h?"border-red-500 focus:border-red-500":"border-[var(--separator)] focus:border-[var(--color-accent)]"}`}),(l||h)&&y.jsx("p",{className:"mt-2 text-[11px] text-red-500",children:i("login.invalidToken")})]}),y.jsx("button",{type:"submit",disabled:!u.trim()||o,className:"w-full h-9 rounded-[1000px] bg-[var(--color-accent)] text-white text-[13px] font-medium transition-opacity disabled:opacity-40 hover:opacity-90 active:opacity-80",children:i(o?"login.verifying":"login.connect")}),y.jsx("p",{className:"text-[11px] text-[var(--label-tertiary)] text-center leading-relaxed",children:y.jsx(K3,{i18nKey:"login.tokenHint",components:{1:y.jsx("code",{className:"px-1 py-0.5 rounded bg-[var(--fill-secondary)] text-[var(--label-secondary)]"})}})})]})})}function fA(){const{pathname:n}=an(),l=n.match(/^\/instance\/(.+)$/);return l?l[1]:null}function dA(){const{t:n}=Ue(),{authToken:l,authError:i,handleLogin:u,handleAuthError:s}=L2(),o=Rt(U=>U.connect),d=Rt(U=>U.disconnect),h=Rt(U=>U.subscribe),p=Rt(U=>U.send),m=Nl(U=>U.instances),v=Nl(U=>U.instanceListReady),x=Nl(U=>U.handleMessage),E=nr();M2();const C=fA();b.useEffect(()=>(l?o(l,s):d(),()=>d()),[l,o,d,s]),vS(),b.useEffect(()=>h(U=>{(U.type==="instance_list"||U.type==="instance_update")&&x(U)}),[h,x]);const N=b.useCallback(U=>{E(`/instance/${U}`)},[E]),w=b.useRef(new Set),j=b.useCallback(U=>{const X=Nl.getState().instances.find(J=>J.id===U);if(X&&Qi(X.status)){za(n("sidebar.shutdownBusy"),"warning");return}w.current.add(U),p({type:"shutdown",payload:{instanceId:U}})},[p,n]),[R,T]=b.useState(!1),z=b.useCallback(U=>{T(!1),E(`/instance/${U}`)},[E]);return b.useEffect(()=>{if(!v||!C)return;m.some(X=>X.id===C)||(w.current.has(C)?w.current.delete(C):za(n("eventStream.instanceNotFound"),"error"),E("/"))},[v,C,m,E,n]),l?y.jsxs("div",{className:"h-[var(--app-viewport-height,100dvh)] w-screen animated-bg flex items-stretch p-2 gap-2 md:p-3 md:gap-3 overflow-hidden pb-[max(0.5rem,env(safe-area-inset-bottom))]",children:[y.jsx("div",{className:"hidden md:flex self-stretch",children:y.jsx(Lg,{instances:m,selectedId:C,onSelect:N,onShutdown:j,onNewInstance:()=>T(!0)})}),y.jsx(Wb,{children:y.jsxs(ki,{element:y.jsx(tA,{}),children:[y.jsx(ki,{path:"/settings",element:y.jsx(uA,{})}),y.jsx(ki,{path:"/instance/:id",element:y.jsx(W8,{})}),y.jsx(ki,{path:"*",element:y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"flex-1 md:hidden min-w-0 flex flex-col",children:y.jsx(Lg,{instances:m,selectedId:C,onSelect:N,onShutdown:j,onNewInstance:()=>T(!0)})}),y.jsx("div",{className:"hidden md:flex flex-1 min-w-0",children:y.jsx(eA,{})})]})})]})}),R&&y.jsx(oA,{onClose:()=>T(!1),onCreated:z}),y.jsx(T8,{})]}):y.jsx("div",{className:"h-[var(--app-viewport-height,100dvh)] w-screen animated-bg flex items-stretch overflow-hidden",children:y.jsx(cA,{onLogin:u,error:i})})}Jv.createRoot(document.getElementById("root")).render(y.jsx(E2,{children:y.jsx(dA,{})}));