@tyanxie/paimon-darwin-arm64 1.2.0 → 1.3.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.
@@ -1,255 +0,0 @@
1
- var zv=Object.defineProperty;var Lv=(n,l,i)=>l in n?zv(n,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[l]=i;var Xm=(n,l,i)=>Lv(n,typeof l!="symbol"?l+"":l,i);import{f as Cf,r as b,R as ju,g as h0,j as y,a as Dv,p as ji,o as kv,h as Uv,s as Bv,b as wu,m as Ou,e as Hv,M as qv,c as Yv,d as Vv}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 jc={exports:{}},wi={},wc={exports:{}},Oc={};/**
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 Qm;function Gv(){return Qm||(Qm=1,(function(n){function l(z,H){var W=z.length;z.push(H);e:for(;0<W;){var Z=W-1>>>1,Y=z[Z];if(0<s(Y,H))z[Z]=H,z[W]=Y,W=Z;else break e}}function i(z){return z.length===0?null:z[0]}function u(z){if(z.length===0)return null;var H=z[0],W=z.pop();if(W!==H){z[0]=W;e:for(var Z=0,Y=z.length,I=Y>>>1;Z<I;){var te=2*(Z+1)-1,ne=z[te],ue=te+1,he=z[ue];if(0>s(ne,W))ue<Y&&0>s(he,ne)?(z[Z]=he,z[ue]=W,Z=ue):(z[Z]=ne,z[te]=W,Z=te);else if(ue<Y&&0>s(he,W))z[Z]=he,z[ue]=W,Z=ue;else break e}}return H}function s(z,H){var W=z.sortIndex-H.sortIndex;return W!==0?W:z.id-H.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,j=!1,T=!1,O=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function U(z){for(var H=i(m);H!==null;){if(H.callback===null)u(m);else if(H.startTime<=z)u(m),H.sortIndex=H.expirationTime,l(p,H);else break;H=i(m)}}function X(z){if(j=!1,U(z),!N)if(i(p)!==null)N=!0,Q||(Q=!0,P());else{var H=i(m);H!==null&&re(X,H.startTime-z)}}var Q=!1,G=-1,K=5,q=-1;function J(){return T?!0:!(n.unstable_now()-q<K)}function ce(){if(T=!1,Q){var z=n.unstable_now();q=z;var H=!0;try{e:{N=!1,j&&(j=!1,w(G),G=-1),C=!0;var W=E;try{t:{for(U(z),x=i(p);x!==null&&!(x.expirationTime>z&&J());){var Z=x.callback;if(typeof Z=="function"){x.callback=null,E=x.priorityLevel;var Y=Z(x.expirationTime<=z);if(z=n.unstable_now(),typeof Y=="function"){x.callback=Y,U(z),H=!0;break t}x===i(p)&&u(p),U(z)}else u(p);x=i(p)}if(x!==null)H=!0;else{var I=i(m);I!==null&&re(X,I.startTime-z),H=!1}}break e}finally{x=null,E=W,C=!1}H=void 0}}finally{H?P():Q=!1}}}var P;if(typeof M=="function")P=function(){M(ce)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,ee=le.port2;le.port1.onmessage=ce,P=function(){ee.postMessage(null)}}else P=function(){O(ce,0)};function re(z,H){G=O(function(){z(n.unstable_now())},H)}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(z){z.callback=null},n.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<z?Math.floor(1e3/z):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(z){switch(E){case 1:case 2:case 3:var H=3;break;default:H=E}var W=E;E=H;try{return z()}finally{E=W}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(z,H){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var W=E;E=z;try{return H()}finally{E=W}},n.unstable_scheduleCallback=function(z,H,W){var Z=n.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?Z+W:Z):W=Z,z){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=W+Y,z={id:v++,callback:H,priorityLevel:z,startTime:W,expirationTime:Y,sortIndex:-1},W>Z?(z.sortIndex=W,l(m,z),i(p)===null&&z===i(m)&&(j?(w(G),G=-1):j=!0,re(X,W-Z))):(z.sortIndex=Y,l(p,z),N||C||(N=!0,Q||(Q=!0,P()))),z},n.unstable_shouldYield=J,n.unstable_wrapCallback=function(z){var H=E;return function(){var W=E;E=H;try{return z.apply(this,arguments)}finally{E=W}}}})(Oc)),Oc}var Zm;function Fv(){return Zm||(Zm=1,wc.exports=Gv()),wc.exports}var Rc={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 Jm;function $v(){if(Jm)return lt;Jm=1;var n=Cf();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 Im;function p0(){if(Im)return Rc.exports;Im=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(),Rc.exports=$v(),Rc.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 Wm;function Kv(){if(Wm)return wi;Wm=1;var n=Fv(),l=Cf(),i=p0();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"),j=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),M=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),J=Symbol.for("react.memo_cache_sentinel"),ce=Symbol.iterator;function P(e){return e===null||typeof e!="object"?null:(e=ce&&e[ce]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function ee(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case O:return"Profiler";case T:return"StrictMode";case X:return"Suspense";case Q:return"SuspenseList";case q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case M:return e.displayName||"Context";case w: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:ee(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var re=Array.isArray,z=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},Z=[],Y=-1;function I(e){return{current:e}}function te(e){0>Y||(e.current=Z[Y],Z[Y]=null,Y--)}function ne(e,t){Y++,Z[Y]=e.current,e.current=t}var ue=I(null),he=I(null),Ue=I(null),ut=I(null);function _n(e,t){switch(ne(Ue,t),ne(he,e),ne(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?gm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=gm(t),e=ym(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}te(ue),ne(ue,e)}function an(){te(ue),te(he),te(Ue)}function Rl(e){e.memoizedState!==null&&ne(ut,e);var t=ue.current,a=ym(t,e.type);t!==a&&(ne(he,e),ne(ue,a))}function Ma(e){he.current===e&&(te(ue),te(he)),ut.current===e&&(te(ut),Ci._currentValue=W)}var za,rr;function Xt(e){if(za===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);za=t&&t[1]||"",rr=-1<a.stack.indexOf(`
26
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
27
- `+za+e+rr}var _l=!1;function sa(e,t){if(!e||_l)return"";_l=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(B){var k=B}Reflect.construct(e,[],$)}else{try{$.call()}catch(B){k=B}e.call($.prototype)}}else{try{throw Error()}catch(B){k=B}($=e())&&typeof $.catch=="function"&&$.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 V=`
30
- `+A[r].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=r&&0<=c);break}}}finally{_l=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Xt(a):""}function hs(e,t){switch(e.tag){case 26:case 27:case 5:return Xt(e.type);case 16:return Xt("Lazy");case 13:return e.child!==t&&t!==null?Xt("Suspense Fallback"):Xt("Suspense");case 19:return Xt("SuspenseList");case 0:case 15:return sa(e.type,!1);case 11:return sa(e.type.render,!1);case 1:return sa(e.type,!0);case 31:return Xt("Activity");default:return""}}function ur(e){try{var t="",a=null;do t+=hs(e,a),a=e,e=e.return;while(e);return t}catch(r){return`
31
- Error generating stack: `+r.message+`
32
- `+r.stack}}var Ml=Object.prototype.hasOwnProperty,zl=n.unstable_scheduleCallback,sr=n.unstable_cancelCallback,or=n.unstable_shouldYield,Ne=n.unstable_requestPaint,_e=n.unstable_now,La=n.unstable_getCurrentPriorityLevel,oa=n.unstable_ImmediatePriority,Da=n.unstable_UserBlockingPriority,ka=n.unstable_NormalPriority,cr=n.unstable_LowPriority,Ll=n.unstable_IdlePriority,mx=n.log,gx=n.unstable_setDisableYieldValue,Dl=null,bt=null;function Mn(e){if(typeof mx=="function"&&gx(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(Dl,e)}catch{}}var St=Math.clz32?Math.clz32:vx,yx=Math.log,xx=Math.LN2;function vx(e){return e>>>=0,e===0?32:31-(yx(e)/xx|0)|0}var fr=256,dr=262144,hr=4194304;function ca(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 pr(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=ca(r):(g&=S,g!==0?c=ca(g):a||(a=S&~e,a!==0&&(c=ca(a))))):(S=r&~f,S!==0?c=ca(S):g!==0?c=ca(g):a||(a=r&~e,a!==0&&(c=ca(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 kl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function bx(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 If(){var e=hr;return hr<<=1,(hr&62914560)===0&&(hr=4194304),e}function ps(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ul(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Sx(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 V=31-St(a),$=1<<V;S[V]=0,A[V]=-1;var k=D[V];if(k!==null)for(D[V]=null,V=0;V<k.length;V++){var B=k[V];B!==null&&(B.lane&=-536870913)}a&=~$}r!==0&&Wf(e,r,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(g&~t))}function Wf(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-St(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|a&261930}function Pf(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-St(a),c=1<<r;c&t|e[r]&t&&(e[r]|=t),a&=~c}}function ed(e,t){var a=t&-t;return a=(a&42)!==0?1:ms(a),(a&(e.suspendedLanes|t))!==0?0:a}function ms(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 gs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function td(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:qm(e.type))}function nd(e,t){var a=H.p;try{return H.p=e,t()}finally{H.p=a}}var zn=Math.random().toString(36).slice(2),We="__reactFiber$"+zn,ft="__reactProps$"+zn,Ua="__reactContainer$"+zn,ys="__reactEvents$"+zn,Ex="__reactListeners$"+zn,Cx="__reactHandles$"+zn,ad="__reactResources$"+zn,Bl="__reactMarker$"+zn;function xs(e){delete e[We],delete e[ft],delete e[ys],delete e[Ex],delete e[Cx]}function Ba(e){var t=e[We];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ua]||a[We]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Nm(e);e!==null;){if(a=e[We])return a;e=Nm(e)}return t}e=a,a=e.parentNode}return null}function Ha(e){if(e=e[We]||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 Hl(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[ad];return t||(t=e[ad]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Je(e){e[Bl]=!0}var ld=new Set,id={};function fa(e,t){Ya(e,t),Ya(e+"Capture",t)}function Ya(e,t){for(id[e]=t,e=0;e<t.length;e++)ld.add(t[e])}var Nx=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]*$"),rd={},ud={};function Ax(e){return Ml.call(ud,e)?!0:Ml.call(rd,e)?!1:Nx.test(e)?ud[e]=!0:(rd[e]=!0,!1)}function mr(e,t,a){if(Ax(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 gr(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 ln(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 Ot(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Tx(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 vs(e){if(!e._valueTracker){var t=sd(e)?"checked":"value";e._valueTracker=Tx(e,t,""+e[t])}}function od(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=sd(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}function yr(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 jx=/[\n"\\]/g;function Rt(e){return e.replace(jx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function bs(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=""+Ot(t)):e.value!==""+Ot(t)&&(e.value=""+Ot(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Ss(e,g,Ot(t)):a!=null?Ss(e,g,Ot(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=""+Ot(S):e.removeAttribute("name")}function cd(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)){vs(e);return}a=a!=null?""+Ot(a):"",t=t!=null?""+Ot(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),vs(e)}function Ss(e,t,a){t==="number"&&yr(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=""+Ot(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 fd(e,t,a){if(t!=null&&(t=""+Ot(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ot(a):""}function dd(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=Ot(t),e.defaultValue=a,r=e.textContent,r===a&&r!==""&&r!==null&&(e.value=r),vs(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 wx=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 hd(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||wx.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function pd(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&&hd(e,c,r)}else for(var f in t)t.hasOwnProperty(f)&&hd(e,f,t[f])}function Es(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 Ox=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"]]),Rx=/^[\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 xr(e){return Rx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function rn(){}var Cs=null;function Ns(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 md(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(bs(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="'+Rt(""+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));bs(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&&od(r)}break e;case"textarea":fd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Va(e,!!a.multiple,t,!1)}}}var As=!1;function gd(e,t,a){if(As)return e(t,a);As=!0;try{var r=e(t);return r}finally{if(As=!1,(Fa!==null||$a!==null)&&(iu(),Fa&&(t=Fa,e=$a,$a=Fa=null,md(t),e)))for(t=0;t<e.length;t++)md(e[t])}}function ql(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 un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ts=!1;if(un)try{var Yl={};Object.defineProperty(Yl,"passive",{get:function(){Ts=!0}}),window.addEventListener("test",Yl,Yl),window.removeEventListener("test",Yl,Yl)}catch{Ts=!1}var Ln=null,js=null,vr=null;function yd(){if(vr)return vr;var e,t=js,a=t.length,r,c="value"in Ln?Ln.value:Ln.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 vr=c.slice(e,1<r?1-r:void 0)}function br(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 Sr(){return!0}function xd(){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)?Sr:xd,this.isPropagationStopped=xd,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=Sr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Sr)},persist:function(){},isPersistent:Sr}),t}var da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Er=dt(da),Vl=x({},da,{view:0,detail:0}),_x=dt(Vl),ws,Os,Gl,Cr=x({},Vl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_s,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!==Gl&&(Gl&&e.type==="mousemove"?(ws=e.screenX-Gl.screenX,Os=e.screenY-Gl.screenY):Os=ws=0,Gl=e),ws)},movementY:function(e){return"movementY"in e?e.movementY:Os}}),vd=dt(Cr),Mx=x({},Cr,{dataTransfer:0}),zx=dt(Mx),Lx=x({},Vl,{relatedTarget:0}),Rs=dt(Lx),Dx=x({},da,{animationName:0,elapsedTime:0,pseudoElement:0}),kx=dt(Dx),Ux=x({},da,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Bx=dt(Ux),Hx=x({},da,{data:0}),bd=dt(Hx),qx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yx={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"},Vx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vx[e])?!!t[e]:!1}function _s(){return Gx}var Fx=x({},Vl,{key:function(e){if(e.key){var t=qx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=br(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Yx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_s,charCode:function(e){return e.type==="keypress"?br(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?br(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$x=dt(Fx),Kx=x({},Cr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sd=dt(Kx),Xx=x({},Vl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_s}),Qx=dt(Xx),Zx=x({},da,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jx=dt(Zx),Ix=x({},Cr,{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}),Wx=dt(Ix),Px=x({},da,{newState:0,oldState:0}),e1=dt(Px),t1=[9,13,27,32],Ms=un&&"CompositionEvent"in window,Fl=null;un&&"documentMode"in document&&(Fl=document.documentMode);var n1=un&&"TextEvent"in window&&!Fl,Ed=un&&(!Ms||Fl&&8<Fl&&11>=Fl),Cd=" ",Nd=!1;function Ad(e,t){switch(e){case"keyup":return t1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Td(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ka=!1;function a1(e,t){switch(e){case"compositionend":return Td(t);case"keypress":return t.which!==32?null:(Nd=!0,Cd);case"textInput":return e=t.data,e===Cd&&Nd?null:e;default:return null}}function l1(e,t){if(Ka)return e==="compositionend"||!Ms&&Ad(e,t)?(e=yd(),vr=js=Ln=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 Ed&&t.locale!=="ko"?null:t.data;default:return null}}var i1={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 jd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!i1[e.type]:t==="textarea"}function wd(e,t,a,r){Fa?$a?$a.push(r):$a=[r]:Fa=r,t=du(t,"onChange"),0<t.length&&(a=new Er("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var $l=null,Kl=null;function r1(e){cm(e,0)}function Nr(e){var t=Hl(e);if(od(t))return e}function Od(e,t){if(e==="change")return t}var Rd=!1;if(un){var zs;if(un){var Ls="oninput"in document;if(!Ls){var _d=document.createElement("div");_d.setAttribute("oninput","return;"),Ls=typeof _d.oninput=="function"}zs=Ls}else zs=!1;Rd=zs&&(!document.documentMode||9<document.documentMode)}function Md(){$l&&($l.detachEvent("onpropertychange",zd),Kl=$l=null)}function zd(e){if(e.propertyName==="value"&&Nr(Kl)){var t=[];wd(t,Kl,e,Ns(e)),gd(r1,t)}}function u1(e,t,a){e==="focusin"?(Md(),$l=t,Kl=a,$l.attachEvent("onpropertychange",zd)):e==="focusout"&&Md()}function s1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Nr(Kl)}function o1(e,t){if(e==="click")return Nr(t)}function c1(e,t){if(e==="input"||e==="change")return Nr(t)}function f1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:f1;function Xl(e,t){if(Et(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(!Ml.call(t,c)||!Et(e[c],t[c]))return!1}return!0}function Ld(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dd(e,t){var a=Ld(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=Ld(a)}}function kd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ud(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=yr(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=yr(e.document)}return t}function Ds(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 d1=un&&"documentMode"in document&&11>=document.documentMode,Xa=null,ks=null,Ql=null,Us=!1;function Bd(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Us||Xa==null||Xa!==yr(r)||(r=Xa,"selectionStart"in r&&Ds(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}),Ql&&Xl(Ql,r)||(Ql=r,r=du(ks,"onSelect"),0<r.length&&(t=new Er("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=Xa)))}function ha(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Qa={animationend:ha("Animation","AnimationEnd"),animationiteration:ha("Animation","AnimationIteration"),animationstart:ha("Animation","AnimationStart"),transitionrun:ha("Transition","TransitionRun"),transitionstart:ha("Transition","TransitionStart"),transitioncancel:ha("Transition","TransitionCancel"),transitionend:ha("Transition","TransitionEnd")},Bs={},Hd={};un&&(Hd=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 pa(e){if(Bs[e])return Bs[e];if(!Qa[e])return e;var t=Qa[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Hd)return Bs[e]=t[a];return e}var qd=pa("animationend"),Yd=pa("animationiteration"),Vd=pa("animationstart"),h1=pa("transitionrun"),p1=pa("transitionstart"),m1=pa("transitioncancel"),Gd=pa("transitionend"),Fd=new Map,Hs="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(" ");Hs.push("scrollEnd");function Vt(e,t){Fd.set(e,t),fa(t,[e])}var Ar=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)},_t=[],Za=0,qs=0;function Tr(){for(var e=Za,t=qs=Za=0;t<e;){var a=_t[t];_t[t++]=null;var r=_t[t];_t[t++]=null;var c=_t[t];_t[t++]=null;var f=_t[t];if(_t[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&&$d(a,c,f)}}function jr(e,t,a,r){_t[Za++]=e,_t[Za++]=t,_t[Za++]=a,_t[Za++]=r,qs|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ys(e,t,a,r){return jr(e,t,a,r),wr(e)}function ma(e,t){return jr(e,null,null,t),wr(e)}function $d(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-St(a),e=f.hiddenUpdates,r=e[c],r===null?e[c]=[t]:r.push(t),t.lane=a|536870912),f):null}function wr(e){if(50<gi)throw gi=0,Io=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 g1(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 Ct(e,t,a,r){return new g1(e,t,a,r)}function Vs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sn(e,t){var a=e.alternate;return a===null?(a=Ct(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 Kd(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 Or(e,t,a,r,c,f){var g=0;if(r=e,typeof e=="function")Vs(e)&&(g=1);else if(typeof e=="string")g=Sv(e,a,ue.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case q:return e=Ct(31,a,t,c),e.elementType=q,e.lanes=f,e;case j:return ga(a.children,c,f,t);case T:g=8,c|=24;break;case O:return e=Ct(12,a,t,c|2),e.elementType=O,e.lanes=f,e;case X:return e=Ct(13,a,t,c),e.elementType=X,e.lanes=f,e;case Q:return e=Ct(19,a,t,c),e.elementType=Q,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:g=10;break e;case w: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=Ct(g,a,t,c),t.elementType=e,t.type=r,t.lanes=f,t}function ga(e,t,a,r){return e=Ct(7,e,r,t),e.lanes=a,e}function Gs(e,t,a){return e=Ct(6,e,null,t),e.lanes=a,e}function Xd(e){var t=Ct(18,null,null,0);return t.stateNode=e,t}function Fs(e,t,a){return t=Ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Qd=new WeakMap;function Mt(e,t){if(typeof e=="object"&&e!==null){var a=Qd.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ur(t)},Qd.set(e,t),t)}return{value:e,source:t,stack:ur(t)}}var Ia=[],Wa=0,Rr=null,Zl=0,zt=[],Lt=0,Dn=null,Qt=1,Zt="";function on(e,t){Ia[Wa++]=Zl,Ia[Wa++]=Rr,Rr=e,Zl=t}function Zd(e,t,a){zt[Lt++]=Qt,zt[Lt++]=Zt,zt[Lt++]=Dn,Dn=e;var r=Qt;e=Zt;var c=32-St(r)-1;r&=~(1<<c),a+=1;var f=32-St(t)+c;if(30<f){var g=c-c%5;f=(r&(1<<g)-1).toString(32),r>>=g,c-=g,Qt=1<<32-St(t)+c|a<<c|r,Zt=f+e}else Qt=1<<f|a<<c|r,Zt=e}function $s(e){e.return!==null&&(on(e,1),Zd(e,1,0))}function Ks(e){for(;e===Rr;)Rr=Ia[--Wa],Ia[Wa]=null,Zl=Ia[--Wa],Ia[Wa]=null;for(;e===Dn;)Dn=zt[--Lt],zt[Lt]=null,Zt=zt[--Lt],zt[Lt]=null,Qt=zt[--Lt],zt[Lt]=null}function Jd(e,t){zt[Lt++]=Qt,zt[Lt++]=Zt,zt[Lt++]=Dn,Qt=t.id,Zt=t.overflow,Dn=e}var Pe=null,ze=null,be=!1,kn=null,Dt=!1,Xs=Error(u(519));function Un(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Jl(Mt(t,e)),Xs}function Id(e){var t=e.stateNode,a=e.type,r=e.memoizedProps;switch(t[We]=e,t[ft]=r,a){case"dialog":ye("cancel",t),ye("close",t);break;case"iframe":case"object":case"embed":ye("load",t);break;case"video":case"audio":for(a=0;a<xi.length;a++)ye(xi[a],t);break;case"source":ye("error",t);break;case"img":case"image":case"link":ye("error",t),ye("load",t);break;case"details":ye("toggle",t);break;case"input":ye("invalid",t),cd(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ye("invalid",t);break;case"textarea":ye("invalid",t),dd(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||pm(t.textContent,a)?(r.popover!=null&&(ye("beforetoggle",t),ye("toggle",t)),r.onScroll!=null&&ye("scroll",t),r.onScrollEnd!=null&&ye("scrollend",t),r.onClick!=null&&(t.onclick=rn),t=!0):t=!1,t||Un(e,!0)}function Wd(e){for(Pe=e.return;Pe;)switch(Pe.tag){case 5:case 31:case 13:Dt=!1;return;case 27:case 3:Dt=!0;return;default:Pe=Pe.return}}function Pa(e){if(e!==Pe)return!1;if(!be)return Wd(e),be=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||dc(e.type,e.memoizedProps)),a=!a),a&&ze&&Un(e),Wd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));ze=Cm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));ze=Cm(e)}else t===27?(t=ze,In(e.type)?(e=yc,yc=null,ze=e):ze=t):ze=Pe?Ut(e.stateNode.nextSibling):null;return!0}function ya(){ze=Pe=null,be=!1}function Qs(){var e=kn;return e!==null&&(gt===null?gt=e:gt.push.apply(gt,e),kn=null),e}function Jl(e){kn===null?kn=[e]:kn.push(e)}var Zs=I(null),xa=null,cn=null;function Bn(e,t,a){ne(Zs,t._currentValue),t._currentValue=a}function fn(e){e._currentValue=Zs.current,te(Zs)}function Js(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 Is(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),Js(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),Js(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;Et(c.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(c===ut.current){if(g=c.alternate,g===null)throw Error(u(387));g.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Ci):e=[Ci])}c=c.return}e!==null&&Is(t,e,a,r),t.flags|=262144}function _r(e){for(e=e.firstContext;e!==null;){if(!Et(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function va(e){xa=e,cn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function et(e){return Pd(xa,e)}function Mr(e,t){return xa===null&&va(e),Pd(e,t)}function Pd(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},cn===null){if(e===null)throw Error(u(308));cn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else cn=cn.next=t;return a}var y1=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()})}},x1=n.unstable_scheduleCallback,v1=n.unstable_NormalPriority,Ge={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ws(){return{controller:new y1,data:new Map,refCount:0}}function Il(e){e.refCount--,e.refCount===0&&x1(v1,function(){e.controller.abort()})}var Wl=null,Ps=0,tl=0,nl=null;function b1(e,t){if(Wl===null){var a=Wl=[];Ps=0,tl=ac(),nl={status:"pending",value:void 0,then:function(r){a.push(r)}}}return Ps++,t.then(eh,eh),t}function eh(){if(--Ps===0&&Wl!==null){nl!==null&&(nl.status="fulfilled");var e=Wl;Wl=null,tl=0,nl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function S1(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 th=z.S;z.S=function(e,t){Bp=_e(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&b1(e,t),th!==null&&th(e,t)};var ba=I(null);function eo(){var e=ba.current;return e!==null?e:Re.pooledCache}function zr(e,t){t===null?ne(ba,ba.current):ne(ba,t.pool)}function nh(){var e=eo();return e===null?null:{parent:Ge._currentValue,pool:e}}var al=Error(u(460)),to=Error(u(474)),Lr=Error(u(542)),Dr={then:function(){}};function ah(e){return e=e.status,e==="fulfilled"||e==="rejected"}function lh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(rn,rn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rh(e),e;default:if(typeof t.status=="string")t.then(rn,rn);else{if(e=Re,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,rh(e),e}throw Ea=t,al}}function Sa(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ea=a,al):a}}var Ea=null;function ih(){if(Ea===null)throw Error(u(459));var e=Ea;return Ea=null,e}function rh(e){if(e===al||e===Lr)throw Error(u(483))}var ll=null,Pl=0;function kr(e){var t=Pl;return Pl+=1,ll===null&&(ll=[]),lh(ll,e,t)}function ei(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ur(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 uh(e){function t(_,R){if(e){var L=_.deletions;L===null?(_.deletions=[R],_.flags|=16):L.push(R)}}function a(_,R){if(!e)return null;for(;R!==null;)t(_,R),R=R.sibling;return null}function r(_){for(var R=new Map;_!==null;)_.key!==null?R.set(_.key,_):R.set(_.index,_),_=_.sibling;return R}function c(_,R){return _=sn(_,R),_.index=0,_.sibling=null,_}function f(_,R,L){return _.index=L,e?(L=_.alternate,L!==null?(L=L.index,L<R?(_.flags|=67108866,R):L):(_.flags|=67108866,R)):(_.flags|=1048576,R)}function g(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function S(_,R,L,F){return R===null||R.tag!==6?(R=Gs(L,_.mode,F),R.return=_,R):(R=c(R,L),R.return=_,R)}function A(_,R,L,F){var oe=L.type;return oe===j?V(_,R,L.props.children,F,L.key):R!==null&&(R.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===K&&Sa(oe)===R.type)?(R=c(R,L.props),ei(R,L),R.return=_,R):(R=Or(L.type,L.key,L.props,null,_.mode,F),ei(R,L),R.return=_,R)}function D(_,R,L,F){return R===null||R.tag!==4||R.stateNode.containerInfo!==L.containerInfo||R.stateNode.implementation!==L.implementation?(R=Fs(L,_.mode,F),R.return=_,R):(R=c(R,L.children||[]),R.return=_,R)}function V(_,R,L,F,oe){return R===null||R.tag!==7?(R=ga(L,_.mode,F,oe),R.return=_,R):(R=c(R,L),R.return=_,R)}function $(_,R,L){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=Gs(""+R,_.mode,L),R.return=_,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case C:return L=Or(R.type,R.key,R.props,null,_.mode,L),ei(L,R),L.return=_,L;case N:return R=Fs(R,_.mode,L),R.return=_,R;case K:return R=Sa(R),$(_,R,L)}if(re(R)||P(R))return R=ga(R,_.mode,L,null),R.return=_,R;if(typeof R.then=="function")return $(_,kr(R),L);if(R.$$typeof===M)return $(_,Mr(_,R),L);Ur(_,R)}return null}function k(_,R,L,F){var oe=R!==null?R.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return oe!==null?null:S(_,R,""+L,F);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case C:return L.key===oe?A(_,R,L,F):null;case N:return L.key===oe?D(_,R,L,F):null;case K:return L=Sa(L),k(_,R,L,F)}if(re(L)||P(L))return oe!==null?null:V(_,R,L,F,null);if(typeof L.then=="function")return k(_,R,kr(L),F);if(L.$$typeof===M)return k(_,R,Mr(_,L),F);Ur(_,L)}return null}function B(_,R,L,F,oe){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return _=_.get(L)||null,S(R,_,""+F,oe);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case C:return _=_.get(F.key===null?L:F.key)||null,A(R,_,F,oe);case N:return _=_.get(F.key===null?L:F.key)||null,D(R,_,F,oe);case K:return F=Sa(F),B(_,R,L,F,oe)}if(re(F)||P(F))return _=_.get(L)||null,V(R,_,F,oe,null);if(typeof F.then=="function")return B(_,R,L,kr(F),oe);if(F.$$typeof===M)return B(_,R,L,Mr(R,F),oe);Ur(R,F)}return null}function ae(_,R,L,F){for(var oe=null,Se=null,ie=R,me=R=0,ve=null;ie!==null&&me<L.length;me++){ie.index>me?(ve=ie,ie=null):ve=ie.sibling;var Ee=k(_,ie,L[me],F);if(Ee===null){ie===null&&(ie=ve);break}e&&ie&&Ee.alternate===null&&t(_,ie),R=f(Ee,R,me),Se===null?oe=Ee:Se.sibling=Ee,Se=Ee,ie=ve}if(me===L.length)return a(_,ie),be&&on(_,me),oe;if(ie===null){for(;me<L.length;me++)ie=$(_,L[me],F),ie!==null&&(R=f(ie,R,me),Se===null?oe=ie:Se.sibling=ie,Se=ie);return be&&on(_,me),oe}for(ie=r(ie);me<L.length;me++)ve=B(ie,_,me,L[me],F),ve!==null&&(e&&ve.alternate!==null&&ie.delete(ve.key===null?me:ve.key),R=f(ve,R,me),Se===null?oe=ve:Se.sibling=ve,Se=ve);return e&&ie.forEach(function(na){return t(_,na)}),be&&on(_,me),oe}function fe(_,R,L,F){if(L==null)throw Error(u(151));for(var oe=null,Se=null,ie=R,me=R=0,ve=null,Ee=L.next();ie!==null&&!Ee.done;me++,Ee=L.next()){ie.index>me?(ve=ie,ie=null):ve=ie.sibling;var na=k(_,ie,Ee.value,F);if(na===null){ie===null&&(ie=ve);break}e&&ie&&na.alternate===null&&t(_,ie),R=f(na,R,me),Se===null?oe=na:Se.sibling=na,Se=na,ie=ve}if(Ee.done)return a(_,ie),be&&on(_,me),oe;if(ie===null){for(;!Ee.done;me++,Ee=L.next())Ee=$(_,Ee.value,F),Ee!==null&&(R=f(Ee,R,me),Se===null?oe=Ee:Se.sibling=Ee,Se=Ee);return be&&on(_,me),oe}for(ie=r(ie);!Ee.done;me++,Ee=L.next())Ee=B(ie,_,me,Ee.value,F),Ee!==null&&(e&&Ee.alternate!==null&&ie.delete(Ee.key===null?me:Ee.key),R=f(Ee,R,me),Se===null?oe=Ee:Se.sibling=Ee,Se=Ee);return e&&ie.forEach(function(Mv){return t(_,Mv)}),be&&on(_,me),oe}function Oe(_,R,L,F){if(typeof L=="object"&&L!==null&&L.type===j&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case C:e:{for(var oe=L.key;R!==null;){if(R.key===oe){if(oe=L.type,oe===j){if(R.tag===7){a(_,R.sibling),F=c(R,L.props.children),F.return=_,_=F;break e}}else if(R.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===K&&Sa(oe)===R.type){a(_,R.sibling),F=c(R,L.props),ei(F,L),F.return=_,_=F;break e}a(_,R);break}else t(_,R);R=R.sibling}L.type===j?(F=ga(L.props.children,_.mode,F,L.key),F.return=_,_=F):(F=Or(L.type,L.key,L.props,null,_.mode,F),ei(F,L),F.return=_,_=F)}return g(_);case N:e:{for(oe=L.key;R!==null;){if(R.key===oe)if(R.tag===4&&R.stateNode.containerInfo===L.containerInfo&&R.stateNode.implementation===L.implementation){a(_,R.sibling),F=c(R,L.children||[]),F.return=_,_=F;break e}else{a(_,R);break}else t(_,R);R=R.sibling}F=Fs(L,_.mode,F),F.return=_,_=F}return g(_);case K:return L=Sa(L),Oe(_,R,L,F)}if(re(L))return ae(_,R,L,F);if(P(L)){if(oe=P(L),typeof oe!="function")throw Error(u(150));return L=oe.call(L),fe(_,R,L,F)}if(typeof L.then=="function")return Oe(_,R,kr(L),F);if(L.$$typeof===M)return Oe(_,R,Mr(_,L),F);Ur(_,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,R!==null&&R.tag===6?(a(_,R.sibling),F=c(R,L),F.return=_,_=F):(a(_,R),F=Gs(L,_.mode,F),F.return=_,_=F),g(_)):a(_,R)}return function(_,R,L,F){try{Pl=0;var oe=Oe(_,R,L,F);return ll=null,oe}catch(ie){if(ie===al||ie===Lr)throw ie;var Se=Ct(29,ie,null,_.mode);return Se.lanes=F,Se.return=_,Se}finally{}}}var Ca=uh(!0),sh=uh(!1),Hn=!1;function no(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ao(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 qn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Yn(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ce&2)!==0){var c=r.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),r.pending=t,t=wr(e),$d(e,null,a),t}return jr(e,r,t,a),wr(e)}function ti(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,Pf(e,a)}}function lo(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 io=!1;function ni(){if(io){var e=nl;if(e!==null)throw e}}function ai(e,t,a,r){io=!1;var c=e.updateQueue;Hn=!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 V=e.alternate;V!==null&&(V=V.updateQueue,S=V.lastBaseUpdate,S!==g&&(S===null?V.firstBaseUpdate=D:S.next=D,V.lastBaseUpdate=A))}if(f!==null){var $=c.baseState;g=0,V=D=A=null,S=f;do{var k=S.lane&-536870913,B=k!==S.lane;if(B?(xe&k)===k:(r&k)===k){k!==0&&k===tl&&(io=!0),V!==null&&(V=V.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ae=e,fe=S;k=t;var Oe=a;switch(fe.tag){case 1:if(ae=fe.payload,typeof ae=="function"){$=ae.call(Oe,$,k);break e}$=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=fe.payload,k=typeof ae=="function"?ae.call(Oe,$,k):ae,k==null)break e;$=x({},$,k);break e;case 2:Hn=!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},V===null?(D=V=B,A=$):V=V.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);V===null&&(A=$),c.baseState=A,c.firstBaseUpdate=D,c.lastBaseUpdate=V,f===null&&(c.shared.lanes=0),Kn|=g,e.lanes=g,e.memoizedState=$}}function oh(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function ch(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)oh(a[e],t)}var il=I(null),Br=I(0);function fh(e,t){e=bn,ne(Br,e),ne(il,t),bn=e|t.baseLanes}function ro(){ne(Br,bn),ne(il,il.current)}function uo(){bn=Br.current,te(il),te(Br)}var Nt=I(null),kt=null;function Vn(e){var t=e.alternate;ne(Ye,Ye.current&1),ne(Nt,e),kt===null&&(t===null||il.current!==null||t.memoizedState!==null)&&(kt=e)}function so(e){ne(Ye,Ye.current),ne(Nt,e),kt===null&&(kt=e)}function dh(e){e.tag===22?(ne(Ye,Ye.current),ne(Nt,e),kt===null&&(kt=e)):Gn()}function Gn(){ne(Ye,Ye.current),ne(Nt,Nt.current)}function At(e){te(Nt),kt===e&&(kt=null),te(Ye)}var Ye=I(0);function Hr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||mc(a)||gc(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 dn=0,pe=null,je=null,Fe=null,qr=!1,rl=!1,Na=!1,Yr=0,li=0,ul=null,E1=0;function Be(){throw Error(u(321))}function oo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Et(e[a],t[a]))return!1;return!0}function co(e,t,a,r,c,f){return dn=f,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?Zh:To,Na=!1,f=a(r,c),Na=!1,rl&&(f=ph(t,a,r,c)),hh(e),f}function hh(e){z.H=ui;var t=je!==null&&je.next!==null;if(dn=0,Fe=je=pe=null,qr=!1,li=0,ul=null,t)throw Error(u(300));e===null||$e||(e=e.dependencies,e!==null&&_r(e)&&($e=!0))}function ph(e,t,a,r){pe=e;var c=0;do{if(rl&&(ul=null),li=0,rl=!1,25<=c)throw Error(u(301));if(c+=1,Fe=je=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}z.H=Jh,f=t(a,r)}while(rl);return f}function C1(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?ii(t):t,e=e.useState()[0],(je!==null?je.memoizedState:null)!==e&&(pe.flags|=1024),t}function fo(){var e=Yr!==0;return Yr=0,e}function ho(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function po(e){if(qr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}qr=!1}dn=0,Fe=je=pe=null,rl=!1,li=Yr=0,ul=null}function st(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?pe.memoizedState=Fe=e:Fe=Fe.next=e,Fe}function Ve(){if(je===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=je.next;var t=Fe===null?pe.memoizedState:Fe.next;if(t!==null)Fe=t,je=e;else{if(e===null)throw pe.alternate===null?Error(u(467)):Error(u(310));je=e,e={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},Fe===null?pe.memoizedState=Fe=e:Fe=Fe.next=e}return Fe}function Vr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ii(e){var t=li;return li+=1,ul===null&&(ul=[]),e=lh(ul,e,t),t=pe,(Fe===null?t.memoizedState:Fe.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?Zh:To),e}function Gr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ii(e);if(e.$$typeof===M)return et(e)}throw Error(u(438,String(e)))}function mo(e){var t=null,a=pe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var r=pe.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=Vr(),pe.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]=J;return t.index++,a}function hn(e,t){return typeof t=="function"?t(e):t}function Fr(e){var t=Ve();return go(t,je,e)}function go(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,V=!1;do{var $=D.lane&-536870913;if($!==D.lane?(xe&$)===$:(dn&$)===$){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}),$===tl&&(V=!0);else if((dn&k)===k){D=D.next,k===tl&&(V=!0);continue}else $={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(S=A=$,g=f):A=A.next=$,pe.lanes|=k,Kn|=k;$=D.action,Na&&a(f,$),f=D.hasEagerState?D.eagerState:a(f,$)}else k={lane:$,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,pe.lanes|=$,Kn|=$;D=D.next}while(D!==null&&D!==t);if(A===null?g=f:A.next=S,!Et(f,e.memoizedState)&&($e=!0,V&&(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 yo(e){var t=Ve(),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);Et(f,t.memoizedState)||($e=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,r]}function mh(e,t,a){var r=pe,c=Ve(),f=be;if(f){if(a===void 0)throw Error(u(407));a=a()}else a=t();var g=!Et((je||c).memoizedState,a);if(g&&(c.memoizedState=a,$e=!0),c=c.queue,bo(xh.bind(null,r,c,e),[e]),c.getSnapshot!==t||g||Fe!==null&&Fe.memoizedState.tag&1){if(r.flags|=2048,sl(9,{destroy:void 0},yh.bind(null,r,c,a,t),null),Re===null)throw Error(u(349));f||(dn&127)!==0||gh(r,t,a)}return a}function gh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=pe.updateQueue,t===null?(t=Vr(),pe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function yh(e,t,a,r){t.value=a,t.getSnapshot=r,vh(t)&&bh(e)}function xh(e,t,a){return a(function(){vh(t)&&bh(e)})}function vh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Et(e,a)}catch{return!0}}function bh(e){var t=ma(e,2);t!==null&&yt(t,e,2)}function xo(e){var t=st();if(typeof e=="function"){var a=e;if(e=a(),Na){Mn(!0);try{a()}finally{Mn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hn,lastRenderedState:e},t}function Sh(e,t,a,r){return e.baseState=a,go(e,je,typeof r=="function"?r:hn)}function N1(e,t,a,r,c){if(Xr(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)}};z.T!==null?a(!0):f.isTransition=!1,r(f),a=t.pending,a===null?(f.next=t.pending=f,Eh(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Eh(e,t){var a=t.action,r=t.payload,c=e.state;if(t.isTransition){var f=z.T,g={};z.T=g;try{var S=a(c,r),A=z.S;A!==null&&A(g,S),Ch(e,t,S)}catch(D){vo(e,t,D)}finally{f!==null&&g.types!==null&&(f.types=g.types),z.T=f}}else try{f=a(c,r),Ch(e,t,f)}catch(D){vo(e,t,D)}}function Ch(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){Nh(e,t,r)},function(r){return vo(e,t,r)}):Nh(e,t,a)}function Nh(e,t,a){t.status="fulfilled",t.value=a,Ah(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Eh(e,a)))}function vo(e,t,a){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=a,Ah(t),t=t.next;while(t!==r)}e.action=null}function Ah(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Th(e,t){return t}function jh(e,t){if(be){var a=Re.formState;if(a!==null){e:{var r=pe;if(be){if(ze){t:{for(var c=ze,f=Dt;c.nodeType!==8;){if(!f){c=null;break t}if(c=Ut(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){ze=Ut(c.nextSibling),r=c.data==="F!";break e}}Un(r)}r=!1}r&&(t=a[0])}}return a=st(),a.memoizedState=a.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Th,lastRenderedState:t},a.queue=r,a=Kh.bind(null,pe,r),r.dispatch=a,r=xo(!1),f=Ao.bind(null,pe,!1,r.queue),r=st(),c={state:t,dispatch:null,action:e,pending:null},r.queue=c,a=N1.bind(null,pe,c,f,a),c.dispatch=a,r.memoizedState=e,[t,a,!1]}function wh(e){var t=Ve();return Oh(t,je,e)}function Oh(e,t,a){if(t=go(e,t,Th)[0],e=Fr(hn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ii(t)}catch(g){throw g===al?Lr:g}else r=t;t=Ve();var c=t.queue,f=c.dispatch;return a!==t.memoizedState&&(pe.flags|=2048,sl(9,{destroy:void 0},A1.bind(null,c,a),null)),[r,f,e]}function A1(e,t){e.action=t}function Rh(e){var t=Ve(),a=je;if(a!==null)return Oh(t,a,e);Ve(),t=t.memoizedState,a=Ve();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=pe.updateQueue,t===null&&(t=Vr(),pe.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 _h(){return Ve().memoizedState}function $r(e,t,a,r){var c=st();pe.flags|=e,c.memoizedState=sl(1|t,{destroy:void 0},a,r===void 0?null:r)}function Kr(e,t,a,r){var c=Ve();r=r===void 0?null:r;var f=c.memoizedState.inst;je!==null&&r!==null&&oo(r,je.memoizedState.deps)?c.memoizedState=sl(t,f,a,r):(pe.flags|=e,c.memoizedState=sl(1|t,f,a,r))}function Mh(e,t){$r(8390656,8,e,t)}function bo(e,t){Kr(2048,8,e,t)}function T1(e){pe.flags|=4;var t=pe.updateQueue;if(t===null)t=Vr(),pe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function zh(e){var t=Ve().memoizedState;return T1({ref:t,nextImpl:e}),function(){if((Ce&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Lh(e,t){return Kr(4,2,e,t)}function Dh(e,t){return Kr(4,4,e,t)}function kh(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 Uh(e,t,a){a=a!=null?a.concat([e]):null,Kr(4,4,kh.bind(null,t,e),a)}function So(){}function Bh(e,t){var a=Ve();t=t===void 0?null:t;var r=a.memoizedState;return t!==null&&oo(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function Hh(e,t){var a=Ve();t=t===void 0?null:t;var r=a.memoizedState;if(t!==null&&oo(t,r[1]))return r[0];if(r=e(),Na){Mn(!0);try{e()}finally{Mn(!1)}}return a.memoizedState=[r,t],r}function Eo(e,t,a){return a===void 0||(dn&1073741824)!==0&&(xe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=qp(),pe.lanes|=e,Kn|=e,a)}function qh(e,t,a,r){return Et(a,t)?a:il.current!==null?(e=Eo(e,a,r),Et(e,t)||($e=!0),e):(dn&42)===0||(dn&1073741824)!==0&&(xe&261930)===0?($e=!0,e.memoizedState=a):(e=qp(),pe.lanes|=e,Kn|=e,t)}function Yh(e,t,a,r,c){var f=H.p;H.p=f!==0&&8>f?f:8;var g=z.T,S={};z.T=S,Ao(e,!1,t,a);try{var A=c(),D=z.S;if(D!==null&&D(S,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var V=S1(A,r);ri(e,t,V,wt(e))}else ri(e,t,r,wt(e))}catch($){ri(e,t,{then:function(){},status:"rejected",reason:$},wt())}finally{H.p=f,g!==null&&S.types!==null&&(g.types=S.types),z.T=g}}function j1(){}function Co(e,t,a,r){if(e.tag!==5)throw Error(u(476));var c=Vh(e).queue;Yh(e,c,t,W,a===null?j1:function(){return Gh(e),a(r)})}function Vh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hn,lastRenderedState:W},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Gh(e){var t=Vh(e);t.next===null&&(t=e.alternate.memoizedState),ri(e,t.next.queue,{},wt())}function No(){return et(Ci)}function Fh(){return Ve().memoizedState}function $h(){return Ve().memoizedState}function w1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=wt();e=qn(a);var r=Yn(t,e,a);r!==null&&(yt(r,t,a),ti(r,t,a)),t={cache:Ws()},e.payload=t;return}t=t.return}}function O1(e,t,a){var r=wt();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Xr(e)?Xh(t,a):(a=Ys(e,t,a,r),a!==null&&(yt(a,e,r),Qh(a,t,r)))}function Kh(e,t,a){var r=wt();ri(e,t,a,r)}function ri(e,t,a,r){var c={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Xr(e))Xh(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,Et(S,g))return jr(e,t,c,0),Re===null&&Tr(),!1}catch{}finally{}if(a=Ys(e,t,c,r),a!==null)return yt(a,e,r),Qh(a,t,r),!0}return!1}function Ao(e,t,a,r){if(r={lane:2,revertLane:ac(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Xr(e)){if(t)throw Error(u(479))}else t=Ys(e,a,r,2),t!==null&&yt(t,e,2)}function Xr(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function Xh(e,t){rl=qr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Qh(e,t,a){if((a&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,Pf(e,a)}}var ui={readContext:et,use:Gr,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};ui.useEffectEvent=Be;var Zh={readContext:et,use:Gr,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:et,useEffect:Mh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,$r(4194308,4,kh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return $r(4194308,4,e,t)},useInsertionEffect:function(e,t){$r(4,2,e,t)},useMemo:function(e,t){var a=st();t=t===void 0?null:t;var r=e();if(Na){Mn(!0);try{e()}finally{Mn(!1)}}return a.memoizedState=[r,t],r},useReducer:function(e,t,a){var r=st();if(a!==void 0){var c=a(t);if(Na){Mn(!0);try{a(t)}finally{Mn(!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=O1.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:function(e){e=xo(e);var t=e.queue,a=Kh.bind(null,pe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:So,useDeferredValue:function(e,t){var a=st();return Eo(a,e,t)},useTransition:function(){var e=xo(!1);return e=Yh.bind(null,pe,e.queue,!0,!1),st().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var r=pe,c=st();if(be){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Re===null)throw Error(u(349));(xe&127)!==0||gh(r,t,a)}c.memoizedState=a;var f={value:a,getSnapshot:t};return c.queue=f,Mh(xh.bind(null,r,f,e),[e]),r.flags|=2048,sl(9,{destroy:void 0},yh.bind(null,r,f,a,t),null),a},useId:function(){var e=st(),t=Re.identifierPrefix;if(be){var a=Zt,r=Qt;a=(r&~(1<<32-St(r)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Yr++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=E1++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:No,useFormState:jh,useActionState:jh,useOptimistic:function(e){var t=st();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Ao.bind(null,pe,!0,a),a.dispatch=t,[e,t]},useMemoCache:mo,useCacheRefresh:function(){return st().memoizedState=w1.bind(null,pe)},useEffectEvent:function(e){var t=st(),a={impl:e};return t.memoizedState=a,function(){if((Ce&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},To={readContext:et,use:Gr,useCallback:Bh,useContext:et,useEffect:bo,useImperativeHandle:Uh,useInsertionEffect:Lh,useLayoutEffect:Dh,useMemo:Hh,useReducer:Fr,useRef:_h,useState:function(){return Fr(hn)},useDebugValue:So,useDeferredValue:function(e,t){var a=Ve();return qh(a,je.memoizedState,e,t)},useTransition:function(){var e=Fr(hn)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:ii(e),t]},useSyncExternalStore:mh,useId:Fh,useHostTransitionStatus:No,useFormState:wh,useActionState:wh,useOptimistic:function(e,t){var a=Ve();return Sh(a,je,e,t)},useMemoCache:mo,useCacheRefresh:$h};To.useEffectEvent=zh;var Jh={readContext:et,use:Gr,useCallback:Bh,useContext:et,useEffect:bo,useImperativeHandle:Uh,useInsertionEffect:Lh,useLayoutEffect:Dh,useMemo:Hh,useReducer:yo,useRef:_h,useState:function(){return yo(hn)},useDebugValue:So,useDeferredValue:function(e,t){var a=Ve();return je===null?Eo(a,e,t):qh(a,je.memoizedState,e,t)},useTransition:function(){var e=yo(hn)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:ii(e),t]},useSyncExternalStore:mh,useId:Fh,useHostTransitionStatus:No,useFormState:Rh,useActionState:Rh,useOptimistic:function(e,t){var a=Ve();return je!==null?Sh(a,je,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:mo,useCacheRefresh:$h};Jh.useEffectEvent=zh;function jo(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 wo={enqueueSetState:function(e,t,a){e=e._reactInternals;var r=wt(),c=qn(r);c.payload=t,a!=null&&(c.callback=a),t=Yn(e,c,r),t!==null&&(yt(t,e,r),ti(t,e,r))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=wt(),c=qn(r);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Yn(e,c,r),t!==null&&(yt(t,e,r),ti(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=wt(),r=qn(a);r.tag=2,t!=null&&(r.callback=t),t=Yn(e,r,a),t!==null&&(yt(t,e,a),ti(t,e,a))}};function Ih(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?!Xl(a,r)||!Xl(c,f):!0}function Wh(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&&wo.enqueueReplaceState(t,t.state,null)}function Aa(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 Ph(e){Ar(e)}function ep(e){console.error(e)}function tp(e){Ar(e)}function Qr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function np(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 Oo(e,t,a){return a=qn(a),a.tag=3,a.payload={element:null},a.callback=function(){Qr(e,t)},a}function ap(e){return e=qn(e),e.tag=3,e}function lp(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(){np(t,a,r)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){np(t,a,r),typeof c!="function"&&(Xn===null?Xn=new Set([this]):Xn.add(this));var S=r.stack;this.componentDidCatch(r.value,{componentStack:S!==null?S:""})})}function R1(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=Nt.current,a!==null){switch(a.tag){case 31:case 13:return kt===null?ru():a.alternate===null&&He===0&&(He=3),a.flags&=-257,a.flags|=65536,a.lanes=c,r===Dr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([r]):t.add(r),ec(e,r,c)),!1;case 22:return a.flags|=65536,r===Dr?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)),ec(e,r,c)),!1}throw Error(u(435,a.tag))}return ec(e,r,c),ru(),!1}if(be)return t=Nt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,r!==Xs&&(e=Error(u(422),{cause:r}),Jl(Mt(e,a)))):(r!==Xs&&(t=Error(u(423),{cause:r}),Jl(Mt(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,r=Mt(r,a),c=Oo(e.stateNode,r,c),lo(e,c),He!==4&&(He=2)),!1;var f=Error(u(520),{cause:r});if(f=Mt(f,a),mi===null?mi=[f]:mi.push(f),He!==4&&(He=2),t===null)return!0;r=Mt(r,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Oo(a.stateNode,r,e),lo(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"&&(Xn===null||!Xn.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=ap(c),lp(c,e,a,r),lo(a,c),!1}a=a.return}while(a!==null);return!1}var Ro=Error(u(461)),$e=!1;function tt(e,t,a,r){t.child=e===null?sh(t,null,a,r):Ca(t,e.child,a,r)}function ip(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 va(t),r=co(e,t,a,g,f,c),S=fo(),e!==null&&!$e?(ho(e,t,c),pn(e,t,c)):(be&&S&&$s(t),t.flags|=1,tt(e,t,r,c),t.child)}function rp(e,t,a,r,c){if(e===null){var f=a.type;return typeof f=="function"&&!Vs(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,up(e,t,f,r,c)):(e=Or(a.type,null,r,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Bo(e,c)){var g=f.memoizedProps;if(a=a.compare,a=a!==null?a:Xl,a(g,r)&&e.ref===t.ref)return pn(e,t,c)}return t.flags|=1,e=sn(f,r),e.ref=t.ref,e.return=t,t.child=e}function up(e,t,a,r,c){if(e!==null){var f=e.memoizedProps;if(Xl(f,r)&&e.ref===t.ref)if($e=!1,t.pendingProps=r=f,Bo(e,c))(e.flags&131072)!==0&&($e=!0);else return t.lanes=e.lanes,pn(e,t,c)}return _o(e,t,a,r,c)}function sp(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 op(e,t,f,a,r)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&zr(t,f!==null?f.cachePool:null),f!==null?fh(t,f):ro(),dh(t);else return r=t.lanes=536870912,op(e,t,f!==null?f.baseLanes|a:a,a,r)}else f!==null?(zr(t,f.cachePool),fh(t,f),Gn(),t.memoizedState=null):(e!==null&&zr(t,null),ro(),Gn());return tt(e,t,c,a),t.child}function si(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function op(e,t,a,r,c){var f=eo();return f=f===null?null:{parent:Ge._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&zr(t,null),ro(),dh(t),e!==null&&el(e,t,r,!0),t.childLanes=c,null}function Zr(e,t){return t=Ir({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cp(e,t,a){return Ca(t,e.child,null,a),e=Zr(t,t.pendingProps),e.flags|=2,At(t),t.memoizedState=null,e}function _1(e,t,a){var r=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(be){if(r.mode==="hidden")return e=Zr(t,r),t.lanes=536870912,si(null,e);if(so(t),(e=ze)?(e=Em(e,Dt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Dn!==null?{id:Qt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},a=Xd(e),a.return=t,t.child=a,Pe=t,ze=null)):e=null,e===null)throw Un(t);return t.lanes=536870912,null}return Zr(t,r)}var f=e.memoizedState;if(f!==null){var g=f.dehydrated;if(so(t),c)if(t.flags&256)t.flags&=-257,t=cp(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if($e||el(e,t,a,!1),c=(a&e.childLanes)!==0,$e||c){if(r=Re,r!==null&&(g=ed(r,a),g!==0&&g!==f.retryLane))throw f.retryLane=g,ma(e,g),yt(r,e,g),Ro;ru(),t=cp(e,t,a)}else e=f.treeContext,ze=Ut(g.nextSibling),Pe=t,be=!0,kn=null,Dt=!1,e!==null&&Jd(t,e),t=Zr(t,r),t.flags|=4096;return t}return e=sn(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Jr(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 _o(e,t,a,r,c){return va(t),a=co(e,t,a,r,void 0,c),r=fo(),e!==null&&!$e?(ho(e,t,c),pn(e,t,c)):(be&&r&&$s(t),t.flags|=1,tt(e,t,a,c),t.child)}function fp(e,t,a,r,c,f){return va(t),t.updateQueue=null,a=ph(t,r,a,c),hh(e),r=fo(),e!==null&&!$e?(ho(e,t,f),pn(e,t,f)):(be&&r&&$s(t),t.flags|=1,tt(e,t,a,f),t.child)}function dp(e,t,a,r,c){if(va(t),t.stateNode===null){var f=Ja,g=a.contextType;typeof g=="object"&&g!==null&&(f=et(g)),f=new a(r,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=wo,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=r,f.state=t.memoizedState,f.refs={},no(t),g=a.contextType,f.context=typeof g=="object"&&g!==null?et(g):Ja,f.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(jo(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&&wo.enqueueReplaceState(f,f.state,null),ai(t,r,f,c),ni(),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=Aa(a,S);f.props=A;var D=f.context,V=a.contextType;g=Ja,typeof V=="object"&&V!==null&&(g=et(V));var $=a.getDerivedStateFromProps;V=typeof $=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,V||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||D!==g)&&Wh(t,f,r,g),Hn=!1;var k=t.memoizedState;f.state=k,ai(t,r,f,c),ni(),D=t.memoizedState,S||k!==D||Hn?(typeof $=="function"&&(jo(t,a,$,r),D=t.memoizedState),(A=Hn||Ih(t,a,A,r,k,D,g))?(V||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,ao(e,t),g=t.memoizedProps,V=Aa(a,g),f.props=V,$=t.pendingProps,k=f.context,D=a.contextType,A=Ja,typeof D=="object"&&D!==null&&(A=et(D)),S=a.getDerivedStateFromProps,(D=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==$||k!==A)&&Wh(t,f,r,A),Hn=!1,k=t.memoizedState,f.state=k,ai(t,r,f,c),ni();var B=t.memoizedState;g!==$||k!==B||Hn||e!==null&&e.dependencies!==null&&_r(e.dependencies)?(typeof S=="function"&&(jo(t,a,S,r),B=t.memoizedState),(V=Hn||Ih(t,a,V,r,k,B,A)||e!==null&&e.dependencies!==null&&_r(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=V):(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,Jr(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=Ca(t,e.child,null,c),t.child=Ca(t,null,a,c)):tt(e,t,a,c),t.memoizedState=f.state,e=t.child):e=pn(e,t,c),e}function hp(e,t,a,r){return ya(),t.flags|=256,tt(e,t,a,r),t.child}var Mo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zo(e){return{baseLanes:e,cachePool:nh()}}function Lo(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=jt),e}function pp(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:(Ye.current&2)!==0),g&&(c=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(be){if(c?Vn(t):Gn(),(e=ze)?(e=Em(e,Dt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Dn!==null?{id:Qt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},a=Xd(e),a.return=t,t.child=a,Pe=t,ze=null)):e=null,e===null)throw Un(t);return gc(e)?t.lanes=32:t.lanes=536870912,null}var S=r.children;return r=r.fallback,c?(Gn(),c=t.mode,S=Ir({mode:"hidden",children:S},c),r=ga(r,c,a,null),S.return=t,r.return=t,S.sibling=r,t.child=S,r=t.child,r.memoizedState=zo(a),r.childLanes=Lo(e,g,a),t.memoizedState=Mo,si(null,r)):(Vn(t),Do(t,S))}var A=e.memoizedState;if(A!==null&&(S=A.dehydrated,S!==null)){if(f)t.flags&256?(Vn(t),t.flags&=-257,t=ko(e,t,a)):t.memoizedState!==null?(Gn(),t.child=e.child,t.flags|=128,t=null):(Gn(),S=r.fallback,c=t.mode,r=Ir({mode:"visible",children:r.children},c),S=ga(S,c,a,null),S.flags|=2,r.return=t,S.return=t,r.sibling=S,t.child=r,Ca(t,e.child,null,a),r=t.child,r.memoizedState=zo(a),r.childLanes=Lo(e,g,a),t.memoizedState=Mo,t=si(null,r));else if(Vn(t),gc(S)){if(g=S.nextSibling&&S.nextSibling.dataset,g)var D=g.dgst;g=D,r=Error(u(419)),r.stack="",r.digest=g,Jl({value:r,source:null,stack:null}),t=ko(e,t,a)}else if($e||el(e,t,a,!1),g=(a&e.childLanes)!==0,$e||g){if(g=Re,g!==null&&(r=ed(g,a),r!==0&&r!==A.retryLane))throw A.retryLane=r,ma(e,r),yt(g,e,r),Ro;mc(S)||ru(),t=ko(e,t,a)}else mc(S)?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,ze=Ut(S.nextSibling),Pe=t,be=!0,kn=null,Dt=!1,e!==null&&Jd(t,e),t=Do(t,r.children),t.flags|=4096);return t}return c?(Gn(),S=r.fallback,c=t.mode,A=e.child,D=A.sibling,r=sn(A,{mode:"hidden",children:r.children}),r.subtreeFlags=A.subtreeFlags&65011712,D!==null?S=sn(D,S):(S=ga(S,c,a,null),S.flags|=2),S.return=t,r.return=t,r.sibling=S,t.child=r,si(null,r),r=t.child,S=e.child.memoizedState,S===null?S=zo(a):(c=S.cachePool,c!==null?(A=Ge._currentValue,c=c.parent!==A?{parent:A,pool:A}:c):c=nh(),S={baseLanes:S.baseLanes|a,cachePool:c}),r.memoizedState=S,r.childLanes=Lo(e,g,a),t.memoizedState=Mo,si(e.child,r)):(Vn(t),a=e.child,e=a.sibling,a=sn(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 Do(e,t){return t=Ir({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ir(e,t){return e=Ct(22,e,null,t),e.lanes=0,e}function ko(e,t,a){return Ca(t,e.child,null,a),e=Do(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mp(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Js(e.return,t,a)}function Uo(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 gp(e,t,a){var r=t.pendingProps,c=r.revealOrder,f=r.tail;r=r.children;var g=Ye.current,S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,ne(Ye,g),tt(e,t,r,a),r=be?Zl:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mp(e,a,t);else if(e.tag===19)mp(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&&Hr(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),Uo(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&&Hr(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Uo(t,!0,a,null,f,r);break;case"together":Uo(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function pn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Kn|=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=sn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=sn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Bo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_r(e)))}function M1(e,t,a){switch(t.tag){case 3:_n(t,t.stateNode.containerInfo),Bn(t,Ge,e.memoizedState.cache),ya();break;case 27:case 5:Rl(t);break;case 4:_n(t,t.stateNode.containerInfo);break;case 10:Bn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,so(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Vn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?pp(e,t,a):(Vn(t),e=pn(e,t,a),e!==null?e.sibling:null);Vn(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 gp(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),ne(Ye,Ye.current),r)break;return null;case 22:return t.lanes=0,sp(e,t,a,t.pendingProps);case 24:Bn(t,Ge,e.memoizedState.cache)}return pn(e,t,a)}function yp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)$e=!0;else{if(!Bo(e,a)&&(t.flags&128)===0)return $e=!1,M1(e,t,a);$e=(e.flags&131072)!==0}else $e=!1,be&&(t.flags&1048576)!==0&&Zd(t,Zl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Sa(t.elementType),t.type=e,typeof e=="function")Vs(e)?(r=Aa(e,r),t.tag=1,t=dp(null,t,e,r,a)):(t.tag=0,t=_o(null,t,e,r,a));else{if(e!=null){var c=e.$$typeof;if(c===U){t.tag=11,t=ip(null,t,e,r,a);break e}else if(c===G){t.tag=14,t=rp(null,t,e,r,a);break e}}throw t=ee(e)||e,Error(u(306,t,""))}}return t;case 0:return _o(e,t,t.type,t.pendingProps,a);case 1:return r=t.type,c=Aa(r,t.pendingProps),dp(e,t,r,c,a);case 3:e:{if(_n(t,t.stateNode.containerInfo),e===null)throw Error(u(387));r=t.pendingProps;var f=t.memoizedState;c=f.element,ao(e,t),ai(t,r,null,a);var g=t.memoizedState;if(r=g.cache,Bn(t,Ge,r),r!==f.cache&&Is(t,[Ge],a,!0),ni(),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=hp(e,t,r,a);break e}else if(r!==c){c=Mt(Error(u(424)),t),Jl(c),t=hp(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=Ut(e.firstChild),Pe=t,be=!0,kn=null,Dt=!0,a=sh(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(ya(),r===c){t=pn(e,t,a);break e}tt(e,t,r,a)}t=t.child}return t;case 26:return Jr(e,t),e===null?(a=wm(t.type,null,t.pendingProps,null))?t.memoizedState=a:be||(a=t.type,e=t.pendingProps,r=hu(Ue.current).createElement(a),r[We]=t,r[ft]=e,nt(r,a,e),Je(r),t.stateNode=r):t.memoizedState=wm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Rl(t),e===null&&be&&(r=t.stateNode=Am(t.type,t.pendingProps,Ue.current),Pe=t,Dt=!0,c=ze,In(t.type)?(yc=c,ze=Ut(r.firstChild)):ze=c),tt(e,t,t.pendingProps.children,a),Jr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&be&&((c=r=ze)&&(r=sv(r,t.type,t.pendingProps,Dt),r!==null?(t.stateNode=r,Pe=t,ze=Ut(r.firstChild),Dt=!1,c=!0):c=!1),c||Un(t)),Rl(t),c=t.type,f=t.pendingProps,g=e!==null?e.memoizedProps:null,r=f.children,dc(c,f)?r=null:g!==null&&dc(c,g)&&(t.flags|=32),t.memoizedState!==null&&(c=co(e,t,C1,null,null,a),Ci._currentValue=c),Jr(e,t),tt(e,t,r,a),t.child;case 6:return e===null&&be&&((e=a=ze)&&(a=ov(a,t.pendingProps,Dt),a!==null?(t.stateNode=a,Pe=t,ze=null,e=!0):e=!1),e||Un(t)),null;case 13:return pp(e,t,a);case 4:return _n(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ca(t,null,r,a):tt(e,t,r,a),t.child;case 11:return ip(e,t,t.type,t.pendingProps,a);case 7:return tt(e,t,t.pendingProps,a),t.child;case 8:return tt(e,t,t.pendingProps.children,a),t.child;case 12:return tt(e,t,t.pendingProps.children,a),t.child;case 10:return r=t.pendingProps,Bn(t,t.type,r.value),tt(e,t,r.children,a),t.child;case 9:return c=t.type._context,r=t.pendingProps.children,va(t),c=et(c),r=r(c),t.flags|=1,tt(e,t,r,a),t.child;case 14:return rp(e,t,t.type,t.pendingProps,a);case 15:return up(e,t,t.type,t.pendingProps,a);case 19:return gp(e,t,a);case 31:return _1(e,t,a);case 22:return sp(e,t,a,t.pendingProps);case 24:return va(t),r=et(Ge),e===null?(c=eo(),c===null&&(c=Re,f=Ws(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),t.memoizedState={parent:r,cache:c},no(t),Bn(t,Ge,c)):((e.lanes&a)!==0&&(ao(e,t),ai(t,null,null,a),ni()),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),Bn(t,Ge,r)):(r=f.cache,Bn(t,Ge,r),r!==c.cache&&Is(t,[Ge],a,!0))),tt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function mn(e){e.flags|=4}function Ho(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(Fp())e.flags|=8192;else throw Ea=Dr,to}else e.flags&=-16777217}function xp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!zm(t))if(Fp())e.flags|=8192;else throw Ea=Dr,to}function Wr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?If():536870912,e.lanes|=t,dl|=t)}function oi(e,t){if(!be)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 z1(e,t,a){var r=t.pendingProps;switch(Ks(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),fn(Ge),an(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Pa(t)?mn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Qs())),Le(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(mn(t),f!==null?(Le(t),xp(t,f)):(Le(t),Ho(t,c,null,r,a))):f?f!==e.memoizedState?(mn(t),Le(t),xp(t,f)):(Le(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&mn(t),Le(t),Ho(t,c,e,r,a)),null;case 27:if(Ma(t),a=Ue.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&mn(t);else{if(!r){if(t.stateNode===null)throw Error(u(166));return Le(t),null}e=ue.current,Pa(t)?Id(t):(e=Am(c,r,a),t.stateNode=e,mn(t))}return Le(t),null;case 5:if(Ma(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&mn(t);else{if(!r){if(t.stateNode===null)throw Error(u(166));return Le(t),null}if(f=ue.current,Pa(t))Id(t);else{var g=hu(Ue.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[We]=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(nt(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&&mn(t)}}return Le(t),Ho(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&mn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(u(166));if(e=Ue.current,Pa(t)){if(e=t.stateNode,a=t.memoizedProps,r=null,c=Pe,c!==null)switch(c.tag){case 27:case 5:r=c.memoizedProps}e[We]=t,e=!!(e.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||pm(e.nodeValue,a)),e||Un(t,!0)}else e=hu(e).createTextNode(r),e[We]=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[We]=t}else ya(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),e=!1}else a=Qs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(At(t),t):(At(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[We]=t}else ya(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),c=!1}else c=Qs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(At(t),t):(At(t),null)}return At(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),Wr(t,t.updateQueue),Le(t),null);case 4:return an(),e===null&&uc(t.stateNode.containerInfo),Le(t),null;case 10:return fn(t.type),Le(t),null;case 19:if(te(Ye),r=t.memoizedState,r===null)return Le(t),null;if(c=(t.flags&128)!==0,f=r.rendering,f===null)if(c)oi(r,!1);else{if(He!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Hr(e),f!==null){for(t.flags|=128,oi(r,!1),e=f.updateQueue,t.updateQueue=e,Wr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Kd(a,e),a=a.sibling;return ne(Ye,Ye.current&1|2),be&&on(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&_e()>au&&(t.flags|=128,c=!0,oi(r,!1),t.lanes=4194304)}else{if(!c)if(e=Hr(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Wr(t,e),oi(r,!0),r.tail===null&&r.tailMode==="hidden"&&!f.alternate&&!be)return Le(t),null}else 2*_e()-r.renderingStartTime>au&&a!==536870912&&(t.flags|=128,c=!0,oi(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=_e(),e.sibling=null,a=Ye.current,ne(Ye,c?a&1|2:a&1),be&&on(t,r.treeForkCount),e):(Le(t),null);case 22:case 23:return At(t),uo(),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&&Wr(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&&te(ba),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),fn(Ge),Le(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function L1(e,t){switch(Ks(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fn(Ge),an(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ma(t),null;case 31:if(t.memoizedState!==null){if(At(t),t.alternate===null)throw Error(u(340));ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(At(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(Ye),null;case 4:return an(),null;case 10:return fn(t.type),null;case 22:case 23:return At(t),uo(),e!==null&&te(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return fn(Ge),null;case 25:return null;default:return null}}function vp(e,t){switch(Ks(t),t.tag){case 3:fn(Ge),an();break;case 26:case 27:case 5:Ma(t);break;case 4:an();break;case 31:t.memoizedState!==null&&At(t);break;case 13:At(t);break;case 19:te(Ye);break;case 10:fn(t.type);break;case 22:case 23:At(t),uo(),e!==null&&te(ba);break;case 24:fn(Ge)}}function ci(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){Te(t,t.return,S)}}function Fn(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(V){Te(c,A,V)}}}r=r.next}while(r!==f)}}catch(V){Te(t,t.return,V)}}function bp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ch(t,a)}catch(r){Te(e,e.return,r)}}}function Sp(e,t,a){a.props=Aa(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(r){Te(e,t,r)}}function fi(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){Te(e,t,c)}}function Jt(e,t){var a=e.ref,r=e.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(c){Te(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){Te(e,t,c)}else a.current=null}function Ep(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){Te(e,e.return,c)}}function qo(e,t,a){try{var r=e.stateNode;nv(r,e.type,a,t),r[ft]=t}catch(c){Te(e,e.return,c)}}function Cp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&In(e.type)||e.tag===4}function Yo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cp(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&&In(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 Vo(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=rn));else if(r!==4&&(r===27&&In(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Vo(e,t,a),e=e.sibling;e!==null;)Vo(e,t,a),e=e.sibling}function Pr(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&&In(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Pr(e,t,a),e=e.sibling;e!==null;)Pr(e,t,a),e=e.sibling}function Np(e){var t=e.stateNode,a=e.memoizedProps;try{for(var r=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);nt(t,r,a),t[We]=e,t[ft]=a}catch(f){Te(e,e.return,f)}}var gn=!1,Ke=!1,Go=!1,Ap=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function D1(e,t){if(e=e.containerInfo,cc=bu,e=Ud(e),Ds(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,V=0,$=e,k=null;t:for(;;){for(var B;$!==a||c!==0&&$.nodeType!==3||(S=g+c),$!==f||r!==0&&$.nodeType!==3||(A=g+r),$.nodeType===3&&(g+=$.nodeValue.length),(B=$.firstChild)!==null;)k=$,$=B;for(;;){if($===e)break t;if(k===a&&++D===c&&(S=g),k===f&&++V===r&&(A=g),(B=$.nextSibling)!==null)break;$=k,k=$.parentNode}$=B}a=S===-1||A===-1?null:{start:S,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(fc={focusedElem:e,selectionRange:a},bu=!1,Ie=t;Ie!==null;)if(t=Ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ie=e;else for(;Ie!==null;){switch(t=Ie,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 ae=Aa(a.type,c);e=r.getSnapshotBeforeUpdate(ae,f),r.__reactInternalSnapshotBeforeUpdate=e}catch(fe){Te(a,a.return,fe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)pc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pc(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,Ie=e;break}Ie=t.return}}function Tp(e,t,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:xn(e,a),r&4&&ci(5,a);break;case 1:if(xn(e,a),r&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Te(a,a.return,g)}else{var c=Aa(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Te(a,a.return,g)}}r&64&&bp(a),r&512&&fi(a,a.return);break;case 3:if(xn(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{ch(e,t)}catch(g){Te(a,a.return,g)}}break;case 27:t===null&&r&4&&Np(a);case 26:case 5:xn(e,a),t===null&&r&4&&Ep(a),r&512&&fi(a,a.return);break;case 12:xn(e,a);break;case 31:xn(e,a),r&4&&Op(e,a);break;case 13:xn(e,a),r&4&&Rp(e,a),r&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=F1.bind(null,a),cv(e,a))));break;case 22:if(r=a.memoizedState!==null||gn,!r){t=t!==null&&t.memoizedState!==null||Ke,c=gn;var f=Ke;gn=r,(Ke=t)&&!f?vn(e,a,(a.subtreeFlags&8772)!==0):xn(e,a),gn=c,Ke=f}break;case 30:break;default:xn(e,a)}}function jp(e){var t=e.alternate;t!==null&&(e.alternate=null,jp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&xs(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 yn(e,t,a){for(a=a.child;a!==null;)wp(e,t,a),a=a.sibling}function wp(e,t,a){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Dl,a)}catch{}switch(a.tag){case 26:Ke||Jt(a,t),yn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ke||Jt(a,t);var r=De,c=ht;In(a.type)&&(De=a.stateNode,ht=!1),yn(e,t,a),bi(a.stateNode),De=r,ht=c;break;case 5:Ke||Jt(a,t);case 6:if(r=De,c=ht,De=null,yn(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){Te(a,t,f)}else try{De.removeChild(a.stateNode)}catch(f){Te(a,t,f)}break;case 18:De!==null&&(ht?(e=De,bm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),bl(e)):bm(De,a.stateNode));break;case 4:r=De,c=ht,De=a.stateNode.containerInfo,ht=!0,yn(e,t,a),De=r,ht=c;break;case 0:case 11:case 14:case 15:Fn(2,a,t),Ke||Fn(4,a,t),yn(e,t,a);break;case 1:Ke||(Jt(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"&&Sp(a,t,r)),yn(e,t,a);break;case 21:yn(e,t,a);break;case 22:Ke=(r=Ke)||a.memoizedState!==null,yn(e,t,a),Ke=r;break;default:yn(e,t,a)}}function Op(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{bl(e)}catch(a){Te(t,t.return,a)}}}function Rp(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){Te(t,t.return,a)}}function k1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ap),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ap),t;default:throw Error(u(435,e.tag))}}function eu(e,t){var a=k1(e);t.forEach(function(r){if(!a.has(r)){a.add(r);var c=$1.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(In(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));wp(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;)_p(t,e),t=t.sibling}var Gt=null;function _p(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&&(Fn(3,e,e.return),ci(3,e),Fn(5,e,e.return));break;case 1:pt(t,e),mt(e),r&512&&(Ke||a===null||Jt(a,a.return)),r&64&&gn&&(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=Gt;if(pt(t,e),mt(e),r&512&&(Ke||a===null||Jt(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[Bl]||f[We]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(r),c.head.insertBefore(f,c.querySelector("head > title"))),nt(f,r,a),f[We]=e,Je(f),r=f;break e;case"link":var g=_m("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),nt(f,r,a),c.head.appendChild(f);break;case"meta":if(g=_m("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),nt(f,r,a),c.head.appendChild(f);break;default:throw Error(u(468,r))}f[We]=e,Je(f),r=f}e.stateNode=r}else Mm(c,e.type,e.stateNode);else e.stateNode=Rm(c,r,e.memoizedProps);else f!==r?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,r===null?Mm(c,e.type,e.stateNode):Rm(c,r,e.memoizedProps)):r===null&&e.stateNode!==null&&qo(e,e.memoizedProps,a.memoizedProps)}break;case 27:pt(t,e),mt(e),r&512&&(Ke||a===null||Jt(a,a.return)),a!==null&&r&4&&qo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(pt(t,e),mt(e),r&512&&(Ke||a===null||Jt(a,a.return)),e.flags&32){c=e.stateNode;try{Ga(c,"")}catch(ae){Te(e,e.return,ae)}}r&4&&e.stateNode!=null&&(c=e.memoizedProps,qo(e,c,a!==null?a.memoizedProps:c)),r&1024&&(Go=!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(ae){Te(e,e.return,ae)}}break;case 3:if(gu=null,c=Gt,Gt=pu(t.containerInfo),pt(t,e),Gt=c,mt(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{bl(t.containerInfo)}catch(ae){Te(e,e.return,ae)}Go&&(Go=!1,Mp(e));break;case 4:r=Gt,Gt=pu(e.stateNode.containerInfo),pt(t,e),mt(e),Gt=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,eu(e,r)));break;case 13:pt(t,e),mt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(nu=_e()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,eu(e,r)));break;case 22:c=e.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,D=gn,V=Ke;if(gn=D||c,Ke=V||A,pt(t,e),Ke=V,gn=D,mt(e),r&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||A||gn||Ke||Ta(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 $=A.memoizedProps.style,k=$!=null&&$.hasOwnProperty("display")?$.display:null;S.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(ae){Te(A,A.return,ae)}}}else if(t.tag===6){if(a===null){A=t;try{A.stateNode.nodeValue=c?"":A.memoizedProps}catch(ae){Te(A,A.return,ae)}}}else if(t.tag===18){if(a===null){A=t;try{var B=A.stateNode;c?Sm(B,!0):Sm(A.stateNode,!1)}catch(ae){Te(A,A.return,ae)}}}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,eu(e,a))));break;case 19:pt(t,e),mt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,eu(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(Cp(r)){a=r;break}r=r.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var c=a.stateNode,f=Yo(e);Pr(e,f,c);break;case 5:var g=a.stateNode;a.flags&32&&(Ga(g,""),a.flags&=-33);var S=Yo(e);Pr(e,S,g);break;case 3:case 4:var A=a.stateNode.containerInfo,D=Yo(e);Vo(e,D,A);break;default:throw Error(u(161))}}catch(V){Te(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Tp(e,t.alternate,t),t=t.sibling}function Ta(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Fn(4,t,t.return),Ta(t);break;case 1:Jt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Sp(t,t.return,a),Ta(t);break;case 27:bi(t.stateNode);case 26:case 5:Jt(t,t.return),Ta(t);break;case 22:t.memoizedState===null&&Ta(t);break;case 30:Ta(t);break;default:Ta(t)}e=e.sibling}}function vn(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:vn(c,f,a),ci(4,f);break;case 1:if(vn(c,f,a),r=f,c=r.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(D){Te(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++)oh(A[c],S)}catch(D){Te(r,r.return,D)}}a&&g&64&&bp(f),fi(f,f.return);break;case 27:Np(f);case 26:case 5:vn(c,f,a),a&&r===null&&g&4&&Ep(f),fi(f,f.return);break;case 12:vn(c,f,a);break;case 31:vn(c,f,a),a&&g&4&&Op(c,f);break;case 13:vn(c,f,a),a&&g&4&&Rp(c,f);break;case 22:f.memoizedState===null&&vn(c,f,a),fi(f,f.return);break;case 30:break;default:vn(c,f,a)}t=t.sibling}}function Fo(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&&Il(a))}function $o(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Il(e))}function Ft(e,t,a,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)zp(e,t,a,r),t=t.sibling}function zp(e,t,a,r){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Ft(e,t,a,r),c&2048&&ci(9,t);break;case 1:Ft(e,t,a,r);break;case 3:Ft(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&&Il(e)));break;case 12:if(c&2048){Ft(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){Te(t,t.return,A)}}else Ft(e,t,a,r);break;case 31:Ft(e,t,a,r);break;case 13:Ft(e,t,a,r);break;case 23:break;case 22:f=t.stateNode,g=t.alternate,t.memoizedState!==null?f._visibility&2?Ft(e,t,a,r):di(e,t):f._visibility&2?Ft(e,t,a,r):(f._visibility|=2,ol(e,t,a,r,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Fo(g,t);break;case 24:Ft(e,t,a,r),c&2048&&$o(t.alternate,t);break;default:Ft(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),ci(8,g);break;case 23:break;case 22:var V=g.stateNode;g.memoizedState!==null?V._visibility&2?ol(f,g,S,A,c):di(f,g):(V._visibility|=2,ol(f,g,S,A,c)),c&&D&2048&&Fo(g.alternate,g);break;case 24:ol(f,g,S,A,c),c&&D&2048&&$o(g.alternate,g);break;default:ol(f,g,S,A,c)}t=t.sibling}}function di(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:di(a,r),c&2048&&Fo(r.alternate,r);break;case 24:di(a,r),c&2048&&$o(r.alternate,r);break;default:di(a,r)}t=t.sibling}}var hi=8192;function cl(e,t,a){if(e.subtreeFlags&hi)for(e=e.child;e!==null;)Lp(e,t,a),e=e.sibling}function Lp(e,t,a){switch(e.tag){case 26:cl(e,t,a),e.flags&hi&&e.memoizedState!==null&&Ev(a,Gt,e.memoizedState,e.memoizedProps);break;case 5:cl(e,t,a);break;case 3:case 4:var r=Gt;Gt=pu(e.stateNode.containerInfo),cl(e,t,a),Gt=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=hi,hi=16777216,cl(e,t,a),hi=r):cl(e,t,a));break;default:cl(e,t,a)}}function Dp(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 pi(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];Ie=r,Up(r,e)}Dp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kp(e),e=e.sibling}function kp(e){switch(e.tag){case 0:case 11:case 15:pi(e),e.flags&2048&&Fn(9,e,e.return);break;case 3:pi(e);break;case 12:pi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,tu(e)):pi(e);break;default:pi(e)}}function tu(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];Ie=r,Up(r,e)}Dp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Fn(8,t,t.return),tu(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,tu(t));break;default:tu(t)}e=e.sibling}}function Up(e,t){for(;Ie!==null;){var a=Ie;switch(a.tag){case 0:case 11:case 15:Fn(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:Il(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,Ie=r;else e:for(a=e;Ie!==null;){r=Ie;var c=r.sibling,f=r.return;if(jp(r),r===a){Ie=null;break e}if(c!==null){c.return=f,Ie=c;break e}Ie=f}}}var U1={getCacheForType:function(e){var t=et(Ge),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return et(Ge).controller.signal}},B1=typeof WeakMap=="function"?WeakMap:Map,Ce=0,Re=null,ge=null,xe=0,Ae=0,Tt=null,$n=!1,fl=!1,Ko=!1,bn=0,He=0,Kn=0,ja=0,Xo=0,jt=0,dl=0,mi=null,gt=null,Qo=!1,nu=0,Bp=0,au=1/0,lu=null,Xn=null,Qe=0,Qn=null,hl=null,Sn=0,Zo=0,Jo=null,Hp=null,gi=0,Io=null;function wt(){return(Ce&2)!==0&&xe!==0?xe&-xe:z.T!==null?ac():td()}function qp(){if(jt===0)if((xe&536870912)===0||be){var e=dr;dr<<=1,(dr&3932160)===0&&(dr=262144),jt=e}else jt=536870912;return e=Nt.current,e!==null&&(e.flags|=32),jt}function yt(e,t,a){(e===Re&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&(pl(e,0),Zn(e,xe,jt,!1)),Ul(e,a),((Ce&2)===0||e!==Re)&&(e===Re&&((Ce&2)===0&&(ja|=a),He===4&&Zn(e,xe,jt,!1)),It(e))}function Yp(e,t,a){if((Ce&6)!==0)throw Error(u(327));var r=!a&&(t&127)===0&&(t&e.expiredLanes)===0||kl(e,t),c=r?Y1(e,t):Po(e,t,!0),f=r;do{if(c===0){fl&&!r&&Zn(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!H1(a)){c=Po(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=mi;var A=S.current.memoizedState.isDehydrated;if(A&&(pl(S,g).flags|=256),g=Po(S,g,!1),g!==2){if(Ko&&!A){S.errorRecoveryDisabledLanes|=f,ja|=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),Zn(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:Zn(r,t,jt,!$n);break e;case 2:gt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(c=nu+300-_e(),10<c)){if(Zn(r,t,jt,!$n),pr(r,0,!0)!==0)break e;Sn=t,r.timeoutHandle=xm(Vp.bind(null,r,a,gt,lu,Qo,t,jt,ja,dl,$n,f,"Throttled",-0,0),c);break e}Vp(r,a,gt,lu,Qo,t,jt,ja,dl,$n,f,null,-0,0)}}break}while(!0);It(e)}function Vp(e,t,a,r,c,f,g,S,A,D,V,$,k,B){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:rn},Lp(t,f,$);var ae=(f&62914560)===f?nu-_e():(f&4194048)===f?Bp-_e():0;if(ae=Cv($,ae),ae!==null){Sn=f,e.cancelPendingCommit=ae(Jp.bind(null,e,t,f,a,r,c,g,S,A,V,$,null,k,B)),Zn(e,f,g,!D);return}}Jp(e,t,f,a,r,c,g,S,A)}function H1(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(!Et(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 Zn(e,t,a,r){t&=~Xo,t&=~ja,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var c=t;0<c;){var f=31-St(c),g=1<<f;r[f]=-1,c&=~g}a!==0&&Wf(e,a,t)}function iu(){return(Ce&6)===0?(yi(0),!1):!0}function Wo(){if(ge!==null){if(Ae===0)var e=ge.return;else e=ge,cn=xa=null,po(e),ll=null,Pl=0,e=ge;for(;e!==null;)vp(e.alternate,e),e=e.return;ge=null}}function pl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,iv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Sn=0,Wo(),Re=e,ge=a=sn(e.current,null),xe=t,Ae=0,Tt=null,$n=!1,fl=kl(e,t),Ko=!1,dl=jt=Xo=ja=Kn=He=0,gt=mi=null,Qo=!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-St(r),f=1<<c;t|=e[c],r&=~f}return bn=t,Tr(),a}function Gp(e,t){pe=null,z.H=ui,t===al||t===Lr?(t=ih(),Ae=3):t===to?(t=ih(),Ae=4):Ae=t===Ro?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Tt=t,ge===null&&(He=1,Qr(e,Mt(t,e.current)))}function Fp(){var e=Nt.current;return e===null?!0:(xe&4194048)===xe?kt===null:(xe&62914560)===xe||(xe&536870912)!==0?e===kt:!1}function $p(){var e=z.H;return z.H=ui,e===null?ui:e}function Kp(){var e=z.A;return z.A=U1,e}function ru(){He=4,$n||(xe&4194048)!==xe&&Nt.current!==null||(fl=!0),(Kn&134217727)===0&&(ja&134217727)===0||Re===null||Zn(Re,xe,jt,!1)}function Po(e,t,a){var r=Ce;Ce|=2;var c=$p(),f=Kp();(Re!==e||xe!==t)&&(lu=null,pl(e,t)),t=!1;var g=He;e:do try{if(Ae!==0&&ge!==null){var S=ge,A=Tt;switch(Ae){case 8:Wo(),g=6;break e;case 3:case 2:case 9:case 6:Nt.current===null&&(t=!0);var D=Ae;if(Ae=0,Tt=null,ml(e,S,A,D),a&&fl){g=0;break e}break;default:D=Ae,Ae=0,Tt=null,ml(e,S,A,D)}}q1(),g=He;break}catch(V){Gp(e,V)}while(!0);return t&&e.shellSuspendCounter++,cn=xa=null,Ce=r,z.H=c,z.A=f,ge===null&&(Re=null,xe=0,Tr()),g}function q1(){for(;ge!==null;)Xp(ge)}function Y1(e,t){var a=Ce;Ce|=2;var r=$p(),c=Kp();Re!==e||xe!==t?(lu=null,au=_e()+500,pl(e,t)):fl=kl(e,t);e:do try{if(Ae!==0&&ge!==null){t=ge;var f=Tt;t:switch(Ae){case 1:Ae=0,Tt=null,ml(e,t,f,1);break;case 2:case 9:if(ah(f)){Ae=0,Tt=null,Qp(t);break}t=function(){Ae!==2&&Ae!==9||Re!==e||(Ae=7),It(e)},f.then(t,t);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:ah(f)?(Ae=0,Tt=null,Qp(t)):(Ae=0,Tt=null,ml(e,t,f,7));break;case 5:var g=null;switch(ge.tag){case 26:g=ge.memoizedState;case 5:case 27:var S=ge;if(g?zm(g):S.stateNode.complete){Ae=0,Tt=null;var A=S.sibling;if(A!==null)ge=A;else{var D=S.return;D!==null?(ge=D,uu(D)):ge=null}break t}}Ae=0,Tt=null,ml(e,t,f,5);break;case 6:Ae=0,Tt=null,ml(e,t,f,6);break;case 8:Wo(),He=6;break e;default:throw Error(u(462))}}V1();break}catch(V){Gp(e,V)}while(!0);return cn=xa=null,z.H=r,z.A=c,Ce=a,ge!==null?0:(Re=null,xe=0,Tr(),He)}function V1(){for(;ge!==null&&!or();)Xp(ge)}function Xp(e){var t=yp(e.alternate,e,bn);e.memoizedProps=e.pendingProps,t===null?uu(e):ge=t}function Qp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=fp(a,t,t.pendingProps,t.type,void 0,xe);break;case 11:t=fp(a,t,t.pendingProps,t.type.render,t.ref,xe);break;case 5:po(t);default:vp(a,t),t=ge=Kd(t,bn),t=yp(a,t,bn)}e.memoizedProps=e.pendingProps,t===null?uu(e):ge=t}function ml(e,t,a,r){cn=xa=null,po(t),ll=null,Pl=0;var c=t.return;try{if(R1(e,c,t,a,xe)){He=1,Qr(e,Mt(a,e.current)),ge=null;return}}catch(f){if(c!==null)throw ge=c,f;He=1,Qr(e,Mt(a,e.current)),ge=null;return}t.flags&32768?(be||r===1?e=!0:fl||(xe&536870912)!==0?e=!1:($n=e=!0,(r===2||r===9||r===3||r===6)&&(r=Nt.current,r!==null&&r.tag===13&&(r.flags|=16384))),Zp(t,e)):uu(t)}function uu(e){var t=e;do{if((t.flags&32768)!==0){Zp(t,$n);return}e=t.return;var a=z1(t.alternate,t,bn);if(a!==null){ge=a;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);He===0&&(He=5)}function Zp(e,t){do{var a=L1(e.alternate,e);if(a!==null){a.flags&=32767,ge=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=a}while(e!==null);He=6,ge=null}function Jp(e,t,a,r,c,f,g,S,A){e.cancelPendingCommit=null;do su();while(Qe!==0);if((Ce&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(f=t.lanes|t.childLanes,f|=qs,Sx(e,a,f,g,S,A),e===Re&&(ge=Re=null,xe=0),hl=t,Qn=e,Sn=a,Zo=f,Jo=c,Hp=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,K1(ka,function(){return tm(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=z.T,z.T=null,c=H.p,H.p=2,g=Ce,Ce|=4;try{D1(e,t,a)}finally{Ce=g,H.p=c,z.T=r}}Qe=1,Ip(),Wp(),Pp()}}function Ip(){if(Qe===1){Qe=0;var e=Qn,t=hl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null;var r=H.p;H.p=2;var c=Ce;Ce|=4;try{_p(t,e);var f=fc,g=Ud(e.containerInfo),S=f.focusedElem,A=f.selectionRange;if(g!==S&&S&&S.ownerDocument&&kd(S.ownerDocument.documentElement,S)){if(A!==null&&Ds(S)){var D=A.start,V=A.end;if(V===void 0&&(V=D),"selectionStart"in S)S.selectionStart=D,S.selectionEnd=Math.min(V,S.value.length);else{var $=S.ownerDocument||document,k=$&&$.defaultView||window;if(k.getSelection){var B=k.getSelection(),ae=S.textContent.length,fe=Math.min(A.start,ae),Oe=A.end===void 0?fe:Math.min(A.end,ae);!B.extend&&fe>Oe&&(g=Oe,Oe=fe,fe=g);var _=Dd(S,fe),R=Dd(S,Oe);if(_&&R&&(B.rangeCount!==1||B.anchorNode!==_.node||B.anchorOffset!==_.offset||B.focusNode!==R.node||B.focusOffset!==R.offset)){var L=$.createRange();L.setStart(_.node,_.offset),B.removeAllRanges(),fe>Oe?(B.addRange(L),B.extend(R.node,R.offset)):(L.setEnd(R.node,R.offset),B.addRange(L))}}}}for($=[],B=S;B=B.parentNode;)B.nodeType===1&&$.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<$.length;S++){var F=$[S];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}bu=!!cc,fc=cc=null}finally{Ce=c,H.p=r,z.T=a}}e.current=t,Qe=2}}function Wp(){if(Qe===2){Qe=0;var e=Qn,t=hl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=z.T,z.T=null;var r=H.p;H.p=2;var c=Ce;Ce|=4;try{Tp(e,t.alternate,t)}finally{Ce=c,H.p=r,z.T=a}}Qe=3}}function Pp(){if(Qe===4||Qe===3){Qe=0,Ne();var e=Qn,t=hl,a=Sn,r=Hp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Qe=5:(Qe=0,hl=Qn=null,em(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Xn=null),gs(a),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(Dl,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=z.T,c=H.p,H.p=2,z.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{z.T=t,H.p=c}}(Sn&3)!==0&&su(),It(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Io?gi++:(gi=0,Io=e):gi=0,yi(0)}}function em(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Il(t)))}function su(){return Ip(),Wp(),Pp(),tm()}function tm(){if(Qe!==5)return!1;var e=Qn,t=Zo;Zo=0;var a=gs(Sn),r=z.T,c=H.p;try{H.p=32>a?32:a,z.T=null,a=Jo,Jo=null;var f=Qn,g=Sn;if(Qe=0,hl=Qn=null,Sn=0,(Ce&6)!==0)throw Error(u(331));var S=Ce;if(Ce|=4,kp(f.current),zp(f,f.current,g,a),Ce=S,yi(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(Dl,f)}catch{}return!0}finally{H.p=c,z.T=r,em(e,t)}}function nm(e,t,a){t=Mt(a,t),t=Oo(e.stateNode,t,2),e=Yn(e,t,2),e!==null&&(Ul(e,2),It(e))}function Te(e,t,a){if(e.tag===3)nm(e,e,a);else for(;t!==null;){if(t.tag===3){nm(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Xn===null||!Xn.has(r))){e=Mt(a,e),a=ap(2),r=Yn(t,a,2),r!==null&&(lp(a,r,t,e),Ul(r,2),It(r));break}}t=t.return}}function ec(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new B1;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)||(Ko=!0,c.add(a),e=G1.bind(null,e,t,a),t.then(e,e))}function G1(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Re===e&&(xe&a)===a&&(He===4||He===3&&(xe&62914560)===xe&&300>_e()-nu?(Ce&2)===0&&pl(e,0):Xo|=a,dl===xe&&(dl=0)),It(e)}function am(e,t){t===0&&(t=If()),e=ma(e,t),e!==null&&(Ul(e,t),It(e))}function F1(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),am(e,a)}function $1(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),am(e,a)}function K1(e,t){return zl(e,t)}var ou=null,gl=null,tc=!1,cu=!1,nc=!1,Jn=0;function It(e){e!==gl&&e.next===null&&(gl===null?ou=gl=e:gl=gl.next=e),cu=!0,tc||(tc=!0,Q1())}function yi(e,t){if(!nc&&cu){nc=!0;do for(var a=!1,r=ou;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-St(42|e)+1)-1,f&=c&~(g&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,um(r,f))}else f=xe,f=pr(r,r===Re?f:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(f&3)===0||kl(r,f)||(a=!0,um(r,f));r=r.next}while(a);nc=!1}}function X1(){lm()}function lm(){cu=tc=!1;var e=0;Jn!==0&&lv()&&(e=Jn);for(var t=_e(),a=null,r=ou;r!==null;){var c=r.next,f=im(r,t);f===0?(r.next=null,a===null?ou=c:a.next=c,c===null&&(gl=a)):(a=r,(e!==0||(f&3)!==0)&&(cu=!0)),r=c}Qe!==0&&Qe!==5||yi(e),Jn!==0&&(Jn=0)}function im(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var g=31-St(f),S=1<<g,A=c[g];A===-1?((S&a)===0||(S&r)!==0)&&(c[g]=bx(S,t)):A<=t&&(e.expiredLanes|=S),f&=~S}if(t=Re,a=xe,a=pr(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,a===0||e===t&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&sr(r),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||kl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(r!==null&&sr(r),gs(a)){case 2:case 8:a=Da;break;case 32:a=ka;break;case 268435456:a=Ll;break;default:a=ka}return r=rm.bind(null,e),a=zl(a,r),e.callbackPriority=t,e.callbackNode=a,t}return r!==null&&r!==null&&sr(r),e.callbackPriority=2,e.callbackNode=null,2}function rm(e,t){if(Qe!==0&&Qe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(su()&&e.callbackNode!==a)return null;var r=xe;return r=pr(e,e===Re?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Yp(e,r,t),im(e,_e()),e.callbackNode!=null&&e.callbackNode===a?rm.bind(null,e):null)}function um(e,t){if(su())return null;Yp(e,t,!0)}function Q1(){rv(function(){(Ce&6)!==0?zl(oa,X1):lm()})}function ac(){if(Jn===0){var e=tl;e===0&&(e=fr,fr<<=1,(fr&261888)===0&&(fr=256)),Jn=e}return Jn}function sm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xr(""+e)}function om(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 Z1(e,t,a,r,c){if(t==="submit"&&a&&a.stateNode===c){var f=sm((c[ft]||null).action),g=r.submitter;g&&(t=(t=g[ft]||null)?sm(t.formAction):g.getAttribute("formAction"),t!==null&&(f=t,g=null));var S=new Er("action","action",null,r,c);e.push({event:S,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Jn!==0){var A=g?om(c,g):new FormData(c);Co(a,{pending:!0,data:A,method:c.method,action:f},null,A)}}else typeof f=="function"&&(S.preventDefault(),A=g?om(c,g):new FormData(c),Co(a,{pending:!0,data:A,method:c.method,action:f},f,A))},currentTarget:c}]})}}for(var lc=0;lc<Hs.length;lc++){var ic=Hs[lc],J1=ic.toLowerCase(),I1=ic[0].toUpperCase()+ic.slice(1);Vt(J1,"on"+I1)}Vt(qd,"onAnimationEnd"),Vt(Yd,"onAnimationIteration"),Vt(Vd,"onAnimationStart"),Vt("dblclick","onDoubleClick"),Vt("focusin","onFocus"),Vt("focusout","onBlur"),Vt(h1,"onTransitionRun"),Vt(p1,"onTransitionStart"),Vt(m1,"onTransitionCancel"),Vt(Gd,"onTransitionEnd"),Ya("onMouseEnter",["mouseout","mouseover"]),Ya("onMouseLeave",["mouseout","mouseover"]),Ya("onPointerEnter",["pointerout","pointerover"]),Ya("onPointerLeave",["pointerout","pointerover"]),fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fa("onBeforeInput",["compositionend","keypress","textInput","paste"]),fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xi="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(" "),W1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xi));function cm(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(V){Ar(V)}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(V){Ar(V)}c.currentTarget=null,f=A}}}}function ye(e,t){var a=t[ys];a===void 0&&(a=t[ys]=new Set);var r=e+"__bubble";a.has(r)||(fm(t,e,2,!1),a.add(r))}function rc(e,t,a){var r=0;t&&(r|=4),fm(a,e,r,t)}var fu="_reactListening"+Math.random().toString(36).slice(2);function uc(e){if(!e[fu]){e[fu]=!0,ld.forEach(function(a){a!=="selectionchange"&&(W1.has(a)||rc(a,!1,e),rc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fu]||(t[fu]=!0,rc("selectionchange",!1,t))}}function fm(e,t,a,r){switch(qm(t)){case 2:var c=Tv;break;case 8:c=jv;break;default:c=Ec}a=c.bind(null,t,a,e),c=void 0,!Ts||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 sc(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}gd(function(){var D=f,V=Ns(a),$=[];e:{var k=Fd.get(e);if(k!==void 0){var B=Er,ae=e;switch(e){case"keypress":if(br(a)===0)break e;case"keydown":case"keyup":B=$x;break;case"focusin":ae="focus",B=Rs;break;case"focusout":ae="blur",B=Rs;break;case"beforeblur":case"afterblur":B=Rs;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=vd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=zx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=Qx;break;case qd:case Yd:case Vd:B=kx;break;case Gd:B=Jx;break;case"scroll":case"scrollend":B=_x;break;case"wheel":B=Wx;break;case"copy":case"cut":case"paste":B=Bx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Sd;break;case"toggle":case"beforetoggle":B=e1}var fe=(t&4)!==0,Oe=!fe&&(e==="scroll"||e==="scrollend"),_=fe?k!==null?k+"Capture":null:k;fe=[];for(var R=D,L;R!==null;){var F=R;if(L=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||L===null||_===null||(F=ql(R,_),F!=null&&fe.push(vi(R,F,L))),Oe)break;R=R.return}0<fe.length&&(k=new B(k,ae,null,a,V),$.push({event:k,listeners:fe}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",k&&a!==Cs&&(ae=a.relatedTarget||a.fromElement)&&(Ba(ae)||ae[Ua]))break e;if((B||k)&&(k=V.window===V?V:(k=V.ownerDocument)?k.defaultView||k.parentWindow:window,B?(ae=a.relatedTarget||a.toElement,B=D,ae=ae?Ba(ae):null,ae!==null&&(Oe=o(ae),fe=ae.tag,ae!==Oe||fe!==5&&fe!==27&&fe!==6)&&(ae=null)):(B=null,ae=D),B!==ae)){if(fe=vd,F="onMouseLeave",_="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(fe=Sd,F="onPointerLeave",_="onPointerEnter",R="pointer"),Oe=B==null?k:Hl(B),L=ae==null?k:Hl(ae),k=new fe(F,R+"leave",B,a,V),k.target=Oe,k.relatedTarget=L,F=null,Ba(V)===D&&(fe=new fe(_,R+"enter",ae,a,V),fe.target=L,fe.relatedTarget=Oe,F=fe),Oe=F,B&&ae)t:{for(fe=P1,_=B,R=ae,L=0,F=_;F;F=fe(F))L++;F=0;for(var oe=R;oe;oe=fe(oe))F++;for(;0<L-F;)_=fe(_),L--;for(;0<F-L;)R=fe(R),F--;for(;L--;){if(_===R||R!==null&&_===R.alternate){fe=_;break t}_=fe(_),R=fe(R)}fe=null}else fe=null;B!==null&&dm($,k,B,fe,!1),ae!==null&&Oe!==null&&dm($,Oe,ae,fe,!0)}}e:{if(k=D?Hl(D):window,B=k.nodeName&&k.nodeName.toLowerCase(),B==="select"||B==="input"&&k.type==="file")var Se=Od;else if(jd(k))if(Rd)Se=c1;else{Se=s1;var ie=u1}else B=k.nodeName,!B||B.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?D&&Es(D.elementType)&&(Se=Od):Se=o1;if(Se&&(Se=Se(e,D))){wd($,Se,a,V);break e}ie&&ie(e,k,D),e==="focusout"&&D&&k.type==="number"&&D.memoizedProps.value!=null&&Ss(k,"number",k.value)}switch(ie=D?Hl(D):window,e){case"focusin":(jd(ie)||ie.contentEditable==="true")&&(Xa=ie,ks=D,Ql=null);break;case"focusout":Ql=ks=Xa=null;break;case"mousedown":Us=!0;break;case"contextmenu":case"mouseup":case"dragend":Us=!1,Bd($,a,V);break;case"selectionchange":if(d1)break;case"keydown":case"keyup":Bd($,a,V)}var me;if(Ms)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else Ka?Ad(e,a)&&(ve="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ve="onCompositionStart");ve&&(Ed&&a.locale!=="ko"&&(Ka||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&Ka&&(me=yd()):(Ln=V,js="value"in Ln?Ln.value:Ln.textContent,Ka=!0)),ie=du(D,ve),0<ie.length&&(ve=new bd(ve,e,null,a,V),$.push({event:ve,listeners:ie}),me?ve.data=me:(me=Td(a),me!==null&&(ve.data=me)))),(me=n1?a1(e,a):l1(e,a))&&(ve=du(D,"onBeforeInput"),0<ve.length&&(ie=new bd("onBeforeInput","beforeinput",null,a,V),$.push({event:ie,listeners:ve}),ie.data=me)),Z1($,e,D,a,V)}cm($,t)})}function vi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function du(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=ql(e,a),c!=null&&r.unshift(vi(e,c,f)),c=ql(e,t),c!=null&&r.push(vi(e,c,f))),e.tag===3)return r;e=e.return}return[]}function P1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function dm(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=ql(a,f),D!=null&&g.unshift(vi(a,D,A))):c||(D=ql(a,f),D!=null&&g.push(vi(a,D,A)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var ev=/\r\n?/g,tv=/\u0000|\uFFFD/g;function hm(e){return(typeof e=="string"?e:""+e).replace(ev,`
33
- `).replace(tv,"")}function pm(e,t){return t=hm(t),hm(e)===t}function we(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":gr(e,"class",r);break;case"tabIndex":gr(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":gr(e,a,r);break;case"style":pd(e,r,f);break;case"data":if(t!=="object"){gr(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=xr(""+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"&&we(e,t,"name",c.name,c,null),we(e,t,"formEncType",c.formEncType,c,null),we(e,t,"formMethod",c.formMethod,c,null),we(e,t,"formTarget",c.formTarget,c,null)):(we(e,t,"encType",c.encType,c,null),we(e,t,"method",c.method,c,null),we(e,t,"target",c.target,c,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=xr(""+r),e.setAttribute(a,r);break;case"onClick":r!=null&&(e.onclick=rn);break;case"onScroll":r!=null&&ye("scroll",e);break;case"onScrollEnd":r!=null&&ye("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=xr(""+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":ye("beforetoggle",e),ye("toggle",e),mr(e,"popover",r);break;case"xlinkActuate":ln(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ln(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ln(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ln(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ln(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ln(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ln(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ln(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ln(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":mr(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=Ox.get(a)||a,mr(e,a,r))}}function oc(e,t,a,r,c,f){switch(a){case"style":pd(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&&ye("scroll",e);break;case"onScrollEnd":r!=null&&ye("scrollend",e);break;case"onClick":r!=null&&(e.onclick=rn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!id.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,""):mr(e,a,r)}}}function nt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",e),ye("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:we(e,t,f,g,a,null)}}c&&we(e,t,"srcSet",a.srcSet,a,null),r&&we(e,t,"src",a.src,a,null);return;case"input":ye("invalid",e);var S=f=g=c=null,A=null,D=null;for(r in a)if(a.hasOwnProperty(r)){var V=a[r];if(V!=null)switch(r){case"name":c=V;break;case"type":g=V;break;case"checked":A=V;break;case"defaultChecked":D=V;break;case"value":f=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(u(137,t));break;default:we(e,t,r,V,a,null)}}cd(e,f,S,A,D,g,c,!1);return;case"select":ye("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:we(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":ye("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:we(e,t,g,S,a,null)}dd(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:we(e,t,A,r,a,null)}return;case"dialog":ye("beforetoggle",e),ye("toggle",e),ye("cancel",e),ye("close",e);break;case"iframe":case"object":ye("load",e);break;case"video":case"audio":for(r=0;r<xi.length;r++)ye(xi[r],e);break;case"image":ye("error",e),ye("load",e);break;case"details":ye("toggle",e);break;case"embed":case"source":case"link":ye("error",e),ye("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:we(e,t,D,r,a,null)}return;default:if(Es(t)){for(V in a)a.hasOwnProperty(V)&&(r=a[V],r!==void 0&&oc(e,t,V,r,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(r=a[S],r!=null&&we(e,t,S,r,a,null))}function nv(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,V=null;for(B in a){var $=a[B];if(a.hasOwnProperty(B)&&$!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":A=$;default:r.hasOwnProperty(B)||we(e,t,B,null,r,$)}}for(var k in r){var B=r[k];if($=a[k],r.hasOwnProperty(k)&&(B!=null||$!=null))switch(k){case"type":f=B;break;case"name":c=B;break;case"checked":D=B;break;case"defaultChecked":V=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!==$&&we(e,t,k,B,r,$)}}bs(e,g,S,A,D,V,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)||we(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&&we(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:we(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&&we(e,t,g,c,r,f)}fd(e,k,B);return;case"option":for(var ae in a)if(k=a[ae],a.hasOwnProperty(ae)&&k!=null&&!r.hasOwnProperty(ae))switch(ae){case"selected":e.selected=!1;break;default:we(e,t,ae,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:we(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 fe in a)k=a[fe],a.hasOwnProperty(fe)&&k!=null&&!r.hasOwnProperty(fe)&&we(e,t,fe,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:we(e,t,D,k,r,B)}return;default:if(Es(t)){for(var Oe in a)k=a[Oe],a.hasOwnProperty(Oe)&&k!==void 0&&!r.hasOwnProperty(Oe)&&oc(e,t,Oe,void 0,r,k);for(V in r)k=r[V],B=a[V],!r.hasOwnProperty(V)||k===B||k===void 0&&B===void 0||oc(e,t,V,k,r,B);return}}for(var _ in a)k=a[_],a.hasOwnProperty(_)&&k!=null&&!r.hasOwnProperty(_)&&we(e,t,_,null,r,k);for($ in r)k=r[$],B=a[$],!r.hasOwnProperty($)||k===B||k==null&&B==null||we(e,t,$,k,r,B)}function mm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function av(){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&&mm(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 V=A.transferSize,$=A.initiatorType;V&&mm($)&&(A=A.responseEnd,g+=V*(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 cc=null,fc=null;function hu(e){return e.nodeType===9?e:e.ownerDocument}function gm(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 ym(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 dc(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 hc=null;function lv(){var e=window.event;return e&&e.type==="popstate"?e===hc?!1:(hc=e,!0):(hc=null,!1)}var xm=typeof setTimeout=="function"?setTimeout:void 0,iv=typeof clearTimeout=="function"?clearTimeout:void 0,vm=typeof Promise=="function"?Promise:void 0,rv=typeof queueMicrotask=="function"?queueMicrotask:typeof vm<"u"?function(e){return vm.resolve(null).then(e).catch(uv)}:xm;function uv(e){setTimeout(function(){throw e})}function In(e){return e==="head"}function bm(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")bi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,bi(a);for(var f=a.firstChild;f;){var g=f.nextSibling,S=f.nodeName;f[Bl]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=g}}else a==="body"&&bi(e.ownerDocument.body);a=c}while(a);bl(t)}function Sm(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 pc(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":pc(a),xs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function sv(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[Bl])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=Ut(e.nextSibling),e===null)break}return null}function ov(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ut(e.nextSibling),e===null))return null;return e}function Em(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function mc(e){return e.data==="$?"||e.data==="$~"}function gc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function cv(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 Ut(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 yc=null;function Cm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ut(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Nm(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 Am(e,t,a){switch(t=hu(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 bi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);xs(e)}var Bt=new Map,Tm=new Set;function pu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var En=H.d;H.d={f:fv,r:dv,D:hv,C:pv,L:mv,m:gv,X:xv,S:yv,M:vv};function fv(){var e=En.f(),t=iu();return e||t}function dv(e){var t=Ha(e);t!==null&&t.tag===5&&t.type==="form"?Gh(t):En.r(e)}var yl=typeof document>"u"?null:document;function jm(e,t,a){var r=yl;if(r&&typeof t=="string"&&t){var c=Rt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Tm.has(c)||(Tm.add(c),e={rel:e,crossOrigin:a,href:t},r.querySelector(c)===null&&(t=r.createElement("link"),nt(t,"link",e),Je(t),r.head.appendChild(t)))}}function hv(e){En.D(e),jm("dns-prefetch",e,null)}function pv(e,t){En.C(e,t),jm("preconnect",e,t)}function mv(e,t,a){En.L(e,t,a);var r=yl;if(r&&e&&t){var c='link[rel="preload"][as="'+Rt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Rt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Rt(a.imageSizes)+'"]')):c+='[href="'+Rt(e)+'"]';var f=c;switch(t){case"style":f=xl(e);break;case"script":f=vl(e)}Bt.has(f)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Bt.set(f,e),r.querySelector(c)!==null||t==="style"&&r.querySelector(Si(f))||t==="script"&&r.querySelector(Ei(f))||(t=r.createElement("link"),nt(t,"link",e),Je(t),r.head.appendChild(t)))}}function gv(e,t){En.m(e,t);var a=yl;if(a&&e){var r=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Rt(r)+'"][href="'+Rt(e)+'"]',f=c;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=vl(e)}if(!Bt.has(f)&&(e=x({rel:"modulepreload",href:e},t),Bt.set(f,e),a.querySelector(c)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ei(f)))return}r=a.createElement("link"),nt(r,"link",e),Je(r),a.head.appendChild(r)}}}function yv(e,t,a){En.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(Si(f)))S.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Bt.get(f))&&xc(e,a);var A=g=r.createElement("link");Je(A),nt(A,"link",e),A._p=new Promise(function(D,V){A.onload=D,A.onerror=V}),A.addEventListener("load",function(){S.loading|=1}),A.addEventListener("error",function(){S.loading|=2}),S.loading|=4,mu(g,t,r)}g={type:"stylesheet",instance:g,count:1,state:S},c.set(f,g)}}}function xv(e,t){En.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(Ei(c)),f||(e=x({src:e,async:!0},t),(t=Bt.get(c))&&vc(e,t),f=a.createElement("script"),Je(f),nt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(c,f))}}function vv(e,t){En.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(Ei(c)),f||(e=x({src:e,async:!0,type:"module"},t),(t=Bt.get(c))&&vc(e,t),f=a.createElement("script"),Je(f),nt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(c,f))}}function wm(e,t,a,r){var c=(c=Ue.current)?pu(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(Si(e)))&&!f._p&&(g.instance=f,g.state.loading=5),Bt.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},Bt.set(e,a),f||bv(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="'+Rt(e)+'"'}function Si(e){return'link[rel="stylesheet"]['+e+"]"}function Om(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function bv(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}),nt(t,"link",a),Je(t),e.head.appendChild(t))}function vl(e){return'[src="'+Rt(e)+'"]'}function Ei(e){return"script[async]"+e}function Rm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Rt(a.href)+'"]');if(r)return t.instance=r,Je(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"),Je(r),nt(r,"style",c),mu(r,a.precedence,e),t.instance=r;case"stylesheet":c=xl(a.href);var f=e.querySelector(Si(c));if(f)return t.state.loading|=4,t.instance=f,Je(f),f;r=Om(a),(c=Bt.get(c))&&xc(r,c),f=(e.ownerDocument||e).createElement("link"),Je(f);var g=f;return g._p=new Promise(function(S,A){g.onload=S,g.onerror=A}),nt(f,"link",r),t.state.loading|=4,mu(f,a.precedence,e),t.instance=f;case"script":return f=vl(a.src),(c=e.querySelector(Ei(f)))?(t.instance=c,Je(c),c):(r=a,(c=Bt.get(f))&&(r=x({},a),vc(r,c)),e=e.ownerDocument||e,c=e.createElement("script"),Je(c),nt(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,mu(r,a.precedence,e));return t.instance}function mu(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 xc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var gu=null;function _m(e,t,a){if(gu===null){var r=new Map,c=gu=new Map;c.set(a,r)}else c=gu,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[Bl]||f[We]||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 Mm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Sv(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 zm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ev(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(Si(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=yu.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,Je(f);return}f=t.ownerDocument||t,r=Om(r),(c=Bt.get(c))&&xc(r,c),f=f.createElement("link"),Je(f);var g=f;g._p=new Promise(function(S,A){g.onload=S,g.onerror=A}),nt(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=yu.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var bc=0;function Cv(e,t){return e.stylesheets&&e.count===0&&vu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var r=setTimeout(function(){if(e.stylesheets&&vu(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&bc===0&&(bc=62500*av());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&vu(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>bc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(c)}}:null}function yu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xu=null;function vu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xu=new Map,t.forEach(Nv,e),xu=null,yu.call(e))}function Nv(e,t){if(!(t.state.loading&4)){var a=xu.get(e);if(a)var r=a.get(null);else{a=new Map,xu.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=yu.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 Ci={$$typeof:M,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function Av(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=ps(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ps(0),this.hiddenUpdates=ps(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 Lm(e,t,a,r,c,f,g,S,A,D,V,$){return e=new Av(e,t,a,g,A,D,V,$,S),t=1,f===!0&&(t|=24),f=Ct(3,null,null,t),e.current=f,f.stateNode=e,t=Ws(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:r,isDehydrated:a,cache:t},no(f),e}function Dm(e){return e?(e=Ja,e):Ja}function km(e,t,a,r,c,f){c=Dm(c),r.context===null?r.context=c:r.pendingContext=c,r=qn(t),r.payload={element:a},f=f===void 0?null:f,f!==null&&(r.callback=f),a=Yn(e,r,t),a!==null&&(yt(a,e,t),ti(a,e,t))}function Um(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Sc(e,t){Um(e,t),(e=e.alternate)&&Um(e,t)}function Bm(e){if(e.tag===13||e.tag===31){var t=ma(e,67108864);t!==null&&yt(t,e,67108864),Sc(e,67108864)}}function Hm(e){if(e.tag===13||e.tag===31){var t=wt();t=ms(t);var a=ma(e,t);a!==null&&yt(a,e,t),Sc(e,t)}}var bu=!0;function Tv(e,t,a,r){var c=z.T;z.T=null;var f=H.p;try{H.p=2,Ec(e,t,a,r)}finally{H.p=f,z.T=c}}function jv(e,t,a,r){var c=z.T;z.T=null;var f=H.p;try{H.p=8,Ec(e,t,a,r)}finally{H.p=f,z.T=c}}function Ec(e,t,a,r){if(bu){var c=Cc(r);if(c===null)sc(e,t,r,Su,a),Ym(e,r);else if(Ov(c,e,t,a,r))r.stopPropagation();else if(Ym(e,r),t&4&&-1<wv.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=ca(f.pendingLanes);if(g!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var A=1<<31-St(g);S.entanglements[1]|=A,g&=~A}It(f),(Ce&6)===0&&(au=_e()+500,yi(0))}}break;case 31:case 13:S=ma(f,2),S!==null&&yt(S,f,2),iu(),Sc(f,2)}if(f=Cc(r),f===null&&sc(e,t,r,Su,a),f===c)break;c=f}c!==null&&r.stopPropagation()}else sc(e,t,r,null,a)}}function Cc(e){return e=Ns(e),Nc(e)}var Su=null;function Nc(e){if(Su=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 Su=e,null}function qm(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(La()){case oa:return 2;case Da:return 8;case ka:case cr:return 32;case Ll:return 268435456;default:return 32}default:return 32}}var Ac=!1,Wn=null,Pn=null,ea=null,Ni=new Map,Ai=new Map,ta=[],wv="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 Ym(e,t){switch(e){case"focusin":case"focusout":Wn=null;break;case"dragenter":case"dragleave":Pn=null;break;case"mouseover":case"mouseout":ea=null;break;case"pointerover":case"pointerout":Ni.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ai.delete(t.pointerId)}}function Ti(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&&Bm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Ov(e,t,a,r,c){switch(t){case"focusin":return Wn=Ti(Wn,e,t,a,r,c),!0;case"dragenter":return Pn=Ti(Pn,e,t,a,r,c),!0;case"mouseover":return ea=Ti(ea,e,t,a,r,c),!0;case"pointerover":var f=c.pointerId;return Ni.set(f,Ti(Ni.get(f)||null,e,t,a,r,c)),!0;case"gotpointercapture":return f=c.pointerId,Ai.set(f,Ti(Ai.get(f)||null,e,t,a,r,c)),!0}return!1}function Vm(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,nd(e.priority,function(){Hm(a)});return}}else if(t===31){if(t=h(a),t!==null){e.blockedOn=t,nd(e.priority,function(){Hm(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 Eu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Cc(e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);Cs=r,a.target.dispatchEvent(r),Cs=null}else return t=Ha(a),t!==null&&Bm(t),e.blockedOn=a,!1;t.shift()}return!0}function Gm(e,t,a){Eu(e)&&a.delete(t)}function Rv(){Ac=!1,Wn!==null&&Eu(Wn)&&(Wn=null),Pn!==null&&Eu(Pn)&&(Pn=null),ea!==null&&Eu(ea)&&(ea=null),Ni.forEach(Gm),Ai.forEach(Gm)}function Cu(e,t){e.blockedOn===t&&(e.blockedOn=null,Ac||(Ac=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Rv)))}var Nu=null;function Fm(e){Nu!==e&&(Nu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Nu===e&&(Nu=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(Nc(r||a)===null)continue;break}var f=Ha(a);f!==null&&(e.splice(t,3),t-=3,Co(f,{pending:!0,data:c,method:a.method,action:r},r,c))}}))}function bl(e){function t(A){return Cu(A,e)}Wn!==null&&Cu(Wn,e),Pn!==null&&Cu(Pn,e),ea!==null&&Cu(ea,e),Ni.forEach(t),Ai.forEach(t);for(var a=0;a<ta.length;a++){var r=ta[a];r.blockedOn===e&&(r.blockedOn=null)}for(;0<ta.length&&(a=ta[0],a.blockedOn===null);)Vm(a),a.blockedOn===null&&ta.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||Fm(a);else if(g){var S=null;if(f&&f.hasAttribute("formAction")){if(c=f,g=f[ft]||null)S=g.formAction;else if(Nc(c)!==null)continue}else S=g.action;typeof S=="function"?a[r+1]=S:(a.splice(r,3),r-=3),Fm(a)}}}function $m(){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 Tc(e){this._internalRoot=e}Au.prototype.render=Tc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,r=wt();km(a,r,e,t,null,null)},Au.prototype.unmount=Tc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;km(e.current,2,null,e,null,null),iu(),t[Ua]=null}};function Au(e){this._internalRoot=e}Au.prototype.unstable_scheduleHydration=function(e){if(e){var t=td();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ta.length&&t!==0&&t<ta[a].priority;a++);ta.splice(a,0,e),a===0&&Vm(e)}};var Km=l.version;if(Km!=="19.2.6")throw Error(u(527,Km,"19.2.6"));H.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 _v={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tu.isDisabled&&Tu.supportsFiber)try{Dl=Tu.inject(_v),bt=Tu}catch{}}return wi.createRoot=function(e,t){if(!s(e))throw Error(u(299));var a=!1,r="",c=Ph,f=ep,g=tp;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=Lm(e,1,!1,null,null,a,r,null,c,f,g,$m),e[Ua]=t.current,uc(e),new Tc(t)},wi.hydrateRoot=function(e,t,a){if(!s(e))throw Error(u(299));var r=!1,c="",f=Ph,g=ep,S=tp,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=Lm(e,1,!0,t,a??null,r,c,A,f,g,S,$m),t.context=Dm(null),a=t.current,r=wt(),r=ms(r),c=qn(r),c.callback=null,Yn(a,c,r),a=r,t.current.lanes=a,Ul(t,a),It(t),e[Ua]=t.current,uc(e),new Au(t)},wi.version="19.2.6",wi}var Pm;function Xv(){if(Pm)return jc.exports;Pm=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(),jc.exports=Kv(),jc.exports}var Qv=Xv();/**
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 eg="popstate";function tg(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function Zv(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 ef("",{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:qi(s)}return Iv(l,i,null,n)}function ke(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function tn(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Jv(){return Math.random().toString(36).substring(2,10)}function ng(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 ef(n,l,i=null,u,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?wl(l):l,state:i,key:l&&l.key||u||Jv(),mask:s}}function qi({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 wl(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 Iv(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 T=v(),O=T==null?null:T-m;m=T,p&&p({action:h,location:j.location,delta:O})}function E(T,O){h="PUSH";let w=tg(T)?T:ef(j.location,T,O);m=v()+1;let M=ng(w,m),U=j.createHref(w.mask||w);try{d.pushState(M,"",U)}catch(X){if(X instanceof DOMException&&X.name==="DataCloneError")throw X;s.location.assign(U)}o&&p&&p({action:h,location:j.location,delta:1})}function C(T,O){h="REPLACE";let w=tg(T)?T:ef(j.location,T,O);m=v();let M=ng(w,m),U=j.createHref(w.mask||w);d.replaceState(M,"",U),o&&p&&p({action:h,location:j.location,delta:0})}function N(T){return Wv(T)}let j={get action(){return h},get location(){return n(s,d)},listen(T){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(eg,x),p=T,()=>{s.removeEventListener(eg,x),p=null}},createHref(T){return l(s,T)},createURL:N,encodeLocation(T){let O=N(T);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:E,replace:C,go(T){return d.go(T)}};return j}function Wv(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:qi(n);return u=u.replace(/ $/,"%20"),!l&&u.startsWith("//")&&(u=i+u),new URL(u,i)}function m0(n,l,i="/"){return Pv(n,l,i,!1)}function Pv(n,l,i,u,s){let o=typeof l=="string"?wl(l):l,d=Tn(o.pathname||"/",i);if(d==null)return null;let h=eb(n),p=null,m=db(d);for(let v=0;p==null&&v<h.length;++v)p=cb(h[v],m,u);return p}function eb(n){let l=g0(n);return tb(l),l}function g0(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=$t([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}".`),g0(d.children,l,E,x,p)),!(d.path==null&&!d.index)&&l.push({path:x,score:sb(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 y0(d.path))o(d,h,!0,m)}),l}function y0(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=y0(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 tb(n){n.sort((l,i)=>l.score!==i.score?i.score-l.score:ob(l.routesMeta.map(u=>u.childrenIndex),i.routesMeta.map(u=>u.childrenIndex)))}var nb=/^:[\w-]+$/,ab=3,lb=2,ib=1,rb=10,ub=-2,ag=n=>n==="*";function sb(n,l){let i=n.split("/"),u=i.length;return i.some(ag)&&(u+=ub),l&&(u+=lb),i.filter(s=>!ag(s)).reduce((s,o)=>s+(nb.test(o)?ab:o===""?ib:rb),u)}function ob(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 cb(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=Yu({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},v),E=p.route;if(!x&&m&&i&&!u[u.length-1].route.index&&(x=Yu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},v)),!x)return null;Object.assign(s,x.params),d.push({params:s,pathname:$t([o,x.pathname]),pathnameBase:gb($t([o,x.pathnameBase])),route:E}),x.pathnameBase!=="/"&&(o=$t([o,x.pathnameBase]))}return d}function Yu(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,u]=fb(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 fb(n,l=!1,i=!0){tn(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 db(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return tn(!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 Tn(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 hb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function pb(n,l="/"){let{pathname:i,search:u="",hash:s=""}=typeof n=="string"?wl(n):n,o;return i?(i=v0(i),i.startsWith("/")?o=lg(i.substring(1),"/"):o=lg(i,l)):o=l,{pathname:o,search:yb(u),hash:xb(s)}}function lg(n,l){let i=Vu(l).split("/");return n.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function _c(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 mb(n){return n.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function x0(n){let l=mb(n);return l.map((i,u)=>u===l.length-1?i.pathname:i.pathnameBase)}function Nf(n,l,i,u=!1){let s;typeof n=="string"?s=wl(n):(s={...n},ke(!s.pathname||!s.pathname.includes("?"),_c("?","pathname","search",s)),ke(!s.pathname||!s.pathname.includes("#"),_c("#","pathname","hash",s)),ke(!s.search||!s.search.includes("#"),_c("#","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=pb(s,h),m=d&&d!=="/"&&d.endsWith("/"),v=(o||d===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(m||v)&&(p.pathname+="/"),p}var v0=n=>n.replace(/\/\/+/g,"/"),$t=n=>v0(n.join("/")),Vu=n=>n.replace(/\/+$/,""),gb=n=>Vu(n).replace(/^\/*/,"/"),yb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,xb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,vb=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 bb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Sb(n){let l=n.map(i=>i.route.path).filter(Boolean);return $t(l)||"/"}var b0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function S0(n,l){let i=n;if(typeof i!="string"||!hb.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let u=i,s=!1;if(b0)try{let o=new URL(window.location.href),d=i.startsWith("//")?new URL(o.protocol+i):new URL(i),h=Tn(d.pathname,l);d.origin===o.origin&&h!=null?i=h+d.search+d.hash:s=!0}catch{tn(!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 E0=["POST","PUT","PATCH","DELETE"];new Set(E0);var Eb=["GET",...E0];new Set(Eb);var Ol=b.createContext(null);Ol.displayName="DataRouter";var us=b.createContext(null);us.displayName="DataRouterState";var C0=b.createContext(!1);function Cb(){return b.useContext(C0)}var N0=b.createContext({isTransitioning:!1});N0.displayName="ViewTransition";var Nb=b.createContext(new Map);Nb.displayName="Fetchers";var Ab=b.createContext(null);Ab.displayName="Await";var Yt=b.createContext(null);Yt.displayName="Navigation";var Ii=b.createContext(null);Ii.displayName="Location";var Kt=b.createContext({outlet:null,matches:[],isDataRoute:!1});Kt.displayName="Route";var Af=b.createContext(null);Af.displayName="RouteError";var A0="REACT_ROUTER_ERROR",Tb="REDIRECT",jb="ROUTE_ERROR_RESPONSE";function wb(n){if(n.startsWith(`${A0}:${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 Ob(n){if(n.startsWith(`${A0}:${jb}:{`))try{let l=JSON.parse(n.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new vb(l.status,l.statusText,l.data)}catch{}}function Rb(n,{relative:l}={}){ke(Wi(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:u}=b.useContext(Yt),{hash:s,pathname:o,search:d}=Pi(n,{relative:l}),h=o;return i!=="/"&&(h=o==="/"?i:$t([i,o])),u.createHref({pathname:h,search:d,hash:s})}function Wi(){return b.useContext(Ii)!=null}function nn(){return ke(Wi(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Ii).location}var T0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function j0(n){b.useContext(Yt).static||b.useLayoutEffect(n)}function ss(){let{isDataRoute:n}=b.useContext(Kt);return n?Kb():_b()}function _b(){ke(Wi(),"useNavigate() may be used only in the context of a <Router> component.");let n=b.useContext(Ol),{basename:l,navigator:i}=b.useContext(Yt),{matches:u}=b.useContext(Kt),{pathname:s}=nn(),o=JSON.stringify(x0(u)),d=b.useRef(!1);return j0(()=>{d.current=!0}),b.useCallback((p,m={})=>{if(tn(d.current,T0),!d.current)return;if(typeof p=="number"){i.go(p);return}let v=Nf(p,JSON.parse(o),s,m.relative==="path");n==null&&l!=="/"&&(v.pathname=v.pathname==="/"?l:$t([l,v.pathname])),(m.replace?i.replace:i.push)(v,m.state,m)},[l,i,o,s,n])}var Mb=b.createContext(null);function zb(n){let l=b.useContext(Kt).outlet;return b.useMemo(()=>l&&b.createElement(Mb.Provider,{value:n},l),[l,n])}function Lb(){let{matches:n}=b.useContext(Kt),l=n[n.length-1];return(l==null?void 0:l.params)??{}}function Pi(n,{relative:l}={}){let{matches:i}=b.useContext(Kt),{pathname:u}=nn(),s=JSON.stringify(x0(i));return b.useMemo(()=>Nf(n,JSON.parse(s),u,l==="path"),[n,s,u,l])}function Db(n,l){return w0(n,l)}function w0(n,l,i){var T;ke(Wi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=b.useContext(Yt),{matches:s}=b.useContext(Kt),o=s[s.length-1],d=o?o.params:{},h=o?o.pathname:"/",p=o?o.pathnameBase:"/",m=o&&o.route;{let O=m&&m.path||"";R0(h,!m||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
43
-
44
- Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let v=nn(),x;if(l){let O=typeof l=="string"?wl(l):l;ke(p==="/"||((T=O.pathname)==null?void 0:T.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 "${O.pathname}" was given in the \`location\` prop.`),x=O}else x=v;let E=x.pathname||"/",C=E;if(p!=="/"){let O=p.replace(/^\//,"").split("/");C="/"+E.replace(/^\//,"").split("/").slice(O.length).join("/")}let N=i&&i.state.matches.length?i.state.matches.map(O=>Object.assign(O,{route:i.manifest[O.route.id]||O.route})):m0(n,{pathname:C});tn(m||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),tn(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 j=qb(N&&N.map(O=>Object.assign({},O,{params:Object.assign({},d,O.params),pathname:$t([p,u.encodeLocation?u.encodeLocation(O.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?p:$t([p,u.encodeLocation?u.encodeLocation(O.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),s,i);return l&&j?b.createElement(Ii.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},j):j}function kb(){let n=$b(),l=bb(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 Ub=b.createElement(kb,null),O0=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=Ob(n.digest);i&&(n=i)}let l=n!==void 0?b.createElement(Kt.Provider,{value:this.props.routeContext},b.createElement(Af.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?b.createElement(Bb,{error:n},l):l}};O0.contextType=C0;var Mc=new WeakMap;function Bb({children:n,error:l}){let{basename:i}=b.useContext(Yt);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let u=wb(l.digest);if(u){let s=Mc.get(l);if(s)throw s;let o=S0(u.location,i);if(b0&&!Mc.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 Mc.set(l,d),d}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return n}function Hb({routeContext:n,match:l,children:i}){let u=b.useContext(Ol);return u&&u.static&&u.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=l.route.id),b.createElement(Kt.Provider,{value:n},i)}function qb(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:Sb(u.matches),errorInfo:x})}:void 0;return s.reduceRight((v,x,E)=>{let C,N=!1,j=null,T=null;u&&(C=o&&x.route.id?o[x.route.id]:void 0,j=x.route.errorElement||Ub,d&&(h<0&&E===0?(R0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,T=null):h===E&&(N=!0,T=x.route.hydrateFallbackElement||null)));let O=l.concat(s.slice(0,E+1)),w=()=>{let M;return C?M=j:N?M=T:x.route.Component?M=b.createElement(x.route.Component,null):x.route.element?M=x.route.element:M=v,b.createElement(Hb,{match:x,routeContext:{outlet:v,matches:O,isDataRoute:u!=null},children:M})};return u&&(x.route.ErrorBoundary||x.route.errorElement||E===0)?b.createElement(O0,{location:u.location,revalidation:u.revalidation,component:j,error:C,children:w(),routeContext:{outlet:null,matches:O,isDataRoute:!0},onError:m}):w()},null)}function Tf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yb(n){let l=b.useContext(Ol);return ke(l,Tf(n)),l}function Vb(n){let l=b.useContext(us);return ke(l,Tf(n)),l}function Gb(n){let l=b.useContext(Kt);return ke(l,Tf(n)),l}function jf(n){let l=Gb(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 Fb(){return jf("useRouteId")}function $b(){var u;let n=b.useContext(Af),l=Vb("useRouteError"),i=jf("useRouteError");return n!==void 0?n:(u=l.errors)==null?void 0:u[i]}function Kb(){let{router:n}=Yb("useNavigate"),l=jf("useNavigate"),i=b.useRef(!1);return j0(()=>{i.current=!0}),b.useCallback(async(s,o={})=>{tn(i.current,T0),i.current&&(typeof s=="number"?await n.navigate(s):await n.navigate(s,{fromRouteId:l,...o}))},[n,l])}var ig={};function R0(n,l,i){!l&&!ig[n]&&(ig[n]=!0,tn(!1,i))}b.memo(Xb);function Xb({routes:n,manifest:l,future:i,state:u,isStatic:s,onError:o}){return w0(n,void 0,{manifest:l,state:u,isStatic:s,onError:o})}function Qb(n){return zb(n.context)}function _i(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 Zb({basename:n="/",children:l=null,location:i,navigationType:u="POP",navigator:s,static:o=!1,useTransitions:d}){ke(!Wi(),"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=wl(i));let{pathname:m="/",search:v="",hash:x="",state:E=null,key:C="default",mask:N}=i,j=b.useMemo(()=>{let T=Tn(m,h);return T==null?null:{location:{pathname:T,search:v,hash:x,state:E,key:C,mask:N},navigationType:u}},[h,m,v,x,E,C,u,N]);return tn(j!=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.`),j==null?null:b.createElement(Yt.Provider,{value:p},b.createElement(Ii.Provider,{children:l,value:j}))}function Jb({children:n,location:l}){return Db(tf(n),l)}function tf(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,tf(u.props.children,o));return}ke(u.type===_i,`[${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=tf(u.props.children,o)),i.push(d)}),i}var Lu="get",Du="application/x-www-form-urlencoded";function os(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Ib(n){return os(n)&&n.tagName.toLowerCase()==="button"}function Wb(n){return os(n)&&n.tagName.toLowerCase()==="form"}function Pb(n){return os(n)&&n.tagName.toLowerCase()==="input"}function e2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function t2(n,l){return n.button===0&&(!l||l==="_self")&&!e2(n)}var Ru=null;function n2(){if(Ru===null)try{new FormData(document.createElement("form"),0),Ru=!1}catch{Ru=!0}return Ru}var a2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zc(n){return n!=null&&!a2.has(n)?(tn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Du}"`),null):n}function l2(n,l){let i,u,s,o,d;if(Wb(n)){let h=n.getAttribute("action");u=h?Tn(h,l):null,i=n.getAttribute("method")||Lu,s=zc(n.getAttribute("enctype"))||Du,o=new FormData(n)}else if(Ib(n)||Pb(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?Tn(p,l):null,i=n.getAttribute("formmethod")||h.getAttribute("method")||Lu,s=zc(n.getAttribute("formenctype"))||zc(h.getAttribute("enctype"))||Du,o=new FormData(h,n),!n2()){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(os(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Lu,u=null,s=Du,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 wf(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function _0(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&&Tn(s.pathname,l)==="/"?s.pathname=`${Vu(l)}/_root.${u}`:s.pathname=`${Vu(s.pathname)}.${u}`,s}async function i2(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 r2(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 u2(n,l,i){let u=await Promise.all(n.map(async s=>{let o=l.routes[s.route.id];if(o){let d=await i2(o,i);return d.links?d.links():[]}return[]}));return f2(u.flat(1).filter(r2).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function rg(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 s2(n,l,{includeHydrateFallback:i}={}){return o2(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 o2(n){return[...new Set(n)]}function c2(n){let l={},i=Object.keys(n).sort();for(let u of i)l[u]=n[u];return l}function f2(n,l){let i=new Set;return new Set(l),n.reduce((u,s)=>{let o=JSON.stringify(c2(s));return i.has(o)||(i.add(o),u.push({key:o,link:s})),u},[])}function Of(){let n=b.useContext(Ol);return wf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function d2(){let n=b.useContext(us);return wf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Rf=b.createContext(void 0);Rf.displayName="FrameworkContext";function _f(){let n=b.useContext(Rf);return wf(n,"You must render this element inside a <HydratedRouter> element"),n}function h2(n,l){let i=b.useContext(Rf),[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 j=O=>{O.forEach(w=>{d(w.isIntersecting)})},T=new IntersectionObserver(j,{threshold:.5});return E.current&&T.observe(E.current),()=>{T.disconnect()}}},[n]),b.useEffect(()=>{if(u){let j=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(j)}}},[u]);let C=()=>{s(!0)},N=()=>{s(!1),d(!1)};return i?n!=="intent"?[o,E,{}]:[o,E,{onFocus:Oi(h,C),onBlur:Oi(p,N),onMouseEnter:Oi(m,C),onMouseLeave:Oi(v,N),onTouchStart:Oi(x,C)}]:[!1,E,{}]}function Oi(n,l){return i=>{n&&n(i),i.defaultPrevented||l(i)}}function p2({page:n,...l}){let i=Cb(),{router:u}=Of(),s=b.useMemo(()=>m0(u.routes,n,u.basename),[u.routes,n,u.basename]);return s?i?b.createElement(g2,{page:n,matches:s,...l}):b.createElement(y2,{page:n,matches:s,...l}):null}function m2(n){let{manifest:l,routeModules:i}=_f(),[u,s]=b.useState([]);return b.useEffect(()=>{let o=!1;return u2(n,l,i).then(d=>{o||s(d)}),()=>{o=!0}},[n,l,i]),u}function g2({page:n,matches:l,...i}){let u=nn(),{future:s}=_f(),{basename:o}=Of(),d=b.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let h=_0(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 y2({page:n,matches:l,...i}){let u=nn(),{future:s,manifest:o,routeModules:d}=_f(),{basename:h}=Of(),{loaderData:p,matches:m}=d2(),v=b.useMemo(()=>rg(n,l,m,o,u,"data"),[n,l,m,o,u]),x=b.useMemo(()=>rg(n,l,m,o,u,"assets"),[n,l,m,o,u]),E=b.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let j=new Set,T=!1;if(l.forEach(w=>{var U;let M=o.routes[w.route.id];!M||!M.hasLoader||(!v.some(X=>X.route.id===w.route.id)&&w.route.id in p&&((U=d[w.route.id])!=null&&U.shouldRevalidate)||M.hasClientLoader?T=!0:j.add(w.route.id))}),j.size===0)return[];let O=_0(n,h,s.unstable_trailingSlashAwareDataRequests,"data");return T&&j.size>0&&O.searchParams.set("_routes",l.filter(w=>j.has(w.route.id)).map(w=>w.route.id).join(",")),[O.pathname+O.search]},[h,s.unstable_trailingSlashAwareDataRequests,p,u,o,v,l,n,d]),C=b.useMemo(()=>s2(x,o),[x,o]),N=m2(x);return b.createElement(b.Fragment,null,E.map(j=>b.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...i})),C.map(j=>b.createElement("link",{key:j,rel:"modulepreload",href:j,...i})),N.map(({key:j,link:T})=>b.createElement("link",{key:j,nonce:i.nonce,...T,crossOrigin:T.crossOrigin??i.crossOrigin})))}function x2(...n){return l=>{n.forEach(i=>{typeof i=="function"?i(l):i!=null&&(i.current=l)})}}var v2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{v2&&(window.__reactRouterVersion="7.15.1")}catch{}function b2({basename:n,children:l,useTransitions:i,window:u}){let s=b.useRef();s.current==null&&(s.current=Zv({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(Zb,{basename:n,children:l,location:d.location,navigationType:d.action,navigator:o,useTransitions:i})}var M0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,z0=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},j){let{basename:T,navigator:O,useTransitions:w}=b.useContext(Yt),M=typeof v=="string"&&M0.test(v),U=S0(v,T);v=U.to;let X=Rb(v,{relative:s}),Q=nn(),G=null;if(h){let re=Nf(h,[],Q.mask?Q.mask.pathname:"/",!0);T!=="/"&&(re.pathname=re.pathname==="/"?T:$t([T,re.pathname])),G=O.createHref(re)}let[K,q,J]=h2(u,N),ce=N2(v,{replace:d,mask:h,state:p,target:m,preventScrollReset:x,relative:s,viewTransition:E,defaultShouldRevalidate:C,useTransitions:w});function P(re){l&&l(re),re.defaultPrevented||ce(re)}let le=!(U.isExternal||o),ee=b.createElement("a",{...N,...J,href:(le?G:void 0)||U.absoluteURL||X,onClick:le?P:l,ref:x2(j,q),target:m,"data-discover":!M&&i==="render"?"true":void 0});return K&&!M?b.createElement(b.Fragment,null,ee,b.createElement(p2,{page:X})):ee});z0.displayName="Link";var S2=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=Pi(d,{relative:m.relative}),E=nn(),C=b.useContext(us),{navigator:N,basename:j}=b.useContext(Yt),T=C!=null&&O2(x)&&h===!0,O=N.encodeLocation?N.encodeLocation(x).pathname:x.pathname,w=E.pathname,M=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;i||(w=w.toLowerCase(),M=M?M.toLowerCase():null,O=O.toLowerCase()),M&&j&&(M=Tn(M,j)||M);const U=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let X=w===O||!s&&w.startsWith(O)&&w.charAt(U)==="/",Q=M!=null&&(M===O||!s&&M.startsWith(O)&&M.charAt(O.length)==="/"),G={isActive:X,isPending:Q,isTransitioning:T},K=X?l:void 0,q;typeof u=="function"?q=u(G):q=[u,X?"active":null,Q?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let J=typeof o=="function"?o(G):o;return b.createElement(z0,{...m,"aria-current":K,className:q,ref:v,style:J,to:d,viewTransition:h},typeof p=="function"?p(G):p)});S2.displayName="NavLink";var E2=b.forwardRef(({discover:n="render",fetcherKey:l,navigate:i,reloadDocument:u,replace:s,state:o,method:d=Lu,action:h,onSubmit:p,relative:m,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:E,...C},N)=>{let{useTransitions:j}=b.useContext(Yt),T=j2(),O=w2(h,{relative:m}),w=d.toLowerCase()==="get"?"get":"post",M=typeof h=="string"&&M0.test(h),U=X=>{if(p&&p(X),X.defaultPrevented)return;X.preventDefault();let Q=X.nativeEvent.submitter,G=(Q==null?void 0:Q.getAttribute("formmethod"))||d,K=()=>T(Q||X.currentTarget,{fetcherKey:l,method:G,navigate:i,replace:s,state:o,relative:m,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:E});j&&i!==!1?b.startTransition(()=>K()):K()};return b.createElement("form",{ref:N,method:w,action:O,onSubmit:u?p:U,...C,"data-discover":!M&&n==="render"?"true":void 0})});E2.displayName="Form";function C2(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function L0(n){let l=b.useContext(Ol);return ke(l,C2(n)),l}function N2(n,{target:l,replace:i,mask:u,state:s,preventScrollReset:o,relative:d,viewTransition:h,defaultShouldRevalidate:p,useTransitions:m}={}){let v=ss(),x=nn(),E=Pi(n,{relative:d});return b.useCallback(C=>{if(t2(C,l)){C.preventDefault();let N=i!==void 0?i:qi(x)===qi(E),j=()=>v(n,{replace:N,mask:u,state:s,preventScrollReset:o,relative:d,viewTransition:h,defaultShouldRevalidate:p});m?b.startTransition(()=>j()):j()}},[x,v,E,i,u,s,l,n,o,d,h,p,m])}var A2=0,T2=()=>`__${String(++A2)}__`;function j2(){let{router:n}=L0("useSubmit"),{basename:l}=b.useContext(Yt),i=Fb(),u=n.fetch,s=n.navigate;return b.useCallback(async(o,d={})=>{let{action:h,method:p,encType:m,formData:v,body:x}=l2(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 w2(n,{relative:l}={}){let{basename:i}=b.useContext(Yt),u=b.useContext(Kt);ke(u,"useFormAction must be used inside a RouteContext");let[s]=u.matches.slice(-1),o={...Pi(n||".",{relative:l})},d=nn();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:$t([i,o.pathname])),qi(o)}function O2(n,{relative:l}={}){let i=b.useContext(N0);ke(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=L0("useViewTransitionState"),s=Pi(n,{relative:l});if(!i.isTransitioning)return!1;let o=Tn(i.currentLocation.pathname,u)||i.currentLocation.pathname,d=Tn(i.nextLocation.pathname,u)||i.nextLocation.pathname;return Yu(s.pathname,d)!=null||Yu(s.pathname,o)!=null}function R2(){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 Mf="paimon:accessToken";function D0(){return localStorage.getItem(Mf)}function _2(n){localStorage.setItem(Mf,n)}function k0(){localStorage.removeItem(Mf)}function M2(){const[n,l]=b.useState(D0()),[i,u]=b.useState(!1),s=b.useCallback(d=>{u(!1),l(d)},[]),o=b.useCallback(()=>{k0(),l(null),u(!0)},[]);return{authToken:n,authError:i,handleLogin:s,handleAuthError:o}}const ug=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},z2=(n=>n?ug(n):ug),L2=n=>n;function D2(n,l=L2){const i=ju.useSyncExternalStore(n.subscribe,ju.useCallback(()=>l(n.getState()),[n,l]),ju.useCallback(()=>l(n.getInitialState()),[n,l]));return ju.useDebugValue(i),i}const sg=n=>{const l=z2(n),i=u=>D2(l,u);return Object.assign(i,l),i},cs=(n=>n?sg(n):sg),og={HEARTBEAT_INTERVAL:5e3,HEARTBEAT_TIMEOUT:5e3};let Nn=null;const nf=new Set;let Tl=!1,ku=null,Oa=null,Uu=null,Di=null,Cl=null,ki,Lc=!1;const k2=3e3,U2=3e3;function B2(n){for(const l of nf)try{l(n)}catch(i){console.error("[useWebSocket] listener error:",i)}}function H2(n){ku=setInterval(()=>{n.readyState===WebSocket.OPEN&&(n.send(JSON.stringify({type:"ping"})),Oa=setTimeout(()=>{n.close()},og.HEARTBEAT_TIMEOUT))},og.HEARTBEAT_INTERVAL)}function U0(){ku&&(clearInterval(ku),ku=null),Oa&&(clearTimeout(Oa),Oa=null)}function Dc(){Tl||(Uu=setTimeout(B0,U2))}function af(){Di&&(clearTimeout(Di),Di=null)}function B0(){if(Tl||!Cl)return;const i=`${`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/browser`}?token=${encodeURIComponent(Cl)}`;Lc=!1;const u=new WebSocket(i);Nn=u,Ht.setState({connectionState:"connecting"}),Di=setTimeout(()=>{Di=null,u.readyState===WebSocket.CONNECTING&&u.close()},k2),u.onopen=()=>{af(),Lc=!0,Ht.setState({connectionState:"connected"}),u.send(JSON.stringify({type:"list"})),H2(u)},u.onmessage=s=>{try{const o=JSON.parse(s.data);if(o.type==="pong"){Oa&&(clearTimeout(Oa),Oa=null);return}B2(o)}catch{}},u.onclose=s=>{if(af(),Ht.setState({connectionState:"disconnected"}),Nn=null,U0(),!Tl&&!Lc){const o={};Cl&&(o.Authorization=`Bearer ${Cl}`),fetch("/api/instances",{headers:o}).then(d=>{d.status===401?ki==null||ki():Dc()}).catch(()=>{Dc()});return}Tl||Dc()},u.onerror=()=>{u.close()}}const Ht=cs((n,l)=>({connectionState:"idle",send:i=>{(Nn==null?void 0:Nn.readyState)===WebSocket.OPEN&&Nn.send(JSON.stringify(i))},subscribe:i=>(nf.add(i),()=>{nf.delete(i)}),connect:(i,u)=>{l().disconnect(),Tl=!1,Cl=i,ki=u,B0()},disconnect:()=>{Tl=!0,Cl=null,ki=void 0,U0(),af(),Uu&&(clearTimeout(Uu),Uu=null),Nn&&(Nn.close(),Nn=null),n({connectionState:"idle"})}}));function q2(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 lf=n=>l=>{try{const i=n(l);return i instanceof Promise?i:{then(u){return lf(u)(i)},catch(u){return this}}}catch(i){return{then(u){return this},catch(u){return lf(u)(i)}}}},Y2=(n,l)=>(i,u,s)=>{let o={storage:q2(()=>window.localStorage),partialize:T=>T,version:0,merge:(T,O)=>({...O,...T}),...l},d=!1,h=0;const p=new Set,m=new Set;let v=o.storage;if(!v)return n((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),i(...T)},u,s);const x=()=>{const T=o.partialize({...u()});return v.setItem(o.name,{state:T,version:o.version})},E=s.setState;s.setState=(T,O)=>(E(T,O),x());const C=n((...T)=>(i(...T),x()),u,s);s.getInitialState=()=>C;let N;const j=()=>{var T,O;if(!v)return;const w=++h;d=!1,p.forEach(U=>{var X;return U((X=u())!=null?X:C)});const M=((O=o.onRehydrateStorage)==null?void 0:O.call(o,(T=u())!=null?T:C))||void 0;return lf(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(Q=>[!0,Q]):[!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(w!==h)return;const[Q,G]=U;if(N=o.merge(G,(X=u())!=null?X:C),i(N,!0),Q)return x()}).then(()=>{w===h&&(M==null||M(u(),void 0),N=u(),d=!0,m.forEach(U=>U(N)))}).catch(U=>{w===h&&(M==null||M(void 0,U))})};return s.persist={setOptions:T=>{o={...o,...T},T.storage&&(v=T.storage)},clearStorage:()=>{v==null||v.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>j(),hasHydrated:()=>d,onHydrate:T=>(p.add(T),()=>{p.delete(T)}),onFinishHydration:T=>(m.add(T),()=>{m.delete(T)})},o.skipHydration||j(),N||C},V2=Y2,Mi=cs()(V2((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 G2(n){return l=>n?l.instances.find(i=>i.id===n):void 0}/**
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 H0=(...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 F2=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 $2=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 cg=n=>{const l=$2(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 kc={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 K2=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1},X2=b.createContext({}),Q2=()=>b.useContext(X2),Z2=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=""}=Q2()??{},N=u??x?Number(i??v)*24/Number(l??m):i??v;return b.createElement("svg",{ref:p,...kc,width:l??m??kc.width,height:l??m??kc.height,stroke:n??E,strokeWidth:N,className:H0("lucide",C,s),...!o&&!K2(h)&&{"aria-hidden":"true"},...h},[...d.map(([j,T])=>b.createElement(j,T)),...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 Me=(n,l)=>{const i=b.forwardRef(({className:u,...s},o)=>b.createElement(Z2,{ref:o,iconNode:l,className:H0(`lucide-${F2(cg(n))}`,`lucide-${n}`,u),...s}));return i.displayName=cg(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 J2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],I2=Me("arrow-up",J2);/**
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 W2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],er=Me("check",W2);/**
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 P2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],q0=Me("chevron-down",P2);/**
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 eS=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],tS=Me("chevron-left",eS);/**
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 nS=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zf=Me("chevron-right",nS);/**
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 aS=[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]],lS=Me("chevrons-down",aS);/**
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 iS=[["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"}]],fg=Me("circle-alert",iS);/**
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 rS=[["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"}]],Y0=Me("circle-x",rS);/**
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 uS=[["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"}]],V0=Me("copy",uS);/**
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 sS=[["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"}]],oS=Me("file-text",sS);/**
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 cS=[["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=Me("folder-plus",cS);/**
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 dS=[["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"}]],G0=Me("folder",dS);/**
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 hS=[["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"}]],pS=Me("git-branch",hS);/**
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 mS=[["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"}]],gS=Me("history",mS);/**
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 yS=[["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"}]],xS=Me("image-plus",yS);/**
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 vS=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Yi=Me("loader-circle",vS);/**
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 bS=[["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"}]],SS=Me("log-out",bS);/**
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 ES=[["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"}]],CS=Me("minimize-2",ES);/**
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 NS=[["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"}]],dg=Me("pencil",NS);/**
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 AS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],F0=Me("plus",AS);/**
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 TS=[["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"}]],jS=Me("settings",TS);/**
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 wS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],OS=Me("square",wS);/**
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 RS=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],_S=Me("terminal",RS);/**
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 MS=[["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"}]],zS=Me("timer",MS);/**
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 LS=[["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"}]],DS=Me("wrench",LS);/**
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 kS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Lf=Me("x",kS),Gu={appearance:"paimon:appearance",background:"paimon:background"};function rf(){const n=localStorage.getItem(Gu.appearance);return n==="light"||n==="dark"||n==="system"?n:"system"}function $0(){const n=localStorage.getItem(Gu.background);return n==="mist"||n==="aurora"||n==="ember"?n:"mist"}function K0(n){return n==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n}function Fu(n,l){const i=K0(n);return document.documentElement.setAttribute("data-theme",i),document.documentElement.setAttribute("data-bg",l),i}const jn=cs(n=>({appearance:rf(),background:$0(),resolvedTheme:K0(rf()),setAppearance:l=>{localStorage.setItem(Gu.appearance,l);const i=Fu(l,jn.getState().background);n({appearance:l,resolvedTheme:i})},setBackground:l=>{localStorage.setItem(Gu.background,l),Fu(jn.getState().appearance,l),n({background:l})}})),US=window.matchMedia("(prefers-color-scheme: dark)");US.addEventListener("change",()=>{const{appearance:n,background:l}=jn.getState();if(n==="system"){const i=Fu(n,l);jn.setState({resolvedTheme:i})}});function BS(){const n=jn(i=>i.appearance),l=jn(i=>i.setAppearance);return[n,l]}function X0(){const n=jn(i=>i.background),l=jn(i=>i.setBackground);return[n,l]}function HS(){return jn(n=>n.resolvedTheme)}Fu(rf(),$0());const qS="/logos/mist/light/paimon-logo.png";function YS(n,l){return!n||!l?qS:`/logos/${n}/${l}/paimon-logo.png`}function Df(){const[n]=X0(),l=HS();return YS(n,l)}const de=n=>typeof n=="string",Ri=()=>{let n,l;const i=new Promise((u,s)=>{n=u,l=s});return i.resolve=n,i.reject=l,i},hg=n=>n==null?"":String(n),VS=(n,l,i)=>{n.forEach(u=>{l[u]&&(i[u]=l[u])})},GS=/###/g,pg=n=>n&&n.includes("###")?n.replace(GS,"."):n,mg=n=>!n||de(n),Ui=(n,l,i)=>{const u=de(l)?l.split("."):l;let s=0;for(;s<u.length-1;){if(mg(n))return{};const o=pg(u[s]);!n[o]&&i&&(n[o]=new i),Object.prototype.hasOwnProperty.call(n,o)?n=n[o]:n={},++s}return mg(n)?{}:{obj:n,k:pg(u[s])}},gg=(n,l,i)=>{const{obj:u,k:s}=Ui(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=Ui(n,d,Object);for(;h.obj===void 0&&d.length;)o=`${d[d.length-1]}.${o}`,d=d.slice(0,d.length-1),h=Ui(n,d,Object),h!=null&&h.obj&&typeof h.obj[`${h.k}.${o}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${o}`]=i},FS=(n,l,i,u)=>{const{obj:s,k:o}=Ui(n,l,Object);s[o]=s[o]||[],s[o].push(i)},$u=(n,l)=>{const{obj:i,k:u}=Ui(n,l);if(i&&Object.prototype.hasOwnProperty.call(i,u))return i[u]},$S=(n,l,i)=>{const u=$u(n,i);return u!==void 0?u:$u(l,i)},Q0=(n,l,i)=>{for(const u in l)u!=="__proto__"&&u!=="constructor"&&(u in n?de(n[u])||n[u]instanceof String||de(l[u])||l[u]instanceof String?i&&(n[u]=l[u]):Q0(n[u],l[u],i):n[u]=l[u]);return n},Cn=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),KS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},XS=n=>de(n)?n.replace(/[&<>"'\/]/g,l=>KS[l]):n;class QS{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 ZS=[" ",",","?","!",";"],JS=new QS(20),IS=(n,l,i)=>{l=l||"",i=i||"";const u=ZS.filter(d=>!l.includes(d)&&!i.includes(d));if(u.length===0)return!0;const s=JS.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},Vi=n=>n==null?void 0:n.replace(/_/g,"-"),WS={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 Ku{constructor(l,i={}){this.init(l,i)}init(l,i={}){this.prefix=i.prefix||"i18next:",this.logger=l||WS,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=>de(o)?o.replace(/[\r\n\x00-\x1F\x7F]/g," "):o),de(l[0])&&(l[0]=`${u}${this.prefix} ${l[0]}`),this.logger[i](l))}create(l){return new Ku(this.logger,{prefix:`${this.prefix}:${l}:`,...this.options})}clone(l){return l=l||this.options,l.prefix=l.prefix||this.prefix,new Ku(this.logger,l)}}var Wt=new Ku;class fs{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 yg extends fs{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):de(u)&&o?h.push(...u.split(o)):h.push(u)));const p=$u(this.data,h);return!p&&!i&&!u&&l.includes(".")&&(l=h[0],i=h[1],u=h.slice(2).join(".")),p||!d||!de(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),gg(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)(de(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=$u(this.data,h)||{};d.skipCopy||(u=JSON.parse(JSON.stringify(u))),s?Q0(p,u,o):p={...p,...u},gg(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 Z0={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 J0=Symbol("i18next/PATH_KEY");function PS(){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===J0?n:(n.push(s),i=Proxy.revocable(u,l),i.proxy)},Proxy.revocable(Object.create(null),l).proxy}function Ra(n,l){const{[J0]:i}=n(PS()),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=>!de(n)&&typeof n!="boolean"&&typeof n!="number";class Xu extends fs{constructor(l,i={}){super(),VS(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],l,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Wt.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&&!IS(l,u,s);if(d&&!h){const p=l.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:l,namespaces:de(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:de(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=Ra(l,{...this.options,...s})),Array.isArray(l)||(l=[String(l)]),l=l.map(le=>typeof le=="function"?Ra(le,{...this.options,...s}):String(le));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 j=(C==null?void 0:C.usedKey)||h,T=(C==null?void 0:C.exactUsedKey)||h,O=["[object Number]","[object Function]","[object RegExp]"],w=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,U=s.count!==void 0&&!de(s.count),X=Xu.hasDefaultValue(s),Q=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${Q}`]||s[`defaultValue${G}`]||s.defaultValue;let J=N;M&&!N&&X&&(J=q);const ce=Uc(J),P=Object.prototype.toString.apply(J);if(M&&J&&ce&&!O.includes(P)&&!(de(w)&&Array.isArray(J))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const le=this.options.returnedObjectHandler?this.options.returnedObjectHandler(j,J,{...s,ns:p}):`key '${h} (${this.language})' returned an object instead of string.`;return o?(C.res=le,C.usedParams=this.getUsedParamsDetails(s),C):le}if(d){const le=Array.isArray(J),ee=le?[]:{},re=le?T:j;for(const z in J)if(Object.prototype.hasOwnProperty.call(J,z)){const H=`${re}${d}${z}`;X&&!N?ee[z]=this.translate(H,{...s,defaultValue:Uc(q)?q[z]:void 0,joinArrays:!1,ns:p}):ee[z]=this.translate(H,{...s,joinArrays:!1,ns:p}),ee[z]===H&&(ee[z]=J[z])}N=ee}}else if(M&&de(w)&&Array.isArray(N))N=N.join(w),N&&(N=this.extendTranslation(N,l,s,u));else{let le=!1,ee=!1;!this.isValidLookup(N)&&X&&(le=!0,N=q),this.isValidLookup(N)||(ee=!0,N=h);const z=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ee?void 0:N,H=X&&q!==N&&this.options.updateMissing;if(ee||le||H){if(this.logger.log(H?"updateKey":"missingKey",x,m,U&&!H?`${h}${this.pluralResolver.getSuffix(x,s.count,s)}`:h,H?q:N),d){const I=this.resolve(h,{...s,keySeparator:!1});I&&I.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 W=[];const Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(let I=0;I<Z.length;I++)W.push(Z[I]);else this.options.saveMissingTo==="all"?W=this.languageUtils.toResolveHierarchy(s.lng||this.language):W.push(s.lng||this.language);const Y=(I,te,ne)=>{var he;const ue=X&&ne!==N?ne:z;this.options.missingKeyHandler?this.options.missingKeyHandler(I,m,te,ue,H,s):(he=this.backendConnector)!=null&&he.saveMissing&&this.backendConnector.saveMissing(I,m,te,ue,H,s),this.emit("missingKey",I,m,te,N)};this.options.saveMissing&&(this.options.saveMissingPlurals&&U?W.forEach(I=>{const te=this.pluralResolver.getSuffixes(I,s);K&&s[`defaultValue${this.options.pluralSeparator}zero`]&&!te.includes(`${this.options.pluralSeparator}zero`)&&te.push(`${this.options.pluralSeparator}zero`),te.forEach(ne=>{Y([I],h+ne,s[`defaultValue${ne}`]||q)})}):Y(W,h,q))}N=this.extendTranslation(N,l,s,C,u),ee&&N===h&&this.options.appendNamespaceToMissingKey&&(N=`${m}${v}${h}`),(ee||le)&&this.options.parseMissingKeyHandler&&(N=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${v}${h}`:h,le?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=de(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&&!de(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=de(d)?[d]:d;return l!=null&&(h!=null&&h.length)&&u.applyPostProcessor!==!1&&(l=Z0.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 de(l)&&(l=[l]),Array.isArray(l)&&(l=l.map(p=>typeof p=="function"?Ra(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&&!de(i.count),C=E&&!i.ordinal&&i.count===0,N=i.context!==void 0&&(de(i.context)||typeof i.context=="number")&&i.context!=="",j=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);x.forEach(T=>{var O,w;this.isValidLookup(u)||(h=T,!this.checkedLoadedFor[`${j[0]}-${T}`]&&((O=this.utils)!=null&&O.hasLoadedNamespace)&&!((w=this.utils)!=null&&w.hasLoadedNamespace(h))&&(this.checkedLoadedFor[`${j[0]}-${T}`]=!0,this.logger.warn(`key "${s}" for languages "${j.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!!!")),j.forEach(M=>{var Q;if(this.isValidLookup(u))return;d=M;const U=[v];if((Q=this.i18nFormat)!=null&&Q.addLookupKeys)this.i18nFormat.addLookupKeys(U,v,M,T,i);else{let G;E&&(G=this.pluralResolver.getSuffix(M,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 J=`${v}${this.options.contextSeparator||"_"}${i.context}`;U.push(J),E&&(i.ordinal&&G.startsWith(q)&&U.push(J+G.replace(q,this.options.pluralSeparator)),U.push(J+G),C&&U.push(J+K))}}let X;for(;X=U.pop();)this.isValidLookup(u)||(o=X,u=this.getResource(M,T,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&&!de(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 xg{constructor(l){this.options=l,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wt.create("languageUtils")}getScriptPartFromCode(l){if(l=Vi(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=Vi(l),!l||!l.includes("-"))return l;const i=l.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(l){if(de(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)),de(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 de(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))):de(l)&&o(this.formatLanguageCode(l)),u.forEach(d=>{s.includes(d)||o(this.formatLanguageCode(d))}),s}}const vg={zero:0,one:1,two:2,few:3,many:4,other:5},bg={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class e3{constructor(l,i={}){this.languageUtils=l,this.options=i,this.logger=Wt.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(l,i={}){const u=Vi(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!"),bg;if(!l.match(/-|_/))return bg;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)=>vg[s]-vg[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 Sg=(n,l,i,u=".",s=!0)=>{let o=$S(n,l,i);return!o&&s&&de(i)&&(o=uf(n,i,u),o===void 0&&(o=uf(l,i,u))),o},Bc=n=>n.replace(/\$/g,"$$$$");class Eg{constructor(l={}){var i;this.logger=Wt.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:j,nestingOptionsSeparator:T,maxReplaces:O,alwaysFormat:w}=l.interpolation;this.escape=i!==void 0?i:XS,this.escapeValue=u!==void 0?u:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?Cn(o):d||"{{",this.suffix=h?Cn(h):p||"}}",this.formatSeparator=m||",",this.unescapePrefix=v?"":x?Cn(x):"-",this.unescapeSuffix=this.unescapePrefix?"":v?Cn(v):"",this.nestingPrefix=E?Cn(E):C||Cn("$t("),this.nestingSuffix=N?Cn(N):j||Cn(")"),this.nestingOptionsSeparator=T||",",this.maxReplaces=O||1e3,this.alwaysFormat=w!==void 0?w:!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 w=Sg(i,p,N,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,u,{...s,...i,interpolationkey:N}):w}const j=N.split(this.formatSeparator),T=j.shift().trim(),O=j.join(this.formatSeparator).trim();return this.format(Sg(i,p,T,this.options.keySeparator,this.options.ignoreJSONStructure),O,u,{...s,...i,interpolationkey:T})};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 j=o[1].trim();if(d=m(j),d===void 0)if(typeof v=="function"){const O=v(l,o,s);d=de(O)?O:""}else if(s&&Object.prototype.hasOwnProperty.call(s,j))d="";else if(x){d=o[0];continue}else this.logger.warn(`missed to pass in variable ${j} for interpolating ${l}`),d="";else!de(d)&&!this.useRawValueToEscape&&(d=hg(d));const T=N.safeValue(d);if(l=l.replace(o[0],T),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(`${Cn(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(j){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,j),`${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&&!de(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&&!de(o))return o;de(o)||(o=hg(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 t3=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}},Cg=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(Vi(u),s),l[d]=h),h(i)}},n3=n=>(l,i,u)=>n(Vi(i),u)(l);class a3{constructor(l={}){this.logger=Wt.create("formatter"),this.options=l,this.init(l)}init(l,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const u=i.cacheInBuiltFormats?Cg:n3;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()]=Cg(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}=t3(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 l3=(n,l)=>{n.pending[l]!==void 0&&(delete n.pending[l],n.pendingCount--)};class i3 extends fs{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=Wt.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=>{FS(p.loaded,[o],d),l3(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();de(l)&&(l=this.languageUtils.toResolveHierarchy(l)),de(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 j;N.length===5?j=N(l,i,u,s,C):j=N(l,i,u,s),j&&typeof j.then=="function"?j.then(T=>h(null,T)).catch(h):h(null,j)}catch(j){h(j)}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]),de(n[1])&&(l.defaultValue=n[1]),de(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}),Ng=n=>(de(n.ns)&&(n.ns=[n.ns]),de(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),de(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&!n.supportedLngs.includes("cimode")&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),_u=()=>{},r3=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(i=>{typeof n[i]=="function"&&(n[i]=n[i].bind(n))})};class Bi extends fs{constructor(l={},i){if(super(),this.options=Ng(l),this.services={},this.logger=Wt,this.modules={external:[]},r3(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&&(de(l.ns)?l.defaultNS=l.ns:l.ns.includes("translation")||(l.defaultNS=l.ns[0]));const u=Hc();this.options={...u,...this.options,...Ng(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?Wt.init(s(this.modules.logger),this.options):Wt.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=a3;const v=new xg(this.options);this.store=new yg(this.options.resources,this.options);const x=this.services;x.logger=Wt,x.resourceStore=this.store,x.languageUtils=v,x.pluralResolver=new e3(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 Eg(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new i3(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 Xu(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=_u),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=Ri(),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=_u){var o,d;let u=i;const s=de(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=Ri();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=_u),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"&&Z0.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=Ri();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=de(h)?h:h&&h[0],m=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(de(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=Ra(v.keyPrefix,E));const C=this.options.keySeparator||".";let N;return v.keyPrefix&&Array.isArray(h)?N=h.map(j=>(typeof j=="function"&&(j=Ra(j,E)),`${v.keyPrefix}${C}${j}`)):(typeof h=="function"&&(h=Ra(h,E)),N=v.keyPrefix?`${v.keyPrefix}${C}${h}`:h),this.t(N,v)};return de(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=Ri();return this.options.ns?(de(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=Ri();de(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 xg(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 Bi(l,i);return u.createInstance=Bi.createInstance,u}cloneInstance(l={},i=_u){const u=l.forkResourceStore;u&&delete l.forkResourceStore;const s={...this.options,...l,isClone:!0},o=new Bi(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 yg(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 Eg(m)}return o.translator=new Xu(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 it=Bi.createInstance();it.createInstance;it.dir;it.init;it.loadResources;it.reloadResources;it.use;it.changeLanguage;it.getFixedT;it.t;it.exists;it.setDefaultNamespace;it.hasLoadedNamespace;it.loadNamespaces;it.loadLanguages;var qc,Ag;function u3(){return Ag||(Ag=1,qc={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}),qc}var s3=u3();const o3=h0(s3);var c3=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Tg(n){var l={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},i=n.match(/<\/?([^\s]+?)[/\s>]/);if(i&&(l.name=i[1],(o3[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 f3=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,d3=/^\s*$/,h3=Object.create(null);function I0(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(I0,"")+"</"+l.name+">";case"comment":return n+"<!--"+l.comment+"-->"}}var p3={parse:function(n,l){l||(l={}),l.components||(l.components=h3);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(f3,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 j=Tg(p);return o<0?(u.push(j),u):((v=s[o]).children.push(j),u)}if(x&&(o++,(i=Tg(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 T=n.indexOf("<",C),O=n.slice(C,T===-1?void 0:T);d3.test(O)&&(O=" "),(T>-1&&o+v.length>=0||O!==" ")&&v.push({type:"text",content:O})}}),u},stringify:function(n){return n.reduce(function(l,i){return l+I0("",i)},"")}};const Bu=(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)},jg={},Gi=(n,l,i,u)=>{vt(i)&&jg[i]||(vt(i)&&(jg[i]=new Date),Bu(n,l,i,u))},W0=(n,l)=>()=>{if(n.isInitialized)l();else{const i=()=>{setTimeout(()=>{n.off("initialized",i)},0),l()};n.on("initialized",i)}},sf=(n,l,i)=>{n.loadNamespaces(l,W0(n,i))},wg=(n,l,i,u)=>{if(vt(i)&&(i=[i]),n.options.preload&&n.options.preload.indexOf(l)>-1)return sf(n,i,u);i.forEach(s=>{n.options.ns.indexOf(s)<0&&n.options.ns.push(s)}),n.loadLanguages(l,W0(n,u))},m3=(n,l,i={})=>!l.languages||!l.languages.length?(Gi(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",An=n=>typeof n=="object"&&n!==null,g3=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,y3={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},x3=n=>y3[n],P0=n=>n.replace(g3,x3);let of={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:P0,transDefaultProps:void 0};const v3=(n={})=>{of={...of,...n}},kf=()=>of;let ey;const b3=n=>{ey=n},Uf=()=>ey,Hu=(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},zi=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?la(l):l},S3=n=>Array.isArray(n)&&n.every(b.isValidElement),la=n=>Array.isArray(n)?n:[n],E3=(n,l)=>{const i={...l};return i.props={...l.props,...n.props},i},C3=n=>{const l={};if(!n)return l;const i=u=>{la(u).forEach(o=>{vt(o)||(Hu(o)?i(zi(o)):An(o)&&!b.isValidElement(o)&&Object.assign(l,o))})};return i(n),l},cf=(n,l,i,u)=>{if(!n)return"";let s="";const o=la(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 j=vt(C)?C:cf(C,l,i,u);s+=`<${v}>${j}</${v}>`;return}const N=cf(C,l,i,u);s+=`<${p}>${N}</${p}>`;return}if(h===null){Bu(i,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:u});return}if(An(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}Bu(i,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:u,child:h});return}Bu(i,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:u,child:h})}),s},N3=(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},A3=(n,l,i,u,s,o,d)=>{if(i==="")return[];const h=s.transKeepBasicHtmlNodesFor||[],p=i&&new RegExp(h.map(w=>`<${w}`).join("|")).test(i);if(!n&&!l&&!p&&!d)return[i];const m=l??{},v=w=>{la(w).forEach(U=>{vt(U)||(Hu(U)?v(zi(U)):An(U)&&!b.isValidElement(U)&&Object.assign(m,U))})};v(n);const x=N3(i,h,m),E=p3.parse(`<0>${x}</0>`),C={...m,...o},N=(w,M,U)=>{var G;const X=zi(w),Q=T(X,M.children,U);return S3(X)&&Q.length===0||(G=w.props)!=null&&G.i18nIsDynamicList?X:Q},j=(w,M,U,X,Q)=>{w.dummy?(w.children=M,U.push(b.cloneElement(w,{key:X},Q?void 0:M))):U.push(...b.Children.map([w],G=>{var q;if(G.type===b.Fragment||((q=G.props)==null?void 0:q.i18nIsDynamicList)!==void 0){const J={key:X};return G&&G.props&&Object.keys(G.props).forEach(ce=>{ce==="children"||ce==="i18nIsDynamicList"||(J[ce]=G.props[ce])}),b.createElement(G.type,J,Q?null:M)}const K={key:X};return G&&G.props&&Object.keys(G.props).forEach(J=>{J==="ref"||J==="children"||(K[J]=G.props[J])}),b.cloneElement(G,K,Q?null:M)}))},T=(w,M,U)=>{const X=la(w),Q=la(M),G={};return Q.reduce((K,q,J)=>{var P,le;const ce=((le=(P=q.children)==null?void 0:P[0])==null?void 0:le.content)&&u.services.interpolator.interpolate(q.children[0].content,C,u.language);if(q.type==="tag"){let ee=X[parseInt(q.name,10)];!ee&&l&&(ee=l[q.name]),U.length===1&&!ee&&(ee=U[0][q.name]),ee||(ee={});const re={...q.attrs};d&&Object.keys(re).forEach(I=>{const te=re[I];vt(te)&&(re[I]=P0(te))});const z=Object.keys(re).length!==0?E3({props:re},ee):ee,H=b.isValidElement(z),W=H&&Hu(q,!0)&&!q.voidElement,Z=p&&An(z)&&z.dummy&&!H,Y=An(l)&&Object.hasOwnProperty.call(l,q.name);if(vt(z)){const I=u.services.interpolator.interpolate(z,C,u.language);K.push(I)}else if(Hu(z)||W){const I=N(z,q,U);j(z,I,K,J)}else if(Z){const I=T(X,q.children,U);j(z,I,K,J)}else if(Number.isNaN(parseFloat(q.name)))if(Y){const I=N(z,q,U);j(z,I,K,J,q.voidElement)}else if(s.transSupportBasicHtmlNodes&&h.indexOf(q.name)>-1)if(q.voidElement)K.push(b.createElement(q.name,{key:`${q.name}-${J}`}));else{const I=G[q.name]||0;G[q.name]=I+1;let te,ne=0;for(let Ue=0;Ue<X.length;Ue+=1){const ut=X[Ue];if(b.isValidElement(ut)&&ut.type===q.name){if(ne===I){te=ut;break}ne+=1}}const ue=te?la(zi(te)):X,he=T(ue,q.children,U);K.push(b.createElement(q.name,{key:`${q.name}-${J}`},he))}else if(q.voidElement)K.push(`<${q.name} />`);else{const I=T(X,q.children,U);K.push(`<${q.name}>${I}</${q.name}>`)}else if(An(z)&&!H){const I=q.children[0]?ce:null;I&&K.push(I)}else j(z,ce,K,J,q.children.length!==1||!ce)}else if(q.type==="text"){const ee=s.transWrapTextNodes,re=typeof s.unescape=="function"?s.unescape:kf().unescape,z=d?re(u.services.interpolator.interpolate(q.content,C,u.language)):u.services.interpolator.interpolate(q.content,C,u.language);ee?K.push(b.createElement(ee,{key:`${q.name}-${J}`},z)):K.push(z)}return K},[])},O=T([{dummy:!0,children:n||[]}],E,la(n||[]));return zi(O[0])},ty=(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})},T3=(n,l)=>n.map((i,u)=>ty(i,u,l)),j3=(n,l)=>{const i={};return Object.keys(n).forEach(u=>{Object.assign(i,{[u]:ty(n[u],u,l)})}),i},w3=(n,l,i,u)=>n?Array.isArray(n)?T3(n,l):An(n)?j3(n,l):(Gi(i,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:u}),null):null,O3=n=>!An(n)||Array.isArray(n)?!1:Object.keys(n).reduce((l,i)=>l&&Number.isNaN(Number.parseFloat(i)),!0);function R3({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 Y,I,te,ne,ue,he;const N=v||Uf();if(!N)return Gi(N,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:u}),n;const j=x||N.t.bind(N)||(Ue=>Ue),T={...kf(),...(Y=N.options)==null?void 0:Y.react};let O=m||j.ns||((I=N.options)==null?void 0:I.defaultNS);O=vt(O)?[O]:O||["translation"];const{transDefaultProps:w}=T,M=w!=null&&w.tOptions?{...w.tOptions,...o}:o,U=E??(w==null?void 0:w.shouldUnescape),X=w!=null&&w.values?{...w.values,...d}:d,Q=w!=null&&w.components?{...w.components,...p}:p,G=cf(n,T,N,u),K=h||(M==null?void 0:M.defaultValue)||G||T.transEmptyNodeValue||(typeof u=="function"?Ra(u):u),{hashTransKey:q}=T,J=u||(q?q(G||K):G||K);(ne=(te=N.options)==null?void 0:te.interpolation)!=null&&ne.defaultVariables?d=X&&Object.keys(X).length>0?{...X,...N.options.interpolation.defaultVariables}:{...N.options.interpolation.defaultVariables}:d=X;const ce=C3(n);ce&&typeof ce.count=="number"&&l===void 0&&(l=ce.count);const P=d||l!==void 0&&!((he=(ue=N.options)==null?void 0:ue.interpolation)!=null&&he.alwaysFormat)||!n?M.interpolation:{interpolation:{...M.interpolation,prefix:"#$?",suffix:"?$#"}},le={...M,context:s||M.context,count:l,...d,...P,defaultValue:K,ns:O};let ee=J?j(J,le):K;ee===J&&K&&(ee=K);const re=w3(Q,ee,N,u);let z=re||n,H=null;O3(re)&&(H=re,z=n);const W=A3(z,H,ee,N,T,le,U),Z=i??T.defaultTransParent;return Z?b.createElement(Z,C,W):W}const _3={type:"3rdParty",init(n){v3(n.options.react),b3(n)}},ny=b.createContext();class M3{constructor(){this.usedNamespaces={}}addUsedNamespaces(l){l.forEach(i=>{this.usedNamespaces[i]||(this.usedNamespaces[i]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function z3({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;const{i18n:N,defaultNS:j}=b.useContext(ny)||{},T=v||N||Uf(),O=x||(T==null?void 0:T.t.bind(T));return R3({children:n,count:l,parent:i,i18nKey:u,context:s,tOptions:o,values:d,defaults:h,components:p,ns:m||(O==null?void 0:O.ns)||j||((w=T==null?void 0:T.options)==null?void 0:w.defaultNS),i18n:T,t:x,shouldUnescape:E,...C})}var Yc={exports:{}},Vc={};/**
210
- * @license React
211
- * use-sync-external-store-shim.production.js
212
- *
213
- * Copyright (c) Meta Platforms, Inc. and affiliates.
214
- *
215
- * This source code is licensed under the MIT license found in the
216
- * LICENSE file in the root directory of this source tree.
217
- */var Og;function L3(){if(Og)return Vc;Og=1;var n=Cf();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}}),j=N[0].inst,T=N[1];return o(function(){j.value=C,j.getSnapshot=E,p(j)&&T({inst:j})},[x,C,E]),s(function(){return p(j)&&T({inst:j}),x(function(){p(j)&&T({inst:j})})},[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 Vc.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,Vc}var Rg;function D3(){return Rg||(Rg=1,Yc.exports=L3()),Yc.exports}var k3=D3();const U3=(n,l)=>{if(vt(l))return l;if(An(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},B3={t:U3,ready:!1},H3=()=>()=>{},qe=(n,l={})=>{var q,J,ce;const{i18n:i}=l,{i18n:u,defaultNS:s}=b.useContext(ny)||{},o=i||u||Uf();o&&!o.reportNamespaces&&(o.reportNamespaces=new M3),o||Gi(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const d=b.useMemo(()=>{var P;return{...kf(),...(P=o==null?void 0:o.options)==null?void 0:P.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);(ce=(J=o==null?void 0:o.reportNamespaces)==null?void 0:J.addUsedNamespaces)==null||ce.call(J,x);const E=b.useRef(0),C=b.useCallback(P=>{if(!o)return H3;const{bindI18n:le,bindI18nStore:ee}=d,re=()=>{E.current+=1,P()};return le&&o.on(le,re),ee&&o.store.on(ee,re),()=>{le&&le.split(" ").forEach(z=>o.off(z,re)),ee&&ee.split(" ").forEach(z=>o.store.off(z,re))}},[o,d]),N=b.useRef(),j=b.useCallback(()=>{if(!o)return B3;const P=!!(o.isInitialized||o.initializedStoreOnce)&&x.every(W=>m3(W,o,d)),le=l.lng||o.language,ee=E.current,re=N.current;if(re&&re.ready===P&&re.lng===le&&re.keyPrefix===p&&re.revision===ee)return re;const H={t:o.getFixedT(le,d.nsMode==="fallback"?x:x[0],p,{scopeNs:x}),ready:P,lng:le,keyPrefix:p,revision:ee};return N.current=H,H},[o,x,p,d,l.lng]),[T,O]=b.useState(0),{t:w,ready:M}=k3.useSyncExternalStore(C,j,j);b.useEffect(()=>{if(o&&!M&&!h){const P=()=>O(le=>le+1);l.lng?wg(o,l.lng,x,P):sf(o,x,P)}},[o,l.lng,x,M,h,T]);const U=o||{},X=b.useRef(null),Q=b.useRef(),G=P=>{const le=Object.getOwnPropertyDescriptors(P);le.__original&&delete le.__original;const ee=Object.create(Object.getPrototypeOf(P),le);if(!Object.prototype.hasOwnProperty.call(ee,"__original"))try{Object.defineProperty(ee,"__original",{value:P,writable:!1,enumerable:!1,configurable:!1})}catch{}return ee},K=b.useMemo(()=>{const P=U,le=P==null?void 0:P.language;let ee=P;P&&(X.current&&X.current.__original===P?Q.current!==le?(ee=G(P),X.current=ee,Q.current=le):ee=X.current:(ee=G(P),X.current=ee,Q.current=le));const re=!M&&!h?(...H)=>(Gi(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."),w(...H)):w,z=[re,ee,M];return z.t=re,z.i18n=ee,z.ready=M,z},[w,U,M,U.resolvedLanguage,U.language,U.languages]);if(o&&h&&!M)throw new Promise(P=>{const le=()=>P();l.lng?wg(o,l.lng,x,le):sf(o,x,le)});return K};function q3(){const{t:n}=qe(),l=Ht(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 ay=p0();function Y3(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 V3({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=Y3(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]),ay.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 G3({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 F3=500;function _g({instances:n,selectedId:l,onSelect:i,onShutdown:u,onNewInstance:s}){const{t:o}=qe(),d=ss(),h=Df(),[p,m]=b.useState(null),v=b.useRef(null),x=b.useRef(!1),E=b.useCallback((Q,G)=>{Q.preventDefault(),Q.stopPropagation(),m({position:{x:Q.clientX,y:Q.clientY},instanceId:G})},[]),C=b.useCallback((Q,G)=>{x.current=!1;const K=Q.touches[0],q={x:K.clientX,y:K.clientY};v.current=setTimeout(()=>{var J;x.current=!0,(J=navigator.vibrate)==null||J.call(navigator,10),m({position:q,instanceId:G})},F3)},[]),N=b.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]),j=b.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]),T=b.useCallback(()=>m(null),[]),[O,w]=b.useState(null),M=b.useRef(null);b.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]);const U=b.useCallback(Q=>{navigator.clipboard.writeText(Q).then(()=>{w(Q),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>w(null),1500)},()=>{})},[]),X=b.useMemo(()=>{const Q=new Map;for(const G of n){const K=Q.get(G.edgeId);K?K.push(G):Q.set(G.edgeId,[G])}return[...Q.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(F0,{size:16})}),y.jsx(q3,{})]})]}),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(([Q,G],K)=>y.jsxs("div",{children:[y.jsxs("button",{type:"button",onClick:()=>U(Q),title:Q,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:Q}),y.jsx("span",{className:"shrink-0 opacity-60",children:O===Q?y.jsx(er,{size:10,className:"text-green-500"}):y.jsx(V0,{size:10})})]}),y.jsx("ul",{className:"space-y-0.5 max-md:space-y-1",children:G.map(q=>{var J;return y.jsx("li",{children:y.jsxs("button",{onClick:()=>{x.current||i(q.id)},onContextMenu:ce=>E(ce,q.id),onTouchStart:ce=>C(ce,q.id),onTouchEnd:N,onTouchMove:j,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}`}),((J=q.contextUsage)==null?void 0:J.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)})})]},Q))})}),p&&y.jsx(V3,{position:p.position,onClose:T,children:y.jsx(G3,{icon:y.jsx(SS,{size:14}),label:o("sidebar.shutdown"),danger:!0,onClick:()=>{u(p.instanceId),T()}})}),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(jS,{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 ff(n){const l=n.id??n.__renderKey;if(!l)throw new Error(`SessionEntry missing stable render key: type=${n.type}`);return l}const Bf=Object.freeze({text:"",images:[]}),Qu=cs((n,l)=>({drafts:new Map,setDraft:(i,u)=>{n(s=>{const o=s.drafts.get(i)??Bf,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}})}})),$3=n=>n==="streaming",Fi=n=>n!==void 0&&n!=="idle",ct={eof:null,asterisk:42,underscore:95},Zu={characterGroupPunctuation:2,characterGroupWhitespace:1},aa={emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",strong:"strong",strongSequence:"strongSequence",strongText:"strongText"},K3=161,X3=1114109,Q3=[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],Z3=12288,J3=65510,I3=[12288,12288,65281,65376,65504,65510],W3=8361,P3=65518,eE=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],tE=32,nE=10630,aE=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],lE=4352,iE=262141,ly=[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],tr=(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},Mg=19968,[rE,uE]=sE(ly);function sE(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(Mg>=s&&Mg<=o)return[s,o];o-s>i-l&&(l=s,i=o)}return[l,i]}const oE=n=>n<K3||n>X3?!1:tr(Q3,n),cE=n=>n<Z3||n>J3?!1:tr(I3,n),fE=n=>n<W3||n>P3?!1:tr(eE,n),dE=n=>n<tE||n>nE?!1:tr(aE,n),hE=n=>n>=rE&&n<=uE?!0:n<lE||n>iE?!1:tr(ly,n);function pE(n){return oE(n)?"ambiguous":cE(n)?"fullwidth":fE(n)?"halfwidth":dE(n)?"narrow":hE(n)?"wide":"neutral"}function mE(n){if(!Number.isSafeInteger(n))throw new TypeError(`Expected a code point, got \`${typeof n}\`.`)}function gE(n){return mE(n),pE(n)}function yE(n){return new RegExp("^\\p{Emoji_Presentation}","u").test(String.fromCodePoint(n))}function xE(n){if(!n||n<4352)return!1;switch(gE(n)){case"fullwidth":case"halfwidth":return!0;case"wide":return!yE(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 vE(n,l){return l!==65025||!n||n<8216?!1:n===8216||n===8217||n===8220||n===8221}function bE(n){return n!==null&&n>=65024&&n<=65038}const SE=iy(new RegExp("\\p{P}|\\p{S}","u")),EE=iy(/\s/);function iy(n){return l;function l(i){return i!==null&&i>-1&&n.test(String.fromCodePoint(i))}}function Pt(n){return!!(n&Zu.characterGroupWhitespace)}function $i(n){return(n&qt.cjkPunctuation)===Zu.characterGroupPunctuation}function ry(n){return!!(n&qt.cjk)}function Ju(n){return!!(n&qt.cjkOrIvs)}function Hf(n){return n===qt.nonEmojiGeneralUseVS}function Iu(n){return!!(n&qt.spaceOrPunctuation)}let qt;(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})(qt||(qt={}));function ra(n){if(n===ct.eof||Dv(n)||EE(n))return Zu.characterGroupWhitespace;let l=0;if(n>=4352){if(bE(n))return qt.nonEmojiGeneralUseVS;switch(xE(n)){case null:return qt.ivs;case!0:l|=qt.cjk;break}}return SE(n)&&(l|=Zu.characterGroupPunctuation),l}function uy(n,l,i){if(!Hf(n))return n;const u=l(),s=ra(u);return!u||Pt(s)?n:vE(u,i)?qt.cjkPunctuation:CE(s)}function CE(n){return n&~qt.ivs}function NE(n){return!!(n&&n>=55296&&n<=56319)}function AE(n){return!!(n&&n>=56320&&n<=57343)}function TE(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 jE(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 wE=class{constructor(n,l,i){Xm(this,"cachedValue");this.previousCode=n,this.nowPoint=l,this.sliceSerialize=i}value(){return this.cachedValue===void 0&&(this.cachedValue=jE(this.previousCode,this.nowPoint,this.sliceSerialize)),this.cachedValue}};function OE(n,l,i){const u=i({start:l,end:{...l,_bufferIndex:l._bufferIndex+2}}).codePointAt(0);return u&&u>=65536?u:n}const Gc={name:"attention",resolveAll:RE,tokenize:_E};function RE(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};zg(x,-p),zg(E,p),d={type:p>1?aa.strongSequence:aa.emphasisSequence,start:x,end:{...n[u][1].end}},h={type:p>1?aa.strongSequence:aa.emphasisSequence,start:{...n[i][1].start},end:E},o={type:p>1?aa.strongText:aa.emphasisText,start:{...n[u][1].end},end:{...n[i][1].start}},s={type:p>1?aa.strong:aa.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=ji(m,[["enter",n[u][1],l],["exit",n[u][1],l]])),m=ji(m,[["enter",s,l],["enter",d,l],["exit",d,l],["enter",o,l]]),kv(l.parser.constructs.insideSpan.null),m=ji(m,Uv(l.parser.constructs.insideSpan.null,n.slice(u+1,i),l)),m=ji(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=ji(m,[["enter",n[i][1],l],["exit",n[i][1],l]])):v=0,Bv(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 _E(n,l){const i=this.parser.constructs.attentionMarkers.null,{now:u,sliceSerialize:s,previous:o}=this,d=AE(o)?TE(o,u(),s):o,h=ra(d),p=new wE(d,u(),s),m=uy(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"),j=ra(NE(C)?OE(C,u(),s):C),T=$i(m),O=T||Pt(m),w=$i(j),M=w||Pt(j),U=Ju(m),X=!M||w&&(O||U)||i.includes(C),Q=!O||T&&(M||ry(j))||i.includes(d);return N._open=!!(v===ct.asterisk?X:X&&(Iu(m)||!Q)),N._close=!!(v===ct.asterisk?Q:Q&&(Iu(j)||!X)),l(C)}}function zg(n,l){n.column+=l,n.offset+=l,n._bufferIndex+=l}function ME(){return{text:{[ct.asterisk]:Gc,[ct.underscore]:Gc},insideSpan:{null:[Gc]}}}function zE(){const n=this.data();(n.micromarkExtensions||(n.micromarkExtensions=[])).push(ME())}const LE=";".codePointAt(0)??ct.eof,DE="&".codePointAt(0)??ct.eof;function kE(){return{handlers:{emphasis:sy,strong:oy,text:UE}}}sy.peek=cy;oy.peek=fy;function sy(n,l,i,u){return dy(n,l,i,u,cy(n,l,i),1)}function oy(n,l,i,u){return dy(n,l,i,u,fy(n,l,i),2)}function cy(n,l,i){return i.options.emphasis||"*"}function fy(n,l,i){return i.options.strong||"*"}function dy(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=qE(n,l,i,u.before),E=YE(n,l,i,u.after),C=Lg(x,Wu(v),s,"open");C.inside&&v&&(v=KE(v));const N=Lg({current:hf(v),previous:df(v)},E,s,"close");N.inside&&v&&(v=XE(v));const j=p.move(d);h();const T=N.outside&&$E(l,i);return i.attentionEncodeSurroundingInfo={after:N.outside&&!T,before:C.outside},i.cjkFriendlyEncodeAfterSupplementaryText=T,m+v+j}function UE(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`${Yf(o.codePointAt(0)??ct.eof)}${i.safe(d,{...u,before:";"})}`}function Lg(n,l,i,u){const s=qf(n),o=ra(l);if(!Ju(s)&&!Ju(o))return u==="open"?Dg(s,o,i):Dg(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?kg:n:v.inside?kg:n,E=u==="open"?v.inside?Ug:l:v.outside?Ug:l;if(u==="open"?BE(i,x,E):HE(i,x,E))return v}return m}function Dg(n,l,i){return Fc(n)?Fc(l)?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:Pt(l)?{inside:!0,outside:!0}:{inside:!1,outside:!0}:Pt(n)?Fc(l)?{inside:!1,outside:!1}:Pt(l)?{inside:!0,outside:!0}:{inside:!1,outside:!1}:Pt(l)?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function BE(n,l,i){const u=qf(l),{close:s,open:o}=hy(u,ra(i));return n==="_"?o&&(Iu(u)||!s):o}function HE(n,l,i){const u=ra(i),{close:s,open:o}=hy(qf(l),u);return n==="_"?s&&(Iu(u)||!o):s}function hy(n,l){const i=$i(n),u=i||Pt(n),s=$i(l),o=s||Pt(l);return{open:!o||s&&(u||Ju(n)),close:!u||i&&(o||ry(l))}}function Fc(n){return!Pt(n)&&!$i(n)}function qf(n){const l=ra(n.current);return n.current===null||!Hf(l)?l:uy(l,()=>n.previous,n.current)}function qE(n,l,i,u){let s=hf(u),o=df(u);if(VE(s)||FE(s,o)){const d=py(n,l,i,-1);d&&(s=hf(d),o=df(d))}return{current:s,previous:o}}function YE(n,l,i,u){const s=Wu(u);if(!GE(s))return s;const o=py(n,l,i,1);return o?Wu(o):s}function VE(n){return n!==null&&56320<=n&&n<=57343}function GE(n){return n!==null&&55296<=n&&n<=56319}function FE(n,l){return Hf(ra(n))&&(l===null||l===ct.eof)}function py(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 my(h)||void 0}function $E(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"&&(Wu(u.value)??0)>65535}function my(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(my).join(""):""}function Yf(n){return`&#x${(n??0).toString(16).toUpperCase()};`}function KE(n){const[l=""]=[...n];return Yf(l.codePointAt(0)??ct.eof)+n.slice(l.length)}function XE(n){const l=[...n],i=l.pop();return`${l.join("")}${Yf((i==null?void 0:i.codePointAt(0))??ct.eof)}`}function df(n){var i;const l=[...n];return l.pop(),((i=l.at(-1))==null?void 0:i.codePointAt(0))??ct.eof}function Wu(n){return n.codePointAt(0)??ct.eof}function hf(n){var l;return((l=[...n].at(-1))==null?void 0:l.codePointAt(0))??ct.eof}const kg={current:LE,previous:ct.eof},Ug=DE;function QE(){const n=this.data();(n.toMarkdownExtensions||(n.toMarkdownExtensions=[])).push(kE())}function ZE(){zE.call(this),QE.call(this)}var JE=ZE,$c={exports:{}},Bg;function IE(){return Bg||(Bg=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,j=!1,T,O=function(){return h[d++]},w=function(){for(var M="";/\d/.test(o[p]);)M+=o[p++],x=o[p];return M.length>0?parseInt(M):null};p<m;++p)if(x=o[p],E)switch(E=!1,x=="."?(j=!1,x=o[++p]):x=="0"&&o[p+1]=="."?(j=!0,p+=2,x=o[p]):j=!0,T=w(),x){case"b":v+=parseInt(O(),10).toString(2);break;case"c":C=O(),typeof C=="string"||C instanceof String?v+=C:v+=String.fromCharCode(parseInt(C,10));break;case"d":v+=parseInt(O(),10);break;case"f":N=String(parseFloat(O()).toFixed(T||6)),v+=j?N:N.replace(/^0/,"");break;case"j":v+=JSON.stringify(O());break;case"o":v+="0"+parseInt(O(),10).toString(8);break;case"s":v+=O();break;case"x":v+="0x"+parseInt(O(),10).toString(16);break;case"X":v+="0x"+parseInt(O(),10).toString(16).toUpperCase();break;default:v+=x;break}else x==="%"?E=!0:v+=x;return v}})()})($c)),$c.exports}var WE=IE();const PE=h0(WE),Mu=Object.assign(wa(Error),{eval:wa(EvalError),range:wa(RangeError),reference:wa(ReferenceError),syntax:wa(SyntaxError),type:wa(TypeError),uri:wa(URIError)});function wa(n){return l.displayName=n.displayName||n.name,l;function l(i,...u){const s=i&&PE(i,...u);return new n(s)}}const zu={}.hasOwnProperty,Hg={yaml:"-",toml:"+"};function Vf(n){const l=[];let i=-1;const u=Array.isArray(n)?n:n?[n]:["yaml"];for(;++i<u.length;)l[i]=eC(u[i]);return l}function eC(n){let l=n;if(typeof l=="string"){if(!zu.call(Hg,l))throw Mu("Missing matter definition for `%s`",l);l={type:l,marker:Hg[l]}}else if(typeof l!="object")throw Mu("Expected matter to be an object, not `%j`",l);if(!zu.call(l,"type"))throw Mu("Missing `type` in matter `%j`",l);if(!zu.call(l,"fence")&&!zu.call(l,"marker"))throw Mu("Missing `marker` or `fence` in matter `%j`",l);return l}function tC(n){const l=Vf(n),i={};let u=-1;for(;++u<l.length;){const s=l[u],o=pf(s,"open").charCodeAt(0),d=nC(s),h=i[o];Array.isArray(h)?h.push(d):i[o]=[d]}return{flow:i}}function nC(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 j;function j(G){const K=N.now();return K.column===1&&(K.line===1||l)&&(h=pf(n,"open"),p=0,G===h.charCodeAt(p))?(x.enter(i),x.enter(u),x.enter(s),T(G)):C(G)}function T(G){return p===h.length?(x.exit(s),wu(G)?(x.enter("whitespace"),O(G)):w(G)):G===h.charCodeAt(p++)?(x.consume(G),T):C(G)}function O(G){return wu(G)?(x.consume(G),O):(x.exit("whitespace"),w(G))}function w(G){return Ou(G)?(x.exit(u),x.enter("lineEnding"),x.consume(G),x.exit("lineEnding"),h=pf(n,"close"),p=0,x.attempt(d,Q,M)):C(G)}function M(G){return G===null||Ou(G)?X(G):(x.enter(o),U(G))}function U(G){return G===null||Ou(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,Q,M))}function Q(G){return x.exit(i),E(G)}}function v(x,E,C){let N=0;return j;function j(M){return M===h.charCodeAt(N)?(x.enter(u),x.enter(s),T(M)):C(M)}function T(M){return N===h.length?(x.exit(s),wu(M)?(x.enter("whitespace"),O(M)):w(M)):M===h.charCodeAt(N++)?(x.consume(M),T):C(M)}function O(M){return wu(M)?(x.consume(M),O):(x.exit("whitespace"),w(M))}function w(M){return M===null||Ou(M)?(x.exit(u),E(M)):C(M)}}}function pf(n,l){return n.marker?qg(n.marker,l).repeat(3):qg(n.fence,l)}function qg(n,l){return typeof n=="string"?n:n[l]}function aC(n){const l=Vf(n),i={},u={};let s=-1;for(;++s<l.length;){const o=l[s];i[o.type]=lC(o),u[o.type]=iC,u[o.type+"Value"]=rC}return{enter:i,exit:u}}function lC(n){return l;function l(i){this.enter({type:n.type,value:""},i),this.buffer()}}function iC(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 rC(n){this.config.enter.data.call(this,n),this.config.exit.data.call(this,n)}function uC(n){const l=[],i={},u=Vf(n);let s=-1;for(;++s<u.length;){const o=u[s];i[o.type]=sC(o);const d=mf(o,"open");l.push({atBreak:!0,character:d.charAt(0),after:Hv(d.charAt(1))})}return{unsafe:l,handlers:i}}function sC(n){const l=mf(n,"open"),i=mf(n,"close");return u;function u(s){return l+(s.value?`
218
- `+s.value:"")+`
219
- `+i}}function mf(n,l){return n.marker?Yg(n.marker,l).repeat(3):Yg(n.fence,l)}function Yg(n,l){return typeof n=="string"?n:n[l]}const oC="yaml";function cC(n){const l=this,i=n||oC,u=l.data(),s=u.micromarkExtensions||(u.micromarkExtensions=[]),o=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),d=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);s.push(tC(i)),o.push(aC(i)),d.push(uC(i))}/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function gy(n){return typeof n>"u"||n===null}function fC(n){return typeof n=="object"&&n!==null}function dC(n){return Array.isArray(n)?n:gy(n)?[]:[n]}function hC(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 pC(n,l){var i="",u;for(u=0;u<l;u+=1)i+=n;return i}function mC(n){return n===0&&Number.NEGATIVE_INFINITY===1/n}var gC=gy,yC=fC,xC=dC,vC=pC,bC=mC,SC=hC,Ze={isNothing:gC,isObject:yC,toArray:xC,repeat:vC,isNegativeZero:bC,extend:SC};function yy(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+=`
220
-
221
- `+n.mark.snippet),u+" "+i):u}function Ki(n,l){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=l,this.message=yy(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ki.prototype=Object.create(Error.prototype);Ki.prototype.constructor=Ki;Ki.prototype.toString=function(l){return this.name+": "+yy(this,l)};var ot=Ki;function Kc(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 Xc(n,l){return Ze.repeat(" ",l-n.length)+n}function EC(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=Kc(n.buffer,u[d-p],s[d-p],n.position-(u[d]-u[d-p]),x),h=Ze.repeat(" ",l.indent)+Xc((n.line-p+1).toString(),v)+" | "+m.str+`
222
- `+h;for(m=Kc(n.buffer,u[d],s[d],n.position,x),h+=Ze.repeat(" ",l.indent)+Xc((n.line+1).toString(),v)+" | "+m.str+`
223
- `,h+=Ze.repeat("-",l.indent+v+3+m.pos)+`^
224
- `,p=1;p<=l.linesAfter&&!(d+p>=s.length);p++)m=Kc(n.buffer,u[d+p],s[d+p],n.position-(u[d]-u[d+p]),x),h+=Ze.repeat(" ",l.indent)+Xc((n.line+p+1).toString(),v)+" | "+m.str+`
225
- `;return h.replace(/\n$/,"")}var CC=EC,NC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],AC=["scalar","sequence","mapping"];function TC(n){var l={};return n!==null&&Object.keys(n).forEach(function(i){n[i].forEach(function(u){l[String(u)]=i})}),l}function jC(n,l){if(l=l||{},Object.keys(l).forEach(function(i){if(NC.indexOf(i)===-1)throw new ot('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=TC(l.styleAliases||null),AC.indexOf(this.kind)===-1)throw new ot('Unknown kind "'+this.kind+'" is specified for "'+n+'" YAML type.')}var at=jC;function Vg(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 wC(){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 gf(n){return this.extend(n)}gf.prototype.extend=function(l){var i=[],u=[];if(l instanceof at)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 ot("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(o){if(!(o instanceof at))throw new ot("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new ot("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 ot("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 at))throw new ot("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(gf.prototype);return s.implicit=(this.implicit||[]).concat(i),s.explicit=(this.explicit||[]).concat(u),s.compiledImplicit=Vg(s,"implicit"),s.compiledExplicit=Vg(s,"explicit"),s.compiledTypeMap=wC(s.compiledImplicit,s.compiledExplicit),s};var xy=gf,vy=new at("tag:yaml.org,2002:str",{kind:"scalar",construct:function(n){return n!==null?n:""}}),by=new at("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(n){return n!==null?n:[]}}),Sy=new at("tag:yaml.org,2002:map",{kind:"mapping",construct:function(n){return n!==null?n:{}}}),Ey=new xy({explicit:[vy,by,Sy]});function OC(n){if(n===null)return!0;var l=n.length;return l===1&&n==="~"||l===4&&(n==="null"||n==="Null"||n==="NULL")}function RC(){return null}function _C(n){return n===null}var Cy=new at("tag:yaml.org,2002:null",{kind:"scalar",resolve:OC,construct:RC,predicate:_C,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function MC(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 zC(n){return n==="true"||n==="True"||n==="TRUE"}function LC(n){return Object.prototype.toString.call(n)==="[object Boolean]"}var Ny=new at("tag:yaml.org,2002:bool",{kind:"scalar",resolve:MC,construct:zC,predicate:LC,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 DC(n){return 48<=n&&n<=57||65<=n&&n<=70||97<=n&&n<=102}function kC(n){return 48<=n&&n<=55}function UC(n){return 48<=n&&n<=57}function BC(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(!DC(n.charCodeAt(i)))return!1;u=!0}return u&&s!=="_"}if(s==="o"){for(i++;i<l;i++)if(s=n[i],s!=="_"){if(!kC(n.charCodeAt(i)))return!1;u=!0}return u&&s!=="_"}}if(s==="_")return!1;for(;i<l;i++)if(s=n[i],s!=="_"){if(!UC(n.charCodeAt(i)))return!1;u=!0}return!(!u||s==="_")}function HC(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 qC(n){return Object.prototype.toString.call(n)==="[object Number]"&&n%1===0&&!Ze.isNegativeZero(n)}var Ay=new at("tag:yaml.org,2002:int",{kind:"scalar",resolve:BC,construct:HC,predicate:qC,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"]}}),YC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function VC(n){return!(n===null||!YC.test(n)||n[n.length-1]==="_")}function GC(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 FC=/^[-+]?[0-9]+e/;function $C(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(Ze.isNegativeZero(n))return"-0.0";return i=n.toString(10),FC.test(i)?i.replace("e",".e"):i}function KC(n){return Object.prototype.toString.call(n)==="[object Number]"&&(n%1!==0||Ze.isNegativeZero(n))}var Ty=new at("tag:yaml.org,2002:float",{kind:"scalar",resolve:VC,construct:GC,predicate:KC,represent:$C,defaultStyle:"lowercase"}),jy=Ey.extend({implicit:[Cy,Ny,Ay,Ty]}),wy=jy,Oy=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ry=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 XC(n){return n===null?!1:Oy.exec(n)!==null||Ry.exec(n)!==null}function QC(n){var l,i,u,s,o,d,h,p=0,m=null,v,x,E;if(l=Oy.exec(n),l===null&&(l=Ry.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 ZC(n){return n.toISOString()}var _y=new at("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:XC,construct:QC,instanceOf:Date,represent:ZC});function JC(n){return n==="<<"||n===null}var My=new at("tag:yaml.org,2002:merge",{kind:"scalar",resolve:JC}),Gf=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
226
- \r`;function IC(n){if(n===null)return!1;var l,i,u=0,s=n.length,o=Gf;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 WC(n){var l,i,u=n.replace(/[\r\n=]/g,""),s=u.length,o=Gf,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 PC(n){var l="",i=0,u,s,o=n.length,d=Gf;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 eN(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}var zy=new at("tag:yaml.org,2002:binary",{kind:"scalar",resolve:IC,construct:WC,predicate:eN,represent:PC}),tN=Object.prototype.hasOwnProperty,nN=Object.prototype.toString;function aN(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,nN.call(s)!=="[object Object]")return!1;for(o in s)if(tN.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 lN(n){return n!==null?n:[]}var Ly=new at("tag:yaml.org,2002:omap",{kind:"sequence",resolve:aN,construct:lN}),iN=Object.prototype.toString;function rN(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],iN.call(u)!=="[object Object]"||(s=Object.keys(u),s.length!==1))return!1;o[l]=[s[0],u[s[0]]]}return!0}function uN(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 Dy=new at("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:rN,construct:uN}),sN=Object.prototype.hasOwnProperty;function oN(n){if(n===null)return!0;var l,i=n;for(l in i)if(sN.call(i,l)&&i[l]!==null)return!1;return!0}function cN(n){return n!==null?n:{}}var ky=new at("tag:yaml.org,2002:set",{kind:"mapping",resolve:oN,construct:cN}),Ff=wy.extend({implicit:[_y,My],explicit:[zy,Ly,Dy,ky]}),ua=Object.prototype.hasOwnProperty,Pu=1,Uy=2,By=3,es=4,Qc=1,fN=2,Gg=3,dN=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,hN=/[\x85\u2028\u2029]/,pN=/[,\[\]\{\}]/,Hy=/^(?:!|!!|![a-z\-]+!)$/i,qy=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Fg(n){return Object.prototype.toString.call(n)}function en(n){return n===10||n===13}function _a(n){return n===9||n===32}function xt(n){return n===9||n===32||n===10||n===13}function Nl(n){return n===44||n===91||n===93||n===123||n===125}function mN(n){var l;return 48<=n&&n<=57?n-48:(l=n|32,97<=l&&l<=102?l-97+10:-1)}function gN(n){return n===120?2:n===117?4:n===85?8:0}function yN(n){return 48<=n&&n<=57?n-48:-1}function $g(n){return n===48?"\0":n===97?"\x07":n===98?"\b":n===116||n===9?" ":n===110?`
227
- `: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 xN(n){return n<=65535?String.fromCharCode(n):String.fromCharCode((n-65536>>10)+55296,(n-65536&1023)+56320)}function Yy(n,l,i){l==="__proto__"?Object.defineProperty(n,l,{configurable:!0,enumerable:!0,writable:!0,value:i}):n[l]=i}var Vy=new Array(256),Gy=new Array(256);for(var Sl=0;Sl<256;Sl++)Vy[Sl]=$g(Sl)?1:0,Gy[Sl]=$g(Sl);function vN(n,l){this.input=n,this.filename=l.filename||null,this.schema=l.schema||Ff,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 Fy(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=CC(i),new ot(l,i)}function se(n,l){throw Fy(n,l)}function ts(n,l){n.onWarning&&n.onWarning.call(null,Fy(n,l))}var Kg={YAML:function(l,i,u){var s,o,d;l.version!==null&&se(l,"duplication of %YAML directive"),u.length!==1&&se(l,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(u[0]),s===null&&se(l,"ill-formed argument of the YAML directive"),o=parseInt(s[1],10),d=parseInt(s[2],10),o!==1&&se(l,"unacceptable YAML version of the document"),l.version=u[0],l.checkLineBreaks=d<2,d!==1&&d!==2&&ts(l,"unsupported YAML version of the document")},TAG:function(l,i,u){var s,o;u.length!==2&&se(l,"TAG directive accepts exactly two arguments"),s=u[0],o=u[1],Hy.test(s)||se(l,"ill-formed tag handle (first argument) of the TAG directive"),ua.call(l.tagMap,s)&&se(l,'there is a previously declared suffix for "'+s+'" tag handle'),qy.test(o)||se(l,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{se(l,"tag prefix is malformed: "+o)}l.tagMap[s]=o}};function ia(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||se(n,"expected valid JSON character");else dN.test(h)&&se(n,"the stream contains non-printable characters");n.result+=h}}function Xg(n,l,i,u){var s,o,d,h;for(Ze.isObject(i)||se(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],ua.call(l,o)||(Yy(l,o,i[o]),u[o]=!0)}function Al(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])&&se(n,"nested arrays are not supported inside keys"),typeof s=="object"&&Fg(s[m])==="[object Object]"&&(s[m]="[object Object]");if(typeof s=="object"&&Fg(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)Xg(n,l,o[m],i);else Xg(n,l,o,i);else!n.json&&!ua.call(i,s)&&ua.call(l,s)&&(n.line=d||n.line,n.lineStart=h||n.lineStart,n.position=p||n.position,se(n,"duplicated mapping key")),Yy(l,s,o),delete i[s];return l}function $f(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++):se(n,"a line break is expected"),n.line+=1,n.lineStart=n.position,n.firstTabInLine=-1}function Xe(n,l,i){for(var u=0,s=n.input.charCodeAt(n.position);s!==0;){for(;_a(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(en(s))for($f(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&&ts(n,"deficient indentation"),u}function ds(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 Kf(n,l){l===1?n.result+=" ":l>1&&(n.result+=Ze.repeat(`
228
- `,l-1))}function bN(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)||Nl(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&&Nl(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&&Nl(s))break}else if(C===35){if(u=n.input.charCodeAt(n.position-1),xt(u))break}else{if(n.position===n.lineStart&&ds(n)||i&&Nl(C))break;if(en(C))if(p=n.line,m=n.lineStart,v=n.lineIndent,Xe(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&&(ia(n,o,d,!1),Kf(n,n.line-p),o=d=n.position,h=!1),_a(C)||(d=n.position+1),C=n.input.charCodeAt(++n.position)}return ia(n,o,d,!1),n.result?!0:(n.kind=x,n.result=E,!1)}function SN(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(ia(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 en(i)?(ia(n,u,s,!0),Kf(n,Xe(n,!1,l)),u=s=n.position):n.position===n.lineStart&&ds(n)?se(n,"unexpected end of the document within a single quoted scalar"):(n.position++,s=n.position);se(n,"unexpected end of the stream within a single quoted scalar")}function EN(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 ia(n,i,n.position,!0),n.position++,!0;if(h===92){if(ia(n,i,n.position,!0),h=n.input.charCodeAt(++n.position),en(h))Xe(n,!1,l);else if(h<256&&Vy[h])n.result+=Gy[h],n.position++;else if((d=gN(h))>0){for(s=d,o=0;s>0;s--)h=n.input.charCodeAt(++n.position),(d=mN(h))>=0?o=(o<<4)+d:se(n,"expected hexadecimal character");n.result+=xN(o),n.position++}else se(n,"unknown escape sequence");i=u=n.position}else en(h)?(ia(n,i,u,!0),Kf(n,Xe(n,!1,l)),i=u=n.position):n.position===n.lineStart&&ds(n)?se(n,"unexpected end of the document within a double quoted scalar"):(n.position++,u=n.position)}se(n,"unexpected end of the stream within a double quoted scalar")}function CN(n,l){var i=!0,u,s,o,d=n.tag,h,p=n.anchor,m,v,x,E,C,N=Object.create(null),j,T,O,w;if(w=n.input.charCodeAt(n.position),w===91)v=93,C=!1,h=[];else if(w===123)v=125,C=!0,h={};else return!1;for(n.anchor!==null&&(n.anchorMap[n.anchor]=h),w=n.input.charCodeAt(++n.position);w!==0;){if(Xe(n,!0,l),w=n.input.charCodeAt(n.position),w===v)return n.position++,n.tag=d,n.anchor=p,n.kind=C?"mapping":"sequence",n.result=h,!0;i?w===44&&se(n,"expected the node content, but found ','"):se(n,"missed comma between flow collection entries"),T=j=O=null,x=E=!1,w===63&&(m=n.input.charCodeAt(n.position+1),xt(m)&&(x=E=!0,n.position++,Xe(n,!0,l))),u=n.line,s=n.lineStart,o=n.position,jl(n,l,Pu,!1,!0),T=n.tag,j=n.result,Xe(n,!0,l),w=n.input.charCodeAt(n.position),(E||n.line===u)&&w===58&&(x=!0,w=n.input.charCodeAt(++n.position),Xe(n,!0,l),jl(n,l,Pu,!1,!0),O=n.result),C?Al(n,h,N,T,j,O,u,s,o):x?h.push(Al(n,null,N,T,j,O,u,s,o)):h.push(j),Xe(n,!0,l),w=n.input.charCodeAt(n.position),w===44?(i=!0,w=n.input.charCodeAt(++n.position)):i=!1}se(n,"unexpected end of the stream within a flow collection")}function NN(n,l){var i,u,s=Qc,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)Qc===s?s=x===43?Gg:fN:se(n,"repeat of a chomping mode identifier");else if((v=yN(x))>=0)v===0?se(n,"bad explicit indentation width of a block scalar; it cannot be less than one"):d?se(n,"repeat of an indentation width identifier"):(h=l+v-1,d=!0);else break;if(_a(x)){do x=n.input.charCodeAt(++n.position);while(_a(x));if(x===35)do x=n.input.charCodeAt(++n.position);while(!en(x)&&x!==0)}for(;x!==0;){for($f(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),en(x)){p++;continue}if(n.lineIndent<h){s===Gg?n.result+=Ze.repeat(`
229
- `,o?1+p:p):s===Qc&&o&&(n.result+=`
230
- `);break}for(u?_a(x)?(m=!0,n.result+=Ze.repeat(`
231
- `,o?1+p:p)):m?(m=!1,n.result+=Ze.repeat(`
232
- `,p+1)):p===0?o&&(n.result+=" "):n.result+=Ze.repeat(`
233
- `,p):n.result+=Ze.repeat(`
234
- `,o?1+p:p),o=!0,d=!0,p=0,i=n.position;!en(x)&&x!==0;)x=n.input.charCodeAt(++n.position);ia(n,i,n.position,!1)}return!0}function Qg(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,se(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++,Xe(n,!0,-1)&&n.lineIndent<=l){o.push(null),p=n.input.charCodeAt(n.position);continue}if(i=n.line,jl(n,l,By,!1,!0),o.push(n.result),Xe(n,!0,-1),p=n.input.charCodeAt(n.position),(n.line===i||n.lineIndent>l)&&p!==0)se(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 AN(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,j=null,T=!1,O=!1,w;if(n.firstTabInLine!==-1)return!1;for(n.anchor!==null&&(n.anchorMap[n.anchor]=x),w=n.input.charCodeAt(n.position);w!==0;){if(!T&&n.firstTabInLine!==-1&&(n.position=n.firstTabInLine,se(n,"tab characters must not be used in indentation")),u=n.input.charCodeAt(n.position+1),o=n.line,(w===63||w===58)&&xt(u))w===63?(T&&(Al(n,x,E,C,N,null,d,h,p),C=N=j=null),O=!0,T=!0,s=!0):T?(T=!1,s=!0):se(n,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),n.position+=1,w=u;else{if(d=n.line,h=n.lineStart,p=n.position,!jl(n,i,Uy,!1,!0))break;if(n.line===o){for(w=n.input.charCodeAt(n.position);_a(w);)w=n.input.charCodeAt(++n.position);if(w===58)w=n.input.charCodeAt(++n.position),xt(w)||se(n,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(Al(n,x,E,C,N,null,d,h,p),C=N=j=null),O=!0,T=!1,s=!1,C=n.tag,N=n.result;else if(O)se(n,"can not read an implicit mapping pair; a colon is missed");else return n.tag=m,n.anchor=v,!0}else if(O)se(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)&&(T&&(d=n.line,h=n.lineStart,p=n.position),jl(n,l,es,!0,s)&&(T?N=n.result:j=n.result),T||(Al(n,x,E,C,N,j,d,h,p),C=N=j=null),Xe(n,!0,-1),w=n.input.charCodeAt(n.position)),(n.line===o||n.lineIndent>l)&&w!==0)se(n,"bad indentation of a mapping entry");else if(n.lineIndent<l)break}return T&&Al(n,x,E,C,N,null,d,h,p),O&&(n.tag=m,n.anchor=v,n.kind="mapping",n.result=x),O}function TN(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&&se(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)):se(n,"unexpected end of the stream within a verbatim tag")}else{for(;d!==0&&!xt(d);)d===33&&(u?se(n,"tag suffix cannot contain exclamation marks"):(s=n.input.slice(l-1,n.position+1),Hy.test(s)||se(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),pN.test(o)&&se(n,"tag suffix cannot contain flow indicator characters")}o&&!qy.test(o)&&se(n,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{se(n,"tag name is malformed: "+o)}return i?n.tag=o:ua.call(n.tagMap,s)?n.tag=n.tagMap[s]+o:s==="!"?n.tag="!"+o:s==="!!"?n.tag="tag:yaml.org,2002:"+o:se(n,'undeclared tag handle "'+s+'"'),!0}function jN(n){var l,i;if(i=n.input.charCodeAt(n.position),i!==38)return!1;for(n.anchor!==null&&se(n,"duplication of an anchor property"),i=n.input.charCodeAt(++n.position),l=n.position;i!==0&&!xt(i)&&!Nl(i);)i=n.input.charCodeAt(++n.position);return n.position===l&&se(n,"name of an anchor node must contain at least one character"),n.anchor=n.input.slice(l,n.position),!0}function wN(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)&&!Nl(u);)u=n.input.charCodeAt(++n.position);return n.position===l&&se(n,"name of an alias node must contain at least one character"),i=n.input.slice(l,n.position),ua.call(n.anchorMap,i)||se(n,'unidentified alias "'+i+'"'),n.result=n.anchorMap[i],Xe(n,!0,-1),!0}function jl(n,l,i,u,s){var o,d,h,p=1,m=!1,v=!1,x,E,C,N,j,T;if(n.listener!==null&&n.listener("open",n),n.tag=null,n.anchor=null,n.kind=null,n.result=null,o=d=h=es===i||By===i,u&&Xe(n,!0,-1)&&(m=!0,n.lineIndent>l?p=1:n.lineIndent===l?p=0:n.lineIndent<l&&(p=-1)),p===1)for(;TN(n)||jN(n);)Xe(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||es===i)&&(Pu===i||Uy===i?j=l:j=l+1,T=n.position-n.lineStart,p===1?h&&(Qg(n,T)||AN(n,T,j))||CN(n,j)?v=!0:(d&&NN(n,j)||SN(n,j)||EN(n,j)?v=!0:wN(n)?(v=!0,(n.tag!==null||n.anchor!==null)&&se(n,"alias node should not have any properties")):bN(n,j,Pu===i)&&(v=!0,n.tag===null&&(n.tag="?")),n.anchor!==null&&(n.anchorMap[n.anchor]=n.result)):p===0&&(v=h&&Qg(n,T))),n.tag===null)n.anchor!==null&&(n.anchorMap[n.anchor]=n.result);else if(n.tag==="?"){for(n.result!==null&&n.kind!=="scalar"&&se(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(ua.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||se(n,"unknown tag !<"+n.tag+">"),n.result!==null&&N.kind!==n.kind&&se(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)):se(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 ON(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&&(Xe(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&&se(n,"directive name must not be less than one character in length");d!==0;){for(;_a(d);)d=n.input.charCodeAt(++n.position);if(d===35){do d=n.input.charCodeAt(++n.position);while(d!==0&&!en(d));break}if(en(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&&$f(n),ua.call(Kg,u)?Kg[u](n,u,s):ts(n,'unknown document directive "'+u+'"')}if(Xe(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,Xe(n,!0,-1)):o&&se(n,"directives end mark is expected"),jl(n,n.lineIndent-1,es,!1,!0),Xe(n,!0,-1),n.checkLineBreaks&&hN.test(n.input.slice(l,n.position))&&ts(n,"non-ASCII line breaks are interpreted as content"),n.documents.push(n.result),n.position===n.lineStart&&ds(n)){n.input.charCodeAt(n.position)===46&&(n.position+=3,Xe(n,!0,-1));return}if(n.position<n.length-1)se(n,"end of the stream or a document separator is expected");else return}function $y(n,l){n=String(n),l=l||{},n.length!==0&&(n.charCodeAt(n.length-1)!==10&&n.charCodeAt(n.length-1)!==13&&(n+=`
235
- `),n.charCodeAt(0)===65279&&(n=n.slice(1)));var i=new vN(n,l),u=n.indexOf("\0");for(u!==-1&&(i.position=u,se(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;)ON(i);return i.documents}function RN(n,l,i){l!==null&&typeof l=="object"&&typeof i>"u"&&(i=l,l=null);var u=$y(n,i);if(typeof l!="function")return u;for(var s=0,o=u.length;s<o;s+=1)l(u[s])}function _N(n,l){var i=$y(n,l);if(i.length!==0){if(i.length===1)return i[0];throw new ot("expected a single document in the stream, but found more")}}var MN=RN,zN=_N,Ky={loadAll:MN,load:zN},Xy=Object.prototype.toString,Qy=Object.prototype.hasOwnProperty,Xf=65279,LN=9,Xi=10,DN=13,kN=32,UN=33,BN=34,yf=35,HN=37,qN=38,YN=39,VN=42,Zy=44,GN=45,ns=58,FN=61,$N=62,KN=63,XN=64,Jy=91,Iy=93,QN=96,Wy=123,ZN=124,Py=125,rt={};rt[0]="\\0";rt[7]="\\a";rt[8]="\\b";rt[9]="\\t";rt[10]="\\n";rt[11]="\\v";rt[12]="\\f";rt[13]="\\r";rt[27]="\\e";rt[34]='\\"';rt[92]="\\\\";rt[133]="\\N";rt[160]="\\_";rt[8232]="\\L";rt[8233]="\\P";var JN=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],IN=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function WN(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&&Qy.call(p.styleAliases,h)&&(h=p.styleAliases[h]),i[d]=h;return i}function PN(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 ot("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+Ze.repeat("0",u-l.length)+l}var e4=1,Qi=2;function t4(n){this.schema=n.schema||Ff,this.indent=Math.max(1,n.indent||2),this.noArrayIndent=n.noArrayIndent||!1,this.skipInvalid=n.skipInvalid||!1,this.flowLevel=Ze.isNothing(n.flowLevel)?-1:n.flowLevel,this.styleMap=WN(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==='"'?Qi:e4,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 Zg(n,l){for(var i=Ze.repeat(" ",l),u=0,s=-1,o="",d,h=n.length;u<h;)s=n.indexOf(`
236
- `,u),s===-1?(d=n.slice(u),u=h):(d=n.slice(u,s+1),u=s+1),d.length&&d!==`
237
- `&&(o+=i),o+=d;return o}function xf(n,l){return`
238
- `+Ze.repeat(" ",n.indent*l)}function n4(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 as(n){return n===kN||n===LN}function Zi(n){return 32<=n&&n<=126||161<=n&&n<=55295&&n!==8232&&n!==8233||57344<=n&&n<=65533&&n!==Xf||65536<=n&&n<=1114111}function Jg(n){return Zi(n)&&n!==Xf&&n!==DN&&n!==Xi}function Ig(n,l,i){var u=Jg(n),s=u&&!as(n);return(i?u:u&&n!==Zy&&n!==Jy&&n!==Iy&&n!==Wy&&n!==Py)&&n!==yf&&!(l===ns&&!s)||Jg(l)&&!as(l)&&n===yf||l===ns&&s}function a4(n){return Zi(n)&&n!==Xf&&!as(n)&&n!==GN&&n!==KN&&n!==ns&&n!==Zy&&n!==Jy&&n!==Iy&&n!==Wy&&n!==Py&&n!==yf&&n!==qN&&n!==VN&&n!==UN&&n!==ZN&&n!==FN&&n!==$N&&n!==YN&&n!==BN&&n!==HN&&n!==XN&&n!==QN}function l4(n){return!as(n)&&n!==ns}function Li(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 ex(n){var l=/^\n* /;return l.test(n)}var tx=1,vf=2,nx=3,ax=4,El=5;function i4(n,l,i,u,s,o,d,h){var p,m=0,v=null,x=!1,E=!1,C=u!==-1,N=-1,j=a4(Li(n,0))&&l4(Li(n,n.length-1));if(l||d)for(p=0;p<n.length;m>=65536?p+=2:p++){if(m=Li(n,p),!Zi(m))return El;j=j&&Ig(m,v,h),v=m}else{for(p=0;p<n.length;m>=65536?p+=2:p++){if(m=Li(n,p),m===Xi)x=!0,C&&(E=E||p-N-1>u&&n[N+1]!==" ",N=p);else if(!Zi(m))return El;j=j&&Ig(m,v,h),v=m}E=E||C&&p-N-1>u&&n[N+1]!==" "}return!x&&!E?j&&!d&&!s(n)?tx:o===Qi?El:vf:i>9&&ex(n)?El:d?o===Qi?El:vf:E?ax:nx}function r4(n,l,i,u,s){n.dump=(function(){if(l.length===0)return n.quotingType===Qi?'""':"''";if(!n.noCompatMode&&(JN.indexOf(l)!==-1||IN.test(l)))return n.quotingType===Qi?'"'+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 n4(n,m)}switch(i4(l,h,n.indent,d,p,n.quotingType,n.forceQuotes&&!u,s)){case tx:return l;case vf:return"'"+l.replace(/'/g,"''")+"'";case nx:return"|"+Wg(l,n.indent)+Pg(Zg(l,o));case ax:return">"+Wg(l,n.indent)+Pg(Zg(u4(l,d),o));case El:return'"'+s4(l)+'"';default:throw new ot("impossible error: invalid scalar style")}})()}function Wg(n,l){var i=ex(n)?String(l):"",u=n[n.length-1]===`
239
- `,s=u&&(n[n.length-2]===`
240
- `||n===`
241
- `),o=s?"+":u?"":"-";return i+o+`
242
- `}function Pg(n){return n[n.length-1]===`
243
- `?n.slice(0,-1):n}function u4(n,l){for(var i=/(\n+)([^\n]*)/g,u=(function(){var m=n.indexOf(`
244
- `);return m=m!==-1?m:n.length,i.lastIndex=m,e0(n.slice(0,m),l)})(),s=n[0]===`
245
- `||n[0]===" ",o,d;d=i.exec(n);){var h=d[1],p=d[2];o=p[0]===" ",u+=h+(!s&&!o&&p!==""?`
246
- `:"")+e0(p,l),s=o}return u}function e0(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+=`
247
- `+n.slice(s,o),s=o+1),d=h;return p+=`
248
- `,n.length-s>l&&d>s?p+=n.slice(s,d)+`
249
- `+n.slice(d+1):p+=n.slice(s),p.slice(1)}function s4(n){for(var l="",i=0,u,s=0;s<n.length;i>=65536?s+=2:s++)i=Li(n,s),u=rt[i],!u&&Zi(i)?(l+=n[s],i>=65536&&(l+=n[s+1])):l+=u||PN(i);return l}function o4(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)),(wn(n,l,h,!1,!1)||typeof h>"u"&&wn(n,l,null,!1,!1))&&(u!==""&&(u+=","+(n.condenseFlow?"":" ")),u+=n.dump);n.tag=s,n.dump="["+u+"]"}function t0(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)),(wn(n,l+1,p,!0,!0,!1,!0)||typeof p>"u"&&wn(n,l+1,null,!0,!0,!1,!0))&&((!u||s!=="")&&(s+=xf(n,l)),n.dump&&Xi===n.dump.charCodeAt(0)?s+="-":s+="- ",s+=n.dump);n.tag=o,n.dump=s||"[]"}function c4(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)),wn(n,l,p,!1,!1)&&(n.dump.length>1024&&(v+="? "),v+=n.dump+(n.condenseFlow?'"':"")+":"+(n.condenseFlow?"":" "),wn(n,l,m,!1,!1)&&(v+=n.dump,u+=v));n.tag=s,n.dump="{"+u+"}"}function f4(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 ot("sortKeys must be a boolean or a function");for(h=0,p=d.length;h<p;h+=1)E="",(!u||s!=="")&&(E+=xf(n,l)),m=d[h],v=i[m],n.replacer&&(v=n.replacer.call(i,m,v)),wn(n,l+1,m,!0,!0,!0)&&(x=n.tag!==null&&n.tag!=="?"||n.dump&&n.dump.length>1024,x&&(n.dump&&Xi===n.dump.charCodeAt(0)?E+="?":E+="? "),E+=n.dump,x&&(E+=xf(n,l)),wn(n,l+1,v,!0,x)&&(n.dump&&Xi===n.dump.charCodeAt(0)?E+=":":E+=": ",E+=n.dump,s+=E));n.tag=o,n.dump=s||"{}"}function n0(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,Xy.call(h.represent)==="[object Function]")u=h.represent(l,p);else if(Qy.call(h.represent,p))u=h.represent[p](l,p);else throw new ot("!<"+h.tag+'> tag resolver accepts not "'+p+'" style');n.dump=u}return!0}return!1}function wn(n,l,i,u,s,o,d){n.tag=null,n.dump=i,n0(n,i,!1)||n0(n,i,!0);var h=Xy.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?(f4(n,l,n.dump,s),E&&(n.dump="&ref_"+x+n.dump)):(c4(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?t0(n,l-1,n.dump,s):t0(n,l,n.dump,s),E&&(n.dump="&ref_"+x+n.dump)):(o4(n,l,n.dump),E&&(n.dump="&ref_"+x+" "+n.dump));else if(h==="[object String]")n.tag!=="?"&&r4(n,n.dump,l,o,p);else{if(h==="[object Undefined]")return!1;if(n.skipInvalid)return!1;throw new ot("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 d4(n,l){var i=[],u=[],s,o;for(bf(n,i,u),s=0,o=u.length;s<o;s+=1)l.duplicates.push(i[u[s]]);l.usedDuplicates=new Array(o)}function bf(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)bf(n[s],l,i);else for(u=Object.keys(n),s=0,o=u.length;s<o;s+=1)bf(n[u[s]],l,i)}function h4(n,l){l=l||{};var i=new t4(l);i.noRefs||d4(n,i);var u=n;return i.replacer&&(u=i.replacer.call({"":u},"",u)),wn(i,0,u,!0,!0)?i.dump+`
250
- `:""}var p4=h4,m4={dump:p4};function Qf(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 g4=at,y4=xy,x4=Ey,v4=jy,b4=wy,S4=Ff,E4=Ky.load,C4=Ky.loadAll,N4=m4.dump,A4=ot,T4={binary:zy,float:Ty,map:Sy,null:Cy,pairs:Dy,set:ky,timestamp:_y,bool:Ny,int:Ay,merge:My,omap:Ly,seq:by,str:vy},j4=Qf("safeLoad","load"),w4=Qf("safeLoadAll","loadAll"),O4=Qf("safeDump","dump"),lx={Type:g4,Schema:y4,FAILSAFE_SCHEMA:x4,JSON_SCHEMA:v4,CORE_SCHEMA:b4,DEFAULT_SCHEMA:S4,load:E4,loadAll:C4,dump:N4,YAMLException:A4,types:T4,safeLoad:j4,safeLoadAll:w4,safeDump:O4};function R4(){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 _4({yamlText:n}){let l=[];try{const i=lx.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 ls(n){return n==null||typeof n=="boolean"?"":typeof n=="string"||typeof n=="number"?String(n):Array.isArray(n)?n.map(ls).join(""):typeof n=="object"&&"props"in n?ls(n.props.children):""}function a0({language:n,children:l}){const{t:i}=qe(),[u,s]=b.useState(!1),o=ls(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(er,{size:12}):y.jsx(V0,{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 M4={code({className:n,children:l,...i}){const u=/language-(\w+)/.exec(n||"");if((u==null?void 0:u[1])==="__frontmatter__"){const s=ls(l).replace(/\n$/,"");return y.jsx(_4,{yamlText:s})}return u?y.jsx(a0,{language:u[1],children:l}):String(l).includes(`
251
- `)?y.jsx(a0,{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 z4(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=lx.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(()=>z4(n),[n]);return y.jsx("div",{className:"markdown-body min-w-0 max-w-full break-words",children:y.jsx(qv,{remarkPlugins:[Vv,JE,cC,R4],rehypePlugins:[Yv],components:M4,children:l})})}function L4({content:n,streaming:l,autoCollapse:i}){const{t:u}=qe(),[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(zf,{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(Lf,{size:14})})]})]}),u]})})}function ix(n){return{read:y.jsx(oS,{size:14}),bash:y.jsx(_S,{size:14}),edit:y.jsx(dg,{size:14}),write:y.jsx(dg,{size:14})}[n]??y.jsx(DS,{size:14})}function D4(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 is(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}
252
- ${n}
253
- ${o}`}const k4={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 rx(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 k4[u]}function U4(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(`
254
- `):String(u.content??""),isError:u.isError??!1,details:u.details??void 0}}return null}function B4({name:n,args:l,toolCallId:i,entries:u,isAborted:s=!1}){const[o,d]=b.useState(!1),h=D4(n,l),p=b.useMemo(()=>i?U4(u,i):null,[u,i]),m=p!==null,x=((p==null?void 0:p.isError)??!1)||!m&&s,E=n==="read"?H4:n==="bash"?q4:n==="write"?Y4:n==="edit"?G4:F4;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:ix(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(Yi,{size:14,className:"text-[var(--label-tertiary)] animate-spin"}):x?y.jsx(Y0,{size:14,className:"text-red-400"}):y.jsx(zf,{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 nr(){const{t:n}=qe();return y.jsxs("div",{className:"flex items-center gap-2 text-[12px] text-[var(--label-tertiary)]",children:[y.jsx(Yi,{size:14,className:"animate-spin"}),y.jsx("span",{children:n("entries.running")})]})}function ar(){const{t:n}=qe();return y.jsxs("div",{className:"flex items-center gap-2 text-[12px] text-red-400",children:[y.jsx(Y0,{size:14}),y.jsx("span",{children:n("entries.aborted")})]})}function lr({name:n}){return y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"text-[var(--label-secondary)] select-none",children:ix(n)}),n]})}function H4({name:n,args:l,result:i,isAborted:u,onClose:s}){const o=l.path??"",d=l.offset,h=l.limit,p=rx(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?is(i.content,p??""):null;return y.jsxs(Rn,{title:y.jsx(lr,{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(ar,{}):y.jsx(nr,{})})]})}function q4({name:n,args:l,result:i,isAborted:u,onClose:s}){const o=l.command??"",d=l.timeout,h=is(o,"bash"),p=i&&!i.isError?is(i.content.trim(),"plaintext"):null;return y.jsx(Rn,{title:y.jsx(lr,{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(zS,{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(ar,{}):y.jsx(nr,{})]})]})})}function Y4({name:n,args:l,result:i,isAborted:u,onClose:s}){const{t:o}=qe(),d=l.path??"",h=l.content??"",p=rx(d),m=p==="markdown",v=m?null:is(h,p??"");return y.jsxs(Rn,{title:y.jsx(lr,{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(ar,{}):y.jsx(nr,{}))]})]})}function V4({diff:n}){const l=n.split(`
255
- `);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 G4({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(lr,{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(V4,{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(ar,{})}):y.jsx("div",{className:"px-5",children:y.jsx(nr,{})})})]})}function F4({name:n,args:l,result:i,isAborted:u,onClose:s}){const{t:o}=qe();return y.jsx(Rn,{title:y.jsx(lr,{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(ar,{}):y.jsx(nr,{})})]})})}function ux({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(Lf,{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 $4({entry:n,entries:l,isLast:i,isStreaming:u,onReEdit:s}){const o=i&&u;switch(n.type){case"message":return y.jsx(K4,{entry:n,entries:l,streaming:o,onReEdit:s});case"compaction":case"branch_summary":return y.jsx(J4,{type:n.type,summary:n.summary??""});default:return null}}function K4({entry:n,entries:l,streaming:i,onReEdit:u}){const s=n.message;if(!s)return null;switch(s.role){case"user":return y.jsx(X4,{content:s.content});case"assistant":return y.jsx(Q4,{content:s.content,entries:l,streaming:i,stopReason:s.stopReason,errorMessage:s.errorMessage,onReEdit:u});case"toolResult":return null;default:return null}}function X4({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(ux,{src:l,onClose:()=>i(null)})]})}function Q4({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(l0,{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(Z4,{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(l0,{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 Z4({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(L4,{content:n.thinking,streaming:i,autoCollapse:u}):null;case"toolCall":return y.jsx(B4,{name:n.name,args:n.arguments,toolCallId:n.id,entries:l,isAborted:s});default:return null}}function J4({type:n,summary:l}){const{t:i}=qe(),[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 l0({message:n,onReEdit:l}){var x,E;const{t:i}=qe(),[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(fg,{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(zf,{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(fg,{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(Zc,{label:i("error.message"),value:d}),h&&y.jsx(Zc,{label:i("error.type"),value:h}),p&&y.jsx(Zc,{label:i("error.requestId"),value:p,mono:!0})]})]})})]})}function Zc({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 sx({title:n,subtitle:l,backTo:i="/",actions:u,children:s}){const o=ss();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(tS,{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 I4(n,l){if(l&&n.startsWith(l)){const i=n.slice(l.length);return!i||i==="/"?"~":"~"+(i.startsWith("/")?i:"/"+i)}return n}function Sf(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 W4(n){const l=n.split("/").filter(Boolean);return l.length<=2?n.length:l.slice(-2).join("/").length}function i0(n,l){if(n.length<=l)return n;const i=W4(n);if(i+2<=l){const u=l-1-i;return n.slice(0,u)+"…"+n.slice(-i)}return Sf(n,l)}const P4=6.2,eA=20,tA=8;function r0({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(er,{size:11,className:"text-green-500"}):n}),y.jsx("span",{className:"truncate",children:l})]})}function u0({title:n,cwd:l,homedir:i,gitBranch:u,actions:s}){const o=l?I4(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),j=N*eA+(N-1)*tA,T=Math.floor((C-j)/P4);if(o&&u){const O=Math.max(10,Math.floor(T*.6)),w=Math.max(8,T-O);p(i0(o,O)),v(Sf(u,w))}else o?p(i0(o,Math.max(10,T))):u&&v(Sf(u,Math.max(8,T)))},[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(r0,{icon:y.jsx(G0,{size:11}),text:h,copyText:l,title:l},l),m&&y.jsx(r0,{icon:y.jsx(pS,{size:11}),text:m,copyText:u},u)]})]}),s]})}function nA(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 Zf({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 j(T){var w,M;const O=T.target;!((w=v.current)!=null&&w.contains(O))&&!((M=x.current)!=null&&M.contains(O))&&h(!1)}return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[d]),b.useEffect(()=>{if(!d)return;const j=()=>h(!1);return window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}},[d]);const E=()=>{var T;if(u)return;if(d){h(!1);return}const j=(T=v.current)==null?void 0:T.getBoundingClientRect();j&&(m(nA(j,s,o)),h(!0))},C=()=>h(!1),N=d&&p?ay.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 aA(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 lA({sessions:n,loading:l,hasMore:i,total:u,disabled:s,onOpen:o,onNewSession:d,onSwitchSession:h,onLoadMore:p,onFilterChange:m}){const{t:v}=qe(),[x,E]=b.useState(""),C=b.useRef(null),N=b.useRef(null),j=b.useCallback(O=>{E(O),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{m(O)},300)},[m]),T=b.useCallback(O=>{if(!i||l)return;const w=O.currentTarget;w.scrollHeight-w.scrollTop-w.clientHeight<40&&p(n.length,x)},[i,l,n.length,x,p]);return y.jsx(Zf,{trigger:({open:O})=>y.jsx("button",{className:`flex items-center justify-center w-9 h-9 rounded-[8px] transition-colors ${O?"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:()=>{O||(E(""),o())},children:y.jsx(gS,{size:16,className:"text-[var(--label-secondary)]"})}),width:320,disabled:s,placement:"bottom",children:O=>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(),O()},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(F0,{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:w=>j(w.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:T,children:l&&n.length===0?y.jsx("div",{className:"flex items-center justify-center py-6",children:y.jsx(Yi,{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(w=>y.jsxs("button",{onClick:()=>{w.isCurrent||(h(w.path),O())},disabled:w.isCurrent,className:`w-full text-left px-2.5 py-2 rounded-[8px] transition-colors mb-0.5 ${w.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 ${w.isCurrent?"font-medium text-[var(--color-accent)]":"text-[var(--label-primary)]"}`,children:w.name||w.firstMessage||v("session.empty")}),y.jsx("span",{className:"text-[11px] text-[var(--label-tertiary)] whitespace-nowrap shrink-0",children:aA(w.modified,v)})]}),w.name&&w.firstMessage&&y.jsx("div",{className:"mt-0.5 text-[11px] leading-[15px] text-[var(--label-tertiary)] truncate",children:w.firstMessage}),y.jsx("div",{className:"mt-0.5 text-[10px] text-[var(--label-quaternary)]",children:v("session.messageCount",{count:w.messageCount})})]},w.id)),l&&n.length>0&&y.jsx("div",{className:"flex items-center justify-center py-2",children:y.jsx(Yi,{size:14,className:"animate-spin text-[var(--label-tertiary)]"})})]})})]})})}const iA=["image/png","image/jpeg","image/gif","image/webp"],rA=2048,uA=2048,s0=.85,Jc=5*1024*1024;function ox(){return`img_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}async function o0(n){if(!iA.includes(n.type))throw new Error(`Unsupported image type: ${n.type}`);const l=await createImageBitmap(n),{width:i,height:u}=oA(l.width,l.height,rA,uA),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=s0;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(;Ic(p)>Jc&&h>.3;)h-=.1,p=s.toDataURL(d,h);if(d==="image/png"&&Ic(p)>Jc)for(d="image/jpeg",h=s0,p=s.toDataURL(d,h);Ic(p)>Jc&&h>.3;)h-=.1,p=s.toDataURL(d,h);const m=p.split(",")[1];return{id:ox(),data:m,mimeType:d,previewUrl:p}}function sA(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 oA(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 Ic(n){const l=n.split(",")[1];return l?Math.ceil(l.length*3/4):0}let cA=0,qu=[];function Ji(n){const l={id:++cA,message:n,phase:"entering"};qu.forEach(i=>i(l))}const fA=16,dA=3e3,hA=300;function pA(){const[n,l]=b.useState([]);return b.useEffect(()=>{const i=u=>{l(s=>[...s,u]),setTimeout(()=>{l(s=>s.map(o=>o.id===u.id?{...o,phase:"visible"}:o))},fA),setTimeout(()=>{l(s=>s.map(o=>o.id===u.id?{...o,phase:"exiting"}:o)),setTimeout(()=>{l(s=>s.filter(o=>o.id!==u.id))},hA)},dA)};return qu.push(i),()=>{qu=qu.filter(u=>u!==i)}},[]),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(i=>y.jsx("div",{className:"pointer-events-auto rounded-full bg-[var(--panel-bg)] backdrop-blur-[30px] border-[0.5px] border-[var(--panel-border)] shadow-[var(--panel-shadow)] px-5 py-2.5 text-[13px] leading-[16px] text-[var(--label-primary)] select-none transition-all duration-300 ease-out",style:i.phase==="entering"?{opacity:0,transform:"translateY(-8px)"}:i.phase==="exiting"?{opacity:0,transform:"translateY(-4px)"}:{opacity:1,transform:"translateY(0)"},children:i.message},i.id))})}function mA({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(Zf,{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(q0,{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(er,{size:14,className:"text-[var(--color-accent)] flex-shrink-0"})]},`${x.provider}/${x.id}`)})]},p))})})}const gA=["off","minimal","low","medium","high"];function yA({currentLevel:n,onSelect:l}){const i=!!l;return y.jsx(Zf,{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(q0,{size:10,className:`transition-transform ${u?"rotate-180":""}`})]}),children:u=>y.jsx("div",{className:"py-1.5 px-1.5",children:gA.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(er,{size:14,className:"text-[var(--color-accent)] flex-shrink-0"})]},s)})})})}function xA({onClose:n,onConfirm:l}){const{t:i}=qe(),[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 vA({instance:n,draft:l,onDraftChange:i,onSendMessage:u,onAbort:s,onSetModel:o,onSetThinkingLevel:d,onCompact:h,buttonMode:p,showCompactButton:m,compactDisabled:v,onImageLightbox:x,startBottomFollow:E}){const{t:C}=qe(),N=b.useRef(null),j=b.useRef(null),T=b.useRef(l);T.current=l;const[O,w]=b.useState(!1),M=n==null?void 0:n.status,U=n==null?void 0:n.contextUsage,X=n==null?void 0:n.model,Q=n==null?void 0:n.availableModels,G=n==null?void 0:n.thinkingLevel,K=!!U&&U.tokens!=null&&U.percent!=null,q=b.useCallback(H=>{H.style.height="auto";const W=Math.min(H.scrollHeight,150);H.style.height=`${W}px`,H.style.overflowY=H.scrollHeight>150?"auto":"hidden"},[]);b.useLayoutEffect(()=>{N.current&&q(N.current)},[l.text,q]);const J=b.useCallback(H=>{i(W=>({...W,text:H.target.value})),q(H.target)},[i,q]),ce=!Fi(M)&&(!!l.text.trim()||l.images.length>0),P=b.useCallback(()=>{const H=T.current;if(Fi(M)||!H.text.trim()&&H.images.length===0)return;const W=H.images.length?H.images.map(Z=>({data:Z.data,mimeType:Z.mimeType})):void 0;u(H.text.trim(),W),N.current&&(N.current.style.height="auto"),E()},[M,u,E]),le=b.useCallback(H=>{H.nativeEvent.isComposing||H.keyCode===229||H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),P())},[P]),ee=b.useCallback(H=>{const W=sA(H.clipboardData);W.length!==0&&(H.preventDefault(),Promise.all(W.map(o0)).then(Z=>{i(Y=>({...Y,images:[...Y.images,...Z]}))}).catch(Z=>{Ji(C("eventStream.imageProcessFailed")),console.error("Image process failed:",Z)}))},[i,C]),re=b.useCallback(H=>{const W=Array.from(H.target.files??[]);W.length!==0&&(Promise.all(W.map(o0)).then(Z=>{i(Y=>({...Y,images:[...Y.images,...Z]}))}).catch(Z=>{Ji(C("eventStream.imageProcessFailed")),console.error("Image process failed:",Z)}),H.target.value="")},[i,C]),z=b.useCallback(H=>{i(W=>({...W,images:W.images.filter(Z=>Z.id!==H)}))},[i]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"glass-panel glass-panel-input px-3 py-2 md:px-4",children:[(M||K)&&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(bA,{status:M}),K&&y.jsxs("span",{className:"min-w-0 flex items-center gap-1",children:[y.jsx("span",{className:"min-w-0 truncate",children:y.jsx(SA,{contextUsage:U})}),m&&y.jsx("button",{onClick:()=>w(!0),disabled:v,title:C("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(CS,{size:12})})]})]}),y.jsxs("div",{className:"flex flex-col overflow-hidden rounded-[14px] border border-[var(--separator)]",children:[l.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:l.images.map(H=>y.jsxs("div",{className:"relative flex-shrink-0 group",children:[y.jsx("button",{onClick:()=>x(H.previewUrl),className:"block rounded-[8px] overflow-hidden border border-[var(--separator)] hover:border-[var(--color-accent)] transition-colors",children:y.jsx("img",{src:H.previewUrl,alt:"Attached",className:"w-[60px] h-[60px] object-cover",draggable:!1})}),y.jsx("button",{onClick:()=>z(H.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(Lf,{size:8})})]},H.id))}),y.jsx("textarea",{ref:N,rows:1,placeholder:C("eventStream.sendPlaceholder"),value:l.text,onChange:J,onKeyDown:le,onPaste:ee,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:[X&&y.jsx(mA,{currentModel:X,availableModels:Q,onSelect:o}),G&&y.jsx(yA,{currentLevel:G,onSelect:d}),y.jsx("button",{onClick:()=>{var H;return(H=j.current)==null?void 0:H.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:C("eventStream.attachImage"),children:y.jsx(xS,{size:15})}),y.jsx("input",{ref:j,type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",multiple:!0,onChange:re,className:"hidden"})]}),y.jsx("div",{className:"flex-shrink-0",children:p==="stop"?y.jsx("button",{onClick:s,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:C("eventStream.stop"),children:y.jsx(OS,{size:12,fill:"currentColor"})}):y.jsx("button",{onClick:P,disabled:!ce,className:`select-none w-[28px] h-[28px] rounded-full flex items-center justify-center transition-opacity ${ce?"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:C("eventStream.send"),children:y.jsx(I2,{size:16,strokeWidth:2.5})})})]})]})]}),O&&y.jsx(xA,{onClose:()=>w(!1),onConfirm:H=>{h(H),w(!1)}})]})}function bA({status:n}){const{t:l}=qe();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 SA({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 EA=0;function cx(n,l){return`${n}:${l}:${EA++}`}function Wc(n,l,i){return l.id||l.__renderKey?l:{...l,__renderKey:cx(n,i)}}function CA(n,l){const i=Ht(Y=>Y.send),u=Ht(Y=>Y.subscribe),s=Ht(Y=>Y.connectionState==="connected"),[o,d]=b.useState([]),[h,p]=b.useState(null),m=b.useRef(null),[v,x]=b.useState("idle"),[E,C]=b.useState(null),[N,j]=b.useState(!1),[T,O]=b.useState([]),[w,M]=b.useState(!1),[U,X]=b.useState(!1),[Q,G]=b.useState(0),K=b.useRef(0),q=b.useRef(o);q.current=o;const J=b.useRef(v);J.current=v;const ce=b.useRef(N);ce.current=N;const P=b.useCallback(()=>{d([]),p(null),x("refreshing"),C(null),j(!1),O([]),M(!1),X(!1),G(0)},[]);b.useEffect(()=>u(Y=>{switch(Y.type){case"forwarded_event":{if(Y.payload.instanceId!==n)return;z(n,Y.payload.event,Y.payload.data);break}case"history":{if(Y.payload.instanceId!==n)return;const I=Y.payload.messages,te=Y.payload.hasMore??!1;H(n,I,te);break}case"session_list":{if(Y.payload.instanceId!==n)return;K.current>0?O(I=>[...I,...Y.payload.sessions]):O(Y.payload.sessions),X(Y.payload.hasMore??!1),G(Y.payload.total??Y.payload.sessions.length),M(!1);break}case"error":{console.error("[Paimon]",Y.payload.message),x("error"),C(Y.payload.message);break}}}),[n,u]),b.useEffect(()=>{if(s)return P(),i({type:"subscribe",payload:{instanceId:n}}),i({type:"get_history",payload:{instanceId:n}}),()=>{i({type:"unsubscribe",payload:{instanceId:n}})}},[n,s,i,P]);const le=b.useRef(l==null?void 0:l.sessionId),ee=b.useRef(n);b.useEffect(()=>{const Y=l==null?void 0:l.sessionId;if(n!==ee.current){ee.current=n,Y!==void 0&&(le.current=Y);return}le.current!==void 0&&Y!==void 0&&Y!==le.current&&(P(),i({type:"get_history",payload:{instanceId:n}})),Y!==void 0&&(le.current=Y)},[l==null?void 0:l.sessionId,n,i,P]);const re=b.useRef(l==null?void 0:l.status);b.useEffect(()=>{const Y=l==null?void 0:l.status;re.current==="compacting"&&Y!=="compacting"&&(P(),i({type:"get_history",payload:{instanceId:n}})),re.current=Y},[l==null?void 0:l.status,n,i,P]);function z(Y,I,te){const ne=te;switch(I){case"message_start":{const ue=ne.message;if(!ue||ue.role!=="assistant")break;const he=Wc(Y,{type:"message",timestamp:new Date().toISOString(),message:ue},"streaming");m.current=he.__renderKey??he.id??null,p(he);break}case"message_update":{const ue=ne.message;if(!ue)break;p(he=>he?{...he,message:ue}:Wc(Y,{type:"message",timestamp:new Date().toISOString(),message:ue},"streaming"));break}case"message_end":{const ue=ne.message;if(ue){const he=m.current??cx(Y,"live"),Ue={type:"message",timestamp:new Date().toISOString(),message:ue,__renderKey:he};d(ut=>[...ut,Ue])}m.current=null,p(null);break}}}function H(Y,I,te){const ne=I.map(ue=>Wc(Y,ue,"history"));J.current==="loadingMore"?d(ue=>[...ne,...ue]):d(ne),j(te),x("idle"),C(null)}const W=b.useCallback(()=>{if(!ce.current||J.current!=="idle")return;const Y=q.current.length;x("loadingMore"),i({type:"get_history",payload:{instanceId:n,offset:Y}})},[n,i]),Z=b.useCallback(Y=>{const I=(Y==null?void 0:Y.offset)??0;K.current=I,I===0&&O([]),M(!0),i({type:"list_sessions",payload:{instanceId:n,offset:I,limit:Y==null?void 0:Y.limit,filter:Y==null?void 0:Y.filter}})},[n,i]);return{entries:h?[...o,h]:o,streamingEntry:h,isStreaming:h!==null,loadState:v,errorMessage:E,hasMore:N,sessionList:T,sessionListLoading:w,sessionHasMore:U,sessionTotal:Q,loadMore:W,requestSessionList:Z}}const NA=.5;function AA({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 TA({previousScrollTop:n,previousScrollHeight:l,nextScrollHeight:i}){return n+i-l}function jA(n){return $3(n)?"stop":"send"}function rs(n){return Math.max(0,n)}function wA({isAtBottom:n,isLoadingMore:l,distanceToBottom:i,overlap:u,force:s=!1,scrollToBottom:o}){return!n||l||!s&&i<=NA&&u<=0?!1:(o(),!0)}function OA({rawScrollTop:n,hasMore:l,canLoadMore:i,isLoadingMore:u,isSuppressed:s}){return n>=0&&rs(n)<100&&l&&i&&!u&&!s}const RA=350,ir="data-entry-key",fx=.5,_A=3,MA=2e3;function Jf(n){return n.getAttribute(ir)??void 0}function dx(n,l){const i=l.closest(`[${ir}]`);return!i||!n.contains(i)?null:i}function hx(n,l){const i=n.querySelectorAll(`[${ir}]`);for(const u of i)if(Jf(u)===l)return u;return null}function Hi(n,l){return l.getBoundingClientRect().top-n.top}function zA(n){const l=n.getBoundingClientRect(),i=l.top+8,u=n.querySelectorAll(`[${ir}]`);for(const s of u){const o=s.getBoundingClientRect();if(o.bottom>i&&o.top<l.bottom)return s}return null}function LA(n){const l={fallbackScrollTop:rs(n.scrollTop),fallbackScrollHeight:n.scrollHeight},i=n.getBoundingClientRect(),u=zA(n);if(!u)return l;const s=Jf(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=dx(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:Hi(i,v),entryTop:Hi(i,u)}}}return{...l,entryKey:s,entryTop:Hi(i,u)}}function c0(n,l){return Math.abs(l)<=fx?!1:(n.scrollTop+=l,!0)}function f0(n,l,{allowDiffFallback:i}){const u=n.getBoundingClientRect();if(l.element&&l.elementTop!=null&&l.element.isConnected&&n.contains(l.element)){const s=dx(n,l.element),o=s?Jf(s):void 0;if(!l.entryKey||o===l.entryKey){const d=Hi(u,l.element)-l.elementTop;return{mode:"deep",delta:d,adjusted:c0(n,d)}}}if(l.entryKey&&l.entryTop!=null){const s=hx(n,l.entryKey);if(s){const o=Hi(u,s)-l.entryTop;return{mode:"entry",delta:o,adjusted:c0(n,o)}}}if(i){const s=TA({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)>fx}}return{mode:"none",delta:0,adjusted:!1}}function DA({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),j=b.useRef(!1),T=b.useRef(!1),O=b.useRef(null),w=b.useRef(null),M=b.useRef(!1),U=b.useRef(null),X=b.useRef(u.length),Q=b.useRef(void 0),G=b.useRef(0),K=b.useRef(null),q=b.useCallback(Z=>{O.current!=null&&cancelAnimationFrame(O.current),T.current=!0,j.current=!0,Z(),O.current=requestAnimationFrame(()=>{T.current=!1,j.current=!1,O.current=null})},[]),J=b.useCallback(()=>{var Y;const Z=K.current;Z&&(Z.rafId!=null&&cancelAnimationFrame(Z.rafId),(Y=Z.observer)==null||Y.disconnect(),K.current=null)},[]),ce=b.useCallback(({force:Z=!1}={})=>{const Y=n.current,I=l.current,te=i.current;if(!Y||!I||!te)return!1;const ne=I.querySelectorAll(`[${ir}]`),ue=ne[ne.length-1],he=ue==null?void 0:ue.getBoundingClientRect(),Ue=te.getBoundingClientRect(),ut=Y.scrollHeight-rs(Y.scrollTop)-Y.clientHeight,_n=he?he.bottom-Ue.top:0;return wA({isAtBottom:E.current,isLoadingMore:M.current,distanceToBottom:ut,overlap:_n,force:Z,scrollToBottom:()=>{J(),q(()=>{Y.scrollTop=Y.scrollHeight}),N(!1)}})},[n,l,i,q,J]),P=b.useCallback(()=>{var Z;(Z=w.current)==null||Z.call(w),w.current=null},[]),le=b.useCallback(()=>{P();const Z=performance.now();let Y=null,I=!1;const te=(ne=performance.now())=>{Y=null,!(I||ne-Z>=MA)&&(!E.current||M.current||(ce(),Y=requestAnimationFrame(te)))};te(),w.current=()=>{I=!0,Y!=null&&(cancelAnimationFrame(Y),Y=null)}},[ce,P]);b.useLayoutEffect(()=>{M.current||ce()},[v,x,ce]),b.useLayoutEffect(()=>{const Z=l.current;if(!Z||typeof ResizeObserver>"u")return;const Y=new ResizeObserver(()=>{ce()});return Y.observe(Z),()=>Y.disconnect()},[o,l,ce]);const ee=b.useCallback(()=>{const Z=n.current,Y=K.current;if(!Z||!Y)return;let I={mode:"none"};q(()=>{I=f0(Z,Y.snapshot,{allowDiffFallback:!1})}),I.mode==="none"&&J()},[n,q,J]),re=b.useCallback(()=>{const Z=K.current;!Z||Z.rafId!=null||(Z.rafId=requestAnimationFrame(()=>{const Y=K.current;!Y||Y!==Z||(Y.rafId=null,ee())}))},[ee]),z=b.useCallback(Z=>{const Y=n.current,I=l.current;if(!Y||!I||!Z.entryKey)return;J();const te={snapshot:Z,observer:null,rafId:null,warmupFrame:0};if(K.current=te,typeof ResizeObserver<"u"){const ue=new ResizeObserver(()=>{re()});ue.observe(I);const he=hx(Y,Z.entryKey);he&&he!==I&&ue.observe(he),te.observer=ue}const ne=()=>{const ue=K.current;!ue||ue!==te||ue.warmupFrame>=_A||(ue.rafId=requestAnimationFrame(()=>{const he=K.current;!he||he!==te||(he.rafId=null,he.warmupFrame+=1,ee(),ne())}))};ne()},[n,l,ee,re,J]);b.useLayoutEffect(()=>(M.current=!1,U.current=null,Q.current=void 0,G.current=0,X.current=s.current.length,E.current=!0,N(!1),()=>{P(),J(),O.current!=null&&(cancelAnimationFrame(O.current),O.current=null),T.current=!1,j.current=!1,M.current=!1,U.current=null,Q.current=void 0,G.current=0}),[o,s,J,P]),b.useLayoutEffect(()=>{n.current&&(M.current||ce())},[u,o,n,ce]),b.useLayoutEffect(()=>{if(!h)return;if(!n.current){p();return}E.current=!0,ce({force:!0}),N(!1),p()},[h,u,n,ce,p]),b.useLayoutEffect(()=>{const Z=n.current;if(M.current&&Z&&u.length>X.current){const Y=u[0]?ff(u[0]):void 0;if(!Q.current||Y!==Q.current){const te=U.current;let ne={mode:"none"};te&&q(()=>{ne=f0(Z,te,{allowDiffFallback:!0})}),G.current=performance.now()+RA,te&&te.entryKey&&ne.mode!=="none"&&z(te),M.current=!1,U.current=null,Q.current=void 0}else U.current&&(U.current={...U.current,fallbackScrollHeight:Z.scrollHeight})}M.current&&!d&&(M.current=!1,U.current=null,Q.current=void 0),X.current=u.length},[u,d,o,n,q,z]);const H=b.useCallback(()=>{const Z=n.current;if(!Z)return;const Y=Z.scrollTop,I=rs(Y),te=performance.now()<G.current;if(Y<0||j.current||T.current)return;K.current&&J();const ne=Z.scrollHeight-I-Z.clientHeight<60;if(E.current=ne,ne||P(),N(!ne),OA({rawScrollTop:Y,hasMore:d,canLoadMore:!!m,isLoadingMore:M.current,isSuppressed:te})&&m){P(),J(),M.current=!0;const he=s.current,Ue=LA(Z);U.current=Ue,Q.current=he[0]?ff(he[0]):void 0,m()}},[n,s,d,m,J,P]),W=b.useCallback(()=>{n.current&&(J(),q(()=>{n.current.scrollTop=n.current.scrollHeight}),E.current=!0,N(!1))},[n,q,J]);return{handleScroll:H,scrollToBottom:W,showScrollBtn:C,startBottomFollow:le}}function kA(n,l,i){const{t:u}=qe(),s=Qu(p=>p.setDraft),{canReEdit:o,userContent:d}=b.useMemo(()=>{var m,v;if(i!=="idle"||l.length===0)return{canReEdit:!1,userContent:null};const p=l[l.length-1];if(p.type!=="message"||((m=p.message)==null?void 0:m.role)!=="assistant"||p.message.stopReason!=="aborted")return{canReEdit:!1,userContent:null};for(let x=l.length-2;x>=0;x--){const E=l[x];if(E.type==="message"&&((v=E.message)==null?void 0:v.role)==="user")return{canReEdit:!0,userContent:E.message.content}}return{canReEdit:!1,userContent:null}},[l,i]),h=b.useCallback(()=>{if(!o||d==null)return;const p=Qu.getState().drafts.get(n)??Bf;if(p.text.trim()||p.images.length>0){Ji(u("reEdit.draftNotEmpty"));return}const m=UA(d);s(n,m)},[o,d,n,s,u]);return o?h:void 0}function UA(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=ox();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 BA(){const{t:n}=qe(),{id:l}=Lb(),i=l,u=Ht(Ne=>Ne.send),s=Mi(G2(i)),o=Qu(Ne=>Ne.drafts.get(i)??Bf),d=Qu(Ne=>Ne.setDraft),{entries:h,isStreaming:p,loadState:m,errorMessage:v,hasMore:x,sessionList:E,sessionListLoading:C,sessionHasMore:N,sessionTotal:j,loadMore:T,requestSessionList:O}=CA(i,s),w=b.useCallback(Ne=>{d(i,Ne)},[i,d]),M=b.useCallback((Ne,_e)=>{u({type:"prompt",payload:{instanceId:i,message:Ne,images:_e!=null&&_e.length?_e:void 0}}),d(i,{text:"",images:[]})},[i,u,d]),U=b.useCallback(()=>{u({type:"abort",payload:{instanceId:i}})},[i,u]),X=b.useCallback((Ne,_e)=>{u({type:"set_model",payload:{instanceId:i,provider:Ne,id:_e}})},[i,u]),Q=b.useCallback(Ne=>{u({type:"set_thinking_level",payload:{instanceId:i,level:Ne}})},[i,u]),G=b.useCallback(()=>{O({offset:0})},[O]),K=b.useCallback((Ne,_e)=>{O({offset:Ne,filter:_e})},[O]),q=b.useCallback(Ne=>{O({offset:0,filter:Ne||void 0})},[O]),J=b.useCallback(()=>{u({type:"new_session",payload:{instanceId:i}})},[i,u]),ce=b.useCallback(Ne=>{u({type:"switch_session",payload:{instanceId:i,path:Ne}})},[i,u]),P=b.useCallback(Ne=>{u({type:"compact",payload:{instanceId:i,customInstructions:Ne}})},[i,u]),le=kA(i,h,s==null?void 0:s.status),ee=b.useRef(null),re=b.useRef(null),z=b.useRef(null),H=b.useRef(null),W=b.useRef(null),[Z,Y]=b.useState(null),I=b.useRef(h);I.current=h;const te=m==="refreshing",ne=jA(s==null?void 0:s.status),ue=h.length>0&&h[h.length-1].type==="compaction",he=Fi(s==null?void 0:s.status),[Ue,ut]=b.useState(!1),_n=b.useCallback(()=>{ut(!1)},[]),an=b.useRef(m);b.useLayoutEffect(()=>{an.current==="refreshing"&&m==="idle"&&ut(!0),an.current=m},[m]);const[Rl,Ma]=b.useState(64),[za,rr]=b.useState(96),[Xt,_l]=b.useState(12),sa=AA({topChromeHeight:Rl,bottomChromeHeight:za,bottomSafeGap:Xt});b.useLayoutEffect(()=>{const Ne=(Da,ka)=>{if(!Da)return()=>{};const cr=()=>{ka(Math.ceil(Da.getBoundingClientRect().height))};if(cr(),typeof ResizeObserver>"u")return()=>{};const Ll=new ResizeObserver(cr);return Ll.observe(Da),()=>Ll.disconnect()},_e=Ne(z.current,Ma),La=Ne(H.current,rr),oa=Ne(W.current,_l);return()=>{_e(),La(),oa()}},[i]);const{handleScroll:hs,scrollToBottom:ur,showScrollBtn:Ml,startBottomFollow:zl}=DA({scrollRef:ee,contentRef:re,bottomChromeRef:H,entries:h,entriesRef:I,instanceId:i,hasMore:x,shouldScrollToBottom:Ue,onScrollToBottomHandled:_n,onLoadMore:T,bottomChromeHeight:za,bottomSafeGap:Xt}),or={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(lA,{sessions:E,loading:C,hasMore:N,total:j,disabled:Fi(s==null?void 0:s.status),onOpen:G,onNewSession:J,onSwitchSession:ce,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:z,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(u0,{...or})}),y.jsx(sx,{children:y.jsx(u0,{...or})})]})}),y.jsx("div",{ref:ee,onScroll:hs,style:{overflowAnchor:"none"},"aria-busy":te,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:re,style:{paddingTop:sa.paddingTop,paddingBottom:sa.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..."}),te?y.jsx(HA,{}):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((Ne,_e)=>{const La=ff(Ne),oa=_e===h.length-1;return y.jsx("div",{"data-entry-key":La,children:y.jsx($4,{entry:Ne,entries:h,isLast:oa,isStreaming:p,onReEdit:oa?le:void 0})},La)})]})}),Ml&&y.jsx("div",{style:{bottom:sa.scrollButtonBottom},className:"absolute left-1/2 z-30 -translate-x-1/2",children:y.jsx("button",{onClick:ur,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(lS,{size:16})})}),y.jsx("div",{ref:H,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(vA,{instance:s,draft:o,onDraftChange:w,onSendMessage:M,onAbort:U,onSetModel:X,onSetThinkingLevel:Q,onCompact:P,buttonMode:ne,showCompactButton:!ue,compactDisabled:he,onImageLightbox:Y,startBottomFollow:zl}),y.jsx("div",{ref:W,className:"h-[var(--bottom-safe-gap)] md:h-0","aria-hidden":"true"})]})})]}),Z&&y.jsx(ux,{src:Z,onClose:()=>Y(null)})]})}function HA(){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 qA(){const{t:n}=qe(),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 YA(){return y.jsx("div",{className:"relative flex-1 min-w-0 overflow-hidden flex flex-col",children:y.jsx(Qb,{})})}const VA={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"},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"}},GA={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"},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"}},px="paimon:language";function FA(){const n=localStorage.getItem(px);return n==="zh-CN"||n==="en"?n:"zh-CN"}function $A(n){localStorage.setItem(px,n),it.changeLanguage(n)}it.use(_3).init({resources:{"zh-CN":{translation:VA},en:{translation:GA}},lng:FA(),fallbackLng:"zh-CN",interpolation:{escapeValue:!1}});function d0({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 Pc({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 KA({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 XA(){const{t:n,i18n:l}=qe(),[i,u]=BS(),[s,o]=X0(),d=[{value:"light",label:n("settings.themeLight")},{value:"dark",label:n("settings.themeDark")},{value:"system",label:n("settings.themeSystem")}],h=[{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"]}],p=[{value:"zh-CN",label:n("settings.langZhCN")},{value:"en",label:n("settings.langEn")}];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(sx,{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(Pc,{label:n("settings.theme"),children:y.jsx(d0,{options:d,value:i,onChange:u})}),y.jsx(Pc,{label:n("settings.background"),showSeparator:!1,children:y.jsx(KA,{value:s,onChange:o,options:h})})]}),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(Pc,{label:n("settings.language"),showSeparator:!1,children:y.jsx(d0,{options:p,value:l.language,onChange:$A})})})]})})}async function Ef(n,l){const i=D0(),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&&(k0(),window.location.reload()),s}function QA({value:n,onChange:l,edgeId:i,disabled:u=!1,autoFocus:s=!1,onSubmit:o}){const{t:d}=qe(),[h,p]=b.useState([]),[m,v]=b.useState(!1),[x,E]=b.useState(!1),[C,N]=b.useState(-1),[j,T]=b.useState(!1),O=b.useRef(null),w=b.useRef(null),M=b.useRef(null),U=b.useRef(null);b.useEffect(()=>()=>{var K;(K=M.current)==null||K.abort()},[]),b.useEffect(()=>{var K;s&&((K=O.current)==null||K.focus())},[s]);const X=b.useCallback(async(K,q)=>{M.current&&M.current.abort();const J=new AbortController;M.current=J,E(!0);try{const P=await(await Ef(`/api/edges/${encodeURIComponent(K)}/browse?path=${encodeURIComponent(q)}`,{signal:J.signal})).json();if(J.signal.aborted)return;P.error?(p([]),v(!1),T(!1)):(p(P.entries??[]),v(P.truncated??!1),T((P.entries??[]).length>0||P.truncated)),N(-1)}catch{J.signal.aborted||(p([]),T(!1))}finally{J.signal.aborted||E(!1)}},[]);b.useEffect(()=>{if(!i||!n||!n.startsWith("/")){p([]),T(!1);return}return U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{X(i,n)},250),()=>{U.current&&clearTimeout(U.current)}},[n,i,X]);const Q=b.useCallback(K=>{var P;const ce=(n.endsWith("/")?n:n.substring(0,n.lastIndexOf("/")+1))+K.name+"/";l(ce),N(-1),(P=O.current)==null||P.focus()},[n,l]),G=b.useCallback(K=>{if(j&&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?Q(h[C]):h.length===1&&Q(h[0]);return}if(K.key==="Enter"&&C>=0&&C<h.length){K.preventDefault(),Q(h[C]);return}if(K.key==="Escape"){K.preventDefault(),T(!1),N(-1);return}}K.key==="Enter"&&(K.preventDefault(),o==null||o())},[j,h,C,Q,o]);return b.useEffect(()=>{if(C<0||!w.current)return;const q=w.current.children[C];q==null||q.scrollIntoView({block:"nearest"})},[C]),b.useEffect(()=>{p([]),T(!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:O,type:"text",value:n,onChange:K=>l(K.target.value),onKeyDown:G,onFocus:()=>{h.length>0&&T(!0)},onBlur:()=>{setTimeout(()=>T(!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(Yi,{size:14,className:"animate-spin text-[var(--label-tertiary)]"})})]}),j&&y.jsxs("div",{ref:w,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:J=>{J.preventDefault(),Q(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(G0,{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 ZA({onClose:n,onCreated:l}){const{t:i}=qe(),[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(()=>{Ef("/api/edges").then(O=>O.json()).then(O=>{if(d(O.edges),O.edges.length>0){p(O.edges[0].edgeId);const w=O.edges[0].homedir;if(w){const M=w.endsWith("/")?w:w+"/";s(M)}}v(!1)}).catch(()=>{v(!1),N(i("newInstance.fetchEdgeError"))})},[]);const j=b.useCallback(O=>{p(O);const w=o.find(M=>M.edgeId===O);if(w!=null&&w.homedir){const M=w.homedir.endsWith("/")?w.homedir:w.homedir+"/";s(M)}},[o]),T=b.useCallback(async()=>{const O=u.trim();if(!(!O||x)){if(!h){N(i("newInstance.noEdgeSelected"));return}E(!0),N(null);try{const w=await Ef("/api/instances",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:O,edgeId:h}),signal:AbortSignal.timeout(2e4)}),M=await w.json();if(!w.ok||!M.instanceId){N(M.error||i("newInstance.requestFailed",{status:w.status})),E(!1);return}l(M.instanceId)}catch(w){const M=w.name==="TimeoutError"?i("newInstance.requestTimeout"):w.message||i("newInstance.networkError");N(M),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:O=>j(O.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(O=>y.jsxs("option",{value:O.edgeId,children:[O.hostname," (",O.edgeId,")"]},O.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(QA,{value:u,onChange:s,edgeId:h,disabled:x||m,autoFocus:!m,onSubmit:T})]}),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:T,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 JA({onLogin:n,error:l}){const{t:i}=qe(),[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),_2(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(z3,{i18nKey:"login.tokenHint",components:{1:y.jsx("code",{className:"px-1 py-0.5 rounded bg-[var(--fill-secondary)] text-[var(--label-secondary)]"})}})})]})})}function IA(){const{pathname:n}=nn(),l=n.match(/^\/instance\/(.+)$/);return l?l[1]:null}function WA(){const{t:n}=qe(),{authToken:l,authError:i,handleLogin:u,handleAuthError:s}=M2(),o=Ht(U=>U.connect),d=Ht(U=>U.disconnect),h=Ht(U=>U.subscribe),p=Ht(U=>U.send),m=Mi(U=>U.instances),v=Mi(U=>U.instanceListReady),x=Mi(U=>U.handleMessage),E=ss();R2();const C=IA();b.useEffect(()=>(l?o(l,s):d(),()=>d()),[l,o,d,s]),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]),j=b.useRef(new Set),T=b.useCallback(U=>{const X=Mi.getState().instances.find(Q=>Q.id===U);if(X&&Fi(X.status)){Ji(n("sidebar.shutdownBusy"));return}j.current.add(U),p({type:"shutdown",payload:{instanceId:U}})},[p,n]),[O,w]=b.useState(!1),M=b.useCallback(U=>{w(!1),E(`/instance/${U}`)},[E]);return b.useEffect(()=>{if(!v||!C)return;m.some(X=>X.id===C)||(j.current.has(C)?j.current.delete(C):Ji(n("eventStream.instanceNotFound")),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(_g,{instances:m,selectedId:C,onSelect:N,onShutdown:T,onNewInstance:()=>w(!0)})}),y.jsx(Jb,{children:y.jsxs(_i,{element:y.jsx(YA,{}),children:[y.jsx(_i,{path:"/settings",element:y.jsx(XA,{})}),y.jsx(_i,{path:"/instance/:id",element:y.jsx(BA,{})}),y.jsx(_i,{path:"*",element:y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"flex-1 md:hidden min-w-0 flex flex-col",children:y.jsx(_g,{instances:m,selectedId:C,onSelect:N,onShutdown:T,onNewInstance:()=>w(!0)})}),y.jsx("div",{className:"hidden md:flex flex-1 min-w-0",children:y.jsx(qA,{})})]})})]})}),O&&y.jsx(ZA,{onClose:()=>w(!1),onCreated:M}),y.jsx(pA,{})]}):y.jsx("div",{className:"h-[var(--app-viewport-height,100dvh)] w-screen animated-bg flex items-stretch overflow-hidden",children:y.jsx(JA,{onLogin:u,error:i})})}Qv.createRoot(document.getElementById("root")).render(y.jsx(b2,{children:y.jsx(WA,{})}));