@wrongstack/webui 0.1.10 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-C1jTV4WR.js +609 -0
- package/dist/assets/index-CRAjL4S_.css +1 -0
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.html +2 -2
- package/dist/index.js +419 -352
- package/dist/index.js.map +1 -1
- package/dist/server/entry.js +52 -10
- package/dist/server/entry.js.map +1 -1
- package/dist/server/index.js +52 -10
- package/dist/server/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/assets/index-CK6FOYAW.js +0 -609
- package/dist/assets/index-DE-kgcG1.css +0 -1
|
@@ -0,0 +1,609 @@
|
|
|
1
|
+
var LS=Object.defineProperty;var US=(t,r,l)=>r in t?LS(t,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[r]=l;var qt=(t,r,l)=>US(t,typeof r!="symbol"?r+"":r,l);function BS(t,r){for(var l=0;l<r.length;l++){const i=r[l];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in t)){const u=Object.getOwnPropertyDescriptor(i,s);u&&Object.defineProperty(t,s,u.get?u:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function l(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(s){if(s.ep)return;s.ep=!0;const u=l(s);fetch(s.href,u)}})();function Ri(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jc={exports:{}},mi={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Pg;function HS(){if(Pg)return mi;Pg=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function l(i,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var f in s)f!=="key"&&(u[f]=s[f])}else u=s;return s=u.ref,{$$typeof:t,type:i,key:c,ref:s!==void 0?s:null,props:u}}return mi.Fragment=r,mi.jsx=l,mi.jsxs=l,mi}var Xg;function qS(){return Xg||(Xg=1,Jc.exports=HS()),Jc.exports}var h=qS(),Wc={exports:{}},Me={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Qg;function IS(){if(Qg)return Me;Qg=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function v(T){return T===null||typeof T!="object"?null:(T=b&&T[b]||T["@@iterator"],typeof T=="function"?T:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,A={};function E(T,B,j){this.props=T,this.context=B,this.refs=A,this.updater=j||C}E.prototype.isReactComponent={},E.prototype.setState=function(T,B){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,B,"setState")},E.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function M(){}M.prototype=E.prototype;function O(T,B,j){this.props=T,this.context=B,this.refs=A,this.updater=j||C}var $=O.prototype=new M;$.constructor=O,N($,E.prototype),$.isPureReactComponent=!0;var P=Array.isArray;function L(){}var Y={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function oe(T,B,j){var _=j.ref;return{$$typeof:t,type:T,key:B,ref:_!==void 0?_:null,props:j}}function H(T,B){return oe(T.type,B,T.props)}function X(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function G(T){var B={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(j){return B[j]})}var fe=/\/+/g;function ue(T,B){return typeof T=="object"&&T!==null&&T.key!=null?G(""+T.key):B.toString(36)}function ne(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(L,L):(T.status="pending",T.then(function(B){T.status==="pending"&&(T.status="fulfilled",T.value=B)},function(B){T.status==="pending"&&(T.status="rejected",T.reason=B)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function R(T,B,j,_,ee){var te=typeof T;(te==="undefined"||te==="boolean")&&(T=null);var Z=!1;if(T===null)Z=!0;else switch(te){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(T.$$typeof){case t:case r:Z=!0;break;case x:return Z=T._init,R(Z(T._payload),B,j,_,ee)}}if(Z)return ee=ee(T),Z=_===""?"."+ue(T,0):_,P(ee)?(j="",Z!=null&&(j=Z.replace(fe,"$&/")+"/"),R(ee,B,j,"",function(Ae){return Ae})):ee!=null&&(X(ee)&&(ee=H(ee,j+(ee.key==null||T&&T.key===ee.key?"":(""+ee.key).replace(fe,"$&/")+"/")+Z)),B.push(ee)),1;Z=0;var xe=_===""?".":_+":";if(P(T))for(var ke=0;ke<T.length;ke++)_=T[ke],te=xe+ue(_,ke),Z+=R(_,B,j,te,ee);else if(ke=v(T),typeof ke=="function")for(T=ke.call(T),ke=0;!(_=T.next()).done;)_=_.value,te=xe+ue(_,ke++),Z+=R(_,B,j,te,ee);else if(te==="object"){if(typeof T.then=="function")return R(ne(T),B,j,_,ee);throw B=String(T),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Z}function J(T,B,j){if(T==null)return T;var _=[],ee=0;return R(T,_,"","",function(te){return B.call(j,te,ee++)}),_}function ie(T){if(T._status===-1){var B=T._result;B=B(),B.then(function(j){(T._status===0||T._status===-1)&&(T._status=1,T._result=j)},function(j){(T._status===0||T._status===-1)&&(T._status=2,T._result=j)}),T._status===-1&&(T._status=0,T._result=B)}if(T._status===1)return T._result.default;throw T._result}var ge=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},D={map:J,forEach:function(T,B,j){J(T,function(){B.apply(this,arguments)},j)},count:function(T){var B=0;return J(T,function(){B++}),B},toArray:function(T){return J(T,function(B){return B})||[]},only:function(T){if(!X(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return Me.Activity=y,Me.Children=D,Me.Component=E,Me.Fragment=l,Me.Profiler=s,Me.PureComponent=O,Me.StrictMode=i,Me.Suspense=p,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,Me.__COMPILER_RUNTIME={__proto__:null,c:function(T){return Y.H.useMemoCache(T)}},Me.cache=function(T){return function(){return T.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(T,B,j){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var _=N({},T.props),ee=T.key;if(B!=null)for(te in B.key!==void 0&&(ee=""+B.key),B)!le.call(B,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&B.ref===void 0||(_[te]=B[te]);var te=arguments.length-2;if(te===1)_.children=j;else if(1<te){for(var Z=Array(te),xe=0;xe<te;xe++)Z[xe]=arguments[xe+2];_.children=Z}return oe(T.type,ee,_)},Me.createContext=function(T){return T={$$typeof:c,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:u,_context:T},T},Me.createElement=function(T,B,j){var _,ee={},te=null;if(B!=null)for(_ in B.key!==void 0&&(te=""+B.key),B)le.call(B,_)&&_!=="key"&&_!=="__self"&&_!=="__source"&&(ee[_]=B[_]);var Z=arguments.length-2;if(Z===1)ee.children=j;else if(1<Z){for(var xe=Array(Z),ke=0;ke<Z;ke++)xe[ke]=arguments[ke+2];ee.children=xe}if(T&&T.defaultProps)for(_ in Z=T.defaultProps,Z)ee[_]===void 0&&(ee[_]=Z[_]);return oe(T,te,ee)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(T){return{$$typeof:f,render:T}},Me.isValidElement=X,Me.lazy=function(T){return{$$typeof:x,_payload:{_status:-1,_result:T},_init:ie}},Me.memo=function(T,B){return{$$typeof:m,type:T,compare:B===void 0?null:B}},Me.startTransition=function(T){var B=Y.T,j={};Y.T=j;try{var _=T(),ee=Y.S;ee!==null&&ee(j,_),typeof _=="object"&&_!==null&&typeof _.then=="function"&&_.then(L,ge)}catch(te){ge(te)}finally{B!==null&&j.types!==null&&(B.types=j.types),Y.T=B}},Me.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},Me.use=function(T){return Y.H.use(T)},Me.useActionState=function(T,B,j){return Y.H.useActionState(T,B,j)},Me.useCallback=function(T,B){return Y.H.useCallback(T,B)},Me.useContext=function(T){return Y.H.useContext(T)},Me.useDebugValue=function(){},Me.useDeferredValue=function(T,B){return Y.H.useDeferredValue(T,B)},Me.useEffect=function(T,B){return Y.H.useEffect(T,B)},Me.useEffectEvent=function(T){return Y.H.useEffectEvent(T)},Me.useId=function(){return Y.H.useId()},Me.useImperativeHandle=function(T,B,j){return Y.H.useImperativeHandle(T,B,j)},Me.useInsertionEffect=function(T,B){return Y.H.useInsertionEffect(T,B)},Me.useLayoutEffect=function(T,B){return Y.H.useLayoutEffect(T,B)},Me.useMemo=function(T,B){return Y.H.useMemo(T,B)},Me.useOptimistic=function(T,B){return Y.H.useOptimistic(T,B)},Me.useReducer=function(T,B,j){return Y.H.useReducer(T,B,j)},Me.useRef=function(T){return Y.H.useRef(T)},Me.useState=function(T){return Y.H.useState(T)},Me.useSyncExternalStore=function(T,B,j){return Y.H.useSyncExternalStore(T,B,j)},Me.useTransition=function(){return Y.H.useTransition()},Me.version="19.2.6",Me}var Kg;function id(){return Kg||(Kg=1,Wc.exports=IS()),Wc.exports}var w=id();const dn=Ri(w),od=BS({__proto__:null,default:dn},[w]);var ef={exports:{}},pi={},tf={exports:{}},nf={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Zg;function VS(){return Zg||(Zg=1,(function(t){function r(R,J){var ie=R.length;R.push(J);e:for(;0<ie;){var ge=ie-1>>>1,D=R[ge];if(0<s(D,J))R[ge]=J,R[ie]=D,ie=ge;else break e}}function l(R){return R.length===0?null:R[0]}function i(R){if(R.length===0)return null;var J=R[0],ie=R.pop();if(ie!==J){R[0]=ie;e:for(var ge=0,D=R.length,T=D>>>1;ge<T;){var B=2*(ge+1)-1,j=R[B],_=B+1,ee=R[_];if(0>s(j,ie))_<D&&0>s(ee,j)?(R[ge]=ee,R[_]=ie,ge=_):(R[ge]=j,R[B]=ie,ge=B);else if(_<D&&0>s(ee,ie))R[ge]=ee,R[_]=ie,ge=_;else break e}}return J}function s(R,J){var ie=R.sortIndex-J.sortIndex;return ie!==0?ie:R.id-J.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();t.unstable_now=function(){return c.now()-f}}var p=[],m=[],x=1,y=null,b=3,v=!1,C=!1,N=!1,A=!1,E=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function $(R){for(var J=l(m);J!==null;){if(J.callback===null)i(m);else if(J.startTime<=R)i(m),J.sortIndex=J.expirationTime,r(p,J);else break;J=l(m)}}function P(R){if(N=!1,$(R),!C)if(l(p)!==null)C=!0,L||(L=!0,G());else{var J=l(m);J!==null&&ne(P,J.startTime-R)}}var L=!1,Y=-1,le=5,oe=-1;function H(){return A?!0:!(t.unstable_now()-oe<le)}function X(){if(A=!1,L){var R=t.unstable_now();oe=R;var J=!0;try{e:{C=!1,N&&(N=!1,M(Y),Y=-1),v=!0;var ie=b;try{t:{for($(R),y=l(p);y!==null&&!(y.expirationTime>R&&H());){var ge=y.callback;if(typeof ge=="function"){y.callback=null,b=y.priorityLevel;var D=ge(y.expirationTime<=R);if(R=t.unstable_now(),typeof D=="function"){y.callback=D,$(R),J=!0;break t}y===l(p)&&i(p),$(R)}else i(p);y=l(p)}if(y!==null)J=!0;else{var T=l(m);T!==null&&ne(P,T.startTime-R),J=!1}}break e}finally{y=null,b=ie,v=!1}J=void 0}}finally{J?G():L=!1}}}var G;if(typeof O=="function")G=function(){O(X)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ue=fe.port2;fe.port1.onmessage=X,G=function(){ue.postMessage(null)}}else G=function(){E(X,0)};function ne(R,J){Y=E(function(){R(t.unstable_now())},J)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(R){R.callback=null},t.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<R?Math.floor(1e3/R):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(R){switch(b){case 1:case 2:case 3:var J=3;break;default:J=b}var ie=b;b=J;try{return R()}finally{b=ie}},t.unstable_requestPaint=function(){A=!0},t.unstable_runWithPriority=function(R,J){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var ie=b;b=R;try{return J()}finally{b=ie}},t.unstable_scheduleCallback=function(R,J,ie){var ge=t.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?ge+ie:ge):ie=ge,R){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=ie+D,R={id:x++,callback:J,priorityLevel:R,startTime:ie,expirationTime:D,sortIndex:-1},ie>ge?(R.sortIndex=ie,r(m,R),l(p)===null&&R===l(m)&&(N?(M(Y),Y=-1):N=!0,ne(P,ie-ge))):(R.sortIndex=D,r(p,R),C||v||(C=!0,L||(L=!0,G()))),R},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(R){var J=b;return function(){var ie=b;b=J;try{return R.apply(this,arguments)}finally{b=ie}}}})(nf)),nf}var Jg;function $S(){return Jg||(Jg=1,tf.exports=VS()),tf.exports}var rf={exports:{}},It={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Wg;function FS(){if(Wg)return It;Wg=1;var t=id();function r(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)m+="&args[]="+encodeURIComponent(arguments[x])}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 l(){}var i={d:{f:l,r:function(){throw Error(r(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(p,m,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:p,containerInfo:m,implementation:x}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return It.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,It.createPortal=function(p,m){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(r(299));return u(p,m,null,x)},It.flushSync=function(p){var m=c.T,x=i.p;try{if(c.T=null,i.p=2,p)return p()}finally{c.T=m,i.p=x,i.d.f()}},It.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(p,m))},It.prefetchDNS=function(p){typeof p=="string"&&i.d.D(p)},It.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var x=m.as,y=f(x,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;x==="style"?i.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:v}):x==="script"&&i.d.X(p,{crossOrigin:y,integrity:b,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},It.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var x=f(m.as,m.crossOrigin);i.d.M(p,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&i.d.M(p)},It.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var x=m.as,y=f(x,m.crossOrigin);i.d.L(p,x,{crossOrigin:y,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})}},It.preloadModule=function(p,m){if(typeof p=="string")if(m){var x=f(m.as,m.crossOrigin);i.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(p)},It.requestFormReset=function(p){i.d.r(p)},It.unstable_batchedUpdates=function(p,m){return p(m)},It.useFormState=function(p,m,x){return c.H.useFormState(p,m,x)},It.useFormStatus=function(){return c.H.useHostTransitionStatus()},It.version="19.2.6",It}var ey;function wx(){if(ey)return rf.exports;ey=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),rf.exports=FS(),rf.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var ty;function YS(){if(ty)return pi;ty=1;var t=$S(),r=id(),l=wx();function i(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function c(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function f(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(u(e)!==e)throw Error(i(188))}function m(e){var n=e.alternate;if(!n){if(n=u(e),n===null)throw Error(i(188));return n!==e?null:e}for(var a=e,o=n;;){var d=a.return;if(d===null)break;var g=d.alternate;if(g===null){if(o=d.return,o!==null){a=o;continue}break}if(d.child===g.child){for(g=d.child;g;){if(g===a)return p(d),e;if(g===o)return p(d),n;g=g.sibling}throw Error(i(188))}if(a.return!==o.return)a=d,o=g;else{for(var S=!1,k=d.child;k;){if(k===a){S=!0,a=d,o=g;break}if(k===o){S=!0,o=d,a=g;break}k=k.sibling}if(!S){for(k=g.child;k;){if(k===a){S=!0,a=g,o=d;break}if(k===o){S=!0,o=g,a=d;break}k=k.sibling}if(!S)throw Error(i(189))}}if(a.alternate!==o)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:n}function x(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=x(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),O=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function G(e){return e===null||typeof e!="object"?null:(e=X&&e[X]||e["@@iterator"],typeof e=="function"?e:null)}var fe=Symbol.for("react.client.reference");function ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case E:return"Profiler";case A:return"StrictMode";case P:return"Suspense";case L:return"SuspenseList";case oe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case O:return e.displayName||"Context";case M:return(e._context.displayName||"Context")+".Consumer";case $:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return n=e.displayName||null,n!==null?n:ue(e.type)||"Memo";case le:n=e._payload,e=e._init;try{return ue(e(n))}catch{}}return null}var ne=Array.isArray,R=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ge=[],D=-1;function T(e){return{current:e}}function B(e){0>D||(e.current=ge[D],ge[D]=null,D--)}function j(e,n){D++,ge[D]=e.current,e.current=n}var _=T(null),ee=T(null),te=T(null),Z=T(null);function xe(e,n){switch(j(te,n),j(ee,e),j(_,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?gg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=gg(n),e=yg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(_),j(_,e)}function ke(){B(_),B(ee),B(te)}function Ae(e){e.memoizedState!==null&&j(Z,e);var n=_.current,a=yg(n,e.type);n!==a&&(j(ee,e),j(_,a))}function ht(e){ee.current===e&&(B(_),B(ee)),Z.current===e&&(B(Z),ci._currentValue=ie)}var yt,Ue;function ye(e){if(yt===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);yt=n&&n[1]||"",Ue=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+yt+e+Ue}var Se=!1;function Fe(e,n){if(!e||Se)return"";Se=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(K){var F=K}Reflect.construct(e,[],ae)}else{try{ae.call()}catch(K){F=K}e.call(ae.prototype)}}else{try{throw Error()}catch(K){F=K}(ae=e())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(K){if(K&&F&&typeof K.stack=="string")return[K.stack,F.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=o.DetermineComponentFrameRoot(),S=g[0],k=g[1];if(S&&k){var z=S.split(`
|
|
44
|
+
`),V=k.split(`
|
|
45
|
+
`);for(d=o=0;o<z.length&&!z[o].includes("DetermineComponentFrameRoot");)o++;for(;d<V.length&&!V[d].includes("DetermineComponentFrameRoot");)d++;if(o===z.length||d===V.length)for(o=z.length-1,d=V.length-1;1<=o&&0<=d&&z[o]!==V[d];)d--;for(;1<=o&&0<=d;o--,d--)if(z[o]!==V[d]){if(o!==1||d!==1)do if(o--,d--,0>d||z[o]!==V[d]){var W=`
|
|
46
|
+
`+z[o].replace(" at new "," at ");return e.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",e.displayName)),W}while(1<=o&&0<=d);break}}}finally{Se=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ye(a):""}function nt(e,n){switch(e.tag){case 26:case 27:case 5:return ye(e.type);case 16:return ye("Lazy");case 13:return e.child!==n&&n!==null?ye("Suspense Fallback"):ye("Suspense");case 19:return ye("SuspenseList");case 0:case 15:return Fe(e.type,!1);case 11:return Fe(e.type.render,!1);case 1:return Fe(e.type,!0);case 31:return ye("Activity");default:return""}}function Yt(e){try{var n="",a=null;do n+=nt(e,a),a=e,e=e.return;while(e);return n}catch(o){return`
|
|
47
|
+
Error generating stack: `+o.message+`
|
|
48
|
+
`+o.stack}}var Qe=Object.prototype.hasOwnProperty,Mt=t.unstable_scheduleCallback,pn=t.unstable_cancelCallback,Gr=t.unstable_shouldYield,fr=t.unstable_requestPaint,se=t.unstable_now,Te=t.unstable_getCurrentPriorityLevel,Q=t.unstable_ImmediatePriority,de=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,Re=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ot=t.log,vt=t.unstable_setDisableYieldValue,gt=null,st=null;function Dt(e){if(typeof Ot=="function"&&vt(e),st&&typeof st.setStrictMode=="function")try{st.setStrictMode(gt,e)}catch{}}var We=Math.clz32?Math.clz32:wb,dr=Math.log,An=Math.LN2;function wb(e){return e>>>=0,e===0?32:31-(dr(e)/An|0)|0}var Hi=256,qi=262144,Ii=4194304;function Pr(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128: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 Vi(e,n,a){var o=e.pendingLanes;if(o===0)return 0;var d=0,g=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var k=o&134217727;return k!==0?(o=k&~g,o!==0?d=Pr(o):(S&=k,S!==0?d=Pr(S):a||(a=k&~e,a!==0&&(d=Pr(a))))):(k=o&~g,k!==0?d=Pr(k):S!==0?d=Pr(S):a||(a=o&~e,a!==0&&(d=Pr(a)))),d===0?0:n!==0&&n!==d&&(n&g)===0&&(g=d&-d,a=n&-n,g>=a||g===32&&(a&4194048)!==0)?n:d}function ka(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function kb(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Zd(){var e=Ii;return Ii<<=1,(Ii&62914560)===0&&(Ii=4194304),e}function qs(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Ca(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Cb(e,n,a,o,d,g){var S=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 k=e.entanglements,z=e.expirationTimes,V=e.hiddenUpdates;for(a=S&~a;0<a;){var W=31-We(a),ae=1<<W;k[W]=0,z[W]=-1;var F=V[W];if(F!==null)for(V[W]=null,W=0;W<F.length;W++){var K=F[W];K!==null&&(K.lane&=-536870913)}a&=~ae}o!==0&&Jd(e,o,0),g!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=g&~(S&~n))}function Jd(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-We(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|a&261930}function Wd(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var o=31-We(a),d=1<<o;d&n|e[o]&n&&(e[o]|=n),a&=~d}}function eh(e,n){var a=n&-n;return a=(a&42)!==0?1:Is(a),(a&(e.suspendedLanes|n))!==0?0:a}function Is(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 Vs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function th(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:qg(e.type))}function nh(e,n){var a=J.p;try{return J.p=e,n()}finally{J.p=a}}var hr=Math.random().toString(36).slice(2),_t="__reactFiber$"+hr,Xt="__reactProps$"+hr,vl="__reactContainer$"+hr,$s="__reactEvents$"+hr,Nb="__reactListeners$"+hr,jb="__reactHandles$"+hr,rh="__reactResources$"+hr,Na="__reactMarker$"+hr;function Fs(e){delete e[_t],delete e[Xt],delete e[$s],delete e[Nb],delete e[jb]}function Sl(e){var n=e[_t];if(n)return n;for(var a=e.parentNode;a;){if(n=a[vl]||a[_t]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Cg(e);e!==null;){if(a=e[_t])return a;e=Cg(e)}return n}e=a,a=e.parentNode}return null}function wl(e){if(e=e[_t]||e[vl]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function ja(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(i(33))}function kl(e){var n=e[rh];return n||(n=e[rh]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Rt(e){e[Na]=!0}var lh=new Set,ah={};function Xr(e,n){Cl(e,n),Cl(e+"Capture",n)}function Cl(e,n){for(ah[e]=n,e=0;e<n.length;e++)lh.add(n[e])}var Eb=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]*$"),ih={},oh={};function Tb(e){return Qe.call(oh,e)?!0:Qe.call(ih,e)?!1:Eb.test(e)?oh[e]=!0:(ih[e]=!0,!1)}function $i(e,n,a){if(Tb(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Fi(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function $n(e,n,a,o){if(o===null)e.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+o)}}function gn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sh(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ab(e,n,a){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,g=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.call(this)},set:function(S){a=""+S,g.call(this,S)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(S){a=""+S},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ys(e){if(!e._valueTracker){var n=sh(e)?"checked":"value";e._valueTracker=Ab(e,n,""+e[n])}}function uh(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),o="";return e&&(o=sh(e)?e.checked?"true":"false":e.value),e=o,e!==a?(n.setValue(e),!0):!1}function Yi(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 Mb=/[\n"\\]/g;function yn(e){return e.replace(Mb,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Gs(e,n,a,o,d,g,S,k){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),n!=null?S==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+gn(n)):e.value!==""+gn(n)&&(e.value=""+gn(n)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),n!=null?Ps(e,S,gn(n)):a!=null?Ps(e,S,gn(a)):o!=null&&e.removeAttribute("value"),d==null&&g!=null&&(e.defaultChecked=!!g),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+gn(k):e.removeAttribute("name")}function ch(e,n,a,o,d,g,S,k){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.type=g),n!=null||a!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){Ys(e);return}a=a!=null?""+gn(a):"",n=n!=null?""+gn(n):a,k||n===e.value||(e.value=n),e.defaultValue=n}o=o??d,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=k?e.checked:!!o,e.defaultChecked=!!o,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),Ys(e)}function Ps(e,n,a){n==="number"&&Yi(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Nl(e,n,a,o){if(e=e.options,n){n={};for(var d=0;d<a.length;d++)n["$"+a[d]]=!0;for(a=0;a<e.length;a++)d=n.hasOwnProperty("$"+e[a].value),e[a].selected!==d&&(e[a].selected=d),d&&o&&(e[a].defaultSelected=!0)}else{for(a=""+gn(a),n=null,d=0;d<e.length;d++){if(e[d].value===a){e[d].selected=!0,o&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function fh(e,n,a){if(n!=null&&(n=""+gn(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+gn(a):""}function dh(e,n,a,o){if(n==null){if(o!=null){if(a!=null)throw Error(i(92));if(ne(o)){if(1<o.length)throw Error(i(93));o=o[0]}a=o}a==null&&(a=""),n=a}a=gn(n),e.defaultValue=a,o=e.textContent,o===a&&o!==""&&o!==null&&(e.value=o),Ys(e)}function jl(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var Db=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 hh(e,n,a){var o=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,a):typeof a!="number"||a===0||Db.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function mh(e,n,a){if(n!=null&&typeof n!="object")throw Error(i(62));if(e=e.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var d in n)o=n[d],n.hasOwnProperty(d)&&a[d]!==o&&hh(e,d,o)}else for(var g in n)n.hasOwnProperty(g)&&hh(e,g,n[g])}function Xs(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 Rb=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"]]),zb=/^[\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 Gi(e){return zb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Fn(){}var Qs=null;function Ks(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var El=null,Tl=null;function ph(e){var n=wl(e);if(n&&(e=n.stateNode)){var a=e[Xt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Gs(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+yn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var o=a[n];if(o!==e&&o.form===e.form){var d=o[Xt]||null;if(!d)throw Error(i(90));Gs(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<a.length;n++)o=a[n],o.form===e.form&&uh(o)}break e;case"textarea":fh(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Nl(e,!!a.multiple,n,!1)}}}var Zs=!1;function gh(e,n,a){if(Zs)return e(n,a);Zs=!0;try{var o=e(n);return o}finally{if(Zs=!1,(El!==null||Tl!==null)&&(Oo(),El&&(n=El,e=Tl,Tl=El=null,ph(n),e)))for(n=0;n<e.length;n++)ph(e[n])}}function Ea(e,n){var a=e.stateNode;if(a===null)return null;var o=a[Xt]||null;if(o===null)return null;a=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,n,typeof a));return a}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Js=!1;if(Yn)try{var Ta={};Object.defineProperty(Ta,"passive",{get:function(){Js=!0}}),window.addEventListener("test",Ta,Ta),window.removeEventListener("test",Ta,Ta)}catch{Js=!1}var mr=null,Ws=null,Pi=null;function yh(){if(Pi)return Pi;var e,n=Ws,a=n.length,o,d="value"in mr?mr.value:mr.textContent,g=d.length;for(e=0;e<a&&n[e]===d[e];e++);var S=a-e;for(o=1;o<=S&&n[a-o]===d[g-o];o++);return Pi=d.slice(e,1<o?1-o:void 0)}function Xi(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Qi(){return!0}function xh(){return!1}function Qt(e){function n(a,o,d,g,S){this._reactName=a,this._targetInst=d,this.type=o,this.nativeEvent=g,this.target=S,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(a=e[k],this[k]=a?a(g):g[k]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Qi:xh,this.isPropagationStopped=xh,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Qi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Qi)},persist:function(){},isPersistent:Qi}),n}var Qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ki=Qt(Qr),Aa=y({},Qr,{view:0,detail:0}),Ob=Qt(Aa),eu,tu,Ma,Zi=y({},Aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,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!==Ma&&(Ma&&e.type==="mousemove"?(eu=e.screenX-Ma.screenX,tu=e.screenY-Ma.screenY):tu=eu=0,Ma=e),eu)},movementY:function(e){return"movementY"in e?e.movementY:tu}}),bh=Qt(Zi),_b=y({},Zi,{dataTransfer:0}),Lb=Qt(_b),Ub=y({},Aa,{relatedTarget:0}),nu=Qt(Ub),Bb=y({},Qr,{animationName:0,elapsedTime:0,pseudoElement:0}),Hb=Qt(Bb),qb=y({},Qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ib=Qt(qb),Vb=y({},Qr,{data:0}),vh=Qt(Vb),$b={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fb={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"},Yb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gb(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Yb[e])?!!n[e]:!1}function ru(){return Gb}var Pb=y({},Aa,{key:function(e){if(e.key){var n=$b[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Xi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Fb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(e){return e.type==="keypress"?Xi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Xb=Qt(Pb),Qb=y({},Zi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sh=Qt(Qb),Kb=y({},Aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),Zb=Qt(Kb),Jb=y({},Qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wb=Qt(Jb),ev=y({},Zi,{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}),tv=Qt(ev),nv=y({},Qr,{newState:0,oldState:0}),rv=Qt(nv),lv=[9,13,27,32],lu=Yn&&"CompositionEvent"in window,Da=null;Yn&&"documentMode"in document&&(Da=document.documentMode);var av=Yn&&"TextEvent"in window&&!Da,wh=Yn&&(!lu||Da&&8<Da&&11>=Da),kh=" ",Ch=!1;function Nh(e,n){switch(e){case"keyup":return lv.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Al=!1;function iv(e,n){switch(e){case"compositionend":return jh(n);case"keypress":return n.which!==32?null:(Ch=!0,kh);case"textInput":return e=n.data,e===kh&&Ch?null:e;default:return null}}function ov(e,n){if(Al)return e==="compositionend"||!lu&&Nh(e,n)?(e=yh(),Pi=Ws=mr=null,Al=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return wh&&n.locale!=="ko"?null:n.data;default:return null}}var sv={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 Eh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!sv[e.type]:n==="textarea"}function Th(e,n,a,o){El?Tl?Tl.push(o):Tl=[o]:El=o,n=Io(n,"onChange"),0<n.length&&(a=new Ki("onChange","change",null,a,o),e.push({event:a,listeners:n}))}var Ra=null,za=null;function uv(e){cg(e,0)}function Ji(e){var n=ja(e);if(uh(n))return e}function Ah(e,n){if(e==="change")return n}var Mh=!1;if(Yn){var au;if(Yn){var iu="oninput"in document;if(!iu){var Dh=document.createElement("div");Dh.setAttribute("oninput","return;"),iu=typeof Dh.oninput=="function"}au=iu}else au=!1;Mh=au&&(!document.documentMode||9<document.documentMode)}function Rh(){Ra&&(Ra.detachEvent("onpropertychange",zh),za=Ra=null)}function zh(e){if(e.propertyName==="value"&&Ji(za)){var n=[];Th(n,za,e,Ks(e)),gh(uv,n)}}function cv(e,n,a){e==="focusin"?(Rh(),Ra=n,za=a,Ra.attachEvent("onpropertychange",zh)):e==="focusout"&&Rh()}function fv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ji(za)}function dv(e,n){if(e==="click")return Ji(n)}function hv(e,n){if(e==="input"||e==="change")return Ji(n)}function mv(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var rn=typeof Object.is=="function"?Object.is:mv;function Oa(e,n){if(rn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),o=Object.keys(n);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var d=a[o];if(!Qe.call(n,d)||!rn(e[d],n[d]))return!1}return!0}function Oh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _h(e,n){var a=Oh(e);e=0;for(var o;a;){if(a.nodeType===3){if(o=e+a.textContent.length,e<=n&&o>=n)return{node:a,offset:n-e};e=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Oh(a)}}function Lh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Lh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Uh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Yi(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Yi(e.document)}return n}function ou(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var pv=Yn&&"documentMode"in document&&11>=document.documentMode,Ml=null,su=null,_a=null,uu=!1;function Bh(e,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;uu||Ml==null||Ml!==Yi(o)||(o=Ml,"selectionStart"in o&&ou(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),_a&&Oa(_a,o)||(_a=o,o=Io(su,"onSelect"),0<o.length&&(n=new Ki("onSelect","select",null,n,a),e.push({event:n,listeners:o}),n.target=Ml)))}function Kr(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Dl={animationend:Kr("Animation","AnimationEnd"),animationiteration:Kr("Animation","AnimationIteration"),animationstart:Kr("Animation","AnimationStart"),transitionrun:Kr("Transition","TransitionRun"),transitionstart:Kr("Transition","TransitionStart"),transitioncancel:Kr("Transition","TransitionCancel"),transitionend:Kr("Transition","TransitionEnd")},cu={},Hh={};Yn&&(Hh=document.createElement("div").style,"AnimationEvent"in window||(delete Dl.animationend.animation,delete Dl.animationiteration.animation,delete Dl.animationstart.animation),"TransitionEvent"in window||delete Dl.transitionend.transition);function Zr(e){if(cu[e])return cu[e];if(!Dl[e])return e;var n=Dl[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in Hh)return cu[e]=n[a];return e}var qh=Zr("animationend"),Ih=Zr("animationiteration"),Vh=Zr("animationstart"),gv=Zr("transitionrun"),yv=Zr("transitionstart"),xv=Zr("transitioncancel"),$h=Zr("transitionend"),Fh=new Map,fu="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(" ");fu.push("scrollEnd");function Mn(e,n){Fh.set(e,n),Xr(n,[e])}var Wi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},xn=[],Rl=0,du=0;function eo(){for(var e=Rl,n=du=Rl=0;n<e;){var a=xn[n];xn[n++]=null;var o=xn[n];xn[n++]=null;var d=xn[n];xn[n++]=null;var g=xn[n];if(xn[n++]=null,o!==null&&d!==null){var S=o.pending;S===null?d.next=d:(d.next=S.next,S.next=d),o.pending=d}g!==0&&Yh(a,d,g)}}function to(e,n,a,o){xn[Rl++]=e,xn[Rl++]=n,xn[Rl++]=a,xn[Rl++]=o,du|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function hu(e,n,a,o){return to(e,n,a,o),no(e)}function Jr(e,n){return to(e,null,null,n),no(e)}function Yh(e,n,a){e.lanes|=a;var o=e.alternate;o!==null&&(o.lanes|=a);for(var d=!1,g=e.return;g!==null;)g.childLanes|=a,o=g.alternate,o!==null&&(o.childLanes|=a),g.tag===22&&(e=g.stateNode,e===null||e._visibility&1||(d=!0)),e=g,g=g.return;return e.tag===3?(g=e.stateNode,d&&n!==null&&(d=31-We(a),e=g.hiddenUpdates,o=e[d],o===null?e[d]=[n]:o.push(n),n.lane=a|536870912),g):null}function no(e){if(50<ri)throw ri=0,wc=null,Error(i(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var zl={};function bv(e,n,a,o){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=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,n,a,o){return new bv(e,n,a,o)}function mu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gn(e,n){var a=e.alternate;return a===null?(a=ln(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,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,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Gh(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=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,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function ro(e,n,a,o,d,g){var S=0;if(o=e,typeof e=="function")mu(e)&&(S=1);else if(typeof e=="string")S=CS(e,a,_.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case oe:return e=ln(31,a,n,d),e.elementType=oe,e.lanes=g,e;case N:return Wr(a.children,d,g,n);case A:S=8,d|=24;break;case E:return e=ln(12,a,n,d|2),e.elementType=E,e.lanes=g,e;case P:return e=ln(13,a,n,d),e.elementType=P,e.lanes=g,e;case L:return e=ln(19,a,n,d),e.elementType=L,e.lanes=g,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O:S=10;break e;case M:S=9;break e;case $:S=11;break e;case Y:S=14;break e;case le:S=16,o=null;break e}S=29,a=Error(i(130,e===null?"null":typeof e,"")),o=null}return n=ln(S,a,n,d),n.elementType=e,n.type=o,n.lanes=g,n}function Wr(e,n,a,o){return e=ln(7,e,o,n),e.lanes=a,e}function pu(e,n,a){return e=ln(6,e,null,n),e.lanes=a,e}function Ph(e){var n=ln(18,null,null,0);return n.stateNode=e,n}function gu(e,n,a){return n=ln(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Xh=new WeakMap;function bn(e,n){if(typeof e=="object"&&e!==null){var a=Xh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Yt(n)},Xh.set(e,n),n)}return{value:e,source:n,stack:Yt(n)}}var Ol=[],_l=0,lo=null,La=0,vn=[],Sn=0,pr=null,_n=1,Ln="";function Pn(e,n){Ol[_l++]=La,Ol[_l++]=lo,lo=e,La=n}function Qh(e,n,a){vn[Sn++]=_n,vn[Sn++]=Ln,vn[Sn++]=pr,pr=e;var o=_n;e=Ln;var d=32-We(o)-1;o&=~(1<<d),a+=1;var g=32-We(n)+d;if(30<g){var S=d-d%5;g=(o&(1<<S)-1).toString(32),o>>=S,d-=S,_n=1<<32-We(n)+d|a<<d|o,Ln=g+e}else _n=1<<g|a<<d|o,Ln=e}function yu(e){e.return!==null&&(Pn(e,1),Qh(e,1,0))}function xu(e){for(;e===lo;)lo=Ol[--_l],Ol[_l]=null,La=Ol[--_l],Ol[_l]=null;for(;e===pr;)pr=vn[--Sn],vn[Sn]=null,Ln=vn[--Sn],vn[Sn]=null,_n=vn[--Sn],vn[Sn]=null}function Kh(e,n){vn[Sn++]=_n,vn[Sn++]=Ln,vn[Sn++]=pr,_n=n.id,Ln=n.overflow,pr=e}var Lt=null,ct=null,Ye=!1,gr=null,wn=!1,bu=Error(i(519));function yr(e){var n=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ua(bn(n,e)),bu}function Zh(e){var n=e.stateNode,a=e.type,o=e.memoizedProps;switch(n[_t]=e,n[Xt]=o,a){case"dialog":He("cancel",n),He("close",n);break;case"iframe":case"object":case"embed":He("load",n);break;case"video":case"audio":for(a=0;a<ai.length;a++)He(ai[a],n);break;case"source":He("error",n);break;case"img":case"image":case"link":He("error",n),He("load",n);break;case"details":He("toggle",n);break;case"input":He("invalid",n),ch(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":He("invalid",n);break;case"textarea":He("invalid",n),dh(n,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||o.suppressHydrationWarning===!0||mg(n.textContent,a)?(o.popover!=null&&(He("beforetoggle",n),He("toggle",n)),o.onScroll!=null&&He("scroll",n),o.onScrollEnd!=null&&He("scrollend",n),o.onClick!=null&&(n.onclick=Fn),n=!0):n=!1,n||yr(e,!0)}function Jh(e){for(Lt=e.return;Lt;)switch(Lt.tag){case 5:case 31:case 13:wn=!1;return;case 27:case 3:wn=!0;return;default:Lt=Lt.return}}function Ll(e){if(e!==Lt)return!1;if(!Ye)return Jh(e),Ye=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Uc(e.type,e.memoizedProps)),a=!a),a&&ct&&yr(e),Jh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ct=kg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ct=kg(e)}else n===27?(n=ct,Dr(e.type)?(e=Vc,Vc=null,ct=e):ct=n):ct=Lt?Cn(e.stateNode.nextSibling):null;return!0}function el(){ct=Lt=null,Ye=!1}function vu(){var e=gr;return e!==null&&(Wt===null?Wt=e:Wt.push.apply(Wt,e),gr=null),e}function Ua(e){gr===null?gr=[e]:gr.push(e)}var Su=T(null),tl=null,Xn=null;function xr(e,n,a){j(Su,n._currentValue),n._currentValue=a}function Qn(e){e._currentValue=Su.current,B(Su)}function wu(e,n,a){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===a)break;e=e.return}}function ku(e,n,a,o){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var g=d.dependencies;if(g!==null){var S=d.child;g=g.firstContext;e:for(;g!==null;){var k=g;g=d;for(var z=0;z<n.length;z++)if(k.context===n[z]){g.lanes|=a,k=g.alternate,k!==null&&(k.lanes|=a),wu(g.return,a,e),o||(S=null);break e}g=k.next}}else if(d.tag===18){if(S=d.return,S===null)throw Error(i(341));S.lanes|=a,g=S.alternate,g!==null&&(g.lanes|=a),wu(S,a,e),S=null}else S=d.child;if(S!==null)S.return=d;else for(S=d;S!==null;){if(S===e){S=null;break}if(d=S.sibling,d!==null){d.return=S.return,S=d;break}S=S.return}d=S}}function Ul(e,n,a,o){e=null;for(var d=n,g=!1;d!==null;){if(!g){if((d.flags&524288)!==0)g=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var S=d.alternate;if(S===null)throw Error(i(387));if(S=S.memoizedProps,S!==null){var k=d.type;rn(d.pendingProps.value,S.value)||(e!==null?e.push(k):e=[k])}}else if(d===Z.current){if(S=d.alternate,S===null)throw Error(i(387));S.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(ci):e=[ci])}d=d.return}e!==null&&ku(n,e,a,o),n.flags|=262144}function ao(e){for(e=e.firstContext;e!==null;){if(!rn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function nl(e){tl=e,Xn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ut(e){return Wh(tl,e)}function io(e,n){return tl===null&&nl(e),Wh(e,n)}function Wh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Xn===null){if(e===null)throw Error(i(308));Xn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Xn=Xn.next=n;return a}var vv=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},Sv=t.unstable_scheduleCallback,wv=t.unstable_NormalPriority,kt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cu(){return{controller:new vv,data:new Map,refCount:0}}function Ba(e){e.refCount--,e.refCount===0&&Sv(wv,function(){e.controller.abort()})}var Ha=null,Nu=0,Bl=0,Hl=null;function kv(e,n){if(Ha===null){var a=Ha=[];Nu=0,Bl=Tc(),Hl={status:"pending",value:void 0,then:function(o){a.push(o)}}}return Nu++,n.then(em,em),n}function em(){if(--Nu===0&&Ha!==null){Hl!==null&&(Hl.status="fulfilled");var e=Ha;Ha=null,Bl=0,Hl=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Cv(e,n){var a=[],o={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var d=0;d<a.length;d++)(0,a[d])(n)},function(d){for(o.status="rejected",o.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),o}var tm=R.S;R.S=function(e,n){Bp=se(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&kv(e,n),tm!==null&&tm(e,n)};var rl=T(null);function ju(){var e=rl.current;return e!==null?e:it.pooledCache}function oo(e,n){n===null?j(rl,rl.current):j(rl,n.pool)}function nm(){var e=ju();return e===null?null:{parent:kt._currentValue,pool:e}}var ql=Error(i(460)),Eu=Error(i(474)),so=Error(i(542)),uo={then:function(){}};function rm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function lm(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(Fn,Fn),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,im(e),e;default:if(typeof n.status=="string")n.then(Fn,Fn);else{if(e=it,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var d=n;d.status="fulfilled",d.value=o}},function(o){if(n.status==="pending"){var d=n;d.status="rejected",d.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,im(e),e}throw al=n,ql}}function ll(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(al=a,ql):a}}var al=null;function am(){if(al===null)throw Error(i(459));var e=al;return al=null,e}function im(e){if(e===ql||e===so)throw Error(i(483))}var Il=null,qa=0;function co(e){var n=qa;return qa+=1,Il===null&&(Il=[]),lm(Il,e,n)}function Ia(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function fo(e,n){throw n.$$typeof===b?Error(i(525)):(e=Object.prototype.toString.call(n),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function om(e){function n(q,U){if(e){var I=q.deletions;I===null?(q.deletions=[U],q.flags|=16):I.push(U)}}function a(q,U){if(!e)return null;for(;U!==null;)n(q,U),U=U.sibling;return null}function o(q){for(var U=new Map;q!==null;)q.key!==null?U.set(q.key,q):U.set(q.index,q),q=q.sibling;return U}function d(q,U){return q=Gn(q,U),q.index=0,q.sibling=null,q}function g(q,U,I){return q.index=I,e?(I=q.alternate,I!==null?(I=I.index,I<U?(q.flags|=67108866,U):I):(q.flags|=67108866,U)):(q.flags|=1048576,U)}function S(q){return e&&q.alternate===null&&(q.flags|=67108866),q}function k(q,U,I,re){return U===null||U.tag!==6?(U=pu(I,q.mode,re),U.return=q,U):(U=d(U,I),U.return=q,U)}function z(q,U,I,re){var we=I.type;return we===N?W(q,U,I.props.children,re,I.key):U!==null&&(U.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===le&&ll(we)===U.type)?(U=d(U,I.props),Ia(U,I),U.return=q,U):(U=ro(I.type,I.key,I.props,null,q.mode,re),Ia(U,I),U.return=q,U)}function V(q,U,I,re){return U===null||U.tag!==4||U.stateNode.containerInfo!==I.containerInfo||U.stateNode.implementation!==I.implementation?(U=gu(I,q.mode,re),U.return=q,U):(U=d(U,I.children||[]),U.return=q,U)}function W(q,U,I,re,we){return U===null||U.tag!==7?(U=Wr(I,q.mode,re,we),U.return=q,U):(U=d(U,I),U.return=q,U)}function ae(q,U,I){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=pu(""+U,q.mode,I),U.return=q,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case v:return I=ro(U.type,U.key,U.props,null,q.mode,I),Ia(I,U),I.return=q,I;case C:return U=gu(U,q.mode,I),U.return=q,U;case le:return U=ll(U),ae(q,U,I)}if(ne(U)||G(U))return U=Wr(U,q.mode,I,null),U.return=q,U;if(typeof U.then=="function")return ae(q,co(U),I);if(U.$$typeof===O)return ae(q,io(q,U),I);fo(q,U)}return null}function F(q,U,I,re){var we=U!==null?U.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return we!==null?null:k(q,U,""+I,re);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case v:return I.key===we?z(q,U,I,re):null;case C:return I.key===we?V(q,U,I,re):null;case le:return I=ll(I),F(q,U,I,re)}if(ne(I)||G(I))return we!==null?null:W(q,U,I,re,null);if(typeof I.then=="function")return F(q,U,co(I),re);if(I.$$typeof===O)return F(q,U,io(q,I),re);fo(q,I)}return null}function K(q,U,I,re,we){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return q=q.get(I)||null,k(U,q,""+re,we);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case v:return q=q.get(re.key===null?I:re.key)||null,z(U,q,re,we);case C:return q=q.get(re.key===null?I:re.key)||null,V(U,q,re,we);case le:return re=ll(re),K(q,U,I,re,we)}if(ne(re)||G(re))return q=q.get(I)||null,W(U,q,re,we,null);if(typeof re.then=="function")return K(q,U,I,co(re),we);if(re.$$typeof===O)return K(q,U,I,io(U,re),we);fo(U,re)}return null}function be(q,U,I,re){for(var we=null,Ke=null,ve=U,ze=U=0,Ve=null;ve!==null&&ze<I.length;ze++){ve.index>ze?(Ve=ve,ve=null):Ve=ve.sibling;var Ze=F(q,ve,I[ze],re);if(Ze===null){ve===null&&(ve=Ve);break}e&&ve&&Ze.alternate===null&&n(q,ve),U=g(Ze,U,ze),Ke===null?we=Ze:Ke.sibling=Ze,Ke=Ze,ve=Ve}if(ze===I.length)return a(q,ve),Ye&&Pn(q,ze),we;if(ve===null){for(;ze<I.length;ze++)ve=ae(q,I[ze],re),ve!==null&&(U=g(ve,U,ze),Ke===null?we=ve:Ke.sibling=ve,Ke=ve);return Ye&&Pn(q,ze),we}for(ve=o(ve);ze<I.length;ze++)Ve=K(ve,q,ze,I[ze],re),Ve!==null&&(e&&Ve.alternate!==null&&ve.delete(Ve.key===null?ze:Ve.key),U=g(Ve,U,ze),Ke===null?we=Ve:Ke.sibling=Ve,Ke=Ve);return e&&ve.forEach(function(Lr){return n(q,Lr)}),Ye&&Pn(q,ze),we}function Ee(q,U,I,re){if(I==null)throw Error(i(151));for(var we=null,Ke=null,ve=U,ze=U=0,Ve=null,Ze=I.next();ve!==null&&!Ze.done;ze++,Ze=I.next()){ve.index>ze?(Ve=ve,ve=null):Ve=ve.sibling;var Lr=F(q,ve,Ze.value,re);if(Lr===null){ve===null&&(ve=Ve);break}e&&ve&&Lr.alternate===null&&n(q,ve),U=g(Lr,U,ze),Ke===null?we=Lr:Ke.sibling=Lr,Ke=Lr,ve=Ve}if(Ze.done)return a(q,ve),Ye&&Pn(q,ze),we;if(ve===null){for(;!Ze.done;ze++,Ze=I.next())Ze=ae(q,Ze.value,re),Ze!==null&&(U=g(Ze,U,ze),Ke===null?we=Ze:Ke.sibling=Ze,Ke=Ze);return Ye&&Pn(q,ze),we}for(ve=o(ve);!Ze.done;ze++,Ze=I.next())Ze=K(ve,q,ze,Ze.value,re),Ze!==null&&(e&&Ze.alternate!==null&&ve.delete(Ze.key===null?ze:Ze.key),U=g(Ze,U,ze),Ke===null?we=Ze:Ke.sibling=Ze,Ke=Ze);return e&&ve.forEach(function(_S){return n(q,_S)}),Ye&&Pn(q,ze),we}function at(q,U,I,re){if(typeof I=="object"&&I!==null&&I.type===N&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case v:e:{for(var we=I.key;U!==null;){if(U.key===we){if(we=I.type,we===N){if(U.tag===7){a(q,U.sibling),re=d(U,I.props.children),re.return=q,q=re;break e}}else if(U.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===le&&ll(we)===U.type){a(q,U.sibling),re=d(U,I.props),Ia(re,I),re.return=q,q=re;break e}a(q,U);break}else n(q,U);U=U.sibling}I.type===N?(re=Wr(I.props.children,q.mode,re,I.key),re.return=q,q=re):(re=ro(I.type,I.key,I.props,null,q.mode,re),Ia(re,I),re.return=q,q=re)}return S(q);case C:e:{for(we=I.key;U!==null;){if(U.key===we)if(U.tag===4&&U.stateNode.containerInfo===I.containerInfo&&U.stateNode.implementation===I.implementation){a(q,U.sibling),re=d(U,I.children||[]),re.return=q,q=re;break e}else{a(q,U);break}else n(q,U);U=U.sibling}re=gu(I,q.mode,re),re.return=q,q=re}return S(q);case le:return I=ll(I),at(q,U,I,re)}if(ne(I))return be(q,U,I,re);if(G(I)){if(we=G(I),typeof we!="function")throw Error(i(150));return I=we.call(I),Ee(q,U,I,re)}if(typeof I.then=="function")return at(q,U,co(I),re);if(I.$$typeof===O)return at(q,U,io(q,I),re);fo(q,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,U!==null&&U.tag===6?(a(q,U.sibling),re=d(U,I),re.return=q,q=re):(a(q,U),re=pu(I,q.mode,re),re.return=q,q=re),S(q)):a(q,U)}return function(q,U,I,re){try{qa=0;var we=at(q,U,I,re);return Il=null,we}catch(ve){if(ve===ql||ve===so)throw ve;var Ke=ln(29,ve,null,q.mode);return Ke.lanes=re,Ke.return=q,Ke}finally{}}}var il=om(!0),sm=om(!1),br=!1;function Tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Au(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sr(e,n,a){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Je&2)!==0){var d=o.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),o.pending=n,n=no(e),Yh(e,null,a),n}return to(e,o,n,a),no(e)}function Va(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,Wd(e,a)}}function Mu(e,n){var a=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var d=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};g===null?d=g=S:g=g.next=S,a=a.next}while(a!==null);g===null?d=g=n:g=g.next=n}else d=g=n;a={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:g,shared:o.shared,callbacks:o.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Du=!1;function $a(){if(Du){var e=Hl;if(e!==null)throw e}}function Fa(e,n,a,o){Du=!1;var d=e.updateQueue;br=!1;var g=d.firstBaseUpdate,S=d.lastBaseUpdate,k=d.shared.pending;if(k!==null){d.shared.pending=null;var z=k,V=z.next;z.next=null,S===null?g=V:S.next=V,S=z;var W=e.alternate;W!==null&&(W=W.updateQueue,k=W.lastBaseUpdate,k!==S&&(k===null?W.firstBaseUpdate=V:k.next=V,W.lastBaseUpdate=z))}if(g!==null){var ae=d.baseState;S=0,W=V=z=null,k=g;do{var F=k.lane&-536870913,K=F!==k.lane;if(K?(Ie&F)===F:(o&F)===F){F!==0&&F===Bl&&(Du=!0),W!==null&&(W=W.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var be=e,Ee=k;F=n;var at=a;switch(Ee.tag){case 1:if(be=Ee.payload,typeof be=="function"){ae=be.call(at,ae,F);break e}ae=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=Ee.payload,F=typeof be=="function"?be.call(at,ae,F):be,F==null)break e;ae=y({},ae,F);break e;case 2:br=!0}}F=k.callback,F!==null&&(e.flags|=64,K&&(e.flags|=8192),K=d.callbacks,K===null?d.callbacks=[F]:K.push(F))}else K={lane:F,tag:k.tag,payload:k.payload,callback:k.callback,next:null},W===null?(V=W=K,z=ae):W=W.next=K,S|=F;if(k=k.next,k===null){if(k=d.shared.pending,k===null)break;K=k,k=K.next,K.next=null,d.lastBaseUpdate=K,d.shared.pending=null}}while(!0);W===null&&(z=ae),d.baseState=z,d.firstBaseUpdate=V,d.lastBaseUpdate=W,g===null&&(d.shared.lanes=0),jr|=S,e.lanes=S,e.memoizedState=ae}}function um(e,n){if(typeof e!="function")throw Error(i(191,e));e.call(n)}function cm(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)um(a[e],n)}var Vl=T(null),ho=T(0);function fm(e,n){e=lr,j(ho,e),j(Vl,n),lr=e|n.baseLanes}function Ru(){j(ho,lr),j(Vl,Vl.current)}function zu(){lr=ho.current,B(Vl),B(ho)}var an=T(null),kn=null;function wr(e){var n=e.alternate;j(St,St.current&1),j(an,e),kn===null&&(n===null||Vl.current!==null||n.memoizedState!==null)&&(kn=e)}function Ou(e){j(St,St.current),j(an,e),kn===null&&(kn=e)}function dm(e){e.tag===22?(j(St,St.current),j(an,e),kn===null&&(kn=e)):kr()}function kr(){j(St,St.current),j(an,an.current)}function on(e){B(an),kn===e&&(kn=null),B(St)}var St=T(0);function mo(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||qc(a)||Ic(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Kn=0,De=null,rt=null,Ct=null,po=!1,$l=!1,ol=!1,go=0,Ya=0,Fl=null,Nv=0;function xt(){throw Error(i(321))}function _u(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!rn(e[a],n[a]))return!1;return!0}function Lu(e,n,a,o,d,g){return Kn=g,De=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,R.H=e===null||e.memoizedState===null?Qm:Zu,ol=!1,g=a(o,d),ol=!1,$l&&(g=mm(n,a,o,d)),hm(e),g}function hm(e){R.H=Xa;var n=rt!==null&&rt.next!==null;if(Kn=0,Ct=rt=De=null,po=!1,Ya=0,Fl=null,n)throw Error(i(300));e===null||Nt||(e=e.dependencies,e!==null&&ao(e)&&(Nt=!0))}function mm(e,n,a,o){De=e;var d=0;do{if($l&&(Fl=null),Ya=0,$l=!1,25<=d)throw Error(i(301));if(d+=1,Ct=rt=null,e.updateQueue!=null){var g=e.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}R.H=Km,g=n(a,o)}while($l);return g}function jv(){var e=R.H,n=e.useState()[0];return n=typeof n.then=="function"?Ga(n):n,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(De.flags|=1024),n}function Uu(){var e=go!==0;return go=0,e}function Bu(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Hu(e){if(po){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}po=!1}Kn=0,Ct=rt=De=null,$l=!1,Ya=go=0,Fl=null}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?De.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function wt(){if(rt===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var n=Ct===null?De.memoizedState:Ct.next;if(n!==null)Ct=n,rt=e;else{if(e===null)throw De.alternate===null?Error(i(467)):Error(i(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Ct===null?De.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function yo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ga(e){var n=Ya;return Ya+=1,Fl===null&&(Fl=[]),e=lm(Fl,e,n),n=De,(Ct===null?n.memoizedState:Ct.next)===null&&(n=n.alternate,R.H=n===null||n.memoizedState===null?Qm:Zu),e}function xo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ga(e);if(e.$$typeof===O)return Ut(e)}throw Error(i(438,String(e)))}function qu(e){var n=null,a=De.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var o=De.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=yo(),De.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),o=0;o<e;o++)a[o]=H;return n.index++,a}function Zn(e,n){return typeof n=="function"?n(e):n}function bo(e){var n=wt();return Iu(n,rt,e)}function Iu(e,n,a){var o=e.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=a;var d=e.baseQueue,g=o.pending;if(g!==null){if(d!==null){var S=d.next;d.next=g.next,g.next=S}n.baseQueue=d=g,o.pending=null}if(g=e.baseState,d===null)e.memoizedState=g;else{n=d.next;var k=S=null,z=null,V=n,W=!1;do{var ae=V.lane&-536870913;if(ae!==V.lane?(Ie&ae)===ae:(Kn&ae)===ae){var F=V.revertLane;if(F===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),ae===Bl&&(W=!0);else if((Kn&F)===F){V=V.next,F===Bl&&(W=!0);continue}else ae={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},z===null?(k=z=ae,S=g):z=z.next=ae,De.lanes|=F,jr|=F;ae=V.action,ol&&a(g,ae),g=V.hasEagerState?V.eagerState:a(g,ae)}else F={lane:ae,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},z===null?(k=z=F,S=g):z=z.next=F,De.lanes|=ae,jr|=ae;V=V.next}while(V!==null&&V!==n);if(z===null?S=g:z.next=k,!rn(g,e.memoizedState)&&(Nt=!0,W&&(a=Hl,a!==null)))throw a;e.memoizedState=g,e.baseState=S,e.baseQueue=z,o.lastRenderedState=g}return d===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Vu(e){var n=wt(),a=n.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var o=a.dispatch,d=a.pending,g=n.memoizedState;if(d!==null){a.pending=null;var S=d=d.next;do g=e(g,S.action),S=S.next;while(S!==d);rn(g,n.memoizedState)||(Nt=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),a.lastRenderedState=g}return[g,o]}function pm(e,n,a){var o=De,d=wt(),g=Ye;if(g){if(a===void 0)throw Error(i(407));a=a()}else a=n();var S=!rn((rt||d).memoizedState,a);if(S&&(d.memoizedState=a,Nt=!0),d=d.queue,Yu(xm.bind(null,o,d,e),[e]),d.getSnapshot!==n||S||Ct!==null&&Ct.memoizedState.tag&1){if(o.flags|=2048,Yl(9,{destroy:void 0},ym.bind(null,o,d,a,n),null),it===null)throw Error(i(349));g||(Kn&127)!==0||gm(o,n,a)}return a}function gm(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=De.updateQueue,n===null?(n=yo(),De.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function ym(e,n,a,o){n.value=a,n.getSnapshot=o,bm(n)&&vm(e)}function xm(e,n,a){return a(function(){bm(n)&&vm(e)})}function bm(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!rn(e,a)}catch{return!0}}function vm(e){var n=Jr(e,2);n!==null&&en(n,e,2)}function $u(e){var n=Gt();if(typeof e=="function"){var a=e;if(e=a(),ol){Dt(!0);try{a()}finally{Dt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:e},n}function Sm(e,n,a,o){return e.baseState=a,Iu(e,rt,typeof o=="function"?o:Zn)}function Ev(e,n,a,o,d){if(wo(e))throw Error(i(485));if(e=n.action,e!==null){var g={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){g.listeners.push(S)}};R.T!==null?a(!0):g.isTransition=!1,o(g),a=n.pending,a===null?(g.next=n.pending=g,wm(n,g)):(g.next=a.next,n.pending=a.next=g)}}function wm(e,n){var a=n.action,o=n.payload,d=e.state;if(n.isTransition){var g=R.T,S={};R.T=S;try{var k=a(d,o),z=R.S;z!==null&&z(S,k),km(e,n,k)}catch(V){Fu(e,n,V)}finally{g!==null&&S.types!==null&&(g.types=S.types),R.T=g}}else try{g=a(d,o),km(e,n,g)}catch(V){Fu(e,n,V)}}function km(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){Cm(e,n,o)},function(o){return Fu(e,n,o)}):Cm(e,n,a)}function Cm(e,n,a){n.status="fulfilled",n.value=a,Nm(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,wm(e,a)))}function Fu(e,n,a){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=a,Nm(n),n=n.next;while(n!==o)}e.action=null}function Nm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function jm(e,n){return n}function Em(e,n){if(Ye){var a=it.formState;if(a!==null){e:{var o=De;if(Ye){if(ct){t:{for(var d=ct,g=wn;d.nodeType!==8;){if(!g){d=null;break t}if(d=Cn(d.nextSibling),d===null){d=null;break t}}g=d.data,d=g==="F!"||g==="F"?d:null}if(d){ct=Cn(d.nextSibling),o=d.data==="F!";break e}}yr(o)}o=!1}o&&(n=a[0])}}return a=Gt(),a.memoizedState=a.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jm,lastRenderedState:n},a.queue=o,a=Gm.bind(null,De,o),o.dispatch=a,o=$u(!1),g=Ku.bind(null,De,!1,o.queue),o=Gt(),d={state:n,dispatch:null,action:e,pending:null},o.queue=d,a=Ev.bind(null,De,d,g,a),d.dispatch=a,o.memoizedState=e,[n,a,!1]}function Tm(e){var n=wt();return Am(n,rt,e)}function Am(e,n,a){if(n=Iu(e,n,jm)[0],e=bo(Zn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=Ga(n)}catch(S){throw S===ql?so:S}else o=n;n=wt();var d=n.queue,g=d.dispatch;return a!==n.memoizedState&&(De.flags|=2048,Yl(9,{destroy:void 0},Tv.bind(null,d,a),null)),[o,g,e]}function Tv(e,n){e.action=n}function Mm(e){var n=wt(),a=rt;if(a!==null)return Am(n,a,e);wt(),n=n.memoizedState,a=wt();var o=a.queue.dispatch;return a.memoizedState=e,[n,o,!1]}function Yl(e,n,a,o){return e={tag:e,create:a,deps:o,inst:n,next:null},n=De.updateQueue,n===null&&(n=yo(),De.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(o=a.next,a.next=e,e.next=o,n.lastEffect=e),e}function Dm(){return wt().memoizedState}function vo(e,n,a,o){var d=Gt();De.flags|=e,d.memoizedState=Yl(1|n,{destroy:void 0},a,o===void 0?null:o)}function So(e,n,a,o){var d=wt();o=o===void 0?null:o;var g=d.memoizedState.inst;rt!==null&&o!==null&&_u(o,rt.memoizedState.deps)?d.memoizedState=Yl(n,g,a,o):(De.flags|=e,d.memoizedState=Yl(1|n,g,a,o))}function Rm(e,n){vo(8390656,8,e,n)}function Yu(e,n){So(2048,8,e,n)}function Av(e){De.flags|=4;var n=De.updateQueue;if(n===null)n=yo(),De.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function zm(e){var n=wt().memoizedState;return Av({ref:n,nextImpl:e}),function(){if((Je&2)!==0)throw Error(i(440));return n.impl.apply(void 0,arguments)}}function Om(e,n){return So(4,2,e,n)}function _m(e,n){return So(4,4,e,n)}function Lm(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Um(e,n,a){a=a!=null?a.concat([e]):null,So(4,4,Lm.bind(null,n,e),a)}function Gu(){}function Bm(e,n){var a=wt();n=n===void 0?null:n;var o=a.memoizedState;return n!==null&&_u(n,o[1])?o[0]:(a.memoizedState=[e,n],e)}function Hm(e,n){var a=wt();n=n===void 0?null:n;var o=a.memoizedState;if(n!==null&&_u(n,o[1]))return o[0];if(o=e(),ol){Dt(!0);try{e()}finally{Dt(!1)}}return a.memoizedState=[o,n],o}function Pu(e,n,a){return a===void 0||(Kn&1073741824)!==0&&(Ie&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=qp(),De.lanes|=e,jr|=e,a)}function qm(e,n,a,o){return rn(a,n)?a:Vl.current!==null?(e=Pu(e,a,o),rn(e,n)||(Nt=!0),e):(Kn&42)===0||(Kn&1073741824)!==0&&(Ie&261930)===0?(Nt=!0,e.memoizedState=a):(e=qp(),De.lanes|=e,jr|=e,n)}function Im(e,n,a,o,d){var g=J.p;J.p=g!==0&&8>g?g:8;var S=R.T,k={};R.T=k,Ku(e,!1,n,a);try{var z=d(),V=R.S;if(V!==null&&V(k,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var W=Cv(z,o);Pa(e,n,W,cn(e))}else Pa(e,n,o,cn(e))}catch(ae){Pa(e,n,{then:function(){},status:"rejected",reason:ae},cn())}finally{J.p=g,S!==null&&k.types!==null&&(S.types=k.types),R.T=S}}function Mv(){}function Xu(e,n,a,o){if(e.tag!==5)throw Error(i(476));var d=Vm(e).queue;Im(e,d,n,ie,a===null?Mv:function(){return $m(e),a(o)})}function Vm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:ie},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function $m(e){var n=Vm(e);n.next===null&&(n=e.alternate.memoizedState),Pa(e,n.next.queue,{},cn())}function Qu(){return Ut(ci)}function Fm(){return wt().memoizedState}function Ym(){return wt().memoizedState}function Dv(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=cn();e=vr(a);var o=Sr(n,e,a);o!==null&&(en(o,n,a),Va(o,n,a)),n={cache:Cu()},e.payload=n;return}n=n.return}}function Rv(e,n,a){var o=cn();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},wo(e)?Pm(n,a):(a=hu(e,n,a,o),a!==null&&(en(a,e,o),Xm(a,n,o)))}function Gm(e,n,a){var o=cn();Pa(e,n,a,o)}function Pa(e,n,a,o){var d={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(wo(e))Pm(n,d);else{var g=e.alternate;if(e.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var S=n.lastRenderedState,k=g(S,a);if(d.hasEagerState=!0,d.eagerState=k,rn(k,S))return to(e,n,d,0),it===null&&eo(),!1}catch{}finally{}if(a=hu(e,n,d,o),a!==null)return en(a,e,o),Xm(a,n,o),!0}return!1}function Ku(e,n,a,o){if(o={lane:2,revertLane:Tc(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},wo(e)){if(n)throw Error(i(479))}else n=hu(e,a,o,2),n!==null&&en(n,e,2)}function wo(e){var n=e.alternate;return e===De||n!==null&&n===De}function Pm(e,n){$l=po=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function Xm(e,n,a){if((a&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,Wd(e,a)}}var Xa={readContext:Ut,use:xo,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};Xa.useEffectEvent=xt;var Qm={readContext:Ut,use:xo,useCallback:function(e,n){return Gt().memoizedState=[e,n===void 0?null:n],e},useContext:Ut,useEffect:Rm,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,vo(4194308,4,Lm.bind(null,n,e),a)},useLayoutEffect:function(e,n){return vo(4194308,4,e,n)},useInsertionEffect:function(e,n){vo(4,2,e,n)},useMemo:function(e,n){var a=Gt();n=n===void 0?null:n;var o=e();if(ol){Dt(!0);try{e()}finally{Dt(!1)}}return a.memoizedState=[o,n],o},useReducer:function(e,n,a){var o=Gt();if(a!==void 0){var d=a(n);if(ol){Dt(!0);try{a(n)}finally{Dt(!1)}}}else d=n;return o.memoizedState=o.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},o.queue=e,e=e.dispatch=Rv.bind(null,De,e),[o.memoizedState,e]},useRef:function(e){var n=Gt();return e={current:e},n.memoizedState=e},useState:function(e){e=$u(e);var n=e.queue,a=Gm.bind(null,De,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Gu,useDeferredValue:function(e,n){var a=Gt();return Pu(a,e,n)},useTransition:function(){var e=$u(!1);return e=Im.bind(null,De,e.queue,!0,!1),Gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var o=De,d=Gt();if(Ye){if(a===void 0)throw Error(i(407));a=a()}else{if(a=n(),it===null)throw Error(i(349));(Ie&127)!==0||gm(o,n,a)}d.memoizedState=a;var g={value:a,getSnapshot:n};return d.queue=g,Rm(xm.bind(null,o,g,e),[e]),o.flags|=2048,Yl(9,{destroy:void 0},ym.bind(null,o,g,a,n),null),a},useId:function(){var e=Gt(),n=it.identifierPrefix;if(Ye){var a=Ln,o=_n;a=(o&~(1<<32-We(o)-1)).toString(32)+a,n="_"+n+"R_"+a,a=go++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=Nv++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Qu,useFormState:Em,useActionState:Em,useOptimistic:function(e){var n=Gt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Ku.bind(null,De,!0,a),a.dispatch=n,[e,n]},useMemoCache:qu,useCacheRefresh:function(){return Gt().memoizedState=Dv.bind(null,De)},useEffectEvent:function(e){var n=Gt(),a={impl:e};return n.memoizedState=a,function(){if((Je&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Zu={readContext:Ut,use:xo,useCallback:Bm,useContext:Ut,useEffect:Yu,useImperativeHandle:Um,useInsertionEffect:Om,useLayoutEffect:_m,useMemo:Hm,useReducer:bo,useRef:Dm,useState:function(){return bo(Zn)},useDebugValue:Gu,useDeferredValue:function(e,n){var a=wt();return qm(a,rt.memoizedState,e,n)},useTransition:function(){var e=bo(Zn)[0],n=wt().memoizedState;return[typeof e=="boolean"?e:Ga(e),n]},useSyncExternalStore:pm,useId:Fm,useHostTransitionStatus:Qu,useFormState:Tm,useActionState:Tm,useOptimistic:function(e,n){var a=wt();return Sm(a,rt,e,n)},useMemoCache:qu,useCacheRefresh:Ym};Zu.useEffectEvent=zm;var Km={readContext:Ut,use:xo,useCallback:Bm,useContext:Ut,useEffect:Yu,useImperativeHandle:Um,useInsertionEffect:Om,useLayoutEffect:_m,useMemo:Hm,useReducer:Vu,useRef:Dm,useState:function(){return Vu(Zn)},useDebugValue:Gu,useDeferredValue:function(e,n){var a=wt();return rt===null?Pu(a,e,n):qm(a,rt.memoizedState,e,n)},useTransition:function(){var e=Vu(Zn)[0],n=wt().memoizedState;return[typeof e=="boolean"?e:Ga(e),n]},useSyncExternalStore:pm,useId:Fm,useHostTransitionStatus:Qu,useFormState:Mm,useActionState:Mm,useOptimistic:function(e,n){var a=wt();return rt!==null?Sm(a,rt,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:qu,useCacheRefresh:Ym};Km.useEffectEvent=zm;function Ju(e,n,a,o){n=e.memoizedState,a=a(o,n),a=a==null?n:y({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Wu={enqueueSetState:function(e,n,a){e=e._reactInternals;var o=cn(),d=vr(o);d.payload=n,a!=null&&(d.callback=a),n=Sr(e,d,o),n!==null&&(en(n,e,o),Va(n,e,o))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var o=cn(),d=vr(o);d.tag=1,d.payload=n,a!=null&&(d.callback=a),n=Sr(e,d,o),n!==null&&(en(n,e,o),Va(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=cn(),o=vr(a);o.tag=2,n!=null&&(o.callback=n),n=Sr(e,o,a),n!==null&&(en(n,e,a),Va(n,e,a))}};function Zm(e,n,a,o,d,g,S){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,g,S):n.prototype&&n.prototype.isPureReactComponent?!Oa(a,o)||!Oa(d,g):!0}function Jm(e,n,a,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,o),n.state!==e&&Wu.enqueueReplaceState(n,n.state,null)}function sl(e,n){var a=n;if("ref"in n){a={};for(var o in n)o!=="ref"&&(a[o]=n[o])}if(e=e.defaultProps){a===n&&(a=y({},a));for(var d in e)a[d]===void 0&&(a[d]=e[d])}return a}function Wm(e){Wi(e)}function ep(e){console.error(e)}function tp(e){Wi(e)}function ko(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function np(e,n,a){try{var o=e.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function ec(e,n,a){return a=vr(a),a.tag=3,a.payload={element:null},a.callback=function(){ko(e,n)},a}function rp(e){return e=vr(e),e.tag=3,e}function lp(e,n,a,o){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var g=o.value;e.payload=function(){return d(g)},e.callback=function(){np(n,a,o)}}var S=a.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(e.callback=function(){np(n,a,o),typeof d!="function"&&(Er===null?Er=new Set([this]):Er.add(this));var k=o.stack;this.componentDidCatch(o.value,{componentStack:k!==null?k:""})})}function zv(e,n,a,o,d){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=a.alternate,n!==null&&Ul(n,a,d,!0),a=an.current,a!==null){switch(a.tag){case 31:case 13:return kn===null?_o():a.alternate===null&&bt===0&&(bt=3),a.flags&=-257,a.flags|=65536,a.lanes=d,o===uo?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([o]):n.add(o),Nc(e,o,d)),!1;case 22:return a.flags|=65536,o===uo?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([o]):a.add(o)),Nc(e,o,d)),!1}throw Error(i(435,a.tag))}return Nc(e,o,d),_o(),!1}if(Ye)return n=an.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,o!==bu&&(e=Error(i(422),{cause:o}),Ua(bn(e,a)))):(o!==bu&&(n=Error(i(423),{cause:o}),Ua(bn(n,a))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,o=bn(o,a),d=ec(e.stateNode,o,d),Mu(e,d),bt!==4&&(bt=2)),!1;var g=Error(i(520),{cause:o});if(g=bn(g,a),ni===null?ni=[g]:ni.push(g),bt!==4&&(bt=2),n===null)return!0;o=bn(o,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=d&-d,a.lanes|=e,e=ec(a.stateNode,o,e),Mu(a,e),!1;case 1:if(n=a.type,g=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Er===null||!Er.has(g))))return a.flags|=65536,d&=-d,a.lanes|=d,d=rp(d),lp(d,e,a,o),Mu(a,d),!1}a=a.return}while(a!==null);return!1}var tc=Error(i(461)),Nt=!1;function Bt(e,n,a,o){n.child=e===null?sm(n,null,a,o):il(n,e.child,a,o)}function ap(e,n,a,o,d){a=a.render;var g=n.ref;if("ref"in o){var S={};for(var k in o)k!=="ref"&&(S[k]=o[k])}else S=o;return nl(n),o=Lu(e,n,a,S,g,d),k=Uu(),e!==null&&!Nt?(Bu(e,n,d),Jn(e,n,d)):(Ye&&k&&yu(n),n.flags|=1,Bt(e,n,o,d),n.child)}function ip(e,n,a,o,d){if(e===null){var g=a.type;return typeof g=="function"&&!mu(g)&&g.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=g,op(e,n,g,o,d)):(e=ro(a.type,null,o,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(g=e.child,!uc(e,d)){var S=g.memoizedProps;if(a=a.compare,a=a!==null?a:Oa,a(S,o)&&e.ref===n.ref)return Jn(e,n,d)}return n.flags|=1,e=Gn(g,o),e.ref=n.ref,e.return=n,n.child=e}function op(e,n,a,o,d){if(e!==null){var g=e.memoizedProps;if(Oa(g,o)&&e.ref===n.ref)if(Nt=!1,n.pendingProps=o=g,uc(e,d))(e.flags&131072)!==0&&(Nt=!0);else return n.lanes=e.lanes,Jn(e,n,d)}return nc(e,n,a,o,d)}function sp(e,n,a,o){var d=o.children,g=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|a:a,e!==null){for(o=n.child=e.child,d=0;o!==null;)d=d|o.lanes|o.childLanes,o=o.sibling;o=d&~g}else o=0,n.child=null;return up(e,n,g,a,o)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&oo(n,g!==null?g.cachePool:null),g!==null?fm(n,g):Ru(),dm(n);else return o=n.lanes=536870912,up(e,n,g!==null?g.baseLanes|a:a,a,o)}else g!==null?(oo(n,g.cachePool),fm(n,g),kr(),n.memoizedState=null):(e!==null&&oo(n,null),Ru(),kr());return Bt(e,n,d,a),n.child}function Qa(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function up(e,n,a,o,d){var g=ju();return g=g===null?null:{parent:kt._currentValue,pool:g},n.memoizedState={baseLanes:a,cachePool:g},e!==null&&oo(n,null),Ru(),dm(n),e!==null&&Ul(e,n,o,!0),n.childLanes=d,null}function Co(e,n){return n=jo({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function cp(e,n,a){return il(n,e.child,null,a),e=Co(n,n.pendingProps),e.flags|=2,on(n),n.memoizedState=null,e}function Ov(e,n,a){var o=n.pendingProps,d=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ye){if(o.mode==="hidden")return e=Co(n,o),n.lanes=536870912,Qa(null,e);if(Ou(n),(e=ct)?(e=wg(e,wn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:pr!==null?{id:_n,overflow:Ln}:null,retryLane:536870912,hydrationErrors:null},a=Ph(e),a.return=n,n.child=a,Lt=n,ct=null)):e=null,e===null)throw yr(n);return n.lanes=536870912,null}return Co(n,o)}var g=e.memoizedState;if(g!==null){var S=g.dehydrated;if(Ou(n),d)if(n.flags&256)n.flags&=-257,n=cp(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(i(558));else if(Nt||Ul(e,n,a,!1),d=(a&e.childLanes)!==0,Nt||d){if(o=it,o!==null&&(S=eh(o,a),S!==0&&S!==g.retryLane))throw g.retryLane=S,Jr(e,S),en(o,e,S),tc;_o(),n=cp(e,n,a)}else e=g.treeContext,ct=Cn(S.nextSibling),Lt=n,Ye=!0,gr=null,wn=!1,e!==null&&Kh(n,e),n=Co(n,o),n.flags|=4096;return n}return e=Gn(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function No(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function nc(e,n,a,o,d){return nl(n),a=Lu(e,n,a,o,void 0,d),o=Uu(),e!==null&&!Nt?(Bu(e,n,d),Jn(e,n,d)):(Ye&&o&&yu(n),n.flags|=1,Bt(e,n,a,d),n.child)}function fp(e,n,a,o,d,g){return nl(n),n.updateQueue=null,a=mm(n,o,a,d),hm(e),o=Uu(),e!==null&&!Nt?(Bu(e,n,g),Jn(e,n,g)):(Ye&&o&&yu(n),n.flags|=1,Bt(e,n,a,g),n.child)}function dp(e,n,a,o,d){if(nl(n),n.stateNode===null){var g=zl,S=a.contextType;typeof S=="object"&&S!==null&&(g=Ut(S)),g=new a(o,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Wu,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=o,g.state=n.memoizedState,g.refs={},Tu(n),S=a.contextType,g.context=typeof S=="object"&&S!==null?Ut(S):zl,g.state=n.memoizedState,S=a.getDerivedStateFromProps,typeof S=="function"&&(Ju(n,a,S,o),g.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(S=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),S!==g.state&&Wu.enqueueReplaceState(g,g.state,null),Fa(n,o,g,d),$a(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){g=n.stateNode;var k=n.memoizedProps,z=sl(a,k);g.props=z;var V=g.context,W=a.contextType;S=zl,typeof W=="object"&&W!==null&&(S=Ut(W));var ae=a.getDerivedStateFromProps;W=typeof ae=="function"||typeof g.getSnapshotBeforeUpdate=="function",k=n.pendingProps!==k,W||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k||V!==S)&&Jm(n,g,o,S),br=!1;var F=n.memoizedState;g.state=F,Fa(n,o,g,d),$a(),V=n.memoizedState,k||F!==V||br?(typeof ae=="function"&&(Ju(n,a,ae,o),V=n.memoizedState),(z=br||Zm(n,a,z,o,F,V,S))?(W||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=V),g.props=o,g.state=V,g.context=S,o=z):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{g=n.stateNode,Au(e,n),S=n.memoizedProps,W=sl(a,S),g.props=W,ae=n.pendingProps,F=g.context,V=a.contextType,z=zl,typeof V=="object"&&V!==null&&(z=Ut(V)),k=a.getDerivedStateFromProps,(V=typeof k=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(S!==ae||F!==z)&&Jm(n,g,o,z),br=!1,F=n.memoizedState,g.state=F,Fa(n,o,g,d),$a();var K=n.memoizedState;S!==ae||F!==K||br||e!==null&&e.dependencies!==null&&ao(e.dependencies)?(typeof k=="function"&&(Ju(n,a,k,o),K=n.memoizedState),(W=br||Zm(n,a,W,o,F,K,z)||e!==null&&e.dependencies!==null&&ao(e.dependencies))?(V||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(o,K,z),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(o,K,z)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||S===e.memoizedProps&&F===e.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&F===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=K),g.props=o,g.state=K,g.context=z,o=W):(typeof g.componentDidUpdate!="function"||S===e.memoizedProps&&F===e.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&F===e.memoizedState||(n.flags|=1024),o=!1)}return g=o,No(e,n),o=(n.flags&128)!==0,g||o?(g=n.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,e!==null&&o?(n.child=il(n,e.child,null,d),n.child=il(n,null,a,d)):Bt(e,n,a,d),n.memoizedState=g.state,e=n.child):e=Jn(e,n,d),e}function hp(e,n,a,o){return el(),n.flags|=256,Bt(e,n,a,o),n.child}var rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lc(e){return{baseLanes:e,cachePool:nm()}}function ac(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=un),e}function mp(e,n,a){var o=n.pendingProps,d=!1,g=(n.flags&128)!==0,S;if((S=g)||(S=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),S&&(d=!0,n.flags&=-129),S=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ye){if(d?wr(n):kr(),(e=ct)?(e=wg(e,wn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:pr!==null?{id:_n,overflow:Ln}:null,retryLane:536870912,hydrationErrors:null},a=Ph(e),a.return=n,n.child=a,Lt=n,ct=null)):e=null,e===null)throw yr(n);return Ic(e)?n.lanes=32:n.lanes=536870912,null}var k=o.children;return o=o.fallback,d?(kr(),d=n.mode,k=jo({mode:"hidden",children:k},d),o=Wr(o,d,a,null),k.return=n,o.return=n,k.sibling=o,n.child=k,o=n.child,o.memoizedState=lc(a),o.childLanes=ac(e,S,a),n.memoizedState=rc,Qa(null,o)):(wr(n),ic(n,k))}var z=e.memoizedState;if(z!==null&&(k=z.dehydrated,k!==null)){if(g)n.flags&256?(wr(n),n.flags&=-257,n=oc(e,n,a)):n.memoizedState!==null?(kr(),n.child=e.child,n.flags|=128,n=null):(kr(),k=o.fallback,d=n.mode,o=jo({mode:"visible",children:o.children},d),k=Wr(k,d,a,null),k.flags|=2,o.return=n,k.return=n,o.sibling=k,n.child=o,il(n,e.child,null,a),o=n.child,o.memoizedState=lc(a),o.childLanes=ac(e,S,a),n.memoizedState=rc,n=Qa(null,o));else if(wr(n),Ic(k)){if(S=k.nextSibling&&k.nextSibling.dataset,S)var V=S.dgst;S=V,o=Error(i(419)),o.stack="",o.digest=S,Ua({value:o,source:null,stack:null}),n=oc(e,n,a)}else if(Nt||Ul(e,n,a,!1),S=(a&e.childLanes)!==0,Nt||S){if(S=it,S!==null&&(o=eh(S,a),o!==0&&o!==z.retryLane))throw z.retryLane=o,Jr(e,o),en(S,e,o),tc;qc(k)||_o(),n=oc(e,n,a)}else qc(k)?(n.flags|=192,n.child=e.child,n=null):(e=z.treeContext,ct=Cn(k.nextSibling),Lt=n,Ye=!0,gr=null,wn=!1,e!==null&&Kh(n,e),n=ic(n,o.children),n.flags|=4096);return n}return d?(kr(),k=o.fallback,d=n.mode,z=e.child,V=z.sibling,o=Gn(z,{mode:"hidden",children:o.children}),o.subtreeFlags=z.subtreeFlags&65011712,V!==null?k=Gn(V,k):(k=Wr(k,d,a,null),k.flags|=2),k.return=n,o.return=n,o.sibling=k,n.child=o,Qa(null,o),o=n.child,k=e.child.memoizedState,k===null?k=lc(a):(d=k.cachePool,d!==null?(z=kt._currentValue,d=d.parent!==z?{parent:z,pool:z}:d):d=nm(),k={baseLanes:k.baseLanes|a,cachePool:d}),o.memoizedState=k,o.childLanes=ac(e,S,a),n.memoizedState=rc,Qa(e.child,o)):(wr(n),a=e.child,e=a.sibling,a=Gn(a,{mode:"visible",children:o.children}),a.return=n,a.sibling=null,e!==null&&(S=n.deletions,S===null?(n.deletions=[e],n.flags|=16):S.push(e)),n.child=a,n.memoizedState=null,a)}function ic(e,n){return n=jo({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function jo(e,n){return e=ln(22,e,null,n),e.lanes=0,e}function oc(e,n,a){return il(n,e.child,null,a),e=ic(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function pp(e,n,a){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),wu(e.return,n,a)}function sc(e,n,a,o,d,g){var S=e.memoizedState;S===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:d,treeForkCount:g}:(S.isBackwards=n,S.rendering=null,S.renderingStartTime=0,S.last=o,S.tail=a,S.tailMode=d,S.treeForkCount=g)}function gp(e,n,a){var o=n.pendingProps,d=o.revealOrder,g=o.tail;o=o.children;var S=St.current,k=(S&2)!==0;if(k?(S=S&1|2,n.flags|=128):S&=1,j(St,S),Bt(e,n,o,a),o=Ye?La:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&pp(e,a,n);else if(e.tag===19)pp(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(a=n.child,d=null;a!==null;)e=a.alternate,e!==null&&mo(e)===null&&(d=a),a=a.sibling;a=d,a===null?(d=n.child,n.child=null):(d=a.sibling,a.sibling=null),sc(n,!1,d,a,g,o);break;case"backwards":case"unstable_legacy-backwards":for(a=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&mo(e)===null){n.child=d;break}e=d.sibling,d.sibling=a,a=d,d=e}sc(n,!0,a,null,g,o);break;case"together":sc(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function Jn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),jr|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Ul(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(i(153));if(n.child!==null){for(e=n.child,a=Gn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=Gn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function uc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&ao(e)))}function _v(e,n,a){switch(n.tag){case 3:xe(n,n.stateNode.containerInfo),xr(n,kt,e.memoizedState.cache),el();break;case 27:case 5:Ae(n);break;case 4:xe(n,n.stateNode.containerInfo);break;case 10:xr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Ou(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(wr(n),n.flags|=128,null):(a&n.child.childLanes)!==0?mp(e,n,a):(wr(n),e=Jn(e,n,a),e!==null?e.sibling:null);wr(n);break;case 19:var d=(e.flags&128)!==0;if(o=(a&n.childLanes)!==0,o||(Ul(e,n,a,!1),o=(a&n.childLanes)!==0),d){if(o)return gp(e,n,a);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),j(St,St.current),o)break;return null;case 22:return n.lanes=0,sp(e,n,a,n.pendingProps);case 24:xr(n,kt,e.memoizedState.cache)}return Jn(e,n,a)}function yp(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)Nt=!0;else{if(!uc(e,a)&&(n.flags&128)===0)return Nt=!1,_v(e,n,a);Nt=(e.flags&131072)!==0}else Nt=!1,Ye&&(n.flags&1048576)!==0&&Qh(n,La,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=ll(n.elementType),n.type=e,typeof e=="function")mu(e)?(o=sl(e,o),n.tag=1,n=dp(null,n,e,o,a)):(n.tag=0,n=nc(null,n,e,o,a));else{if(e!=null){var d=e.$$typeof;if(d===$){n.tag=11,n=ap(null,n,e,o,a);break e}else if(d===Y){n.tag=14,n=ip(null,n,e,o,a);break e}}throw n=ue(e)||e,Error(i(306,n,""))}}return n;case 0:return nc(e,n,n.type,n.pendingProps,a);case 1:return o=n.type,d=sl(o,n.pendingProps),dp(e,n,o,d,a);case 3:e:{if(xe(n,n.stateNode.containerInfo),e===null)throw Error(i(387));o=n.pendingProps;var g=n.memoizedState;d=g.element,Au(e,n),Fa(n,o,null,a);var S=n.memoizedState;if(o=S.cache,xr(n,kt,o),o!==g.cache&&ku(n,[kt],a,!0),$a(),o=S.element,g.isDehydrated)if(g={element:o,isDehydrated:!1,cache:S.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=hp(e,n,o,a);break e}else if(o!==d){d=bn(Error(i(424)),n),Ua(d),n=hp(e,n,o,a);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ct=Cn(e.firstChild),Lt=n,Ye=!0,gr=null,wn=!0,a=sm(n,null,o,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(el(),o===d){n=Jn(e,n,a);break e}Bt(e,n,o,a)}n=n.child}return n;case 26:return No(e,n),e===null?(a=Tg(n.type,null,n.pendingProps,null))?n.memoizedState=a:Ye||(a=n.type,e=n.pendingProps,o=Vo(te.current).createElement(a),o[_t]=n,o[Xt]=e,Ht(o,a,e),Rt(o),n.stateNode=o):n.memoizedState=Tg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Ae(n),e===null&&Ye&&(o=n.stateNode=Ng(n.type,n.pendingProps,te.current),Lt=n,wn=!0,d=ct,Dr(n.type)?(Vc=d,ct=Cn(o.firstChild)):ct=d),Bt(e,n,n.pendingProps.children,a),No(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ye&&((d=o=ct)&&(o=fS(o,n.type,n.pendingProps,wn),o!==null?(n.stateNode=o,Lt=n,ct=Cn(o.firstChild),wn=!1,d=!0):d=!1),d||yr(n)),Ae(n),d=n.type,g=n.pendingProps,S=e!==null?e.memoizedProps:null,o=g.children,Uc(d,g)?o=null:S!==null&&Uc(d,S)&&(n.flags|=32),n.memoizedState!==null&&(d=Lu(e,n,jv,null,null,a),ci._currentValue=d),No(e,n),Bt(e,n,o,a),n.child;case 6:return e===null&&Ye&&((e=a=ct)&&(a=dS(a,n.pendingProps,wn),a!==null?(n.stateNode=a,Lt=n,ct=null,e=!0):e=!1),e||yr(n)),null;case 13:return mp(e,n,a);case 4:return xe(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=il(n,null,o,a):Bt(e,n,o,a),n.child;case 11:return ap(e,n,n.type,n.pendingProps,a);case 7:return Bt(e,n,n.pendingProps,a),n.child;case 8:return Bt(e,n,n.pendingProps.children,a),n.child;case 12:return Bt(e,n,n.pendingProps.children,a),n.child;case 10:return o=n.pendingProps,xr(n,n.type,o.value),Bt(e,n,o.children,a),n.child;case 9:return d=n.type._context,o=n.pendingProps.children,nl(n),d=Ut(d),o=o(d),n.flags|=1,Bt(e,n,o,a),n.child;case 14:return ip(e,n,n.type,n.pendingProps,a);case 15:return op(e,n,n.type,n.pendingProps,a);case 19:return gp(e,n,a);case 31:return Ov(e,n,a);case 22:return sp(e,n,a,n.pendingProps);case 24:return nl(n),o=Ut(kt),e===null?(d=ju(),d===null&&(d=it,g=Cu(),d.pooledCache=g,g.refCount++,g!==null&&(d.pooledCacheLanes|=a),d=g),n.memoizedState={parent:o,cache:d},Tu(n),xr(n,kt,d)):((e.lanes&a)!==0&&(Au(e,n),Fa(n,null,null,a),$a()),d=e.memoizedState,g=n.memoizedState,d.parent!==o?(d={parent:o,cache:o},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),xr(n,kt,o)):(o=g.cache,xr(n,kt,o),o!==d.cache&&ku(n,[kt],a,!0))),Bt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(i(156,n.tag))}function Wn(e){e.flags|=4}function cc(e,n,a,o,d){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(Fp())e.flags|=8192;else throw al=uo,Eu}else e.flags&=-16777217}function xp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!zg(n))if(Fp())e.flags|=8192;else throw al=uo,Eu}function Eo(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Zd():536870912,e.lanes|=n,Ql|=n)}function Ka(e,n){if(!Ye)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ft(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,o=0;if(n)for(var d=e.child;d!==null;)a|=d.lanes|d.childLanes,o|=d.subtreeFlags&65011712,o|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)a|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=o,e.childLanes=a,n}function Lv(e,n,a){var o=n.pendingProps;switch(xu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(n),null;case 1:return ft(n),null;case 3:return a=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Qn(kt),ke(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ll(n)?Wn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,vu())),ft(n),null;case 26:var d=n.type,g=n.memoizedState;return e===null?(Wn(n),g!==null?(ft(n),xp(n,g)):(ft(n),cc(n,d,null,o,a))):g?g!==e.memoizedState?(Wn(n),ft(n),xp(n,g)):(ft(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&Wn(n),ft(n),cc(n,d,e,o,a)),null;case 27:if(ht(n),a=te.current,d=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Wn(n);else{if(!o){if(n.stateNode===null)throw Error(i(166));return ft(n),null}e=_.current,Ll(n)?Zh(n):(e=Ng(d,o,a),n.stateNode=e,Wn(n))}return ft(n),null;case 5:if(ht(n),d=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Wn(n);else{if(!o){if(n.stateNode===null)throw Error(i(166));return ft(n),null}if(g=_.current,Ll(n))Zh(n);else{var S=Vo(te.current);switch(g){case 1:g=S.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:g=S.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":g=S.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":g=S.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":g=S.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof o.is=="string"?S.createElement("select",{is:o.is}):S.createElement("select"),o.multiple?g.multiple=!0:o.size&&(g.size=o.size);break;default:g=typeof o.is=="string"?S.createElement(d,{is:o.is}):S.createElement(d)}}g[_t]=n,g[Xt]=o;e:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)g.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break e;for(;S.sibling===null;){if(S.return===null||S.return===n)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=g;e:switch(Ht(g,d,o),d){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Wn(n)}}return ft(n),cc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&Wn(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(i(166));if(e=te.current,Ll(n)){if(e=n.stateNode,a=n.memoizedProps,o=null,d=Lt,d!==null)switch(d.tag){case 27:case 5:o=d.memoizedProps}e[_t]=n,e=!!(e.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||mg(e.nodeValue,a)),e||yr(n,!0)}else e=Vo(e).createTextNode(o),e[_t]=n,n.stateNode=e}return ft(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(o=Ll(n),a!==null){if(e===null){if(!o)throw Error(i(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[_t]=n}else el(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ft(n),e=!1}else a=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(on(n),n):(on(n),null);if((n.flags&128)!==0)throw Error(i(558))}return ft(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=Ll(n),o!==null&&o.dehydrated!==null){if(e===null){if(!d)throw Error(i(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(i(317));d[_t]=n}else el(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ft(n),d=!1}else d=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(on(n),n):(on(n),null)}return on(n),(n.flags&128)!==0?(n.lanes=a,n):(a=o!==null,e=e!==null&&e.memoizedState!==null,a&&(o=n.child,d=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(d=o.alternate.memoizedState.cachePool.pool),g=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(g=o.memoizedState.cachePool.pool),g!==d&&(o.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),Eo(n,n.updateQueue),ft(n),null);case 4:return ke(),e===null&&Rc(n.stateNode.containerInfo),ft(n),null;case 10:return Qn(n.type),ft(n),null;case 19:if(B(St),o=n.memoizedState,o===null)return ft(n),null;if(d=(n.flags&128)!==0,g=o.rendering,g===null)if(d)Ka(o,!1);else{if(bt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(g=mo(e),g!==null){for(n.flags|=128,Ka(o,!1),e=g.updateQueue,n.updateQueue=e,Eo(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Gh(a,e),a=a.sibling;return j(St,St.current&1|2),Ye&&Pn(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&se()>Ro&&(n.flags|=128,d=!0,Ka(o,!1),n.lanes=4194304)}else{if(!d)if(e=mo(g),e!==null){if(n.flags|=128,d=!0,e=e.updateQueue,n.updateQueue=e,Eo(n,e),Ka(o,!0),o.tail===null&&o.tailMode==="hidden"&&!g.alternate&&!Ye)return ft(n),null}else 2*se()-o.renderingStartTime>Ro&&a!==536870912&&(n.flags|=128,d=!0,Ka(o,!1),n.lanes=4194304);o.isBackwards?(g.sibling=n.child,n.child=g):(e=o.last,e!==null?e.sibling=g:n.child=g,o.last=g)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=se(),e.sibling=null,a=St.current,j(St,d?a&1|2:a&1),Ye&&Pn(n,o.treeForkCount),e):(ft(n),null);case 22:case 23:return on(n),zu(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(a&536870912)!==0&&(n.flags&128)===0&&(ft(n),n.subtreeFlags&6&&(n.flags|=8192)):ft(n),a=n.updateQueue,a!==null&&Eo(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==a&&(n.flags|=2048),e!==null&&B(rl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Qn(kt),ft(n),null;case 25:return null;case 30:return null}throw Error(i(156,n.tag))}function Uv(e,n){switch(xu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Qn(kt),ke(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return ht(n),null;case 31:if(n.memoizedState!==null){if(on(n),n.alternate===null)throw Error(i(340));el()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(on(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(i(340));el()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return B(St),null;case 4:return ke(),null;case 10:return Qn(n.type),null;case 22:case 23:return on(n),zu(),e!==null&&B(rl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Qn(kt),null;case 25:return null;default:return null}}function bp(e,n){switch(xu(n),n.tag){case 3:Qn(kt),ke();break;case 26:case 27:case 5:ht(n);break;case 4:ke();break;case 31:n.memoizedState!==null&&on(n);break;case 13:on(n);break;case 19:B(St);break;case 10:Qn(n.type);break;case 22:case 23:on(n),zu(),e!==null&&B(rl);break;case 24:Qn(kt)}}function Za(e,n){try{var a=n.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var d=o.next;a=d;do{if((a.tag&e)===e){o=void 0;var g=a.create,S=a.inst;o=g(),S.destroy=o}a=a.next}while(a!==d)}}catch(k){tt(n,n.return,k)}}function Cr(e,n,a){try{var o=n.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var g=d.next;o=g;do{if((o.tag&e)===e){var S=o.inst,k=S.destroy;if(k!==void 0){S.destroy=void 0,d=n;var z=a,V=k;try{V()}catch(W){tt(d,z,W)}}}o=o.next}while(o!==g)}}catch(W){tt(n,n.return,W)}}function vp(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{cm(n,a)}catch(o){tt(e,e.return,o)}}}function Sp(e,n,a){a.props=sl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(o){tt(e,n,o)}}function Ja(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof a=="function"?e.refCleanup=a(o):a.current=o}}catch(d){tt(e,n,d)}}function Un(e,n){var a=e.ref,o=e.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(d){tt(e,n,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){tt(e,n,d)}else a.current=null}function wp(e){var n=e.type,a=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(d){tt(e,e.return,d)}}function fc(e,n,a){try{var o=e.stateNode;aS(o,e.type,a,n),o[Xt]=n}catch(d){tt(e,e.return,d)}}function kp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dr(e.type)||e.tag===4}function dc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kp(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&&Dr(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 hc(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Fn));else if(o!==4&&(o===27&&Dr(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(hc(e,n,a),e=e.sibling;e!==null;)hc(e,n,a),e=e.sibling}function To(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(o!==4&&(o===27&&Dr(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(To(e,n,a),e=e.sibling;e!==null;)To(e,n,a),e=e.sibling}function Cp(e){var n=e.stateNode,a=e.memoizedProps;try{for(var o=e.type,d=n.attributes;d.length;)n.removeAttributeNode(d[0]);Ht(n,o,a),n[_t]=e,n[Xt]=a}catch(g){tt(e,e.return,g)}}var er=!1,jt=!1,mc=!1,Np=typeof WeakSet=="function"?WeakSet:Set,zt=null;function Bv(e,n){if(e=e.containerInfo,_c=Qo,e=Uh(e),ou(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var d=o.anchorOffset,g=o.focusNode;o=o.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var S=0,k=-1,z=-1,V=0,W=0,ae=e,F=null;t:for(;;){for(var K;ae!==a||d!==0&&ae.nodeType!==3||(k=S+d),ae!==g||o!==0&&ae.nodeType!==3||(z=S+o),ae.nodeType===3&&(S+=ae.nodeValue.length),(K=ae.firstChild)!==null;)F=ae,ae=K;for(;;){if(ae===e)break t;if(F===a&&++V===d&&(k=S),F===g&&++W===o&&(z=S),(K=ae.nextSibling)!==null)break;ae=F,F=ae.parentNode}ae=K}a=k===-1||z===-1?null:{start:k,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(Lc={focusedElem:e,selectionRange:a},Qo=!1,zt=n;zt!==null;)if(n=zt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,zt=e;else for(;zt!==null;){switch(n=zt,g=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)d=e[a],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&g!==null){e=void 0,a=n,d=g.memoizedProps,g=g.memoizedState,o=a.stateNode;try{var be=sl(a.type,d);e=o.getSnapshotBeforeUpdate(be,g),o.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){tt(a,a.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Hc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hc(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(i(163))}if(e=n.sibling,e!==null){e.return=n.return,zt=e;break}zt=n.return}}function jp(e,n,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:nr(e,a),o&4&&Za(5,a);break;case 1:if(nr(e,a),o&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(S){tt(a,a.return,S)}else{var d=sl(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(d,n,e.__reactInternalSnapshotBeforeUpdate)}catch(S){tt(a,a.return,S)}}o&64&&vp(a),o&512&&Ja(a,a.return);break;case 3:if(nr(e,a),o&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{cm(e,n)}catch(S){tt(a,a.return,S)}}break;case 27:n===null&&o&4&&Cp(a);case 26:case 5:nr(e,a),n===null&&o&4&&wp(a),o&512&&Ja(a,a.return);break;case 12:nr(e,a);break;case 31:nr(e,a),o&4&&Ap(e,a);break;case 13:nr(e,a),o&4&&Mp(e,a),o&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Pv.bind(null,a),hS(e,a))));break;case 22:if(o=a.memoizedState!==null||er,!o){n=n!==null&&n.memoizedState!==null||jt,d=er;var g=jt;er=o,(jt=n)&&!g?rr(e,a,(a.subtreeFlags&8772)!==0):nr(e,a),er=d,jt=g}break;case 30:break;default:nr(e,a)}}function Ep(e){var n=e.alternate;n!==null&&(e.alternate=null,Ep(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Fs(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var mt=null,Kt=!1;function tr(e,n,a){for(a=a.child;a!==null;)Tp(e,n,a),a=a.sibling}function Tp(e,n,a){if(st&&typeof st.onCommitFiberUnmount=="function")try{st.onCommitFiberUnmount(gt,a)}catch{}switch(a.tag){case 26:jt||Un(a,n),tr(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:jt||Un(a,n);var o=mt,d=Kt;Dr(a.type)&&(mt=a.stateNode,Kt=!1),tr(e,n,a),oi(a.stateNode),mt=o,Kt=d;break;case 5:jt||Un(a,n);case 6:if(o=mt,d=Kt,mt=null,tr(e,n,a),mt=o,Kt=d,mt!==null)if(Kt)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(a.stateNode)}catch(g){tt(a,n,g)}else try{mt.removeChild(a.stateNode)}catch(g){tt(a,n,g)}break;case 18:mt!==null&&(Kt?(e=mt,vg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ra(e)):vg(mt,a.stateNode));break;case 4:o=mt,d=Kt,mt=a.stateNode.containerInfo,Kt=!0,tr(e,n,a),mt=o,Kt=d;break;case 0:case 11:case 14:case 15:Cr(2,a,n),jt||Cr(4,a,n),tr(e,n,a);break;case 1:jt||(Un(a,n),o=a.stateNode,typeof o.componentWillUnmount=="function"&&Sp(a,n,o)),tr(e,n,a);break;case 21:tr(e,n,a);break;case 22:jt=(o=jt)||a.memoizedState!==null,tr(e,n,a),jt=o;break;default:tr(e,n,a)}}function Ap(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ra(e)}catch(a){tt(n,n.return,a)}}}function Mp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ra(e)}catch(a){tt(n,n.return,a)}}function Hv(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Np),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Np),n;default:throw Error(i(435,e.tag))}}function Ao(e,n){var a=Hv(e);n.forEach(function(o){if(!a.has(o)){a.add(o);var d=Xv.bind(null,e,o);o.then(d,d)}})}function Zt(e,n){var a=n.deletions;if(a!==null)for(var o=0;o<a.length;o++){var d=a[o],g=e,S=n,k=S;e:for(;k!==null;){switch(k.tag){case 27:if(Dr(k.type)){mt=k.stateNode,Kt=!1;break e}break;case 5:mt=k.stateNode,Kt=!1;break e;case 3:case 4:mt=k.stateNode.containerInfo,Kt=!0;break e}k=k.return}if(mt===null)throw Error(i(160));Tp(g,S,d),mt=null,Kt=!1,g=d.alternate,g!==null&&(g.return=null),d.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Dp(n,e),n=n.sibling}var Dn=null;function Dp(e,n){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Zt(n,e),Jt(e),o&4&&(Cr(3,e,e.return),Za(3,e),Cr(5,e,e.return));break;case 1:Zt(n,e),Jt(e),o&512&&(jt||a===null||Un(a,a.return)),o&64&&er&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var d=Dn;if(Zt(n,e),Jt(e),o&512&&(jt||a===null||Un(a,a.return)),o&4){var g=a!==null?a.memoizedState:null;if(o=e.memoizedState,a===null)if(o===null)if(e.stateNode===null){e:{o=e.type,a=e.memoizedProps,d=d.ownerDocument||d;t:switch(o){case"title":g=d.getElementsByTagName("title")[0],(!g||g[Na]||g[_t]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=d.createElement(o),d.head.insertBefore(g,d.querySelector("head > title"))),Ht(g,o,a),g[_t]=e,Rt(g),o=g;break e;case"link":var S=Dg("link","href",d).get(o+(a.href||""));if(S){for(var k=0;k<S.length;k++)if(g=S[k],g.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&g.getAttribute("rel")===(a.rel==null?null:a.rel)&&g.getAttribute("title")===(a.title==null?null:a.title)&&g.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){S.splice(k,1);break t}}g=d.createElement(o),Ht(g,o,a),d.head.appendChild(g);break;case"meta":if(S=Dg("meta","content",d).get(o+(a.content||""))){for(k=0;k<S.length;k++)if(g=S[k],g.getAttribute("content")===(a.content==null?null:""+a.content)&&g.getAttribute("name")===(a.name==null?null:a.name)&&g.getAttribute("property")===(a.property==null?null:a.property)&&g.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&g.getAttribute("charset")===(a.charSet==null?null:a.charSet)){S.splice(k,1);break t}}g=d.createElement(o),Ht(g,o,a),d.head.appendChild(g);break;default:throw Error(i(468,o))}g[_t]=e,Rt(g),o=g}e.stateNode=o}else Rg(d,e.type,e.stateNode);else e.stateNode=Mg(d,o,e.memoizedProps);else g!==o?(g===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):g.count--,o===null?Rg(d,e.type,e.stateNode):Mg(d,o,e.memoizedProps)):o===null&&e.stateNode!==null&&fc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Zt(n,e),Jt(e),o&512&&(jt||a===null||Un(a,a.return)),a!==null&&o&4&&fc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Zt(n,e),Jt(e),o&512&&(jt||a===null||Un(a,a.return)),e.flags&32){d=e.stateNode;try{jl(d,"")}catch(be){tt(e,e.return,be)}}o&4&&e.stateNode!=null&&(d=e.memoizedProps,fc(e,d,a!==null?a.memoizedProps:d)),o&1024&&(mc=!0);break;case 6:if(Zt(n,e),Jt(e),o&4){if(e.stateNode===null)throw Error(i(162));o=e.memoizedProps,a=e.stateNode;try{a.nodeValue=o}catch(be){tt(e,e.return,be)}}break;case 3:if(Yo=null,d=Dn,Dn=$o(n.containerInfo),Zt(n,e),Dn=d,Jt(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{ra(n.containerInfo)}catch(be){tt(e,e.return,be)}mc&&(mc=!1,Rp(e));break;case 4:o=Dn,Dn=$o(e.stateNode.containerInfo),Zt(n,e),Jt(e),Dn=o;break;case 12:Zt(n,e),Jt(e);break;case 31:Zt(n,e),Jt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ao(e,o)));break;case 13:Zt(n,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Do=se()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ao(e,o)));break;case 22:d=e.memoizedState!==null;var z=a!==null&&a.memoizedState!==null,V=er,W=jt;if(er=V||d,jt=W||z,Zt(n,e),jt=W,er=V,Jt(e),o&8192)e:for(n=e.stateNode,n._visibility=d?n._visibility&-2:n._visibility|1,d&&(a===null||z||er||jt||ul(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){z=a=n;try{if(g=z.stateNode,d)S=g.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{k=z.stateNode;var ae=z.memoizedProps.style,F=ae!=null&&ae.hasOwnProperty("display")?ae.display:null;k.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(be){tt(z,z.return,be)}}}else if(n.tag===6){if(a===null){z=n;try{z.stateNode.nodeValue=d?"":z.memoizedProps}catch(be){tt(z,z.return,be)}}}else if(n.tag===18){if(a===null){z=n;try{var K=z.stateNode;d?Sg(K,!0):Sg(z.stateNode,!1)}catch(be){tt(z,z.return,be)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,Ao(e,a))));break;case 19:Zt(n,e),Jt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Ao(e,o)));break;case 30:break;case 21:break;default:Zt(n,e),Jt(e)}}function Jt(e){var n=e.flags;if(n&2){try{for(var a,o=e.return;o!==null;){if(kp(o)){a=o;break}o=o.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var d=a.stateNode,g=dc(e);To(e,g,d);break;case 5:var S=a.stateNode;a.flags&32&&(jl(S,""),a.flags&=-33);var k=dc(e);To(e,k,S);break;case 3:case 4:var z=a.stateNode.containerInfo,V=dc(e);hc(e,V,z);break;default:throw Error(i(161))}}catch(W){tt(e,e.return,W)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Rp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Rp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function nr(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)jp(e,n.alternate,n),n=n.sibling}function ul(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Cr(4,n,n.return),ul(n);break;case 1:Un(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&Sp(n,n.return,a),ul(n);break;case 27:oi(n.stateNode);case 26:case 5:Un(n,n.return),ul(n);break;case 22:n.memoizedState===null&&ul(n);break;case 30:ul(n);break;default:ul(n)}e=e.sibling}}function rr(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,d=e,g=n,S=g.flags;switch(g.tag){case 0:case 11:case 15:rr(d,g,a),Za(4,g);break;case 1:if(rr(d,g,a),o=g,d=o.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(V){tt(o,o.return,V)}if(o=g,d=o.updateQueue,d!==null){var k=o.stateNode;try{var z=d.shared.hiddenCallbacks;if(z!==null)for(d.shared.hiddenCallbacks=null,d=0;d<z.length;d++)um(z[d],k)}catch(V){tt(o,o.return,V)}}a&&S&64&&vp(g),Ja(g,g.return);break;case 27:Cp(g);case 26:case 5:rr(d,g,a),a&&o===null&&S&4&&wp(g),Ja(g,g.return);break;case 12:rr(d,g,a);break;case 31:rr(d,g,a),a&&S&4&&Ap(d,g);break;case 13:rr(d,g,a),a&&S&4&&Mp(d,g);break;case 22:g.memoizedState===null&&rr(d,g,a),Ja(g,g.return);break;case 30:break;default:rr(d,g,a)}n=n.sibling}}function pc(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Ba(a))}function gc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ba(e))}function Rn(e,n,a,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)zp(e,n,a,o),n=n.sibling}function zp(e,n,a,o){var d=n.flags;switch(n.tag){case 0:case 11:case 15:Rn(e,n,a,o),d&2048&&Za(9,n);break;case 1:Rn(e,n,a,o);break;case 3:Rn(e,n,a,o),d&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ba(e)));break;case 12:if(d&2048){Rn(e,n,a,o),e=n.stateNode;try{var g=n.memoizedProps,S=g.id,k=g.onPostCommit;typeof k=="function"&&k(S,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){tt(n,n.return,z)}}else Rn(e,n,a,o);break;case 31:Rn(e,n,a,o);break;case 13:Rn(e,n,a,o);break;case 23:break;case 22:g=n.stateNode,S=n.alternate,n.memoizedState!==null?g._visibility&2?Rn(e,n,a,o):Wa(e,n):g._visibility&2?Rn(e,n,a,o):(g._visibility|=2,Gl(e,n,a,o,(n.subtreeFlags&10256)!==0||!1)),d&2048&&pc(S,n);break;case 24:Rn(e,n,a,o),d&2048&&gc(n.alternate,n);break;default:Rn(e,n,a,o)}}function Gl(e,n,a,o,d){for(d=d&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=e,S=n,k=a,z=o,V=S.flags;switch(S.tag){case 0:case 11:case 15:Gl(g,S,k,z,d),Za(8,S);break;case 23:break;case 22:var W=S.stateNode;S.memoizedState!==null?W._visibility&2?Gl(g,S,k,z,d):Wa(g,S):(W._visibility|=2,Gl(g,S,k,z,d)),d&&V&2048&&pc(S.alternate,S);break;case 24:Gl(g,S,k,z,d),d&&V&2048&&gc(S.alternate,S);break;default:Gl(g,S,k,z,d)}n=n.sibling}}function Wa(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,o=n,d=o.flags;switch(o.tag){case 22:Wa(a,o),d&2048&&pc(o.alternate,o);break;case 24:Wa(a,o),d&2048&&gc(o.alternate,o);break;default:Wa(a,o)}n=n.sibling}}var ei=8192;function Pl(e,n,a){if(e.subtreeFlags&ei)for(e=e.child;e!==null;)Op(e,n,a),e=e.sibling}function Op(e,n,a){switch(e.tag){case 26:Pl(e,n,a),e.flags&ei&&e.memoizedState!==null&&NS(a,Dn,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,n,a);break;case 3:case 4:var o=Dn;Dn=$o(e.stateNode.containerInfo),Pl(e,n,a),Dn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=ei,ei=16777216,Pl(e,n,a),ei=o):Pl(e,n,a));break;default:Pl(e,n,a)}}function _p(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function ti(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];zt=o,Up(o,e)}_p(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lp(e),e=e.sibling}function Lp(e){switch(e.tag){case 0:case 11:case 15:ti(e),e.flags&2048&&Cr(9,e,e.return);break;case 3:ti(e);break;case 12:ti(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Mo(e)):ti(e);break;default:ti(e)}}function Mo(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];zt=o,Up(o,e)}_p(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Cr(8,n,n.return),Mo(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Mo(n));break;default:Mo(n)}e=e.sibling}}function Up(e,n){for(;zt!==null;){var a=zt;switch(a.tag){case 0:case 11:case 15:Cr(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Ba(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,zt=o;else e:for(a=e;zt!==null;){o=zt;var d=o.sibling,g=o.return;if(Ep(o),o===a){zt=null;break e}if(d!==null){d.return=g,zt=d;break e}zt=g}}}var qv={getCacheForType:function(e){var n=Ut(kt),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return Ut(kt).controller.signal}},Iv=typeof WeakMap=="function"?WeakMap:Map,Je=0,it=null,Be=null,Ie=0,et=0,sn=null,Nr=!1,Xl=!1,yc=!1,lr=0,bt=0,jr=0,cl=0,xc=0,un=0,Ql=0,ni=null,Wt=null,bc=!1,Do=0,Bp=0,Ro=1/0,zo=null,Er=null,At=0,Tr=null,Kl=null,ar=0,vc=0,Sc=null,Hp=null,ri=0,wc=null;function cn(){return(Je&2)!==0&&Ie!==0?Ie&-Ie:R.T!==null?Tc():th()}function qp(){if(un===0)if((Ie&536870912)===0||Ye){var e=qi;qi<<=1,(qi&3932160)===0&&(qi=262144),un=e}else un=536870912;return e=an.current,e!==null&&(e.flags|=32),un}function en(e,n,a){(e===it&&(et===2||et===9)||e.cancelPendingCommit!==null)&&(Zl(e,0),Ar(e,Ie,un,!1)),Ca(e,a),((Je&2)===0||e!==it)&&(e===it&&((Je&2)===0&&(cl|=a),bt===4&&Ar(e,Ie,un,!1)),Bn(e))}function Ip(e,n,a){if((Je&6)!==0)throw Error(i(327));var o=!a&&(n&127)===0&&(n&e.expiredLanes)===0||ka(e,n),d=o?Fv(e,n):Cc(e,n,!0),g=o;do{if(d===0){Xl&&!o&&Ar(e,n,0,!1);break}else{if(a=e.current.alternate,g&&!Vv(a)){d=Cc(e,n,!1),g=!1;continue}if(d===2){if(g=n,e.errorRecoveryDisabledLanes&g)var S=0;else S=e.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){n=S;e:{var k=e;d=ni;var z=k.current.memoizedState.isDehydrated;if(z&&(Zl(k,S).flags|=256),S=Cc(k,S,!1),S!==2){if(yc&&!z){k.errorRecoveryDisabledLanes|=g,cl|=g,d=4;break e}g=Wt,Wt=d,g!==null&&(Wt===null?Wt=g:Wt.push.apply(Wt,g))}d=S}if(g=!1,d!==2)continue}}if(d===1){Zl(e,0),Ar(e,n,0,!0);break}e:{switch(o=e,g=d,g){case 0:case 1:throw Error(i(345));case 4:if((n&4194048)!==n)break;case 6:Ar(o,n,un,!Nr);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((n&62914560)===n&&(d=Do+300-se(),10<d)){if(Ar(o,n,un,!Nr),Vi(o,0,!0)!==0)break e;ar=n,o.timeoutHandle=xg(Vp.bind(null,o,a,Wt,zo,bc,n,un,cl,Ql,Nr,g,"Throttled",-0,0),d);break e}Vp(o,a,Wt,zo,bc,n,un,cl,Ql,Nr,g,null,-0,0)}}break}while(!0);Bn(e)}function Vp(e,n,a,o,d,g,S,k,z,V,W,ae,F,K){if(e.timeoutHandle=-1,ae=n.subtreeFlags,ae&8192||(ae&16785408)===16785408){ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fn},Op(n,g,ae);var be=(g&62914560)===g?Do-se():(g&4194048)===g?Bp-se():0;if(be=jS(ae,be),be!==null){ar=g,e.cancelPendingCommit=be(Kp.bind(null,e,n,g,a,o,d,S,k,z,W,ae,null,F,K)),Ar(e,g,S,!V);return}}Kp(e,n,g,a,o,d,S,k,z)}function Vv(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var d=a[o],g=d.getSnapshot;d=d.value;try{if(!rn(g(),d))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ar(e,n,a,o){n&=~xc,n&=~cl,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var d=n;0<d;){var g=31-We(d),S=1<<g;o[g]=-1,d&=~S}a!==0&&Jd(e,a,n)}function Oo(){return(Je&6)===0?(li(0),!1):!0}function kc(){if(Be!==null){if(et===0)var e=Be.return;else e=Be,Xn=tl=null,Hu(e),Il=null,qa=0,e=Be;for(;e!==null;)bp(e.alternate,e),e=e.return;Be=null}}function Zl(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,sS(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ar=0,kc(),it=e,Be=a=Gn(e.current,null),Ie=n,et=0,sn=null,Nr=!1,Xl=ka(e,n),yc=!1,Ql=un=xc=cl=jr=bt=0,Wt=ni=null,bc=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var d=31-We(o),g=1<<d;n|=e[d],o&=~g}return lr=n,eo(),a}function $p(e,n){De=null,R.H=Xa,n===ql||n===so?(n=am(),et=3):n===Eu?(n=am(),et=4):et=n===tc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,sn=n,Be===null&&(bt=1,ko(e,bn(n,e.current)))}function Fp(){var e=an.current;return e===null?!0:(Ie&4194048)===Ie?kn===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?e===kn:!1}function Yp(){var e=R.H;return R.H=Xa,e===null?Xa:e}function Gp(){var e=R.A;return R.A=qv,e}function _o(){bt=4,Nr||(Ie&4194048)!==Ie&&an.current!==null||(Xl=!0),(jr&134217727)===0&&(cl&134217727)===0||it===null||Ar(it,Ie,un,!1)}function Cc(e,n,a){var o=Je;Je|=2;var d=Yp(),g=Gp();(it!==e||Ie!==n)&&(zo=null,Zl(e,n)),n=!1;var S=bt;e:do try{if(et!==0&&Be!==null){var k=Be,z=sn;switch(et){case 8:kc(),S=6;break e;case 3:case 2:case 9:case 6:an.current===null&&(n=!0);var V=et;if(et=0,sn=null,Jl(e,k,z,V),a&&Xl){S=0;break e}break;default:V=et,et=0,sn=null,Jl(e,k,z,V)}}$v(),S=bt;break}catch(W){$p(e,W)}while(!0);return n&&e.shellSuspendCounter++,Xn=tl=null,Je=o,R.H=d,R.A=g,Be===null&&(it=null,Ie=0,eo()),S}function $v(){for(;Be!==null;)Pp(Be)}function Fv(e,n){var a=Je;Je|=2;var o=Yp(),d=Gp();it!==e||Ie!==n?(zo=null,Ro=se()+500,Zl(e,n)):Xl=ka(e,n);e:do try{if(et!==0&&Be!==null){n=Be;var g=sn;t:switch(et){case 1:et=0,sn=null,Jl(e,n,g,1);break;case 2:case 9:if(rm(g)){et=0,sn=null,Xp(n);break}n=function(){et!==2&&et!==9||it!==e||(et=7),Bn(e)},g.then(n,n);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:rm(g)?(et=0,sn=null,Xp(n)):(et=0,sn=null,Jl(e,n,g,7));break;case 5:var S=null;switch(Be.tag){case 26:S=Be.memoizedState;case 5:case 27:var k=Be;if(S?zg(S):k.stateNode.complete){et=0,sn=null;var z=k.sibling;if(z!==null)Be=z;else{var V=k.return;V!==null?(Be=V,Lo(V)):Be=null}break t}}et=0,sn=null,Jl(e,n,g,5);break;case 6:et=0,sn=null,Jl(e,n,g,6);break;case 8:kc(),bt=6;break e;default:throw Error(i(462))}}Yv();break}catch(W){$p(e,W)}while(!0);return Xn=tl=null,R.H=o,R.A=d,Je=a,Be!==null?0:(it=null,Ie=0,eo(),bt)}function Yv(){for(;Be!==null&&!Gr();)Pp(Be)}function Pp(e){var n=yp(e.alternate,e,lr);e.memoizedProps=e.pendingProps,n===null?Lo(e):Be=n}function Xp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=fp(a,n,n.pendingProps,n.type,void 0,Ie);break;case 11:n=fp(a,n,n.pendingProps,n.type.render,n.ref,Ie);break;case 5:Hu(n);default:bp(a,n),n=Be=Gh(n,lr),n=yp(a,n,lr)}e.memoizedProps=e.pendingProps,n===null?Lo(e):Be=n}function Jl(e,n,a,o){Xn=tl=null,Hu(n),Il=null,qa=0;var d=n.return;try{if(zv(e,d,n,a,Ie)){bt=1,ko(e,bn(a,e.current)),Be=null;return}}catch(g){if(d!==null)throw Be=d,g;bt=1,ko(e,bn(a,e.current)),Be=null;return}n.flags&32768?(Ye||o===1?e=!0:Xl||(Ie&536870912)!==0?e=!1:(Nr=e=!0,(o===2||o===9||o===3||o===6)&&(o=an.current,o!==null&&o.tag===13&&(o.flags|=16384))),Qp(n,e)):Lo(n)}function Lo(e){var n=e;do{if((n.flags&32768)!==0){Qp(n,Nr);return}e=n.return;var a=Lv(n.alternate,n,lr);if(a!==null){Be=a;return}if(n=n.sibling,n!==null){Be=n;return}Be=n=e}while(n!==null);bt===0&&(bt=5)}function Qp(e,n){do{var a=Uv(e.alternate,e);if(a!==null){a.flags&=32767,Be=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Be=e;return}Be=e=a}while(e!==null);bt=6,Be=null}function Kp(e,n,a,o,d,g,S,k,z){e.cancelPendingCommit=null;do Uo();while(At!==0);if((Je&6)!==0)throw Error(i(327));if(n!==null){if(n===e.current)throw Error(i(177));if(g=n.lanes|n.childLanes,g|=du,Cb(e,a,g,S,k,z),e===it&&(Be=it=null,Ie=0),Kl=n,Tr=e,ar=a,vc=g,Sc=d,Hp=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Qv(Ce,function(){return tg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=R.T,R.T=null,d=J.p,J.p=2,S=Je,Je|=4;try{Bv(e,n,a)}finally{Je=S,J.p=d,R.T=o}}At=1,Zp(),Jp(),Wp()}}function Zp(){if(At===1){At=0;var e=Tr,n=Kl,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=R.T,R.T=null;var o=J.p;J.p=2;var d=Je;Je|=4;try{Dp(n,e);var g=Lc,S=Uh(e.containerInfo),k=g.focusedElem,z=g.selectionRange;if(S!==k&&k&&k.ownerDocument&&Lh(k.ownerDocument.documentElement,k)){if(z!==null&&ou(k)){var V=z.start,W=z.end;if(W===void 0&&(W=V),"selectionStart"in k)k.selectionStart=V,k.selectionEnd=Math.min(W,k.value.length);else{var ae=k.ownerDocument||document,F=ae&&ae.defaultView||window;if(F.getSelection){var K=F.getSelection(),be=k.textContent.length,Ee=Math.min(z.start,be),at=z.end===void 0?Ee:Math.min(z.end,be);!K.extend&&Ee>at&&(S=at,at=Ee,Ee=S);var q=_h(k,Ee),U=_h(k,at);if(q&&U&&(K.rangeCount!==1||K.anchorNode!==q.node||K.anchorOffset!==q.offset||K.focusNode!==U.node||K.focusOffset!==U.offset)){var I=ae.createRange();I.setStart(q.node,q.offset),K.removeAllRanges(),Ee>at?(K.addRange(I),K.extend(U.node,U.offset)):(I.setEnd(U.node,U.offset),K.addRange(I))}}}}for(ae=[],K=k;K=K.parentNode;)K.nodeType===1&&ae.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<ae.length;k++){var re=ae[k];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Qo=!!_c,Lc=_c=null}finally{Je=d,J.p=o,R.T=a}}e.current=n,At=2}}function Jp(){if(At===2){At=0;var e=Tr,n=Kl,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=R.T,R.T=null;var o=J.p;J.p=2;var d=Je;Je|=4;try{jp(e,n.alternate,n)}finally{Je=d,J.p=o,R.T=a}}At=3}}function Wp(){if(At===4||At===3){At=0,fr();var e=Tr,n=Kl,a=ar,o=Hp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?At=5:(At=0,Kl=Tr=null,eg(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Er=null),Vs(a),n=n.stateNode,st&&typeof st.onCommitFiberRoot=="function")try{st.onCommitFiberRoot(gt,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=R.T,d=J.p,J.p=2,R.T=null;try{for(var g=e.onRecoverableError,S=0;S<o.length;S++){var k=o[S];g(k.value,{componentStack:k.stack})}}finally{R.T=n,J.p=d}}(ar&3)!==0&&Uo(),Bn(e),d=e.pendingLanes,(a&261930)!==0&&(d&42)!==0?e===wc?ri++:(ri=0,wc=e):ri=0,li(0)}}function eg(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Ba(n)))}function Uo(){return Zp(),Jp(),Wp(),tg()}function tg(){if(At!==5)return!1;var e=Tr,n=vc;vc=0;var a=Vs(ar),o=R.T,d=J.p;try{J.p=32>a?32:a,R.T=null,a=Sc,Sc=null;var g=Tr,S=ar;if(At=0,Kl=Tr=null,ar=0,(Je&6)!==0)throw Error(i(331));var k=Je;if(Je|=4,Lp(g.current),zp(g,g.current,S,a),Je=k,li(0,!1),st&&typeof st.onPostCommitFiberRoot=="function")try{st.onPostCommitFiberRoot(gt,g)}catch{}return!0}finally{J.p=d,R.T=o,eg(e,n)}}function ng(e,n,a){n=bn(a,n),n=ec(e.stateNode,n,2),e=Sr(e,n,2),e!==null&&(Ca(e,2),Bn(e))}function tt(e,n,a){if(e.tag===3)ng(e,e,a);else for(;n!==null;){if(n.tag===3){ng(n,e,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Er===null||!Er.has(o))){e=bn(a,e),a=rp(2),o=Sr(n,a,2),o!==null&&(lp(a,o,n,e),Ca(o,2),Bn(o));break}}n=n.return}}function Nc(e,n,a){var o=e.pingCache;if(o===null){o=e.pingCache=new Iv;var d=new Set;o.set(n,d)}else d=o.get(n),d===void 0&&(d=new Set,o.set(n,d));d.has(a)||(yc=!0,d.add(a),e=Gv.bind(null,e,n,a),n.then(e,e))}function Gv(e,n,a){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,it===e&&(Ie&a)===a&&(bt===4||bt===3&&(Ie&62914560)===Ie&&300>se()-Do?(Je&2)===0&&Zl(e,0):xc|=a,Ql===Ie&&(Ql=0)),Bn(e)}function rg(e,n){n===0&&(n=Zd()),e=Jr(e,n),e!==null&&(Ca(e,n),Bn(e))}function Pv(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),rg(e,a)}function Xv(e,n){var a=0;switch(e.tag){case 31:case 13:var o=e.stateNode,d=e.memoizedState;d!==null&&(a=d.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(n),rg(e,a)}function Qv(e,n){return Mt(e,n)}var Bo=null,Wl=null,jc=!1,Ho=!1,Ec=!1,Mr=0;function Bn(e){e!==Wl&&e.next===null&&(Wl===null?Bo=Wl=e:Wl=Wl.next=e),Ho=!0,jc||(jc=!0,Zv())}function li(e,n){if(!Ec&&Ho){Ec=!0;do for(var a=!1,o=Bo;o!==null;){if(e!==0){var d=o.pendingLanes;if(d===0)var g=0;else{var S=o.suspendedLanes,k=o.pingedLanes;g=(1<<31-We(42|e)+1)-1,g&=d&~(S&~k),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(a=!0,og(o,g))}else g=Ie,g=Vi(o,o===it?g:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(g&3)===0||ka(o,g)||(a=!0,og(o,g));o=o.next}while(a);Ec=!1}}function Kv(){lg()}function lg(){Ho=jc=!1;var e=0;Mr!==0&&oS()&&(e=Mr);for(var n=se(),a=null,o=Bo;o!==null;){var d=o.next,g=ag(o,n);g===0?(o.next=null,a===null?Bo=d:a.next=d,d===null&&(Wl=a)):(a=o,(e!==0||(g&3)!==0)&&(Ho=!0)),o=d}At!==0&&At!==5||li(e),Mr!==0&&(Mr=0)}function ag(e,n){for(var a=e.suspendedLanes,o=e.pingedLanes,d=e.expirationTimes,g=e.pendingLanes&-62914561;0<g;){var S=31-We(g),k=1<<S,z=d[S];z===-1?((k&a)===0||(k&o)!==0)&&(d[S]=kb(k,n)):z<=n&&(e.expiredLanes|=k),g&=~k}if(n=it,a=Ie,a=Vi(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,a===0||e===n&&(et===2||et===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&pn(o),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ka(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(o!==null&&pn(o),Vs(a)){case 2:case 8:a=de;break;case 32:a=Ce;break;case 268435456:a=Ge;break;default:a=Ce}return o=ig.bind(null,e),a=Mt(a,o),e.callbackPriority=n,e.callbackNode=a,n}return o!==null&&o!==null&&pn(o),e.callbackPriority=2,e.callbackNode=null,2}function ig(e,n){if(At!==0&&At!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Uo()&&e.callbackNode!==a)return null;var o=Ie;return o=Vi(e,e===it?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Ip(e,o,n),ag(e,se()),e.callbackNode!=null&&e.callbackNode===a?ig.bind(null,e):null)}function og(e,n){if(Uo())return null;Ip(e,n,!0)}function Zv(){uS(function(){(Je&6)!==0?Mt(Q,Kv):lg()})}function Tc(){if(Mr===0){var e=Bl;e===0&&(e=Hi,Hi<<=1,(Hi&261888)===0&&(Hi=256)),Mr=e}return Mr}function sg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Gi(""+e)}function ug(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function Jv(e,n,a,o,d){if(n==="submit"&&a&&a.stateNode===d){var g=sg((d[Xt]||null).action),S=o.submitter;S&&(n=(n=S[Xt]||null)?sg(n.formAction):S.getAttribute("formAction"),n!==null&&(g=n,S=null));var k=new Ki("action","action",null,o,d);e.push({event:k,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Mr!==0){var z=S?ug(d,S):new FormData(d);Xu(a,{pending:!0,data:z,method:d.method,action:g},null,z)}}else typeof g=="function"&&(k.preventDefault(),z=S?ug(d,S):new FormData(d),Xu(a,{pending:!0,data:z,method:d.method,action:g},g,z))},currentTarget:d}]})}}for(var Ac=0;Ac<fu.length;Ac++){var Mc=fu[Ac],Wv=Mc.toLowerCase(),eS=Mc[0].toUpperCase()+Mc.slice(1);Mn(Wv,"on"+eS)}Mn(qh,"onAnimationEnd"),Mn(Ih,"onAnimationIteration"),Mn(Vh,"onAnimationStart"),Mn("dblclick","onDoubleClick"),Mn("focusin","onFocus"),Mn("focusout","onBlur"),Mn(gv,"onTransitionRun"),Mn(yv,"onTransitionStart"),Mn(xv,"onTransitionCancel"),Mn($h,"onTransitionEnd"),Cl("onMouseEnter",["mouseout","mouseover"]),Cl("onMouseLeave",["mouseout","mouseover"]),Cl("onPointerEnter",["pointerout","pointerover"]),Cl("onPointerLeave",["pointerout","pointerover"]),Xr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ai="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(" "),tS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ai));function cg(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var o=e[a],d=o.event;o=o.listeners;e:{var g=void 0;if(n)for(var S=o.length-1;0<=S;S--){var k=o[S],z=k.instance,V=k.currentTarget;if(k=k.listener,z!==g&&d.isPropagationStopped())break e;g=k,d.currentTarget=V;try{g(d)}catch(W){Wi(W)}d.currentTarget=null,g=z}else for(S=0;S<o.length;S++){if(k=o[S],z=k.instance,V=k.currentTarget,k=k.listener,z!==g&&d.isPropagationStopped())break e;g=k,d.currentTarget=V;try{g(d)}catch(W){Wi(W)}d.currentTarget=null,g=z}}}}function He(e,n){var a=n[$s];a===void 0&&(a=n[$s]=new Set);var o=e+"__bubble";a.has(o)||(fg(n,e,2,!1),a.add(o))}function Dc(e,n,a){var o=0;n&&(o|=4),fg(a,e,o,n)}var qo="_reactListening"+Math.random().toString(36).slice(2);function Rc(e){if(!e[qo]){e[qo]=!0,lh.forEach(function(a){a!=="selectionchange"&&(tS.has(a)||Dc(a,!1,e),Dc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[qo]||(n[qo]=!0,Dc("selectionchange",!1,n))}}function fg(e,n,a,o){switch(qg(n)){case 2:var d=AS;break;case 8:d=MS;break;default:d=Pc}a=d.bind(null,n,a,e),d=void 0,!Js||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),o?d!==void 0?e.addEventListener(n,a,{capture:!0,passive:d}):e.addEventListener(n,a,!0):d!==void 0?e.addEventListener(n,a,{passive:d}):e.addEventListener(n,a,!1)}function zc(e,n,a,o,d){var g=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var S=o.tag;if(S===3||S===4){var k=o.stateNode.containerInfo;if(k===d)break;if(S===4)for(S=o.return;S!==null;){var z=S.tag;if((z===3||z===4)&&S.stateNode.containerInfo===d)return;S=S.return}for(;k!==null;){if(S=Sl(k),S===null)return;if(z=S.tag,z===5||z===6||z===26||z===27){o=g=S;continue e}k=k.parentNode}}o=o.return}gh(function(){var V=g,W=Ks(a),ae=[];e:{var F=Fh.get(e);if(F!==void 0){var K=Ki,be=e;switch(e){case"keypress":if(Xi(a)===0)break e;case"keydown":case"keyup":K=Xb;break;case"focusin":be="focus",K=nu;break;case"focusout":be="blur",K=nu;break;case"beforeblur":case"afterblur":K=nu;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":K=bh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=Lb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=Zb;break;case qh:case Ih:case Vh:K=Hb;break;case $h:K=Wb;break;case"scroll":case"scrollend":K=Ob;break;case"wheel":K=tv;break;case"copy":case"cut":case"paste":K=Ib;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Sh;break;case"toggle":case"beforetoggle":K=rv}var Ee=(n&4)!==0,at=!Ee&&(e==="scroll"||e==="scrollend"),q=Ee?F!==null?F+"Capture":null:F;Ee=[];for(var U=V,I;U!==null;){var re=U;if(I=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||I===null||q===null||(re=Ea(U,q),re!=null&&Ee.push(ii(U,re,I))),at)break;U=U.return}0<Ee.length&&(F=new K(F,be,null,a,W),ae.push({event:F,listeners:Ee}))}}if((n&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",K=e==="mouseout"||e==="pointerout",F&&a!==Qs&&(be=a.relatedTarget||a.fromElement)&&(Sl(be)||be[vl]))break e;if((K||F)&&(F=W.window===W?W:(F=W.ownerDocument)?F.defaultView||F.parentWindow:window,K?(be=a.relatedTarget||a.toElement,K=V,be=be?Sl(be):null,be!==null&&(at=u(be),Ee=be.tag,be!==at||Ee!==5&&Ee!==27&&Ee!==6)&&(be=null)):(K=null,be=V),K!==be)){if(Ee=bh,re="onMouseLeave",q="onMouseEnter",U="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=Sh,re="onPointerLeave",q="onPointerEnter",U="pointer"),at=K==null?F:ja(K),I=be==null?F:ja(be),F=new Ee(re,U+"leave",K,a,W),F.target=at,F.relatedTarget=I,re=null,Sl(W)===V&&(Ee=new Ee(q,U+"enter",be,a,W),Ee.target=I,Ee.relatedTarget=at,re=Ee),at=re,K&&be)t:{for(Ee=nS,q=K,U=be,I=0,re=q;re;re=Ee(re))I++;re=0;for(var we=U;we;we=Ee(we))re++;for(;0<I-re;)q=Ee(q),I--;for(;0<re-I;)U=Ee(U),re--;for(;I--;){if(q===U||U!==null&&q===U.alternate){Ee=q;break t}q=Ee(q),U=Ee(U)}Ee=null}else Ee=null;K!==null&&dg(ae,F,K,Ee,!1),be!==null&&at!==null&&dg(ae,at,be,Ee,!0)}}e:{if(F=V?ja(V):window,K=F.nodeName&&F.nodeName.toLowerCase(),K==="select"||K==="input"&&F.type==="file")var Ke=Ah;else if(Eh(F))if(Mh)Ke=hv;else{Ke=fv;var ve=cv}else K=F.nodeName,!K||K.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?V&&Xs(V.elementType)&&(Ke=Ah):Ke=dv;if(Ke&&(Ke=Ke(e,V))){Th(ae,Ke,a,W);break e}ve&&ve(e,F,V),e==="focusout"&&V&&F.type==="number"&&V.memoizedProps.value!=null&&Ps(F,"number",F.value)}switch(ve=V?ja(V):window,e){case"focusin":(Eh(ve)||ve.contentEditable==="true")&&(Ml=ve,su=V,_a=null);break;case"focusout":_a=su=Ml=null;break;case"mousedown":uu=!0;break;case"contextmenu":case"mouseup":case"dragend":uu=!1,Bh(ae,a,W);break;case"selectionchange":if(pv)break;case"keydown":case"keyup":Bh(ae,a,W)}var ze;if(lu)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 Al?Nh(e,a)&&(Ve="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ve="onCompositionStart");Ve&&(wh&&a.locale!=="ko"&&(Al||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Al&&(ze=yh()):(mr=W,Ws="value"in mr?mr.value:mr.textContent,Al=!0)),ve=Io(V,Ve),0<ve.length&&(Ve=new vh(Ve,e,null,a,W),ae.push({event:Ve,listeners:ve}),ze?Ve.data=ze:(ze=jh(a),ze!==null&&(Ve.data=ze)))),(ze=av?iv(e,a):ov(e,a))&&(Ve=Io(V,"onBeforeInput"),0<Ve.length&&(ve=new vh("onBeforeInput","beforeinput",null,a,W),ae.push({event:ve,listeners:Ve}),ve.data=ze)),Jv(ae,e,V,a,W)}cg(ae,n)})}function ii(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Io(e,n){for(var a=n+"Capture",o=[];e!==null;){var d=e,g=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||g===null||(d=Ea(e,a),d!=null&&o.unshift(ii(e,d,g)),d=Ea(e,n),d!=null&&o.push(ii(e,d,g))),e.tag===3)return o;e=e.return}return[]}function nS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function dg(e,n,a,o,d){for(var g=n._reactName,S=[];a!==null&&a!==o;){var k=a,z=k.alternate,V=k.stateNode;if(k=k.tag,z!==null&&z===o)break;k!==5&&k!==26&&k!==27||V===null||(z=V,d?(V=Ea(a,g),V!=null&&S.unshift(ii(a,V,z))):d||(V=Ea(a,g),V!=null&&S.push(ii(a,V,z)))),a=a.return}S.length!==0&&e.push({event:n,listeners:S})}var rS=/\r\n?/g,lS=/\u0000|\uFFFD/g;function hg(e){return(typeof e=="string"?e:""+e).replace(rS,`
|
|
49
|
+
`).replace(lS,"")}function mg(e,n){return n=hg(n),hg(e)===n}function lt(e,n,a,o,d,g){switch(a){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||jl(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&jl(e,""+o);break;case"className":Fi(e,"class",o);break;case"tabIndex":Fi(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Fi(e,a,o);break;case"style":mh(e,o,g);break;case"data":if(n!=="object"){Fi(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=Gi(""+o),e.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="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 g=="function"&&(a==="formAction"?(n!=="input"&<(e,n,"name",d.name,d,null),lt(e,n,"formEncType",d.formEncType,d,null),lt(e,n,"formMethod",d.formMethod,d,null),lt(e,n,"formTarget",d.formTarget,d,null)):(lt(e,n,"encType",d.encType,d,null),lt(e,n,"method",d.method,d,null),lt(e,n,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=Gi(""+o),e.setAttribute(a,o);break;case"onClick":o!=null&&(e.onclick=Fn);break;case"onScroll":o!=null&&He("scroll",e);break;case"onScrollEnd":o!=null&&He("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(d.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}a=Gi(""+o),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":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""+o):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":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":o===!0?e.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,o):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(a,o):e.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(a):e.setAttribute(a,o);break;case"popover":He("beforetoggle",e),He("toggle",e),$i(e,"popover",o);break;case"xlinkActuate":$n(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":$n(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":$n(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":$n(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":$n(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":$n(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":$n(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":$n(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":$n(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":$i(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Rb.get(a)||a,$i(e,a,o))}}function Oc(e,n,a,o,d,g){switch(a){case"style":mh(e,o,g);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(d.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof o=="string"?jl(e,o):(typeof o=="number"||typeof o=="bigint")&&jl(e,""+o);break;case"onScroll":o!=null&&He("scroll",e);break;case"onScrollEnd":o!=null&&He("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Fn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ah.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),n=a.slice(2,d?a.length-7:void 0),g=e[Xt]||null,g=g!=null?g[a]:null,typeof g=="function"&&e.removeEventListener(n,g,d),typeof o=="function")){typeof g!="function"&&g!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,o,d);break e}a in e?e[a]=o:o===!0?e.setAttribute(a,""):$i(e,a,o)}}}function Ht(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("load",e);var o=!1,d=!1,g;for(g in a)if(a.hasOwnProperty(g)){var S=a[g];if(S!=null)switch(g){case"src":o=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:lt(e,n,g,S,a,null)}}d&<(e,n,"srcSet",a.srcSet,a,null),o&<(e,n,"src",a.src,a,null);return;case"input":He("invalid",e);var k=g=S=d=null,z=null,V=null;for(o in a)if(a.hasOwnProperty(o)){var W=a[o];if(W!=null)switch(o){case"name":d=W;break;case"type":S=W;break;case"checked":z=W;break;case"defaultChecked":V=W;break;case"value":g=W;break;case"defaultValue":k=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(i(137,n));break;default:lt(e,n,o,W,a,null)}}ch(e,g,k,z,V,S,d,!1);return;case"select":He("invalid",e),o=S=g=null;for(d in a)if(a.hasOwnProperty(d)&&(k=a[d],k!=null))switch(d){case"value":g=k;break;case"defaultValue":S=k;break;case"multiple":o=k;default:lt(e,n,d,k,a,null)}n=g,a=S,e.multiple=!!o,n!=null?Nl(e,!!o,n,!1):a!=null&&Nl(e,!!o,a,!0);return;case"textarea":He("invalid",e),g=d=o=null;for(S in a)if(a.hasOwnProperty(S)&&(k=a[S],k!=null))switch(S){case"value":o=k;break;case"defaultValue":d=k;break;case"children":g=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(i(91));break;default:lt(e,n,S,k,a,null)}dh(e,o,d,g);return;case"option":for(z in a)if(a.hasOwnProperty(z)&&(o=a[z],o!=null))switch(z){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:lt(e,n,z,o,a,null)}return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(o=0;o<ai.length;o++)He(ai[o],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("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(V in a)if(a.hasOwnProperty(V)&&(o=a[V],o!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:lt(e,n,V,o,a,null)}return;default:if(Xs(n)){for(W in a)a.hasOwnProperty(W)&&(o=a[W],o!==void 0&&Oc(e,n,W,o,a,void 0));return}}for(k in a)a.hasOwnProperty(k)&&(o=a[k],o!=null&<(e,n,k,o,a,null))}function aS(e,n,a,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,g=null,S=null,k=null,z=null,V=null,W=null;for(K in a){var ae=a[K];if(a.hasOwnProperty(K)&&ae!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":z=ae;default:o.hasOwnProperty(K)||lt(e,n,K,null,o,ae)}}for(var F in o){var K=o[F];if(ae=a[F],o.hasOwnProperty(F)&&(K!=null||ae!=null))switch(F){case"type":g=K;break;case"name":d=K;break;case"checked":V=K;break;case"defaultChecked":W=K;break;case"value":S=K;break;case"defaultValue":k=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(i(137,n));break;default:K!==ae&<(e,n,F,K,o,ae)}}Gs(e,S,k,z,V,W,g,d);return;case"select":K=S=k=F=null;for(g in a)if(z=a[g],a.hasOwnProperty(g)&&z!=null)switch(g){case"value":break;case"multiple":K=z;default:o.hasOwnProperty(g)||lt(e,n,g,null,o,z)}for(d in o)if(g=o[d],z=a[d],o.hasOwnProperty(d)&&(g!=null||z!=null))switch(d){case"value":F=g;break;case"defaultValue":k=g;break;case"multiple":S=g;default:g!==z&<(e,n,d,g,o,z)}n=k,a=S,o=K,F!=null?Nl(e,!!a,F,!1):!!o!=!!a&&(n!=null?Nl(e,!!a,n,!0):Nl(e,!!a,a?[]:"",!1));return;case"textarea":K=F=null;for(k in a)if(d=a[k],a.hasOwnProperty(k)&&d!=null&&!o.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:lt(e,n,k,null,o,d)}for(S in o)if(d=o[S],g=a[S],o.hasOwnProperty(S)&&(d!=null||g!=null))switch(S){case"value":F=d;break;case"defaultValue":K=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(i(91));break;default:d!==g&<(e,n,S,d,o,g)}fh(e,F,K);return;case"option":for(var be in a)if(F=a[be],a.hasOwnProperty(be)&&F!=null&&!o.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:lt(e,n,be,null,o,F)}for(z in o)if(F=o[z],K=a[z],o.hasOwnProperty(z)&&F!==K&&(F!=null||K!=null))switch(z){case"selected":e.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:lt(e,n,z,F,o,K)}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 Ee in a)F=a[Ee],a.hasOwnProperty(Ee)&&F!=null&&!o.hasOwnProperty(Ee)&<(e,n,Ee,null,o,F);for(V in o)if(F=o[V],K=a[V],o.hasOwnProperty(V)&&F!==K&&(F!=null||K!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(i(137,n));break;default:lt(e,n,V,F,o,K)}return;default:if(Xs(n)){for(var at in a)F=a[at],a.hasOwnProperty(at)&&F!==void 0&&!o.hasOwnProperty(at)&&Oc(e,n,at,void 0,o,F);for(W in o)F=o[W],K=a[W],!o.hasOwnProperty(W)||F===K||F===void 0&&K===void 0||Oc(e,n,W,F,o,K);return}}for(var q in a)F=a[q],a.hasOwnProperty(q)&&F!=null&&!o.hasOwnProperty(q)&<(e,n,q,null,o,F);for(ae in o)F=o[ae],K=a[ae],!o.hasOwnProperty(ae)||F===K||F==null&&K==null||lt(e,n,ae,F,o,K)}function pg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function iS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var d=a[o],g=d.transferSize,S=d.initiatorType,k=d.duration;if(g&&k&&pg(S)){for(S=0,k=d.responseEnd,o+=1;o<a.length;o++){var z=a[o],V=z.startTime;if(V>k)break;var W=z.transferSize,ae=z.initiatorType;W&&pg(ae)&&(z=z.responseEnd,S+=W*(z<k?1:(k-V)/(z-V)))}if(--o,n+=8*(g+S)/(d.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var _c=null,Lc=null;function Vo(e){return e.nodeType===9?e:e.ownerDocument}function gg(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 yg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Uc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Bc=null;function oS(){var e=window.event;return e&&e.type==="popstate"?e===Bc?!1:(Bc=e,!0):(Bc=null,!1)}var xg=typeof setTimeout=="function"?setTimeout:void 0,sS=typeof clearTimeout=="function"?clearTimeout:void 0,bg=typeof Promise=="function"?Promise:void 0,uS=typeof queueMicrotask=="function"?queueMicrotask:typeof bg<"u"?function(e){return bg.resolve(null).then(e).catch(cS)}:xg;function cS(e){setTimeout(function(){throw e})}function Dr(e){return e==="head"}function vg(e,n){var a=n,o=0;do{var d=a.nextSibling;if(e.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(o===0){e.removeChild(d),ra(n);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")oi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,oi(a);for(var g=a.firstChild;g;){var S=g.nextSibling,k=g.nodeName;g[Na]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&g.rel.toLowerCase()==="stylesheet"||a.removeChild(g),g=S}}else a==="body"&&oi(e.ownerDocument.body);a=d}while(a);ra(n)}function Sg(e,n){var a=e;e=0;do{var o=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=o}while(a)}function Hc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Hc(a),Fs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function fS(e,n,a,o){for(;e.nodeType===1;){var d=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Na])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(g=e.getAttribute("rel"),g==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(g!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(g=e.getAttribute("src"),(g!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&g&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var g=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===g)return e}else return e;if(e=Cn(e.nextSibling),e===null)break}return null}function dS(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Cn(e.nextSibling),e===null))return null;return e}function wg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Cn(e.nextSibling),e===null))return null;return e}function qc(e){return e.data==="$?"||e.data==="$~"}function Ic(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function hS(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var o=function(){n(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Cn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Vc=null;function kg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return Cn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function Cg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function Ng(e,n,a){switch(n=Vo(a),e){case"html":if(e=n.documentElement,!e)throw Error(i(452));return e;case"head":if(e=n.head,!e)throw Error(i(453));return e;case"body":if(e=n.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function oi(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Fs(e)}var Nn=new Map,jg=new Set;function $o(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ir=J.d;J.d={f:mS,r:pS,D:gS,C:yS,L:xS,m:bS,X:SS,S:vS,M:wS};function mS(){var e=ir.f(),n=Oo();return e||n}function pS(e){var n=wl(e);n!==null&&n.tag===5&&n.type==="form"?$m(n):ir.r(e)}var ea=typeof document>"u"?null:document;function Eg(e,n,a){var o=ea;if(o&&typeof n=="string"&&n){var d=yn(n);d='link[rel="'+e+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),jg.has(d)||(jg.add(d),e={rel:e,crossOrigin:a,href:n},o.querySelector(d)===null&&(n=o.createElement("link"),Ht(n,"link",e),Rt(n),o.head.appendChild(n)))}}function gS(e){ir.D(e),Eg("dns-prefetch",e,null)}function yS(e,n){ir.C(e,n),Eg("preconnect",e,n)}function xS(e,n,a){ir.L(e,n,a);var o=ea;if(o&&e&&n){var d='link[rel="preload"][as="'+yn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+yn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+yn(a.imageSizes)+'"]')):d+='[href="'+yn(e)+'"]';var g=d;switch(n){case"style":g=ta(e);break;case"script":g=na(e)}Nn.has(g)||(e=y({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),Nn.set(g,e),o.querySelector(d)!==null||n==="style"&&o.querySelector(si(g))||n==="script"&&o.querySelector(ui(g))||(n=o.createElement("link"),Ht(n,"link",e),Rt(n),o.head.appendChild(n)))}}function bS(e,n){ir.m(e,n);var a=ea;if(a&&e){var o=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+yn(o)+'"][href="'+yn(e)+'"]',g=d;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=na(e)}if(!Nn.has(g)&&(e=y({rel:"modulepreload",href:e},n),Nn.set(g,e),a.querySelector(d)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ui(g)))return}o=a.createElement("link"),Ht(o,"link",e),Rt(o),a.head.appendChild(o)}}}function vS(e,n,a){ir.S(e,n,a);var o=ea;if(o&&e){var d=kl(o).hoistableStyles,g=ta(e);n=n||"default";var S=d.get(g);if(!S){var k={loading:0,preload:null};if(S=o.querySelector(si(g)))k.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=Nn.get(g))&&$c(e,a);var z=S=o.createElement("link");Rt(z),Ht(z,"link",e),z._p=new Promise(function(V,W){z.onload=V,z.onerror=W}),z.addEventListener("load",function(){k.loading|=1}),z.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Fo(S,n,o)}S={type:"stylesheet",instance:S,count:1,state:k},d.set(g,S)}}}function SS(e,n){ir.X(e,n);var a=ea;if(a&&e){var o=kl(a).hoistableScripts,d=na(e),g=o.get(d);g||(g=a.querySelector(ui(d)),g||(e=y({src:e,async:!0},n),(n=Nn.get(d))&&Fc(e,n),g=a.createElement("script"),Rt(g),Ht(g,"link",e),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},o.set(d,g))}}function wS(e,n){ir.M(e,n);var a=ea;if(a&&e){var o=kl(a).hoistableScripts,d=na(e),g=o.get(d);g||(g=a.querySelector(ui(d)),g||(e=y({src:e,async:!0,type:"module"},n),(n=Nn.get(d))&&Fc(e,n),g=a.createElement("script"),Rt(g),Ht(g,"link",e),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},o.set(d,g))}}function Tg(e,n,a,o){var d=(d=te.current)?$o(d):null;if(!d)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=ta(a.href),a=kl(d).hoistableStyles,o=a.get(n),o||(o={type:"style",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ta(a.href);var g=kl(d).hoistableStyles,S=g.get(e);if(S||(d=d.ownerDocument||d,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(e,S),(g=d.querySelector(si(e)))&&!g._p&&(S.instance=g,S.state.loading=5),Nn.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},Nn.set(e,a),g||kS(d,e,a,S.state))),n&&o===null)throw Error(i(528,""));return S}if(n&&o!==null)throw Error(i(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=na(a),a=kl(d).hoistableScripts,o=a.get(n),o||(o={type:"script",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function ta(e){return'href="'+yn(e)+'"'}function si(e){return'link[rel="stylesheet"]['+e+"]"}function Ag(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function kS(e,n,a,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),Ht(n,"link",a),Rt(n),e.head.appendChild(n))}function na(e){return'[src="'+yn(e)+'"]'}function ui(e){return"script[async]"+e}function Mg(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+yn(a.href)+'"]');if(o)return n.instance=o,Rt(o),o;var d=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Rt(o),Ht(o,"style",d),Fo(o,a.precedence,e),n.instance=o;case"stylesheet":d=ta(a.href);var g=e.querySelector(si(d));if(g)return n.state.loading|=4,n.instance=g,Rt(g),g;o=Ag(a),(d=Nn.get(d))&&$c(o,d),g=(e.ownerDocument||e).createElement("link"),Rt(g);var S=g;return S._p=new Promise(function(k,z){S.onload=k,S.onerror=z}),Ht(g,"link",o),n.state.loading|=4,Fo(g,a.precedence,e),n.instance=g;case"script":return g=na(a.src),(d=e.querySelector(ui(g)))?(n.instance=d,Rt(d),d):(o=a,(d=Nn.get(g))&&(o=y({},a),Fc(o,d)),e=e.ownerDocument||e,d=e.createElement("script"),Rt(d),Ht(d,"link",o),e.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error(i(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,Fo(o,a.precedence,e));return n.instance}function Fo(e,n,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=o.length?o[o.length-1]:null,g=d,S=0;S<o.length;S++){var k=o[S];if(k.dataset.precedence===n)g=k;else if(g!==d)break}g?g.parentNode.insertBefore(e,g.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function $c(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Fc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Yo=null;function Dg(e,n,a){if(Yo===null){var o=new Map,d=Yo=new Map;d.set(a,o)}else d=Yo,o=d.get(a),o||(o=new Map,d.set(a,o));if(o.has(e))return o;for(o.set(e,null),a=a.getElementsByTagName(e),d=0;d<a.length;d++){var g=a[d];if(!(g[Na]||g[_t]||e==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var S=g.getAttribute(n)||"";S=e+S;var k=o.get(S);k?k.push(g):o.set(S,[g])}}return o}function Rg(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function CS(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function zg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function NS(e,n,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=ta(o.href),g=n.querySelector(si(d));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Go.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=g,Rt(g);return}g=n.ownerDocument||n,o=Ag(o),(d=Nn.get(d))&&$c(o,d),g=g.createElement("link"),Rt(g);var S=g;S._p=new Promise(function(k,z){S.onload=k,S.onerror=z}),Ht(g,"link",o),a.instance=g}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Go.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Yc=0;function jS(e,n){return e.stylesheets&&e.count===0&&Xo(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var o=setTimeout(function(){if(e.stylesheets&&Xo(e,e.stylesheets),e.unsuspend){var g=e.unsuspend;e.unsuspend=null,g()}},6e4+n);0<e.imgBytes&&Yc===0&&(Yc=62500*iS());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xo(e,e.stylesheets),e.unsuspend)){var g=e.unsuspend;e.unsuspend=null,g()}},(e.imgBytes>Yc?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(d)}}:null}function Go(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Po=null;function Xo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Po=new Map,n.forEach(ES,e),Po=null,Go.call(e))}function ES(e,n){if(!(n.state.loading&4)){var a=Po.get(e);if(a)var o=a.get(null);else{a=new Map,Po.set(e,a);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<d.length;g++){var S=d[g];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(a.set(S.dataset.precedence,S),o=S)}o&&a.set(null,o)}d=n.instance,S=d.getAttribute("data-precedence"),g=a.get(S)||o,g===o&&a.set(null,d),a.set(S,d),this.count++,o=Go.bind(this),d.addEventListener("load",o),d.addEventListener("error",o),g?g.parentNode.insertBefore(d,g.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),n.state.loading|=4}}var ci={$$typeof:O,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function TS(e,n,a,o,d,g,S,k,z){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=qs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qs(0),this.hiddenUpdates=qs(null),this.identifierPrefix=o,this.onUncaughtError=d,this.onCaughtError=g,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function Og(e,n,a,o,d,g,S,k,z,V,W,ae){return e=new TS(e,n,a,S,z,V,W,ae,k),n=1,g===!0&&(n|=24),g=ln(3,null,null,n),e.current=g,g.stateNode=e,n=Cu(),n.refCount++,e.pooledCache=n,n.refCount++,g.memoizedState={element:o,isDehydrated:a,cache:n},Tu(g),e}function _g(e){return e?(e=zl,e):zl}function Lg(e,n,a,o,d,g){d=_g(d),o.context===null?o.context=d:o.pendingContext=d,o=vr(n),o.payload={element:a},g=g===void 0?null:g,g!==null&&(o.callback=g),a=Sr(e,o,n),a!==null&&(en(a,e,n),Va(a,e,n))}function Ug(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Gc(e,n){Ug(e,n),(e=e.alternate)&&Ug(e,n)}function Bg(e){if(e.tag===13||e.tag===31){var n=Jr(e,67108864);n!==null&&en(n,e,67108864),Gc(e,67108864)}}function Hg(e){if(e.tag===13||e.tag===31){var n=cn();n=Is(n);var a=Jr(e,n);a!==null&&en(a,e,n),Gc(e,n)}}var Qo=!0;function AS(e,n,a,o){var d=R.T;R.T=null;var g=J.p;try{J.p=2,Pc(e,n,a,o)}finally{J.p=g,R.T=d}}function MS(e,n,a,o){var d=R.T;R.T=null;var g=J.p;try{J.p=8,Pc(e,n,a,o)}finally{J.p=g,R.T=d}}function Pc(e,n,a,o){if(Qo){var d=Xc(o);if(d===null)zc(e,n,o,Ko,a),Ig(e,o);else if(RS(d,e,n,a,o))o.stopPropagation();else if(Ig(e,o),n&4&&-1<DS.indexOf(e)){for(;d!==null;){var g=wl(d);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var S=Pr(g.pendingLanes);if(S!==0){var k=g;for(k.pendingLanes|=2,k.entangledLanes|=2;S;){var z=1<<31-We(S);k.entanglements[1]|=z,S&=~z}Bn(g),(Je&6)===0&&(Ro=se()+500,li(0))}}break;case 31:case 13:k=Jr(g,2),k!==null&&en(k,g,2),Oo(),Gc(g,2)}if(g=Xc(o),g===null&&zc(e,n,o,Ko,a),g===d)break;d=g}d!==null&&o.stopPropagation()}else zc(e,n,o,null,a)}}function Xc(e){return e=Ks(e),Qc(e)}var Ko=null;function Qc(e){if(Ko=null,e=Sl(e),e!==null){var n=u(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=c(n),e!==null)return e;e=null}else if(a===31){if(e=f(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Ko=e,null}function qg(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(Te()){case Q:return 2;case de:return 8;case Ce:case Re:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Kc=!1,Rr=null,zr=null,Or=null,fi=new Map,di=new Map,_r=[],DS="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 Ig(e,n){switch(e){case"focusin":case"focusout":Rr=null;break;case"dragenter":case"dragleave":zr=null;break;case"mouseover":case"mouseout":Or=null;break;case"pointerover":case"pointerout":fi.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":di.delete(n.pointerId)}}function hi(e,n,a,o,d,g){return e===null||e.nativeEvent!==g?(e={blockedOn:n,domEventName:a,eventSystemFlags:o,nativeEvent:g,targetContainers:[d]},n!==null&&(n=wl(n),n!==null&&Bg(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function RS(e,n,a,o,d){switch(n){case"focusin":return Rr=hi(Rr,e,n,a,o,d),!0;case"dragenter":return zr=hi(zr,e,n,a,o,d),!0;case"mouseover":return Or=hi(Or,e,n,a,o,d),!0;case"pointerover":var g=d.pointerId;return fi.set(g,hi(fi.get(g)||null,e,n,a,o,d)),!0;case"gotpointercapture":return g=d.pointerId,di.set(g,hi(di.get(g)||null,e,n,a,o,d)),!0}return!1}function Vg(e){var n=Sl(e.target);if(n!==null){var a=u(n);if(a!==null){if(n=a.tag,n===13){if(n=c(a),n!==null){e.blockedOn=n,nh(e.priority,function(){Hg(a)});return}}else if(n===31){if(n=f(a),n!==null){e.blockedOn=n,nh(e.priority,function(){Hg(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Zo(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Xc(e.nativeEvent);if(a===null){a=e.nativeEvent;var o=new a.constructor(a.type,a);Qs=o,a.target.dispatchEvent(o),Qs=null}else return n=wl(a),n!==null&&Bg(n),e.blockedOn=a,!1;n.shift()}return!0}function $g(e,n,a){Zo(e)&&a.delete(n)}function zS(){Kc=!1,Rr!==null&&Zo(Rr)&&(Rr=null),zr!==null&&Zo(zr)&&(zr=null),Or!==null&&Zo(Or)&&(Or=null),fi.forEach($g),di.forEach($g)}function Jo(e,n){e.blockedOn===n&&(e.blockedOn=null,Kc||(Kc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zS)))}var Wo=null;function Fg(e){Wo!==e&&(Wo=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wo===e&&(Wo=null);for(var n=0;n<e.length;n+=3){var a=e[n],o=e[n+1],d=e[n+2];if(typeof o!="function"){if(Qc(o||a)===null)continue;break}var g=wl(a);g!==null&&(e.splice(n,3),n-=3,Xu(g,{pending:!0,data:d,method:a.method,action:o},o,d))}}))}function ra(e){function n(z){return Jo(z,e)}Rr!==null&&Jo(Rr,e),zr!==null&&Jo(zr,e),Or!==null&&Jo(Or,e),fi.forEach(n),di.forEach(n);for(var a=0;a<_r.length;a++){var o=_r[a];o.blockedOn===e&&(o.blockedOn=null)}for(;0<_r.length&&(a=_r[0],a.blockedOn===null);)Vg(a),a.blockedOn===null&&_r.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var d=a[o],g=a[o+1],S=d[Xt]||null;if(typeof g=="function")S||Fg(a);else if(S){var k=null;if(g&&g.hasAttribute("formAction")){if(d=g,S=g[Xt]||null)k=S.formAction;else if(Qc(d)!==null)continue}else k=S.action;typeof k=="function"?a[o+1]=k:(a.splice(o,3),o-=3),Fg(a)}}}function Yg(){function e(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(S){return d=S})},focusReset:"manual",scroll:"manual"})}function n(){d!==null&&(d(),d=null),o||setTimeout(a,20)}function a(){if(!o&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),d!==null&&(d(),d=null)}}}function Zc(e){this._internalRoot=e}es.prototype.render=Zc.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(i(409));var a=n.current,o=cn();Lg(a,o,e,n,null,null)},es.prototype.unmount=Zc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Lg(e.current,2,null,e,null,null),Oo(),n[vl]=null}};function es(e){this._internalRoot=e}es.prototype.unstable_scheduleHydration=function(e){if(e){var n=th();e={blockedOn:null,target:e,priority:n};for(var a=0;a<_r.length&&n!==0&&n<_r[a].priority;a++);_r.splice(a,0,e),a===0&&Vg(e)}};var Gg=r.version;if(Gg!=="19.2.6")throw Error(i(527,Gg,"19.2.6"));J.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=m(n),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var OS={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ts=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ts.isDisabled&&ts.supportsFiber)try{gt=ts.inject(OS),st=ts}catch{}}return pi.createRoot=function(e,n){if(!s(e))throw Error(i(299));var a=!1,o="",d=Wm,g=ep,S=tp;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(S=n.onRecoverableError)),n=Og(e,1,!1,null,null,a,o,null,d,g,S,Yg),e[vl]=n.current,Rc(e),new Zc(n)},pi.hydrateRoot=function(e,n,a){if(!s(e))throw Error(i(299));var o=!1,d="",g=Wm,S=ep,k=tp,z=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(g=a.onUncaughtError),a.onCaughtError!==void 0&&(S=a.onCaughtError),a.onRecoverableError!==void 0&&(k=a.onRecoverableError),a.formState!==void 0&&(z=a.formState)),n=Og(e,1,!0,n,a??null,o,d,z,g,S,k,Yg),n.context=_g(null),a=n.current,o=cn(),o=Is(o),d=vr(o),d.callback=null,Sr(a,d,o),a=o,n.current.lanes=a,Ca(n,a),Bn(n),e[vl]=n.current,Rc(e),new es(n)},pi.version="19.2.6",pi}var ny;function GS(){if(ny)return ef.exports;ny=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),ef.exports=YS(),ef.exports}var PS=GS();const XS=Ri(PS);function kx(t){var r,l,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(l=kx(t[r]))&&(i&&(i+=" "),i+=l)}else for(l in t)t[l]&&(i&&(i+=" "),i+=l);return i}function Cx(){for(var t,r,l=0,i="",s=arguments.length;l<s;l++)(t=arguments[l])&&(r=kx(t))&&(i&&(i+=" "),i+=r);return i}const sd="-",QS=t=>{const r=ZS(t),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:c=>{const f=c.split(sd);return f[0]===""&&f.length!==1&&f.shift(),Nx(f,r)||KS(c)},getConflictingClassGroupIds:(c,f)=>{const p=l[c]||[];return f&&i[c]?[...p,...i[c]]:p}}},Nx=(t,r)=>{var c;if(t.length===0)return r.classGroupId;const l=t[0],i=r.nextPart.get(l),s=i?Nx(t.slice(1),i):void 0;if(s)return s;if(r.validators.length===0)return;const u=t.join(sd);return(c=r.validators.find(({validator:f})=>f(u)))==null?void 0:c.classGroupId},ry=/^\[(.+)\]$/,KS=t=>{if(ry.test(t)){const r=ry.exec(t)[1],l=r==null?void 0:r.substring(0,r.indexOf(":"));if(l)return"arbitrary.."+l}},ZS=t=>{const{theme:r,prefix:l}=t,i={nextPart:new Map,validators:[]};return WS(Object.entries(t.classGroups),l).forEach(([u,c])=>{Uf(c,i,u,r)}),i},Uf=(t,r,l,i)=>{t.forEach(s=>{if(typeof s=="string"){const u=s===""?r:ly(r,s);u.classGroupId=l;return}if(typeof s=="function"){if(JS(s)){Uf(s(i),r,l,i);return}r.validators.push({validator:s,classGroupId:l});return}Object.entries(s).forEach(([u,c])=>{Uf(c,ly(r,u),l,i)})})},ly=(t,r)=>{let l=t;return r.split(sd).forEach(i=>{l.nextPart.has(i)||l.nextPart.set(i,{nextPart:new Map,validators:[]}),l=l.nextPart.get(i)}),l},JS=t=>t.isThemeGetter,WS=(t,r)=>r?t.map(([l,i])=>{const s=i.map(u=>typeof u=="string"?r+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([c,f])=>[r+c,f])):u);return[l,s]}):t,ew=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,l=new Map,i=new Map;const s=(u,c)=>{l.set(u,c),r++,r>t&&(r=0,i=l,l=new Map)};return{get(u){let c=l.get(u);if(c!==void 0)return c;if((c=i.get(u))!==void 0)return s(u,c),c},set(u,c){l.has(u)?l.set(u,c):s(u,c)}}},jx="!",tw=t=>{const{separator:r,experimentalParseClassName:l}=t,i=r.length===1,s=r[0],u=r.length,c=f=>{const p=[];let m=0,x=0,y;for(let A=0;A<f.length;A++){let E=f[A];if(m===0){if(E===s&&(i||f.slice(A,A+u)===r)){p.push(f.slice(x,A)),x=A+u;continue}if(E==="/"){y=A;continue}}E==="["?m++:E==="]"&&m--}const b=p.length===0?f:f.substring(x),v=b.startsWith(jx),C=v?b.substring(1):b,N=y&&y>x?y-x:void 0;return{modifiers:p,hasImportantModifier:v,baseClassName:C,maybePostfixModifierPosition:N}};return l?f=>l({className:f,parseClassName:c}):c},nw=t=>{if(t.length<=1)return t;const r=[];let l=[];return t.forEach(i=>{i[0]==="["?(r.push(...l.sort(),i),l=[]):l.push(i)}),r.push(...l.sort()),r},rw=t=>({cache:ew(t.cacheSize),parseClassName:tw(t),...QS(t)}),lw=/\s+/,aw=(t,r)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:s}=r,u=[],c=t.trim().split(lw);let f="";for(let p=c.length-1;p>=0;p-=1){const m=c[p],{modifiers:x,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:v}=l(m);let C=!!v,N=i(C?b.substring(0,v):b);if(!N){if(!C){f=m+(f.length>0?" "+f:f);continue}if(N=i(b),!N){f=m+(f.length>0?" "+f:f);continue}C=!1}const A=nw(x).join(":"),E=y?A+jx:A,M=E+N;if(u.includes(M))continue;u.push(M);const O=s(N,C);for(let $=0;$<O.length;++$){const P=O[$];u.push(E+P)}f=m+(f.length>0?" "+f:f)}return f};function iw(){let t=0,r,l,i="";for(;t<arguments.length;)(r=arguments[t++])&&(l=Ex(r))&&(i&&(i+=" "),i+=l);return i}const Ex=t=>{if(typeof t=="string")return t;let r,l="";for(let i=0;i<t.length;i++)t[i]&&(r=Ex(t[i]))&&(l&&(l+=" "),l+=r);return l};function ow(t,...r){let l,i,s,u=c;function c(p){const m=r.reduce((x,y)=>y(x),t());return l=rw(m),i=l.cache.get,s=l.cache.set,u=f,f(p)}function f(p){const m=i(p);if(m)return m;const x=aw(p,l);return s(p,x),x}return function(){return u(iw.apply(null,arguments))}}const dt=t=>{const r=l=>l[t]||[];return r.isThemeGetter=!0,r},Tx=/^\[(?:([a-z-]+):)?(.+)\]$/i,sw=/^\d+\/\d+$/,uw=new Set(["px","full","screen"]),cw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fw=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,or=t=>ca(t)||uw.has(t)||sw.test(t),Ur=t=>ba(t,"length",ww),ca=t=>!!t&&!Number.isNaN(Number(t)),lf=t=>ba(t,"number",ca),gi=t=>!!t&&Number.isInteger(Number(t)),pw=t=>t.endsWith("%")&&ca(t.slice(0,-1)),Oe=t=>Tx.test(t),Br=t=>cw.test(t),gw=new Set(["length","size","percentage"]),yw=t=>ba(t,gw,Ax),xw=t=>ba(t,"position",Ax),bw=new Set(["image","url"]),vw=t=>ba(t,bw,Cw),Sw=t=>ba(t,"",kw),yi=()=>!0,ba=(t,r,l)=>{const i=Tx.exec(t);return i?i[1]?typeof r=="string"?i[1]===r:r.has(i[1]):l(i[2]):!1},ww=t=>fw.test(t)&&!dw.test(t),Ax=()=>!1,kw=t=>hw.test(t),Cw=t=>mw.test(t),Nw=()=>{const t=dt("colors"),r=dt("spacing"),l=dt("blur"),i=dt("brightness"),s=dt("borderColor"),u=dt("borderRadius"),c=dt("borderSpacing"),f=dt("borderWidth"),p=dt("contrast"),m=dt("grayscale"),x=dt("hueRotate"),y=dt("invert"),b=dt("gap"),v=dt("gradientColorStops"),C=dt("gradientColorStopPositions"),N=dt("inset"),A=dt("margin"),E=dt("opacity"),M=dt("padding"),O=dt("saturate"),$=dt("scale"),P=dt("sepia"),L=dt("skew"),Y=dt("space"),le=dt("translate"),oe=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",Oe,r],G=()=>[Oe,r],fe=()=>["",or,Ur],ue=()=>["auto",ca,Oe],ne=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],R=()=>["solid","dashed","dotted","double","none"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>["start","end","center","between","around","evenly","stretch"],ge=()=>["","0",Oe],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>[ca,Oe];return{cacheSize:500,separator:":",theme:{colors:[yi],spacing:[or,Ur],blur:["none","",Br,Oe],brightness:T(),borderColor:[t],borderRadius:["none","","full",Br,Oe],borderSpacing:G(),borderWidth:fe(),contrast:T(),grayscale:ge(),hueRotate:T(),invert:ge(),gap:G(),gradientColorStops:[t],gradientColorStopPositions:[pw,Ur],inset:X(),margin:X(),opacity:T(),padding:G(),saturate:T(),scale:T(),sepia:ge(),skew:T(),space:G(),translate:G()},classGroups:{aspect:[{aspect:["auto","square","video",Oe]}],container:["container"],columns:[{columns:[Br]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ne(),Oe]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:oe()}],"overscroll-x":[{"overscroll-x":oe()}],"overscroll-y":[{"overscroll-y":oe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[N]}],"inset-x":[{"inset-x":[N]}],"inset-y":[{"inset-y":[N]}],start:[{start:[N]}],end:[{end:[N]}],top:[{top:[N]}],right:[{right:[N]}],bottom:[{bottom:[N]}],left:[{left:[N]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",gi,Oe]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Oe]}],grow:[{grow:ge()}],shrink:[{shrink:ge()}],order:[{order:["first","last","none",gi,Oe]}],"grid-cols":[{"grid-cols":[yi]}],"col-start-end":[{col:["auto",{span:["full",gi,Oe]},Oe]}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":[yi]}],"row-start-end":[{row:["auto",{span:[gi,Oe]},Oe]}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Oe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Oe]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ie(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[A]}],mx:[{mx:[A]}],my:[{my:[A]}],ms:[{ms:[A]}],me:[{me:[A]}],mt:[{mt:[A]}],mr:[{mr:[A]}],mb:[{mb:[A]}],ml:[{ml:[A]}],"space-x":[{"space-x":[Y]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Y]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Oe,r]}],"min-w":[{"min-w":[Oe,r,"min","max","fit"]}],"max-w":[{"max-w":[Oe,r,"none","full","min","max","fit","prose",{screen:[Br]},Br]}],h:[{h:[Oe,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Oe,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Oe,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Oe,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Br,Ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",lf]}],"font-family":[{font:[yi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Oe]}],"line-clamp":[{"line-clamp":["none",ca,lf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",or,Oe]}],"list-image":[{"list-image":["none",Oe]}],"list-style-type":[{list:["none","disc","decimal",Oe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",or,Ur]}],"underline-offset":[{"underline-offset":["auto",or,Oe]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ne(),xw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vw]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...R(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:R()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...R()]}],"outline-offset":[{"outline-offset":[or,Oe]}],"outline-w":[{outline:[or,Ur]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[or,Ur]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Br,Sw]}],"shadow-color":[{shadow:[yi]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...J(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":J()}],filter:[{filter:["","none"]}],blur:[{blur:[l]}],brightness:[{brightness:[i]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",Br,Oe]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[y]}],saturate:[{saturate:[O]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[l]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Oe]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",Oe]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",Oe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[$]}],"scale-x":[{"scale-x":[$]}],"scale-y":[{"scale-y":[$]}],rotate:[{rotate:[gi,Oe]}],"translate-x":[{"translate-x":[le]}],"translate-y":[{"translate-y":[le]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Oe]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Oe]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Oe]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[or,Ur,lf]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},jw=ow(Nw);function me(...t){return jw(Cx(t))}/**
|
|
50
|
+
* @license lucide-react v0.469.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const Ew=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mx=(...t)=>t.filter((r,l,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===l).join(" ").trim();/**
|
|
55
|
+
* @license lucide-react v0.469.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/var Tw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
60
|
+
* @license lucide-react v0.469.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const Aw=w.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:s="",children:u,iconNode:c,...f},p)=>w.createElement("svg",{ref:p,...Tw,width:r,height:r,stroke:t,strokeWidth:i?Number(l)*24/Number(r):l,className:Mx("lucide",s),...f},[...c.map(([m,x])=>w.createElement(m,x)),...Array.isArray(u)?u:[u]]));/**
|
|
65
|
+
* @license lucide-react v0.469.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const pe=(t,r)=>{const l=w.forwardRef(({className:i,...s},u)=>w.createElement(Aw,{ref:u,iconNode:r,className:Mx(`lucide-${Ew(t)}`,i),...s}));return l.displayName=`${t}`,l};/**
|
|
70
|
+
* @license lucide-react v0.469.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const Mw=pe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
75
|
+
* @license lucide-react v0.469.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const Dx=pe("ArchiveRestore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);/**
|
|
80
|
+
* @license lucide-react v0.469.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const Rx=pe("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
85
|
+
* @license lucide-react v0.469.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const zx=pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
90
|
+
* @license lucide-react v0.469.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const Ox=pe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
95
|
+
* @license lucide-react v0.469.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const _x=pe("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
100
|
+
* @license lucide-react v0.469.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const Lx=pe("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
105
|
+
* @license lucide-react v0.469.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const Dw=pe("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
|
|
110
|
+
* @license lucide-react v0.469.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const Rw=pe("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
115
|
+
* @license lucide-react v0.469.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const Ux=pe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
120
|
+
* @license lucide-react v0.469.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const Es=pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
125
|
+
* @license lucide-react v0.469.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const ud=pe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
130
|
+
* @license lucide-react v0.469.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const zw=pe("ChevronsDown",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]);/**
|
|
135
|
+
* @license lucide-react v0.469.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const Ow=pe("ChevronsUp",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]);/**
|
|
140
|
+
* @license lucide-react v0.469.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const _w=pe("CircleAlert",[["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"}]]);/**
|
|
145
|
+
* @license lucide-react v0.469.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const pl=pe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
150
|
+
* @license lucide-react v0.469.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const Lw=pe("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
|
|
155
|
+
* @license lucide-react v0.469.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const cd=pe("CircleX",[["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"}]]);/**
|
|
160
|
+
* @license lucide-react v0.469.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const Uw=pe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
165
|
+
* @license lucide-react v0.469.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const Bx=pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
170
|
+
* @license lucide-react v0.469.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const Bw=pe("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
|
|
175
|
+
* @license lucide-react v0.469.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const Hw=pe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
180
|
+
* @license lucide-react v0.469.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const Ti=pe("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
185
|
+
* @license lucide-react v0.469.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const Bf=pe("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
190
|
+
* @license lucide-react v0.469.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const Hf=pe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
195
|
+
* @license lucide-react v0.469.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const qw=pe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
200
|
+
* @license lucide-react v0.469.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const Iw=pe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
205
|
+
* @license lucide-react v0.469.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const Vw=pe("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
|
|
210
|
+
* @license lucide-react v0.469.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const $w=pe("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);/**
|
|
215
|
+
* @license lucide-react v0.469.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const Fw=pe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
220
|
+
* @license lucide-react v0.469.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const Yw=pe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
225
|
+
* @license lucide-react v0.469.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const Gw=pe("Folder",[["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"}]]);/**
|
|
230
|
+
* @license lucide-react v0.469.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const ki=pe("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
235
|
+
* @license lucide-react v0.469.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const Pw=pe("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
|
|
240
|
+
* @license lucide-react v0.469.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const qf=pe("History",[["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"}]]);/**
|
|
245
|
+
* @license lucide-react v0.469.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const Xw=pe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
250
|
+
* @license lucide-react v0.469.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const Qw=pe("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
|
255
|
+
* @license lucide-react v0.469.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const af=pe("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
|
|
260
|
+
* @license lucide-react v0.469.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const Hx=pe("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);/**
|
|
265
|
+
* @license lucide-react v0.469.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const Kw=pe("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
270
|
+
* @license lucide-react v0.469.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const Fr=pe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
275
|
+
* @license lucide-react v0.469.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const Zw=pe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
280
|
+
* @license lucide-react v0.469.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const Jw=pe("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
285
|
+
* @license lucide-react v0.469.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const fd=pe("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
290
|
+
* @license lucide-react v0.469.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/const dd=pe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
295
|
+
* @license lucide-react v0.469.0 - ISC
|
|
296
|
+
*
|
|
297
|
+
* This source code is licensed under the ISC license.
|
|
298
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
+
*/const Ww=pe("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
|
300
|
+
* @license lucide-react v0.469.0 - ISC
|
|
301
|
+
*
|
|
302
|
+
* This source code is licensed under the ISC license.
|
|
303
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
+
*/const e2=pe("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
|
|
305
|
+
* @license lucide-react v0.469.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*/const t2=pe("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
|
|
310
|
+
* @license lucide-react v0.469.0 - ISC
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the ISC license.
|
|
313
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/const n2=pe("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
|
|
315
|
+
* @license lucide-react v0.469.0 - ISC
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the ISC license.
|
|
318
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const qx=pe("Pencil",[["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"}]]);/**
|
|
320
|
+
* @license lucide-react v0.469.0 - ISC
|
|
321
|
+
*
|
|
322
|
+
* This source code is licensed under the ISC license.
|
|
323
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
+
*/const r2=pe("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);/**
|
|
325
|
+
* @license lucide-react v0.469.0 - ISC
|
|
326
|
+
*
|
|
327
|
+
* This source code is licensed under the ISC license.
|
|
328
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
+
*/const Ix=pe("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
|
|
330
|
+
* @license lucide-react v0.469.0 - ISC
|
|
331
|
+
*
|
|
332
|
+
* This source code is licensed under the ISC license.
|
|
333
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
+
*/const ay=pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
335
|
+
* @license lucide-react v0.469.0 - ISC
|
|
336
|
+
*
|
|
337
|
+
* This source code is licensed under the ISC license.
|
|
338
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
+
*/const hd=pe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
340
|
+
* @license lucide-react v0.469.0 - ISC
|
|
341
|
+
*
|
|
342
|
+
* This source code is licensed under the ISC license.
|
|
343
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
+
*/const zi=pe("RotateCcw",[["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"}]]);/**
|
|
345
|
+
* @license lucide-react v0.469.0 - ISC
|
|
346
|
+
*
|
|
347
|
+
* This source code is licensed under the ISC license.
|
|
348
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
+
*/const ha=pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
350
|
+
* @license lucide-react v0.469.0 - ISC
|
|
351
|
+
*
|
|
352
|
+
* This source code is licensed under the ISC license.
|
|
353
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
354
|
+
*/const l2=pe("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
355
|
+
* @license lucide-react v0.469.0 - ISC
|
|
356
|
+
*
|
|
357
|
+
* This source code is licensed under the ISC license.
|
|
358
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
359
|
+
*/const md=pe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
360
|
+
* @license lucide-react v0.469.0 - ISC
|
|
361
|
+
*
|
|
362
|
+
* This source code is licensed under the ISC license.
|
|
363
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
364
|
+
*/const a2=pe("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
|
|
365
|
+
* @license lucide-react v0.469.0 - ISC
|
|
366
|
+
*
|
|
367
|
+
* This source code is licensed under the ISC license.
|
|
368
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
369
|
+
*/const Vx=pe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
370
|
+
* @license lucide-react v0.469.0 - ISC
|
|
371
|
+
*
|
|
372
|
+
* This source code is licensed under the ISC license.
|
|
373
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
374
|
+
*/const i2=pe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
375
|
+
* @license lucide-react v0.469.0 - ISC
|
|
376
|
+
*
|
|
377
|
+
* This source code is licensed under the ISC license.
|
|
378
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
379
|
+
*/const iy=pe("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
|
|
380
|
+
* @license lucide-react v0.469.0 - ISC
|
|
381
|
+
*
|
|
382
|
+
* This source code is licensed under the ISC license.
|
|
383
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
384
|
+
*/const o2=pe("Stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]);/**
|
|
385
|
+
* @license lucide-react v0.469.0 - ISC
|
|
386
|
+
*
|
|
387
|
+
* This source code is licensed under the ISC license.
|
|
388
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
389
|
+
*/const pd=pe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
390
|
+
* @license lucide-react v0.469.0 - ISC
|
|
391
|
+
*
|
|
392
|
+
* This source code is licensed under the ISC license.
|
|
393
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
394
|
+
*/const ma=pe("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
395
|
+
* @license lucide-react v0.469.0 - ISC
|
|
396
|
+
*
|
|
397
|
+
* This source code is licensed under the ISC license.
|
|
398
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
399
|
+
*/const Ai=pe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
400
|
+
* @license lucide-react v0.469.0 - ISC
|
|
401
|
+
*
|
|
402
|
+
* This source code is licensed under the ISC license.
|
|
403
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
404
|
+
*/const gd=pe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
405
|
+
* @license lucide-react v0.469.0 - ISC
|
|
406
|
+
*
|
|
407
|
+
* This source code is licensed under the ISC license.
|
|
408
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
409
|
+
*/const s2=pe("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
410
|
+
* @license lucide-react v0.469.0 - ISC
|
|
411
|
+
*
|
|
412
|
+
* This source code is licensed under the ISC license.
|
|
413
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
414
|
+
*/const u2=pe("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
|
|
415
|
+
* @license lucide-react v0.469.0 - ISC
|
|
416
|
+
*
|
|
417
|
+
* This source code is licensed under the ISC license.
|
|
418
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
419
|
+
*/const c2=pe("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
|
|
420
|
+
* @license lucide-react v0.469.0 - ISC
|
|
421
|
+
*
|
|
422
|
+
* This source code is licensed under the ISC license.
|
|
423
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
424
|
+
*/const yd=pe("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
425
|
+
* @license lucide-react v0.469.0 - ISC
|
|
426
|
+
*
|
|
427
|
+
* This source code is licensed under the ISC license.
|
|
428
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
429
|
+
*/const $x=pe("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
|
430
|
+
* @license lucide-react v0.469.0 - ISC
|
|
431
|
+
*
|
|
432
|
+
* This source code is licensed under the ISC license.
|
|
433
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
434
|
+
*/const xd=pe("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
435
|
+
* @license lucide-react v0.469.0 - ISC
|
|
436
|
+
*
|
|
437
|
+
* This source code is licensed under the ISC license.
|
|
438
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
439
|
+
*/const xl=pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
440
|
+
* @license lucide-react v0.469.0 - ISC
|
|
441
|
+
*
|
|
442
|
+
* This source code is licensed under the ISC license.
|
|
443
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
444
|
+
*/const bd=pe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),oy=t=>{let r;const l=new Set,i=(m,x)=>{const y=typeof m=="function"?m(r):m;if(!Object.is(y,r)){const b=r;r=x??(typeof y!="object"||y===null)?y:Object.assign({},r,y),l.forEach(v=>v(r,b))}},s=()=>r,f={setState:i,getState:s,getInitialState:()=>p,subscribe:m=>(l.add(m),()=>l.delete(m))},p=r=t(i,s,f);return f},f2=(t=>t?oy(t):oy),d2=t=>t;function h2(t,r=d2){const l=dn.useSyncExternalStore(t.subscribe,dn.useCallback(()=>r(t.getState()),[t,r]),dn.useCallback(()=>r(t.getInitialState()),[t,r]));return dn.useDebugValue(l),l}const sy=t=>{const r=f2(t),l=i=>h2(r,i);return Object.assign(l,r),l},va=(t=>t?sy(t):sy),dl=va(t=>({toasts:[],push:r=>{const l=`toast_${Date.now()}_${Math.random().toString(36).slice(2,7)}`;return t(i=>({toasts:[...i.toasts,{...r,id:l}]})),l},dismiss:r=>t(l=>({toasts:l.toasts.filter(i=>i.id!==r)}))})),ns={success:(t,r=3500)=>dl.getState().push({message:t,variant:"success",ttl:r}),error:(t,r=6e3)=>dl.getState().push({message:t,variant:"error",ttl:r}),warn:(t,r=4500)=>dl.getState().push({message:t,variant:"warn",ttl:r}),info:(t,r=3500)=>dl.getState().push({message:t,variant:"info",ttl:r}),dismiss:t=>dl.getState().dismiss(t)};function m2({variant:t}){return t==="success"?h.jsx(pl,{className:"h-4 w-4 text-green-500"}):t==="error"?h.jsx(cd,{className:"h-4 w-4 text-destructive"}):t==="warn"?h.jsx(gd,{className:"h-4 w-4 text-amber-500"}):h.jsx(Xw,{className:"h-4 w-4 text-blue-500"})}function p2({entry:t}){const r=dl(l=>l.dismiss);return w.useEffect(()=>{const l=setTimeout(()=>r(t.id),t.ttl);return()=>clearTimeout(l)},[t.id,t.ttl,r]),h.jsxs("div",{className:me("flex items-start gap-2 rounded-lg border bg-popover shadow-lg px-3 py-2 text-sm max-w-sm","animate-message",t.variant==="error"&&"border-destructive/40",t.variant==="warn"&&"border-amber-500/40",t.variant==="success"&&"border-green-500/40"),children:[h.jsx(m2,{variant:t.variant}),h.jsx("div",{className:"flex-1 min-w-0 whitespace-pre-wrap break-words leading-snug",children:t.message}),h.jsx("button",{type:"button",onClick:()=>r(t.id),className:"text-muted-foreground hover:text-foreground",title:"Dismiss",children:h.jsx(xl,{className:"h-3.5 w-3.5"})})]})}function g2(){const t=dl(r=>r.toasts);return t.length===0?null:h.jsx("div",{className:"fixed bottom-4 right-4 z-[60] flex flex-col gap-2 pointer-events-auto",children:t.map(r=>h.jsx(p2,{entry:r},r.id))})}let rs=null;function y2(){if(typeof window>"u")return null;if(rs)return rs;const t=window.AudioContext||window.webkitAudioContext;if(!t)return null;try{rs=new t}catch{return null}return rs}function uy(t,r,l){const i=y2();if(!i)return;const s=i.currentTime+r,u=i.createOscillator(),c=i.createGain();u.type="sine",u.frequency.value=t,c.gain.setValueAtTime(0,s),c.gain.linearRampToValueAtTime(.18,s+.01),c.gain.exponentialRampToValueAtTime(1e-4,s+l),u.connect(c).connect(i.destination),u.start(s),u.stop(s+l+.02)}function Fx(){uy(659.25,0,.18),uy(880,.12,.24)}const Yx=Object.freeze(Object.defineProperty({__proto__:null,playCompletionChime:Fx},Symbol.toStringTag,{value:"Module"})),x2="#4f46e5";function b2(t){return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
445
|
+
<rect x="2" y="2" width="60" height="60" rx="14" fill="${x2}" />
|
|
446
|
+
<text x="32" y="44" text-anchor="middle" font-family="-apple-system,Segoe UI,Roboto,sans-serif" font-size="38" font-weight="700" fill="#fff">W</text>
|
|
447
|
+
${t==="ready"?'<circle cx="50" cy="14" r="14" fill="#22c55e" stroke="#fff" stroke-width="3" />':t==="error"?'<circle cx="50" cy="14" r="14" fill="#ef4444" stroke="#fff" stroke-width="3" />':t==="running"?'<circle cx="50" cy="14" r="14" fill="#f59e0b" stroke="#fff" stroke-width="3" />':""}
|
|
448
|
+
</svg>`}function v2(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function S2(){if(typeof document>"u")return null;let t=document.querySelector('link[rel="icon"]');return t||(t=document.createElement("link"),t.rel="icon",t.type="image/svg+xml",document.head.appendChild(t)),t}let If="idle";function hs(t){If=t;const r=S2();r&&(r.href=v2(b2(t)))}let cy=!1;function w2(){cy||typeof document>"u"||(cy=!0,document.addEventListener("visibilitychange",()=>{!document.hidden&&(If==="ready"||If==="error")&&hs("idle")}))}let $r="default";typeof window<"u"&&"Notification"in window?$r=Notification.permission:$r="unsupported";async function k2(){if($r==="unsupported"||$r==="granted"||$r==="denied")return $r;try{const t=await Notification.requestPermission();return $r=t,t}catch{return"denied"}}function fy(t,r){if(!(typeof document>"u"||!document.hidden)&&$r==="granted")try{const l=new Notification(t,{body:r,icon:"/favicon.ico",tag:"wrongstack-run"});l.onclick=()=>{window.focus(),l.close()}}catch{}}class C2{constructor(r){qt(this,"ws",null);qt(this,"url");qt(this,"handlers",new Map);qt(this,"reconnectAttempts",0);qt(this,"maxReconnectAttempts",10);qt(this,"reconnectDelay",1e3);qt(this,"shouldReconnect",!0);qt(this,"reconnectTimer",null);qt(this,"messageQueue",[]);qt(this,"pendingConfirms",new Map);qt(this,"sessionId",null);qt(this,"lastErrorText");qt(this,"statusListeners",new Set);qt(this,"currentStatus",{state:"connecting"});this.url=r??N2()}onStatus(r){return this.statusListeners.add(r),r(this.currentStatus),()=>this.statusListeners.delete(r)}get status(){return this.currentStatus}setStatus(r){this.currentStatus=r;for(const l of this.statusListeners)try{l(r)}catch{}}async connect(){return new Promise((r,l)=>{var i;if(((i=this.ws)==null?void 0:i.readyState)===WebSocket.OPEN){r();return}this.setStatus({state:"connecting"});try{this.ws=new WebSocket(this.url),this.ws.binaryType="arraybuffer";const s=setTimeout(()=>{l(new Error("Connection timeout"))},1e4);let u=!1;this.ws.onopen=()=>{clearTimeout(s),u=!0,console.log("[WS Client] Connected"),this.reconnectAttempts=0,this.lastErrorText=void 0,this.setStatus({state:"open"}),this.flushMessageQueue(),r()},this.ws.onmessage=c=>{try{const f=JSON.parse(c.data);this.handleMessage(f)}catch(f){console.error("[WS Client] Failed to parse message",f)}},this.ws.onerror=c=>{console.error("[WS Client] Error",c),this.lastErrorText="Connection error (see browser devtools)",u||(clearTimeout(s),l(new Error(this.lastErrorText)))},this.ws.onclose=c=>{if(console.log("[WS Client] Disconnected",c.code,c.reason),!u){clearTimeout(s);const f=c.reason||`Closed with code ${c.code}`;this.lastErrorText=f,l(new Error(f));return}c.reason&&!this.lastErrorText?this.lastErrorText=`${c.reason} (code ${c.code})`:!this.lastErrorText&&c.code!==1e3&&(this.lastErrorText=`Closed with code ${c.code}`),this.attemptReconnect()}}catch(s){this.lastErrorText=s instanceof Error?s.message:String(s),this.setStatus({state:"closed",error:this.lastErrorText}),l(s)}})}attemptReconnect(){if(!this.shouldReconnect||this.reconnectAttempts>=this.maxReconnectAttempts){console.log("[WS Client] Not reconnecting"),this.reconnectTimer=null,this.setStatus({state:"closed",error:this.lastErrorText??"Disconnected"});return}this.reconnectAttempts++;const r=Math.min(this.reconnectDelay*2**(this.reconnectAttempts-1),3e4),l=Date.now()+r;console.log(`[WS Client] Reconnecting in ${r}ms (attempt ${this.reconnectAttempts})`),this.setStatus({state:"reconnecting",attempt:this.reconnectAttempts,nextRetryAt:l,lastError:this.lastErrorText}),this.reconnectTimer=setTimeout(async()=>{if(this.shouldReconnect)try{await this.connect()}catch(i){console.error("[WS Client] Reconnect failed",i)}},r)}retryNow(){this.currentStatus.state!=="open"&&(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.reconnectAttempts=0,this.connect().catch(()=>{}))}flushMessageQueue(){for(;this.messageQueue.length>0;){const r=this.messageQueue.shift();r&&this.send(r)}}handleMessage(r){if(r.type==="tool.confirm_needed"){const l=r.payload;this.pendingConfirms.set(l.id,{resolve:l.resolve});const i={...r,payload:{...l,resolve:()=>{}}};this.emit(i);return}if(r.type==="session.start"){const l=r.payload;this.sessionId=l.sessionId}this.emit(r)}emit(r){const l=this.handlers.get(r.type);if(l)for(const i of l)try{i(r)}catch(s){console.error(`[WS Client] Handler error for ${r.type}`,s)}}send(r){var l;((l=this.ws)==null?void 0:l.readyState)===WebSocket.OPEN?this.ws.send(JSON.stringify(r)):this.messageQueue.push(r)}on(r,l){let i=this.handlers.get(r);return i||(i=new Set,this.handlers.set(r,i)),i.add(l),()=>i==null?void 0:i.delete(l)}off(r,l){var i;(i=this.handlers.get(r))==null||i.delete(l)}sendMessage(r){const l=`msg_${Date.now()}_${crypto.randomUUID().slice(0,8)}`;return this.send({type:"user_message",payload:{id:l,content:r,timestamp:Date.now()}}),l}sendAbort(){this.send({type:"abort",payload:{}})}sendConfirm(r,l){const i=this.pendingConfirms.get(r);i&&(i.resolve(l),this.pendingConfirms.delete(r)),this.send({type:"tool.confirm_result",payload:{id:r,decision:l}})}switchModel(r,l){this.send({type:"model.switch",payload:{provider:r,model:l}})}listProviders(){this.send({type:"providers.list"})}listProviderModels(r){this.send({type:"provider.models",payload:{providerId:r}})}listSavedProviders(){this.send({type:"providers.saved"})}addKey(r,l,i){this.send({type:"key.add",payload:{providerId:r,label:l,apiKey:i}})}updateKey(r,l,i){this.send({type:"key.update",payload:{providerId:r,label:l,apiKey:i}})}deleteKey(r,l){this.send({type:"key.delete",payload:{providerId:r,label:l}})}setActiveKey(r,l){this.send({type:"key.set_active",payload:{providerId:r,label:l}})}addProvider(r,l,i,s){this.send({type:"provider.add",payload:{id:r,family:l,baseUrl:i,apiKey:s}})}removeProvider(r){this.send({type:"provider.remove",payload:{providerId:r}})}newSession(){this.send({type:"session.new"})}clearContext(){this.send({type:"context.clear"})}compactContext(r=!1){this.send({type:"context.compact",payload:{aggressive:r}})}debugContext(){this.send({type:"context.debug"})}listTools(){this.send({type:"tools.list"})}listMemory(){this.send({type:"memory.list"})}remember(r,l){this.send({type:"memory.remember",payload:{text:r,scope:l}})}forget(r,l){this.send({type:"memory.forget",payload:{text:r,scope:l}})}listSkills(){this.send({type:"skills.list"})}getDiag(){this.send({type:"diag.get"})}getStats(){this.send({type:"stats.get"})}saveSession(){this.send({type:"session.save"})}resumeSessionById(r){this.send({type:"session.resume",payload:{id:r}})}listModes(){this.send({type:"modes.list"})}switchMode(r){this.send({type:"mode.switch",payload:{id:r}})}listFiles(r,l){this.send({type:"files.list",payload:{query:r,limit:l}})}getTodos(){this.send({type:"todos.get"})}clearTodos(){this.send({type:"todos.clear"})}listSessions(r=50){this.send({type:"sessions.list",payload:{limit:r}})}deleteSession(r){this.send({type:"session.delete",payload:{id:r}})}resumeSession(r){this.send({type:"session.resume",payload:{id:r}})}ping(){this.send({type:"ping"})}disconnect(){var r;this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),(r=this.ws)==null||r.close(),this.ws=null}get isConnected(){var r;return((r=this.ws)==null?void 0:r.readyState)===WebSocket.OPEN}get currentSessionId(){return this.sessionId}}let of=null;function N2(){var l;if(typeof window>"u"||!((l=window.location)!=null&&l.hostname))return"ws://127.0.0.1:3457";const r=window.location.hostname.toLowerCase();return r==="localhost"||r==="127.0.0.1"||r==="[::1]"||r==="::1"?"ws://127.0.0.1:3457":`ws://${window.location.hostname}:3457`}function En(t){return of||(of=new C2(t)),of}function j2(t,r){let l;try{l=t()}catch{return}return{getItem:s=>{var u;const c=p=>p===null?null:JSON.parse(p,void 0),f=(u=l.getItem(s))!=null?u:null;return f instanceof Promise?f.then(c):c(f)},setItem:(s,u)=>l.setItem(s,JSON.stringify(u,void 0)),removeItem:s=>l.removeItem(s)}}const Vf=t=>r=>{try{const l=t(r);return l instanceof Promise?l:{then(i){return Vf(i)(l)},catch(i){return this}}}catch(l){return{then(i){return this},catch(i){return Vf(i)(l)}}}},E2=(t,r)=>(l,i,s)=>{let u={storage:j2(()=>window.localStorage),partialize:A=>A,version:0,merge:(A,E)=>({...E,...A}),...r},c=!1,f=0;const p=new Set,m=new Set;let x=u.storage;if(!x)return t((...A)=>{console.warn(`[zustand persist middleware] Unable to update item '${u.name}', the given storage is currently unavailable.`),l(...A)},i,s);const y=()=>{const A=u.partialize({...i()});return x.setItem(u.name,{state:A,version:u.version})},b=s.setState;s.setState=(A,E)=>(b(A,E),y());const v=t((...A)=>(l(...A),y()),i,s);s.getInitialState=()=>v;let C;const N=()=>{var A,E;if(!x)return;const M=++f;c=!1,p.forEach($=>{var P;return $((P=i())!=null?P:v)});const O=((E=u.onRehydrateStorage)==null?void 0:E.call(u,(A=i())!=null?A:v))||void 0;return Vf(x.getItem.bind(x))(u.name).then($=>{if($)if(typeof $.version=="number"&&$.version!==u.version){if(u.migrate){const P=u.migrate($.state,$.version);return P instanceof Promise?P.then(L=>[!0,L]):[!0,P]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,$.state];return[!1,void 0]}).then($=>{var P;if(M!==f)return;const[L,Y]=$;if(C=u.merge(Y,(P=i())!=null?P:v),l(C,!0),L)return y()}).then(()=>{M===f&&(O==null||O(i(),void 0),C=i(),c=!0,m.forEach($=>$(C)))}).catch($=>{M===f&&(O==null||O(void 0,$))})};return s.persist={setOptions:A=>{u={...u,...A},A.storage&&(x=A.storage)},clearStorage:()=>{x==null||x.removeItem(u.name)},getOptions:()=>u,rehydrate:()=>N(),hasHydrated:()=>c,onHydrate:A=>(p.add(A),()=>{p.delete(A)}),onFinishHydration:A=>(m.add(A),()=>{m.delete(A)})},u.skipHydration||N(),C||v},Ts=E2;function T2(t){if(!t)return t;const r=t.split(/\n{2,}/),l=[];for(const s of r)l.length>0&&l[l.length-1].trim()===s.trim()||l.push(s);return l.map(s=>{const u=s.split(`
|
|
449
|
+
`),c=[];for(const f of u)c.length>0&&f.trim().length>0&&c[c.length-1].trim()===f.trim()||c.push(f);return c.join(`
|
|
450
|
+
`)}).join(`
|
|
451
|
+
|
|
452
|
+
`)}const he=va()(Ts((t,r)=>({messages:[],currentAssistantMessageId:null,currentToolId:null,isLoading:!1,abortController:null,executions:new Map,queue:[],runStart:null,thinkingBuffer:"",thinkingStartedAt:null,addMessage:l=>{const i=`msg_${Date.now()}_${crypto.randomUUID().slice(0,8)}`,s={...l,id:i,timestamp:Date.now()};return t(u=>({messages:[...u.messages,s],currentAssistantMessageId:l.role==="assistant"?i:u.currentAssistantMessageId})),i},updateMessage:(l,i)=>{t(s=>({messages:s.messages.map(u=>u.id===l?{...u,...i}:u)}))},appendToMessage:(l,i)=>{t(s=>({messages:s.messages.map(u=>u.id===l?{...u,content:u.content+i}:u)}))},finalizeMessage:l=>{t(i=>({messages:i.messages.map(s=>s.id===l?{...s,content:T2(s.content),streaming:!1}:s)}))},setToolResult:(l,i,s)=>{t(u=>({messages:u.messages.map(c=>c.id===l?{...c,toolResult:i,isError:!s,progressLines:void 0}:c)}))},appendToolProgress:(l,i)=>{t(s=>({messages:s.messages.map(u=>{if(u.id!==l)return u;const f=[...u.progressLines??[],i],p=f.length>30?f.slice(f.length-30):f;return{...u,progressLines:p}})}))},setLoading:l=>t({isLoading:l}),setAbortController:l=>t({abortController:l}),clearMessages:()=>t({messages:[],currentAssistantMessageId:null,currentToolId:null,executions:new Map}),setCurrentAssistantMessage:l=>t({currentAssistantMessageId:l}),setCurrentToolId:l=>t({currentToolId:l}),truncateAfter:l=>t(i=>{const s=i.messages.findIndex(u=>u.id===l);return s===-1?i:{messages:i.messages.slice(0,s),currentAssistantMessageId:null,currentToolId:null}}),addExecution:l=>{t(i=>{const s=new Map(i.executions);return s.set(l.id,l),{executions:s}})},updateExecution:(l,i)=>{t(s=>{const u=new Map(s.executions),c=u.get(l);return c&&u.set(l,{...c,...i}),{executions:u}})},enqueue:l=>t(i=>({queue:[...i.queue,l]})),dequeue:()=>{const l=r().queue;if(l.length===0)return null;const[i,...s]=l;return t({queue:s}),i},removeQueued:l=>t(i=>({queue:i.queue.filter((s,u)=>u!==l)})),clearQueue:()=>t({queue:[]}),setRunStart:l=>t({runStart:l}),appendThinking:l=>t(i=>({thinkingBuffer:i.thinkingBuffer+l,thinkingStartedAt:i.thinkingStartedAt??Date.now()})),clearThinking:()=>t({thinkingBuffer:"",thinkingStartedAt:null})}),{name:"wrongstack-chat",partialize:()=>({})})),$e=va()(Ts(t=>({provider:"anthropic",model:"claude-sonnet-4-20250514",wsUrl:(()=>{var l;if(typeof window>"u"||!((l=window.location)!=null&&l.hostname))return"ws://127.0.0.1:3457";const r=window.location.hostname.toLowerCase();return r==="localhost"||r==="127.0.0.1"||r==="[::1]"||r==="::1"?"ws://127.0.0.1:3457":`ws://${window.location.hostname}:3457`})(),wsConnected:!1,wsStatus:{state:"connecting"},theme:"system",autoConnect:!0,soundOnComplete:!1,setProvider:r=>t({provider:r}),setModel:r=>t({model:r}),setConfig:r=>t(r),setTheme:r=>t({theme:r}),setWsConnected:r=>t({wsConnected:r}),setWsStatus:r=>t({wsStatus:r,wsConnected:r.state==="open"}),setSoundOnComplete:r=>t({soundOnComplete:r})}),{name:"wrongstack-config"})),Pe=va()(Ts(t=>({session:null,totalTokens:{input:0,output:0,cacheRead:0,cacheWrite:0},lastInputTokens:0,cost:0,startTime:null,maxContext:0,inputCost:0,outputCost:0,cacheReadCost:0,projectName:"",mode:"default",modes:[],iteration:null,todos:[],setSession:r=>t({session:r}),updateUsage:r=>t(l=>{const i=(r.input??0)+(r.cacheRead??0)+(r.cacheWrite??0);return{totalTokens:{input:l.totalTokens.input+r.input,output:l.totalTokens.output+r.output,cacheRead:(l.totalTokens.cacheRead??0)+(r.cacheRead??0),cacheWrite:(l.totalTokens.cacheWrite??0)+(r.cacheWrite??0)},lastInputTokens:i||l.lastInputTokens}}),addCost:r=>t(l=>({cost:l.cost+r})),startSession:r=>t({session:r,startTime:Date.now(),iteration:null,lastInputTokens:0,totalTokens:{input:0,output:0,cacheRead:0,cacheWrite:0},cost:0}),endSession:()=>t({session:null,startTime:null,iteration:null}),setEnv:r=>t(l=>({maxContext:r.maxContext??l.maxContext,projectName:r.projectName??l.projectName,mode:r.mode??l.mode,inputCost:r.inputCost??l.inputCost,outputCost:r.outputCost??l.outputCost,cacheReadCost:r.cacheReadCost??l.cacheReadCost})),setIteration:r=>t({iteration:r}),setModes:r=>t({modes:r}),setTodos:r=>t({todos:r})}),{name:"wrongstack-session",partialize:()=>({})})),Ne=va()(Ts(t=>({sidebarOpen:!0,settingsOpen:!1,currentView:"chat",showConfirmDialog:!1,confirmInfo:null,paletteOpen:!1,shortcutsOpen:!1,searchOpen:!1,searchQuery:"",promptHistory:[],sidebarWidth:288,pinnedIds:[],compactMode:!1,modelSwitcherOpen:!1,favoriteSessionIds:[],sessionNicknames:{},toggleSidebar:()=>t(r=>({sidebarOpen:!r.sidebarOpen})),setSidebarOpen:r=>t({sidebarOpen:r}),setSettingsOpen:r=>t({settingsOpen:r}),setCurrentView:r=>t({currentView:r}),showConfirm:r=>t({showConfirmDialog:!0,confirmInfo:r}),hideConfirm:()=>t({showConfirmDialog:!1,confirmInfo:null}),setPaletteOpen:r=>t({paletteOpen:r}),setShortcutsOpen:r=>t({shortcutsOpen:r}),setSearchOpen:r=>t({searchOpen:r,searchQuery:""}),setSearchQuery:r=>t({searchQuery:r}),pushPrompt:r=>t(l=>{const i=r.trim();if(!i)return l;const s=l.promptHistory.filter(u=>u!==i);return{promptHistory:[i,...s].slice(0,50)}}),setSidebarWidth:r=>t({sidebarWidth:Math.max(200,Math.min(480,Math.round(r)))}),togglePin:r=>t(l=>({pinnedIds:l.pinnedIds.includes(r)?l.pinnedIds.filter(s=>s!==r):[...l.pinnedIds,r]})),unpinAll:()=>t({pinnedIds:[]}),toggleCompactMode:()=>t(r=>({compactMode:!r.compactMode})),setModelSwitcherOpen:r=>t({modelSwitcherOpen:r}),toggleFavoriteSession:r=>t(l=>({favoriteSessionIds:l.favoriteSessionIds.includes(r)?l.favoriteSessionIds.filter(s=>s!==r):[...l.favoriteSessionIds,r]})),setSessionNickname:(r,l)=>t(i=>{const s=l.trim(),u={...i.sessionNicknames};return s?u[r]=s:delete u[r],{sessionNicknames:u}})}),{name:"wrongstack-ui",partialize:t=>({sidebarOpen:t.sidebarOpen,sidebarWidth:t.sidebarWidth,promptHistory:t.promptHistory,pinnedIds:t.pinnedIds,compactMode:t.compactMode,favoriteSessionIds:t.favoriteSessionIds,sessionNicknames:t.sessionNicknames})})),pa=va()(t=>({entries:[],loading:!1,error:null,setEntries:(r,l=null)=>t({entries:r,error:l,loading:!1}),setLoading:r=>t({loading:r}),removeEntry:r=>t(l=>({entries:l.entries.filter(i=>i.id!==r)})),clearHistory:()=>t({entries:[]})}));function A2(t){const r=[],l=(i,s)=>{r.push(t.on(i,s))};return l("session.start",i=>{var p;const s=i.payload,u=(p=Pe.getState().session)==null?void 0:p.id,c=!u||u!==s.sessionId;Pe.getState().startSession({id:s.sessionId,startedAt:Date.now(),model:s.model,provider:s.provider}),Pe.getState().setEnv({maxContext:s.maxContext,projectName:s.projectName,mode:s.mode,inputCost:s.inputCost,outputCost:s.outputCost,cacheReadCost:s.cacheReadCost}),$e.getState().setConfig({provider:s.provider,model:s.model}),(c||s.reset)&&he.getState().clearMessages();const f=s.replayMessages;if(f&&f.length>0){const m=he.getState();for(const x of f)if(x.role==="user"||x.role==="assistant"||x.role==="system"){let y="";if(typeof x.content=="string")y=x.content;else if(Array.isArray(x.content)){for(const b of x.content)if(b.type==="text"&&typeof b.text=="string")y+=(y?`
|
|
453
|
+
`:"")+b.text;else if(b.type==="tool_use")m.addMessage({role:"tool",content:"",toolName:String(b.name??"tool"),toolInput:b.input,toolUseId:String(b.id??"")}),y="";else if(b.type==="tool_result"){const v=he.getState().messages;let C;for(let N=v.length-1;N>=0;N--)if(v[N].toolUseId===String(b.tool_use_id??"")){C=v[N];break}C&&m.setToolResult(C.id,typeof b.content=="string"?b.content:JSON.stringify(b.content),!b.is_error)}}y&&m.addMessage({role:x.role,content:y})}}}),l("context.debug",i=>{const s=i.payload,u=m=>m.toLocaleString(),c=[...s.tools.breakdown].sort((m,x)=>x.tokens-m.tokens).slice(0,8),f=[...s.messages.breakdown].sort((m,x)=>x.tokens-m.tokens).slice(0,8),p=["📊 **Context breakdown** (heuristic — 4 chars/token)","",`**Total estimate:** ${u(s.total)} tokens`,`• System prompt: ${u(s.systemPrompt)}`,`• Tool schemas: ${u(s.tools.total)} (${s.tools.count} tools)`,`• Messages: ${u(s.messages.total)} (${s.messages.count} messages)`,"","**Top tool schemas:**",...c.map(m=>` · ${m.name}: ${u(m.tokens)}`),"","**Top messages:**",...f.map(m=>` · #${m.index} ${m.role}: ${u(m.tokens)} — ${m.preview||"(empty)"}`)];he.getState().addMessage({role:"assistant",content:p.join(`
|
|
454
|
+
`)})}),l("key.operation_result",i=>{const s=i.payload;s.success?ns.success(s.message):ns.error(s.message)}),l("context.compacted",i=>{const s=i.payload,u=s.reductions.length?s.reductions.map(c=>`${c.phase}: ${c.saved}`).join(", "):"no-op";he.getState().addMessage({role:"assistant",content:`🗜️ Context compacted: ${s.before} → ${s.after} tokens (saved ~${s.saved}). ${u}`}),Pe.setState({lastInputTokens:s.after})}),l("session.end",()=>{$e.getState().setWsConnected(!1)}),l("iteration.started",i=>{const s=i.payload;Pe.getState().setIteration({index:s.index,max:s.maxIterations??0}),he.getState().setLoading(!0),typeof document<"u"&&document.hidden&&hs("running"),he.getState().runStart===null&&he.getState().setRunStart({at:Date.now(),cost:Pe.getState().cost}),he.getState().setCurrentAssistantMessage(null)}),l("provider.text_delta",i=>{const s=i.payload;he.getState().clearThinking();let u=he.getState().currentAssistantMessageId;u||(u=he.getState().addMessage({role:"assistant",content:"",streaming:!0}),he.getState().setCurrentAssistantMessage(u)),he.getState().appendToMessage(u,s.text)}),l("provider.thinking_delta",i=>{const s=i.payload;s.text&&he.getState().appendThinking(s.text)}),l("tool.started",i=>{const s=i.payload,u=he.getState().messages.find(f=>f.toolUseId===s.id);if(u){he.getState().setCurrentToolId(u.id);return}he.getState().clearThinking(),he.getState().setCurrentAssistantMessage(null);const c=he.getState().addMessage({role:"tool",content:"",toolName:s.name,toolInput:s.input,toolUseId:s.id});he.getState().setCurrentToolId(c),he.getState().addExecution({id:s.id,name:s.name,input:s.input,ok:!0,startedAt:Date.now()})}),l("tool.progress",i=>{const s=i.payload,u=(s.text??"").trim();if(!u)return;const f=he.getState().messages.find(m=>m.toolUseId===s.id);if(!f)return;const p=s.eventType==="warning"?"⚠ ":"";he.getState().appendToolProgress(f.id,p+u)}),l("tool.executed",i=>{const s=i.payload,{messages:u,currentToolId:c}=he.getState(),f=s.id?u.find(p=>p.toolUseId===s.id):c?u.find(p=>p.id===c):void 0;f&&(he.getState().setToolResult(f.id,s.output??"",s.ok),he.getState().updateMessage(f.id,{toolDurationMs:s.durationMs})),s.id&&he.getState().updateExecution(s.id,{completedAt:Date.now(),durationMs:s.durationMs,output:s.output,ok:s.ok}),c&&f&&f.id===c&&he.getState().setCurrentToolId(null)}),l("provider.response",i=>{const s=i.payload;Pe.getState().updateUsage(s.usage);const{inputCost:u,outputCost:c,cacheReadCost:f}=Pe.getState(),p=(s.usage.input*u+s.usage.output*c+(s.usage.cacheRead??0)*f)/1e6;p>0&&Pe.getState().addCost(p),s.stopReason!=="tool_use"&&s.stopReason!=="tool_call"&&he.getState().setLoading(!1);const m=he.getState().currentAssistantMessageId;m&&(he.getState().finalizeMessage(m),s.usage.output>0&&he.getState().updateMessage(m,{usage:s.usage})),he.getState().setCurrentAssistantMessage(null),he.getState().clearThinking()}),l("tool.confirm_needed",i=>{const s=i.payload;Ne.getState().showConfirm({id:s.id,toolName:s.toolName,input:s.input,suggestedPattern:s.suggestedPattern})}),l("run.result",i=>{const s=i.payload;Pe.getState().setIteration(null),he.getState().setLoading(!1),he.getState().setCurrentAssistantMessage(null),he.getState().clearThinking();const u=he.getState().runStart;if(u&&s.status==="done"){const f=he.getState().messages;let p=-1,m=0;for(let x=f.length-1;x>=0;x--){const y=f[x];if(y.role==="assistant"&&p===-1&&y.content&&(p=x),y.role==="tool"&&y.timestamp>=u.at&&(m+=1),y.role==="user"&&y.timestamp<=u.at)break}if(p!==-1){const x=Pe.getState().cost;he.getState().updateMessage(f[p].id,{runSummary:{iterations:s.iterations,tools:m,durationMs:Date.now()-u.at,costDelta:Math.max(0,x-u.cost)}})}}if(he.getState().setRunStart(null),s.status!=="done"&&s.error)he.getState().addMessage({role:"assistant",content:`Error: ${s.error.message}`,isError:!0}),ns.error(`Run ended: ${s.error.message}`),fy("WrongStack run failed",s.error.message),typeof document<"u"&&document.hidden&&hs("error");else if(s.status==="done"&&(typeof document<"u"&&document.hidden&&(ns.success(`Run completed in ${s.iterations} iteration${s.iterations===1?"":"s"}`),fy("WrongStack run finished",`Completed in ${s.iterations} iteration${s.iterations===1?"":"s"}.`),hs("ready")),k2(),$e.getState().soundOnComplete))try{Fx()}catch{}const c=he.getState().dequeue();if(c){const f=En($e.getState().wsUrl);he.getState().addMessage({role:"user",content:c}),he.getState().setLoading(!0),f.sendMessage(c)}}),l("tools.list",i=>{const s=i.payload,u=[`🛠️ **Registered tools** (${s.tools.length})`,"",...s.tools.map(c=>`• \`${c.name}\`${c.params.length?` (${c.params.join(", ")})`:""} — ${c.description||"_no description_"}`)];he.getState().addMessage({role:"assistant",content:u.join(`
|
|
455
|
+
`)})}),l("memory.list",i=>{var c;const s=i.payload,u=(c=s.text)==null?void 0:c.trim();he.getState().addMessage({role:"assistant",content:s.error?`Memory read failed: ${s.error}`:u?`🧠 **Memory**
|
|
456
|
+
|
|
457
|
+
${u}`:`🧠 **Memory**
|
|
458
|
+
|
|
459
|
+
_empty — nothing remembered yet_`})}),l("skills.list",i=>{const s=i.payload;if(!s.enabled){he.getState().addMessage({role:"assistant",content:`🎯 **Skills**
|
|
460
|
+
|
|
461
|
+
_disabled (config.features.skills = false)_`});return}const u=[`🎯 **Skills** (${s.skills.length})`,"",...s.skills.length===0?["_none registered_"]:s.skills.map(c=>`• \`${c.name}\`${c.version?` v${c.version}`:""} _(${c.source})_ — ${c.description||c.trigger||"_no description_"}`)];s.error&&u.push("",`⚠ ${s.error}`),he.getState().addMessage({role:"assistant",content:u.join(`
|
|
462
|
+
`)})}),l("diag.get",i=>{const s=i.payload,u=["🩺 **Runtime diagnostics**","",`**Provider:** \`${s.provider}\` / \`${s.model}\``,`**Mode:** \`${s.mode}\``,`**Session:** \`${s.sessionId}\``,`**CWD:** \`${s.cwd}\``,"",`**Tools:** ${s.tools.count}`,`**Messages:** ${s.messages} · **Todos:** ${s.todos}`,`**Usage:** ${s.usage.input.toLocaleString()} in · ${s.usage.output.toLocaleString()} out${s.usage.cacheRead?` · ${s.usage.cacheRead.toLocaleString()} cache`:""}`,"",`**Features:** memory=${s.features.memory?"✓":"✗"} · skills=${s.features.skills?"✓":"✗"} · modelsRegistry=${s.features.modelsRegistry?"✓":"✗"}`];he.getState().addMessage({role:"assistant",content:u.join(`
|
|
463
|
+
`)})}),l("stats.get",i=>{const s=i.payload,u=Math.floor(s.elapsedMs/1e3),c=u<60?`${u}s`:u<3600?`${Math.floor(u/60)}m ${u%60}s`:`${Math.floor(u/3600)}h ${Math.floor(u%3600/60)}m`,f=["📈 **Session stats**","",`**Session:** \`${s.sessionId}\``,`**Provider/Model:** \`${s.provider}\` / \`${s.model}\``,`**Elapsed:** ${c}`,"",`**Usage:** ${s.usage.input.toLocaleString()} in · ${s.usage.output.toLocaleString()} out`,...s.cache&&s.cache.readTokens>0?[`**Cache:** ${s.cache.readTokens.toLocaleString()} read · ${s.cache.writeTokens.toLocaleString()} write · hit ratio ${(s.cache.hitRatio*100).toFixed(1)}%`]:[],`**Cost:** $${s.cost.toFixed(4)}`,"",`**Messages:** ${s.messages} · **Files read:** ${s.readFiles} · **Tools available:** ${s.tools}`];he.getState().addMessage({role:"assistant",content:f.join(`
|
|
464
|
+
`)})}),l("todos.updated",i=>{const s=i.payload;Pe.getState().setTodos(s.todos??[])}),l("modes.list",i=>{const s=i.payload;Pe.getState().setModes(s.modes.map(u=>({id:u.id,name:u.name,description:u.description}))),Pe.getState().setEnv({mode:s.activeId})}),l("sessions.list",i=>{const s=i.payload;pa.getState().setEntries(s.sessions??[],s.error??null)}),l("error",i=>{const s=i.payload;he.getState().addMessage({role:"assistant",content:`[${s.phase}] ${s.message}`,isError:!0}),he.getState().setLoading(!1)}),()=>{for(const i of r)i()}}function M2(){const{autoConnect:t,wsUrl:r}=$e(),l=$e(s=>s.setWsStatus),i=w.useRef(!1);w.useEffect(()=>{if(!t)return;w2();const s=En(r),u=s.onStatus(f=>l(f));if(s.connect().catch(f=>{console.error("[WS] Connection failed:",f)}),i.current)return()=>{u()};i.current=!0;const c=A2(s);return()=>{c(),u(),i.current=!1}},[t,r,l])}function sr(){const{wsUrl:t}=$e(),r=En(t),l=w.useCallback(X=>r.isConnected?r.sendMessage(X):null,[r]),i=w.useCallback(()=>r.sendAbort(),[r]),{hideConfirm:s}=Ne(),u=w.useCallback((X,G)=>{r.sendConfirm(X,G),s()},[r,s]),c=w.useCallback((X,G)=>r.switchModel(X,G),[r]),f=w.useCallback(()=>r.listProviders(),[r]),p=w.useCallback(X=>r.listProviderModels(X),[r]),m=w.useCallback(()=>r.listSavedProviders(),[r]),x=w.useCallback((X,G,fe)=>r.addKey(X,G,fe),[r]),y=w.useCallback((X,G,fe)=>r.updateKey(X,G,fe),[r]),b=w.useCallback((X,G)=>r.deleteKey(X,G),[r]),v=w.useCallback((X,G)=>r.setActiveKey(X,G),[r]),C=w.useCallback((X,G,fe,ue)=>r.addProvider(X,G,fe,ue),[r]),N=w.useCallback(X=>r.removeProvider(X),[r]),A=w.useCallback(X=>{pa.getState().setLoading(!0),r.listSessions(X)},[r]),E=w.useCallback(X=>{pa.getState().removeEntry(X),r.deleteSession(X)},[r]),M=w.useCallback(X=>r.resumeSessionById(X),[r]),O=w.useCallback(()=>r.saveSession(),[r]),$=w.useCallback(()=>r.listTools(),[r]),P=w.useCallback(()=>r.listMemory(),[r]),L=w.useCallback(()=>r.listSkills(),[r]),Y=w.useCallback(()=>r.getDiag(),[r]),le=w.useCallback(()=>r.getStats(),[r]),oe=w.useCallback(()=>r.listModes(),[r]),H=w.useCallback(X=>r.switchMode(X),[r]);return{client:r,sendMessage:l,sendAbort:i,sendConfirm:u,switchModel:c,listProviders:f,listProviderModels:p,listSavedProviders:m,addKey:x,updateKey:y,deleteKey:b,setActiveKey:v,addProvider:C,removeProvider:N,listSessions:A,deleteSession:E,resumeSession:M,saveSession:O,listTools:$,listMemory:P,listSkills:L,getDiag:Y,getStats:le,listModes:oe,switchMode:H}}const D2="modulepreload",R2=function(t){return"/"+t},dy={},Gx=function(r,l,i){let s=Promise.resolve();if(l&&l.length>0){let c=function(m){return Promise.all(m.map(x=>Promise.resolve(x).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),p=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));s=c(l.map(m=>{if(m=R2(m),m in dy)return;dy[m]=!0;const x=m.endsWith(".css"),y=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${y}`))return;const b=document.createElement("link");if(b.rel=x?"stylesheet":D2,x||(b.as="script"),b.crossOrigin="",b.href=m,p&&b.setAttribute("nonce",p),document.head.appendChild(b),x)return new Promise((v,C)=>{b.addEventListener("load",v),b.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return s.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return r().catch(u)})};function z2(){const t=Ne(A=>A.paletteOpen),r=Ne(A=>A.setPaletteOpen),l=Ne(A=>A.setCurrentView),i=$e(A=>A.setTheme),{entries:s}=pa(),{addMessage:u,clearMessages:c}=he(),f=sr(),[p,m]=w.useState(""),[x,y]=w.useState(0),b=w.useRef(null);w.useEffect(()=>{t&&(m(""),y(0),requestAnimationFrame(()=>{var A;return(A=b.current)==null?void 0:A.focus()}))},[t]),w.useEffect(()=>{const A=E=>{if((E.ctrlKey||E.metaKey)&&E.key.toLowerCase()==="k"){E.preventDefault(),r(!Ne.getState().paletteOpen);return}E.key==="Escape"&&Ne.getState().paletteOpen&&(E.preventDefault(),r(!1))};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[r]);const v=w.useMemo(()=>{const A=[{id:"help",category:"Command",label:"Show slash commands",icon:Pw,keywords:["help","commands","?"],run:()=>{u({role:"assistant",content:"Type `/` in the message box to see every slash command."})}},{id:"tools",category:"Command",label:"List tools",icon:xd,keywords:["tools","list"],run:()=>f.listTools()},{id:"memory",category:"Command",label:"Show memory",icon:Lx,keywords:["memory","remember","notes"],run:()=>f.listMemory()},{id:"skills",category:"Command",label:"List skills",icon:Vx,keywords:["skills"],run:()=>f.listSkills()},{id:"diag",category:"Command",label:"Runtime diagnostics",icon:o2,keywords:["diag","diagnostics","debug"],run:()=>f.getDiag()},{id:"stats",category:"Command",label:"Session stats (tokens, cache, cost)",icon:Rw,keywords:["stats","tokens","cost","cache"],run:()=>f.getStats()},{id:"clear",category:"Session",label:"Clear context",hint:"Wipe in-memory context, keep session id",icon:Ai,keywords:["clear","reset","wipe"],run:()=>{var E,M;c(),(M=(E=f.client)==null?void 0:E.clearContext)==null||M.call(E)}},{id:"new",category:"Session",label:"New session",hint:"Brand-new on disk + memory",icon:zi,keywords:["new","fresh","session"],run:()=>{var E,M;return(M=(E=f.client)==null?void 0:E.newSession)==null?void 0:M.call(E)}},{id:"compact",category:"Session",label:"Compact context",icon:Bf,keywords:["compact","shrink","context"],run:()=>{var E,M;return(M=(E=f.client)==null?void 0:E.compactContext)==null?void 0:M.call(E)}},{id:"export",category:"Session",label:"Export chat as markdown",icon:Hf,keywords:["export","save","markdown","download"],run:()=>vd()},{id:"export-html",category:"Session",label:"Export chat as HTML",hint:"Self-contained, opens in any browser",icon:Hf,keywords:["export","html","download","archive"],run:()=>_2()},{id:"history",category:"Command",label:"Open history",icon:qf,keywords:["history","sessions"],run:()=>l("history")},{id:"settings",category:"Command",label:"Open settings",icon:md,keywords:["settings","config"],run:()=>l("settings")},{id:"model",category:"Command",label:"Change provider/model",icon:Ti,keywords:["model","provider","change"],run:()=>l("settings")},{id:"theme-light",category:"Theme",label:"Theme: Light",icon:pd,keywords:["theme","light","mode"],run:()=>i("light")},{id:"theme-dark",category:"Theme",label:"Theme: Dark",icon:dd,keywords:["theme","dark","mode"],run:()=>i("dark")},{id:"theme-system",category:"Theme",label:"Theme: Follow system",icon:fd,keywords:["theme","system","auto"],run:()=>i("system")},{id:"compact-toggle",category:"Command",label:"Toggle compact density",icon:Zw,hint:"Ctrl+Shift+D",keywords:["compact","dense","density","size"],run:()=>Ne.getState().toggleCompactMode()},{id:"sound-toggle",category:"Command",label:$e.getState().soundOnComplete?"Sound on completion: ON — turn off":"Sound on completion: OFF — turn on",icon:$e.getState().soundOnComplete?u2:c2,hint:"Chime when a run finishes",keywords:["sound","audio","chime","notify","beep"],run:()=>{const E=!$e.getState().soundOnComplete;$e.getState().setSoundOnComplete(E),E&&Gx(()=>Promise.resolve().then(()=>Yx),void 0).then(M=>M.playCompletionChime()).catch(()=>{})}}];for(const E of s.slice(0,10))E.isCurrent||A.push({id:`resume-${E.id}`,category:"Session",label:`Resume: ${E.title||"(empty)"}`,hint:`${E.provider}/${E.model}`,icon:Dx,keywords:["resume",E.title,E.id,E.provider,E.model],run:()=>f.resumeSession(E.id)});return A},[s,f,l,i,u,c]),C=w.useMemo(()=>{const A=p.toLowerCase().trim();return A?v.filter(E=>[E.label,E.hint??"",E.category,...E.keywords??[]].join(" ").toLowerCase().includes(A)):v},[v,p]);if(w.useEffect(()=>{x>=C.length&&y(0)},[C.length,x]),!t)return null;const N=A=>{A&&(r(!1),A.run())};return h.jsx("div",{className:"fixed inset-0 z-50 bg-background/60 backdrop-blur-sm flex items-start justify-center pt-[14vh] px-4",onClick:()=>r(!1),onKeyDown:A=>{A.key==="Escape"&&r(!1)},children:h.jsxs("div",{onClick:A=>A.stopPropagation(),onKeyDown:A=>A.stopPropagation(),className:"w-full max-w-2xl rounded-xl border bg-popover shadow-2xl overflow-hidden flex flex-col",children:[h.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b",children:[h.jsx(ha,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("input",{ref:b,value:p,onChange:A=>m(A.target.value),placeholder:"Search commands, sessions, settings…",className:"flex-1 bg-transparent outline-none text-sm placeholder:text-muted-foreground",onKeyDown:A=>{A.key==="ArrowDown"?(A.preventDefault(),y(E=>(E+1)%Math.max(1,C.length))):A.key==="ArrowUp"?(A.preventDefault(),y(E=>(E-1+Math.max(1,C.length))%Math.max(1,C.length))):A.key==="Enter"&&(A.preventDefault(),N(C[x]))}}),h.jsx("kbd",{className:"text-[10px] text-muted-foreground border rounded px-1.5 py-0.5",children:"Esc"})]}),h.jsx("div",{className:"max-h-[60vh] overflow-y-auto",children:C.length===0?h.jsxs("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:['No matches for "',p,'"']}):O2(C,x,N,y)}),h.jsxs("div",{className:"border-t px-4 py-2 text-[10px] uppercase tracking-wider text-muted-foreground flex items-center gap-3",children:[h.jsx("span",{children:"↑↓ navigate"}),h.jsx("span",{children:"↵ select"}),h.jsx("span",{children:"Esc dismiss"})]})]})})}function O2(t,r,l,i){const s={};return t.forEach((u,c)=>{s[u.category]||(s[u.category]=[]),s[u.category].push({item:u,globalIdx:c})}),h.jsx("div",{className:"p-1",children:Object.entries(s).map(([u,c])=>h.jsxs("div",{children:[h.jsx("div",{className:"px-3 pt-2 pb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:u}),c.map(({item:f,globalIdx:p})=>{const m=f.icon,x=p===r;return h.jsxs("button",{type:"button",onMouseEnter:()=>i(p),onClick:()=>l(f),className:me("w-full flex items-center gap-3 px-3 py-2 rounded text-left text-sm transition-colors",x?"bg-accent text-accent-foreground":"hover:bg-accent/40"),children:[h.jsx(m,{className:"h-4 w-4 text-muted-foreground shrink-0"}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("div",{className:"truncate",children:f.label}),f.hint&&h.jsx("div",{className:"text-xs text-muted-foreground truncate",children:f.hint})]}),x&&h.jsx("span",{className:"text-[10px] text-muted-foreground",children:"↵"})]},f.id)})]},u))})}function vd(){const t=he.getState().messages;he.getState();const r=[],l=new Date().toISOString().slice(0,19).replace(/[:T]/g,"-");r.push("# WrongStack chat export"),r.push(`*Exported: ${new Date().toISOString()}*`),r.push("");for(const c of t)if(c.role==="user")r.push("## 👤 User"),r.push(""),r.push(c.content),r.push("");else if(c.role==="assistant")r.push("## 🤖 Assistant"),r.push(""),r.push(c.content),r.push("");else if(c.role==="tool"){const f=c.isError?"❌":c.toolResult!==void 0?"✅":"⏳";r.push(`### 🔧 Tool: \`${c.toolName??"unknown"}\` ${f}`),c.toolInput!==void 0&&(r.push("```json"),r.push(JSON.stringify(c.toolInput,null,2)),r.push("```")),c.toolResult&&(r.push("<details><summary>Output</summary>"),r.push(""),r.push("```"),r.push(c.toolResult),r.push("```"),r.push("</details>")),r.push("")}const i=new Blob([r.join(`
|
|
465
|
+
`)],{type:"text/markdown"}),s=URL.createObjectURL(i),u=document.createElement("a");u.href=s,u.download=`wrongstack-chat-${l}.md`,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(s)}function _2(){var m,x,y;const t=he.getState().messages,r=Pe.getState(),l=new Date().toISOString().slice(0,19).replace(/[:T]/g,"-"),i=b=>b.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),s=t.map(b=>{if(b.role==="tool"){const A=b.isError?"❌":b.toolResult!==void 0?"✅":"⏳";return`
|
|
466
|
+
<section class="bubble tool ${b.isError?"error":""}">
|
|
467
|
+
<header><span class="icon">🔧</span><code>${i(b.toolName??"tool")}</code> ${A}</header>
|
|
468
|
+
${b.toolInput!==void 0?`<details><summary>Input</summary><pre>${i(JSON.stringify(b.toolInput,null,2))}</pre></details>`:""}
|
|
469
|
+
${b.toolResult?`<details><summary>Output</summary><pre>${i(b.toolResult)}</pre></details>`:""}
|
|
470
|
+
</section>`}const v=b.role==="user"?"user":"assistant",C=b.role==="user"?"👤":"🤖",N=b.role==="user"?"User":"Assistant";return`
|
|
471
|
+
<section class="bubble ${v}">
|
|
472
|
+
<header><span class="icon">${C}</span><strong>${N}</strong></header>
|
|
473
|
+
<pre class="content">${escape(b.content)}</pre>
|
|
474
|
+
</section>`}),u=`<!doctype html>
|
|
475
|
+
<html lang="en"><head>
|
|
476
|
+
<meta charset="utf-8">
|
|
477
|
+
<title>WrongStack chat — ${escape(((m=r.session)==null?void 0:m.title)||r.projectName||"export")}</title>
|
|
478
|
+
<style>
|
|
479
|
+
:root { color-scheme: light dark; }
|
|
480
|
+
body { font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; max-width: 920px; margin: 24px auto; padding: 0 16px; }
|
|
481
|
+
h1 { font-size: 20px; margin-bottom: 4px; }
|
|
482
|
+
.meta { color: #666; font-size: 12px; margin-bottom: 24px; }
|
|
483
|
+
.bubble { margin: 12px 0; padding: 10px 14px; border-radius: 10px; border: 1px solid #ddd; }
|
|
484
|
+
.bubble header { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #666; margin-bottom: 6px; }
|
|
485
|
+
.bubble header .icon { margin-right: 4px; }
|
|
486
|
+
.bubble.user { background: #eef4ff; border-color: #c8d8f5; }
|
|
487
|
+
.bubble.assistant { background: #fff; }
|
|
488
|
+
.bubble.tool { background: #fafafa; }
|
|
489
|
+
.bubble.tool.error { background: #fff5f5; border-color: #f5c8c8; }
|
|
490
|
+
pre.content, .bubble pre { white-space: pre-wrap; word-break: break-word; font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace; margin: 0; }
|
|
491
|
+
details summary { cursor: pointer; color: #555; font-size: 12px; }
|
|
492
|
+
details pre { margin-top: 6px; background: #f4f4f4; padding: 8px; border-radius: 6px; max-height: 360px; overflow: auto; }
|
|
493
|
+
@media (prefers-color-scheme: dark) {
|
|
494
|
+
body { background: #0d0d0f; color: #e6e6e6; }
|
|
495
|
+
.bubble { border-color: #2a2a2e; }
|
|
496
|
+
.bubble.user { background: #16213a; border-color: #2a3d6b; }
|
|
497
|
+
.bubble.assistant { background: #161618; }
|
|
498
|
+
.bubble.tool { background: #131315; }
|
|
499
|
+
.bubble.tool.error { background: #2a1717; border-color: #5c2a2a; }
|
|
500
|
+
details pre { background: #1a1a1c; }
|
|
501
|
+
.meta, .bubble header, details summary { color: #999; }
|
|
502
|
+
}
|
|
503
|
+
</style>
|
|
504
|
+
</head><body>
|
|
505
|
+
<h1>WrongStack chat — ${escape(((x=r.session)==null?void 0:x.title)||r.projectName||"export")}</h1>
|
|
506
|
+
<div class="meta">
|
|
507
|
+
Exported ${new Date().toISOString()}${(y=r.session)!=null&&y.provider?` · ${escape(r.session.provider)}/${escape(r.session.model)}`:""} · ${t.length} message${t.length===1?"":"s"}
|
|
508
|
+
</div>
|
|
509
|
+
${s.join("")}
|
|
510
|
+
</body></html>`,c=new Blob([u],{type:"text/html;charset=utf-8"}),f=URL.createObjectURL(c),p=document.createElement("a");p.href=f,p.download=`wrongstack-chat-${l}.html`,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(f)}function L2({query:t,onPick:r,onClose:l}){const i=sr(),s=$e(y=>y.wsUrl),[u,c]=w.useState([]),[f,p]=w.useState(0),m=w.useRef(null),x=w.useRef(null);return w.useEffect(()=>{const b=En(s).on("files.list",v=>{var N;const C=v.payload;c(C.files??[]),p(0),(N=x.current)==null||N.resolve(C.files??[]),x.current=null});return()=>b()},[s]),w.useEffect(()=>(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{i.client.listFiles(t,50)},80),()=>{m.current&&clearTimeout(m.current)}),[t,i.client]),w.useEffect(()=>{const y=b=>{if(b.key==="ArrowDown")b.preventDefault(),p(v=>(v+1)%Math.max(1,u.length));else if(b.key==="ArrowUp")b.preventDefault(),p(v=>(v-1+Math.max(1,u.length))%Math.max(1,u.length));else if(b.key==="Enter"||b.key==="Tab"){if(u.length===0)return;b.preventDefault(),r(u[f])}else b.key==="Escape"&&(b.preventDefault(),l())};return window.addEventListener("keydown",y,!0),()=>window.removeEventListener("keydown",y,!0)},[u,f,r,l]),h.jsxs("div",{className:"absolute bottom-full left-0 right-0 mb-2 rounded-lg border bg-popover shadow-md p-1 text-sm max-h-72 overflow-auto",children:[h.jsxs("div",{className:"px-3 py-1 text-[10px] uppercase tracking-wider text-muted-foreground border-b mb-1 flex items-center justify-between",children:[h.jsxs("span",{children:["@ Files ",t&&`· "${t}"`]}),h.jsx("span",{children:"↑/↓ select · ↵ insert · Esc dismiss"})]}),u.length===0?h.jsx("div",{className:"px-3 py-2 text-xs text-muted-foreground italic",children:t?`No files match "${t}"`:"Searching project…"}):u.map((y,b)=>h.jsxs("button",{type:"button",onClick:()=>r(y),onMouseEnter:()=>p(b),className:me("w-full text-left px-3 py-1.5 rounded transition-colors flex items-center gap-2 font-mono text-xs",b===f?"bg-accent text-accent-foreground":"hover:bg-accent/40"),children:[y.includes("/")?h.jsx(Gw,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}):h.jsx(Fw,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),h.jsx("span",{className:"truncate",children:y})]},y))]})}function hy(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function Sd(...t){return r=>{let l=!1;const i=t.map(s=>{const u=hy(s,r);return!l&&typeof u=="function"&&(l=!0),u});if(l)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():hy(t[s],null)}}}}function $t(...t){return w.useCallback(Sd(...t),t)}var U2=Symbol.for("react.lazy"),ys=od[" use ".trim().toString()];function B2(t){return typeof t=="object"&&t!==null&&"then"in t}function Px(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===U2&&"_payload"in t&&B2(t._payload)}function H2(t){const r=I2(t),l=w.forwardRef((i,s)=>{let{children:u,...c}=i;Px(u)&&typeof ys=="function"&&(u=ys(u._payload));const f=w.Children.toArray(u),p=f.find($2);if(p){const m=p.props.children,x=f.map(y=>y===p?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:y);return h.jsx(r,{...c,ref:s,children:w.isValidElement(m)?w.cloneElement(m,void 0,x):null})}return h.jsx(r,{...c,ref:s,children:u})});return l.displayName=`${t}.Slot`,l}var q2=H2("Slot");function I2(t){const r=w.forwardRef((l,i)=>{let{children:s,...u}=l;if(Px(s)&&typeof ys=="function"&&(s=ys(s._payload)),w.isValidElement(s)){const c=Y2(s),f=F2(u,s.props);return s.type!==w.Fragment&&(f.ref=i?Sd(i,c):c),w.cloneElement(s,f)}return w.Children.count(s)>1?w.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var V2=Symbol("radix.slottable");function $2(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===V2}function F2(t,r){const l={...r};for(const i in r){const s=t[i],u=r[i];/^on[A-Z]/.test(i)?s&&u?l[i]=(...f)=>{const p=u(...f);return s(...f),p}:s&&(l[i]=s):i==="style"?l[i]={...s,...u}:i==="className"&&(l[i]=[s,u].filter(Boolean).join(" "))}return{...t,...l}}function Y2(t){var i,s;let r=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?t.ref:(r=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}const my=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,py=Cx,G2=(t,r)=>l=>{var i;if((r==null?void 0:r.variants)==null)return py(t,l==null?void 0:l.class,l==null?void 0:l.className);const{variants:s,defaultVariants:u}=r,c=Object.keys(s).map(m=>{const x=l==null?void 0:l[m],y=u==null?void 0:u[m];if(x===null)return null;const b=my(x)||my(y);return s[m][b]}),f=l&&Object.entries(l).reduce((m,x)=>{let[y,b]=x;return b===void 0||(m[y]=b),m},{}),p=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((m,x)=>{let{class:y,className:b,...v}=x;return Object.entries(v).every(C=>{let[N,A]=C;return Array.isArray(A)?A.includes({...u,...f}[N]):{...u,...f}[N]===A})?[...m,y,b]:m},[]);return py(t,c,p,l==null?void 0:l.class,l==null?void 0:l.className)},P2=G2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Le=w.forwardRef(({className:t,variant:r,size:l,asChild:i=!1,...s},u)=>{const c=i?q2:"button";return h.jsx(c,{className:me(P2({variant:r,size:l,className:t})),ref:u,...s})});Le.displayName="Button";const $f=[{name:"/help",category:"App",description:"Show every slash command and what it does"},{name:"/export",category:"Session",description:"Download the current chat as markdown"},{name:"/todos",category:"Inspect",description:"List current todos (try `/todos clear` to reset)"},{name:"/clear",category:"Session",description:"Wipe current context (keeps session id, disk record stays)"},{name:"/new",category:"Session",description:"Start a brand-new session (fresh on disk and in memory)"},{name:"/compact",category:"Session",description:"Shrink context — elide ancient tool output"},{name:"/debug",category:"Inspect",aliases:["/context"],description:"Per-section context size breakdown"},{name:"/tools",category:"Inspect",description:"List every registered tool the model can call"},{name:"/memory",category:"Inspect",description:"Show all remembered notes (project + user scope)"},{name:"/skill",category:"Inspect",aliases:["/skills"],description:"List active skills"},{name:"/diag",category:"Inspect",description:"Runtime diagnostics (provider, tools, features, mode, usage)"},{name:"/stats",category:"Inspect",description:"Session stats: tokens, cache hit ratio, cost, elapsed"},{name:"/save",category:"Session",description:"Force-flush the session (auto-saved already)"},{name:"/abort",category:"Run",aliases:["/stop"],description:"Abort the current run"},{name:"/settings",category:"App",aliases:["/model"],description:"Open settings (provider/model/keys)"}],X2=["Run","Session","Inspect","App"];function gy(t,r){let l=r-1;for(;l>=0;){const i=t[l];if(i==="@"){const s=l>0?t[l-1]:"";return l===0||/\s/.test(s??"")?{start:l,query:t.slice(l+1,r)}:null}if(/\s/.test(i))return null;l--}return null}function Q2(t){const r=t.toLowerCase();return r==="/"||r===""?$f:$f.filter(l=>{var i;return l.name.startsWith(r)||(((i=l.aliases)==null?void 0:i.some(s=>s.startsWith(r)))??!1)})}function K2(){const{isLoading:t,setLoading:r,addMessage:l,clearMessages:i}=he(),s=he(T=>T.queue),u=he(T=>T.enqueue),c=he(T=>T.removeQueued),f=he(T=>T.clearQueue),{setCurrentView:p}=Ne(),m=Ne(T=>T.pushPrompt),x=Ne(T=>T.promptHistory),y=sr(),{sendMessage:b,sendAbort:v,client:C}=y,N=Pe(T=>T.lastInputTokens),A=Pe(T=>T.maxContext),[E,M]=w.useState(""),[O,$]=w.useState(0),[P,L]=w.useState(-1),[Y,le]=w.useState(null),[oe,H]=w.useState(null),[X,G]=w.useState(!1),fe=w.useRef(null),ue=w.useCallback(T=>{var Z,xe,ke,Ae,ht;const B=T.trim(),j=B.indexOf(" "),_=(j===-1?B:B.slice(0,j)).toLowerCase(),ee=j===-1?"":B.slice(j+1).trim(),te=_;switch(te){case"/help":{const yt=["📖 **Slash commands**","",...$f.map(Ue=>{var ye;return`• \`${Ue.name}\`${(ye=Ue.aliases)!=null&&ye.length?` (${Ue.aliases.map(Se=>`\`${Se}\``).join(", ")})`:""} — ${Ue.description}`})];return l({role:"assistant",content:yt.join(`
|
|
511
|
+
`)}),!0}case"/clear":return i(),(Z=C==null?void 0:C.clearContext)==null||Z.call(C),!0;case"/new":return(xe=C==null?void 0:C.newSession)==null||xe.call(C),!0;case"/compact":case"/compact!":return(ke=C==null?void 0:C.compactContext)==null||ke.call(C,te==="/compact!"),!0;case"/debug":case"/context":return(Ae=C==null?void 0:C.debugContext)==null||Ae.call(C),!0;case"/tools":return y.listTools(),!0;case"/memory":return y.listMemory(),!0;case"/skill":case"/skills":return y.listSkills(),!0;case"/diag":return y.getDiag(),!0;case"/stats":return y.getStats(),!0;case"/save":return y.saveSession(),!0;case"/todos":{if(ee.toLowerCase()==="clear")return(ht=C==null?void 0:C.clearTodos)==null||ht.call(C),!0;const Ue=Pe.getState().todos;if(Ue.length===0)return l({role:"assistant",content:"✅ **Todos** — _empty. Ask the agent to plan something and they'll show up here._"}),!0;const ye=[`✅ **Todos** (${Ue.filter(Se=>Se.status==="completed").length}/${Ue.length} done)`,""];for(const Se of Ue){const Fe=Se.status==="completed"?"[x]":Se.status==="in_progress"?"[~]":"[ ]",nt=Se.status==="in_progress"&&Se.activeForm?Se.activeForm:Se.content;ye.push(`- ${Fe} ${nt}`)}return ye.push("","_Use `/todos clear` to wipe the list._"),l({role:"assistant",content:ye.join(`
|
|
512
|
+
`)}),!0}case"/export":return vd(),l({role:"assistant",content:"📥 Chat exported to your downloads folder."}),!0;case"/abort":case"/stop":return v(),r(!1),!0;case"/settings":case"/model":return p("settings"),!0;default:return!1}},[l,i,C,v,r,p,y]),ne=E.startsWith("/")&&!E.includes(" ")?Q2(E):[];w.useEffect(()=>{O>=ne.length&&$(0)},[ne.length,O]);const R=w.useCallback(async T=>{if(T.preventDefault(),!E.trim())return;const B=E.trim();if(B.startsWith("/")&&ue(B)){m(B),M(""),L(-1);return}if(M(""),L(-1),m(B),t){u(B);return}try{C!=null&&C.isConnected?(l({role:"user",content:B}),r(!0),b(B)):console.error("WebSocket not connected")}catch(j){console.error("Failed to send:",j),r(!1)}},[E,t,u,C,b,r,l,ue,m]),J=w.useCallback(()=>{v(),r(!1)},[v,r]),ie=w.useCallback(()=>{v(),r(!1);const T=he.getState().messages;for(let B=T.length-1;B>=0;B--){const j=T[B];if(j.role==="user"&&j.content){M(j.content),requestAnimationFrame(()=>{const _=fe.current;_&&(_.style.height="auto",_.style.height=`${Math.min(_.scrollHeight,200)}px`,_.focus(),_.setSelectionRange(j.content.length,j.content.length))});return}}},[v,r]),ge=T=>{if(ne.length===0&&!Y&&x.length>0){if(T.key==="ArrowUp"){const B=T.currentTarget,j=B.value.slice(0,B.selectionStart);if(P>=0||j.indexOf(`
|
|
513
|
+
`)===-1){T.preventDefault();const _=Math.min(x.length-1,P+1);L(_);const ee=x[_]??"";M(ee),requestAnimationFrame(()=>{const te=fe.current;te&&(te.style.height="auto",te.style.height=`${Math.min(te.scrollHeight,200)}px`,te.setSelectionRange(ee.length,ee.length))});return}}if(T.key==="ArrowDown"&&P>=0){T.preventDefault();const B=P-1;if(B<0)L(-1),M("");else{L(B);const j=x[B]??"";M(j),requestAnimationFrame(()=>{const _=fe.current;_&&(_.style.height="auto",_.style.height=`${Math.min(_.scrollHeight,200)}px`,_.setSelectionRange(j.length,j.length))})}return}}if(ne.length>0){if(T.key==="ArrowDown"){T.preventDefault(),$(B=>(B+1)%ne.length);return}if(T.key==="ArrowUp"){T.preventDefault(),$(B=>(B-1+ne.length)%ne.length);return}if(T.key==="Tab"){T.preventDefault();const B=ne[O];B&&(M(B.name+" "),$(0));return}if(T.key==="Enter"&&!T.shiftKey){const B=ne[O];if(B&&B.name!==E.toLowerCase().trim()){T.preventDefault(),M(""),ue(B.name);return}}if(T.key==="Escape"){T.preventDefault(),M("");return}}T.key==="Enter"&&!T.shiftKey&&(T.preventDefault(),R(T))},D=()=>{const T=fe.current;T&&(T.style.height="auto",T.style.height=`${Math.min(T.scrollHeight,200)}px`)};return h.jsxs("div",{className:"flex flex-col gap-2",children:[oe&&h.jsxs("div",{className:"rounded-md border border-amber-500/30 bg-amber-500/5 text-amber-700 dark:text-amber-300 px-2.5 py-1.5 text-xs flex items-center justify-between gap-2 animate-message",children:[h.jsxs("span",{children:["Pasted"," ",h.jsx("span",{className:"font-mono tabular-nums",children:oe.chars.toLocaleString()})," chars (",h.jsx("span",{className:"font-mono tabular-nums",children:oe.lines})," lines) — fenced code blocks render best with ",h.jsx("span",{className:"font-mono",children:"```"}),"."]}),h.jsx("button",{type:"button",onClick:()=>H(null),className:"text-amber-600/70 hover:text-amber-600 dark:text-amber-300/70 dark:hover:text-amber-300 shrink-0",title:"Dismiss",children:"×"})]}),s.length>0&&h.jsxs("div",{className:"rounded-lg border bg-muted/30 p-2 text-xs",children:[h.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[h.jsxs("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-medium",children:["Queued (",s.length,")"]}),h.jsx("button",{type:"button",onClick:f,className:"text-muted-foreground hover:text-destructive text-xs",children:"Clear all"})]}),h.jsx("ul",{className:"space-y-1",children:s.map((T,B)=>h.jsxs("li",{className:"flex items-start justify-between gap-2 rounded bg-background/60 border px-2 py-1",children:[h.jsx("span",{className:"truncate flex-1 min-w-0",children:T}),h.jsx("button",{type:"button",onClick:()=>c(B),className:"text-muted-foreground hover:text-destructive shrink-0",title:"Remove from queue",children:"×"})]},B))})]}),h.jsxs("form",{onSubmit:R,onDragEnter:T=>{!T.dataTransfer||!Array.from(T.dataTransfer.types).includes("Files")||(T.preventDefault(),G(!0))},onDragOver:T=>{!T.dataTransfer||!Array.from(T.dataTransfer.types).includes("Files")||(T.preventDefault(),T.dataTransfer.dropEffect="copy")},onDragLeave:T=>{T.currentTarget.contains(T.relatedTarget)||G(!1)},onDrop:T=>{if(!T.dataTransfer)return;const B=Array.from(T.dataTransfer.files??[]);if(B.length===0){G(!1);return}T.preventDefault(),G(!1);const j=fe.current,_=(j==null?void 0:j.selectionStart)??E.length,ee=E.slice(0,_),te=E.slice(_),xe=ee.length>0&&!/\s$/.test(ee)?" ":"",ke=B.map(nt=>`@${nt.name}`),Ae=ke.join(" "),yt=te.length===0||!/^\s/.test(te)?" ":"",Ue=`${xe}${Ae}${yt}`,ye=ee+Ue+te;M(ye);const Se=ee.length+xe.length+ke.slice(0,-1).join(" ").length+(ke.length>1?1:0),Fe=B[B.length-1].name;requestAnimationFrame(()=>{if(j){const nt=ee.length+Ue.length-yt.length;j.focus(),j.setSelectionRange(nt,nt),j.style.height="auto",j.style.height=`${Math.min(j.scrollHeight,200)}px`}le({start:Se,query:Fe})})},className:me("flex items-end gap-2 relative rounded-lg transition-colors",X&&"ring-2 ring-primary ring-offset-2 ring-offset-background bg-primary/5"),children:[X&&h.jsxs("div",{className:"absolute inset-0 z-20 flex items-center justify-center pointer-events-none rounded-lg bg-primary/10 text-primary text-sm font-medium",children:["Drop file","(s)"," to attach as @-mention"]}),h.jsxs("div",{className:"relative flex-1",children:[Y&&h.jsx(L2,{query:Y.query,onClose:()=>le(null),onPick:T=>{const B=E.slice(0,Y.start),j=E.slice(Y.start+1+Y.query.length),_=`@${T} `,ee=B+_+j;M(ee),le(null),requestAnimationFrame(()=>{const te=fe.current;if(te){const Z=B.length+_.length;te.focus(),te.setSelectionRange(Z,Z),te.style.height="auto",te.style.height=`${Math.min(te.scrollHeight,200)}px`}})}}),!Y&&ne.length>0&&(()=>{const T={};ne.forEach((j,_)=>{T[j.category]||(T[j.category]=[]),T[j.category].push({cmd:j,idx:_})});const B=X2.filter(j=>{var _;return(_=T[j])==null?void 0:_.length});return h.jsxs("div",{className:"absolute bottom-full left-0 right-0 mb-2 rounded-lg border bg-popover shadow-md p-1 text-sm max-h-72 overflow-auto",children:[h.jsx("div",{className:"px-3 py-1 text-[10px] uppercase tracking-wider text-muted-foreground border-b mb-1",children:"↑/↓ select · Tab complete · Enter dispatch · Esc dismiss"}),B.map(j=>h.jsxs("div",{className:"mb-1",children:[h.jsx("div",{className:"px-3 pt-1 pb-0.5 text-[10px] uppercase tracking-wider text-muted-foreground/70 font-semibold",children:j}),T[j].map(({cmd:_,idx:ee})=>{var te;return h.jsxs("button",{type:"button",onClick:()=>{M(""),ue(_.name)},onMouseEnter:()=>$(ee),className:me("w-full text-left px-3 py-1.5 rounded transition-colors flex items-center gap-3",ee===O?"bg-accent text-accent-foreground":"hover:bg-accent/40"),children:[h.jsx("span",{className:"font-mono shrink-0",children:_.name}),(te=_.aliases)!=null&&te.length?h.jsxs("span",{className:"text-xs text-muted-foreground/70 font-mono shrink-0",children:["(",_.aliases.join(", "),")"]}):null,h.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["— ",_.description]})]},_.name)})]},j))]})})(),h.jsx("textarea",{ref:fe,value:E,onChange:T=>{const B=T.target.value;M(B),D(),P>=0&&L(-1);const j=T.target.selectionStart??B.length;le(gy(B,j))},onSelect:T=>{const B=T.currentTarget;le(gy(B.value,B.selectionStart))},onKeyDown:ge,onPaste:T=>{var j;const B=((j=T.clipboardData)==null?void 0:j.getData("text"))??"";if(B.length>800){const _=B.split(`
|
|
514
|
+
`).length;H({chars:B.length,lines:_}),setTimeout(()=>H(null),4e3)}},placeholder:C!=null&&C.isConnected?t?"Agent is running — type to queue a follow-up…":"Message WrongStack… (type / for commands, @ for files)":"Connect to server first…",className:me("flex min-h-[44px] w-full resize-none rounded-lg border border-input bg-background px-4 py-3 pr-12","text-sm ring-offset-background placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","scrollbar-thin"),rows:1,disabled:!(C!=null&&C.isConnected)}),E.length>0&&(()=>{const T=E.length>=400,B=Math.ceil(E.length/4);let j="text-muted-foreground",_;if(A>0&&T){const te=(N+B+64)/A*100;te>=100?(j="text-red-600 dark:text-red-400 font-medium",_=`Projected ${Math.round(te)}% of ${A.toLocaleString()} ctx — will likely error or compact.`):te>=85?(j="text-amber-600 dark:text-amber-400 font-medium",_=`Projected ${Math.round(te)}% of ${A.toLocaleString()} ctx — getting tight.`):_=`≈ ${B.toLocaleString()} tokens · projected ${Math.round(te)}% of ${A.toLocaleString()} ctx.`}else T&&(_=`≈ ${B.toLocaleString()} tokens (4-char heuristic)`);return h.jsxs("span",{className:me("absolute bottom-1.5 right-12 text-xs tabular-nums",j),title:_,children:[E.length,T&&h.jsxs("span",{className:"ml-1 opacity-70",children:["· ≈",B>=1e3?`${(B/1e3).toFixed(1)}k`:B,"t"]})]})})()]}),h.jsx("div",{className:"flex gap-1",children:t?h.jsxs(h.Fragment,{children:[h.jsx(Le,{type:"button",size:"icon",variant:"outline",onClick:ie,className:"h-[44px] w-[44px] rounded-lg",title:"Stop run and edit the last prompt (reuse + rewrite)",children:h.jsx(qx,{className:"h-4 w-4"})}),h.jsx(Le,{type:"button",size:"icon",variant:"destructive",onClick:J,className:"h-[44px] w-[44px] rounded-lg",title:"Abort the current run",children:h.jsx(i2,{className:"h-4 w-4 fill-current"})})]}):h.jsx(Le,{type:"submit",size:"icon",disabled:!E.trim()||!(C!=null&&C.isConnected),className:"h-[44px] w-[44px] rounded-lg",children:h.jsx(l2,{className:"h-4 w-4"})})})]})]})}function Z2({wsStatus:t,wsConnected:r}){const l=$e(c=>c.wsUrl),[i,s]=w.useState(Date.now());w.useEffect(()=>{if(t.state!=="reconnecting")return;const c=setInterval(()=>s(Date.now()),500);return()=>clearInterval(c)},[t.state]);const u=()=>En(l).retryNow();if(t.state==="open"&&r)return h.jsx("div",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[11px] font-medium shrink-0 bg-green-500/10 text-green-600 dark:text-green-400",title:"Backend connected",children:h.jsx($x,{className:"h-3 w-3"})});if(t.state==="connecting")return h.jsxs("div",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[11px] font-medium shrink-0 bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",title:"Connecting to backend",children:[h.jsx(Fr,{className:"h-3 w-3 animate-spin"}),h.jsx("span",{children:"connecting"})]});if(t.state==="reconnecting"){const c=Math.max(0,Math.ceil((t.nextRetryAt-i)/1e3));return h.jsxs("button",{type:"button",onClick:u,className:me("flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[11px] font-medium shrink-0","bg-orange-500/10 text-orange-600 dark:text-orange-400 hover:bg-orange-500/20","transition-colors"),title:t.lastError?`Reconnecting — last error: ${t.lastError}. Click to retry now.`:"Reconnecting — click to retry now.",children:[h.jsx(Fr,{className:"h-3 w-3 animate-spin"}),h.jsxs("span",{children:["retry #",t.attempt," in ",c,"s"]})]})}return h.jsxs("button",{type:"button",onClick:u,className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[11px] font-medium shrink-0 bg-red-500/10 text-red-600 dark:text-red-400 hover:bg-red-500/20 transition-colors",title:t.state==="closed"&&t.error?`Disconnected: ${t.error}. Click to retry.`:"Disconnected. Click to retry.",children:[h.jsx(yd,{className:"h-3 w-3"}),h.jsxs("span",{className:"flex items-center gap-0.5",children:["offline",h.jsx(zi,{className:"h-3 w-3 opacity-70"})]})]})}function J2(){const t=Pe(y=>y.cost),r=Pe(y=>y.inputCost),l=Pe(y=>y.outputCost),i=Pe(y=>y.cacheReadCost),s=he(y=>y.messages),[u,c]=w.useState(!1),f=w.useRef(null);w.useEffect(()=>{if(!u)return;const y=v=>{var C;(C=f.current)!=null&&C.contains(v.target)||c(!1)},b=v=>{v.key==="Escape"&&c(!1)};return document.addEventListener("mousedown",y),document.addEventListener("keydown",b),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",b)}},[u]);const p=(()=>{const y=[];for(const b of s)b.role==="assistant"&&b.runSummary&&b.runSummary.costDelta>0&&y.push({id:b.id,preview:b.content.slice(0,80).replace(/\s+/g," ").trim()||"(empty)",cost:b.runSummary.costDelta,tools:b.runSummary.tools,ms:b.runSummary.durationMs,ts:b.timestamp});return y.sort((b,v)=>v.cost-b.cost),y.slice(0,5)})(),m=y=>y>=.01?`$${y.toFixed(4)}`:y>0?`$${y.toFixed(6).replace(/0+$/,"").replace(/\.$/,"")}`:"$0",x=r>0||l>0;return h.jsxs("div",{ref:f,className:"relative inline-block",children:[h.jsxs("button",{type:"button",onClick:()=>c(y=>!y),className:me("font-medium text-green-600 dark:text-green-400 hover:underline tabular-nums"),title:"Click for per-turn cost breakdown",children:["$",t.toFixed(4)]}),u&&h.jsxs("div",{className:"absolute right-0 top-full mt-1 z-30 w-80 rounded-md border bg-popover shadow-lg p-3 text-foreground",children:[h.jsxs("div",{className:"flex items-center justify-between mb-2",children:[h.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground font-medium",children:"Cost breakdown"}),h.jsx("span",{className:"font-mono tabular-nums text-sm font-semibold text-green-600 dark:text-green-400",children:m(t)})]}),x?h.jsxs("div",{className:"text-[11px] text-muted-foreground font-mono mb-3 border-b pb-2",children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsx("span",{children:"input /1M"}),h.jsxs("span",{children:["$",r.toFixed(2)]})]}),h.jsxs("div",{className:"flex justify-between",children:[h.jsx("span",{children:"output /1M"}),h.jsxs("span",{children:["$",l.toFixed(2)]})]}),i>0&&h.jsxs("div",{className:"flex justify-between",children:[h.jsx("span",{children:"cache /1M"}),h.jsxs("span",{children:["$",i.toFixed(2)]})]})]}):h.jsx("div",{className:"text-[11px] text-muted-foreground italic mb-3 border-b pb-2",children:"No pricing for the current model — cost figures are zero."}),p.length===0?h.jsx("div",{className:"text-xs text-muted-foreground italic",children:"No completed turns yet. Run a prompt to see per-turn cost here."}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground/80 mb-1",children:["Top ",p.length," expensive turn",p.length===1?"":"s"]}),h.jsx("ul",{className:"space-y-1",children:p.map(y=>h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>{const b=document.querySelector(`[data-message-id="${y.id}"]`);b&&b.scrollIntoView({behavior:"smooth",block:"center"}),c(!1)},className:"w-full text-left rounded px-2 py-1.5 hover:bg-accent/40 transition-colors",children:[h.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[h.jsx("span",{className:"text-xs truncate",children:y.preview}),h.jsx("span",{className:"text-xs font-mono tabular-nums text-green-600 dark:text-green-400 shrink-0",children:m(y.cost)})]}),h.jsxs("div",{className:"text-[10px] text-muted-foreground font-mono mt-0.5",children:[y.tools," tool",y.tools===1?"":"s"," · ",(y.ms/1e3).toFixed(1),"s"]})]})},y.id))})]})]})]})}const W2=["path","file_path","pattern","command","cmd","url","query","description","content"];function ek(t,r){if(r==null)return"";if(typeof r!="object")return Hr(String(r),120);const l=r,i=(t??"").toLowerCase();if(/^todo(_?write)?$|^todos$/i.test(i)||Array.isArray(l.todos)){const u=l.todos??[];if(Array.isArray(u)){const c=u.filter(m=>m.status==="completed").length,f=u.filter(m=>m.status==="in_progress").length,p=[`${u.length} todo${u.length===1?"":"s"}`];return c>0&&p.push(`${c} done`),f>0&&p.push(`${f} in-progress`),p.join(" · ")}}if(/batch|parallel/.test(i)||Array.isArray(l.tool_uses)||Array.isArray(l.calls)){const u=l.tool_uses??l.calls??l.batch;if(Array.isArray(u)){const c=new Set;for(const m of u)m&&typeof m=="object"&&"name"in m&&c.add(String(m.name));const f=[...c].slice(0,3).join(", "),p=c.size>3?` +${c.size-3}`:"";return`${u.length} sub-tool${u.length===1?"":"s"}${f?` · ${f}${p}`:""}`}}if(/^(edit|str_replace|edit_file|patch)$/.test(i)){const u=sf(l),c=typeof l.old_string=="string"?l.old_string:"",f=typeof l.new_string=="string"?l.new_string:"",p=c?c.split(`
|
|
515
|
+
`).length:0,m=f?f.split(`
|
|
516
|
+
`).length:0;return`edit ${u||"(file)"}${p||m?` (${p} → ${m} lines)`:""}`}if(/^(write|write_file|create_file|new_file)$/.test(i)){const u=sf(l),c=typeof l.content=="string"?l.content:"",f=c?c.split(`
|
|
517
|
+
`).length:0;return`write ${u||"(file)"}${f?` · ${f} lines`:""}`}if(/^(bash|shell|exec|run|run_command|run_shell)$/.test(i)){const u=l.command??l.cmd??l.script;if(typeof u=="string")return`$ ${Hr(u,110)}`}if(/^(fetch|http|web|webfetch|curl|request)$/.test(i)){const u=l.url;if(typeof u=="string")return`${(l.method??"GET").toUpperCase()} ${Hr(u,100)}`}if(/^(grep|search|ripgrep)$/.test(i)){const u=l.pattern,c=l.path??l.glob??l.type;if(typeof u=="string")return c?`grep ${Hr(u,60)} in ${c}`:`grep ${Hr(u,100)}`}if(/^(glob|find)$/.test(i)){const u=l.pattern??l.glob;if(typeof u=="string")return`glob ${Hr(u,100)}`}if(/^(read|read_file|cat)$/.test(i)){const u=sf(l),c=l.offset,f=l.limit;if(u&&(typeof c=="number"||typeof f=="number")){const p=c??0,m=typeof f=="number"?p+f:"";return`read ${u} (${p}…${m})`}if(u)return`read ${u}`}for(const u of W2){const c=l[u];if(typeof c=="string"&&c.length>0)return`${u}: ${Hr(c,100)}`}const s=tk(r);return Hr(s,120)}function Hr(t,r){return t.length>r?`${t.slice(0,r-1)}…`:t}function sf(t){const r=t.file_path??t.path??t.filepath;return typeof r=="string"?r:""}function tk(t){try{return JSON.stringify(t)}catch{return String(t)}}function nk(t,r){const l={};return(t[t.length-1]===""?[...t,""]:t).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const rk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ak={};function yy(t,r){return(ak.jsx?lk:rk).test(t)}const ik=/[ \t\n\f\r]/g;function ok(t){return typeof t=="object"?t.type==="text"?xy(t.value):!1:xy(t)}function xy(t){return t.replace(ik,"")===""}class Oi{constructor(r,l,i){this.normal=l,this.property=r,i&&(this.space=i)}}Oi.prototype.normal={};Oi.prototype.property={};Oi.prototype.space=void 0;function Xx(t,r){const l={},i={};for(const s of t)Object.assign(l,s.property),Object.assign(i,s.normal);return new Oi(l,i,r)}function Ff(t){return t.toLowerCase()}class nn{constructor(r,l){this.attribute=l,this.property=r}}nn.prototype.attribute="";nn.prototype.booleanish=!1;nn.prototype.boolean=!1;nn.prototype.commaOrSpaceSeparated=!1;nn.prototype.commaSeparated=!1;nn.prototype.defined=!1;nn.prototype.mustUseProperty=!1;nn.prototype.number=!1;nn.prototype.overloadedBoolean=!1;nn.prototype.property="";nn.prototype.spaceSeparated=!1;nn.prototype.space=void 0;let sk=0;const _e=bl(),Et=bl(),Yf=bl(),ce=bl(),ut=bl(),fa=bl(),fn=bl();function bl(){return 2**++sk}const Gf=Object.freeze(Object.defineProperty({__proto__:null,boolean:_e,booleanish:Et,commaOrSpaceSeparated:fn,commaSeparated:fa,number:ce,overloadedBoolean:Yf,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),uf=Object.keys(Gf);class wd extends nn{constructor(r,l,i,s){let u=-1;if(super(r,l),by(this,"space",s),typeof i=="number")for(;++u<uf.length;){const c=uf[u];by(this,uf[u],(i&Gf[c])===Gf[c])}}}wd.prototype.defined=!0;function by(t,r,l){l&&(t[r]=l)}function Sa(t){const r={},l={};for(const[i,s]of Object.entries(t.properties)){const u=new wd(i,t.transform(t.attributes||{},i),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),r[i]=u,l[Ff(i)]=i,l[Ff(u.attribute)]=i}return new Oi(r,l,t.space)}const Qx=Sa({properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:ce,ariaColIndex:ce,ariaColSpan:ce,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:ut,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:ce,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:ce,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:ut,ariaRowCount:ce,ariaRowIndex:ce,ariaRowSpan:ce,ariaSelected:Et,ariaSetSize:ce,ariaSort:null,ariaValueMax:ce,ariaValueMin:ce,ariaValueNow:ce,ariaValueText:null,role:null},transform(t,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function Kx(t,r){return r in t?t[r]:r}function Zx(t,r){return Kx(t,r.toLowerCase())}const uk=Sa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fa,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:_e,allowPaymentRequest:_e,allowUserMedia:_e,alt:null,as:null,async:_e,autoCapitalize:null,autoComplete:ut,autoFocus:_e,autoPlay:_e,blocking:ut,capture:null,charSet:null,checked:_e,cite:null,className:ut,cols:ce,colSpan:null,content:null,contentEditable:Et,controls:_e,controlsList:ut,coords:ce|fa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_e,defer:_e,dir:null,dirName:null,disabled:_e,download:Yf,draggable:Et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_e,formTarget:null,headers:ut,height:ce,hidden:Yf,high:ce,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:_e,inputMode:null,integrity:null,is:null,isMap:_e,itemId:null,itemProp:ut,itemRef:ut,itemScope:_e,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_e,low:ce,manifest:null,max:null,maxLength:ce,media:null,method:null,min:null,minLength:ce,multiple:_e,muted:_e,name:null,nonce:null,noModule:_e,noValidate:_e,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:_e,optimum:ce,pattern:null,ping:ut,placeholder:null,playsInline:_e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_e,referrerPolicy:null,rel:ut,required:_e,reversed:_e,rows:ce,rowSpan:ce,sandbox:ut,scope:null,scoped:_e,seamless:_e,selected:_e,shadowRootClonable:_e,shadowRootDelegatesFocus:_e,shadowRootMode:null,shape:null,size:ce,sizes:null,slot:null,span:ce,spellCheck:Et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ce,step:null,style:null,tabIndex:ce,target:null,title:null,translate:null,type:null,typeMustMatch:_e,useMap:null,value:Et,width:ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:ce,borderColor:null,bottomMargin:ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_e,declare:_e,event:null,face:null,frame:null,frameBorder:null,hSpace:ce,leftMargin:ce,link:null,longDesc:null,lowSrc:null,marginHeight:ce,marginWidth:ce,noResize:_e,noHref:_e,noShade:_e,noWrap:_e,object:null,profile:null,prompt:null,rev:null,rightMargin:ce,rules:null,scheme:null,scrolling:Et,standby:null,summary:null,text:null,topMargin:ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_e,disableRemotePlayback:_e,prefix:null,property:null,results:ce,security:null,unselectable:null},space:"html",transform:Zx}),ck=Sa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:fn,accentHeight:ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ce,amplitude:ce,arabicForm:null,ascent:ce,attributeName:null,attributeType:null,azimuth:ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ce,by:null,calcMode:null,capHeight:ce,className:ut,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ce,diffuseConstant:ce,direction:null,display:null,dur:null,divisor:ce,dominantBaseline:null,download:_e,dx:null,dy:null,edgeMode:null,editable:null,elevation:ce,enableBackground:null,end:null,event:null,exponent:ce,externalResourcesRequired:null,fill:null,fillOpacity:ce,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fa,g2:fa,glyphName:fa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ce,horizOriginX:ce,horizOriginY:ce,id:null,ideographic:ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ce,k:ce,k1:ce,k2:ce,k3:ce,k4:ce,kernelMatrix:fn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ce,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ce,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ce,overlineThickness:ce,paintOrder:null,panose1:null,path:null,pathLength:ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ce,pointsAtY:ce,pointsAtZ:ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fn,rev:fn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fn,requiredFeatures:fn,requiredFonts:fn,requiredFormats:fn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ce,specularExponent:ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ce,strikethroughThickness:ce,string:null,stroke:null,strokeDashArray:fn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ce,strokeOpacity:ce,strokeWidth:null,style:null,surfaceScale:ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fn,tabIndex:ce,tableValues:null,target:null,targetX:ce,targetY:ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ce,underlineThickness:ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ce,values:null,vAlphabetic:ce,vMathematical:ce,vectorEffect:null,vHanging:ce,vIdeographic:ce,version:null,vertAdvY:ce,vertOriginX:ce,vertOriginY:ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Kx}),Jx=Sa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,r){return"xlink:"+r.slice(5).toLowerCase()}}),Wx=Sa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Zx}),e0=Sa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,r){return"xml:"+r.slice(3).toLowerCase()}}),fk={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},dk=/[A-Z]/g,vy=/-[a-z]/g,hk=/^data[-\w.:]+$/i;function mk(t,r){const l=Ff(r);let i=r,s=nn;if(l in t.normal)return t.property[t.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&hk.test(r)){if(r.charAt(4)==="-"){const u=r.slice(5).replace(vy,gk);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=r.slice(4);if(!vy.test(u)){let c=u.replace(dk,pk);c.charAt(0)!=="-"&&(c="-"+c),r="data"+c}}s=wd}return new s(i,r)}function pk(t){return"-"+t.toLowerCase()}function gk(t){return t.charAt(1).toUpperCase()}const yk=Xx([Qx,uk,Jx,Wx,e0],"html"),kd=Xx([Qx,ck,Jx,Wx,e0],"svg");function xk(t){return t.join(" ").trim()}var la={},cf,Sy;function bk(){if(Sy)return cf;Sy=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,l=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,p=`
|
|
518
|
+
`,m="/",x="*",y="",b="comment",v="declaration";function C(A,E){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];E=E||{};var M=1,O=1;function $(ue){var ne=ue.match(r);ne&&(M+=ne.length);var R=ue.lastIndexOf(p);O=~R?ue.length-R:O+ue.length}function P(){var ue={line:M,column:O};return function(ne){return ne.position=new L(ue),oe(),ne}}function L(ue){this.start=ue,this.end={line:M,column:O},this.source=E.source}L.prototype.content=A;function Y(ue){var ne=new Error(E.source+":"+M+":"+O+": "+ue);if(ne.reason=ue,ne.filename=E.source,ne.line=M,ne.column=O,ne.source=A,!E.silent)throw ne}function le(ue){var ne=ue.exec(A);if(ne){var R=ne[0];return $(R),A=A.slice(R.length),ne}}function oe(){le(l)}function H(ue){var ne;for(ue=ue||[];ne=X();)ne!==!1&&ue.push(ne);return ue}function X(){var ue=P();if(!(m!=A.charAt(0)||x!=A.charAt(1))){for(var ne=2;y!=A.charAt(ne)&&(x!=A.charAt(ne)||m!=A.charAt(ne+1));)++ne;if(ne+=2,y===A.charAt(ne-1))return Y("End of comment missing");var R=A.slice(2,ne-2);return O+=2,$(R),A=A.slice(ne),O+=2,ue({type:b,comment:R})}}function G(){var ue=P(),ne=le(i);if(ne){if(X(),!le(s))return Y("property missing ':'");var R=le(u),J=ue({type:v,property:N(ne[0].replace(t,y)),value:R?N(R[0].replace(t,y)):y});return le(c),J}}function fe(){var ue=[];H(ue);for(var ne;ne=G();)ne!==!1&&(ue.push(ne),H(ue));return ue}return oe(),fe()}function N(A){return A?A.replace(f,y):y}return cf=C,cf}var wy;function vk(){if(wy)return la;wy=1;var t=la&&la.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(la,"__esModule",{value:!0}),la.default=l;const r=t(bk());function l(i,s){let u=null;if(!i||typeof i!="string")return u;const c=(0,r.default)(i),f=typeof s=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:x}=p;f?s(m,x,p):x&&(u=u||{},u[m]=x)}),u}return la}var xi={},ky;function Sk(){if(ky)return xi;ky=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,l=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(m){return!m||l.test(m)||t.test(m)},c=function(m,x){return x.toUpperCase()},f=function(m,x){return"".concat(x,"-")},p=function(m,x){return x===void 0&&(x={}),u(m)?m:(m=m.toLowerCase(),x.reactCompat?m=m.replace(s,f):m=m.replace(i,f),m.replace(r,c))};return xi.camelCase=p,xi}var bi,Cy;function wk(){if(Cy)return bi;Cy=1;var t=bi&&bi.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=t(vk()),l=Sk();function i(s,u){var c={};return!s||typeof s!="string"||(0,r.default)(s,function(f,p){f&&p&&(c[(0,l.camelCase)(f,u)]=p)}),c}return i.default=i,bi=i,bi}var kk=wk();const Ck=Ri(kk),t0=n0("end"),Cd=n0("start");function n0(t){return r;function r(l){const i=l&&l.position&&l.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function Nk(t){const r=Cd(t),l=t0(t);if(r&&l)return{start:r,end:l}}function Ci(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Ny(t.position):"start"in t||"end"in t?Ny(t):"line"in t||"column"in t?Pf(t):""}function Pf(t){return jy(t&&t.line)+":"+jy(t&&t.column)}function Ny(t){return Pf(t&&t.start)+"-"+Pf(t&&t.end)}function jy(t){return t&&typeof t=="number"?t:1}class Ft extends Error{constructor(r,l,i){super(),typeof l=="string"&&(i=l,l=void 0);let s="",u={},c=!1;if(l&&("line"in l&&"column"in l?u={place:l}:"start"in l&&"end"in l?u={place:l}:"type"in l?u={ancestors:[l],place:l.position}:u={...l}),typeof r=="string"?s=r:!u.cause&&r&&(c=!0,s=r.message,u.cause=r),!u.ruleId&&!u.source&&typeof i=="string"){const p=i.indexOf(":");p===-1?u.ruleId=i:(u.source=i.slice(0,p),u.ruleId=i.slice(p+1))}if(!u.place&&u.ancestors&&u.ancestors){const p=u.ancestors[u.ancestors.length-1];p&&(u.place=p.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=Ci(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ft.prototype.file="";Ft.prototype.name="";Ft.prototype.reason="";Ft.prototype.message="";Ft.prototype.stack="";Ft.prototype.column=void 0;Ft.prototype.line=void 0;Ft.prototype.ancestors=void 0;Ft.prototype.cause=void 0;Ft.prototype.fatal=void 0;Ft.prototype.place=void 0;Ft.prototype.ruleId=void 0;Ft.prototype.source=void 0;const Nd={}.hasOwnProperty,jk=new Map,Ek=/[A-Z]/g,Tk=new Set(["table","tbody","thead","tfoot","tr"]),Ak=new Set(["td","th"]),r0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Mk(t,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=r.filePath||void 0;let i;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Bk(l,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Uk(l,r.jsx,r.jsxs)}const s={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:i,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?kd:yk,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},u=l0(s,t,void 0);return u&&typeof u!="string"?u:s.create(t,s.Fragment,{children:u||void 0},void 0)}function l0(t,r,l){if(r.type==="element")return Dk(t,r,l);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return Rk(t,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return Ok(t,r,l);if(r.type==="mdxjsEsm")return zk(t,r);if(r.type==="root")return _k(t,r,l);if(r.type==="text")return Lk(t,r)}function Dk(t,r,l){const i=t.schema;let s=i;r.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=kd,t.schema=s),t.ancestors.push(r);const u=i0(t,r.tagName,!1),c=Hk(t,r);let f=Ed(t,r);return Tk.has(r.tagName)&&(f=f.filter(function(p){return typeof p=="string"?!ok(p):!0})),a0(t,c,u,r),jd(c,f),t.ancestors.pop(),t.schema=i,t.create(r,u,c,l)}function Rk(t,r){if(r.data&&r.data.estree&&t.evaluater){const i=r.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}Mi(t,r.position)}function zk(t,r){if(r.data&&r.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(r.data.estree);Mi(t,r.position)}function Ok(t,r,l){const i=t.schema;let s=i;r.name==="svg"&&i.space==="html"&&(s=kd,t.schema=s),t.ancestors.push(r);const u=r.name===null?t.Fragment:i0(t,r.name,!0),c=qk(t,r),f=Ed(t,r);return a0(t,c,u,r),jd(c,f),t.ancestors.pop(),t.schema=i,t.create(r,u,c,l)}function _k(t,r,l){const i={};return jd(i,Ed(t,r)),t.create(r,t.Fragment,i,l)}function Lk(t,r){return r.value}function a0(t,r,l,i){typeof l!="string"&&l!==t.Fragment&&t.passNode&&(r.node=i)}function jd(t,r){if(r.length>0){const l=r.length>1?r:r[0];l&&(t.children=l)}}function Uk(t,r,l){return i;function i(s,u,c,f){const m=Array.isArray(c.children)?l:r;return f?m(u,c,f):m(u,c)}}function Bk(t,r){return l;function l(i,s,u,c){const f=Array.isArray(u.children),p=Cd(i);return r(s,u,c,f,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function Hk(t,r){const l={};let i,s;for(s in r.properties)if(s!=="children"&&Nd.call(r.properties,s)){const u=Ik(t,s,r.properties[s]);if(u){const[c,f]=u;t.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&Ak.has(r.tagName)?i=f:l[c]=f}}if(i){const u=l.style||(l.style={});u[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return l}function qk(t,r){const l={};for(const i of r.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const u=i.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(l,t.evaluater.evaluateExpression(f.argument))}else Mi(t,r.position);else{const s=i.name;let u;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const f=i.value.data.estree.body[0];f.type,u=t.evaluater.evaluateExpression(f.expression)}else Mi(t,r.position);else u=i.value===null?!0:i.value;l[s]=u}return l}function Ed(t,r){const l=[];let i=-1;const s=t.passKeys?new Map:jk;for(;++i<r.children.length;){const u=r.children[i];let c;if(t.passKeys){const p=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(p){const m=s.get(p)||0;c=p+"-"+m,s.set(p,m+1)}}const f=l0(t,u,c);f!==void 0&&l.push(f)}return l}function Ik(t,r,l){const i=mk(t.schema,r);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=i.commaSeparated?nk(l):xk(l)),i.property==="style"){let s=typeof l=="object"?l:Vk(t,String(l));return t.stylePropertyNameCase==="css"&&(s=$k(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&i.space?fk[i.property]||i.property:i.attribute,l]}}function Vk(t,r){try{return Ck(r,{reactCompat:!0})}catch(l){if(t.ignoreInvalidStyle)return{};const i=l,s=new Ft("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=r0+"#cannot-parse-style-attribute",s}}function i0(t,r,l){let i;if(!l)i={type:"Literal",value:r};else if(r.includes(".")){const s=r.split(".");let u=-1,c;for(;++u<s.length;){const f=yy(s[u])?{type:"Identifier",name:s[u]}:{type:"Literal",value:s[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}i=c}else i=yy(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(i.type==="Literal"){const s=i.value;return Nd.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(i);Mi(t)}function Mi(t,r){const l=new Ft("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=t.filePath||void 0,l.url=r0+"#cannot-handle-mdx-estrees-without-createevaluater",l}function $k(t){const r={};let l;for(l in t)Nd.call(t,l)&&(r[Fk(l)]=t[l]);return r}function Fk(t){let r=t.replace(Ek,Yk);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function Yk(t){return"-"+t.toLowerCase()}const ff={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Gk={};function Td(t,r){const l=Gk,i=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,s=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return o0(t,i,s)}function o0(t,r,l){if(Pk(t)){if("value"in t)return t.type==="html"&&!l?"":t.value;if(r&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Ey(t.children,r,l)}return Array.isArray(t)?Ey(t,r,l):""}function Ey(t,r,l){const i=[];let s=-1;for(;++s<t.length;)i[s]=o0(t[s],r,l);return i.join("")}function Pk(t){return!!(t&&typeof t=="object")}const Ty=document.createElement("i");function Ad(t){const r="&"+t+";";Ty.innerHTML=r;const l=Ty.textContent;return l.charCodeAt(l.length-1)===59&&t!=="semi"||l===r?!1:l}function mn(t,r,l,i){const s=t.length;let u=0,c;if(r<0?r=-r>s?0:s+r:r=r>s?s:r,l=l>0?l:0,i.length<1e4)c=Array.from(i),c.unshift(r,l),t.splice(...c);else for(l&&t.splice(r,l);u<i.length;)c=i.slice(u,u+1e4),c.unshift(r,0),t.splice(...c),u+=1e4,r+=1e4}function jn(t,r){return t.length>0?(mn(t,t.length,0,r),t):r}const Ay={}.hasOwnProperty;function s0(t){const r={};let l=-1;for(;++l<t.length;)Xk(r,t[l]);return r}function Xk(t,r){let l;for(l in r){const s=(Ay.call(t,l)?t[l]:void 0)||(t[l]={}),u=r[l];let c;if(u)for(c in u){Ay.call(s,c)||(s[c]=[]);const f=u[c];Qk(s[c],Array.isArray(f)?f:f?[f]:[])}}}function Qk(t,r){let l=-1;const i=[];for(;++l<r.length;)(r[l].add==="after"?t:i).push(r[l]);mn(t,0,0,i)}function u0(t,r){const l=Number.parseInt(t,r);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function zn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Pt=Yr(/[A-Za-z]/),Vt=Yr(/[\dA-Za-z]/),Kk=Yr(/[#-'*+\--9=?A-Z^-~]/);function xs(t){return t!==null&&(t<32||t===127)}const Xf=Yr(/\d/),Zk=Yr(/[\dA-Fa-f]/),Jk=Yr(/[!-/:-@[-`{-~]/);function je(t){return t!==null&&t<-2}function ot(t){return t!==null&&(t<0||t===32)}function qe(t){return t===-2||t===-1||t===32}const As=Yr(new RegExp("\\p{P}|\\p{S}","u")),gl=Yr(/\s/);function Yr(t){return r;function r(l){return l!==null&&l>-1&&t.test(String.fromCharCode(l))}}function wa(t){const r=[];let l=-1,i=0,s=0;for(;++l<t.length;){const u=t.charCodeAt(l);let c="";if(u===37&&Vt(t.charCodeAt(l+1))&&Vt(t.charCodeAt(l+2)))s=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=t.charCodeAt(l+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),s=1):c="�"}else c=String.fromCharCode(u);c&&(r.push(t.slice(i,l),encodeURIComponent(c)),i=l+s+1,c=""),s&&(l+=s,s=0)}return r.join("")+t.slice(i)}function Xe(t,r,l,i){const s=i?i-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(p){return qe(p)?(t.enter(l),f(p)):r(p)}function f(p){return qe(p)&&u++<s?(t.consume(p),f):(t.exit(l),r(p))}}const Wk={tokenize:eC};function eC(t){const r=t.attempt(this.parser.constructs.contentInitial,i,s);let l;return r;function i(f){if(f===null){t.consume(f);return}return t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),Xe(t,r,"linePrefix")}function s(f){return t.enter("paragraph"),u(f)}function u(f){const p=t.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=p),l=p,c(f)}function c(f){if(f===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(f);return}return je(f)?(t.consume(f),t.exit("chunkText"),u):(t.consume(f),c)}}const tC={tokenize:nC},My={tokenize:rC};function nC(t){const r=this,l=[];let i=0,s,u,c;return f;function f(O){if(i<l.length){const $=l[i];return r.containerState=$[1],t.attempt($[0].continuation,p,m)(O)}return m(O)}function p(O){if(i++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,s&&M();const $=r.events.length;let P=$,L;for(;P--;)if(r.events[P][0]==="exit"&&r.events[P][1].type==="chunkFlow"){L=r.events[P][1].end;break}E(i);let Y=$;for(;Y<r.events.length;)r.events[Y][1].end={...L},Y++;return mn(r.events,P+1,0,r.events.slice($)),r.events.length=Y,m(O)}return f(O)}function m(O){if(i===l.length){if(!s)return b(O);if(s.currentConstruct&&s.currentConstruct.concrete)return C(O);r.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return r.containerState={},t.check(My,x,y)(O)}function x(O){return s&&M(),E(i),b(O)}function y(O){return r.parser.lazy[r.now().line]=i!==l.length,c=r.now().offset,C(O)}function b(O){return r.containerState={},t.attempt(My,v,C)(O)}function v(O){return i++,l.push([r.currentConstruct,r.containerState]),b(O)}function C(O){if(O===null){s&&M(),E(0),t.consume(O);return}return s=s||r.parser.flow(r.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),N(O)}function N(O){if(O===null){A(t.exit("chunkFlow"),!0),E(0),t.consume(O);return}return je(O)?(t.consume(O),A(t.exit("chunkFlow")),i=0,r.interrupt=void 0,f):(t.consume(O),N)}function A(O,$){const P=r.sliceStream(O);if($&&P.push(null),O.previous=u,u&&(u.next=O),u=O,s.defineSkip(O.start),s.write(P),r.parser.lazy[O.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<c&&(!s.events[L][1].end||s.events[L][1].end.offset>c))return;const Y=r.events.length;let le=Y,oe,H;for(;le--;)if(r.events[le][0]==="exit"&&r.events[le][1].type==="chunkFlow"){if(oe){H=r.events[le][1].end;break}oe=!0}for(E(i),L=Y;L<r.events.length;)r.events[L][1].end={...H},L++;mn(r.events,le+1,0,r.events.slice(Y)),r.events.length=L}}function E(O){let $=l.length;for(;$-- >O;){const P=l[$];r.containerState=P[1],P[0].exit.call(r,t)}l.length=O}function M(){s.write([null]),u=void 0,s=void 0,r.containerState._closeFlow=void 0}}function rC(t,r,l){return Xe(t,t.attempt(this.parser.constructs.document,r,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ga(t){if(t===null||ot(t)||gl(t))return 1;if(As(t))return 2}function Ms(t,r,l){const i=[];let s=-1;for(;++s<t.length;){const u=t[s].resolveAll;u&&!i.includes(u)&&(r=u(r,l),i.push(u))}return r}const Qf={name:"attention",resolveAll:lC,tokenize:aC};function lC(t,r){let l=-1,i,s,u,c,f,p,m,x;for(;++l<t.length;)if(t[l][0]==="enter"&&t[l][1].type==="attentionSequence"&&t[l][1]._close){for(i=l;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&r.sliceSerialize(t[i][1]).charCodeAt(0)===r.sliceSerialize(t[l][1]).charCodeAt(0)){if((t[i][1]._close||t[l][1]._open)&&(t[l][1].end.offset-t[l][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[l][1].end.offset-t[l][1].start.offset)%3))continue;p=t[i][1].end.offset-t[i][1].start.offset>1&&t[l][1].end.offset-t[l][1].start.offset>1?2:1;const y={...t[i][1].end},b={...t[l][1].start};Dy(y,-p),Dy(b,p),c={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...t[i][1].end}},f={type:p>1?"strongSequence":"emphasisSequence",start:{...t[l][1].start},end:b},u={type:p>1?"strongText":"emphasisText",start:{...t[i][1].end},end:{...t[l][1].start}},s={type:p>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},t[i][1].end={...c.start},t[l][1].start={...f.end},m=[],t[i][1].end.offset-t[i][1].start.offset&&(m=jn(m,[["enter",t[i][1],r],["exit",t[i][1],r]])),m=jn(m,[["enter",s,r],["enter",c,r],["exit",c,r],["enter",u,r]]),m=jn(m,Ms(r.parser.constructs.insideSpan.null,t.slice(i+1,l),r)),m=jn(m,[["exit",u,r],["enter",f,r],["exit",f,r],["exit",s,r]]),t[l][1].end.offset-t[l][1].start.offset?(x=2,m=jn(m,[["enter",t[l][1],r],["exit",t[l][1],r]])):x=0,mn(t,i-1,l-i+3,m),l=i+m.length-x-2;break}}for(l=-1;++l<t.length;)t[l][1].type==="attentionSequence"&&(t[l][1].type="data");return t}function aC(t,r){const l=this.parser.constructs.attentionMarkers.null,i=this.previous,s=ga(i);let u;return c;function c(p){return u=p,t.enter("attentionSequence"),f(p)}function f(p){if(p===u)return t.consume(p),f;const m=t.exit("attentionSequence"),x=ga(p),y=!x||x===2&&s||l.includes(p),b=!s||s===2&&x||l.includes(i);return m._open=!!(u===42?y:y&&(s||!b)),m._close=!!(u===42?b:b&&(x||!y)),r(p)}}function Dy(t,r){t.column+=r,t.offset+=r,t._bufferIndex+=r}const iC={name:"autolink",tokenize:oC};function oC(t,r,l){let i=0;return s;function s(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),u}function u(v){return Pt(v)?(t.consume(v),c):v===64?l(v):m(v)}function c(v){return v===43||v===45||v===46||Vt(v)?(i=1,f(v)):m(v)}function f(v){return v===58?(t.consume(v),i=0,p):(v===43||v===45||v===46||Vt(v))&&i++<32?(t.consume(v),f):(i=0,m(v))}function p(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),r):v===null||v===32||v===60||xs(v)?l(v):(t.consume(v),p)}function m(v){return v===64?(t.consume(v),x):Kk(v)?(t.consume(v),m):l(v)}function x(v){return Vt(v)?y(v):l(v)}function y(v){return v===46?(t.consume(v),i=0,x):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),r):b(v)}function b(v){if((v===45||Vt(v))&&i++<63){const C=v===45?b:y;return t.consume(v),C}return l(v)}}const _i={partial:!0,tokenize:sC};function sC(t,r,l){return i;function i(u){return qe(u)?Xe(t,s,"linePrefix")(u):s(u)}function s(u){return u===null||je(u)?r(u):l(u)}}const c0={continuation:{tokenize:cC},exit:fC,name:"blockQuote",tokenize:uC};function uC(t,r,l){const i=this;return s;function s(c){if(c===62){const f=i.containerState;return f.open||(t.enter("blockQuote",{_container:!0}),f.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),u}return l(c)}function u(c){return qe(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),r):(t.exit("blockQuotePrefix"),r(c))}}function cC(t,r,l){const i=this;return s;function s(c){return qe(c)?Xe(t,u,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return t.attempt(c0,r,l)(c)}}function fC(t){t.exit("blockQuote")}const f0={name:"characterEscape",tokenize:dC};function dC(t,r,l){return i;function i(u){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(u),t.exit("escapeMarker"),s}function s(u){return Jk(u)?(t.enter("characterEscapeValue"),t.consume(u),t.exit("characterEscapeValue"),t.exit("characterEscape"),r):l(u)}}const d0={name:"characterReference",tokenize:hC};function hC(t,r,l){const i=this;let s=0,u,c;return f;function f(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),p}function p(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),u=31,c=Vt,x(y))}function m(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),u=6,c=Zk,x):(t.enter("characterReferenceValue"),u=7,c=Xf,x(y))}function x(y){if(y===59&&s){const b=t.exit("characterReferenceValue");return c===Vt&&!Ad(i.sliceSerialize(b))?l(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),r)}return c(y)&&s++<u?(t.consume(y),x):l(y)}}const Ry={partial:!0,tokenize:pC},zy={concrete:!0,name:"codeFenced",tokenize:mC};function mC(t,r,l){const i=this,s={partial:!0,tokenize:P};let u=0,c=0,f;return p;function p(L){return m(L)}function m(L){const Y=i.events[i.events.length-1];return u=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,f=L,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),x(L)}function x(L){return L===f?(c++,t.consume(L),x):c<3?l(L):(t.exit("codeFencedFenceSequence"),qe(L)?Xe(t,y,"whitespace")(L):y(L))}function y(L){return L===null||je(L)?(t.exit("codeFencedFence"),i.interrupt?r(L):t.check(Ry,N,$)(L)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),b(L))}function b(L){return L===null||je(L)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(L)):qe(L)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Xe(t,v,"whitespace")(L)):L===96&&L===f?l(L):(t.consume(L),b)}function v(L){return L===null||je(L)?y(L):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),C(L))}function C(L){return L===null||je(L)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(L)):L===96&&L===f?l(L):(t.consume(L),C)}function N(L){return t.attempt(s,$,A)(L)}function A(L){return t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),E}function E(L){return u>0&&qe(L)?Xe(t,M,"linePrefix",u+1)(L):M(L)}function M(L){return L===null||je(L)?t.check(Ry,N,$)(L):(t.enter("codeFlowValue"),O(L))}function O(L){return L===null||je(L)?(t.exit("codeFlowValue"),M(L)):(t.consume(L),O)}function $(L){return t.exit("codeFenced"),r(L)}function P(L,Y,le){let oe=0;return H;function H(ne){return L.enter("lineEnding"),L.consume(ne),L.exit("lineEnding"),X}function X(ne){return L.enter("codeFencedFence"),qe(ne)?Xe(L,G,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):G(ne)}function G(ne){return ne===f?(L.enter("codeFencedFenceSequence"),fe(ne)):le(ne)}function fe(ne){return ne===f?(oe++,L.consume(ne),fe):oe>=c?(L.exit("codeFencedFenceSequence"),qe(ne)?Xe(L,ue,"whitespace")(ne):ue(ne)):le(ne)}function ue(ne){return ne===null||je(ne)?(L.exit("codeFencedFence"),Y(ne)):le(ne)}}}function pC(t,r,l){const i=this;return s;function s(c){return c===null?l(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u)}function u(c){return i.parser.lazy[i.now().line]?l(c):r(c)}}const df={name:"codeIndented",tokenize:yC},gC={partial:!0,tokenize:xC};function yC(t,r,l){const i=this;return s;function s(m){return t.enter("codeIndented"),Xe(t,u,"linePrefix",5)(m)}function u(m){const x=i.events[i.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?c(m):l(m)}function c(m){return m===null?p(m):je(m)?t.attempt(gC,c,p)(m):(t.enter("codeFlowValue"),f(m))}function f(m){return m===null||je(m)?(t.exit("codeFlowValue"),c(m)):(t.consume(m),f)}function p(m){return t.exit("codeIndented"),r(m)}}function xC(t,r,l){const i=this;return s;function s(c){return i.parser.lazy[i.now().line]?l(c):je(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):Xe(t,u,"linePrefix",5)(c)}function u(c){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):je(c)?s(c):l(c)}}const bC={name:"codeText",previous:SC,resolve:vC,tokenize:wC};function vC(t){let r=t.length-4,l=3,i,s;if((t[l][1].type==="lineEnding"||t[l][1].type==="space")&&(t[r][1].type==="lineEnding"||t[r][1].type==="space")){for(i=l;++i<r;)if(t[i][1].type==="codeTextData"){t[l][1].type="codeTextPadding",t[r][1].type="codeTextPadding",l+=2,r-=2;break}}for(i=l-1,r++;++i<=r;)s===void 0?i!==r&&t[i][1].type!=="lineEnding"&&(s=i):(i===r||t[i][1].type==="lineEnding")&&(t[s][1].type="codeTextData",i!==s+2&&(t[s][1].end=t[i-1][1].end,t.splice(s+2,i-s-2),r-=i-s-2,i=s+2),s=void 0);return t}function SC(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function wC(t,r,l){let i=0,s,u;return c;function c(y){return t.enter("codeText"),t.enter("codeTextSequence"),f(y)}function f(y){return y===96?(t.consume(y),i++,f):(t.exit("codeTextSequence"),p(y))}function p(y){return y===null?l(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),p):y===96?(u=t.enter("codeTextSequence"),s=0,x(y)):je(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||je(y)?(t.exit("codeTextData"),p(y)):(t.consume(y),m)}function x(y){return y===96?(t.consume(y),s++,x):s===i?(t.exit("codeTextSequence"),t.exit("codeText"),r(y)):(u.type="codeTextData",m(y))}}class kC{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,l){const i=l??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(r,i):r>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(r,l,i){const s=l||0;this.setCursor(Math.trunc(r));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&vi(this.left,i),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),vi(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),vi(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const l=this.left.splice(r,Number.POSITIVE_INFINITY);vi(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);vi(this.left,l.reverse())}}}function vi(t,r){let l=0;if(r.length<1e4)t.push(...r);else for(;l<r.length;)t.push(...r.slice(l,l+1e4)),l+=1e4}function h0(t){const r={};let l=-1,i,s,u,c,f,p,m;const x=new kC(t);for(;++l<x.length;){for(;l in r;)l=r[l];if(i=x.get(l),l&&i[1].type==="chunkFlow"&&x.get(l-1)[1].type==="listItemPrefix"&&(p=i[1]._tokenizer.events,u=0,u<p.length&&p[u][1].type==="lineEndingBlank"&&(u+=2),u<p.length&&p[u][1].type==="content"))for(;++u<p.length&&p[u][1].type!=="content";)p[u][1].type==="chunkText"&&(p[u][1]._isInFirstContentOfListItem=!0,u++);if(i[0]==="enter")i[1].contentType&&(Object.assign(r,CC(x,l)),l=r[l],m=!0);else if(i[1]._container){for(u=l,s=void 0;u--;)if(c=x.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(x.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(i[1].end={...x.get(s)[1].start},f=x.slice(s,l),f.unshift(i),x.splice(s,l-s+1,f))}}return mn(t,0,Number.POSITIVE_INFINITY,x.slice(0)),!m}function CC(t,r){const l=t.get(r)[1],i=t.get(r)[2];let s=r-1;const u=[];let c=l._tokenizer;c||(c=i.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,p=[],m={};let x,y,b=-1,v=l,C=0,N=0;const A=[N];for(;v;){for(;t.get(++s)[1]!==v;);u.push(s),v._tokenizer||(x=i.sliceStream(v),v.next||x.push(null),y&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(x),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=l;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(N=b+1,A.push(N),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):A.pop(),b=A.length;b--;){const E=f.slice(A[b],A[b+1]),M=u.pop();p.push([M,M+E.length-1]),t.splice(M,2,E)}for(p.reverse(),b=-1;++b<p.length;)m[C+p[b][0]]=C+p[b][1],C+=p[b][1]-p[b][0]-1;return m}const NC={resolve:EC,tokenize:TC},jC={partial:!0,tokenize:AC};function EC(t){return h0(t),t}function TC(t,r){let l;return i;function i(f){return t.enter("content"),l=t.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?u(f):je(f)?t.check(jC,c,u)(f):(t.consume(f),s)}function u(f){return t.exit("chunkContent"),t.exit("content"),r(f)}function c(f){return t.consume(f),t.exit("chunkContent"),l.next=t.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,s}}function AC(t,r,l){const i=this;return s;function s(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Xe(t,u,"linePrefix")}function u(c){if(c===null||je(c))return l(c);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):t.interrupt(i.parser.constructs.flow,l,r)(c)}}function m0(t,r,l,i,s,u,c,f,p){const m=p||Number.POSITIVE_INFINITY;let x=0;return y;function y(E){return E===60?(t.enter(i),t.enter(s),t.enter(u),t.consume(E),t.exit(u),b):E===null||E===32||E===41||xs(E)?l(E):(t.enter(i),t.enter(c),t.enter(f),t.enter("chunkString",{contentType:"string"}),N(E))}function b(E){return E===62?(t.enter(u),t.consume(E),t.exit(u),t.exit(s),t.exit(i),r):(t.enter(f),t.enter("chunkString",{contentType:"string"}),v(E))}function v(E){return E===62?(t.exit("chunkString"),t.exit(f),b(E)):E===null||E===60||je(E)?l(E):(t.consume(E),E===92?C:v)}function C(E){return E===60||E===62||E===92?(t.consume(E),v):v(E)}function N(E){return!x&&(E===null||E===41||ot(E))?(t.exit("chunkString"),t.exit(f),t.exit(c),t.exit(i),r(E)):x<m&&E===40?(t.consume(E),x++,N):E===41?(t.consume(E),x--,N):E===null||E===32||E===40||xs(E)?l(E):(t.consume(E),E===92?A:N)}function A(E){return E===40||E===41||E===92?(t.consume(E),N):N(E)}}function p0(t,r,l,i,s,u){const c=this;let f=0,p;return m;function m(v){return t.enter(i),t.enter(s),t.consume(v),t.exit(s),t.enter(u),x}function x(v){return f>999||v===null||v===91||v===93&&!p||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?l(v):v===93?(t.exit(u),t.enter(s),t.consume(v),t.exit(s),t.exit(i),r):je(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),x):(t.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||je(v)||f++>999?(t.exit("chunkString"),x(v)):(t.consume(v),p||(p=!qe(v)),v===92?b:y)}function b(v){return v===91||v===92||v===93?(t.consume(v),f++,y):y(v)}}function g0(t,r,l,i,s,u){let c;return f;function f(b){return b===34||b===39||b===40?(t.enter(i),t.enter(s),t.consume(b),t.exit(s),c=b===40?41:b,p):l(b)}function p(b){return b===c?(t.enter(s),t.consume(b),t.exit(s),t.exit(i),r):(t.enter(u),m(b))}function m(b){return b===c?(t.exit(u),p(c)):b===null?l(b):je(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),Xe(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===c||b===null||je(b)?(t.exit("chunkString"),m(b)):(t.consume(b),b===92?y:x)}function y(b){return b===c||b===92?(t.consume(b),x):x(b)}}function Ni(t,r){let l;return i;function i(s){return je(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),l=!0,i):qe(s)?Xe(t,i,l?"linePrefix":"lineSuffix")(s):r(s)}}const MC={name:"definition",tokenize:RC},DC={partial:!0,tokenize:zC};function RC(t,r,l){const i=this;let s;return u;function u(v){return t.enter("definition"),c(v)}function c(v){return p0.call(i,t,f,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return s=zn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),p):l(v)}function p(v){return ot(v)?Ni(t,m)(v):m(v)}function m(v){return m0(t,x,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function x(v){return t.attempt(DC,y,y)(v)}function y(v){return qe(v)?Xe(t,b,"whitespace")(v):b(v)}function b(v){return v===null||je(v)?(t.exit("definition"),i.parser.defined.push(s),r(v)):l(v)}}function zC(t,r,l){return i;function i(f){return ot(f)?Ni(t,s)(f):l(f)}function s(f){return g0(t,u,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return qe(f)?Xe(t,c,"whitespace")(f):c(f)}function c(f){return f===null||je(f)?r(f):l(f)}}const OC={name:"hardBreakEscape",tokenize:_C};function _C(t,r,l){return i;function i(u){return t.enter("hardBreakEscape"),t.consume(u),s}function s(u){return je(u)?(t.exit("hardBreakEscape"),r(u)):l(u)}}const LC={name:"headingAtx",resolve:UC,tokenize:BC};function UC(t,r){let l=t.length-2,i=3,s,u;return t[i][1].type==="whitespace"&&(i+=2),l-2>i&&t[l][1].type==="whitespace"&&(l-=2),t[l][1].type==="atxHeadingSequence"&&(i===l-1||l-4>i&&t[l-2][1].type==="whitespace")&&(l-=i+1===l?2:4),l>i&&(s={type:"atxHeadingText",start:t[i][1].start,end:t[l][1].end},u={type:"chunkText",start:t[i][1].start,end:t[l][1].end,contentType:"text"},mn(t,i,l-i+1,[["enter",s,r],["enter",u,r],["exit",u,r],["exit",s,r]])),t}function BC(t,r,l){let i=0;return s;function s(x){return t.enter("atxHeading"),u(x)}function u(x){return t.enter("atxHeadingSequence"),c(x)}function c(x){return x===35&&i++<6?(t.consume(x),c):x===null||ot(x)?(t.exit("atxHeadingSequence"),f(x)):l(x)}function f(x){return x===35?(t.enter("atxHeadingSequence"),p(x)):x===null||je(x)?(t.exit("atxHeading"),r(x)):qe(x)?Xe(t,f,"whitespace")(x):(t.enter("atxHeadingText"),m(x))}function p(x){return x===35?(t.consume(x),p):(t.exit("atxHeadingSequence"),f(x))}function m(x){return x===null||x===35||ot(x)?(t.exit("atxHeadingText"),f(x)):(t.consume(x),m)}}const HC=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Oy=["pre","script","style","textarea"],qC={concrete:!0,name:"htmlFlow",resolveTo:$C,tokenize:FC},IC={partial:!0,tokenize:GC},VC={partial:!0,tokenize:YC};function $C(t){let r=t.length;for(;r--&&!(t[r][0]==="enter"&&t[r][1].type==="htmlFlow"););return r>1&&t[r-2][1].type==="linePrefix"&&(t[r][1].start=t[r-2][1].start,t[r+1][1].start=t[r-2][1].start,t.splice(r-2,2)),t}function FC(t,r,l){const i=this;let s,u,c,f,p;return m;function m(j){return x(j)}function x(j){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(j),y}function y(j){return j===33?(t.consume(j),b):j===47?(t.consume(j),u=!0,N):j===63?(t.consume(j),s=3,i.interrupt?r:D):Pt(j)?(t.consume(j),c=String.fromCharCode(j),A):l(j)}function b(j){return j===45?(t.consume(j),s=2,v):j===91?(t.consume(j),s=5,f=0,C):Pt(j)?(t.consume(j),s=4,i.interrupt?r:D):l(j)}function v(j){return j===45?(t.consume(j),i.interrupt?r:D):l(j)}function C(j){const _="CDATA[";return j===_.charCodeAt(f++)?(t.consume(j),f===_.length?i.interrupt?r:G:C):l(j)}function N(j){return Pt(j)?(t.consume(j),c=String.fromCharCode(j),A):l(j)}function A(j){if(j===null||j===47||j===62||ot(j)){const _=j===47,ee=c.toLowerCase();return!_&&!u&&Oy.includes(ee)?(s=1,i.interrupt?r(j):G(j)):HC.includes(c.toLowerCase())?(s=6,_?(t.consume(j),E):i.interrupt?r(j):G(j)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?l(j):u?M(j):O(j))}return j===45||Vt(j)?(t.consume(j),c+=String.fromCharCode(j),A):l(j)}function E(j){return j===62?(t.consume(j),i.interrupt?r:G):l(j)}function M(j){return qe(j)?(t.consume(j),M):H(j)}function O(j){return j===47?(t.consume(j),H):j===58||j===95||Pt(j)?(t.consume(j),$):qe(j)?(t.consume(j),O):H(j)}function $(j){return j===45||j===46||j===58||j===95||Vt(j)?(t.consume(j),$):P(j)}function P(j){return j===61?(t.consume(j),L):qe(j)?(t.consume(j),P):O(j)}function L(j){return j===null||j===60||j===61||j===62||j===96?l(j):j===34||j===39?(t.consume(j),p=j,Y):qe(j)?(t.consume(j),L):le(j)}function Y(j){return j===p?(t.consume(j),p=null,oe):j===null||je(j)?l(j):(t.consume(j),Y)}function le(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||ot(j)?P(j):(t.consume(j),le)}function oe(j){return j===47||j===62||qe(j)?O(j):l(j)}function H(j){return j===62?(t.consume(j),X):l(j)}function X(j){return j===null||je(j)?G(j):qe(j)?(t.consume(j),X):l(j)}function G(j){return j===45&&s===2?(t.consume(j),R):j===60&&s===1?(t.consume(j),J):j===62&&s===4?(t.consume(j),T):j===63&&s===3?(t.consume(j),D):j===93&&s===5?(t.consume(j),ge):je(j)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(IC,B,fe)(j)):j===null||je(j)?(t.exit("htmlFlowData"),fe(j)):(t.consume(j),G)}function fe(j){return t.check(VC,ue,B)(j)}function ue(j){return t.enter("lineEnding"),t.consume(j),t.exit("lineEnding"),ne}function ne(j){return j===null||je(j)?fe(j):(t.enter("htmlFlowData"),G(j))}function R(j){return j===45?(t.consume(j),D):G(j)}function J(j){return j===47?(t.consume(j),c="",ie):G(j)}function ie(j){if(j===62){const _=c.toLowerCase();return Oy.includes(_)?(t.consume(j),T):G(j)}return Pt(j)&&c.length<8?(t.consume(j),c+=String.fromCharCode(j),ie):G(j)}function ge(j){return j===93?(t.consume(j),D):G(j)}function D(j){return j===62?(t.consume(j),T):j===45&&s===2?(t.consume(j),D):G(j)}function T(j){return j===null||je(j)?(t.exit("htmlFlowData"),B(j)):(t.consume(j),T)}function B(j){return t.exit("htmlFlow"),r(j)}}function YC(t,r,l){const i=this;return s;function s(c){return je(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u):l(c)}function u(c){return i.parser.lazy[i.now().line]?l(c):r(c)}}function GC(t,r,l){return i;function i(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(_i,r,l)}}const PC={name:"htmlText",tokenize:XC};function XC(t,r,l){const i=this;let s,u,c;return f;function f(D){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(D),p}function p(D){return D===33?(t.consume(D),m):D===47?(t.consume(D),P):D===63?(t.consume(D),O):Pt(D)?(t.consume(D),le):l(D)}function m(D){return D===45?(t.consume(D),x):D===91?(t.consume(D),u=0,C):Pt(D)?(t.consume(D),M):l(D)}function x(D){return D===45?(t.consume(D),v):l(D)}function y(D){return D===null?l(D):D===45?(t.consume(D),b):je(D)?(c=y,J(D)):(t.consume(D),y)}function b(D){return D===45?(t.consume(D),v):y(D)}function v(D){return D===62?R(D):D===45?b(D):y(D)}function C(D){const T="CDATA[";return D===T.charCodeAt(u++)?(t.consume(D),u===T.length?N:C):l(D)}function N(D){return D===null?l(D):D===93?(t.consume(D),A):je(D)?(c=N,J(D)):(t.consume(D),N)}function A(D){return D===93?(t.consume(D),E):N(D)}function E(D){return D===62?R(D):D===93?(t.consume(D),E):N(D)}function M(D){return D===null||D===62?R(D):je(D)?(c=M,J(D)):(t.consume(D),M)}function O(D){return D===null?l(D):D===63?(t.consume(D),$):je(D)?(c=O,J(D)):(t.consume(D),O)}function $(D){return D===62?R(D):O(D)}function P(D){return Pt(D)?(t.consume(D),L):l(D)}function L(D){return D===45||Vt(D)?(t.consume(D),L):Y(D)}function Y(D){return je(D)?(c=Y,J(D)):qe(D)?(t.consume(D),Y):R(D)}function le(D){return D===45||Vt(D)?(t.consume(D),le):D===47||D===62||ot(D)?oe(D):l(D)}function oe(D){return D===47?(t.consume(D),R):D===58||D===95||Pt(D)?(t.consume(D),H):je(D)?(c=oe,J(D)):qe(D)?(t.consume(D),oe):R(D)}function H(D){return D===45||D===46||D===58||D===95||Vt(D)?(t.consume(D),H):X(D)}function X(D){return D===61?(t.consume(D),G):je(D)?(c=X,J(D)):qe(D)?(t.consume(D),X):oe(D)}function G(D){return D===null||D===60||D===61||D===62||D===96?l(D):D===34||D===39?(t.consume(D),s=D,fe):je(D)?(c=G,J(D)):qe(D)?(t.consume(D),G):(t.consume(D),ue)}function fe(D){return D===s?(t.consume(D),s=void 0,ne):D===null?l(D):je(D)?(c=fe,J(D)):(t.consume(D),fe)}function ue(D){return D===null||D===34||D===39||D===60||D===61||D===96?l(D):D===47||D===62||ot(D)?oe(D):(t.consume(D),ue)}function ne(D){return D===47||D===62||ot(D)?oe(D):l(D)}function R(D){return D===62?(t.consume(D),t.exit("htmlTextData"),t.exit("htmlText"),r):l(D)}function J(D){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),ie}function ie(D){return qe(D)?Xe(t,ge,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):ge(D)}function ge(D){return t.enter("htmlTextData"),c(D)}}const Md={name:"labelEnd",resolveAll:JC,resolveTo:WC,tokenize:eN},QC={tokenize:tN},KC={tokenize:nN},ZC={tokenize:rN};function JC(t){let r=-1;const l=[];for(;++r<t.length;){const i=t[r][1];if(l.push(t[r]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",r+=s}}return t.length!==l.length&&mn(t,0,t.length,l),t}function WC(t,r){let l=t.length,i=0,s,u,c,f;for(;l--;)if(s=t[l][1],u){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[l][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(t[l][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(u=l,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(c=l);const p={type:t[u][1].type==="labelLink"?"link":"image",start:{...t[u][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[u][1].start},end:{...t[c][1].end}},x={type:"labelText",start:{...t[u+i+2][1].end},end:{...t[c-2][1].start}};return f=[["enter",p,r],["enter",m,r]],f=jn(f,t.slice(u+1,u+i+3)),f=jn(f,[["enter",x,r]]),f=jn(f,Ms(r.parser.constructs.insideSpan.null,t.slice(u+i+4,c-3),r)),f=jn(f,[["exit",x,r],t[c-2],t[c-1],["exit",m,r]]),f=jn(f,t.slice(c+1)),f=jn(f,[["exit",p,r]]),mn(t,u,t.length,f),t}function eN(t,r,l){const i=this;let s=i.events.length,u,c;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){u=i.events[s][1];break}return f;function f(b){return u?u._inactive?y(b):(c=i.parser.defined.includes(zn(i.sliceSerialize({start:u.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(b),t.exit("labelMarker"),t.exit("labelEnd"),p):l(b)}function p(b){return b===40?t.attempt(QC,x,c?x:y)(b):b===91?t.attempt(KC,x,c?m:y)(b):c?x(b):y(b)}function m(b){return t.attempt(ZC,x,y)(b)}function x(b){return r(b)}function y(b){return u._balanced=!0,l(b)}}function tN(t,r,l){return i;function i(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),s}function s(y){return ot(y)?Ni(t,u)(y):u(y)}function u(y){return y===41?x(y):m0(t,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return ot(y)?Ni(t,p)(y):x(y)}function f(y){return l(y)}function p(y){return y===34||y===39||y===40?g0(t,m,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):x(y)}function m(y){return ot(y)?Ni(t,x)(y):x(y)}function x(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),r):l(y)}}function nN(t,r,l){const i=this;return s;function s(f){return p0.call(i,t,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return i.parser.defined.includes(zn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?r(f):l(f)}function c(f){return l(f)}}function rN(t,r,l){return i;function i(u){return t.enter("reference"),t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),s}function s(u){return u===93?(t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),t.exit("reference"),r):l(u)}}const lN={name:"labelStartImage",resolveAll:Md.resolveAll,tokenize:aN};function aN(t,r,l){const i=this;return s;function s(f){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(f),t.exit("labelImageMarker"),u}function u(f){return f===91?(t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelImage"),c):l(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?l(f):r(f)}}const iN={name:"labelStartLink",resolveAll:Md.resolveAll,tokenize:oN};function oN(t,r,l){const i=this;return s;function s(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?l(c):r(c)}}const hf={name:"lineEnding",tokenize:sN};function sN(t,r){return l;function l(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),Xe(t,r,"linePrefix")}}const ms={name:"thematicBreak",tokenize:uN};function uN(t,r,l){let i=0,s;return u;function u(m){return t.enter("thematicBreak"),c(m)}function c(m){return s=m,f(m)}function f(m){return m===s?(t.enter("thematicBreakSequence"),p(m)):i>=3&&(m===null||je(m))?(t.exit("thematicBreak"),r(m)):l(m)}function p(m){return m===s?(t.consume(m),i++,p):(t.exit("thematicBreakSequence"),qe(m)?Xe(t,f,"whitespace")(m):f(m))}}const tn={continuation:{tokenize:hN},exit:pN,name:"list",tokenize:dN},cN={partial:!0,tokenize:gN},fN={partial:!0,tokenize:mN};function dN(t,r,l){const i=this,s=i.events[i.events.length-1];let u=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(v){const C=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:Xf(v)){if(i.containerState.type||(i.containerState.type=C,t.enter(C,{_container:!0})),C==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(ms,l,m)(v):m(v);if(!i.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(v)}return l(v)}function p(v){return Xf(v)&&++c<10?(t.consume(v),p):(!i.interrupt||c<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),m(v)):l(v)}function m(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,t.check(_i,i.interrupt?l:x,t.attempt(cN,b,y))}function x(v){return i.containerState.initialBlankLine=!0,u++,b(v)}function y(v){return qe(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),b):l(v)}function b(v){return i.containerState.size=u+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,r(v)}}function hN(t,r,l){const i=this;return i.containerState._closeFlow=void 0,t.check(_i,s,u);function s(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Xe(t,r,"listItemIndent",i.containerState.size+1)(f)}function u(f){return i.containerState.furtherBlankLines||!qe(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(fN,r,c)(f))}function c(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,Xe(t,t.attempt(tn,r,l),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function mN(t,r,l){const i=this;return Xe(t,s,"listItemIndent",i.containerState.size+1);function s(u){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?r(u):l(u)}}function pN(t){t.exit(this.containerState.type)}function gN(t,r,l){const i=this;return Xe(t,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(u){const c=i.events[i.events.length-1];return!qe(u)&&c&&c[1].type==="listItemPrefixWhitespace"?r(u):l(u)}}const _y={name:"setextUnderline",resolveTo:yN,tokenize:xN};function yN(t,r){let l=t.length,i,s,u;for(;l--;)if(t[l][0]==="enter"){if(t[l][1].type==="content"){i=l;break}t[l][1].type==="paragraph"&&(s=l)}else t[l][1].type==="content"&&t.splice(l,1),!u&&t[l][1].type==="definition"&&(u=l);const c={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",u?(t.splice(s,0,["enter",c,r]),t.splice(u+1,0,["exit",t[i][1],r]),t[i][1].end={...t[u][1].end}):t[i][1]=c,t.push(["exit",c,r]),t}function xN(t,r,l){const i=this;let s;return u;function u(m){let x=i.events.length,y;for(;x--;)if(i.events[x][1].type!=="lineEnding"&&i.events[x][1].type!=="linePrefix"&&i.events[x][1].type!=="content"){y=i.events[x][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(t.enter("setextHeadingLine"),s=m,c(m)):l(m)}function c(m){return t.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===s?(t.consume(m),f):(t.exit("setextHeadingLineSequence"),qe(m)?Xe(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||je(m)?(t.exit("setextHeadingLine"),r(m)):l(m)}}const bN={tokenize:vN};function vN(t){const r=this,l=t.attempt(_i,i,t.attempt(this.parser.constructs.flowInitial,s,Xe(t,t.attempt(this.parser.constructs.flow,s,t.attempt(NC,s)),"linePrefix")));return l;function i(u){if(u===null){t.consume(u);return}return t.enter("lineEndingBlank"),t.consume(u),t.exit("lineEndingBlank"),r.currentConstruct=void 0,l}function s(u){if(u===null){t.consume(u);return}return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),r.currentConstruct=void 0,l}}const SN={resolveAll:x0()},wN=y0("string"),kN=y0("text");function y0(t){return{resolveAll:x0(t==="text"?CN:void 0),tokenize:r};function r(l){const i=this,s=this.parser.constructs[t],u=l.attempt(s,c,f);return c;function c(x){return m(x)?u(x):f(x)}function f(x){if(x===null){l.consume(x);return}return l.enter("data"),l.consume(x),p}function p(x){return m(x)?(l.exit("data"),u(x)):(l.consume(x),p)}function m(x){if(x===null)return!0;const y=s[x];let b=-1;if(y)for(;++b<y.length;){const v=y[b];if(!v.previous||v.previous.call(i,i.previous))return!0}return!1}}}function x0(t){return r;function r(l,i){let s=-1,u;for(;++s<=l.length;)u===void 0?l[s]&&l[s][1].type==="data"&&(u=s,s++):(!l[s]||l[s][1].type!=="data")&&(s!==u+2&&(l[u][1].end=l[s-1][1].end,l.splice(u+2,s-u-2),s=u+2),u=void 0);return t?t(l,i):l}}function CN(t,r){let l=0;for(;++l<=t.length;)if((l===t.length||t[l][1].type==="lineEnding")&&t[l-1][1].type==="data"){const i=t[l-1][1],s=r.sliceStream(i);let u=s.length,c=-1,f=0,p;for(;u--;){const m=s[u];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(m===-2)p=!0,f++;else if(m!==-1){u++;break}}if(r._contentTypeTextTrailing&&l===t.length&&(f=0),f){const m={type:l===t.length||p||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:i.start._bufferIndex+c,_index:i.start._index+u,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...m.start},i.start.offset===i.end.offset?Object.assign(i,m):(t.splice(l,0,["enter",m,r],["exit",m,r]),l+=2)}l++}return t}const NN={42:tn,43:tn,45:tn,48:tn,49:tn,50:tn,51:tn,52:tn,53:tn,54:tn,55:tn,56:tn,57:tn,62:c0},jN={91:MC},EN={[-2]:df,[-1]:df,32:df},TN={35:LC,42:ms,45:[_y,ms],60:qC,61:_y,95:ms,96:zy,126:zy},AN={38:d0,92:f0},MN={[-5]:hf,[-4]:hf,[-3]:hf,33:lN,38:d0,42:Qf,60:[iC,PC],91:iN,92:[OC,f0],93:Md,95:Qf,96:bC},DN={null:[Qf,SN]},RN={null:[42,95]},zN={null:[]},ON=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:RN,contentInitial:jN,disable:zN,document:NN,flow:TN,flowInitial:EN,insideSpan:DN,string:AN,text:MN},Symbol.toStringTag,{value:"Module"}));function _N(t,r,l){let i={_bufferIndex:-1,_index:0,line:l&&l.line||1,column:l&&l.column||1,offset:l&&l.offset||0};const s={},u=[];let c=[],f=[];const p={attempt:Y(P),check:Y(L),consume:M,enter:O,exit:$,interrupt:Y(L,{interrupt:!0})},m={code:null,containerState:{},defineSkip:N,events:[],now:C,parser:t,previous:null,sliceSerialize:b,sliceStream:v,write:y};let x=r.tokenize.call(m,p);return r.resolveAll&&u.push(r),m;function y(X){return c=jn(c,X),A(),c[c.length-1]!==null?[]:(le(r,0),m.events=Ms(u,m.events,m),m.events)}function b(X,G){return UN(v(X),G)}function v(X){return LN(c,X)}function C(){const{_bufferIndex:X,_index:G,line:fe,column:ue,offset:ne}=i;return{_bufferIndex:X,_index:G,line:fe,column:ue,offset:ne}}function N(X){s[X.line]=X.column,H()}function A(){let X;for(;i._index<c.length;){const G=c[i._index];if(typeof G=="string")for(X=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===X&&i._bufferIndex<G.length;)E(G.charCodeAt(i._bufferIndex));else E(G)}}function E(X){x=x(X)}function M(X){je(X)?(i.line++,i.column=1,i.offset+=X===-3?2:1,H()):X!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),m.previous=X}function O(X,G){const fe=G||{};return fe.type=X,fe.start=C(),m.events.push(["enter",fe,m]),f.push(fe),fe}function $(X){const G=f.pop();return G.end=C(),m.events.push(["exit",G,m]),G}function P(X,G){le(X,G.from)}function L(X,G){G.restore()}function Y(X,G){return fe;function fe(ue,ne,R){let J,ie,ge,D;return Array.isArray(ue)?B(ue):"tokenize"in ue?B([ue]):T(ue);function T(te){return Z;function Z(xe){const ke=xe!==null&&te[xe],Ae=xe!==null&&te.null,ht=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Ae)?Ae:Ae?[Ae]:[]];return B(ht)(xe)}}function B(te){return J=te,ie=0,te.length===0?R:j(te[ie])}function j(te){return Z;function Z(xe){return D=oe(),ge=te,te.partial||(m.currentConstruct=te),te.name&&m.parser.constructs.disable.null.includes(te.name)?ee():te.tokenize.call(G?Object.assign(Object.create(m),G):m,p,_,ee)(xe)}}function _(te){return X(ge,D),ne}function ee(te){return D.restore(),++ie<J.length?j(J[ie]):R}}}function le(X,G){X.resolveAll&&!u.includes(X)&&u.push(X),X.resolve&&mn(m.events,G,m.events.length-G,X.resolve(m.events.slice(G),m)),X.resolveTo&&(m.events=X.resolveTo(m.events,m))}function oe(){const X=C(),G=m.previous,fe=m.currentConstruct,ue=m.events.length,ne=Array.from(f);return{from:ue,restore:R};function R(){i=X,m.previous=G,m.currentConstruct=fe,m.events.length=ue,f=ne,H()}}function H(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function LN(t,r){const l=r.start._index,i=r.start._bufferIndex,s=r.end._index,u=r.end._bufferIndex;let c;if(l===s)c=[t[l].slice(i,u)];else{if(c=t.slice(l,s),i>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(i):c.shift()}u>0&&c.push(t[s].slice(0,u))}return c}function UN(t,r){let l=-1;const i=[];let s;for(;++l<t.length;){const u=t[l];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
|
|
519
|
+
`;break}case-3:{c=`\r
|
|
520
|
+
`;break}case-2:{c=r?" ":" ";break}case-1:{if(!r&&s)continue;c=" ";break}default:c=String.fromCharCode(u)}s=u===-2,i.push(c)}return i.join("")}function BN(t){const i={constructs:s0([ON,...(t||{}).extensions||[]]),content:s(Wk),defined:[],document:s(tC),flow:s(bN),lazy:{},string:s(wN),text:s(kN)};return i;function s(u){return c;function c(f){return _N(i,u,f)}}}function HN(t){for(;!h0(t););return t}const Ly=/[\0\t\n\r]/g;function qN(){let t=1,r="",l=!0,i;return s;function s(u,c,f){const p=[];let m,x,y,b,v;for(u=r+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),y=0,r="",l&&(u.charCodeAt(0)===65279&&y++,l=void 0);y<u.length;){if(Ly.lastIndex=y,m=Ly.exec(u),b=m&&m.index!==void 0?m.index:u.length,v=u.charCodeAt(b),!m){r=u.slice(y);break}if(v===10&&y===b&&i)p.push(-3),i=void 0;else switch(i&&(p.push(-5),i=void 0),y<b&&(p.push(u.slice(y,b)),t+=b-y),v){case 0:{p.push(65533),t++;break}case 9:{for(x=Math.ceil(t/4)*4,p.push(-2);t++<x;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:i=!0,t=1}y=b+1}return f&&(i&&p.push(-5),r&&p.push(r),p.push(null)),p}}const IN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function VN(t){return t.replace(IN,$N)}function $N(t,r,l){if(r)return r;if(l.charCodeAt(0)===35){const s=l.charCodeAt(1),u=s===120||s===88;return u0(l.slice(u?2:1),u?16:10)}return Ad(l)||t}const b0={}.hasOwnProperty;function FN(t,r,l){return r&&typeof r=="object"&&(l=r,r=void 0),YN(l)(HN(BN(l).document().write(qN()(t,r,!0))))}function YN(t){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Qe),autolinkProtocol:oe,autolinkEmail:oe,atxHeading:u(Se),blockQuote:u(Ae),characterEscape:oe,characterReference:oe,codeFenced:u(ht),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(ht,c),codeText:u(yt,c),codeTextData:oe,data:oe,codeFlowValue:oe,definition:u(Ue),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(ye),hardBreakEscape:u(Fe),hardBreakTrailing:u(Fe),htmlFlow:u(nt,c),htmlFlowData:oe,htmlText:u(nt,c),htmlTextData:oe,image:u(Yt),label:c,link:u(Qe),listItem:u(pn),listItemValue:b,listOrdered:u(Mt,y),listUnordered:u(Mt),paragraph:u(Gr),reference:j,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(Se),strong:u(fr),thematicBreak:u(Te)},exit:{atxHeading:p(),atxHeadingSequence:P,autolink:p(),autolinkEmail:ke,autolinkProtocol:xe,blockQuote:p(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:ee,characterReferenceMarkerNumeric:ee,characterReferenceValue:te,characterReference:Z,codeFenced:p(A),codeFencedFence:N,codeFencedFenceInfo:v,codeFencedFenceMeta:C,codeFlowValue:H,codeIndented:p(E),codeText:p(ne),codeTextData:H,data:H,definition:p(),definitionDestinationString:$,definitionLabelString:M,definitionTitleString:O,emphasis:p(),hardBreakEscape:p(G),hardBreakTrailing:p(G),htmlFlow:p(fe),htmlFlowData:H,htmlText:p(ue),htmlTextData:H,image:p(J),label:ge,labelText:ie,lineEnding:X,link:p(R),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:_,resourceDestinationString:D,resourceTitleString:T,resource:B,setextHeading:p(le),setextHeadingLineSequence:Y,setextHeadingText:L,strong:p(),thematicBreak:p()}};v0(r,(t||{}).mdastExtensions||[]);const l={};return i;function i(Q){let de={type:"root",children:[]};const Ce={stack:[de],tokenStack:[],config:r,enter:f,exit:m,buffer:c,resume:x,data:l},Re=[];let Ge=-1;for(;++Ge<Q.length;)if(Q[Ge][1].type==="listOrdered"||Q[Ge][1].type==="listUnordered")if(Q[Ge][0]==="enter")Re.push(Ge);else{const Ot=Re.pop();Ge=s(Q,Ot,Ge)}for(Ge=-1;++Ge<Q.length;){const Ot=r[Q[Ge][0]];b0.call(Ot,Q[Ge][1].type)&&Ot[Q[Ge][1].type].call(Object.assign({sliceSerialize:Q[Ge][2].sliceSerialize},Ce),Q[Ge][1])}if(Ce.tokenStack.length>0){const Ot=Ce.tokenStack[Ce.tokenStack.length-1];(Ot[1]||Uy).call(Ce,void 0,Ot[0])}for(de.position={start:qr(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:qr(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<r.transforms.length;)de=r.transforms[Ge](de)||de;return de}function s(Q,de,Ce){let Re=de-1,Ge=-1,Ot=!1,vt,gt,st,Dt;for(;++Re<=Ce;){const We=Q[Re];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?Ge++:Ge--,Dt=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(vt&&!Dt&&!Ge&&!st&&(st=Re),Dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Dt=void 0}if(!Ge&&We[0]==="enter"&&We[1].type==="listItemPrefix"||Ge===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(vt){let dr=Re;for(gt=void 0;dr--;){const An=Q[dr];if(An[1].type==="lineEnding"||An[1].type==="lineEndingBlank"){if(An[0]==="exit")continue;gt&&(Q[gt][1].type="lineEndingBlank",Ot=!0),An[1].type="lineEnding",gt=dr}else if(!(An[1].type==="linePrefix"||An[1].type==="blockQuotePrefix"||An[1].type==="blockQuotePrefixWhitespace"||An[1].type==="blockQuoteMarker"||An[1].type==="listItemIndent"))break}st&&(!gt||st<gt)&&(vt._spread=!0),vt.end=Object.assign({},gt?Q[gt][1].start:We[1].end),Q.splice(gt||Re,0,["exit",vt,We[2]]),Re++,Ce++}if(We[1].type==="listItemPrefix"){const dr={type:"listItem",_spread:!1,start:Object.assign({},We[1].start),end:void 0};vt=dr,Q.splice(Re,0,["enter",dr,We[2]]),Re++,Ce++,st=void 0,Dt=!0}}}return Q[de][1]._spread=Ot,Ce}function u(Q,de){return Ce;function Ce(Re){f.call(this,Q(Re),Re),de&&de.call(this,Re)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(Q,de,Ce){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([de,Ce||void 0]),Q.position={start:qr(de.start),end:void 0}}function p(Q){return de;function de(Ce){Q&&Q.call(this,Ce),m.call(this,Ce)}}function m(Q,de){const Ce=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==Q.type&&(de?de.call(this,Q,Re[0]):(Re[1]||Uy).call(this,Q,Re[0]));else throw new Error("Cannot close `"+Q.type+"` ("+Ci({start:Q.start,end:Q.end})+"): it’s not open");Ce.position.end=qr(Q.end)}function x(){return Td(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function b(Q){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function v(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.lang=Q}function C(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.meta=Q}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q.replace(/(\r?\n|\r)$/g,"")}function M(Q){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=zn(this.sliceSerialize(Q)).toLowerCase()}function O(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.title=Q}function $(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.url=Q}function P(Q){const de=this.stack[this.stack.length-1];if(!de.depth){const Ce=this.sliceSerialize(Q).length;de.depth=Ce}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function Y(Q){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function le(){this.data.setextHeadingSlurpLineEnding=void 0}function oe(Q){const Ce=this.stack[this.stack.length-1].children;let Re=Ce[Ce.length-1];(!Re||Re.type!=="text")&&(Re=se(),Re.position={start:qr(Q.start),end:void 0},Ce.push(Re)),this.stack.push(Re)}function H(Q){const de=this.stack.pop();de.value+=this.sliceSerialize(Q),de.position.end=qr(Q.end)}function X(Q){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=de.children[de.children.length-1];Ce.position.end=qr(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(de.type)&&(oe.call(this,Q),H.call(this,Q))}function G(){this.data.atHardBreak=!0}function fe(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q}function ue(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q}function ne(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.value=Q}function R(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=de,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function J(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=de,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function ie(Q){const de=this.sliceSerialize(Q),Ce=this.stack[this.stack.length-2];Ce.label=VN(de),Ce.identifier=zn(de).toLowerCase()}function ge(){const Q=this.stack[this.stack.length-1],de=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Re=Q.children;Ce.children=Re}else Ce.alt=de}function D(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.url=Q}function T(){const Q=this.resume(),de=this.stack[this.stack.length-1];de.title=Q}function B(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function _(Q){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=zn(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function ee(Q){this.data.characterReferenceType=Q.type}function te(Q){const de=this.sliceSerialize(Q),Ce=this.data.characterReferenceType;let Re;Ce?(Re=u0(de,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=Ad(de);const Ge=this.stack[this.stack.length-1];Ge.value+=Re}function Z(Q){const de=this.stack.pop();de.position.end=qr(Q.end)}function xe(Q){H.call(this,Q);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(Q)}function ke(Q){H.call(this,Q);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(Q)}function Ae(){return{type:"blockquote",children:[]}}function ht(){return{type:"code",lang:null,meta:null,value:""}}function yt(){return{type:"inlineCode",value:""}}function Ue(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ye(){return{type:"emphasis",children:[]}}function Se(){return{type:"heading",depth:0,children:[]}}function Fe(){return{type:"break"}}function nt(){return{type:"html",value:""}}function Yt(){return{type:"image",title:null,url:"",alt:null}}function Qe(){return{type:"link",title:null,url:"",children:[]}}function Mt(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function pn(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function Gr(){return{type:"paragraph",children:[]}}function fr(){return{type:"strong",children:[]}}function se(){return{type:"text",value:""}}function Te(){return{type:"thematicBreak"}}}function qr(t){return{line:t.line,column:t.column,offset:t.offset}}function v0(t,r){let l=-1;for(;++l<r.length;){const i=r[l];Array.isArray(i)?v0(t,i):GN(t,i)}}function GN(t,r){let l;for(l in r)if(b0.call(r,l))switch(l){case"canContainEols":{const i=r[l];i&&t[l].push(...i);break}case"transforms":{const i=r[l];i&&t[l].push(...i);break}case"enter":case"exit":{const i=r[l];i&&Object.assign(t[l],i);break}}}function Uy(t,r){throw t?new Error("Cannot close `"+t.type+"` ("+Ci({start:t.start,end:t.end})+"): a different token (`"+r.type+"`, "+Ci({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Ci({start:r.start,end:r.end})+") is still open")}function PN(t){const r=this;r.parser=l;function l(i){return FN(i,{...r.data("settings"),...t,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function XN(t,r){const l={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(r),!0)};return t.patch(r,l),t.applyData(r,l)}function QN(t,r){const l={type:"element",tagName:"br",properties:{},children:[]};return t.patch(r,l),[t.applyData(r,l),{type:"text",value:`
|
|
521
|
+
`}]}function KN(t,r){const l=r.value?r.value+`
|
|
522
|
+
`:"",i={},s=r.lang?r.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let u={type:"element",tagName:"code",properties:i,children:[{type:"text",value:l}]};return r.meta&&(u.data={meta:r.meta}),t.patch(r,u),u=t.applyData(r,u),u={type:"element",tagName:"pre",properties:{},children:[u]},t.patch(r,u),u}function ZN(t,r){const l={type:"element",tagName:"del",properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}function JN(t,r){const l={type:"element",tagName:"em",properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}function WN(t,r){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=String(r.identifier).toUpperCase(),s=wa(i.toLowerCase()),u=t.footnoteOrder.indexOf(i);let c,f=t.footnoteCounts.get(i);f===void 0?(f=0,t.footnoteOrder.push(i),c=t.footnoteOrder.length):c=u+1,f+=1,t.footnoteCounts.set(i,f);const p={type:"element",tagName:"a",properties:{href:"#"+l+"fn-"+s,id:l+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(r,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return t.patch(r,m),t.applyData(r,m)}function ej(t,r){const l={type:"element",tagName:"h"+r.depth,properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}function tj(t,r){if(t.options.allowDangerousHtml){const l={type:"raw",value:r.value};return t.patch(r,l),t.applyData(r,l)}}function S0(t,r){const l=r.referenceType;let i="]";if(l==="collapsed"?i+="[]":l==="full"&&(i+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+i}];const s=t.all(r),u=s[0];u&&u.type==="text"?u.value="["+u.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=i:s.push({type:"text",value:i}),s}function nj(t,r){const l=String(r.identifier).toUpperCase(),i=t.definitionById.get(l);if(!i)return S0(t,r);const s={src:wa(i.url||""),alt:r.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const u={type:"element",tagName:"img",properties:s,children:[]};return t.patch(r,u),t.applyData(r,u)}function rj(t,r){const l={src:wa(r.url)};r.alt!==null&&r.alt!==void 0&&(l.alt=r.alt),r.title!==null&&r.title!==void 0&&(l.title=r.title);const i={type:"element",tagName:"img",properties:l,children:[]};return t.patch(r,i),t.applyData(r,i)}function lj(t,r){const l={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};t.patch(r,l);const i={type:"element",tagName:"code",properties:{},children:[l]};return t.patch(r,i),t.applyData(r,i)}function aj(t,r){const l=String(r.identifier).toUpperCase(),i=t.definitionById.get(l);if(!i)return S0(t,r);const s={href:wa(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const u={type:"element",tagName:"a",properties:s,children:t.all(r)};return t.patch(r,u),t.applyData(r,u)}function ij(t,r){const l={href:wa(r.url)};r.title!==null&&r.title!==void 0&&(l.title=r.title);const i={type:"element",tagName:"a",properties:l,children:t.all(r)};return t.patch(r,i),t.applyData(r,i)}function oj(t,r,l){const i=t.all(r),s=l?sj(l):w0(r),u={},c=[];if(typeof r.checked=="boolean"){const x=i[0];let y;x&&x.type==="element"&&x.tagName==="p"?y=x:(y={type:"element",tagName:"p",properties:{},children:[]},i.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<i.length;){const x=i[f];(s||f!==0||x.type!=="element"||x.tagName!=="p")&&c.push({type:"text",value:`
|
|
523
|
+
`}),x.type==="element"&&x.tagName==="p"&&!s?c.push(...x.children):c.push(x)}const p=i[i.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
524
|
+
`});const m={type:"element",tagName:"li",properties:u,children:c};return t.patch(r,m),t.applyData(r,m)}function sj(t){let r=!1;if(t.type==="list"){r=t.spread||!1;const l=t.children;let i=-1;for(;!r&&++i<l.length;)r=w0(l[i])}return r}function w0(t){const r=t.spread;return r??t.children.length>1}function uj(t,r){const l={},i=t.all(r);let s=-1;for(typeof r.start=="number"&&r.start!==1&&(l.start=r.start);++s<i.length;){const c=i[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){l.className=["contains-task-list"];break}}const u={type:"element",tagName:r.ordered?"ol":"ul",properties:l,children:t.wrap(i,!0)};return t.patch(r,u),t.applyData(r,u)}function cj(t,r){const l={type:"element",tagName:"p",properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}function fj(t,r){const l={type:"root",children:t.wrap(t.all(r))};return t.patch(r,l),t.applyData(r,l)}function dj(t,r){const l={type:"element",tagName:"strong",properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}function hj(t,r){const l=t.all(r),i=l.shift(),s=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([i],!0)};t.patch(r.children[0],c),s.push(c)}if(l.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(l,!0)},f=Cd(r.children[1]),p=t0(r.children[r.children.length-1]);f&&p&&(c.position={start:f,end:p}),s.push(c)}const u={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(r,u),t.applyData(r,u)}function mj(t,r,l){const i=l?l.children:void 0,u=(i?i.indexOf(r):1)===0?"th":"td",c=l&&l.type==="table"?l.align:void 0,f=c?c.length:r.children.length;let p=-1;const m=[];for(;++p<f;){const y=r.children[p],b={},v=c?c[p]:void 0;v&&(b.align=v);let C={type:"element",tagName:u,properties:b,children:[]};y&&(C.children=t.all(y),t.patch(y,C),C=t.applyData(y,C)),m.push(C)}const x={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(r,x),t.applyData(r,x)}function pj(t,r){const l={type:"element",tagName:"td",properties:{},children:t.all(r)};return t.patch(r,l),t.applyData(r,l)}const By=9,Hy=32;function gj(t){const r=String(t),l=/\r?\n|\r/g;let i=l.exec(r),s=0;const u=[];for(;i;)u.push(qy(r.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=l.exec(r);return u.push(qy(r.slice(s),s>0,!1)),u.join("")}function qy(t,r,l){let i=0,s=t.length;if(r){let u=t.codePointAt(i);for(;u===By||u===Hy;)i++,u=t.codePointAt(i)}if(l){let u=t.codePointAt(s-1);for(;u===By||u===Hy;)s--,u=t.codePointAt(s-1)}return s>i?t.slice(i,s):""}function yj(t,r){const l={type:"text",value:gj(String(r.value))};return t.patch(r,l),t.applyData(r,l)}function xj(t,r){const l={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(r,l),t.applyData(r,l)}const bj={blockquote:XN,break:QN,code:KN,delete:ZN,emphasis:JN,footnoteReference:WN,heading:ej,html:tj,imageReference:nj,image:rj,inlineCode:lj,linkReference:aj,link:ij,listItem:oj,list:uj,paragraph:cj,root:fj,strong:dj,table:hj,tableCell:pj,tableRow:mj,text:yj,thematicBreak:xj,toml:ls,yaml:ls,definition:ls,footnoteDefinition:ls};function ls(){}const k0=-1,Ds=0,ji=1,bs=2,Dd=3,Rd=4,zd=5,Od=6,C0=7,N0=8,vj=typeof self=="object"?self:globalThis,Iy=(t,r)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new vj[t](r)},Sj=(t,r)=>{const l=(s,u)=>(t.set(u,s),s),i=s=>{if(t.has(s))return t.get(s);const[u,c]=r[s];switch(u){case Ds:case k0:return l(c,s);case ji:{const f=l([],s);for(const p of c)f.push(i(p));return f}case bs:{const f=l({},s);for(const[p,m]of c)f[i(p)]=i(m);return f}case Dd:return l(new Date(c),s);case Rd:{const{source:f,flags:p}=c;return l(new RegExp(f,p),s)}case zd:{const f=l(new Map,s);for(const[p,m]of c)f.set(i(p),i(m));return f}case Od:{const f=l(new Set,s);for(const p of c)f.add(i(p));return f}case C0:{const{name:f,message:p}=c;return l(Iy(f,p),s)}case N0:return l(BigInt(c),s);case"BigInt":return l(Object(BigInt(c)),s);case"ArrayBuffer":return l(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return l(new DataView(f),c)}}return l(Iy(u,c),s)};return i},Vy=t=>Sj(new Map,t)(0),aa="",{toString:wj}={},{keys:kj}=Object,Si=t=>{const r=typeof t;if(r!=="object"||!t)return[Ds,r];const l=wj.call(t).slice(8,-1);switch(l){case"Array":return[ji,aa];case"Object":return[bs,aa];case"Date":return[Dd,aa];case"RegExp":return[Rd,aa];case"Map":return[zd,aa];case"Set":return[Od,aa];case"DataView":return[ji,l]}return l.includes("Array")?[ji,l]:l.includes("Error")?[C0,l]:[bs,l]},as=([t,r])=>t===Ds&&(r==="function"||r==="symbol"),Cj=(t,r,l,i)=>{const s=(c,f)=>{const p=i.push(c)-1;return l.set(f,p),p},u=c=>{if(l.has(c))return l.get(c);let[f,p]=Si(c);switch(f){case Ds:{let x=c;switch(p){case"bigint":f=N0,x=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);x=null;break;case"undefined":return s([k0],c)}return s([f,x],c)}case ji:{if(p){let b=c;return p==="DataView"?b=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(b=new Uint8Array(c)),s([p,[...b]],c)}const x=[],y=s([f,x],c);for(const b of c)x.push(u(b));return y}case bs:{if(p)switch(p){case"BigInt":return s([p,c.toString()],c);case"Boolean":case"Number":case"String":return s([p,c.valueOf()],c)}if(r&&"toJSON"in c)return u(c.toJSON());const x=[],y=s([f,x],c);for(const b of kj(c))(t||!as(Si(c[b])))&&x.push([u(b),u(c[b])]);return y}case Dd:return s([f,c.toISOString()],c);case Rd:{const{source:x,flags:y}=c;return s([f,{source:x,flags:y}],c)}case zd:{const x=[],y=s([f,x],c);for(const[b,v]of c)(t||!(as(Si(b))||as(Si(v))))&&x.push([u(b),u(v)]);return y}case Od:{const x=[],y=s([f,x],c);for(const b of c)(t||!as(Si(b)))&&x.push(u(b));return y}}const{message:m}=c;return s([f,{name:p,message:m}],c)};return u},$y=(t,{json:r,lossy:l}={})=>{const i=[];return Cj(!(r||l),!!r,new Map,i)(t),i},vs=typeof structuredClone=="function"?(t,r)=>r&&("json"in r||"lossy"in r)?Vy($y(t,r)):structuredClone(t):(t,r)=>Vy($y(t,r));function Nj(t,r){const l=[{type:"text",value:"↩"}];return r>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),l}function jj(t,r){return"Back to reference "+(t+1)+(r>1?"-"+r:"")}function Ej(t){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",l=t.options.footnoteBackContent||Nj,i=t.options.footnoteBackLabel||jj,s=t.options.footnoteLabel||"Footnotes",u=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[p]);if(!m)continue;const x=t.all(m),y=String(m.identifier).toUpperCase(),b=wa(y.toLowerCase());let v=0;const C=[],N=t.footnoteCounts.get(y);for(;N!==void 0&&++v<=N;){C.length>0&&C.push({type:"text",value:" "});let M=typeof l=="string"?l:l(p,v);typeof M=="string"&&(M={type:"text",value:M}),C.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+b+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(p,v),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const A=x[x.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const M=A.children[A.children.length-1];M&&M.type==="text"?M.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...C)}else x.push(...C);const E={type:"element",tagName:"li",properties:{id:r+"fn-"+b},children:t.wrap(x,!0)};t.patch(m,E),f.push(E)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...vs(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
525
|
+
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(f,!0)},{type:"text",value:`
|
|
526
|
+
`}]}}const Rs=(function(t){if(t==null)return Dj;if(typeof t=="function")return zs(t);if(typeof t=="object")return Array.isArray(t)?Tj(t):Aj(t);if(typeof t=="string")return Mj(t);throw new Error("Expected function, string, or object as test")});function Tj(t){const r=[];let l=-1;for(;++l<t.length;)r[l]=Rs(t[l]);return zs(i);function i(...s){let u=-1;for(;++u<r.length;)if(r[u].apply(this,s))return!0;return!1}}function Aj(t){const r=t;return zs(l);function l(i){const s=i;let u;for(u in t)if(s[u]!==r[u])return!1;return!0}}function Mj(t){return zs(r);function r(l){return l&&l.type===t}}function zs(t){return r;function r(l,i,s){return!!(Rj(l)&&t.call(this,l,typeof i=="number"?i:void 0,s||void 0))}}function Dj(){return!0}function Rj(t){return t!==null&&typeof t=="object"&&"type"in t}const j0=[],zj=!0,Kf=!1,Oj="skip";function E0(t,r,l,i){let s;typeof r=="function"&&typeof l!="function"?(i=l,l=r):s=r;const u=Rs(s),c=i?-1:1;f(t,void 0,[])();function f(p,m,x){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const v=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(p.type+(v?"<"+v+">":""))+")"})}return b;function b(){let v=j0,C,N,A;if((!r||u(p,m,x[x.length-1]||void 0))&&(v=_j(l(p,x)),v[0]===Kf))return v;if("children"in p&&p.children){const E=p;if(E.children&&v[0]!==Oj)for(N=(i?E.children.length:-1)+c,A=x.concat(E);N>-1&&N<E.children.length;){const M=E.children[N];if(C=f(M,N,A)(),C[0]===Kf)return C;N=typeof C[1]=="number"?C[1]:N+c}}return v}}}function _j(t){return Array.isArray(t)?t:typeof t=="number"?[zj,t]:t==null?j0:[t]}function _d(t,r,l,i){let s,u,c;typeof r=="function"&&typeof l!="function"?(u=void 0,c=r,s=l):(u=r,c=l,s=i),E0(t,u,f,s);function f(p,m){const x=m[m.length-1],y=x?x.children.indexOf(p):void 0;return c(p,y,x)}}const Zf={}.hasOwnProperty,Lj={};function Uj(t,r){const l=r||Lj,i=new Map,s=new Map,u=new Map,c={...bj,...l.handlers},f={all:m,applyData:Hj,definitionById:i,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:c,one:p,options:l,patch:Bj,wrap:Ij};return _d(t,function(x){if(x.type==="definition"||x.type==="footnoteDefinition"){const y=x.type==="definition"?i:s,b=String(x.identifier).toUpperCase();y.has(b)||y.set(b,x)}}),f;function p(x,y){const b=x.type,v=f.handlers[b];if(Zf.call(f.handlers,b)&&v)return v(f,x,y);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in x){const{children:N,...A}=x,E=vs(A);return E.children=f.all(x),E}return vs(x)}return(f.options.unknownHandler||qj)(f,x,y)}function m(x){const y=[];if("children"in x){const b=x.children;let v=-1;for(;++v<b.length;){const C=f.one(b[v],x);if(C){if(v&&b[v-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=Fy(C.value)),!Array.isArray(C)&&C.type==="element")){const N=C.children[0];N&&N.type==="text"&&(N.value=Fy(N.value))}Array.isArray(C)?y.push(...C):y.push(C)}}}return y}}function Bj(t,r){t.position&&(r.position=Nk(t))}function Hj(t,r){let l=r;if(t&&t.data){const i=t.data.hName,s=t.data.hChildren,u=t.data.hProperties;if(typeof i=="string")if(l.type==="element")l.tagName=i;else{const c="children"in l?l.children:[l];l={type:"element",tagName:i,properties:{},children:c}}l.type==="element"&&u&&Object.assign(l.properties,vs(u)),"children"in l&&l.children&&s!==null&&s!==void 0&&(l.children=s)}return l}function qj(t,r){const l=r.data||{},i="value"in r&&!(Zf.call(l,"hProperties")||Zf.call(l,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:t.all(r)};return t.patch(r,i),t.applyData(r,i)}function Ij(t,r){const l=[];let i=-1;for(r&&l.push({type:"text",value:`
|
|
527
|
+
`});++i<t.length;)i&&l.push({type:"text",value:`
|
|
528
|
+
`}),l.push(t[i]);return r&&t.length>0&&l.push({type:"text",value:`
|
|
529
|
+
`}),l}function Fy(t){let r=0,l=t.charCodeAt(r);for(;l===9||l===32;)r++,l=t.charCodeAt(r);return t.slice(r)}function Yy(t,r){const l=Uj(t,r),i=l.one(t,void 0),s=Ej(l),u=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
|
|
530
|
+
`},s),u}function Vj(t,r){return t&&"run"in t?async function(l,i){const s=Yy(l,{file:i,...r});await t.run(s,i)}:function(l,i){return Yy(l,{file:i,...t||r})}}function Gy(t){if(t)throw t}var mf,Py;function $j(){if(Py)return mf;Py=1;var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,l=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):r.call(m)==="[object Array]"},u=function(m){if(!m||r.call(m)!=="[object Object]")return!1;var x=t.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!x&&!y)return!1;var b;for(b in m);return typeof b>"u"||t.call(m,b)},c=function(m,x){l&&x.name==="__proto__"?l(m,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):m[x.name]=x.newValue},f=function(m,x){if(x==="__proto__")if(t.call(m,x)){if(i)return i(m,x).value}else return;return m[x]};return mf=function p(){var m,x,y,b,v,C,N=arguments[0],A=1,E=arguments.length,M=!1;for(typeof N=="boolean"&&(M=N,N=arguments[1]||{},A=2),(N==null||typeof N!="object"&&typeof N!="function")&&(N={});A<E;++A)if(m=arguments[A],m!=null)for(x in m)y=f(N,x),b=f(m,x),N!==b&&(M&&b&&(u(b)||(v=s(b)))?(v?(v=!1,C=y&&s(y)?y:[]):C=y&&u(y)?y:{},c(N,{name:x,newValue:p(M,C,b)})):typeof b<"u"&&c(N,{name:x,newValue:b}));return N},mf}var Fj=$j();const pf=Ri(Fj);function Jf(t){if(typeof t!="object"||t===null)return!1;const r=Object.getPrototypeOf(t);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Yj(){const t=[],r={run:l,use:i};return r;function l(...s){let u=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(p,...m){const x=t[++u];let y=-1;if(p){c(p);return}for(;++y<s.length;)(m[y]===null||m[y]===void 0)&&(m[y]=s[y]);s=m,x?Gj(x,f)(...m):c(null,...m)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),r}}function Gj(t,r){let l;return i;function i(...c){const f=t.length>c.length;let p;f&&c.push(s);try{p=t.apply(this,c)}catch(m){const x=m;if(f&&l)throw x;return s(x)}f||(p&&p.then&&typeof p.then=="function"?p.then(u,s):p instanceof Error?s(p):u(p))}function s(c,...f){l||(l=!0,r(c,...f))}function u(c){s(null,c)}}const Hn={basename:Pj,dirname:Xj,extname:Qj,join:Kj,sep:"/"};function Pj(t,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');Li(t);let l=0,i=-1,s=t.length,u;if(r===void 0||r.length===0||r.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(u){l=s+1;break}}else i<0&&(u=!0,i=s+1);return i<0?"":t.slice(l,i)}if(r===t)return"";let c=-1,f=r.length-1;for(;s--;)if(t.codePointAt(s)===47){if(u){l=s+1;break}}else c<0&&(u=!0,c=s+1),f>-1&&(t.codePointAt(s)===r.codePointAt(f--)?f<0&&(i=s):(f=-1,i=c));return l===i?i=c:i<0&&(i=t.length),t.slice(l,i)}function Xj(t){if(Li(t),t.length===0)return".";let r=-1,l=t.length,i;for(;--l;)if(t.codePointAt(l)===47){if(i){r=l;break}}else i||(i=!0);return r<0?t.codePointAt(0)===47?"/":".":r===1&&t.codePointAt(0)===47?"//":t.slice(0,r)}function Qj(t){Li(t);let r=t.length,l=-1,i=0,s=-1,u=0,c;for(;r--;){const f=t.codePointAt(r);if(f===47){if(c){i=r+1;break}continue}l<0&&(c=!0,l=r+1),f===46?s<0?s=r:u!==1&&(u=1):s>-1&&(u=-1)}return s<0||l<0||u===0||u===1&&s===l-1&&s===i+1?"":t.slice(s,l)}function Kj(...t){let r=-1,l;for(;++r<t.length;)Li(t[r]),t[r]&&(l=l===void 0?t[r]:l+"/"+t[r]);return l===void 0?".":Zj(l)}function Zj(t){Li(t);const r=t.codePointAt(0)===47;let l=Jj(t,!r);return l.length===0&&!r&&(l="."),l.length>0&&t.codePointAt(t.length-1)===47&&(l+="/"),r?"/"+l:l}function Jj(t,r){let l="",i=0,s=-1,u=0,c=-1,f,p;for(;++c<=t.length;){if(c<t.length)f=t.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||u===1))if(s!==c-1&&u===2){if(l.length<2||i!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(p=l.lastIndexOf("/"),p!==l.length-1){p<0?(l="",i=0):(l=l.slice(0,p),i=l.length-1-l.lastIndexOf("/")),s=c,u=0;continue}}else if(l.length>0){l="",i=0,s=c,u=0;continue}}r&&(l=l.length>0?l+"/..":"..",i=2)}else l.length>0?l+="/"+t.slice(s+1,c):l=t.slice(s+1,c),i=c-s-1;s=c,u=0}else f===46&&u>-1?u++:u=-1}return l}function Li(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Wj={cwd:eE};function eE(){return"/"}function Wf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function tE(t){if(typeof t=="string")t=new URL(t);else if(!Wf(t)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(t.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return nE(t)}function nE(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const r=t.pathname;let l=-1;for(;++l<r.length;)if(r.codePointAt(l)===37&&r.codePointAt(l+1)===50){const i=r.codePointAt(l+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(r)}const gf=["history","path","basename","stem","extname","dirname"];class T0{constructor(r){let l;r?Wf(r)?l={path:r}:typeof r=="string"||rE(r)?l={value:r}:l=r:l={},this.cwd="cwd"in l?"":Wj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<gf.length;){const u=gf[i];u in l&&l[u]!==void 0&&l[u]!==null&&(this[u]=u==="history"?[...l[u]]:l[u])}let s;for(s in l)gf.includes(s)||(this[s]=l[s])}get basename(){return typeof this.path=="string"?Hn.basename(this.path):void 0}set basename(r){xf(r,"basename"),yf(r,"basename"),this.path=Hn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Hn.dirname(this.path):void 0}set dirname(r){Xy(this.basename,"dirname"),this.path=Hn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Hn.extname(this.path):void 0}set extname(r){if(yf(r,"extname"),Xy(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Hn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Wf(r)&&(r=tE(r)),xf(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Hn.basename(this.path,this.extname):void 0}set stem(r){xf(r,"stem"),yf(r,"stem"),this.path=Hn.join(this.dirname||"",r+(this.extname||""))}fail(r,l,i){const s=this.message(r,l,i);throw s.fatal=!0,s}info(r,l,i){const s=this.message(r,l,i);return s.fatal=void 0,s}message(r,l,i){const s=new Ft(r,l,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function yf(t,r){if(t&&t.includes(Hn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Hn.sep+"`")}function xf(t,r){if(!t)throw new Error("`"+r+"` cannot be empty")}function Xy(t,r){if(!t)throw new Error("Setting `"+r+"` requires `path` to be set too")}function rE(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const lE=(function(t){const i=this.constructor.prototype,s=i[t],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),aE={}.hasOwnProperty;class Ld extends lE{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Yj()}copy(){const r=new Ld;let l=-1;for(;++l<this.attachers.length;){const i=this.attachers[l];r.use(...i)}return r.data(pf(!0,{},this.namespace)),r}data(r,l){return typeof r=="string"?arguments.length===2?(Sf("data",this.frozen),this.namespace[r]=l,this):aE.call(this.namespace,r)&&this.namespace[r]||void 0:r?(Sf("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[l,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=l.call(r,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const l=is(r),i=this.parser||this.Parser;return bf("parse",i),i(String(l),l)}process(r,l){const i=this;return this.freeze(),bf("process",this.parser||this.Parser),vf("process",this.compiler||this.Compiler),l?s(void 0,l):new Promise(s);function s(u,c){const f=is(r),p=i.parse(f);i.run(p,f,function(x,y,b){if(x||!y||!b)return m(x);const v=y,C=i.stringify(v,b);sE(C)?b.value=C:b.result=C,m(x,b)});function m(x,y){x||!y?c(x):u?u(y):l(void 0,y)}}}processSync(r){let l=!1,i;return this.freeze(),bf("processSync",this.parser||this.Parser),vf("processSync",this.compiler||this.Compiler),this.process(r,s),Ky("processSync","process",l),i;function s(u,c){l=!0,Gy(u),i=c}}run(r,l,i){Qy(r),this.freeze();const s=this.transformers;return!i&&typeof l=="function"&&(i=l,l=void 0),i?u(void 0,i):new Promise(u);function u(c,f){const p=is(l);s.run(r,p,m);function m(x,y,b){const v=y||r;x?f(x):c?c(v):i(void 0,v,b)}}}runSync(r,l){let i=!1,s;return this.run(r,l,u),Ky("runSync","run",i),s;function u(c,f){Gy(c),s=f,i=!0}}stringify(r,l){this.freeze();const i=is(l),s=this.compiler||this.Compiler;return vf("stringify",s),Qy(r),s(r,i)}use(r,...l){const i=this.attachers,s=this.namespace;if(Sf("use",this.frozen),r!=null)if(typeof r=="function")p(r,l);else if(typeof r=="object")Array.isArray(r)?f(r):c(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function u(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[x,...y]=m;p(x,y)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(m.plugins),m.settings&&(s.settings=pf(!0,s.settings,m.settings))}function f(m){let x=-1;if(m!=null)if(Array.isArray(m))for(;++x<m.length;){const y=m[x];u(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,x){let y=-1,b=-1;for(;++y<i.length;)if(i[y][0]===m){b=y;break}if(b===-1)i.push([m,...x]);else if(x.length>0){let[v,...C]=x;const N=i[b][1];Jf(N)&&Jf(v)&&(v=pf(!0,N,v)),i[b]=[m,v,...C]}}}}const iE=new Ld().freeze();function bf(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function vf(t,r){if(typeof r!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Sf(t,r){if(r)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Qy(t){if(!Jf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Ky(t,r,l){if(!l)throw new Error("`"+t+"` finished async. Use `"+r+"` instead")}function is(t){return oE(t)?t:new T0(t)}function oE(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function sE(t){return typeof t=="string"||uE(t)}function uE(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const cE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Zy=[],Jy={allowDangerousHtml:!0},fE=/^(https?|ircs?|mailto|xmpp)$/i,dE=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function hE(t){const r=mE(t),l=pE(t);return gE(r.runSync(r.parse(l),l),t)}function mE(t){const r=t.rehypePlugins||Zy,l=t.remarkPlugins||Zy,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Jy}:Jy;return iE().use(PN).use(l).use(Vj,i).use(r)}function pE(t){const r=t.children||"",l=new T0;return typeof r=="string"&&(l.value=r),l}function gE(t,r){const l=r.allowedElements,i=r.allowElement,s=r.components,u=r.disallowedElements,c=r.skipHtml,f=r.unwrapDisallowed,p=r.urlTransform||yE;for(const x of dE)Object.hasOwn(r,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+cE+x.id,void 0);return r.className&&(t={type:"element",tagName:"div",properties:{className:r.className},children:t.type==="root"?t.children:[t]}),_d(t,m),Mk(t,{Fragment:h.Fragment,components:s,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function m(x,y,b){if(x.type==="raw"&&b&&typeof y=="number")return c?b.children.splice(y,1):b.children[y]={type:"text",value:x.value},y;if(x.type==="element"){let v;for(v in ff)if(Object.hasOwn(ff,v)&&Object.hasOwn(x.properties,v)){const C=x.properties[v],N=ff[v];(N===null||N.includes(x.tagName))&&(x.properties[v]=p(String(C||""),v,x))}}if(x.type==="element"){let v=l?!l.includes(x.tagName):u?u.includes(x.tagName):!1;if(!v&&i&&typeof y=="number"&&(v=!i(x,y,b)),v&&b&&typeof y=="number")return f&&x.children?b.children.splice(y,1,...x.children):b.children.splice(y,1),y}}}function yE(t){const r=t.indexOf(":"),l=t.indexOf("?"),i=t.indexOf("#"),s=t.indexOf("/");return r===-1||s!==-1&&r>s||l!==-1&&r>l||i!==-1&&r>i||fE.test(t.slice(0,r))?t:""}function Wy(t,r){const l=String(t);if(typeof r!="string")throw new TypeError("Expected character");let i=0,s=l.indexOf(r);for(;s!==-1;)i++,s=l.indexOf(r,s+r.length);return i}function xE(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function bE(t,r,l){const s=Rs((l||{}).ignore||[]),u=vE(r);let c=-1;for(;++c<u.length;)E0(t,"text",f);function f(m,x){let y=-1,b;for(;++y<x.length;){const v=x[y],C=b?b.children:void 0;if(s(v,C?C.indexOf(v):void 0,b))return;b=v}if(b)return p(m,x)}function p(m,x){const y=x[x.length-1],b=u[c][0],v=u[c][1];let C=0;const A=y.children.indexOf(m);let E=!1,M=[];b.lastIndex=0;let O=b.exec(m.value);for(;O;){const $=O.index,P={index:O.index,input:O.input,stack:[...x,m]};let L=v(...O,P);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?b.lastIndex=$+1:(C!==$&&M.push({type:"text",value:m.value.slice(C,$)}),Array.isArray(L)?M.push(...L):L&&M.push(L),C=$+O[0].length,E=!0),!b.global)break;O=b.exec(m.value)}return E?(C<m.value.length&&M.push({type:"text",value:m.value.slice(C)}),y.children.splice(A,1,...M)):M=[m],A+M.length}}function vE(t){const r=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const l=!t[0]||Array.isArray(t[0])?t:[t];let i=-1;for(;++i<l.length;){const s=l[i];r.push([SE(s[0]),wE(s[1])])}return r}function SE(t){return typeof t=="string"?new RegExp(xE(t),"g"):t}function wE(t){return typeof t=="function"?t:function(){return t}}const wf="phrasing",kf=["autolink","link","image","label"];function kE(){return{transforms:[ME],enter:{literalAutolink:NE,literalAutolinkEmail:Cf,literalAutolinkHttp:Cf,literalAutolinkWww:Cf},exit:{literalAutolink:AE,literalAutolinkEmail:TE,literalAutolinkHttp:jE,literalAutolinkWww:EE}}}function CE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:wf,notInConstruct:kf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:wf,notInConstruct:kf},{character:":",before:"[ps]",after:"\\/",inConstruct:wf,notInConstruct:kf}]}}function NE(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Cf(t){this.config.enter.autolinkProtocol.call(this,t)}function jE(t){this.config.exit.autolinkProtocol.call(this,t)}function EE(t){this.config.exit.data.call(this,t);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(t)}function TE(t){this.config.exit.autolinkEmail.call(this,t)}function AE(t){this.exit(t)}function ME(t){bE(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,DE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),RE]],{ignore:["link","linkReference"]})}function DE(t,r,l,i,s){let u="";if(!A0(s)||(/^w/i.test(r)&&(l=r+l,r="",u="http://"),!zE(l)))return!1;const c=OE(l+i);if(!c[0])return!1;const f={type:"link",title:null,url:u+r+c[0],children:[{type:"text",value:r+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function RE(t,r,l,i){return!A0(i,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+l,children:[{type:"text",value:r+"@"+l}]}}function zE(t){const r=t.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function OE(t){const r=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!r)return[t,void 0];t=t.slice(0,r.index);let l=r[0],i=l.indexOf(")");const s=Wy(t,"(");let u=Wy(t,")");for(;i!==-1&&s>u;)t+=l.slice(0,i+1),l=l.slice(i+1),i=l.indexOf(")"),u++;return[t,l]}function A0(t,r){const l=t.input.charCodeAt(t.index-1);return(t.index===0||gl(l)||As(l))&&(!r||l!==47)}M0.peek=$E;function _E(){this.buffer()}function LE(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function UE(){this.buffer()}function BE(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function HE(t){const r=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=zn(this.sliceSerialize(t)).toLowerCase(),l.label=r}function qE(t){this.exit(t)}function IE(t){const r=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=zn(this.sliceSerialize(t)).toLowerCase(),l.label=r}function VE(t){this.exit(t)}function $E(){return"["}function M0(t,r,l,i){const s=l.createTracker(i);let u=s.move("[^");const c=l.enter("footnoteReference"),f=l.enter("reference");return u+=s.move(l.safe(l.associationId(t),{after:"]",before:u})),f(),c(),u+=s.move("]"),u}function FE(){return{enter:{gfmFootnoteCallString:_E,gfmFootnoteCall:LE,gfmFootnoteDefinitionLabelString:UE,gfmFootnoteDefinition:BE},exit:{gfmFootnoteCallString:HE,gfmFootnoteCall:qE,gfmFootnoteDefinitionLabelString:IE,gfmFootnoteDefinition:VE}}}function YE(t){let r=!1;return t&&t.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:l,footnoteReference:M0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(i,s,u,c){const f=u.createTracker(c);let p=f.move("[^");const m=u.enter("footnoteDefinition"),x=u.enter("label");return p+=f.move(u.safe(u.associationId(i),{before:p,after:"]"})),x(),p+=f.move("]:"),i.children&&i.children.length>0&&(f.shift(4),p+=f.move((r?`
|
|
531
|
+
`:" ")+u.indentLines(u.containerFlow(i,f.current()),r?D0:GE))),m(),p}}function GE(t,r,l){return r===0?t:D0(t,r,l)}function D0(t,r,l){return(l?"":" ")+t}const PE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];R0.peek=JE;function XE(){return{canContainEols:["delete"],enter:{strikethrough:KE},exit:{strikethrough:ZE}}}function QE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:PE}],handlers:{delete:R0}}}function KE(t){this.enter({type:"delete",children:[]},t)}function ZE(t){this.exit(t)}function R0(t,r,l,i){const s=l.createTracker(i),u=l.enter("strikethrough");let c=s.move("~~");return c+=l.containerPhrasing(t,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),u(),c}function JE(){return"~"}function WE(t){return t.length}function e4(t,r){const l=r||{},i=(l.align||[]).concat(),s=l.stringLength||WE,u=[],c=[],f=[],p=[];let m=0,x=-1;for(;++x<t.length;){const N=[],A=[];let E=-1;for(t[x].length>m&&(m=t[x].length);++E<t[x].length;){const M=t4(t[x][E]);if(l.alignDelimiters!==!1){const O=s(M);A[E]=O,(p[E]===void 0||O>p[E])&&(p[E]=O)}N.push(M)}c[x]=N,f[x]=A}let y=-1;if(typeof i=="object"&&"length"in i)for(;++y<m;)u[y]=ex(i[y]);else{const N=ex(i);for(;++y<m;)u[y]=N}y=-1;const b=[],v=[];for(;++y<m;){const N=u[y];let A="",E="";N===99?(A=":",E=":"):N===108?A=":":N===114&&(E=":");let M=l.alignDelimiters===!1?1:Math.max(1,p[y]-A.length-E.length);const O=A+"-".repeat(M)+E;l.alignDelimiters!==!1&&(M=A.length+M+E.length,M>p[y]&&(p[y]=M),v[y]=M),b[y]=O}c.splice(1,0,b),f.splice(1,0,v),x=-1;const C=[];for(;++x<c.length;){const N=c[x],A=f[x];y=-1;const E=[];for(;++y<m;){const M=N[y]||"";let O="",$="";if(l.alignDelimiters!==!1){const P=p[y]-(A[y]||0),L=u[y];L===114?O=" ".repeat(P):L===99?P%2?(O=" ".repeat(P/2+.5),$=" ".repeat(P/2-.5)):(O=" ".repeat(P/2),$=O):$=" ".repeat(P)}l.delimiterStart!==!1&&!y&&E.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&M==="")&&(l.delimiterStart!==!1||y)&&E.push(" "),l.alignDelimiters!==!1&&E.push(O),E.push(M),l.alignDelimiters!==!1&&E.push($),l.padding!==!1&&E.push(" "),(l.delimiterEnd!==!1||y!==m-1)&&E.push("|")}C.push(l.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return C.join(`
|
|
532
|
+
`)}function t4(t){return t==null?"":String(t)}function ex(t){const r=typeof t=="string"?t.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function n4(t,r,l,i){const s=l.enter("blockquote"),u=l.createTracker(i);u.move("> "),u.shift(2);const c=l.indentLines(l.containerFlow(t,u.current()),r4);return s(),c}function r4(t,r,l){return">"+(l?"":" ")+t}function l4(t,r){return tx(t,r.inConstruct,!0)&&!tx(t,r.notInConstruct,!1)}function tx(t,r,l){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return l;let i=-1;for(;++i<r.length;)if(t.includes(r[i]))return!0;return!1}function nx(t,r,l,i){let s=-1;for(;++s<l.unsafe.length;)if(l.unsafe[s].character===`
|
|
533
|
+
`&&l4(l.stack,l.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
534
|
+
`}function a4(t,r){const l=String(t);let i=l.indexOf(r),s=i,u=0,c=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++u>c&&(c=u):u=1,s=i+r.length,i=l.indexOf(r,s);return c}function i4(t,r){return!!(r.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function o4(t){const r=t.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function s4(t,r,l,i){const s=o4(l),u=t.value||"",c=s==="`"?"GraveAccent":"Tilde";if(i4(t,l)){const y=l.enter("codeIndented"),b=l.indentLines(u,u4);return y(),b}const f=l.createTracker(i),p=s.repeat(Math.max(a4(u,s)+1,3)),m=l.enter("codeFenced");let x=f.move(p);if(t.lang){const y=l.enter(`codeFencedLang${c}`);x+=f.move(l.safe(t.lang,{before:x,after:" ",encode:["`"],...f.current()})),y()}if(t.lang&&t.meta){const y=l.enter(`codeFencedMeta${c}`);x+=f.move(" "),x+=f.move(l.safe(t.meta,{before:x,after:`
|
|
535
|
+
`,encode:["`"],...f.current()})),y()}return x+=f.move(`
|
|
536
|
+
`),u&&(x+=f.move(u+`
|
|
537
|
+
`)),x+=f.move(p),m(),x}function u4(t,r,l){return(l?"":" ")+t}function Ud(t){const r=t.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function c4(t,r,l,i){const s=Ud(l),u=s==='"'?"Quote":"Apostrophe",c=l.enter("definition");let f=l.enter("label");const p=l.createTracker(i);let m=p.move("[");return m+=p.move(l.safe(l.associationId(t),{before:m,after:"]",...p.current()})),m+=p.move("]: "),f(),!t.url||/[\0- \u007F]/.test(t.url)?(f=l.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(l.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(f=l.enter("destinationRaw"),m+=p.move(l.safe(t.url,{before:m,after:t.title?" ":`
|
|
538
|
+
`,...p.current()}))),f(),t.title&&(f=l.enter(`title${u}`),m+=p.move(" "+s),m+=p.move(l.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),f()),c(),m}function f4(t){const r=t.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function Di(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Ss(t,r,l){const i=ga(t),s=ga(r);return i===void 0?s===void 0?l==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}z0.peek=d4;function z0(t,r,l,i){const s=f4(l),u=l.enter("emphasis"),c=l.createTracker(i),f=c.move(s);let p=c.move(l.containerPhrasing(t,{after:s,before:f,...c.current()}));const m=p.charCodeAt(0),x=Ss(i.before.charCodeAt(i.before.length-1),m,s);x.inside&&(p=Di(m)+p.slice(1));const y=p.charCodeAt(p.length-1),b=Ss(i.after.charCodeAt(0),y,s);b.inside&&(p=p.slice(0,-1)+Di(y));const v=c.move(s);return u(),l.attentionEncodeSurroundingInfo={after:b.outside,before:x.outside},f+p+v}function d4(t,r,l){return l.options.emphasis||"*"}function h4(t,r){let l=!1;return _d(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return l=!0,Kf}),!!((!t.depth||t.depth<3)&&Td(t)&&(r.options.setext||l))}function m4(t,r,l,i){const s=Math.max(Math.min(6,t.depth||1),1),u=l.createTracker(i);if(h4(t,l)){const x=l.enter("headingSetext"),y=l.enter("phrasing"),b=l.containerPhrasing(t,{...u.current(),before:`
|
|
539
|
+
`,after:`
|
|
540
|
+
`});return y(),x(),b+`
|
|
541
|
+
`+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
542
|
+
`))+1))}const c="#".repeat(s),f=l.enter("headingAtx"),p=l.enter("phrasing");u.move(c+" ");let m=l.containerPhrasing(t,{before:"# ",after:`
|
|
543
|
+
`,...u.current()});return/^[\t ]/.test(m)&&(m=Di(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,l.options.closeAtx&&(m+=" "+c),p(),f(),m}O0.peek=p4;function O0(t){return t.value||""}function p4(){return"<"}_0.peek=g4;function _0(t,r,l,i){const s=Ud(l),u=s==='"'?"Quote":"Apostrophe",c=l.enter("image");let f=l.enter("label");const p=l.createTracker(i);let m=p.move("![");return m+=p.move(l.safe(t.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),f(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(f=l.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(l.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(f=l.enter("destinationRaw"),m+=p.move(l.safe(t.url,{before:m,after:t.title?" ":")",...p.current()}))),f(),t.title&&(f=l.enter(`title${u}`),m+=p.move(" "+s),m+=p.move(l.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),f()),m+=p.move(")"),c(),m}function g4(){return"!"}L0.peek=y4;function L0(t,r,l,i){const s=t.referenceType,u=l.enter("imageReference");let c=l.enter("label");const f=l.createTracker(i);let p=f.move("![");const m=l.safe(t.alt,{before:p,after:"]",...f.current()});p+=f.move(m+"]["),c();const x=l.stack;l.stack=[],c=l.enter("reference");const y=l.safe(l.associationId(t),{before:p,after:"]",...f.current()});return c(),l.stack=x,u(),s==="full"||!m||m!==y?p+=f.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function y4(){return"!"}U0.peek=x4;function U0(t,r,l){let i=t.value||"",s="`",u=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++u<l.unsafe.length;){const c=l.unsafe[u],f=l.compilePattern(c);let p;if(c.atBreak)for(;p=f.exec(i);){let m=p.index;i.charCodeAt(m)===10&&i.charCodeAt(m-1)===13&&m--,i=i.slice(0,m)+" "+i.slice(p.index+1)}}return s+i+s}function x4(){return"`"}function B0(t,r){const l=Td(t);return!!(!r.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(l===t.url||"mailto:"+l===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}H0.peek=b4;function H0(t,r,l,i){const s=Ud(l),u=s==='"'?"Quote":"Apostrophe",c=l.createTracker(i);let f,p;if(B0(t,l)){const x=l.stack;l.stack=[],f=l.enter("autolink");let y=c.move("<");return y+=c.move(l.containerPhrasing(t,{before:y,after:">",...c.current()})),y+=c.move(">"),f(),l.stack=x,y}f=l.enter("link"),p=l.enter("label");let m=c.move("[");return m+=c.move(l.containerPhrasing(t,{before:m,after:"](",...c.current()})),m+=c.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=l.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(l.safe(t.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(p=l.enter("destinationRaw"),m+=c.move(l.safe(t.url,{before:m,after:t.title?" ":")",...c.current()}))),p(),t.title&&(p=l.enter(`title${u}`),m+=c.move(" "+s),m+=c.move(l.safe(t.title,{before:m,after:s,...c.current()})),m+=c.move(s),p()),m+=c.move(")"),f(),m}function b4(t,r,l){return B0(t,l)?"<":"["}q0.peek=v4;function q0(t,r,l,i){const s=t.referenceType,u=l.enter("linkReference");let c=l.enter("label");const f=l.createTracker(i);let p=f.move("[");const m=l.containerPhrasing(t,{before:p,after:"]",...f.current()});p+=f.move(m+"]["),c();const x=l.stack;l.stack=[],c=l.enter("reference");const y=l.safe(l.associationId(t),{before:p,after:"]",...f.current()});return c(),l.stack=x,u(),s==="full"||!m||m!==y?p+=f.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function v4(){return"["}function Bd(t){const r=t.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function S4(t){const r=Bd(t),l=t.options.bulletOther;if(!l)return r==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+l+"`) to be different");return l}function w4(t){const r=t.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function I0(t){const r=t.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function k4(t,r,l,i){const s=l.enter("list"),u=l.bulletCurrent;let c=t.ordered?w4(l):Bd(l);const f=t.ordered?c==="."?")":".":S4(l);let p=r&&l.bulletLastUsed?c===l.bulletLastUsed:!1;if(!t.ordered){const x=t.children?t.children[0]:void 0;if((c==="*"||c==="-")&&x&&(!x.children||!x.children[0])&&l.stack[l.stack.length-1]==="list"&&l.stack[l.stack.length-2]==="listItem"&&l.stack[l.stack.length-3]==="list"&&l.stack[l.stack.length-4]==="listItem"&&l.indexStack[l.indexStack.length-1]===0&&l.indexStack[l.indexStack.length-2]===0&&l.indexStack[l.indexStack.length-3]===0&&(p=!0),I0(l)===c&&x){let y=-1;for(;++y<t.children.length;){const b=t.children[y];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=f),l.bulletCurrent=c;const m=l.containerFlow(t,i);return l.bulletLastUsed=c,l.bulletCurrent=u,s(),m}function C4(t){const r=t.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function N4(t,r,l,i){const s=C4(l);let u=l.bulletCurrent||Bd(l);r&&r.type==="list"&&r.ordered&&(u=(typeof r.start=="number"&&r.start>-1?r.start:1)+(l.options.incrementListMarker===!1?0:r.children.indexOf(t))+u);let c=u.length+1;(s==="tab"||s==="mixed"&&(r&&r.type==="list"&&r.spread||t.spread))&&(c=Math.ceil(c/4)*4);const f=l.createTracker(i);f.move(u+" ".repeat(c-u.length)),f.shift(c);const p=l.enter("listItem"),m=l.indentLines(l.containerFlow(t,f.current()),x);return p(),m;function x(y,b,v){return b?(v?"":" ".repeat(c))+y:(v?u:u+" ".repeat(c-u.length))+y}}function j4(t,r,l,i){const s=l.enter("paragraph"),u=l.enter("phrasing"),c=l.containerPhrasing(t,i);return u(),s(),c}const E4=Rs(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function T4(t,r,l,i){return(t.children.some(function(c){return E4(c)})?l.containerPhrasing:l.containerFlow).call(l,t,i)}function A4(t){const r=t.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}V0.peek=M4;function V0(t,r,l,i){const s=A4(l),u=l.enter("strong"),c=l.createTracker(i),f=c.move(s+s);let p=c.move(l.containerPhrasing(t,{after:s,before:f,...c.current()}));const m=p.charCodeAt(0),x=Ss(i.before.charCodeAt(i.before.length-1),m,s);x.inside&&(p=Di(m)+p.slice(1));const y=p.charCodeAt(p.length-1),b=Ss(i.after.charCodeAt(0),y,s);b.inside&&(p=p.slice(0,-1)+Di(y));const v=c.move(s+s);return u(),l.attentionEncodeSurroundingInfo={after:b.outside,before:x.outside},f+p+v}function M4(t,r,l){return l.options.strong||"*"}function D4(t,r,l,i){return l.safe(t.value,i)}function R4(t){const r=t.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function z4(t,r,l){const i=(I0(l)+(l.options.ruleSpaces?" ":"")).repeat(R4(l));return l.options.ruleSpaces?i.slice(0,-1):i}const $0={blockquote:n4,break:nx,code:s4,definition:c4,emphasis:z0,hardBreak:nx,heading:m4,html:O0,image:_0,imageReference:L0,inlineCode:U0,link:H0,linkReference:q0,list:k4,listItem:N4,paragraph:j4,root:T4,strong:V0,text:D4,thematicBreak:z4};function O4(){return{enter:{table:_4,tableData:rx,tableHeader:rx,tableRow:U4},exit:{codeText:B4,table:L4,tableData:Nf,tableHeader:Nf,tableRow:Nf}}}function _4(t){const r=t._align;this.enter({type:"table",align:r.map(function(l){return l==="none"?null:l}),children:[]},t),this.data.inTable=!0}function L4(t){this.exit(t),this.data.inTable=void 0}function U4(t){this.enter({type:"tableRow",children:[]},t)}function Nf(t){this.exit(t)}function rx(t){this.enter({type:"tableCell",children:[]},t)}function B4(t){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,H4));const l=this.stack[this.stack.length-1];l.type,l.value=r,this.exit(t)}function H4(t,r){return r==="|"?r:t}function q4(t){const r=t||{},l=r.tableCellPadding,i=r.tablePipeAlign,s=r.stringLength,u=l?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
544
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:c,tableCell:p,tableRow:f}};function c(v,C,N,A){return m(x(v,N,A),v.align)}function f(v,C,N,A){const E=y(v,N,A),M=m([E]);return M.slice(0,M.indexOf(`
|
|
545
|
+
`))}function p(v,C,N,A){const E=N.enter("tableCell"),M=N.enter("phrasing"),O=N.containerPhrasing(v,{...A,before:u,after:u});return M(),E(),O}function m(v,C){return e4(v,{align:C,alignDelimiters:i,padding:l,stringLength:s})}function x(v,C,N){const A=v.children;let E=-1;const M=[],O=C.enter("table");for(;++E<A.length;)M[E]=y(A[E],C,N);return O(),M}function y(v,C,N){const A=v.children;let E=-1;const M=[],O=C.enter("tableRow");for(;++E<A.length;)M[E]=p(A[E],v,C,N);return O(),M}function b(v,C,N){let A=$0.inlineCode(v,C,N);return N.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function I4(){return{exit:{taskListCheckValueChecked:lx,taskListCheckValueUnchecked:lx,paragraph:$4}}}function V4(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:F4}}}function lx(t){const r=this.stack[this.stack.length-2];r.type,r.checked=t.type==="taskListCheckValueChecked"}function $4(t){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const l=this.stack[this.stack.length-1];l.type;const i=l.children[0];if(i&&i.type==="text"){const s=r.children;let u=-1,c;for(;++u<s.length;){const f=s[u];if(f.type==="paragraph"){c=f;break}}c===l&&(i.value=i.value.slice(1),i.value.length===0?l.children.shift():l.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,l.position.start=Object.assign({},i.position.start)))}}this.exit(t)}function F4(t,r,l,i){const s=t.children[0],u=typeof t.checked=="boolean"&&s&&s.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",f=l.createTracker(i);u&&f.move(c);let p=$0.listItem(t,r,l,{...i,...f.current()});return u&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(x){return x+c}}function Y4(){return[kE(),FE(),XE(),O4(),I4()]}function G4(t){return{extensions:[CE(),YE(t),QE(),q4(t),V4()]}}const P4={tokenize:W4,partial:!0},F0={tokenize:e3,partial:!0},Y0={tokenize:t3,partial:!0},G0={tokenize:n3,partial:!0},X4={tokenize:r3,partial:!0},P0={name:"wwwAutolink",tokenize:Z4,previous:Q0},X0={name:"protocolAutolink",tokenize:J4,previous:K0},ur={name:"emailAutolink",tokenize:K4,previous:Z0},In={};function Q4(){return{text:In}}let fl=48;for(;fl<123;)In[fl]=ur,fl++,fl===58?fl=65:fl===91&&(fl=97);In[43]=ur;In[45]=ur;In[46]=ur;In[95]=ur;In[72]=[ur,X0];In[104]=[ur,X0];In[87]=[ur,P0];In[119]=[ur,P0];function K4(t,r,l){const i=this;let s,u;return c;function c(y){return!ed(y)||!Z0.call(i,i.previous)||Hd(i.events)?l(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),f(y))}function f(y){return ed(y)?(t.consume(y),f):y===64?(t.consume(y),p):l(y)}function p(y){return y===46?t.check(X4,x,m)(y):y===45||y===95||Vt(y)?(u=!0,t.consume(y),p):x(y)}function m(y){return t.consume(y),s=!0,p}function x(y){return u&&s&&Pt(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),r(y)):l(y)}}function Z4(t,r,l){const i=this;return s;function s(c){return c!==87&&c!==119||!Q0.call(i,i.previous)||Hd(i.events)?l(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(P4,t.attempt(F0,t.attempt(Y0,u),l),l)(c))}function u(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),r(c)}}function J4(t,r,l){const i=this;let s="",u=!1;return c;function c(y){return(y===72||y===104)&&K0.call(i,i.previous)&&!Hd(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),t.consume(y),f):l(y)}function f(y){if(Pt(y)&&s.length<5)return s+=String.fromCodePoint(y),t.consume(y),f;if(y===58){const b=s.toLowerCase();if(b==="http"||b==="https")return t.consume(y),p}return l(y)}function p(y){return y===47?(t.consume(y),u?m:(u=!0,p)):l(y)}function m(y){return y===null||xs(y)||ot(y)||gl(y)||As(y)?l(y):t.attempt(F0,t.attempt(Y0,x),l)(y)}function x(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),r(y)}}function W4(t,r,l){let i=0;return s;function s(c){return(c===87||c===119)&&i<3?(i++,t.consume(c),s):c===46&&i===3?(t.consume(c),u):l(c)}function u(c){return c===null?l(c):r(c)}}function e3(t,r,l){let i,s,u;return c;function c(m){return m===46||m===95?t.check(G0,p,f)(m):m===null||ot(m)||gl(m)||m!==45&&As(m)?p(m):(u=!0,t.consume(m),c)}function f(m){return m===95?i=!0:(s=i,i=void 0),t.consume(m),c}function p(m){return s||i||!u?l(m):r(m)}}function t3(t,r){let l=0,i=0;return s;function s(c){return c===40?(l++,t.consume(c),s):c===41&&i<l?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?t.check(G0,r,u)(c):c===null||ot(c)||gl(c)?r(c):(t.consume(c),s)}function u(c){return c===41&&i++,t.consume(c),s}}function n3(t,r,l){return i;function i(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(t.consume(f),i):f===38?(t.consume(f),u):f===93?(t.consume(f),s):f===60||f===null||ot(f)||gl(f)?r(f):l(f)}function s(f){return f===null||f===40||f===91||ot(f)||gl(f)?r(f):i(f)}function u(f){return Pt(f)?c(f):l(f)}function c(f){return f===59?(t.consume(f),i):Pt(f)?(t.consume(f),c):l(f)}}function r3(t,r,l){return i;function i(u){return t.consume(u),s}function s(u){return Vt(u)?l(u):r(u)}}function Q0(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ot(t)}function K0(t){return!Pt(t)}function Z0(t){return!(t===47||ed(t))}function ed(t){return t===43||t===45||t===46||t===95||Vt(t)}function Hd(t){let r=t.length,l=!1;for(;r--;){const i=t[r][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){l=!0;break}if(i._gfmAutolinkLiteralWalkedInto){l=!1;break}}return t.length>0&&!l&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const l3={tokenize:d3,partial:!0};function a3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:u3,continuation:{tokenize:c3},exit:f3}},text:{91:{name:"gfmFootnoteCall",tokenize:s3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:i3,resolveTo:o3}}}}function i3(t,r,l){const i=this;let s=i.events.length;const u=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;s--;){const p=i.events[s][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return f;function f(p){if(!c||!c._balanced)return l(p);const m=zn(i.sliceSerialize({start:c.end,end:i.now()}));return m.codePointAt(0)!==94||!u.includes(m.slice(1))?l(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),r(p))}}function o3(t,r){let l=t.length;for(;l--;)if(t[l][1].type==="labelImage"&&t[l][0]==="enter"){t[l][1];break}t[l+1][1].type="data",t[l+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[l+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[l+3][1].end),end:Object.assign({},t[l+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[t[l+1],t[l+2],["enter",i,r],t[l+3],t[l+4],["enter",s,r],["exit",s,r],["enter",u,r],["enter",c,r],["exit",c,r],["exit",u,r],t[t.length-2],t[t.length-1],["exit",i,r]];return t.splice(l,t.length-l+1,...f),t}function s3(t,r,l){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u=0,c;return f;function f(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?l(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(y){if(u>999||y===93&&!c||y===null||y===91||ot(y))return l(y);if(y===93){t.exit("chunkString");const b=t.exit("gfmFootnoteCallString");return s.includes(zn(i.sliceSerialize(b)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),r):l(y)}return ot(y)||(c=!0),u++,t.consume(y),y===92?x:m}function x(y){return y===91||y===92||y===93?(t.consume(y),u++,m):m(y)}}function u3(t,r,l){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u,c=0,f;return p;function p(C){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(C){return C===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",x):l(C)}function x(C){if(c>999||C===93&&!f||C===null||C===91||ot(C))return l(C);if(C===93){t.exit("chunkString");const N=t.exit("gfmFootnoteDefinitionLabelString");return u=zn(i.sliceSerialize(N)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return ot(C)||(f=!0),c++,t.consume(C),C===92?y:x}function y(C){return C===91||C===92||C===93?(t.consume(C),c++,x):x(C)}function b(C){return C===58?(t.enter("definitionMarker"),t.consume(C),t.exit("definitionMarker"),s.includes(u)||s.push(u),Xe(t,v,"gfmFootnoteDefinitionWhitespace")):l(C)}function v(C){return r(C)}}function c3(t,r,l){return t.check(_i,r,t.attempt(l3,r,l))}function f3(t){t.exit("gfmFootnoteDefinition")}function d3(t,r,l){const i=this;return Xe(t,s,"gfmFootnoteDefinitionIndent",5);function s(u){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?r(u):l(u)}}function h3(t){let l=(t||{}).singleTilde;const i={name:"strikethrough",tokenize:u,resolveAll:s};return l==null&&(l=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(c,f){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let m=p;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[p][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const x={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[p][1].end)},y={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[p][1].start)},b=[["enter",x,f],["enter",c[m][1],f],["exit",c[m][1],f],["enter",y,f]],v=f.parser.constructs.insideSpan.null;v&&mn(b,b.length,0,Ms(v,c.slice(m+1,p),f)),mn(b,b.length,0,[["exit",y,f],["enter",c[p][1],f],["exit",c[p][1],f],["exit",x,f]]),mn(c,m-1,p-m+3,b),p=m+b.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function u(c,f,p){const m=this.previous,x=this.events;let y=0;return b;function b(C){return m===126&&x[x.length-1][1].type!=="characterEscape"?p(C):(c.enter("strikethroughSequenceTemporary"),v(C))}function v(C){const N=ga(m);if(C===126)return y>1?p(C):(c.consume(C),y++,v);if(y<2&&!l)return p(C);const A=c.exit("strikethroughSequenceTemporary"),E=ga(C);return A._open=!E||E===2&&!!N,A._close=!N||N===2&&!!E,f(C)}}}class m3{constructor(){this.map=[]}add(r,l,i){p3(this,r,l,i)}consume(r){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let l=this.map.length;const i=[];for(;l>0;)l-=1,i.push(r.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),r.length=this.map[l][0];i.push(r.slice()),r.length=0;let s=i.pop();for(;s;){for(const u of s)r.push(u);s=i.pop()}this.map.length=0}}function p3(t,r,l,i){let s=0;if(!(l===0&&i.length===0)){for(;s<t.map.length;){if(t.map[s][0]===r){t.map[s][1]+=l,t.map[s][2].push(...i);return}s+=1}t.map.push([r,l,i])}}function g3(t,r){let l=!1;const i=[];for(;r<t.length;){const s=t[r];if(l){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(t[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[r-1][1].type==="tableDelimiterMarker"){const u=i.length-1;i[u]=i[u]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(l=!0);r+=1}return i}function y3(){return{flow:{null:{name:"table",tokenize:x3,resolveAll:b3}}}}function x3(t,r,l){const i=this;let s=0,u=0,c;return f;function f(H){let X=i.events.length-1;for(;X>-1;){const ue=i.events[X][1].type;if(ue==="lineEnding"||ue==="linePrefix")X--;else break}const G=X>-1?i.events[X][1].type:null,fe=G==="tableHead"||G==="tableRow"?L:p;return fe===L&&i.parser.lazy[i.now().line]?l(H):fe(H)}function p(H){return t.enter("tableHead"),t.enter("tableRow"),m(H)}function m(H){return H===124||(c=!0,u+=1),x(H)}function x(H){return H===null?l(H):je(H)?u>1?(u=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(H),t.exit("lineEnding"),v):l(H):qe(H)?Xe(t,x,"whitespace")(H):(u+=1,c&&(c=!1,s+=1),H===124?(t.enter("tableCellDivider"),t.consume(H),t.exit("tableCellDivider"),c=!0,x):(t.enter("data"),y(H)))}function y(H){return H===null||H===124||ot(H)?(t.exit("data"),x(H)):(t.consume(H),H===92?b:y)}function b(H){return H===92||H===124?(t.consume(H),y):y(H)}function v(H){return i.interrupt=!1,i.parser.lazy[i.now().line]?l(H):(t.enter("tableDelimiterRow"),c=!1,qe(H)?Xe(t,C,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):C(H))}function C(H){return H===45||H===58?A(H):H===124?(c=!0,t.enter("tableCellDivider"),t.consume(H),t.exit("tableCellDivider"),N):P(H)}function N(H){return qe(H)?Xe(t,A,"whitespace")(H):A(H)}function A(H){return H===58?(u+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(H),t.exit("tableDelimiterMarker"),E):H===45?(u+=1,E(H)):H===null||je(H)?$(H):P(H)}function E(H){return H===45?(t.enter("tableDelimiterFiller"),M(H)):P(H)}function M(H){return H===45?(t.consume(H),M):H===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(H),t.exit("tableDelimiterMarker"),O):(t.exit("tableDelimiterFiller"),O(H))}function O(H){return qe(H)?Xe(t,$,"whitespace")(H):$(H)}function $(H){return H===124?C(H):H===null||je(H)?!c||s!==u?P(H):(t.exit("tableDelimiterRow"),t.exit("tableHead"),r(H)):P(H)}function P(H){return l(H)}function L(H){return t.enter("tableRow"),Y(H)}function Y(H){return H===124?(t.enter("tableCellDivider"),t.consume(H),t.exit("tableCellDivider"),Y):H===null||je(H)?(t.exit("tableRow"),r(H)):qe(H)?Xe(t,Y,"whitespace")(H):(t.enter("data"),le(H))}function le(H){return H===null||H===124||ot(H)?(t.exit("data"),Y(H)):(t.consume(H),H===92?oe:le)}function oe(H){return H===92||H===124?(t.consume(H),le):le(H)}}function b3(t,r){let l=-1,i=!0,s=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,p=0,m,x,y;const b=new m3;for(;++l<t.length;){const v=t[l],C=v[1];v[0]==="enter"?C.type==="tableHead"?(f=!1,p!==0&&(ax(b,r,p,m,x),x=void 0,p=0),m={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},b.add(l,0,[["enter",m,r]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(i=!0,y=void 0,u=[0,0,0,0],c=[0,l+1,0,0],f&&(f=!1,x={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},b.add(l,0,[["enter",x,r]])),s=C.type==="tableDelimiterRow"?2:x?3:1):s&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],y=os(b,r,u,s,void 0,y),u=[0,0,0,0]),c[2]=l)):C.type==="tableCellDivider"&&(i?i=!1:(u[1]!==0&&(c[0]=c[1],y=os(b,r,u,s,void 0,y)),u=c,c=[u[1],l,0,0])):C.type==="tableHead"?(f=!0,p=l):C.type==="tableRow"||C.type==="tableDelimiterRow"?(p=l,u[1]!==0?(c[0]=c[1],y=os(b,r,u,s,l,y)):c[1]!==0&&(y=os(b,r,c,s,l,y)),s=0):s&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(c[3]=l)}for(p!==0&&ax(b,r,p,m,x),b.consume(r.events),l=-1;++l<r.events.length;){const v=r.events[l];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=g3(r.events,l))}return t}function os(t,r,l,i,s,u){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",f="tableContent";l[0]!==0&&(u.end=Object.assign({},ua(r.events,l[0])),t.add(l[0],0,[["exit",u,r]]));const p=ua(r.events,l[1]);if(u={type:c,start:Object.assign({},p),end:Object.assign({},p)},t.add(l[1],0,[["enter",u,r]]),l[2]!==0){const m=ua(r.events,l[2]),x=ua(r.events,l[3]),y={type:f,start:Object.assign({},m),end:Object.assign({},x)};if(t.add(l[2],0,[["enter",y,r]]),i!==2){const b=r.events[l[2]],v=r.events[l[3]];if(b[1].end=Object.assign({},v[1].end),b[1].type="chunkText",b[1].contentType="text",l[3]>l[2]+1){const C=l[2]+1,N=l[3]-l[2]-1;t.add(C,N,[])}}t.add(l[3]+1,0,[["exit",y,r]])}return s!==void 0&&(u.end=Object.assign({},ua(r.events,s)),t.add(s,0,[["exit",u,r]]),u=void 0),u}function ax(t,r,l,i,s){const u=[],c=ua(r.events,l);s&&(s.end=Object.assign({},c),u.push(["exit",s,r])),i.end=Object.assign({},c),u.push(["exit",i,r]),t.add(l+1,0,u)}function ua(t,r){const l=t[r],i=l[0]==="enter"?"start":"end";return l[1][i]}const v3={name:"tasklistCheck",tokenize:w3};function S3(){return{text:{91:v3}}}function w3(t,r,l){const i=this;return s;function s(p){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?l(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),u)}function u(p){return ot(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),c):l(p)}function c(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),f):l(p)}function f(p){return je(p)?r(p):qe(p)?t.check({tokenize:k3},r,l)(p):l(p)}}function k3(t,r,l){return Xe(t,i,"whitespace");function i(s){return s===null?l(s):r(s)}}function C3(t){return s0([Q4(),a3(),h3(t),y3(),S3()])}const N3={};function j3(t){const r=this,l=t||N3,i=r.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),u=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(C3(l)),u.push(Y4()),c.push(G4(l))}const J0=w.memo(function({oldText:r,newText:l,caption:i}){const s=w.useMemo(()=>E3(r,l),[r,l]);if(s===null)return h.jsx("div",{className:"text-xs text-muted-foreground italic px-3 py-2",children:"Diff omitted (file too large to render inline)."});const u=s.filter(f=>f.kind==="add").length,c=s.filter(f=>f.kind==="del").length;return h.jsxs("div",{className:"rounded-lg border bg-background/40 overflow-hidden text-xs",children:[h.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b bg-muted/40",children:[h.jsx("span",{className:"font-mono text-muted-foreground truncate",children:i??"diff"}),h.jsxs("span",{className:"font-mono shrink-0",children:[h.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400",children:["+",u]}),h.jsx("span",{className:"text-muted-foreground mx-1",children:"·"}),h.jsxs("span",{className:"text-rose-600 dark:text-rose-400",children:["-",c]})]})]}),h.jsx("div",{className:"font-mono leading-relaxed max-h-96 overflow-auto",children:s.map((f,p)=>h.jsxs("div",{className:me("flex",f.kind==="add"&&"bg-emerald-500/10",f.kind==="del"&&"bg-rose-500/10"),children:[h.jsx("span",{className:me("w-6 shrink-0 text-center select-none",f.kind==="add"&&"text-emerald-600 dark:text-emerald-400",f.kind==="del"&&"text-rose-600 dark:text-rose-400",f.kind==="ctx"&&"text-muted-foreground/40"),children:f.kind==="add"?"+":f.kind==="del"?"-":" "}),h.jsx("pre",{className:me("whitespace-pre-wrap break-all flex-1 px-2",f.kind==="ctx"&&"text-muted-foreground/70"),children:f.text||" "})]},p))})]})}),ix=5e3;function E3(t,r){const l=t.split(`
|
|
546
|
+
`),i=r.split(`
|
|
547
|
+
`);if(l.length>ix||i.length>ix)return null;const s=l.length,u=i.length,c=Array.from({length:s+1},()=>new Array(u+1).fill(0));for(let x=s-1;x>=0;x--)for(let y=u-1;y>=0;y--)l[x]===i[y]?c[x][y]=c[x+1][y+1]+1:c[x][y]=Math.max(c[x+1][y],c[x][y+1]);const f=[];let p=0,m=0;for(;p<s&&m<u;)l[p]===i[m]?(f.push({kind:"ctx",text:l[p]}),p++,m++):c[p+1][m]>=c[p][m+1]?(f.push({kind:"del",text:l[p]}),p++):(f.push({kind:"add",text:i[m]}),m++);for(;p<s;)f.push({kind:"del",text:l[p++]});for(;m<u;)f.push({kind:"add",text:i[m++]});return f}function W0(t,r){if(!t||typeof r!="object"||r===null)return null;const l=r,i=String(l.file_path??l.path??"");switch(t){case"edit":case"str_replace":case"edit_file":{const s=typeof l.old_string=="string"?l.old_string:"",u=typeof l.new_string=="string"?l.new_string:"";return!s&&!u?null:{oldText:s,newText:u,caption:`edit ${i}`}}case"write":case"write_file":case"create_file":return{oldText:"",newText:typeof l.content=="string"?l.content:"",caption:`write ${i} (new)`};default:return null}}const T3=25,jf=12;function Ef({text:t,isError:r,className:l,wrapClass:i,showLineNumbers:s}){const u=w.useMemo(()=>t.split(`
|
|
548
|
+
`),[t]),c=u.length>T3,[f,p]=w.useState(!c),m=f?t:u.slice(0,jf).join(`
|
|
549
|
+
`),x=!!s&&c&&f;return h.jsxs("div",{className:me("rounded-md border bg-background/40 overflow-hidden",l),children:[x?h.jsxs("div",{className:"flex max-h-96 overflow-auto",children:[h.jsx("pre",{"aria-hidden":!0,className:"text-xs font-mono leading-[1.4] py-2 pl-2 pr-2 text-muted-foreground/50 select-none border-r border-border/40 bg-muted/20 tabular-nums text-right whitespace-pre shrink-0",children:u.map((y,b)=>`${b+1}`).join(`
|
|
550
|
+
`)}),h.jsx("pre",{className:me("text-xs font-mono leading-[1.4] py-2 px-2 flex-1 whitespace-pre",r?"text-destructive":"text-foreground"),children:m})]}):h.jsx("pre",{className:me("text-xs font-mono p-2 max-h-96 overflow-auto",i,r?"text-destructive":"text-foreground"),children:m}),c&&h.jsx("button",{type:"button",onClick:()=>p(y=>!y),className:"w-full flex items-center justify-center gap-1 px-2 py-1 border-t bg-muted/30 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:f?h.jsxs(h.Fragment,{children:[h.jsx(Ow,{className:"h-3 w-3"}),"Collapse to first ",jf," lines"]}):h.jsxs(h.Fragment,{children:[h.jsx(zw,{className:"h-3 w-3"}),"Show all ",u.length," lines (",u.length-jf," more)"]})})]})}const A3=w.memo(function({toolName:r,result:l,isError:i,className:s}){const u=w.useMemo(()=>M3(r,l),[r,l]);return u.kind==="json"?h.jsx(D3,{value:u.value,isError:i,className:s}):u.kind==="numbered"?h.jsx(Ef,{text:l,isError:i,className:s,wrapClass:"whitespace-pre"}):u.kind==="bash"?h.jsxs("div",{className:me("rounded-md border bg-background/40 overflow-hidden",s),children:[u.stdout&&h.jsx(Ef,{text:u.stdout,isError:i,className:"border-0 rounded-none bg-transparent",wrapClass:"whitespace-pre-wrap break-all",showLineNumbers:!0}),(u.exitCode!==void 0||u.duration)&&h.jsxs("div",{className:me("flex items-center gap-3 text-[11px] px-2 py-1 border-t bg-muted/30 tabular-nums",u.exitCode&&u.exitCode!==0?"text-destructive":"text-muted-foreground"),children:[u.exitCode!==void 0&&h.jsxs("span",{children:["exit code: ",h.jsx("span",{className:"font-mono",children:u.exitCode})]}),u.duration&&h.jsx("span",{children:u.duration})]})]}):h.jsx(Ef,{text:l,isError:i,className:s,wrapClass:"whitespace-pre-wrap break-all",showLineNumbers:!0})});function M3(t,r){const l=r.trim();if(/^\s*\d+→/m.test(r.slice(0,200)))return{kind:"numbered"};if(l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]"))try{const c=JSON.parse(l);if(typeof c=="object"&&c!==null)return{kind:"json",value:c}}catch{}const i=!!t&&/^(bash|shell|exec|run)/i.test(t),s=r.match(/(?:^|\n)\s*(?:\[?exit(?:\s*code)?\]?\s*[:=]?\s*)(\d+)\s*$/i),u=r.match(/(?:^|\s)(\d+\s*ms|\d+\.\d+s)\s*$/i);if(i||s){let c=r;return s&&(c=r.slice(0,s.index).trimEnd()),{kind:"bash",stdout:c,exitCode:s?Number(s[1]):void 0,duration:u==null?void 0:u[1]}}return{kind:"plain"}}function D3({value:t,isError:r,className:l}){const i=w.useMemo(()=>{try{return JSON.stringify(t,null,2)}catch{return String(t)}},[t]),s=i.split(`
|
|
551
|
+
`).length,[u,c]=w.useState(s<30);return h.jsxs("div",{className:me("rounded-md border bg-background/40 overflow-hidden",r&&"border-destructive/40",l),children:[h.jsxs("button",{type:"button",onClick:()=>c(f=>!f),className:"w-full flex items-center justify-between px-2 py-1 border-b bg-muted/30 text-[11px] text-muted-foreground hover:text-foreground",children:[h.jsxs("span",{className:"flex items-center gap-1",children:[u?h.jsx(Es,{className:"h-3 w-3"}):h.jsx(ud,{className:"h-3 w-3"}),h.jsxs("span",{className:"font-mono",children:["JSON · ",s," lines"]})]}),h.jsx("span",{children:u?"collapse":"expand"})]}),u&&h.jsx("pre",{className:me("text-xs font-mono whitespace-pre p-2 max-h-96 overflow-auto",r?"text-destructive":"text-foreground"),children:i})]})}async function R3(t){var r;try{if(typeof navigator<"u"&&((r=navigator.clipboard)!=null&&r.writeText))return await navigator.clipboard.writeText(t),!0}catch{}try{const l=document.createElement("textarea");l.value=t,l.style.position="fixed",l.style.opacity="0",document.body.appendChild(l),l.select();const i=document.execCommand("copy");return document.body.removeChild(l),i}catch{return!1}}const z3={code({inline:t,className:r,children:l,...i}){const s=/language-(\w+)/.exec(r??""),u=String(l??"").replace(/\n$/,"");return t||!s?h.jsx("code",{className:me("rounded bg-muted/60 px-1.5 py-0.5 text-[0.85em] font-mono",r),...i,children:l}):h.jsxs("div",{className:"not-prose relative my-3 rounded-lg border bg-muted/30 overflow-hidden",children:[h.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b bg-muted/40 text-xs",children:[h.jsx("span",{className:"font-mono text-muted-foreground",children:s[1]}),h.jsx(td,{text:u,label:""})]}),h.jsx("pre",{className:"overflow-x-auto p-3 text-xs leading-relaxed font-mono max-h-[40rem]",children:h.jsx("code",{children:u})})]})}};function td({text:t,className:r,label:l="Copy"}){const[i,s]=w.useState(!1);return h.jsx("button",{type:"button",onClick:async u=>{u.stopPropagation(),await R3(t)&&(s(!0),setTimeout(()=>s(!1),1400))},className:me("inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",r),title:l,children:i?h.jsxs(h.Fragment,{children:[h.jsx(Ux,{className:"h-3 w-3 text-green-500"}),h.jsx("span",{children:"Copied"})]}):h.jsxs(h.Fragment,{children:[h.jsx(Hw,{className:"h-3 w-3"}),h.jsx("span",{children:l})]})})}function O3(t,r){if(typeof document>"u")return;const l=new Blob([r],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(l),s=document.createElement("a");s.href=i,s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),setTimeout(()=>URL.revokeObjectURL(i),1e3)}function _3(t){const r=(t??"").toLowerCase();return/bash|shell|exec|run/.test(r)?"log":(/grep|search|find/.test(r),"txt")}function L3(t){const r=t.split(`
|
|
552
|
+
`);for(let l=0;l<r.length;l++){const i=r[l];if(/^\s*at\s+\S+.*\(.*:\d+:\d+\)\s*$/.test(i)||/^\s*at\s+\S+\.\S+\(\S+\.java:\d+\)\s*$/.test(i)||/^\s+File "[^"]+", line \d+/.test(i))return l}return-1}function U3({text:t}){const r=L3(t),[l,i]=w.useState(!1);if(r===-1)return h.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-xs leading-relaxed",children:t});const s=t.split(`
|
|
553
|
+
`),u=s.slice(0,r).join(`
|
|
554
|
+
`).trim(),c=s.slice(r).join(`
|
|
555
|
+
`),f=c.split(`
|
|
556
|
+
`).filter(p=>p.trim().length>0).length;return h.jsxs("div",{className:"space-y-2",children:[u&&h.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-xs leading-relaxed",children:u}),h.jsxs("button",{type:"button",onClick:()=>i(p=>!p),className:"inline-flex items-center gap-1 text-xs text-destructive hover:text-destructive/80 font-medium",children:[l?"▾":"▸"," ",l?"Hide":"Show"," stack trace (",f," frame",f===1?"":"s",")"]}),l&&h.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-[11px] leading-snug bg-destructive/5 border border-destructive/20 rounded p-2 max-h-80 overflow-auto",children:c})]})}function B3({input:t}){const[r,l]=w.useState({});if(t==null||typeof t!="object"||Array.isArray(t))return h.jsx("pre",{className:"whitespace-pre-wrap break-all text-xs font-mono",children:JSON.stringify(t,null,2)});const i=Object.entries(t);return i.length===0?h.jsx("span",{className:"text-xs text-muted-foreground italic",children:"(no params)"}):h.jsx("div",{className:"text-xs font-mono",children:i.map(([s,u])=>{if(u==null||typeof u=="string"||typeof u=="number"||typeof u=="boolean"){const m=u===null?"null":u===void 0?"undefined":typeof u=="string"?u:String(u),x=typeof u=="string"&&(m.length>80||m.includes(`
|
|
557
|
+
`));return h.jsxs("div",{className:me("py-0.5",x?"flex flex-col gap-0.5":"flex items-baseline gap-2"),children:[h.jsxs("span",{className:"text-muted-foreground shrink-0",children:[s,":"]}),h.jsx("span",{className:me("text-foreground",x?"whitespace-pre-wrap break-all bg-muted/40 rounded px-1.5 py-1":"truncate",typeof u=="string"?"":"text-amber-600 dark:text-amber-400"),title:typeof u=="string"&&!x?m:void 0,children:m})]},s)}const f=!!r[s],p=Array.isArray(u)?`[${u.length} item${u.length===1?"":"s"}]`:`{${Object.keys(u).length} key${Object.keys(u).length===1?"":"s"}}`;return h.jsxs("div",{className:"py-0.5",children:[h.jsxs("button",{type:"button",onClick:()=>l(m=>({...m,[s]:!m[s]})),className:"flex items-baseline gap-2 hover:bg-muted/30 rounded px-1 -mx-1",children:[h.jsx("span",{className:"text-muted-foreground/60 text-[10px]",children:f?"▾":"▸"}),h.jsxs("span",{className:"text-muted-foreground",children:[s,":"]}),h.jsx("span",{className:"text-violet-600 dark:text-violet-400",children:p})]}),f&&h.jsx("pre",{className:"ml-3 mt-1 whitespace-pre-wrap break-all text-[11px] bg-muted/40 rounded px-2 py-1.5",children:JSON.stringify(u,null,2)})]},s)})})}function H3(t){if(t<1e3)return`${t} ms`;if(t<6e4)return`${(t/1e3).toFixed(t<1e4?2:1)}s`;const r=Math.floor(t/6e4),l=Math.floor(t%6e4/1e3);return`${r}m ${l}s`}const ws=w.memo(function({message:r,isFirst:l=!1,isContinuation:i=!1}){const[s,u]=w.useState({}),[c,f]=w.useState(!1),[p,m]=w.useState(""),[x,y]=w.useState(!1),b=r.role==="user",v=r.role==="tool";r.role;const C=he(R=>R.truncateAfter),N=he(R=>R.addMessage),A=he(R=>R.setLoading),E=he(R=>R.isLoading),M=$e(R=>R.wsUrl),O=Ne(R=>R.pinnedIds),$=Ne(R=>R.togglePin),P=Ne(R=>R.compactMode),L=O.includes(r.id),Y=Pe(R=>R.inputCost),le=Pe(R=>R.outputCost),oe=Pe(R=>R.cacheReadCost),H=(()=>{if(r.role!=="assistant"||E)return!1;const R=he.getState().messages;for(let J=R.length-1;J>=0;J--){const ie=R[J];if(ie.role==="assistant")return ie.id===r.id}return!1})(),X=()=>{const R=he.getState().messages,J=R.findIndex(T=>T.id===r.id);if(J===-1)return;let ie=-1;for(let T=J-1;T>=0;T--)if(R[T].role==="user"){ie=T;break}if(ie===-1)return;const ge=R[ie];C(ge.id),N({role:"user",content:ge.content}),A(!0),En(M).sendMessage(ge.content)},G=R=>{u(J=>({...J,[R]:!J[R]}))},fe=()=>{m(r.content),f(!0)},ue=()=>{f(!1),m("")},ne=()=>{const R=p.trim();if(!R){ue();return}C(r.id),N({role:"user",content:R}),A(!0),En(M).sendMessage(R),f(!1),m("")};return h.jsxs("div",{"data-message-id":r.id,"data-pinned":L?"1":void 0,className:me("group flex animate-message rounded-lg transition-shadow",P?"gap-2":"gap-3",b?"flex-row-reverse":"flex-row",L&&"ring-1 ring-amber-500/30 bg-amber-500/[0.02] px-1 -mx-1"),children:[i?h.jsx("div",{className:"flex-shrink-0 w-8 h-8","aria-hidden":!0}):h.jsx("div",{className:me("flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center","ring-2 ring-offset-2 ring-offset-background",b?"bg-primary text-primary-foreground ring-primary/20":v?"bg-secondary text-secondary-foreground ring-secondary/20":"bg-accent text-accent-foreground ring-accent/20"),children:b?h.jsx(s2,{className:"h-4 w-4"}):v?h.jsx(ma,{className:"h-4 w-4"}):h.jsx(_x,{className:"h-4 w-4"})}),h.jsxs("div",{className:me("flex flex-col gap-1.5 max-w-[85%]",b&&"items-end"),children:[l&&!i&&h.jsx("span",{className:me("text-xs font-medium px-1",b?"text-primary":v?"text-secondary":"text-muted-foreground"),children:b?"You":v?"Tool":"Assistant"}),v&&r.toolName&&h.jsxs("button",{type:"button",onClick:()=>G(r.id),className:me("flex items-center gap-2 text-sm font-medium cursor-pointer select-none","hover:bg-muted/50 rounded-lg px-2 py-1 -mx-2 transition-colors",r.isError?"text-destructive":"text-foreground"),children:[h.jsx("span",{className:"text-muted-foreground/50",children:s[r.id]?h.jsx(Es,{className:"h-3 w-3"}):h.jsx(ud,{className:"h-3 w-3"})}),h.jsx(ma,{className:"h-3 w-3"}),h.jsx("span",{className:"font-mono",children:r.toolName}),r.toolResult===void 0?h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-amber-500 animate-pulse","aria-hidden":!0}):r.isError?h.jsx(cd,{className:"h-3 w-3 text-destructive"}):h.jsx(pl,{className:"h-3 w-3 text-green-500"}),typeof r.toolDurationMs=="number"&&h.jsx("span",{className:"text-xs text-muted-foreground tabular-nums font-normal",children:H3(r.toolDurationMs)})]}),h.jsx("div",{className:me("rounded-2xl",P?"px-3 py-1.5":"px-4 py-3",b?"bg-primary text-primary-foreground rounded-br-md":v?r.isError?"bg-destructive/5 border border-destructive/20 text-destructive":"bg-muted/80 text-foreground":"bg-card border text-foreground",r.isError&&!v&&"border-destructive/20"),children:v?(()=>{const R=!!s[r.id],J=r.toolInput!==void 0?ek(r.toolName,r.toolInput):"",ie=r.toolResult?r.toolResult.split(`
|
|
558
|
+
`).length:0;return h.jsxs("div",{className:"space-y-1",children:[J&&!R&&h.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate",children:J}),r.toolResult===void 0&&r.progressLines&&r.progressLines.length>0&&h.jsx("div",{className:"mt-1 rounded-md border border-amber-500/20 bg-amber-500/5 p-1.5 text-[11px] font-mono leading-snug max-h-32 overflow-auto",children:r.progressLines.slice(-6).map((ge,D)=>h.jsx("div",{className:"truncate text-muted-foreground",children:ge},D))}),R&&r.toolInput!==void 0&&(()=>{const ge=W0(r.toolName,r.toolInput);return ge?h.jsx(J0,{oldText:ge.oldText,newText:ge.newText,caption:ge.caption}):h.jsxs("div",{className:"p-3 bg-muted/50 rounded-lg overflow-x-auto",children:[h.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground mb-2 text-xs",children:[h.jsx(Bx,{className:"h-3 w-3"}),h.jsx("span",{children:"Input"})]}),h.jsx(B3,{input:r.toolInput})]})})(),R&&r.toolResult!==void 0&&r.toolResult.length>0&&h.jsxs("div",{className:"relative group/tool",children:[h.jsx(A3,{toolName:r.toolName,result:r.toolResult,isError:r.isError}),h.jsxs("div",{className:"absolute top-1.5 right-1.5 flex items-center gap-1 opacity-0 group-hover/tool:opacity-100 transition-opacity",children:[h.jsx(td,{text:r.toolResult,label:"",className:"bg-background/80 border rounded px-1.5 py-0.5"}),r.toolResult.split(`
|
|
559
|
+
`).length>5&&h.jsx("button",{type:"button",onClick:ge=>{ge.stopPropagation();const D=_3(r.toolName),T=(r.toolName??"output").replace(/[^a-z0-9_-]+/gi,"-").toLowerCase();O3(`${T}-${new Date().toISOString().replace(/[:.]/g,"-")}.${D}`,r.toolResult??"")},className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground bg-background/80 border rounded px-1.5 py-0.5",title:"Download as file",children:h.jsx(Hf,{className:"h-3 w-3"})})]})]}),R&&r.toolResult!==void 0&&r.toolResult.length===0&&h.jsx("span",{className:"text-xs text-muted-foreground italic",children:"(empty)"}),!R&&r.isError&&r.toolResult&&h.jsx("div",{className:"text-xs font-mono text-destructive truncate",children:r.toolResult.split(`
|
|
560
|
+
`)[0]}),(r.toolResult!==void 0&&r.toolResult.length>0||r.toolInput!==void 0&&Object.keys(r.toolInput??{}).length>0)&&h.jsx("button",{type:"button",onClick:()=>G(r.id),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:R?"Hide details":`Show details${ie>0?` (${ie} line${ie===1?"":"s"})`:""}`})]})})():c&&b?h.jsxs("div",{className:"flex flex-col gap-2 min-w-[280px]",children:[h.jsx("textarea",{value:p,onChange:R=>m(R.target.value),onKeyDown:R=>{R.key==="Escape"?(R.preventDefault(),ue()):R.key==="Enter"&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),ne())},rows:Math.min(8,Math.max(2,p.split(`
|
|
561
|
+
`).length)),className:"w-full resize-none rounded-md border bg-background text-foreground px-2 py-1.5 text-sm font-mono focus:outline-none focus:ring-2 focus:ring-ring"}),h.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h.jsx("span",{className:"text-[10px] text-primary-foreground/60",children:"⌘/Ctrl+Enter to save · Esc to cancel"}),h.jsxs("div",{className:"flex gap-1",children:[h.jsx("button",{type:"button",onClick:ue,className:"text-xs px-2 py-0.5 rounded border border-primary-foreground/30 hover:bg-primary-foreground/10",children:"Cancel"}),h.jsx("button",{type:"button",onClick:ne,disabled:!p.trim(),className:"text-xs px-2 py-0.5 rounded bg-primary-foreground text-primary disabled:opacity-50",children:"Save & resend"})]})]})]}):h.jsx("div",{className:"text-sm leading-relaxed markdown-content",children:r.content?x&&r.role==="assistant"?h.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-foreground/90 max-h-[40rem] overflow-auto",children:r.content}):r.role==="assistant"&&r.isError?h.jsx(U3,{text:r.content}):h.jsx(hE,{remarkPlugins:[j3],components:z3,children:r.content}):r.streaming?h.jsx("span",{className:"inline-block animate-pulse text-muted-foreground",children:"Typing..."}):h.jsx("span",{className:"text-muted-foreground italic",children:"No content"})})}),h.jsxs("div",{className:me("flex items-center gap-2 px-1",b?"flex-row-reverse":"flex-row"),children:[h.jsx("span",{className:"text-xs text-muted-foreground/50",children:new Date(r.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),r.runSummary&&h.jsxs("span",{className:"text-[10px] text-muted-foreground/60 font-mono tabular-nums",title:[`Iterations: ${r.runSummary.iterations}`,`Tool calls: ${r.runSummary.tools}`,`Elapsed: ${(r.runSummary.durationMs/1e3).toFixed(2)}s`,r.runSummary.costDelta>0?`Cost: $${r.runSummary.costDelta.toFixed(4)}`:""].filter(Boolean).join(" · "),children:[r.runSummary.iterations," iter",r.runSummary.tools>0?` · ${r.runSummary.tools} tool${r.runSummary.tools===1?"":"s"}`:""," · ",r.runSummary.durationMs<6e4?`${(r.runSummary.durationMs/1e3).toFixed(1)}s`:`${Math.floor(r.runSummary.durationMs/6e4)}m ${Math.floor(r.runSummary.durationMs%6e4/1e3)}s`,r.runSummary.costDelta>0?` · $${r.runSummary.costDelta>=.01?r.runSummary.costDelta.toFixed(4):r.runSummary.costDelta.toFixed(6).replace(/0+$/,"").replace(/\.$/,"")}`:""]}),r.usage&&(r.usage.input>0||r.usage.output>0)&&(()=>{const R=r.usage,J=(R.input*Y+R.output*le+(R.cacheRead??0)*oe)/1e6,ie=Y>0||le>0,ge=J>=.01?`$${J.toFixed(4)}`:J>0?`$${J.toFixed(6).replace(/0+$/,"").replace(/\.$/,"")}`:"";return h.jsxs("span",{className:"text-[10px] text-muted-foreground/60 font-mono tabular-nums",title:[`Input: ${R.input.toLocaleString()}`,`Output: ${R.output.toLocaleString()}`,R.cacheRead?`Cache read: ${R.cacheRead.toLocaleString()}`:"",ie?`Cost: ${ge}`:""].filter(Boolean).join(" · "),children:[R.input.toLocaleString(),"→",R.output.toLocaleString(),R.cacheRead?` · ${R.cacheRead.toLocaleString()} ↺`:"",ie&&ge?` · ${ge}`:""]})})(),!v&&r.content&&!r.streaming&&h.jsx(td,{text:r.content,label:"",className:"opacity-0 group-hover:opacity-100 transition-opacity"}),r.role==="assistant"&&r.content&&!r.streaming&&h.jsxs("button",{type:"button",onClick:()=>y(R=>!R),title:x?"Show rendered markdown":"Show raw markdown source",className:me("text-xs inline-flex items-center gap-1 transition-opacity",x?"text-primary hover:text-primary/80 opacity-100":"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-foreground"),children:[h.jsx(Vw,{className:"h-3 w-3"}),h.jsx("span",{children:x?"Rendered":"Raw"})]}),b&&!c&&!E&&r.content&&h.jsxs("button",{type:"button",onClick:fe,title:"Edit & resend this prompt",className:"opacity-0 group-hover:opacity-100 transition-opacity text-xs text-muted-foreground hover:text-foreground inline-flex items-center gap-1",children:[h.jsx(qx,{className:"h-3 w-3"}),h.jsx("span",{children:"Edit"})]}),r.role==="assistant"&&r.content&&!r.streaming&&h.jsxs("button",{type:"button",onClick:()=>$(r.id),title:L?"Unpin":"Pin this answer",className:me("text-xs inline-flex items-center gap-1 transition-opacity",L?"text-amber-500 hover:text-amber-600 opacity-100":"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-foreground"),children:[L?h.jsx(r2,{className:"h-3 w-3"}):h.jsx(Ix,{className:"h-3 w-3"}),h.jsx("span",{children:L?"Pinned":"Pin"})]}),H&&r.content&&!r.streaming&&h.jsxs("button",{type:"button",onClick:X,title:"Regenerate this response",className:"opacity-0 group-hover:opacity-100 transition-opacity text-xs text-muted-foreground hover:text-foreground inline-flex items-center gap-1",children:[h.jsx(zi,{className:"h-3 w-3"}),h.jsx("span",{children:"Retry"})]})]})]})]})});function q3(){const t=Pe(p=>p.mode),r=Pe(p=>p.modes),{listModes:l,switchMode:i}=sr(),[s,u]=w.useState(!1),c=w.useRef(null);w.useEffect(()=>{s&&l()},[s,l]),w.useEffect(()=>{if(!s)return;const p=x=>{var y;(y=c.current)!=null&&y.contains(x.target)||u(!1)},m=x=>{x.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",p),document.addEventListener("keydown",m),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",m)}},[s]);const f=r.length>0?r:[{id:"default",name:"Default",description:"Standard agent behaviour"}];return h.jsxs("div",{ref:c,className:"relative shrink-0",children:[h.jsxs("button",{type:"button",onClick:()=>u(p=>!p),className:me("flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium","bg-accent/40 text-foreground hover:bg-accent transition-colors border border-transparent hover:border-primary/30"),title:"Active mode",children:["mode: ",h.jsx("span",{className:"font-mono",children:t||"default"}),h.jsx(Es,{className:"h-3 w-3 opacity-60"})]}),s&&h.jsxs("div",{className:"absolute top-full left-0 mt-1 w-64 rounded-md border bg-popover shadow-lg z-30 py-1",children:[h.jsx("div",{className:"px-3 py-1.5 text-[10px] uppercase tracking-wider text-muted-foreground border-b",children:"Mode"}),f.map(p=>h.jsxs("button",{type:"button",onClick:()=>{i(p.id),u(!1)},className:me("w-full text-left px-3 py-2 hover:bg-accent/40 flex items-start gap-2",p.id===t&&"bg-accent/30"),children:[h.jsx(Ux,{className:me("h-3.5 w-3.5 mt-0.5 shrink-0",p.id===t?"opacity-100 text-primary":"opacity-0")}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("div",{className:"text-xs font-mono",children:p.id}),p.description&&h.jsx("div",{className:"text-[11px] text-muted-foreground leading-snug",children:p.description})]})]},p.id))]})]})}function I3(){const t=Ne(x=>x.searchOpen),r=Ne(x=>x.setSearchOpen),l=Ne(x=>x.searchQuery),i=Ne(x=>x.setSearchQuery),s=he(x=>x.messages),u=w.useRef(null),[c,f]=w.useState(0);w.useEffect(()=>{t&&requestAnimationFrame(()=>{var x;return(x=u.current)==null?void 0:x.focus()})},[t]);const p=w.useMemo(()=>{const x=l.trim().toLowerCase();return x?s.filter(y=>y.role==="tool"?(y.toolName??"").toLowerCase().includes(x)||(y.toolResult??"").toLowerCase().includes(x)||JSON.stringify(y.toolInput??"").toLowerCase().includes(x):y.content.toLowerCase().includes(x)).map(y=>y.id):[]},[s,l]);if(w.useEffect(()=>{c>=p.length&&f(0)},[p,c]),w.useEffect(()=>{var O;const x=window,y=(O=x.CSS)==null?void 0:O.highlights,b=x.Highlight;if(!y||!b)return;const v=()=>{y.delete("chat-search"),y.delete("chat-search-active")},C=l.trim();if(!C||!t){v();return}const N=C.toLowerCase(),A=[],E=[],M=p[c];for(const $ of document.querySelectorAll("[data-message-id]")){const L=$.dataset.messageId===M,Y=document.createTreeWalker($,NodeFilter.SHOW_TEXT);let le=Y.nextNode();for(;le;){const oe=le.nodeValue??"";if(oe.length>0){const H=oe.toLowerCase();let X=0;for(;X<=H.length-N.length;){const G=H.indexOf(N,X);if(G===-1)break;const fe=document.createRange();fe.setStart(le,G),fe.setEnd(le,G+N.length),A.push(fe),L&&E.push(fe),X=G+N.length}}le=Y.nextNode()}}return A.length>0?y.set("chat-search",new b(...A)):y.delete("chat-search"),E.length>0?y.set("chat-search-active",new b(...E)):y.delete("chat-search-active"),v},[l,p,c,t]),w.useEffect(()=>{const x=p[c];if(!x)return;const y=document.querySelector(`[data-message-id="${x}"]`);y&&y.scrollIntoView({behavior:"smooth",block:"center"})},[p,c]),!t)return null;const m=x=>{p.length!==0&&f(y=>(y+x+p.length)%p.length)};return h.jsx("div",{className:"absolute top-2 right-4 z-30 w-[28rem] max-w-[calc(100%-2rem)] rounded-lg border bg-popover shadow-xl",children:h.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[h.jsx(ha,{className:"h-4 w-4 text-muted-foreground shrink-0"}),h.jsx("input",{ref:u,value:l,onChange:x=>i(x.target.value),onKeyDown:x=>{x.key==="Escape"?(x.preventDefault(),r(!1)):x.key==="Enter"?(x.preventDefault(),m(x.shiftKey?-1:1)):x.key==="ArrowDown"?(x.preventDefault(),m(1)):x.key==="ArrowUp"&&(x.preventDefault(),m(-1))},placeholder:"Search in chat…",className:"flex-1 bg-transparent outline-none text-sm placeholder:text-muted-foreground"}),h.jsx("span",{className:"text-xs text-muted-foreground tabular-nums shrink-0",children:p.length===0?l?"0":"":`${c+1} / ${p.length}`}),h.jsx("button",{type:"button",onClick:()=>m(-1),disabled:p.length===0,className:me("p-1 rounded hover:bg-muted disabled:opacity-30 disabled:cursor-not-allowed"),title:"Previous hit",children:h.jsx(Ox,{className:"h-3.5 w-3.5"})}),h.jsx("button",{type:"button",onClick:()=>m(1),disabled:p.length===0,className:me("p-1 rounded hover:bg-muted disabled:opacity-30 disabled:cursor-not-allowed"),title:"Next hit",children:h.jsx(Rx,{className:"h-3.5 w-3.5"})}),h.jsx("button",{type:"button",onClick:()=>r(!1),className:"p-1 rounded hover:bg-muted text-muted-foreground",title:"Close (Esc)",children:h.jsx(xl,{className:"h-3.5 w-3.5"})})]})})}function V3(t){if(t<1e3)return`${t}ms`;if(t<6e4)return`${(t/1e3).toFixed(t<1e4?2:1)}s`;const r=Math.floor(t/6e4),l=Math.floor(t%6e4/1e3);return`${r}m${l}s`}const $3=w.memo(function({tools:r,defaultOpen:l=!1,isContinuation:i=!1}){const[s,u]=w.useState(l);if(r.length===1)return h.jsx(ws,{message:r[0],isFirst:!0,isContinuation:i});const c=r.filter(b=>b.toolResult===void 0).length,f=r.filter(b=>b.isError).length,p=r.reduce((b,v)=>b+(v.toolDurationMs??0),0),m=Array.from(new Set(r.map(b=>b.toolName).filter(Boolean))),x=m.slice(0,3).join(", "),y=m.length>3?` +${m.length-3}`:"";return h.jsxs("div",{className:"flex gap-3 animate-message",children:[i?h.jsx("div",{className:"flex-shrink-0 w-8 h-8","aria-hidden":!0}):h.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center bg-secondary text-secondary-foreground ring-2 ring-offset-2 ring-offset-background ring-secondary/20",children:h.jsx(ma,{className:"h-4 w-4"})}),h.jsxs("div",{className:"flex flex-col gap-1.5 max-w-[85%] flex-1 min-w-0",children:[h.jsxs("button",{type:"button",onClick:()=>u(b=>!b),className:me("flex items-center gap-2 text-sm font-medium cursor-pointer select-none","hover:bg-muted/50 rounded-lg px-2 py-1.5 -mx-2 transition-colors","border border-border/40 bg-muted/30"),children:[s?h.jsx(Es,{className:"h-3.5 w-3.5 text-muted-foreground"}):h.jsx(ud,{className:"h-3.5 w-3.5 text-muted-foreground"}),h.jsx(ma,{className:"h-3.5 w-3.5 text-muted-foreground"}),h.jsxs("span",{className:"font-mono text-xs",children:[r.length," tool call",r.length===1?"":"s"]}),c>0?h.jsx(Fr,{className:"h-3 w-3 animate-spin text-amber-500"}):f>0?h.jsx(cd,{className:"h-3 w-3 text-destructive"}):h.jsx(pl,{className:"h-3 w-3 text-green-500"}),p>0&&h.jsx("span",{className:"text-xs text-muted-foreground tabular-nums font-normal",children:V3(p)}),x&&h.jsxs("span",{className:"text-xs text-muted-foreground/80 font-mono truncate",children:["· ",x,y]})]}),s&&h.jsx("div",{className:"space-y-2 pl-3 border-l-2 border-border/40 ml-2",children:r.map(b=>h.jsx(ws,{message:b,isFirst:!1},b.id))})]})]})}),F3=[{icon:ha,title:"Explore",hint:"Understand the code before changing it",tone:"text-blue-600 dark:text-blue-400 bg-blue-500/10 border-blue-500/20",prompts:["Walk me through this codebase: list the top-level packages, the role of each, and how they depend on one another. Highlight any cross-cutting abstractions I should understand first.","Find every place where the WebSocket protocol is defined or consumed (server handlers, client send/receive, type contracts). Show me the message-type table and any gaps where the type isn't enforced.","Locate the entrypoint that boots the agent for normal runs. Trace the call chain from CLI launch all the way to the first model call — what middleware, hooks, and tools are wired along the way?"]},{icon:xd,title:"Build",hint:"Add a feature end-to-end",tone:"text-emerald-600 dark:text-emerald-400 bg-emerald-500/10 border-emerald-500/20",prompts:["Add a slash command `/export` that dumps the current chat (messages + tool calls + usage) as a markdown file to ~/.wrongstack/exports/ and surfaces a 'saved to X' toast. Wire backend + ws-client + slash menu entry.","Create a notification toast system (Zustand store + portal-rendered <Toast/> component) and migrate every existing `key.operation_result` success/failure message to use it instead of dropping into chat.","Add structured JSON logging to the WebSocket server: each handler logs `{ts, level, type, payload}` to ~/.wrongstack/logs/webui.jsonl. Make it tail-friendly and respect the existing log.level config."]},{icon:Dw,title:"Debug",hint:"Track a problem to its root cause",tone:"text-amber-600 dark:text-amber-400 bg-amber-500/10 border-amber-500/20",prompts:["Something feels off with token accounting — the cost chip and the per-message tally drift apart over a long session. Reproduce locally if you can, then propose a fix. Start by reading the TokenCounter + provider.response handler.","The WebSocket sometimes silently stops streaming text mid-response on lossy networks. Check the reconnect logic, message queue, and how we handle a half-completed text_delta stream after a reconnect.","I want to know why ctx % climbs so fast in long sessions. Use the existing /debug context breakdown to identify the largest contributors and propose three concrete pruning strategies (with token savings estimates)."]},{icon:Vx,title:"Refactor",hint:"Clean up without breaking behavior",tone:"text-violet-600 dark:text-violet-400 bg-violet-500/10 border-violet-500/20",prompts:["Find duplicated logic between packages/cli/src/webui-server.ts and packages/webui/src/server/index.ts. Extract the shared bits into a single source of truth (likely the webui package) and update the CLI to import it.","Look at the Zustand stores in packages/webui/src/stores/index.ts — anything that should be a derived selector instead of stored state? Anything persisted that shouldn't be? Propose a leaner shape and migration plan.","Audit the slash command dispatcher: pull each command's run logic into its own module under packages/webui/src/commands/, make the registry data-driven, and ensure /help auto-generates from the registry (not a hardcoded list)."]}],Y3=[{name:"/help",hint:"list every slash command"},{name:"/diag",hint:"runtime diagnostics"},{name:"/stats",hint:"tokens · cache · cost · elapsed"},{name:"/tools",hint:"show registered tools"},{name:"/memory",hint:"show remembered notes"},{name:"/compact",hint:"shrink context"},{name:"/clear",hint:"wipe current context"},{name:"/new",hint:"fresh session"}];function Tf(t){var i;const r=document.querySelector("textarea");if(!r)return;const l=(i=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value"))==null?void 0:i.set;l==null||l.call(r,t),r.dispatchEvent(new Event("input",{bubbles:!0})),r.focus()}function G3(){const{projectName:t}=Pe(),{provider:r,model:l}=$e(),i=$e(N=>N.wsConnected),s=$e(N=>N.wsUrl),u=Ne(N=>N.setCurrentView),[c,f]=w.useState(void 0);w.useEffect(()=>{if(!i)return;const N=En(s),A=N.on("providers.saved",E=>{var O;const M=E.payload;f(((O=M.providers)==null?void 0:O.length)??0)});return N.listSavedProviders(),()=>{A()}},[i,s]);const m=Ne(N=>N.promptHistory).slice(0,6),{listSessions:x,resumeSession:y}=sr(),b=pa(N=>N.entries);w.useEffect(()=>{i&&b.length===0&&x(10)},[i]);const v=Ne(N=>N.sessionNicknames),C=b.filter(N=>!N.isCurrent).slice(0,4);return h.jsxs("div",{className:"flex flex-col gap-8 py-8 px-2 max-w-5xl mx-auto w-full",children:[h.jsxs("div",{className:"flex flex-col items-center text-center gap-3",children:[h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gradient-to-br from-primary via-primary to-primary/60 flex items-center justify-center shadow-lg shadow-primary/20",children:h.jsx(bd,{className:"h-7 w-7 text-primary-foreground"})}),h.jsx("div",{className:"absolute -inset-3 bg-gradient-to-r from-transparent via-primary/10 to-transparent animate-pulse rounded-full -z-10"})]}),h.jsxs("div",{children:[h.jsxs("h2",{className:"text-2xl font-semibold tracking-tight",children:["Where do you want to start",t?h.jsxs(h.Fragment,{children:[" in ",h.jsx("span",{className:"text-primary",children:t})]}):"","?"]}),h.jsxs("p",{className:"text-sm text-muted-foreground mt-2 max-w-2xl mx-auto leading-relaxed",children:["WrongStack is connected to your project and ready to read, edit, run commands, search the codebase, track todos, and remember context across sessions. Pick a starting prompt below, write your own, or type ",h.jsx("span",{className:"font-mono text-foreground/80",children:"/"})," ","for the full command palette."]}),r&&l&&h.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-2 font-mono",children:[r," / ",l]})]})]}),i&&c===0&&h.jsxs("button",{type:"button",onClick:()=>u("settings"),className:me("group rounded-xl border bg-gradient-to-br from-amber-500/10 via-amber-500/5 to-transparent","border-amber-500/30 hover:border-amber-500/50 transition-colors","p-4 flex items-center gap-4 text-left"),children:[h.jsx("span",{className:"flex items-center justify-center w-12 h-12 rounded-lg bg-amber-500/15 text-amber-600 dark:text-amber-400 shrink-0",children:h.jsx(Qw,{className:"h-6 w-6"})}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("h3",{className:"text-base font-semibold mb-1",children:"No API key configured yet"}),h.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"Register a provider in Settings before sending a message — otherwise the agent has nothing to talk to. Anthropic, OpenAI, Google, and any OpenAI-compatible endpoint all work."})]}),h.jsxs("span",{className:"flex items-center gap-1 text-xs text-amber-600 dark:text-amber-400 font-medium shrink-0 group-hover:translate-x-0.5 transition-transform",children:["Open Settings ",h.jsx(zx,{className:"h-3.5 w-3.5"})]})]}),h.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:F3.map(N=>{const A=N.icon;return h.jsxs("div",{className:"rounded-xl border bg-card/40 backdrop-blur-sm p-4 flex flex-col gap-3",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:me("flex items-center justify-center w-8 h-8 rounded-lg border",N.tone),children:h.jsx(A,{className:"h-4 w-4"})}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-semibold",children:N.title}),h.jsx("p",{className:"text-xs text-muted-foreground",children:N.hint})]})]}),h.jsx("div",{className:"flex flex-col gap-1.5",children:N.prompts.map((E,M)=>h.jsx("button",{type:"button",onClick:()=>Tf(E),className:"text-left text-xs leading-relaxed text-foreground/80 hover:text-foreground border border-transparent hover:border-border/60 rounded-lg px-3 py-2 hover:bg-muted/40 transition-colors line-clamp-3",title:E,children:E},M))})]},N.title)})}),C.length>0&&h.jsxs("div",{className:"rounded-xl border bg-muted/20 p-4",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[h.jsx(Dx,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground font-medium",children:"Pick back up"})]}),h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:C.map(N=>h.jsxs("button",{type:"button",onClick:()=>y(N.id),className:"text-left rounded-lg border border-border/40 bg-background/60 hover:border-primary/40 hover:bg-accent/30 px-3 py-2 transition-colors group/sess",title:N.title,children:[h.jsx("div",{className:"text-sm font-medium truncate text-foreground group-hover/sess:text-primary",children:v[N.id]||N.title||"(empty)"}),h.jsxs("div",{className:"text-[10px] text-muted-foreground font-mono truncate mt-0.5",children:[N.provider,"/",N.model,N.tokenTotal>0&&h.jsxs("span",{className:"ml-2",children:["· ",N.tokenTotal.toLocaleString()," tok"]})]})]},N.id))})]}),m.length>0&&h.jsxs("div",{className:"rounded-xl border bg-muted/20 p-4",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[h.jsx(Bx,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground font-medium",children:"Recent prompts"})]}),h.jsx("div",{className:"flex flex-col gap-1.5",children:m.filter(N=>!N.startsWith("/")).slice(0,5).map((N,A)=>h.jsx("button",{type:"button",onClick:()=>Tf(N),className:"text-left text-xs leading-relaxed text-muted-foreground hover:text-foreground border border-transparent hover:border-border/60 rounded-lg px-3 py-2 hover:bg-background/60 transition-colors line-clamp-2",title:N,children:N},A))})]}),h.jsxs("div",{className:"rounded-xl border bg-muted/20 p-4",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[h.jsx(Hx,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground font-medium",children:"Quick commands"})]}),h.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:Y3.map(N=>h.jsxs("button",{type:"button",onClick:()=>Tf(N.name),className:"text-left flex flex-col gap-0.5 rounded-md border border-border/40 bg-background/60 px-3 py-2 hover:border-primary/40 hover:bg-accent/40 transition-colors",children:[h.jsx("span",{className:"font-mono text-xs text-foreground",children:N.name}),h.jsx("span",{className:"text-[11px] text-muted-foreground truncate",children:N.hint})]},N.name))})]})]})}var e1=wx();const P3=Ri(e1);function ks(t){const r=X3(t),l=w.forwardRef((i,s)=>{const{children:u,...c}=i,f=w.Children.toArray(u),p=f.find(K3);if(p){const m=p.props.children,x=f.map(y=>y===p?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:y);return h.jsx(r,{...c,ref:s,children:w.isValidElement(m)?w.cloneElement(m,void 0,x):null})}return h.jsx(r,{...c,ref:s,children:u})});return l.displayName=`${t}.Slot`,l}function X3(t){const r=w.forwardRef((l,i)=>{const{children:s,...u}=l;if(w.isValidElement(s)){const c=J3(s),f=Z3(u,s.props);return s.type!==w.Fragment&&(f.ref=i?Sd(i,c):c),w.cloneElement(s,f)}return w.Children.count(s)>1?w.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Q3=Symbol("radix.slottable");function K3(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Q3}function Z3(t,r){const l={...r};for(const i in r){const s=t[i],u=r[i];/^on[A-Z]/.test(i)?s&&u?l[i]=(...f)=>{const p=u(...f);return s(...f),p}:s&&(l[i]=s):i==="style"?l[i]={...s,...u}:i==="className"&&(l[i]=[s,u].filter(Boolean).join(" "))}return{...t,...l}}function J3(t){var i,s;let r=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?t.ref:(r=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}var W3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Tt=W3.reduce((t,r)=>{const l=ks(`Primitive.${r}`),i=w.forwardRef((s,u)=>{const{asChild:c,...f}=s,p=c?l:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(p,{...f,ref:u})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function eT(t,r){t&&e1.flushSync(()=>t.dispatchEvent(r))}var ya=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function tT(t,r){return w.useReducer((l,i)=>r[l][i]??l,t)}var cr=t=>{const{present:r,children:l}=t,i=nT(r),s=typeof l=="function"?l({present:i.isPresent}):w.Children.only(l),u=$t(i.ref,rT(s));return typeof l=="function"||i.isPresent?w.cloneElement(s,{ref:u}):null};cr.displayName="Presence";function nT(t){const[r,l]=w.useState(),i=w.useRef(null),s=w.useRef(t),u=w.useRef("none"),c=t?"mounted":"unmounted",[f,p]=tT(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const m=ss(i.current);u.current=f==="mounted"?m:"none"},[f]),ya(()=>{const m=i.current,x=s.current;if(x!==t){const b=u.current,v=ss(m);t?p("MOUNT"):v==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(x&&b!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,p]),ya(()=>{if(r){let m;const x=r.ownerDocument.defaultView??window,y=v=>{const N=ss(i.current).includes(CSS.escape(v.animationName));if(v.target===r&&N&&(p("ANIMATION_END"),!s.current)){const A=r.style.animationFillMode;r.style.animationFillMode="forwards",m=x.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=A)})}},b=v=>{v.target===r&&(u.current=ss(i.current))};return r.addEventListener("animationstart",b),r.addEventListener("animationcancel",y),r.addEventListener("animationend",y),()=>{x.clearTimeout(m),r.removeEventListener("animationstart",b),r.removeEventListener("animationcancel",y),r.removeEventListener("animationend",y)}}else p("ANIMATION_END")},[r,p]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:w.useCallback(m=>{i.current=m?getComputedStyle(m):null,l(m)},[])}}function ss(t){return(t==null?void 0:t.animationName)||"none"}function rT(t){var i,s;let r=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,l=r&&"isReactWarning"in r&&r.isReactWarning;return l?t.ref:(r=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=r&&"isReactWarning"in r&&r.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}function lT(t,r){const l=w.createContext(r),i=u=>{const{children:c,...f}=u,p=w.useMemo(()=>f,Object.values(f));return h.jsx(l.Provider,{value:p,children:c})};i.displayName=t+"Provider";function s(u){const c=w.useContext(l);if(c)return c;if(r!==void 0)return r;throw new Error(`\`${u}\` must be used within \`${t}\``)}return[i,s]}function Ui(t,r=[]){let l=[];function i(u,c){const f=w.createContext(c),p=l.length;l=[...l,c];const m=y=>{var E;const{scope:b,children:v,...C}=y,N=((E=b==null?void 0:b[t])==null?void 0:E[p])||f,A=w.useMemo(()=>C,Object.values(C));return h.jsx(N.Provider,{value:A,children:v})};m.displayName=u+"Provider";function x(y,b){var N;const v=((N=b==null?void 0:b[t])==null?void 0:N[p])||f,C=w.useContext(v);if(C)return C;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${u}\``)}return[m,x]}const s=()=>{const u=l.map(c=>w.createContext(c));return function(f){const p=(f==null?void 0:f[t])||u;return w.useMemo(()=>({[`__scope${t}`]:{...f,[t]:p}}),[f,p])}};return s.scopeName=t,[i,aT(s,...r)]}function aT(...t){const r=t[0];if(t.length===1)return r;const l=()=>{const i=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const c=i.reduce((f,{useScope:p,scopeName:m})=>{const y=p(u)[`__scope${m}`];return{...f,...y}},{});return w.useMemo(()=>({[`__scope${r.scopeName}`]:c}),[c])}};return l.scopeName=r.scopeName,l}function hn(t){const r=w.useRef(t);return w.useEffect(()=>{r.current=t}),w.useMemo(()=>(...l)=>{var i;return(i=r.current)==null?void 0:i.call(r,...l)},[])}var iT=w.createContext(void 0);function qd(t){const r=w.useContext(iT);return t||r||"ltr"}function oT(t,[r,l]){return Math.min(l,Math.max(r,t))}function pt(t,r,{checkForDefaultPrevented:l=!0}={}){return function(s){if(t==null||t(s),l===!1||!s.defaultPrevented)return r==null?void 0:r(s)}}function sT(t,r){return w.useReducer((l,i)=>r[l][i]??l,t)}var Id="ScrollArea",[t1]=Ui(Id),[uT,Tn]=t1(Id),n1=w.forwardRef((t,r)=>{const{__scopeScrollArea:l,type:i="hover",dir:s,scrollHideDelay:u=600,...c}=t,[f,p]=w.useState(null),[m,x]=w.useState(null),[y,b]=w.useState(null),[v,C]=w.useState(null),[N,A]=w.useState(null),[E,M]=w.useState(0),[O,$]=w.useState(0),[P,L]=w.useState(!1),[Y,le]=w.useState(!1),oe=$t(r,X=>p(X)),H=qd(s);return h.jsx(uT,{scope:l,type:i,dir:H,scrollHideDelay:u,scrollArea:f,viewport:m,onViewportChange:x,content:y,onContentChange:b,scrollbarX:v,onScrollbarXChange:C,scrollbarXEnabled:P,onScrollbarXEnabledChange:L,scrollbarY:N,onScrollbarYChange:A,scrollbarYEnabled:Y,onScrollbarYEnabledChange:le,onCornerWidthChange:M,onCornerHeightChange:$,children:h.jsx(Tt.div,{dir:H,...c,ref:oe,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":O+"px",...t.style}})})});n1.displayName=Id;var r1="ScrollAreaViewport",l1=w.forwardRef((t,r)=>{const{__scopeScrollArea:l,children:i,nonce:s,...u}=t,c=Tn(r1,l),f=w.useRef(null),p=$t(r,f,c.onViewportChange);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),h.jsx(Tt.div,{"data-radix-scroll-area-viewport":"",...u,ref:p,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...t.style},children:h.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});l1.displayName=r1;var Vn="ScrollAreaScrollbar",Vd=w.forwardRef((t,r)=>{const{forceMount:l,...i}=t,s=Tn(Vn,t.__scopeScrollArea),{onScrollbarXEnabledChange:u,onScrollbarYEnabledChange:c}=s,f=t.orientation==="horizontal";return w.useEffect(()=>(f?u(!0):c(!0),()=>{f?u(!1):c(!1)}),[f,u,c]),s.type==="hover"?h.jsx(cT,{...i,ref:r,forceMount:l}):s.type==="scroll"?h.jsx(fT,{...i,ref:r,forceMount:l}):s.type==="auto"?h.jsx(a1,{...i,ref:r,forceMount:l}):s.type==="always"?h.jsx($d,{...i,ref:r}):null});Vd.displayName=Vn;var cT=w.forwardRef((t,r)=>{const{forceMount:l,...i}=t,s=Tn(Vn,t.__scopeScrollArea),[u,c]=w.useState(!1);return w.useEffect(()=>{const f=s.scrollArea;let p=0;if(f){const m=()=>{window.clearTimeout(p),c(!0)},x=()=>{p=window.setTimeout(()=>c(!1),s.scrollHideDelay)};return f.addEventListener("pointerenter",m),f.addEventListener("pointerleave",x),()=>{window.clearTimeout(p),f.removeEventListener("pointerenter",m),f.removeEventListener("pointerleave",x)}}},[s.scrollArea,s.scrollHideDelay]),h.jsx(cr,{present:l||u,children:h.jsx(a1,{"data-state":u?"visible":"hidden",...i,ref:r})})}),fT=w.forwardRef((t,r)=>{const{forceMount:l,...i}=t,s=Tn(Vn,t.__scopeScrollArea),u=t.orientation==="horizontal",c=_s(()=>p("SCROLL_END"),100),[f,p]=sT("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(f==="idle"){const m=window.setTimeout(()=>p("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(m)}},[f,s.scrollHideDelay,p]),w.useEffect(()=>{const m=s.viewport,x=u?"scrollLeft":"scrollTop";if(m){let y=m[x];const b=()=>{const v=m[x];y!==v&&(p("SCROLL"),c()),y=v};return m.addEventListener("scroll",b),()=>m.removeEventListener("scroll",b)}},[s.viewport,u,p,c]),h.jsx(cr,{present:l||f!=="hidden",children:h.jsx($d,{"data-state":f==="hidden"?"hidden":"visible",...i,ref:r,onPointerEnter:pt(t.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:pt(t.onPointerLeave,()=>p("POINTER_LEAVE"))})})}),a1=w.forwardRef((t,r)=>{const l=Tn(Vn,t.__scopeScrollArea),{forceMount:i,...s}=t,[u,c]=w.useState(!1),f=t.orientation==="horizontal",p=_s(()=>{if(l.viewport){const m=l.viewport.offsetWidth<l.viewport.scrollWidth,x=l.viewport.offsetHeight<l.viewport.scrollHeight;c(f?m:x)}},10);return xa(l.viewport,p),xa(l.content,p),h.jsx(cr,{present:i||u,children:h.jsx($d,{"data-state":u?"visible":"hidden",...s,ref:r})})}),$d=w.forwardRef((t,r)=>{const{orientation:l="vertical",...i}=t,s=Tn(Vn,t.__scopeScrollArea),u=w.useRef(null),c=w.useRef(0),[f,p]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),m=c1(f.viewport,f.content),x={...i,sizes:f,onSizesChange:p,hasThumb:m>0&&m<1,onThumbChange:b=>u.current=b,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:b=>c.current=b};function y(b,v){return yT(b,c.current,f,v)}return l==="horizontal"?h.jsx(dT,{...x,ref:r,onThumbPositionChange:()=>{if(s.viewport&&u.current){const b=s.viewport.scrollLeft,v=ox(b,f,s.dir);u.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:b=>{s.viewport&&(s.viewport.scrollLeft=b)},onDragScroll:b=>{s.viewport&&(s.viewport.scrollLeft=y(b,s.dir))}}):l==="vertical"?h.jsx(hT,{...x,ref:r,onThumbPositionChange:()=>{if(s.viewport&&u.current){const b=s.viewport.scrollTop,v=ox(b,f);u.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:b=>{s.viewport&&(s.viewport.scrollTop=b)},onDragScroll:b=>{s.viewport&&(s.viewport.scrollTop=y(b))}}):null}),dT=w.forwardRef((t,r)=>{const{sizes:l,onSizesChange:i,...s}=t,u=Tn(Vn,t.__scopeScrollArea),[c,f]=w.useState(),p=w.useRef(null),m=$t(r,p,u.onScrollbarXChange);return w.useEffect(()=>{p.current&&f(getComputedStyle(p.current))},[p]),h.jsx(o1,{"data-orientation":"horizontal",...s,ref:m,sizes:l,style:{bottom:0,left:u.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:u.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Os(l)+"px",...t.style},onThumbPointerDown:x=>t.onThumbPointerDown(x.x),onDragScroll:x=>t.onDragScroll(x.x),onWheelScroll:(x,y)=>{if(u.viewport){const b=u.viewport.scrollLeft+x.deltaX;t.onWheelScroll(b),d1(b,y)&&x.preventDefault()}},onResize:()=>{p.current&&u.viewport&&c&&i({content:u.viewport.scrollWidth,viewport:u.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:Ns(c.paddingLeft),paddingEnd:Ns(c.paddingRight)}})}})}),hT=w.forwardRef((t,r)=>{const{sizes:l,onSizesChange:i,...s}=t,u=Tn(Vn,t.__scopeScrollArea),[c,f]=w.useState(),p=w.useRef(null),m=$t(r,p,u.onScrollbarYChange);return w.useEffect(()=>{p.current&&f(getComputedStyle(p.current))},[p]),h.jsx(o1,{"data-orientation":"vertical",...s,ref:m,sizes:l,style:{top:0,right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Os(l)+"px",...t.style},onThumbPointerDown:x=>t.onThumbPointerDown(x.y),onDragScroll:x=>t.onDragScroll(x.y),onWheelScroll:(x,y)=>{if(u.viewport){const b=u.viewport.scrollTop+x.deltaY;t.onWheelScroll(b),d1(b,y)&&x.preventDefault()}},onResize:()=>{p.current&&u.viewport&&c&&i({content:u.viewport.scrollHeight,viewport:u.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:Ns(c.paddingTop),paddingEnd:Ns(c.paddingBottom)}})}})}),[mT,i1]=t1(Vn),o1=w.forwardRef((t,r)=>{const{__scopeScrollArea:l,sizes:i,hasThumb:s,onThumbChange:u,onThumbPointerUp:c,onThumbPointerDown:f,onThumbPositionChange:p,onDragScroll:m,onWheelScroll:x,onResize:y,...b}=t,v=Tn(Vn,l),[C,N]=w.useState(null),A=$t(r,oe=>N(oe)),E=w.useRef(null),M=w.useRef(""),O=v.viewport,$=i.content-i.viewport,P=hn(x),L=hn(p),Y=_s(y,10);function le(oe){if(E.current){const H=oe.clientX-E.current.left,X=oe.clientY-E.current.top;m({x:H,y:X})}}return w.useEffect(()=>{const oe=H=>{const X=H.target;(C==null?void 0:C.contains(X))&&P(H,$)};return document.addEventListener("wheel",oe,{passive:!1}),()=>document.removeEventListener("wheel",oe,{passive:!1})},[O,C,$,P]),w.useEffect(L,[i,L]),xa(C,Y),xa(v.content,Y),h.jsx(mT,{scope:l,scrollbar:C,hasThumb:s,onThumbChange:hn(u),onThumbPointerUp:hn(c),onThumbPositionChange:L,onThumbPointerDown:hn(f),children:h.jsx(Tt.div,{...b,ref:A,style:{position:"absolute",...b.style},onPointerDown:pt(t.onPointerDown,oe=>{oe.button===0&&(oe.target.setPointerCapture(oe.pointerId),E.current=C.getBoundingClientRect(),M.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),le(oe))}),onPointerMove:pt(t.onPointerMove,le),onPointerUp:pt(t.onPointerUp,oe=>{const H=oe.target;H.hasPointerCapture(oe.pointerId)&&H.releasePointerCapture(oe.pointerId),document.body.style.webkitUserSelect=M.current,v.viewport&&(v.viewport.style.scrollBehavior=""),E.current=null})})})}),Cs="ScrollAreaThumb",s1=w.forwardRef((t,r)=>{const{forceMount:l,...i}=t,s=i1(Cs,t.__scopeScrollArea);return h.jsx(cr,{present:l||s.hasThumb,children:h.jsx(pT,{ref:r,...i})})}),pT=w.forwardRef((t,r)=>{const{__scopeScrollArea:l,style:i,...s}=t,u=Tn(Cs,l),c=i1(Cs,l),{onThumbPositionChange:f}=c,p=$t(r,y=>c.onThumbChange(y)),m=w.useRef(void 0),x=_s(()=>{m.current&&(m.current(),m.current=void 0)},100);return w.useEffect(()=>{const y=u.viewport;if(y){const b=()=>{if(x(),!m.current){const v=xT(y,f);m.current=v,f()}};return f(),y.addEventListener("scroll",b),()=>y.removeEventListener("scroll",b)}},[u.viewport,x,f]),h.jsx(Tt.div,{"data-state":c.hasThumb?"visible":"hidden",...s,ref:p,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:pt(t.onPointerDownCapture,y=>{const v=y.target.getBoundingClientRect(),C=y.clientX-v.left,N=y.clientY-v.top;c.onThumbPointerDown({x:C,y:N})}),onPointerUp:pt(t.onPointerUp,c.onThumbPointerUp)})});s1.displayName=Cs;var Fd="ScrollAreaCorner",u1=w.forwardRef((t,r)=>{const l=Tn(Fd,t.__scopeScrollArea),i=!!(l.scrollbarX&&l.scrollbarY);return l.type!=="scroll"&&i?h.jsx(gT,{...t,ref:r}):null});u1.displayName=Fd;var gT=w.forwardRef((t,r)=>{const{__scopeScrollArea:l,...i}=t,s=Tn(Fd,l),[u,c]=w.useState(0),[f,p]=w.useState(0),m=!!(u&&f);return xa(s.scrollbarX,()=>{var y;const x=((y=s.scrollbarX)==null?void 0:y.offsetHeight)||0;s.onCornerHeightChange(x),p(x)}),xa(s.scrollbarY,()=>{var y;const x=((y=s.scrollbarY)==null?void 0:y.offsetWidth)||0;s.onCornerWidthChange(x),c(x)}),m?h.jsx(Tt.div,{...i,ref:r,style:{width:u,height:f,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function Ns(t){return t?parseInt(t,10):0}function c1(t,r){const l=t/r;return isNaN(l)?0:l}function Os(t){const r=c1(t.viewport,t.content),l=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=(t.scrollbar.size-l)*r;return Math.max(i,18)}function yT(t,r,l,i="ltr"){const s=Os(l),u=s/2,c=r||u,f=s-c,p=l.scrollbar.paddingStart+c,m=l.scrollbar.size-l.scrollbar.paddingEnd-f,x=l.content-l.viewport,y=i==="ltr"?[0,x]:[x*-1,0];return f1([p,m],y)(t)}function ox(t,r,l="ltr"){const i=Os(r),s=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,u=r.scrollbar.size-s,c=r.content-r.viewport,f=u-i,p=l==="ltr"?[0,c]:[c*-1,0],m=oT(t,p);return f1([0,c],[0,f])(m)}function f1(t,r){return l=>{if(t[0]===t[1]||r[0]===r[1])return r[0];const i=(r[1]-r[0])/(t[1]-t[0]);return r[0]+i*(l-t[0])}}function d1(t,r){return t>0&&t<r}var xT=(t,r=()=>{})=>{let l={left:t.scrollLeft,top:t.scrollTop},i=0;return(function s(){const u={left:t.scrollLeft,top:t.scrollTop},c=l.left!==u.left,f=l.top!==u.top;(c||f)&&r(),l=u,i=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(i)};function _s(t,r){const l=hn(t),i=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(i.current),[]),w.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(l,r)},[l,r])}function xa(t,r){const l=hn(r);ya(()=>{let i=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(l)});return s.observe(t),()=>{window.cancelAnimationFrame(i),s.unobserve(t)}}},[t,l])}var h1=n1,bT=l1,vT=u1;const Ls=w.forwardRef(({className:t,children:r,...l},i)=>h.jsxs(h1,{ref:i,className:me("relative overflow-hidden",t),...l,children:[h.jsx(bT,{className:"h-full w-full rounded-[inherit]",children:r}),h.jsx(m1,{}),h.jsx(vT,{})]}));Ls.displayName=h1.displayName;const m1=w.forwardRef(({className:t,orientation:r="vertical",...l},i)=>h.jsx(Vd,{ref:i,orientation:r,className:me("flex touch-none select-none transition-colors",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...l,children:h.jsx(s1,{className:"relative flex-1 rounded-full bg-border"})}));m1.displayName=Vd.displayName;function wi(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(t>=1e4?0:1)}k`:String(t)}function ST(){const t=he(i=>i.thinkingBuffer);if(!t)return null;const l=t.split(`
|
|
562
|
+
`).slice(-6).join(`
|
|
563
|
+
`).trim();return h.jsxs("div",{className:"flex gap-3 animate-message",children:[h.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center bg-violet-500/10 text-violet-600 dark:text-violet-400 ring-2 ring-offset-2 ring-offset-background ring-violet-500/20",children:h.jsx(Lx,{className:"h-4 w-4 animate-pulse"})}),h.jsxs("div",{className:"flex flex-col gap-1 max-w-[85%] min-w-0",children:[h.jsx("span",{className:"text-xs font-medium text-violet-600 dark:text-violet-400 px-1",children:"Thinking…"}),h.jsx("div",{className:"rounded-2xl rounded-bl-md px-3 py-2 bg-violet-500/[0.04] border border-violet-500/20 text-foreground/80",children:h.jsx("pre",{className:"whitespace-pre-wrap break-words font-sans text-xs leading-relaxed italic max-h-32 overflow-hidden",children:l||"…"})})]})]})}function wT(){const{messages:t,isLoading:r}=he(),l=Ne(Z=>Z.setPaletteOpen),i=Ne(Z=>Z.setShortcutsOpen),s=Ne(Z=>Z.sidebarOpen),u=Ne(Z=>Z.toggleSidebar),c=Ne(Z=>Z.compactMode),f=$e(Z=>Z.setTheme),p=$e(Z=>Z.theme),{totalTokens:m,cost:x,startTime:y,lastInputTokens:b,maxContext:v,projectName:C,iteration:N}=Pe(),{wsConnected:A,wsStatus:E,provider:M,model:O}=$e(),{setCurrentView:$}=Ne(),P=w.useRef(null),L=v>0&&b>0?Math.min(100,Math.round(b/v*100)):0,Y=L>=85?"bg-red-500/15 text-red-600 dark:text-red-400":L>=70?"bg-amber-500/15 text-amber-600 dark:text-amber-400":"bg-muted text-muted-foreground",[le,oe]=w.useState(!0),[H,X]=w.useState(0),[G,fe]=w.useState(!1),ue=w.useRef(t.length),ne=w.useCallback(()=>{var Z;return((Z=P.current)==null?void 0:Z.querySelector("[data-radix-scroll-area-viewport]"))??null},[]);w.useEffect(()=>{const Z=ne();if(!Z)return;const xe=()=>{const Ae=Z.scrollHeight-Z.scrollTop-Z.clientHeight<120;oe(Ae),Ae&&(X(0),ue.current=t.length);const ht=Z.scrollTop>Z.clientHeight&&Z.scrollHeight>Z.clientHeight*2.5;fe(ht)};return Z.addEventListener("scroll",xe,{passive:!0}),()=>Z.removeEventListener("scroll",xe)},[ne,t.length]),w.useEffect(()=>{const Z=ne();if(Z)if(le)Z.scrollTop=Z.scrollHeight,ue.current=t.length;else{const xe=t.length-ue.current;xe>0&&X(xe)}},[t,le,ne]);const R=w.useCallback(()=>{const Z=ne();Z&&(Z.scrollTo({top:Z.scrollHeight,behavior:"smooth"}),oe(!0),X(0),ue.current=t.length)},[ne,t.length]),J=w.useCallback(()=>{const Z=ne();Z&&Z.scrollTo({top:0,behavior:"smooth"})},[ne]),[ie,ge]=w.useState(null),[D,T]=w.useState(()=>Date.now()),B=w.useRef(null);w.useEffect(()=>{r&&ie===null&&ge(Date.now()),!r&&ie!==null&&ge(null)},[r,ie]),w.useEffect(()=>{if(!r)return;const Z=setInterval(()=>T(Date.now()),500);return()=>clearInterval(Z)},[r]);const j=Z=>{if(!Z)return"--";const xe=Math.floor((Date.now()-Z)/1e3);if(xe<60)return`${xe}s`;const ke=Math.floor(xe/60),Ae=xe%60;return`${ke}m ${Ae}s`},_=(()=>{if(!r)return"idle";const Z=t[t.length-1];return(Z==null?void 0:Z.role)==="assistant"&&!!Z.content&&Z.streaming?"streaming":"thinking"})(),ee=_==="idle"?"bg-muted text-muted-foreground":_==="streaming"?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-amber-500/10 text-amber-600 dark:text-amber-400",te=v>0&&b>0||m.input>0||!!y;return h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("header",{className:"flex flex-col border-b bg-card shrink-0",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2",children:[h.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[!s&&h.jsx(Le,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:u,title:"Open sidebar (Ctrl+\\\\)",children:h.jsx(n2,{className:"h-4 w-4"})}),!s&&h.jsx("div",{className:"flex items-center gap-1.5 shrink-0 mr-1",children:h.jsx("div",{className:"w-5 h-5 rounded bg-primary flex items-center justify-center",children:h.jsx(bd,{className:"h-3 w-3 text-primary-foreground"})})}),h.jsx(Z2,{wsStatus:E,wsConnected:A}),h.jsxs("span",{className:me("flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[11px] font-medium shrink-0 tabular-nums",ee),title:`Agent state: ${_}`,children:[_!=="idle"&&h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-pulse"}),h.jsx("span",{children:_})]}),C&&h.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-muted-foreground shrink-0 min-w-0",title:`Project: ${C}`,children:[h.jsx(Yw,{className:"h-3 w-3 shrink-0"}),h.jsx("span",{className:"truncate max-w-[12rem]",children:C})]}),h.jsxs("button",{type:"button",onClick:()=>Ne.getState().setModelSwitcherOpen(!0),className:"group flex items-center gap-1 px-2 py-0.5 rounded-md border bg-background/50 hover:bg-accent hover:border-primary/40 transition-colors text-[11px] min-w-0 shrink-0",title:"Change provider / model (Ctrl+M)",children:[h.jsx(Ti,{className:"h-3 w-3 text-muted-foreground group-hover:text-foreground shrink-0"}),h.jsxs("span",{className:"font-mono truncate max-w-[16rem]",children:[h.jsx("span",{className:"text-muted-foreground",children:M||"no-provider"}),h.jsx("span",{className:"text-muted-foreground/40 mx-0.5",children:"/"}),h.jsx("span",{className:"font-medium",children:O||"no-model"})]})]}),h.jsx(q3,{}),N&&h.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full text-[11px] font-medium bg-primary/10 text-primary shrink-0",title:"Agent iteration",children:[h.jsx(Mw,{className:"h-3 w-3 animate-pulse"}),"iter ",N.index,N.max>0?`/${N.max}`:""]})]}),h.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[h.jsx(Le,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>l(!0),title:"Command palette (Ctrl+K)",children:h.jsx(Bw,{className:"h-4 w-4"})}),h.jsx(Le,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{f(p==="light"?"dark":p==="dark"?"system":"light")},title:`Theme: ${p} (click to cycle)`,children:p==="light"?h.jsx(pd,{className:"h-4 w-4"}):p==="dark"?h.jsx(dd,{className:"h-4 w-4"}):h.jsx(fd,{className:"h-4 w-4"})}),h.jsx(Le,{variant:"ghost",size:"icon",className:"h-7 w-7 font-mono text-xs",onClick:()=>i(!0),title:"Keyboard shortcuts (?)",children:"?"}),h.jsx(Le,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>$("settings"),title:"Settings",children:h.jsx(md,{className:"h-4 w-4"})})]})]}),te&&h.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-1 border-t bg-muted/20 text-[11px] text-muted-foreground",children:[h.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1 tabular-nums",children:[v>0&&b>0&&h.jsxs("span",{className:me("flex items-center gap-1 px-1.5 py-0.5 rounded-full font-medium shrink-0",Y),title:`Last input: ${b.toLocaleString()} / ${v.toLocaleString()} tokens`,children:["ctx ",L,"% · ",wi(b),"/",wi(v)]}),m.input>0&&h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"font-medium text-foreground",children:wi(m.input)}),h.jsx("span",{children:"in"})]}),h.jsxs("span",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"font-medium text-foreground",children:wi(m.output)}),h.jsx("span",{children:"out"})]}),m.cacheRead&&m.cacheRead>0&&(()=>{const Z=(m.cacheRead??0)+m.input,xe=Z>0?Math.round((m.cacheRead??0)/Z*100):0;return h.jsxs("span",{className:"flex items-center gap-1",title:`Cache hit ratio: ${xe}%`,children:[h.jsx("span",{className:"font-medium text-foreground",children:wi(m.cacheRead)}),h.jsxs("span",{children:["cache (",xe,"%)"]})]})})(),h.jsx(J2,{})]})]}),y&&h.jsx("span",{className:"text-muted-foreground/70 tabular-nums shrink-0",children:j(y)})]})]}),h.jsxs("div",{className:"flex-1 relative overflow-hidden",children:[h.jsx(I3,{}),!le&&h.jsxs("button",{type:"button",onClick:R,className:me("absolute bottom-4 left-1/2 -translate-x-1/2 z-10","flex items-center gap-2 px-4 py-2 rounded-full shadow-lg","bg-primary text-primary-foreground text-xs font-medium","hover:bg-primary/90 transition-colors animate-message"),children:[h.jsx(Rx,{className:"h-3.5 w-3.5"}),H>0?`${H} new message${H===1?"":"s"}`:"Jump to latest"]}),G&&h.jsxs("button",{type:"button",onClick:J,title:"Scroll to top (oldest)",className:me("absolute top-3 right-3 z-10","flex items-center gap-1 px-2.5 py-1 rounded-full shadow-md border","bg-background/90 backdrop-blur-sm text-[11px] text-muted-foreground","hover:text-foreground hover:bg-background transition-colors animate-message"),children:[h.jsx(Ox,{className:"h-3 w-3"}),h.jsx("span",{children:"Top"})]}),h.jsx(Ls,{className:"h-full",ref:P,children:h.jsxs("div",{className:me("mx-auto pb-8",c?"max-w-5xl p-3 space-y-3":"max-w-5xl p-4 space-y-6"),children:[t.length===0&&!r&&h.jsx(G3,{}),(()=>{const Z=[];for(let ye=0;ye<t.length;ye++){const Se=t[ye];if(Se.role==="tool"){const Fe=Z[Z.length-1];Fe&&Fe.kind==="tools"?Fe.tools.push(Se):Z.push({kind:"tools",tools:[Se],key:Se.id})}else{const Fe=t[ye-1];Z.push({kind:"msg",message:Se,isFirst:!Fe||Fe.role!==Se.role})}}const xe=[];for(const ye of Z){if(ye.kind==="msg"&&ye.message.role==="user"){xe.push({kind:"user",message:ye.message,key:ye.message.id});continue}const Se=xe[xe.length-1];if(Se&&Se.kind==="agent")Se.items.push(ye);else{const Fe=ye.kind==="msg"?ye.message.id:ye.key;xe.push({kind:"agent",items:[ye],key:Fe})}}let ke=null;const Ae=ye=>{const Se=new Date(ye);return`${Se.getFullYear()}-${Se.getMonth()}-${Se.getDate()}`},ht=ye=>{const Se=new Date(ye),Fe=new Date,nt=new Date(Date.now()-864e5);return Ae(ye)===Ae(Fe.getTime())?"Today":Ae(ye)===Ae(nt.getTime())?"Yesterday":Se.toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric",year:Se.getFullYear()===Fe.getFullYear()?void 0:"numeric"})},yt=ye=>{if(ye.kind==="user")return ye.message.timestamp;const Se=ye.items[0];return Se.kind==="msg"?Se.message.timestamp:Se.tools[0].timestamp},Ue=[];for(let ye=0;ye<xe.length;ye++){const Se=xe[ye],Fe=yt(Se),nt=Ae(Fe);if(nt!==ke&&(Ue.push(h.jsxs("div",{className:"flex items-center gap-3 py-1 text-[11px] text-muted-foreground/70 uppercase tracking-wider font-medium",children:[h.jsx("div",{className:"flex-1 h-px bg-border/50"}),h.jsx("span",{children:ht(Fe)}),h.jsx("div",{className:"flex-1 h-px bg-border/50"})]},`day-${nt}-${ye}`)),ke=nt),Se.kind==="user"){Ue.push(h.jsx(ws,{message:Se.message,isFirst:!0},Se.key));continue}const Yt=ye===xe.length-1;Ue.push(h.jsx("div",{className:me(c?"space-y-1":"space-y-1.5"),children:Se.items.map((Qe,Mt)=>{const pn=Mt>0;if(Qe.kind==="msg")return h.jsx(ws,{message:Qe.message,isFirst:!pn&&Qe.isFirst,isContinuation:pn},Qe.message.id);const Gr=Yt&&Mt===Se.items.length-1&&r&&Qe.tools.some(fr=>fr.toolResult===void 0);return h.jsx($3,{tools:Qe.tools,defaultOpen:Gr,isContinuation:pn},Qe.key)})},Se.key))}return Ue})(),h.jsx(ST,{}),r&&(()=>{const Z=t[t.length-1],xe=t.filter(ye=>ye.role==="tool"&&ye.toolResult===void 0);let ke="Thinking…";if(xe.length>0){const ye=Array.from(new Set(xe.map(nt=>nt.toolName).filter(Boolean))),Se=ye.slice(0,2).join(", "),Fe=ye.length>2?` +${ye.length-2}`:"";ke=xe.length===1?`Running ${Se||"tool"}…`:`Running ${xe.length} tools (${Se}${Fe})…`}else(Z==null?void 0:Z.role)==="assistant"&&Z.content?ke="Writing reply…":(Z==null?void 0:Z.role)==="tool"&&Z.toolResult!==void 0&&(ke="Thinking about the next step…");const Ae=ie?Math.max(0,Math.floor((D-ie)/1e3)):0,ht=Ae<60?`${Ae}s`:`${Math.floor(Ae/60)}m ${Ae%60}s`;let yt="";const Ue=(Z==null?void 0:Z.role)==="assistant"&&Z.streaming&&Z.content?Z:null;if(Ue){const ye=B.current;if(!ye||ye.id!==Ue.id)B.current={id:Ue.id,at:Date.now(),len:Ue.content.length};else{const Se=Math.max(1,D-ye.at),Fe=Math.max(0,Ue.content.length-ye.len);if(Se>500&&Fe>0){const nt=Fe*1e3/Se;yt=nt>=1e3?`${(nt/1e3).toFixed(1)}k ch/s`:`${Math.round(nt)} ch/s`}}}else B.current&&(B.current=null);return h.jsxs("div",{className:"flex gap-3 animate-message",children:[h.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center bg-accent text-accent-foreground ring-2 ring-offset-2 ring-offset-background ring-accent/20",children:h.jsx(_x,{className:"h-4 w-4"})}),h.jsx("div",{className:"flex flex-col gap-1.5",children:h.jsx("div",{className:"rounded-2xl px-4 py-3 bg-card border text-foreground",children:h.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[h.jsxs("span",{className:"flex gap-1",children:[h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary/70 animate-bounce [animation-delay:-0.3s]"}),h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary/70 animate-bounce [animation-delay:-0.15s]"}),h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-primary/70 animate-bounce"})]}),h.jsx("span",{className:"text-foreground/90",children:ke}),h.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:ht}),N&&h.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:["· iter ",N.index,N.max>0?`/${N.max}`:""]}),yt&&h.jsxs("span",{className:"text-xs text-muted-foreground/80 tabular-nums",children:["· ",yt]})]})})})]})})()]})})]}),h.jsx("div",{className:"border-t bg-card/50 backdrop-blur supports-[backdrop-filter]:bg-card/50 p-4 shrink-0",children:h.jsxs("div",{className:"max-w-5xl mx-auto",children:[h.jsx(K2,{}),h.jsx("p",{className:"text-xs text-center text-muted-foreground/50 mt-2",children:"Press Enter to send, Shift+Enter for new line"})]})})]})}var kT=od[" useId ".trim().toString()]||(()=>{}),CT=0;function Ei(t){const[r,l]=w.useState(kT());return ya(()=>{l(i=>i??String(CT++))},[t]),r?`radix-${r}`:""}var NT=od[" useInsertionEffect ".trim().toString()]||ya;function Yd({prop:t,defaultProp:r,onChange:l=()=>{},caller:i}){const[s,u,c]=jT({defaultProp:r,onChange:l}),f=t!==void 0,p=f?t:s;{const x=w.useRef(t!==void 0);w.useEffect(()=>{const y=x.current;y!==f&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=f},[f,i])}const m=w.useCallback(x=>{var y;if(f){const b=ET(x)?x(t):x;b!==t&&((y=c.current)==null||y.call(c,b))}else u(x)},[f,t,u,c]);return[p,m]}function jT({defaultProp:t,onChange:r}){const[l,i]=w.useState(t),s=w.useRef(l),u=w.useRef(r);return NT(()=>{u.current=r},[r]),w.useEffect(()=>{var c;s.current!==l&&((c=u.current)==null||c.call(u,l),s.current=l)},[l,s]),[l,i,u]}function ET(t){return typeof t=="function"}function TT(t,r=globalThis==null?void 0:globalThis.document){const l=hn(t);w.useEffect(()=>{const i=s=>{s.key==="Escape"&&l(s)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[l,r])}var AT="DismissableLayer",nd="dismissableLayer.update",MT="dismissableLayer.pointerDownOutside",DT="dismissableLayer.focusOutside",sx,p1=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),g1=w.forwardRef((t,r)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:c,onDismiss:f,...p}=t,m=w.useContext(p1),[x,y]=w.useState(null),b=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=w.useState({}),C=$t(r,Y=>y(Y)),N=Array.from(m.layers),[A]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=N.indexOf(A),M=x?N.indexOf(x):-1,O=m.layersWithOutsidePointerEventsDisabled.size>0,$=M>=E,P=OT(Y=>{const le=Y.target,oe=[...m.branches].some(H=>H.contains(le));!$||oe||(s==null||s(Y),c==null||c(Y),Y.defaultPrevented||f==null||f())},b),L=_T(Y=>{const le=Y.target;[...m.branches].some(H=>H.contains(le))||(u==null||u(Y),c==null||c(Y),Y.defaultPrevented||f==null||f())},b);return TT(Y=>{M===m.layers.size-1&&(i==null||i(Y),!Y.defaultPrevented&&f&&(Y.preventDefault(),f()))},b),w.useEffect(()=>{if(x)return l&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(sx=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(x)),m.layers.add(x),ux(),()=>{l&&m.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=sx)}},[x,b,l,m]),w.useEffect(()=>()=>{x&&(m.layers.delete(x),m.layersWithOutsidePointerEventsDisabled.delete(x),ux())},[x,m]),w.useEffect(()=>{const Y=()=>v({});return document.addEventListener(nd,Y),()=>document.removeEventListener(nd,Y)},[]),h.jsx(Tt.div,{...p,ref:C,style:{pointerEvents:O?$?"auto":"none":void 0,...t.style},onFocusCapture:pt(t.onFocusCapture,L.onFocusCapture),onBlurCapture:pt(t.onBlurCapture,L.onBlurCapture),onPointerDownCapture:pt(t.onPointerDownCapture,P.onPointerDownCapture)})});g1.displayName=AT;var RT="DismissableLayerBranch",zT=w.forwardRef((t,r)=>{const l=w.useContext(p1),i=w.useRef(null),s=$t(r,i);return w.useEffect(()=>{const u=i.current;if(u)return l.branches.add(u),()=>{l.branches.delete(u)}},[l.branches]),h.jsx(Tt.div,{...t,ref:s})});zT.displayName=RT;function OT(t,r=globalThis==null?void 0:globalThis.document){const l=hn(t),i=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const u=f=>{if(f.target&&!i.current){let p=function(){y1(MT,l,m,{discrete:!0})};const m={originalEvent:f};f.pointerType==="touch"?(r.removeEventListener("click",s.current),s.current=p,r.addEventListener("click",s.current,{once:!0})):p()}else r.removeEventListener("click",s.current);i.current=!1},c=window.setTimeout(()=>{r.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(c),r.removeEventListener("pointerdown",u),r.removeEventListener("click",s.current)}},[r,l]),{onPointerDownCapture:()=>i.current=!0}}function _T(t,r=globalThis==null?void 0:globalThis.document){const l=hn(t),i=w.useRef(!1);return w.useEffect(()=>{const s=u=>{u.target&&!i.current&&y1(DT,l,{originalEvent:u},{discrete:!1})};return r.addEventListener("focusin",s),()=>r.removeEventListener("focusin",s)},[r,l]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function ux(){const t=new CustomEvent(nd);document.dispatchEvent(t)}function y1(t,r,l,{discrete:i}){const s=l.originalEvent.target,u=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:l});r&&s.addEventListener(t,r,{once:!0}),i?eT(s,u):s.dispatchEvent(u)}var Af="focusScope.autoFocusOnMount",Mf="focusScope.autoFocusOnUnmount",cx={bubbles:!1,cancelable:!0},LT="FocusScope",x1=w.forwardRef((t,r)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...c}=t,[f,p]=w.useState(null),m=hn(s),x=hn(u),y=w.useRef(null),b=$t(r,N=>p(N)),v=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(i){let N=function(O){if(v.paused||!f)return;const $=O.target;f.contains($)?y.current=$:Ir(y.current,{select:!0})},A=function(O){if(v.paused||!f)return;const $=O.relatedTarget;$!==null&&(f.contains($)||Ir(y.current,{select:!0}))},E=function(O){if(document.activeElement===document.body)for(const P of O)P.removedNodes.length>0&&Ir(f)};document.addEventListener("focusin",N),document.addEventListener("focusout",A);const M=new MutationObserver(E);return f&&M.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",N),document.removeEventListener("focusout",A),M.disconnect()}}},[i,f,v.paused]),w.useEffect(()=>{if(f){dx.add(v);const N=document.activeElement;if(!f.contains(N)){const E=new CustomEvent(Af,cx);f.addEventListener(Af,m),f.dispatchEvent(E),E.defaultPrevented||(UT(VT(b1(f)),{select:!0}),document.activeElement===N&&Ir(f))}return()=>{f.removeEventListener(Af,m),setTimeout(()=>{const E=new CustomEvent(Mf,cx);f.addEventListener(Mf,x),f.dispatchEvent(E),E.defaultPrevented||Ir(N??document.body,{select:!0}),f.removeEventListener(Mf,x),dx.remove(v)},0)}}},[f,m,x,v]);const C=w.useCallback(N=>{if(!l&&!i||v.paused)return;const A=N.key==="Tab"&&!N.altKey&&!N.ctrlKey&&!N.metaKey,E=document.activeElement;if(A&&E){const M=N.currentTarget,[O,$]=BT(M);O&&$?!N.shiftKey&&E===$?(N.preventDefault(),l&&Ir(O,{select:!0})):N.shiftKey&&E===O&&(N.preventDefault(),l&&Ir($,{select:!0})):E===M&&N.preventDefault()}},[l,i,v.paused]);return h.jsx(Tt.div,{tabIndex:-1,...c,ref:b,onKeyDown:C})});x1.displayName=LT;function UT(t,{select:r=!1}={}){const l=document.activeElement;for(const i of t)if(Ir(i,{select:r}),document.activeElement!==l)return}function BT(t){const r=b1(t),l=fx(r,t),i=fx(r.reverse(),t);return[l,i]}function b1(t){const r=[],l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)r.push(l.currentNode);return r}function fx(t,r){for(const l of t)if(!HT(l,{upTo:r}))return l}function HT(t,{upTo:r}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(r!==void 0&&t===r)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function qT(t){return t instanceof HTMLInputElement&&"select"in t}function Ir(t,{select:r=!1}={}){if(t&&t.focus){const l=document.activeElement;t.focus({preventScroll:!0}),t!==l&&qT(t)&&r&&t.select()}}var dx=IT();function IT(){let t=[];return{add(r){const l=t[0];r!==l&&(l==null||l.pause()),t=hx(t,r),t.unshift(r)},remove(r){var l;t=hx(t,r),(l=t[0])==null||l.resume()}}}function hx(t,r){const l=[...t],i=l.indexOf(r);return i!==-1&&l.splice(i,1),l}function VT(t){return t.filter(r=>r.tagName!=="A")}var $T="Portal",v1=w.forwardRef((t,r)=>{var f;const{container:l,...i}=t,[s,u]=w.useState(!1);ya(()=>u(!0),[]);const c=l||s&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return c?P3.createPortal(h.jsx(Tt.div,{...i,ref:r}),c):null});v1.displayName=$T;var Df=0;function FT(){w.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??mx()),document.body.insertAdjacentElement("beforeend",t[1]??mx()),Df++,()=>{Df===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Df--}},[])}function mx(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var qn=function(){return qn=Object.assign||function(r){for(var l,i=1,s=arguments.length;i<s;i++){l=arguments[i];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(r[u]=l[u])}return r},qn.apply(this,arguments)};function S1(t,r){var l={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.indexOf(i)<0&&(l[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(t);s<i.length;s++)r.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(l[i[s]]=t[i[s]]);return l}function YT(t,r,l){if(l||arguments.length===2)for(var i=0,s=r.length,u;i<s;i++)(u||!(i in r))&&(u||(u=Array.prototype.slice.call(r,0,i)),u[i]=r[i]);return t.concat(u||Array.prototype.slice.call(r))}var ps="right-scroll-bar-position",gs="width-before-scroll-bar",GT="with-scroll-bars-hidden",PT="--removed-body-scroll-bar-size";function Rf(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function XT(t,r){var l=w.useState(function(){return{value:t,callback:r,facade:{get current(){return l.value},set current(i){var s=l.value;s!==i&&(l.value=i,l.callback(i,s))}}}})[0];return l.callback=r,l.facade}var QT=typeof window<"u"?w.useLayoutEffect:w.useEffect,px=new WeakMap;function KT(t,r){var l=XT(null,function(i){return t.forEach(function(s){return Rf(s,i)})});return QT(function(){var i=px.get(l);if(i){var s=new Set(i),u=new Set(t),c=l.current;s.forEach(function(f){u.has(f)||Rf(f,null)}),u.forEach(function(f){s.has(f)||Rf(f,c)})}px.set(l,t)},[t]),l}function ZT(t){return t}function JT(t,r){r===void 0&&(r=ZT);var l=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:t},useMedium:function(u){var c=r(u,i);return l.push(c),function(){l=l.filter(function(f){return f!==c})}},assignSyncMedium:function(u){for(i=!0;l.length;){var c=l;l=[],c.forEach(u)}l={push:function(f){return u(f)},filter:function(){return l}}},assignMedium:function(u){i=!0;var c=[];if(l.length){var f=l;l=[],f.forEach(u),c=l}var p=function(){var x=c;c=[],x.forEach(u)},m=function(){return Promise.resolve().then(p)};m(),l={push:function(x){c.push(x),m()},filter:function(x){return c=c.filter(x),l}}}};return s}function WT(t){t===void 0&&(t={});var r=JT(null);return r.options=qn({async:!0,ssr:!1},t),r}var w1=function(t){var r=t.sideCar,l=S1(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return w.createElement(i,qn({},l))};w1.isSideCarExport=!0;function eA(t,r){return t.useMedium(r),w1}var k1=WT(),zf=function(){},Us=w.forwardRef(function(t,r){var l=w.useRef(null),i=w.useState({onScrollCapture:zf,onWheelCapture:zf,onTouchMoveCapture:zf}),s=i[0],u=i[1],c=t.forwardProps,f=t.children,p=t.className,m=t.removeScrollBar,x=t.enabled,y=t.shards,b=t.sideCar,v=t.noRelative,C=t.noIsolation,N=t.inert,A=t.allowPinchZoom,E=t.as,M=E===void 0?"div":E,O=t.gapMode,$=S1(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=b,L=KT([l,r]),Y=qn(qn({},$),s);return w.createElement(w.Fragment,null,x&&w.createElement(P,{sideCar:k1,removeScrollBar:m,shards:y,noRelative:v,noIsolation:C,inert:N,setCallbacks:u,allowPinchZoom:!!A,lockRef:l,gapMode:O}),c?w.cloneElement(w.Children.only(f),qn(qn({},Y),{ref:L})):w.createElement(M,qn({},Y,{className:p,ref:L}),f))});Us.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Us.classNames={fullWidth:gs,zeroRight:ps};var tA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nA(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=tA();return r&&t.setAttribute("nonce",r),t}function rA(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function lA(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var aA=function(){var t=0,r=null;return{add:function(l){t==0&&(r=nA())&&(rA(r,l),lA(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},iA=function(){var t=aA();return function(r,l){w.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&l])}},C1=function(){var t=iA(),r=function(l){var i=l.styles,s=l.dynamic;return t(i,s),null};return r},oA={left:0,top:0,right:0,gap:0},Of=function(t){return parseInt(t||"",10)||0},sA=function(t){var r=window.getComputedStyle(document.body),l=r[t==="padding"?"paddingLeft":"marginLeft"],i=r[t==="padding"?"paddingTop":"marginTop"],s=r[t==="padding"?"paddingRight":"marginRight"];return[Of(l),Of(i),Of(s)]},uA=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return oA;var r=sA(t),l=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-l+r[2]-r[0])}},cA=C1(),da="data-scroll-locked",fA=function(t,r,l,i){var s=t.left,u=t.top,c=t.right,f=t.gap;return l===void 0&&(l="margin"),`
|
|
564
|
+
.`.concat(GT,` {
|
|
565
|
+
overflow: hidden `).concat(i,`;
|
|
566
|
+
padding-right: `).concat(f,"px ").concat(i,`;
|
|
567
|
+
}
|
|
568
|
+
body[`).concat(da,`] {
|
|
569
|
+
overflow: hidden `).concat(i,`;
|
|
570
|
+
overscroll-behavior: contain;
|
|
571
|
+
`).concat([r&&"position: relative ".concat(i,";"),l==="margin"&&`
|
|
572
|
+
padding-left: `.concat(s,`px;
|
|
573
|
+
padding-top: `).concat(u,`px;
|
|
574
|
+
padding-right: `).concat(c,`px;
|
|
575
|
+
margin-left:0;
|
|
576
|
+
margin-top:0;
|
|
577
|
+
margin-right: `).concat(f,"px ").concat(i,`;
|
|
578
|
+
`),l==="padding"&&"padding-right: ".concat(f,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.`).concat(ps,` {
|
|
582
|
+
right: `).concat(f,"px ").concat(i,`;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.`).concat(gs,` {
|
|
586
|
+
margin-right: `).concat(f,"px ").concat(i,`;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.`).concat(ps," .").concat(ps,` {
|
|
590
|
+
right: 0 `).concat(i,`;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.`).concat(gs," .").concat(gs,` {
|
|
594
|
+
margin-right: 0 `).concat(i,`;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
body[`).concat(da,`] {
|
|
598
|
+
`).concat(PT,": ").concat(f,`px;
|
|
599
|
+
}
|
|
600
|
+
`)},gx=function(){var t=parseInt(document.body.getAttribute(da)||"0",10);return isFinite(t)?t:0},dA=function(){w.useEffect(function(){return document.body.setAttribute(da,(gx()+1).toString()),function(){var t=gx()-1;t<=0?document.body.removeAttribute(da):document.body.setAttribute(da,t.toString())}},[])},hA=function(t){var r=t.noRelative,l=t.noImportant,i=t.gapMode,s=i===void 0?"margin":i;dA();var u=w.useMemo(function(){return uA(s)},[s]);return w.createElement(cA,{styles:fA(u,!r,s,l?"":"!important")})},rd=!1;if(typeof window<"u")try{var us=Object.defineProperty({},"passive",{get:function(){return rd=!0,!0}});window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{rd=!1}var ia=rd?{passive:!1}:!1,mA=function(t){return t.tagName==="TEXTAREA"},N1=function(t,r){if(!(t instanceof Element))return!1;var l=window.getComputedStyle(t);return l[r]!=="hidden"&&!(l.overflowY===l.overflowX&&!mA(t)&&l[r]==="visible")},pA=function(t){return N1(t,"overflowY")},gA=function(t){return N1(t,"overflowX")},yx=function(t,r){var l=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=j1(t,i);if(s){var u=E1(t,i),c=u[1],f=u[2];if(c>f)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},yA=function(t){var r=t.scrollTop,l=t.scrollHeight,i=t.clientHeight;return[r,l,i]},xA=function(t){var r=t.scrollLeft,l=t.scrollWidth,i=t.clientWidth;return[r,l,i]},j1=function(t,r){return t==="v"?pA(r):gA(r)},E1=function(t,r){return t==="v"?yA(r):xA(r)},bA=function(t,r){return t==="h"&&r==="rtl"?-1:1},vA=function(t,r,l,i,s){var u=bA(t,window.getComputedStyle(r).direction),c=u*i,f=l.target,p=r.contains(f),m=!1,x=c>0,y=0,b=0;do{if(!f)break;var v=E1(t,f),C=v[0],N=v[1],A=v[2],E=N-A-u*C;(C||E)&&j1(t,f)&&(y+=E,b+=C);var M=f.parentNode;f=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!p&&f!==document.body||p&&(r.contains(f)||r===f));return(x&&Math.abs(y)<1||!x&&Math.abs(b)<1)&&(m=!0),m},cs=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},xx=function(t){return[t.deltaX,t.deltaY]},bx=function(t){return t&&"current"in t?t.current:t},SA=function(t,r){return t[0]===r[0]&&t[1]===r[1]},wA=function(t){return`
|
|
601
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
602
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
603
|
+
`)},kA=0,oa=[];function CA(t){var r=w.useRef([]),l=w.useRef([0,0]),i=w.useRef(),s=w.useState(kA++)[0],u=w.useState(C1)[0],c=w.useRef(t);w.useEffect(function(){c.current=t},[t]),w.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var N=YT([t.lockRef.current],(t.shards||[]).map(bx),!0).filter(Boolean);return N.forEach(function(A){return A.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),N.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var f=w.useCallback(function(N,A){if("touches"in N&&N.touches.length===2||N.type==="wheel"&&N.ctrlKey)return!c.current.allowPinchZoom;var E=cs(N),M=l.current,O="deltaX"in N?N.deltaX:M[0]-E[0],$="deltaY"in N?N.deltaY:M[1]-E[1],P,L=N.target,Y=Math.abs(O)>Math.abs($)?"h":"v";if("touches"in N&&Y==="h"&&L.type==="range")return!1;var le=window.getSelection(),oe=le&&le.anchorNode,H=oe?oe===L||oe.contains(L):!1;if(H)return!1;var X=yx(Y,L);if(!X)return!0;if(X?P=Y:(P=Y==="v"?"h":"v",X=yx(Y,L)),!X)return!1;if(!i.current&&"changedTouches"in N&&(O||$)&&(i.current=P),!P)return!0;var G=i.current||P;return vA(G,A,N,G==="h"?O:$)},[]),p=w.useCallback(function(N){var A=N;if(!(!oa.length||oa[oa.length-1]!==u)){var E="deltaY"in A?xx(A):cs(A),M=r.current.filter(function(P){return P.name===A.type&&(P.target===A.target||A.target===P.shadowParent)&&SA(P.delta,E)})[0];if(M&&M.should){A.cancelable&&A.preventDefault();return}if(!M){var O=(c.current.shards||[]).map(bx).filter(Boolean).filter(function(P){return P.contains(A.target)}),$=O.length>0?f(A,O[0]):!c.current.noIsolation;$&&A.cancelable&&A.preventDefault()}}},[]),m=w.useCallback(function(N,A,E,M){var O={name:N,delta:A,target:E,should:M,shadowParent:NA(E)};r.current.push(O),setTimeout(function(){r.current=r.current.filter(function($){return $!==O})},1)},[]),x=w.useCallback(function(N){l.current=cs(N),i.current=void 0},[]),y=w.useCallback(function(N){m(N.type,xx(N),N.target,f(N,t.lockRef.current))},[]),b=w.useCallback(function(N){m(N.type,cs(N),N.target,f(N,t.lockRef.current))},[]);w.useEffect(function(){return oa.push(u),t.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:b}),document.addEventListener("wheel",p,ia),document.addEventListener("touchmove",p,ia),document.addEventListener("touchstart",x,ia),function(){oa=oa.filter(function(N){return N!==u}),document.removeEventListener("wheel",p,ia),document.removeEventListener("touchmove",p,ia),document.removeEventListener("touchstart",x,ia)}},[]);var v=t.removeScrollBar,C=t.inert;return w.createElement(w.Fragment,null,C?w.createElement(u,{styles:wA(s)}):null,v?w.createElement(hA,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function NA(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const jA=eA(k1,CA);var T1=w.forwardRef(function(t,r){return w.createElement(Us,qn({},t,{ref:r,sideCar:jA}))});T1.classNames=Us.classNames;var EA=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},sa=new WeakMap,fs=new WeakMap,ds={},_f=0,A1=function(t){return t&&(t.host||A1(t.parentNode))},TA=function(t,r){return r.map(function(l){if(t.contains(l))return l;var i=A1(l);return i&&t.contains(i)?i:(console.error("aria-hidden",l,"in not contained inside",t,". Doing nothing"),null)}).filter(function(l){return!!l})},AA=function(t,r,l,i){var s=TA(r,Array.isArray(t)?t:[t]);ds[l]||(ds[l]=new WeakMap);var u=ds[l],c=[],f=new Set,p=new Set(s),m=function(y){!y||f.has(y)||(f.add(y),m(y.parentNode))};s.forEach(m);var x=function(y){!y||p.has(y)||Array.prototype.forEach.call(y.children,function(b){if(f.has(b))x(b);else try{var v=b.getAttribute(i),C=v!==null&&v!=="false",N=(sa.get(b)||0)+1,A=(u.get(b)||0)+1;sa.set(b,N),u.set(b,A),c.push(b),N===1&&C&&fs.set(b,!0),A===1&&b.setAttribute(l,"true"),C||b.setAttribute(i,"true")}catch(E){console.error("aria-hidden: cannot operate on ",b,E)}})};return x(r),f.clear(),_f++,function(){c.forEach(function(y){var b=sa.get(y)-1,v=u.get(y)-1;sa.set(y,b),u.set(y,v),b||(fs.has(y)||y.removeAttribute(i),fs.delete(y)),v||y.removeAttribute(l)}),_f--,_f||(sa=new WeakMap,sa=new WeakMap,fs=new WeakMap,ds={})}},MA=function(t,r,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),s=EA(t);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),AA(i,s,l,"aria-hidden")):function(){return null}},Bs="Dialog",[M1]=Ui(Bs),[DA,On]=M1(Bs),D1=t=>{const{__scopeDialog:r,children:l,open:i,defaultOpen:s,onOpenChange:u,modal:c=!0}=t,f=w.useRef(null),p=w.useRef(null),[m,x]=Yd({prop:i,defaultProp:s??!1,onChange:u,caller:Bs});return h.jsx(DA,{scope:r,triggerRef:f,contentRef:p,contentId:Ei(),titleId:Ei(),descriptionId:Ei(),open:m,onOpenChange:x,onOpenToggle:w.useCallback(()=>x(y=>!y),[x]),modal:c,children:l})};D1.displayName=Bs;var R1="DialogTrigger",RA=w.forwardRef((t,r)=>{const{__scopeDialog:l,...i}=t,s=On(R1,l),u=$t(r,s.triggerRef);return h.jsx(Tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Xd(s.open),...i,ref:u,onClick:pt(t.onClick,s.onOpenToggle)})});RA.displayName=R1;var Gd="DialogPortal",[zA,z1]=M1(Gd,{forceMount:void 0}),O1=t=>{const{__scopeDialog:r,forceMount:l,children:i,container:s}=t,u=On(Gd,r);return h.jsx(zA,{scope:r,forceMount:l,children:w.Children.map(i,c=>h.jsx(cr,{present:l||u.open,children:h.jsx(v1,{asChild:!0,container:s,children:c})}))})};O1.displayName=Gd;var js="DialogOverlay",_1=w.forwardRef((t,r)=>{const l=z1(js,t.__scopeDialog),{forceMount:i=l.forceMount,...s}=t,u=On(js,t.__scopeDialog);return u.modal?h.jsx(cr,{present:i||u.open,children:h.jsx(_A,{...s,ref:r})}):null});_1.displayName=js;var OA=ks("DialogOverlay.RemoveScroll"),_A=w.forwardRef((t,r)=>{const{__scopeDialog:l,...i}=t,s=On(js,l);return h.jsx(T1,{as:OA,allowPinchZoom:!0,shards:[s.contentRef],children:h.jsx(Tt.div,{"data-state":Xd(s.open),...i,ref:r,style:{pointerEvents:"auto",...i.style}})})}),yl="DialogContent",L1=w.forwardRef((t,r)=>{const l=z1(yl,t.__scopeDialog),{forceMount:i=l.forceMount,...s}=t,u=On(yl,t.__scopeDialog);return h.jsx(cr,{present:i||u.open,children:u.modal?h.jsx(LA,{...s,ref:r}):h.jsx(UA,{...s,ref:r})})});L1.displayName=yl;var LA=w.forwardRef((t,r)=>{const l=On(yl,t.__scopeDialog),i=w.useRef(null),s=$t(r,l.contentRef,i);return w.useEffect(()=>{const u=i.current;if(u)return MA(u)},[]),h.jsx(U1,{...t,ref:s,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pt(t.onCloseAutoFocus,u=>{var c;u.preventDefault(),(c=l.triggerRef.current)==null||c.focus()}),onPointerDownOutside:pt(t.onPointerDownOutside,u=>{const c=u.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&u.preventDefault()}),onFocusOutside:pt(t.onFocusOutside,u=>u.preventDefault())})}),UA=w.forwardRef((t,r)=>{const l=On(yl,t.__scopeDialog),i=w.useRef(!1),s=w.useRef(!1);return h.jsx(U1,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var c,f;(c=t.onCloseAutoFocus)==null||c.call(t,u),u.defaultPrevented||(i.current||(f=l.triggerRef.current)==null||f.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{var p,m;(p=t.onInteractOutside)==null||p.call(t,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=u.target;((m=l.triggerRef.current)==null?void 0:m.contains(c))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),U1=w.forwardRef((t,r)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,...c}=t,f=On(yl,l),p=w.useRef(null),m=$t(r,p);return FT(),h.jsxs(h.Fragment,{children:[h.jsx(x1,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:h.jsx(g1,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":Xd(f.open),...c,ref:m,onDismiss:()=>f.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(BA,{titleId:f.titleId}),h.jsx(qA,{contentRef:p,descriptionId:f.descriptionId})]})]})}),Pd="DialogTitle",B1=w.forwardRef((t,r)=>{const{__scopeDialog:l,...i}=t,s=On(Pd,l);return h.jsx(Tt.h2,{id:s.titleId,...i,ref:r})});B1.displayName=Pd;var H1="DialogDescription",q1=w.forwardRef((t,r)=>{const{__scopeDialog:l,...i}=t,s=On(H1,l);return h.jsx(Tt.p,{id:s.descriptionId,...i,ref:r})});q1.displayName=H1;var I1="DialogClose",V1=w.forwardRef((t,r)=>{const{__scopeDialog:l,...i}=t,s=On(I1,l);return h.jsx(Tt.button,{type:"button",...i,ref:r,onClick:pt(t.onClick,()=>s.onOpenChange(!1))})});V1.displayName=I1;function Xd(t){return t?"open":"closed"}var $1="DialogTitleWarning",[S5,F1]=lT($1,{contentName:yl,titleName:Pd,docsSlug:"dialog"}),BA=({titleId:t})=>{const r=F1($1),l=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
604
|
+
|
|
605
|
+
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
606
|
+
|
|
607
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return w.useEffect(()=>{t&&(document.getElementById(t)||console.error(l))},[l,t]),null},HA="DialogDescriptionWarning",qA=({contentRef:t,descriptionId:r})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${F1(HA).contentName}}.`;return w.useEffect(()=>{var u;const s=(u=t.current)==null?void 0:u.getAttribute("aria-describedby");r&&s&&(document.getElementById(r)||console.warn(i))},[i,t,r]),null},IA=D1,VA=O1,Y1=_1,G1=L1,P1=B1,X1=q1,$A=V1;const vx=IA,FA=VA,Q1=w.forwardRef(({className:t,...r},l)=>h.jsx(Y1,{ref:l,className:me("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r}));Q1.displayName=Y1.displayName;const ld=w.forwardRef(({className:t,children:r,...l},i)=>h.jsxs(FA,{children:[h.jsx(Q1,{}),h.jsxs(G1,{ref:i,className:me("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...l,children:[r,h.jsxs($A,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h.jsx(xl,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ld.displayName=G1.displayName;const K1=({className:t,...r})=>h.jsx("div",{className:me("flex flex-col space-y-1.5 text-center sm:text-left",t),...r});K1.displayName="DialogHeader";const Z1=({className:t,...r})=>h.jsx("div",{className:me("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r});Z1.displayName="DialogFooter";const J1=w.forwardRef(({className:t,...r},l)=>h.jsx(P1,{ref:l,className:me("text-lg font-semibold leading-none tracking-tight",t),...r}));J1.displayName=P1.displayName;const W1=w.forwardRef(({className:t,...r},l)=>h.jsx(X1,{ref:l,className:me("text-sm text-muted-foreground",t),...r}));W1.displayName=X1.displayName;function YA(t){return/edit|write|create|patch/i.test(t)?$w:/bash|shell|exec|run|command/i.test(t)?ma:/fetch|http|web|curl|request/i.test(t)?ki:xd}function GA({toolName:t,input:r}){const l=W0(t,r);if(l)return h.jsx("div",{className:"rounded-lg overflow-hidden border",children:h.jsx(J0,{oldText:l.oldText,newText:l.newText,caption:l.caption})});if(typeof r=="object"&&r!==null){const i=r,s=i.command??i.cmd??i.script;if(typeof s=="string"&&s.trim().length>0)return h.jsxs("div",{className:"rounded-lg border bg-background/40 overflow-hidden",children:[h.jsxs("div",{className:"px-3 py-1.5 text-[10px] uppercase tracking-wider text-muted-foreground border-b bg-muted/40 flex items-center gap-1.5",children:[h.jsx(ma,{className:"h-3 w-3"}),h.jsx("span",{children:"Command"})]}),h.jsxs("pre",{className:"px-3 py-2 text-xs font-mono whitespace-pre-wrap break-all max-h-40 overflow-auto",children:["$",s]})]});const u=i.url;if(typeof u=="string"){const c=i.method??"GET";return h.jsxs("div",{className:"rounded-lg border bg-background/40 px-3 py-2 text-xs font-mono",children:[h.jsx("span",{className:"text-muted-foreground",children:c.toUpperCase()})," ",h.jsx("span",{className:"break-all",children:u})]})}}return h.jsxs("div",{className:"p-3 rounded-lg bg-muted/50 border text-xs font-mono",children:[h.jsx("div",{className:"text-muted-foreground mb-2",children:"Input:"}),h.jsx("pre",{className:"whitespace-pre-wrap break-all max-h-60 overflow-auto",children:JSON.stringify(r,null,2)})]})}function PA(){const{showConfirmDialog:t,confirmInfo:r,hideConfirm:l}=Ne(),{sendConfirm:i}=sr(),s=f=>{r&&i(r.id,f),l()};if(w.useEffect(()=>{if(!t)return;const f=p=>{var y;const m=p.target,x=(y=m==null?void 0:m.tagName)==null?void 0:y.toLowerCase();x==="input"||x==="textarea"||(p.key==="y"||p.key==="Y"?(p.preventDefault(),s("yes")):p.key==="n"||p.key==="N"||p.key==="Escape"?(p.preventDefault(),s("no")):(p.key==="a"||p.key==="A")&&(p.preventDefault(),s("always")))};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[t,r==null?void 0:r.id]),!r)return h.jsx(vx,{open:t,onOpenChange:()=>l(),children:h.jsx(ld,{})});const u=YA(r.toolName),c=/edit|write/i.test(r.toolName);return h.jsx(vx,{open:t,onOpenChange:()=>l(),children:h.jsxs(ld,{className:"sm:max-w-2xl",children:[h.jsxs(K1,{children:[h.jsxs(J1,{className:"flex items-center gap-2",children:[h.jsx(a2,{className:"h-5 w-5 text-yellow-500"}),"Confirm: ",r.toolName]}),h.jsxs(W1,{children:["The agent wants to ",c?"modify a file":"run this tool",". Review the request below and decide whether to proceed."]})]}),h.jsxs("div",{className:"py-2 space-y-3",children:[h.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted",children:[h.jsx(u,{className:"h-5 w-5 text-muted-foreground"}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"font-medium font-mono truncate",children:r.toolName}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:[c?"File modification":"Tool execution"," — preview below"]})]})]}),r.input!==void 0&&h.jsx(GA,{toolName:r.toolName,input:r.input}),r.suggestedPattern&&h.jsxs("div",{className:"flex items-start gap-2 p-3 rounded-lg bg-yellow-500/10 border border-yellow-500/20",children:[h.jsx(gd,{className:"h-4 w-4 text-yellow-600 mt-0.5 shrink-0"}),h.jsxs("div",{className:"text-sm min-w-0",children:[h.jsx("div",{className:"font-medium text-yellow-800 dark:text-yellow-200",children:"Trust pattern suggestion"}),h.jsx("div",{className:"font-mono text-xs mt-1 break-all",children:r.suggestedPattern}),h.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Picking ",h.jsx("span",{className:"font-medium",children:"Always"})," will whitelist matching calls for this project."]})]})]})]}),h.jsxs(Z1,{className:"gap-2 sm:gap-2 flex-wrap",children:[h.jsx(Le,{variant:"outline",size:"sm",onClick:()=>s("deny"),title:"Reject this and all future calls matching the pattern",children:"Deny always"}),h.jsxs(Le,{variant:"outline",size:"sm",onClick:()=>s("no"),title:"Reject this single call (Esc / n)",children:["No ",h.jsx("kbd",{className:"ml-1 text-[10px] border rounded px-1 bg-background",children:"n"})]}),h.jsxs(Le,{variant:"outline",size:"sm",onClick:()=>s("always"),title:"Approve and remember the pattern for the project (a)",children:["Always ",h.jsx("kbd",{className:"ml-1 text-[10px] border rounded px-1 bg-background",children:"a"})]}),h.jsxs(Le,{size:"sm",onClick:()=>s("yes"),title:"Approve this single call (y)",children:["Yes ",h.jsx("kbd",{className:"ml-1 text-[10px] border rounded px-1 bg-background/80",children:"y"})]})]})]})})}function XA(){const t=$e(x=>x.wsStatus),r=$e(x=>x.wsUrl),[l,i]=w.useState(!1),[s,u]=w.useState(Date.now());if(w.useEffect(()=>{if(t.state!=="reconnecting")return;const x=setInterval(()=>u(Date.now()),500);return()=>clearInterval(x)},[t.state]),w.useEffect(()=>{t.state==="open"&&i(!1)},[t.state]),t.state==="open"||t.state==="connecting"||l)return null;const c=()=>En(r).retryNow(),f=t.state==="reconnecting",p=t.state==="closed"?t.error:t.state==="reconnecting"?t.lastError:void 0,m=f?Math.max(0,Math.ceil((t.nextRetryAt-s)/1e3)):0;return h.jsxs("div",{className:me("flex items-center gap-3 px-4 py-2 border-b text-sm",f?"bg-orange-500/10 text-orange-700 dark:text-orange-300 border-orange-500/30":"bg-red-500/10 text-red-700 dark:text-red-300 border-red-500/30"),children:[f?h.jsx(Fr,{className:"h-4 w-4 animate-spin shrink-0"}):h.jsx(yd,{className:"h-4 w-4 shrink-0"}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("div",{className:"font-medium",children:f?`Reconnecting to backend (attempt ${t.attempt}) — retrying in ${m}s`:"Disconnected from backend"}),p&&h.jsx("div",{className:"text-xs opacity-80 truncate",children:p})]}),h.jsxs("button",{type:"button",onClick:c,className:me("inline-flex items-center gap-1 px-2.5 py-1 rounded-md border text-xs font-medium","hover:bg-background/30 transition-colors shrink-0",f?"border-orange-500/40":"border-red-500/40"),title:"Retry connection now",children:[h.jsx(zi,{className:"h-3 w-3"}),"Retry now"]}),h.jsx("button",{type:"button",onClick:()=>i(!0),className:"text-current/60 hover:text-current shrink-0",title:"Dismiss (chip in topbar still shows status)",children:h.jsx(xl,{className:"h-4 w-4"})})]})}class QA extends w.Component{constructor(){super(...arguments);qt(this,"state",{error:null});qt(this,"handleReset",()=>{this.setState({error:null})})}static getDerivedStateFromError(l){return{error:l}}componentDidCatch(l,i){var s,u;console.error("[ErrorBoundary]",l,i.componentStack),(u=(s=this.props).onError)==null||u.call(s,l,i)}render(){return this.state.error?h.jsx("div",{className:"flex items-center justify-center h-screen bg-background",children:h.jsxs("div",{className:"flex flex-col items-center gap-4 p-8 max-w-md text-center",children:[h.jsx(gd,{className:"h-12 w-12 text-destructive"}),h.jsx("h1",{className:"text-lg font-semibold",children:"Something went wrong"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"A rendering error occurred. Your session is still active on the server — reloading will pick up where you left off."}),h.jsx("pre",{className:"text-xs font-mono text-muted-foreground bg-muted/50 rounded p-3 max-h-32 overflow-auto w-full text-left",children:this.state.error.message}),h.jsxs("div",{className:"flex gap-2",children:[h.jsxs(Le,{size:"sm",variant:"outline",onClick:()=>window.location.reload(),children:[h.jsx(hd,{className:"h-4 w-4 mr-1"}),"Reload page"]}),h.jsx(Le,{size:"sm",onClick:this.handleReset,children:"Try again"})]})]})}):this.props.children}}function KA(){const t=Ne(M=>M.modelSwitcherOpen),r=Ne(M=>M.setModelSwitcherOpen),[l,i]=w.useState(""),[s,u]=w.useState(0),[c,f]=w.useState([]),[p,m]=w.useState({}),x=w.useRef(null),y=$e(M=>M.wsUrl),b=$e(M=>M.provider),v=$e(M=>M.model),C=Ne(M=>M.paletteOpen),N=sr();w.useEffect(()=>{const M=O=>{if((O.ctrlKey||O.metaKey)&&O.key.toLowerCase()==="m"&&!O.shiftKey&&!O.altKey){if(C)return;O.preventDefault(),r(!t);return}O.key==="Escape"&&t&&(O.preventDefault(),r(!1))};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[t,C]),w.useEffect(()=>{const M=En(y),O=M.on("providers.saved",P=>{const L=P.payload;f(L.providers??[])}),$=M.on("provider.models",P=>{const L=P.payload;m(Y=>({...Y,[L.provider]:L.models}))});return()=>{O(),$()}},[y]),w.useEffect(()=>{t&&(i(""),u(0),N.listSavedProviders(),requestAnimationFrame(()=>{var M;return(M=x.current)==null?void 0:M.focus()}))},[t,N]),w.useEffect(()=>{if(t)for(const M of c)p[M.id]||N.listProviderModels(M.id)},[t,c,p,N]);const A=w.useMemo(()=>{const M=[];for(const P of c){const L=p[P.id]??[];for(const Y of L)M.push({provider:P.id,model:Y.id,modelName:Y.name||Y.id,contextWindow:Y.contextWindow,isCurrent:P.id===b&&Y.id===v})}const O=l.toLowerCase().trim();return(O?M.filter(P=>P.provider.toLowerCase().includes(O)||P.model.toLowerCase().includes(O)||P.modelName.toLowerCase().includes(O)):M).sort((P,L)=>P.isCurrent!==L.isCurrent?P.isCurrent?-1:1:P.provider.localeCompare(L.provider)||P.model.localeCompare(L.model))},[c,p,l,b,v]);w.useEffect(()=>{s>=A.length&&u(0)},[A.length,s]);const E=M=>{const O=A[M];O&&(N.switchModel(O.provider,O.model),r(!1))};return t?h.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-background/60 backdrop-blur-sm pt-[15vh]",onClick:M=>{M.target===M.currentTarget&&r(!1)},onKeyDown:M=>{M.key==="Escape"&&r(!1)},children:h.jsxs("div",{className:"w-full max-w-xl rounded-xl border bg-popover shadow-2xl overflow-hidden",children:[h.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2",children:[h.jsx(ha,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("input",{ref:x,value:l,onChange:M=>{i(M.target.value),u(0)},onKeyDown:M=>{M.key==="ArrowDown"?(M.preventDefault(),u(O=>Math.min(A.length-1,O+1))):M.key==="ArrowUp"?(M.preventDefault(),u(O=>Math.max(0,O-1))):M.key==="Enter"?(M.preventDefault(),E(s)):M.key==="Escape"&&(M.preventDefault(),r(!1))},placeholder:"Filter providers and models…",className:"flex-1 bg-transparent outline-none text-sm placeholder:text-muted-foreground"}),h.jsx("span",{className:"text-[10px] text-muted-foreground font-mono",children:"↑↓ · Enter · Esc"})]}),h.jsx("div",{className:"max-h-[50vh] overflow-y-auto py-1",children:A.length===0?h.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:c.length===0?"No saved providers — register a key in Settings first.":"Loading models…"}):A.map((M,O)=>h.jsxs("button",{type:"button",onClick:()=>E(O),onMouseEnter:()=>u(O),className:me("w-full flex items-center gap-3 px-3 py-2 text-left text-sm transition-colors",O===s?"bg-accent text-accent-foreground":"hover:bg-accent/40",M.isCurrent&&"font-medium"),children:[h.jsx(Ti,{className:me("h-4 w-4 shrink-0",M.isCurrent?"text-primary":"text-muted-foreground")}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"truncate",children:[h.jsx("span",{className:"text-muted-foreground",children:M.provider}),h.jsx("span",{className:"mx-1 text-muted-foreground/40",children:"·"}),h.jsx("span",{children:M.modelName})]}),M.contextWindow&&h.jsxs("div",{className:"text-[10px] text-muted-foreground font-mono",children:[M.model," · ctx ",M.contextWindow.toLocaleString()]})]}),M.isCurrent?h.jsx("span",{className:"text-[10px] uppercase tracking-wide text-primary font-semibold",children:"active"}):h.jsx(zx,{className:"h-3.5 w-3.5 text-muted-foreground opacity-0 group-hover:opacity-100"})]},`${M.provider}:${M.model}`))})]})}):null}const eb=w.createContext(void 0);function ZA({children:t,defaultTheme:r="system",storageKey:l="wrongstack-theme"}){const{theme:i,setTheme:s}=$e(),[u,c]=w.useState(()=>typeof window<"u"&&localStorage.getItem(l)||r);w.useEffect(()=>{const p=window.document.documentElement;if(p.classList.remove("light","dark"),u==="system"){const m=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";p.classList.add(m)}else p.classList.add(u)},[u]);const f={theme:u,setTheme:p=>{localStorage.setItem(l,p),c(p),s(p)}};return h.jsx(eb.Provider,{value:f,children:t})}function tb(){const t=w.useContext(eb);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t}const Vr=w.forwardRef(({className:t,type:r,...l},i)=>h.jsx("input",{type:r,className:me("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:i,...l}));Vr.displayName="Input";function JA(t){const r=t+"CollectionProvider",[l,i]=Ui(r),[s,u]=l(r,{collectionRef:{current:null},itemMap:new Map}),c=N=>{const{scope:A,children:E}=N,M=dn.useRef(null),O=dn.useRef(new Map).current;return h.jsx(s,{scope:A,itemMap:O,collectionRef:M,children:E})};c.displayName=r;const f=t+"CollectionSlot",p=ks(f),m=dn.forwardRef((N,A)=>{const{scope:E,children:M}=N,O=u(f,E),$=$t(A,O.collectionRef);return h.jsx(p,{ref:$,children:M})});m.displayName=f;const x=t+"CollectionItemSlot",y="data-radix-collection-item",b=ks(x),v=dn.forwardRef((N,A)=>{const{scope:E,children:M,...O}=N,$=dn.useRef(null),P=$t(A,$),L=u(x,E);return dn.useEffect(()=>(L.itemMap.set($,{ref:$,...O}),()=>void L.itemMap.delete($))),h.jsx(b,{[y]:"",ref:P,children:M})});v.displayName=x;function C(N){const A=u(t+"CollectionConsumer",N);return dn.useCallback(()=>{const M=A.collectionRef.current;if(!M)return[];const O=Array.from(M.querySelectorAll(`[${y}]`));return Array.from(A.itemMap.values()).sort((L,Y)=>O.indexOf(L.ref.current)-O.indexOf(Y.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:c,Slot:m,ItemSlot:v},C,i]}var Lf="rovingFocusGroup.onEntryFocus",WA={bubbles:!1,cancelable:!0},Bi="RovingFocusGroup",[ad,nb,e5]=JA(Bi),[t5,rb]=Ui(Bi,[e5]),[n5,r5]=t5(Bi),lb=w.forwardRef((t,r)=>h.jsx(ad.Provider,{scope:t.__scopeRovingFocusGroup,children:h.jsx(ad.Slot,{scope:t.__scopeRovingFocusGroup,children:h.jsx(l5,{...t,ref:r})})}));lb.displayName=Bi;var l5=w.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:l,orientation:i,loop:s=!1,dir:u,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:p,onEntryFocus:m,preventScrollOnEntryFocus:x=!1,...y}=t,b=w.useRef(null),v=$t(r,b),C=qd(u),[N,A]=Yd({prop:c,defaultProp:f??null,onChange:p,caller:Bi}),[E,M]=w.useState(!1),O=hn(m),$=nb(l),P=w.useRef(!1),[L,Y]=w.useState(0);return w.useEffect(()=>{const le=b.current;if(le)return le.addEventListener(Lf,O),()=>le.removeEventListener(Lf,O)},[O]),h.jsx(n5,{scope:l,orientation:i,dir:C,loop:s,currentTabStopId:N,onItemFocus:w.useCallback(le=>A(le),[A]),onItemShiftTab:w.useCallback(()=>M(!0),[]),onFocusableItemAdd:w.useCallback(()=>Y(le=>le+1),[]),onFocusableItemRemove:w.useCallback(()=>Y(le=>le-1),[]),children:h.jsx(Tt.div,{tabIndex:E||L===0?-1:0,"data-orientation":i,...y,ref:v,style:{outline:"none",...t.style},onMouseDown:pt(t.onMouseDown,()=>{P.current=!0}),onFocus:pt(t.onFocus,le=>{const oe=!P.current;if(le.target===le.currentTarget&&oe&&!E){const H=new CustomEvent(Lf,WA);if(le.currentTarget.dispatchEvent(H),!H.defaultPrevented){const X=$().filter(R=>R.focusable),G=X.find(R=>R.active),fe=X.find(R=>R.id===N),ne=[G,fe,...X].filter(Boolean).map(R=>R.ref.current);ob(ne,x)}}P.current=!1}),onBlur:pt(t.onBlur,()=>M(!1))})})}),ab="RovingFocusGroupItem",ib=w.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:l,focusable:i=!0,active:s=!1,tabStopId:u,children:c,...f}=t,p=Ei(),m=u||p,x=r5(ab,l),y=x.currentTabStopId===m,b=nb(l),{onFocusableItemAdd:v,onFocusableItemRemove:C,currentTabStopId:N}=x;return w.useEffect(()=>{if(i)return v(),()=>C()},[i,v,C]),h.jsx(ad.ItemSlot,{scope:l,id:m,focusable:i,active:s,children:h.jsx(Tt.span,{tabIndex:y?0:-1,"data-orientation":x.orientation,...f,ref:r,onMouseDown:pt(t.onMouseDown,A=>{i?x.onItemFocus(m):A.preventDefault()}),onFocus:pt(t.onFocus,()=>x.onItemFocus(m)),onKeyDown:pt(t.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){x.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const E=o5(A,x.orientation,x.dir);if(E!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let O=b().filter($=>$.focusable).map($=>$.ref.current);if(E==="last")O.reverse();else if(E==="prev"||E==="next"){E==="prev"&&O.reverse();const $=O.indexOf(A.currentTarget);O=x.loop?s5(O,$+1):O.slice($+1)}setTimeout(()=>ob(O))}}),children:typeof c=="function"?c({isCurrentTabStop:y,hasTabStop:N!=null}):c})})});ib.displayName=ab;var a5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function i5(t,r){return r!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function o5(t,r,l){const i=i5(t.key,l);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return a5[i]}function ob(t,r=!1){const l=document.activeElement;for(const i of t)if(i===l||(i.focus({preventScroll:r}),document.activeElement!==l))return}function s5(t,r){return t.map((l,i)=>t[(r+i)%t.length])}var u5=lb,c5=ib,Hs="Tabs",[f5]=Ui(Hs,[rb]),sb=rb(),[d5,Qd]=f5(Hs),ub=w.forwardRef((t,r)=>{const{__scopeTabs:l,value:i,onValueChange:s,defaultValue:u,orientation:c="horizontal",dir:f,activationMode:p="automatic",...m}=t,x=qd(f),[y,b]=Yd({prop:i,onChange:s,defaultProp:u??"",caller:Hs});return h.jsx(d5,{scope:l,baseId:Ei(),value:y,onValueChange:b,orientation:c,dir:x,activationMode:p,children:h.jsx(Tt.div,{dir:x,"data-orientation":c,...m,ref:r})})});ub.displayName=Hs;var cb="TabsList",fb=w.forwardRef((t,r)=>{const{__scopeTabs:l,loop:i=!0,...s}=t,u=Qd(cb,l),c=sb(l);return h.jsx(u5,{asChild:!0,...c,orientation:u.orientation,dir:u.dir,loop:i,children:h.jsx(Tt.div,{role:"tablist","aria-orientation":u.orientation,...s,ref:r})})});fb.displayName=cb;var db="TabsTrigger",hb=w.forwardRef((t,r)=>{const{__scopeTabs:l,value:i,disabled:s=!1,...u}=t,c=Qd(db,l),f=sb(l),p=gb(c.baseId,i),m=yb(c.baseId,i),x=i===c.value;return h.jsx(c5,{asChild:!0,...f,focusable:!s,active:x,children:h.jsx(Tt.button,{type:"button",role:"tab","aria-selected":x,"aria-controls":m,"data-state":x?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:p,...u,ref:r,onMouseDown:pt(t.onMouseDown,y=>{!s&&y.button===0&&y.ctrlKey===!1?c.onValueChange(i):y.preventDefault()}),onKeyDown:pt(t.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&c.onValueChange(i)}),onFocus:pt(t.onFocus,()=>{const y=c.activationMode!=="manual";!x&&!s&&y&&c.onValueChange(i)})})})});hb.displayName=db;var mb="TabsContent",pb=w.forwardRef((t,r)=>{const{__scopeTabs:l,value:i,forceMount:s,children:u,...c}=t,f=Qd(mb,l),p=gb(f.baseId,i),m=yb(f.baseId,i),x=i===f.value,y=w.useRef(x);return w.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),h.jsx(cr,{present:s||x,children:({present:b})=>h.jsx(Tt.div,{"data-state":x?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":p,hidden:!b,id:m,tabIndex:0,...c,ref:r,style:{...t.style,animationDuration:y.current?"0s":void 0},children:b&&u})})});pb.displayName=mb;function gb(t,r){return`${t}-trigger-${r}`}function yb(t,r){return`${t}-content-${r}`}var h5=ub,xb=fb,bb=hb,vb=pb;const Sb=h5,Kd=w.forwardRef(({className:t,...r},l)=>h.jsx(xb,{ref:l,className:me("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...r}));Kd.displayName=xb.displayName;const hl=w.forwardRef(({className:t,...r},l)=>h.jsx(bb,{ref:l,className:me("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...r}));hl.displayName=bb.displayName;const ml=w.forwardRef(({className:t,...r},l)=>h.jsx(vb,{ref:l,className:me("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...r}));ml.displayName=vb.displayName;function m5(){var fr;const{setCurrentView:t}=Ne(),{provider:r,model:l,setProvider:i,setModel:s,wsConnected:u}=$e(),{theme:c,setTheme:f}=tb(),p=sr(),m=p.client,x=p.listProviders,y=p.listSavedProviders,[b,v]=w.useState([]),[C,N]=w.useState({}),[A,E]=w.useState([]),[M,O]=w.useState(!1),[$,P]=w.useState(!1),[L,Y]=w.useState(!1),[le,oe]=w.useState(null),[H,X]=w.useState("catalog"),[G,fe]=w.useState(null),[ue,ne]=w.useState(""),[R,J]=w.useState(""),[ie,ge]=w.useState(!1),[D,T]=w.useState(!1),[B,j]=w.useState(""),[_,ee]=w.useState("openai-compatible"),[te,Z]=w.useState(""),[xe,ke]=w.useState(""),Ae=b.find(se=>se.id===r);w.useEffect(()=>{const se=vt=>{if(vt.type==="provider.catalog"){const gt=vt.payload;v(gt.providers.sort((st,Dt)=>st.id.localeCompare(Dt.id))),O(!1)}},Te=vt=>{if(vt.type==="provider.models"){const gt=vt.payload;N(st=>({...st,[gt.provider]:gt.models})),P(!1)}},Q=vt=>{if(vt.type==="providers.saved"){const st=vt.payload.providers.sort((Dt,We)=>Dt.id.localeCompare(We.id));E(st),Y(!1),st.length>0&&X("saved")}},de=vt=>{if(vt.type==="key.operation_result"){const gt=vt.payload;oe(gt),setTimeout(()=>oe(null),3e3),y==null||y()}};if(!u||!m)return;const Ce=m.on("provider.catalog",se),Re=m.on("provider.models",Te),Ge=m.on("providers.saved",Q),Ot=m.on("key.operation_result",de);return O(!0),Y(!0),x==null||x(),y==null||y(),()=>{Ce==null||Ce(),Re==null||Re(),Ge==null||Ge(),Ot==null||Ot()}},[u,m,x,y]);const ht=w.useCallback(se=>{var Te;i(se),C[se]||(P(!0),(Te=p.listProviderModels)==null||Te.call(p,se))},[C,i,p]),yt=w.useCallback(se=>{var Te;s(se),(Te=p.switchModel)==null||Te.call(p,r,se),oe({success:!0,message:`Switching to ${r} / ${se}…`})},[s,p,r]),Ue=w.useCallback(se=>{var Te;!ue.trim()||!R.trim()||((Te=p.addKey)==null||Te.call(p,se,ue.trim(),R.trim()),ne(""),J(""),fe(null))},[p,ue,R]),ye=w.useCallback((se,Te)=>{var Q;(Q=p.deleteKey)==null||Q.call(p,se,Te)},[p]),Se=w.useCallback((se,Te)=>{var Q;(Q=p.setActiveKey)==null||Q.call(p,se,Te)},[p]),Fe=w.useCallback(()=>{var se;B.trim()&&((se=p.addProvider)==null||se.call(p,B.trim(),_,te||void 0,xe||void 0),j(""),ee("openai-compatible"),Z(""),ke(""),T(!1))},[p,B,_,te,xe]),nt=w.useCallback(se=>{var Te;(Te=p.removeProvider)==null||Te.call(p,se)},[p]),[Yt,Qe]=w.useState(""),Mt=["anthropic","openai","google","openai-compatible"],pn=Yt.trim()?b.filter(se=>{const Te=Yt.trim().toLowerCase();return se.id.toLowerCase().includes(Te)||se.name.toLowerCase().includes(Te)||se.family.toLowerCase().includes(Te)}):b,Gr=pn.reduce((se,Te)=>(se[Te.family]||(se[Te.family]=[]),se[Te.family].push(Te),se),{});return h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("header",{className:"flex items-center justify-between px-4 py-3 border-b bg-card shrink-0",children:[h.jsx("h1",{className:"text-lg font-semibold",children:"Settings"}),h.jsx(Le,{variant:"ghost",size:"icon",onClick:()=>t("chat"),children:h.jsx(xl,{className:"h-4 w-4"})})]}),h.jsx(Ls,{className:"flex-1",children:h.jsx("div",{className:"p-6 max-w-2xl mx-auto",children:h.jsxs(Sb,{defaultValue:"provider",children:[h.jsxs(Kd,{className:"w-full justify-start mb-6 grid grid-cols-4",children:[h.jsxs(hl,{value:"provider",className:"gap-2",children:[h.jsx(Ww,{className:"h-4 w-4"}),"Provider"]}),h.jsxs(hl,{value:"model",className:"gap-2",children:[h.jsx(Ti,{className:"h-4 w-4"}),"Model"]}),h.jsxs(hl,{value:"connection",className:"gap-2",children:[h.jsx(ki,{className:"h-4 w-4"}),"Connection"]}),h.jsxs(hl,{value:"appearance",className:"gap-2",children:[h.jsx(e2,{className:"h-4 w-4"}),"Appearance"]})]}),h.jsxs(ml,{value:"provider",className:"space-y-4",children:[h.jsxs("div",{className:"flex gap-2 mb-4",children:[h.jsxs(Le,{variant:H==="catalog"?"default":"outline",size:"sm",onClick:()=>X("catalog"),children:[h.jsx(ki,{className:"h-4 w-4 mr-1"}),"Catalog"]}),h.jsxs(Le,{variant:H==="saved"?"default":"outline",size:"sm",onClick:()=>X("saved"),children:[h.jsx(af,{className:"h-4 w-4 mr-1"}),"Saved (",A.length,")"]})]}),le&&h.jsxs("div",{className:me("p-3 rounded-lg mb-4 flex items-center gap-2",le.success?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"),children:[le.success?h.jsx(pl,{className:"h-4 w-4"}):h.jsx(_w,{className:"h-4 w-4"}),le.message]}),H==="catalog"&&h.jsxs("div",{className:"space-y-4",children:[h.jsx(Vr,{placeholder:`Search ${b.length} providers (name / id / family)…`,value:Yt,onChange:se=>Qe(se.target.value),className:"text-sm"}),M&&b.length===0?h.jsxs("div",{className:"flex items-center justify-center py-8",children:[h.jsx(Fr,{className:"h-6 w-6 animate-spin text-muted-foreground"}),h.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading catalog..."})]}):pn.length===0&&Yt?h.jsxs("div",{className:"text-center py-8 text-muted-foreground text-sm",children:['No providers match "',h.jsx("span",{className:"font-mono",children:Yt}),'".']}):h.jsx(h.Fragment,{children:Mt.map(se=>{const Te=Gr[se];return Te!=null&&Te.length?h.jsxs("div",{className:"space-y-2",children:[h.jsx("h3",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wider",children:se}),h.jsx("div",{className:"grid grid-cols-1 gap-2",children:Te.map(Q=>h.jsxs("button",{type:"button",onClick:()=>ht(Q.id),className:me("flex flex-col items-start p-3 rounded-lg border text-left transition-all",r===Q.id?"border-primary bg-primary/5 ring-2 ring-primary/20":"border-border hover:bg-muted"),children:[h.jsxs("div",{className:"flex w-full justify-between items-start",children:[h.jsxs("div",{children:[h.jsx("span",{className:"font-medium",children:Q.name}),h.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:["(",Q.id,")"]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[Q.hasApiKey&&h.jsxs("span",{className:"text-xs bg-green-500/10 text-green-600 px-2 py-0.5 rounded",children:[h.jsx(af,{className:"h-3 w-3 inline mr-1"}),"Configured"]}),Q.envVars[0]&&h.jsxs("span",{className:"text-xs text-muted-foreground",children:["ENV: ",Q.envVars[0]]}),r===Q.id&&h.jsx(pl,{className:"h-4 w-4 text-primary"})]})]}),h.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[Q.modelCount," models",Q.apiBase&&` · ${Q.apiBase}`]})]},Q.id))})]},se):null})})]}),H==="saved"&&h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage your API keys and provider configurations"}),h.jsxs(Le,{size:"sm",variant:"outline",onClick:()=>T(!D),children:[h.jsx(ay,{className:"h-4 w-4 mr-1"}),"Add Provider"]})]}),D&&h.jsxs("div",{className:"p-4 border rounded-lg space-y-3 bg-muted/50",children:[h.jsx("h4",{className:"font-medium",children:"Add Custom Provider"}),h.jsx(Vr,{placeholder:"Provider ID (e.g. my-llm-server)",value:B,onChange:se=>j(se.target.value)}),h.jsxs("select",{className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",value:_,onChange:se=>ee(se.target.value),children:[h.jsx("option",{value:"anthropic",children:"Anthropic"}),h.jsx("option",{value:"openai",children:"OpenAI"}),h.jsx("option",{value:"openai-compatible",children:"OpenAI Compatible"}),h.jsx("option",{value:"google",children:"Google"})]}),h.jsx(Vr,{placeholder:"Base URL (optional, e.g. http://localhost:11434/v1)",value:te,onChange:se=>Z(se.target.value)}),h.jsx(Vr,{type:"password",placeholder:"API Key (optional)",value:xe,onChange:se=>ke(se.target.value)}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Le,{size:"sm",onClick:Fe,disabled:!B.trim(),children:"Add"}),h.jsx(Le,{size:"sm",variant:"ghost",onClick:()=>T(!1),children:"Cancel"})]})]}),L?h.jsx("div",{className:"flex items-center justify-center py-8",children:h.jsx(Fr,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):A.length===0?h.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[h.jsx(af,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),h.jsx("p",{children:"No saved providers yet"}),h.jsx("p",{className:"text-sm",children:"Add a provider to get started"})]}):A.map(se=>h.jsxs("div",{className:"border rounded-lg p-4 space-y-3",children:[h.jsxs("div",{className:"flex justify-between items-start",children:[h.jsxs("div",{children:[h.jsx("h4",{className:"font-medium",children:se.id}),se.family&&h.jsx("span",{className:"text-xs text-muted-foreground",children:se.family})]}),h.jsx("div",{className:"flex gap-2",children:h.jsx(Le,{size:"icon",variant:"ghost",onClick:()=>nt(se.id),children:h.jsx(Ai,{className:"h-4 w-4 text-destructive"})})})]}),se.baseUrl&&h.jsxs("div",{className:"text-xs text-muted-foreground",children:[h.jsx(ki,{className:"h-3 w-3 inline mr-1"}),se.baseUrl]}),h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsx("span",{className:"text-sm font-medium",children:"API Keys"}),h.jsxs(Le,{size:"sm",variant:"ghost",onClick:()=>fe(G===se.id?null:se.id),children:[h.jsx(ay,{className:"h-3 w-3 mr-1"}),"Add Key"]})]}),se.apiKeys.length===0&&!G&&h.jsx("p",{className:"text-xs text-muted-foreground",children:"No keys configured"}),se.apiKeys.map(Te=>h.jsxs("div",{className:"flex items-center justify-between p-2 bg-muted/50 rounded",children:[h.jsxs("div",{children:[h.jsx("span",{className:"text-sm font-medium",children:Te.label}),Te.isActive&&h.jsx("span",{className:"ml-2 text-xs bg-green-500/10 text-green-600 px-1.5 py-0.5 rounded",children:"Active"}),h.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:Te.maskedKey})]}),h.jsxs("div",{className:"flex gap-1",children:[!Te.isActive&&h.jsx(Le,{size:"sm",variant:"ghost",onClick:()=>Se(se.id,Te.label),children:"Set Active"}),h.jsx(Le,{size:"icon",variant:"ghost",onClick:()=>ye(se.id,Te.label),children:h.jsx(Ai,{className:"h-3 w-3 text-destructive"})})]})]},Te.label)),G===se.id&&h.jsxs("div",{className:"p-3 border rounded space-y-2 bg-background",children:[h.jsx(Vr,{placeholder:"Key label (e.g. default, production)",value:ue,onChange:Te=>ne(Te.target.value)}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Vr,{type:ie?"text":"password",placeholder:"API key",value:R,onChange:Te=>J(Te.target.value)}),h.jsx(Le,{size:"icon",variant:"ghost",onClick:()=>ge(!ie),children:ie?h.jsx(qw,{className:"h-4 w-4"}):h.jsx(Iw,{className:"h-4 w-4"})})]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Le,{size:"sm",onClick:()=>Ue(se.id),disabled:!ue.trim()||!R.trim(),children:"Save Key"}),h.jsx(Le,{size:"sm",variant:"ghost",onClick:()=>{fe(null),ne(""),J("")},children:"Cancel"})]})]})]})]},se.id))]})]}),h.jsx(ml,{value:"model",className:"space-y-4",children:r?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-sm font-medium",children:(Ae==null?void 0:Ae.name)||r}),h.jsx("p",{className:"text-xs text-muted-foreground",children:r})]}),h.jsx(Le,{variant:"ghost",size:"sm",onClick:()=>{var se;P(!0),(se=p.listProviderModels)==null||se.call(p,r)},children:h.jsx(hd,{className:me("h-4 w-4",$&&"animate-spin")})})]}),$&&!C[r]?h.jsxs("div",{className:"flex items-center justify-center py-8",children:[h.jsx(Fr,{className:"h-6 w-6 animate-spin text-muted-foreground"}),h.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading models..."})]}):h.jsxs("div",{className:"space-y-1",children:[(C[r]||[]).map(se=>h.jsxs("button",{type:"button",onClick:()=>yt(se.id),className:me("w-full flex items-center justify-between p-3 rounded-lg border text-left transition-all",l===se.id?"border-primary bg-primary/5 ring-2 ring-primary/20":"border-border hover:bg-muted"),children:[h.jsxs("div",{children:[h.jsx("span",{className:"font-medium",children:se.name||se.id}),h.jsx("div",{className:"flex gap-2 mt-1",children:se.capabilities.map(Te=>h.jsx("span",{className:"text-xs bg-muted px-1.5 py-0.5 rounded",children:Te},Te))})]}),h.jsxs("div",{className:"text-right text-xs text-muted-foreground",children:[se.contextWindow&&h.jsxs("div",{children:[se.contextWindow/1e3,"k context"]}),se.inputCost&&se.outputCost&&h.jsxs("div",{children:["$",se.inputCost,"/$",se.outputCost]}),l===se.id&&h.jsx(pl,{className:"h-4 w-4 text-primary mt-1"})]})]},se.id)),((fr=C[r])==null?void 0:fr.length)===0&&h.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No models found for this provider. The catalog might be empty or still loading."})]})]}):h.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[h.jsx(Ti,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),h.jsx("p",{children:"Select a provider first"})]})}),h.jsxs(ml,{value:"connection",className:"space-y-4",children:[h.jsxs("div",{className:"space-y-3",children:[h.jsxs("label",{htmlFor:"websocket-url",className:"text-sm font-medium flex items-center gap-2",children:[h.jsx(ki,{className:"h-4 w-4 text-muted-foreground"}),"WebSocket Server URL"]}),h.jsx(Vr,{id:"websocket-url",value:$e.getState().wsUrl,onChange:se=>$e.getState().setConfig({wsUrl:se.target.value}),placeholder:"ws://localhost:3457",className:"font-mono text-sm"}),h.jsx("p",{className:"text-xs text-muted-foreground",children:"URL of the WrongStack WebSocket server. The server runs alongside the CLI."})]}),h.jsxs("div",{className:"p-4 rounded-lg border bg-muted/50",children:[h.jsx("h4",{className:"text-sm font-medium mb-2",children:"Starting the WebSocket Server"}),h.jsxs("p",{className:"text-xs text-muted-foreground mb-3",children:["Standalone: run ",h.jsx("code",{className:"bg-muted px-1 py-0.5 rounded",children:"./dev.ps1"})," ","from the repo root, or set WS_HOST/WS_PORT before launching"," ",h.jsx("code",{className:"bg-muted px-1 py-0.5 rounded",children:"node packages/webui/dist/server/entry.js"}),". Or alongside the CLI:"," ",h.jsx("code",{className:"bg-muted px-1 py-0.5 rounded",children:"wstack --webui"}),"."]})]})]}),h.jsxs(ml,{value:"appearance",className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Theme"}),h.jsxs("div",{className:"grid grid-cols-3 gap-2 max-w-md",children:[h.jsxs(Le,{variant:c==="light"?"default":"outline",size:"sm",onClick:()=>f("light"),children:[h.jsx(pd,{className:"h-4 w-4 mr-1"}),"Light"]}),h.jsxs(Le,{variant:c==="dark"?"default":"outline",size:"sm",onClick:()=>f("dark"),children:[h.jsx(dd,{className:"h-4 w-4 mr-1"}),"Dark"]}),h.jsxs(Le,{variant:c==="system"?"default":"outline",size:"sm",onClick:()=>f("system"),children:[h.jsx(fd,{className:"h-4 w-4 mr-1"}),"System"]})]}),h.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"System follows your OS-level light/dark preference."})]}),h.jsxs("div",{className:"pt-2 border-t",children:[h.jsx("h3",{className:"text-sm font-semibold mb-3 mt-3",children:"Preferences"}),h.jsx(Sx,{label:"Compact density",hint:"Tighter spacing throughout the chat. Toggle anywhere with Ctrl+Shift+D.",selector:se=>se.compactMode,onChange:()=>Ne.getState().toggleCompactMode()}),h.jsx(Sx,{label:"Sound on completion",hint:"Play a soft chime when a run finishes — useful when working in another tab.",selector:null,configKey:"soundOnComplete"})]})]})]})})})]})}function Sx({label:t,hint:r,selector:l,onChange:i,configKey:s}){const u=Ne(m=>l?l(m):!1),c=$e(m=>s?m[s]:!1),f=l?u:c,p=()=>{if(l)i==null||i();else if(s==="soundOnComplete"){const m=!$e.getState().soundOnComplete;$e.getState().setSoundOnComplete(m),m&&Gx(()=>Promise.resolve().then(()=>Yx),void 0).then(x=>x.playCompletionChime()).catch(()=>{})}};return h.jsxs("div",{className:"flex items-start justify-between gap-3 py-2",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("div",{className:"text-sm font-medium",children:t}),r&&h.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:r})]}),h.jsx("button",{type:"button",role:"switch","aria-checked":f,onClick:p,className:me("shrink-0 relative inline-flex h-5 w-9 rounded-full border transition-colors",f?"bg-primary border-primary":"bg-muted border-input hover:bg-muted/80"),children:h.jsx("span",{className:me("absolute top-0.5 left-0.5 h-3.5 w-3.5 rounded-full bg-background shadow transition-transform",f&&"translate-x-4")})})]})}const p5=[{section:"Global",items:[{keys:["Ctrl","K"],description:"Open command palette"},{keys:["?"],description:"Show this shortcuts overlay"},{keys:["Ctrl","\\"],description:"Toggle sidebar"},{keys:["Ctrl","/"],description:"Focus the message input"}]},{section:"Chat input",items:[{keys:["Enter"],description:"Send message"},{keys:["Shift","Enter"],description:"Insert a newline"},{keys:["↑"],description:"Recall previous prompt (in empty input)"},{keys:["↓"],description:"Recall next prompt"},{keys:["/"],description:"Open slash command popup"},{keys:["Tab"],description:"Autocomplete highlighted command"},{keys:["Esc"],description:"Dismiss popup / clear input"}]},{section:"Chat",items:[{keys:["Ctrl","F"],description:"Search within current chat"},{keys:["Ctrl","L"],description:"Clear context (same as /clear)"},{keys:["Ctrl","N"],description:"Start a new session (same as /new)"},{keys:["Ctrl","E"],description:"Export chat as markdown"},{keys:["Ctrl","M"],description:"Quick model switcher overlay"},{keys:["Ctrl","Shift","D"],description:"Toggle compact UI density"},{keys:["Esc"],description:"Abort the current run (when running)"}]},{section:"Chat navigation (when not typing)",items:[{keys:["j"],description:"Focus next message (alias: ↓)"},{keys:["k"],description:"Focus previous message (alias: ↑)"},{keys:["g"],description:"Jump to first message"},{keys:["Shift","G"],description:"Jump to last message"},{keys:["c"],description:"Copy focused message text"},{keys:["Esc"],description:"Clear focused message"}]}];function g5(){const t=Ne(l=>l.shortcutsOpen),r=Ne(l=>l.setShortcutsOpen);return w.useEffect(()=>{const l=i=>{var f;const s=i.target,u=(f=s==null?void 0:s.tagName)==null?void 0:f.toLowerCase();if(!(u==="input"||u==="textarea"||(s==null?void 0:s.isContentEditable))&&i.key==="?"&&!i.ctrlKey&&!i.metaKey&&!i.altKey){i.preventDefault(),r(!Ne.getState().shortcutsOpen);return}i.key==="Escape"&&Ne.getState().shortcutsOpen&&(i.preventDefault(),r(!1))};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[r]),t?h.jsx("div",{className:"fixed inset-0 z-50 bg-background/60 backdrop-blur-sm flex items-center justify-center px-4",onClick:()=>r(!1),onKeyDown:l=>{l.key==="Escape"&&r(!1)},children:h.jsxs("div",{onClick:l=>l.stopPropagation(),onKeyDown:l=>l.stopPropagation(),className:"w-full max-w-2xl rounded-xl border bg-popover shadow-2xl overflow-hidden flex flex-col max-h-[80vh]",children:[h.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Hx,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("h2",{className:"text-sm font-semibold",children:"Keyboard shortcuts"})]}),h.jsx("button",{type:"button",onClick:()=>r(!1),className:"text-muted-foreground hover:text-foreground p-1 rounded hover:bg-muted",children:h.jsx(xl,{className:"h-4 w-4"})})]}),h.jsx("div",{className:"overflow-y-auto px-5 py-4 space-y-6",children:p5.map(l=>h.jsxs("div",{children:[h.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-2",children:l.section}),h.jsx("div",{className:"grid grid-cols-1 gap-1.5",children:l.items.map(i=>h.jsxs("div",{className:"flex items-center justify-between gap-3 text-sm px-2 py-1.5 rounded hover:bg-muted/40",children:[h.jsx("span",{className:"text-foreground/80",children:i.description}),h.jsx("span",{className:"flex items-center gap-1 shrink-0",children:i.keys.map((s,u)=>h.jsxs("span",{className:"flex items-center gap-1",children:[u>0&&h.jsx("span",{className:"text-muted-foreground/40 text-xs",children:"+"}),h.jsx("kbd",{className:"font-mono text-[10px] border rounded px-1.5 py-0.5 bg-background",children:s})]},s))})]},i.description))})]},l.section))}),h.jsxs("div",{className:"border-t px-5 py-3 text-xs text-muted-foreground",children:["Press"," ",h.jsx("kbd",{className:"font-mono text-[10px] border rounded px-1 py-0.5 bg-background",children:"?"})," ","any time to reopen this list."]})]})}):null}function y5(){const{toggleSidebar:t,currentView:r,setCurrentView:l}=Ne(),i=Ne(_=>_.sidebarWidth),s=Ne(_=>_.setSidebarWidth),{totalTokens:u,cost:c,session:f,todos:p}=Pe(),{messages:m,clearMessages:x}=he(),y=Ne(_=>_.pinnedIds),b=Ne(_=>_.unpinAll),[v,C]=w.useState(""),N=Ne(_=>_.favoriteSessionIds),A=Ne(_=>_.toggleFavoriteSession),E=Ne(_=>_.sessionNicknames),M=Ne(_=>_.setSessionNickname),[O,$]=w.useState(null),[P,L]=w.useState(""),Y=y.map(_=>m.find(ee=>ee.id===_)).filter(_=>!!_&&_.content.length>0),{wsConnected:le,wsUrl:oe,provider:H,model:X}=$e(),{entries:G,loading:fe,error:ue}=pa(),{listSessions:ne,deleteSession:R,resumeSession:J,client:ie}=sr();w.useEffect(()=>{var _;le&&((_=ie==null?void 0:ie.getTodos)==null||_.call(ie))},[le,ie]);const ge=f==null?void 0:f.id;w.useEffect(()=>{r==="history"&&le&&ne(50)},[r,le,ge,ne]);const D=_=>{if(!_)return"--";const ee=Math.floor((Date.now()-_)/1e3);return ee<60?`${ee}s`:`${Math.floor(ee/60)}m`},T=_=>{const ee=Date.parse(_);if(Number.isNaN(ee))return"";const te=Date.now()-ee;if(te<6e4)return"just now";if(te<36e5)return`${Math.floor(te/6e4)}m ago`;if(te<864e5)return`${Math.floor(te/36e5)}h ago`;const Z=Math.floor(te/864e5);return Z<7?`${Z}d ago`:new Date(ee).toLocaleDateString()},B=(()=>{const _=v.trim().toLowerCase(),ee=_?G.filter(Qe=>Qe.title.toLowerCase().includes(_)||Qe.model.toLowerCase().includes(_)||Qe.provider.toLowerCase().includes(_)||Qe.id.toLowerCase().includes(_)):G,te=new Date;te.setHours(0,0,0,0);const Z=te.getTime(),xe=Z-864e5,ke=Z-6*864e5,Ae={today:[],yesterday:[],week:[],older:[]};for(const Qe of ee){const Mt=Date.parse(Qe.startedAt);if(Number.isNaN(Mt)){Ae.older.push(Qe);continue}Mt>=Z?Ae.today.push(Qe):Mt>=xe?Ae.yesterday.push(Qe):Mt>=ke?Ae.week.push(Qe):Ae.older.push(Qe)}const ht=new Set(N),yt=ee.filter(Qe=>ht.has(Qe.id)),Ue=[];yt.length&&Ue.push({label:"Favorites",rows:yt,star:!0});const ye=Qe=>Qe.filter(Mt=>!ht.has(Mt.id)),Se=ye(Ae.today),Fe=ye(Ae.yesterday),nt=ye(Ae.week),Yt=ye(Ae.older);return Se.length&&Ue.push({label:"Today",rows:Se}),Fe.length&&Ue.push({label:"Yesterday",rows:Fe}),nt.length&&Ue.push({label:"This week",rows:nt}),Yt.length&&Ue.push({label:"Earlier",rows:Yt}),Ue})(),j=_=>{_.preventDefault();const ee=_.clientX,te=i,Z=ke=>{s(te+(ke.clientX-ee))},xe=()=>{window.removeEventListener("mousemove",Z),window.removeEventListener("mouseup",xe),document.body.style.cursor="",document.body.style.userSelect=""};window.addEventListener("mousemove",Z),window.addEventListener("mouseup",xe),document.body.style.cursor="col-resize",document.body.style.userSelect="none"};return h.jsxs("aside",{style:{width:`${i}px`},className:"relative border-r bg-card flex flex-col shrink-0",children:[h.jsxs("div",{onMouseDown:j,onDoubleClick:()=>s(288),className:"group/handle absolute top-0 right-0 h-full w-2 cursor-col-resize z-10 flex items-center justify-end",title:"Drag to resize · double-click to reset",children:[h.jsx("div",{className:"h-full w-px bg-border group-hover/handle:bg-primary/60 group-hover/handle:w-0.5 transition-all"}),h.jsxs("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 flex flex-col gap-0.5 opacity-0 group-hover/handle:opacity-100 transition-opacity pr-0.5",children:[h.jsx("span",{className:"h-1 w-1 rounded-full bg-primary/70"}),h.jsx("span",{className:"h-1 w-1 rounded-full bg-primary/70"}),h.jsx("span",{className:"h-1 w-1 rounded-full bg-primary/70"})]})]}),h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-6 h-6 rounded bg-primary flex items-center justify-center",children:h.jsx(bd,{className:"h-4 w-4 text-primary-foreground"})}),h.jsx("span",{className:"text-sm font-semibold tracking-tight",children:"WrongStack"})]}),h.jsx(Le,{variant:"ghost",size:"icon",onClick:t,children:h.jsx(t2,{className:"h-4 w-4"})})]}),h.jsxs(Sb,{value:r==="settings"?"chat":r,onValueChange:_=>l(_),className:"flex-1 flex flex-col",children:[h.jsxs(Kd,{className:"w-full rounded-none bg-transparent p-2 h-auto grid grid-cols-2",children:[h.jsxs(hl,{value:"chat",className:"flex-col gap-1.5 py-2 data-[state=active]:bg-primary/10",children:[h.jsx(Jw,{className:"h-4 w-4"}),h.jsx("span",{className:"text-xs",children:"Chat"})]}),h.jsxs(hl,{value:"history",className:"flex-col gap-1.5 py-2 data-[state=active]:bg-primary/10",children:[h.jsx(qf,{className:"h-4 w-4"}),h.jsx("span",{className:"text-xs",children:"History"})]})]}),h.jsxs(ml,{value:"chat",className:"flex-1 flex flex-col m-0 overflow-hidden",children:[h.jsxs("div",{className:"px-4 py-3 border-b",children:[h.jsxs("div",{className:me("flex items-center gap-2 px-3 py-2 rounded-lg text-sm",le?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"),children:[le?h.jsx($x,{className:"h-4 w-4"}):h.jsx(yd,{className:"h-4 w-4"}),h.jsx("span",{className:"font-medium",children:le?"Connected":"Disconnected"})]}),h.jsx("div",{className:"text-xs text-muted-foreground mt-2 px-1 font-mono",children:oe})]}),h.jsxs("button",{type:"button",onClick:()=>l("settings"),className:"px-4 py-3 border-b text-left hover:bg-muted/40 transition-colors",children:[h.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:"Active model"}),h.jsxs("div",{className:"font-mono text-xs truncate",children:[h.jsx("span",{className:"text-muted-foreground",children:H||"—"}),h.jsx("span",{className:"text-muted-foreground/40 mx-1",children:"/"}),h.jsx("span",{className:"font-medium",children:X||"—"})]})]}),h.jsxs("div",{className:"px-4 py-3 border-b space-y-3",children:[h.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[h.jsx(Bf,{className:"h-4 w-4 text-muted-foreground"}),"Session"]}),h.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[h.jsxs("div",{className:"flex flex-col p-2 rounded-lg bg-muted/50",children:[h.jsx("span",{className:"text-muted-foreground",children:"Messages"}),h.jsx("span",{className:"text-lg font-semibold",children:m.length})]}),h.jsxs("div",{className:"flex flex-col p-2 rounded-lg bg-muted/50",children:[h.jsx("span",{className:"text-muted-foreground",children:"Duration"}),h.jsx("span",{className:"text-lg font-semibold",children:D((f==null?void 0:f.startedAt)??null)})]}),h.jsxs("div",{className:"flex flex-col p-2 rounded-lg bg-muted/50",children:[h.jsx("span",{className:"text-muted-foreground",children:"Input"}),h.jsx("span",{className:"text-lg font-semibold",children:u.input.toLocaleString()})]}),h.jsxs("div",{className:"flex flex-col p-2 rounded-lg bg-muted/50",children:[h.jsx("span",{className:"text-muted-foreground",children:"Output"}),h.jsx("span",{className:"text-lg font-semibold",children:u.output.toLocaleString()})]})]}),c>0&&h.jsxs("div",{className:"flex justify-between items-center p-2 rounded-lg bg-green-500/10",children:[h.jsx("span",{className:"text-sm text-muted-foreground",children:"Cost"}),h.jsxs("span",{className:"text-lg font-semibold text-green-600 dark:text-green-400",children:["$",c.toFixed(4)]})]})]}),p.length>0&&h.jsxs("div",{className:"px-4 py-3 border-b space-y-2",children:[h.jsxs("h3",{className:"text-sm font-medium flex items-center justify-between",children:[h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx(Kw,{className:"h-4 w-4 text-muted-foreground"}),"Todos"]}),h.jsxs("span",{className:"text-[10px] text-muted-foreground tabular-nums",children:[p.filter(_=>_.status==="completed").length,"/",p.length]})]}),h.jsx("ul",{className:"space-y-1 max-h-48 overflow-y-auto pr-1",children:p.map(_=>{const ee=_.status==="completed"?pl:_.status==="in_progress"?Lw:Uw,te=_.status==="completed"?"text-green-600 dark:text-green-400 line-through opacity-70":_.status==="in_progress"?"text-amber-600 dark:text-amber-400":"text-muted-foreground";return h.jsxs("li",{className:me("flex items-start gap-2 text-xs leading-snug",te),children:[h.jsx(ee,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),h.jsx("span",{className:"break-words",children:_.status==="in_progress"&&_.activeForm?_.activeForm:_.content})]},_.id)})})]}),Y.length>0&&h.jsxs("div",{className:"px-4 py-3 border-b space-y-2",children:[h.jsxs("h3",{className:"text-sm font-medium flex items-center justify-between",children:[h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx(Ix,{className:"h-4 w-4 text-amber-500"}),"Pinned"]}),h.jsx("button",{type:"button",onClick:b,className:"text-[10px] text-muted-foreground hover:text-destructive",children:"Clear"})]}),h.jsx("ul",{className:"space-y-1 max-h-48 overflow-y-auto pr-1",children:Y.map(_=>{const ee=_.content.replace(/\s+/g," ").slice(0,80);return h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>{const te=document.querySelector(`[data-message-id="${_.id}"]`);te&&(te.scrollIntoView({behavior:"smooth",block:"center"}),te.classList.add("ring-2","ring-amber-500/60"),setTimeout(()=>{te.classList.remove("ring-2","ring-amber-500/60")},1600))},className:"w-full text-left text-xs px-2 py-1.5 rounded bg-muted/40 hover:bg-muted/70 border border-amber-500/20 leading-snug",title:_.content.slice(0,400),children:[ee,_.content.length>80?"…":""]})},_.id)})})]}),h.jsxs("div",{className:"px-4 py-3 border-b space-y-2",children:[h.jsxs(Le,{variant:"outline",size:"sm",className:"w-full justify-start text-destructive hover:text-destructive",onClick:()=>{var _;x(),(_=ie==null?void 0:ie.clearContext)==null||_.call(ie)},children:[h.jsx(Ai,{className:"h-4 w-4 mr-2"}),"Clear context"]}),h.jsxs(Le,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:()=>{var _;return(_=ie==null?void 0:ie.newSession)==null?void 0:_.call(ie)},disabled:!le,children:[h.jsx(zi,{className:"h-4 w-4 mr-2"}),"New session"]}),h.jsxs(Le,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:()=>{var _;return(_=ie==null?void 0:ie.compactContext)==null?void 0:_.call(ie)},disabled:!le,children:[h.jsx(Bf,{className:"h-4 w-4 mr-2"}),"Compact context"]})]}),h.jsx("div",{className:"flex-1"}),h.jsx("div",{className:"px-3 py-3 border-t",children:h.jsxs(Le,{variant:"ghost",size:"sm",className:"w-full justify-start",onClick:()=>l("settings"),children:[h.jsx(md,{className:"h-4 w-4 mr-2"}),"Settings"]})})]}),h.jsxs(ml,{value:"history",className:"flex-1 m-0 flex flex-col overflow-hidden",children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b",children:[h.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Recent sessions"}),h.jsx(Le,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>ne(50),disabled:!le,title:"Refresh",children:fe?h.jsx(Fr,{className:"h-3.5 w-3.5 animate-spin"}):h.jsx(hd,{className:"h-3.5 w-3.5"})})]}),G.length>3&&h.jsx("div",{className:"px-3 py-2 border-b",children:h.jsxs("div",{className:"relative",children:[h.jsx(ha,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground/60"}),h.jsx("input",{type:"text",value:v,onChange:_=>C(_.target.value),placeholder:"Filter title, model, provider…",className:"w-full pl-7 pr-7 py-1 text-xs rounded-md bg-muted/40 border border-transparent focus:bg-background focus:border-input focus:outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50"}),v&&h.jsx("button",{type:"button",onClick:()=>C(""),className:"absolute right-1 top-1/2 -translate-y-1/2 text-muted-foreground/60 hover:text-foreground p-0.5",title:"Clear filter",children:h.jsx(xl,{className:"h-3 w-3"})})]})}),ue&&h.jsx("div",{className:"px-4 py-2 text-xs text-destructive bg-destructive/5 border-b",children:ue}),h.jsx(Ls,{className:"flex-1",children:G.length===0&&!fe?h.jsxs("div",{className:"text-center text-muted-foreground py-8 px-4",children:[h.jsx(qf,{className:"h-8 w-8 mx-auto mb-3 opacity-20"}),h.jsx("p",{className:"text-sm font-medium",children:"No history yet"}),h.jsx("p",{className:"text-xs mt-1",children:"Your conversations will appear here"})]}):B.length===0?h.jsxs("div",{className:"text-center text-muted-foreground py-8 px-4",children:[h.jsx(ha,{className:"h-8 w-8 mx-auto mb-3 opacity-20"}),h.jsx("p",{className:"text-sm font-medium",children:"No matches"}),h.jsx("p",{className:"text-xs mt-1",children:"Try a different filter"})]}):h.jsx("div",{className:"p-2 space-y-3",children:B.map(_=>h.jsxs("div",{className:"space-y-1",children:[h.jsxs("div",{className:me("sticky top-0 z-[1] px-1 pb-1 text-[10px] uppercase tracking-wider font-semibold bg-card/90 backdrop-blur-sm flex items-center gap-1",_.star?"text-amber-500":"text-muted-foreground/80"),children:[_.star&&h.jsx(iy,{className:"h-3 w-3 fill-current"}),_.label," ",h.jsxs("span",{className:"text-muted-foreground/50 font-normal normal-case ml-1",children:["(",_.rows.length,")"]})]}),_.rows.map(ee=>h.jsxs("div",{className:me("group relative rounded-md border text-sm transition-colors",ee.isCurrent?"bg-primary/5 border-primary/40":"bg-card border-border/60 hover:bg-muted/40 hover:border-primary/40"),children:[h.jsx("button",{type:"button",disabled:ee.isCurrent||O===ee.id,onClick:()=>J(ee.id),onDoubleClick:te=>{te.stopPropagation(),$(ee.id),L(E[ee.id]??ee.title??"")},className:"block w-full rounded-md px-3 py-2 pr-16 text-left disabled:cursor-default focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:h.jsxs("div",{className:"min-w-0 flex-1",children:[O===ee.id?h.jsx("input",{value:P,onChange:te=>L(te.target.value),onClick:te=>te.stopPropagation(),onBlur:()=>{M(ee.id,P),$(null)},onKeyDown:te=>{te.key==="Enter"?(te.preventDefault(),M(ee.id,P),$(null)):te.key==="Escape"&&(te.preventDefault(),$(null))},placeholder:ee.title||"Nickname",className:"w-full text-sm bg-background border border-input rounded px-1.5 py-0.5 focus:outline-none focus:ring-1 focus:ring-ring"}):h.jsx("div",{className:"font-medium truncate text-foreground",title:E[ee.id]?`${E[ee.id]} — original: ${ee.title}`:`${ee.title}
|
|
608
|
+
|
|
609
|
+
Double-click to rename`,children:E[ee.id]||ee.title||"(empty)"}),h.jsxs("div",{className:"text-[10px] text-muted-foreground font-mono truncate mt-0.5",children:[ee.provider,"/",ee.model]}),h.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-muted-foreground/80 mt-0.5",children:[h.jsx("span",{children:T(ee.startedAt)}),ee.tokenTotal>0&&h.jsxs(h.Fragment,{children:[h.jsx("span",{children:"·"}),h.jsxs("span",{className:"tabular-nums",children:[ee.tokenTotal.toLocaleString()," tok"]})]}),ee.isCurrent&&h.jsxs(h.Fragment,{children:[h.jsx("span",{children:"·"}),h.jsx("span",{className:"text-primary font-medium",children:"active"})]})]})]})}),h.jsxs("div",{className:"absolute right-2 top-2 flex items-center gap-1",children:[h.jsx("button",{type:"button",onClick:()=>A(ee.id),className:me("transition-opacity hover:text-amber-500",N.includes(ee.id)?"opacity-100 text-amber-500":"opacity-0 group-hover:opacity-100 text-muted-foreground"),title:N.includes(ee.id)?"Unfavorite":"Mark as favorite",children:h.jsx(iy,{className:me("h-3.5 w-3.5",N.includes(ee.id)&&"fill-current")})}),!ee.isCurrent&&h.jsx("button",{type:"button",onClick:()=>{window.confirm(`Delete session "${ee.title}"?`)&&R(ee.id)},className:"opacity-0 group-hover:opacity-100 transition-opacity text-muted-foreground hover:text-destructive",title:"Delete session",children:h.jsx(Ai,{className:"h-3.5 w-3.5"})})]})]},ee.id))]},_.label))})})]})]})]})}function x5(){const{theme:t}=tb(),{currentView:r,sidebarOpen:l,toggleSidebar:i,setSearchOpen:s,setSidebarOpen:u}=Ne(),c=he(b=>b.isLoading),f=Pe(b=>b.iteration),p=Pe(b=>b.projectName),m=Pe(b=>{var v;return(v=b.session)==null?void 0:v.title}),x=Pe(b=>{var v;return(v=b.session)==null?void 0:v.id}),y=Ne(b=>x?b.sessionNicknames[x]:void 0);return w.useEffect(()=>{if(typeof window>"u")return;const b=window.matchMedia("(max-width: 768px)"),v=()=>{b.matches&&Ne.getState().sidebarOpen&&u(!1)};return v(),b.addEventListener("change",v),()=>b.removeEventListener("change",v)},[u]),M2(),w.useEffect(()=>{const b=[];if(c){const A=f?` iter ${f.index}${f.max?`/${f.max}`:""}`:"";b.push(`●${A}`)}const v=(y==null?void 0:y.trim())||(m==null?void 0:m.trim()),C=p==null?void 0:p.trim();v&&b.push(v),C&&b.push(C),b.push("WrongStack");const N=b.filter(Boolean).join(" · ");return document.title=N,()=>{document.title="WrongStack"}},[c,f,p,m,y]),w.useEffect(()=>{const b=v=>{var M,O,$,P,L,Y,le;const C=v.target,N=(M=C==null?void 0:C.tagName)==null?void 0:M.toLowerCase(),A=N==="input"||N==="textarea"||(C==null?void 0:C.isContentEditable),E=v.ctrlKey||v.metaKey;if(E&&v.key==="\\"){v.preventDefault(),i();return}if(E&&v.key.toLowerCase()==="f"){v.preventDefault(),s(!0);return}if(E&&v.key.toLowerCase()==="/"){v.preventDefault();const oe=document.querySelector("textarea");oe==null||oe.focus();return}if(E&&!A&&(v.key.toLowerCase()==="l"?(v.preventDefault(),he.getState().clearMessages(),($=(O=En($e.getState().wsUrl))==null?void 0:O.clearContext)==null||$.call(O)):v.key.toLowerCase()==="n"?(v.preventDefault(),(L=(P=En($e.getState().wsUrl))==null?void 0:P.newSession)==null||L.call(P)):v.key.toLowerCase()==="e"&&(v.preventDefault(),vd())),E&&v.shiftKey&&v.key.toLowerCase()==="d"&&(v.preventDefault(),Ne.getState().toggleCompactMode()),!A&&!E&&!v.altKey){const oe=Array.from(document.querySelectorAll("[data-message-id]"));if(oe.length===0)return;const H=document.querySelector('[data-message-id][data-focused="true"]'),X=H?oe.indexOf(H):-1,G=fe=>{for(const ue of oe)ue.removeAttribute("data-focused");fe.setAttribute("data-focused","true"),fe.scrollIntoView({behavior:"smooth",block:"center"})};if(v.key==="j"||v.key==="ArrowDown"){const fe=oe[Math.min(oe.length-1,Math.max(0,X+1))];fe&&(v.preventDefault(),G(fe));return}if(v.key==="k"||v.key==="ArrowUp"){const fe=oe[Math.max(0,X<=0?0:X-1)];fe&&(v.preventDefault(),G(fe));return}if(v.key==="g"&&!v.shiftKey){v.preventDefault(),G(oe[0]);return}if(v.key==="G"||v.key==="g"&&v.shiftKey){v.preventDefault(),G(oe[oe.length-1]);return}if(v.key==="Escape"&&H){v.preventDefault(),H.removeAttribute("data-focused");return}if(v.key==="c"&&H){const fe=((Y=H.querySelector(".markdown-content"))==null?void 0:Y.innerText)??H.innerText;fe&&((le=navigator.clipboard)==null||le.writeText(fe).catch(()=>{}),v.preventDefault());return}}};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[i,s]),h.jsxs("div",{className:me("flex h-screen",t),children:[l&&h.jsx(y5,{}),h.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden",children:[h.jsx(XA,{}),r==="chat"&&h.jsx(wT,{}),r==="settings"&&h.jsx(m5,{})]}),h.jsx(PA,{}),h.jsx(z2,{}),h.jsx(g5,{}),h.jsx(KA,{}),h.jsx(g2,{})]})}function b5(){return h.jsx(QA,{children:h.jsx(ZA,{defaultTheme:"system",children:h.jsx(x5,{})})})}XS.createRoot(document.getElementById("root")).render(h.jsx(dn.StrictMode,{children:h.jsx(b5,{})}));
|