@robota-sdk/agent-cli 3.0.0-beta.93 → 3.0.0-beta.95
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/CHANGELOG.md +221 -0
- package/README.md +7 -1
- package/dist/node/bin.js +16 -16
- package/dist/node/cli-core-DJIgDK0t.js +2920 -0
- package/dist/node/desktop-host.js +1 -1
- package/dist/node/headless.js +1 -1
- package/dist/node/host.d.ts +1 -1
- package/dist/node/host.js +1 -1
- package/dist/node/index.d.ts +2 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +2 -2
- package/dist/node/{node-DDxqAmr9.js → node-BBey07fn.js} +7 -7
- package/dist/node/node-BBey07fn.js.map +1 -0
- package/dist/node/{node-CVEUtnXS.js → node-BOLpvRke.js} +2 -2
- package/dist/node/{node-CVEUtnXS.js.map → node-BOLpvRke.js.map} +1 -1
- package/dist/node/{node-DAf6oQNY.js → node-Bxcf0vqP.js} +6 -6
- package/dist/node/{node-DXIaHonc.js → node-CV7kyP4U.js} +1 -1
- package/dist/node/{node-BrAmtuTw.js → node-Dr_K99X7.js} +5 -5
- package/dist/node/{node-BrAmtuTw.js.map → node-Dr_K99X7.js.map} +1 -1
- package/dist/node/{node-1Kk9kvit.js → node-DsYjDBKf.js} +4 -4
- package/dist/node/{product-host-DqZRpcAh.d.ts → product-host-BACfuTu4.d.ts} +40 -11
- package/dist/node/product-host-BACfuTu4.d.ts.map +1 -0
- package/dist/node/product-host-BwV-X6oS.js +2954 -0
- package/dist/node/product-host-BwV-X6oS.js.map +1 -0
- package/dist/web/assets/index-DB915Rm-.js +314 -0
- package/dist/web/index.html +1 -1
- package/package.json +43 -37
- package/dist/node/cli-core-DutvpRdJ.js +0 -2921
- package/dist/node/node-DDxqAmr9.js.map +0 -1
- package/dist/node/product-host-DqZRpcAh.d.ts.map +0 -1
- package/dist/node/product-host-zZ2TTtQk.js +0 -2955
- package/dist/node/product-host-zZ2TTtQk.js.map +0 -1
- package/dist/web/assets/index-BQP0NBgG.js +0 -309
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))u(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&u(f)}).observe(document,{childList:!0,subtree:!0});function r(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function u(o){if(o.ep)return;o.ep=!0;const c=r(o);fetch(o.href,c)}})();function Uu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var rc={exports:{}},Fr={};/**
|
|
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 Um;function g0(){if(Um)return Fr;Um=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(u,o,c){var f=null;if(c!==void 0&&(f=""+c),o.key!==void 0&&(f=""+o.key),"key"in o){c={};for(var p in o)p!=="key"&&(c[p]=o[p])}else c=o;return o=c.ref,{$$typeof:t,type:u,key:f,ref:o!==void 0?o:null,props:c}}return Fr.Fragment=i,Fr.jsx=r,Fr.jsxs=r,Fr}var qm;function x0(){return qm||(qm=1,rc.exports=g0()),rc.exports}var d=x0(),ac={exports:{}},Ne={};/**
|
|
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 Bm;function y0(){if(Bm)return Ne;Bm=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),S=Symbol.iterator;function v(E){return E===null||typeof E!="object"?null:(E=S&&E[S]||E["@@iterator"],typeof E=="function"?E:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,L={};function C(E,H,w){this.props=E,this.context=H,this.refs=L,this.updater=w||N}C.prototype.isReactComponent={},C.prototype.setState=function(E,H){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,H,"setState")},C.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function F(){}F.prototype=C.prototype;function U(E,H,w){this.props=E,this.context=H,this.refs=L,this.updater=w||N}var X=U.prototype=new F;X.constructor=U,T(X,C.prototype),X.isPureReactComponent=!0;var ie=Array.isArray;function R(){}var I={H:null,A:null,T:null,S:null},ue=Object.prototype.hasOwnProperty;function W(E,H,w){var ae=w.ref;return{$$typeof:t,type:E,key:H,ref:ae!==void 0?ae:null,props:w}}function O(E,H){return W(E.type,H,E.props)}function ne(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function re(E){var H={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(w){return H[w]})}var ge=/\/+/g;function oe(E,H){return typeof E=="object"&&E!==null&&E.key!=null?re(""+E.key):H.toString(36)}function P(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(R,R):(E.status="pending",E.then(function(H){E.status==="pending"&&(E.status="fulfilled",E.value=H)},function(H){E.status==="pending"&&(E.status="rejected",E.reason=H)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function D(E,H,w,ae,fe){var he=typeof E;(he==="undefined"||he==="boolean")&&(E=null);var we=!1;if(E===null)we=!0;else switch(he){case"bigint":case"string":case"number":we=!0;break;case"object":switch(E.$$typeof){case t:case i:we=!0;break;case y:return we=E._init,D(we(E._payload),H,w,ae,fe)}}if(we)return fe=fe(E),we=ae===""?"."+oe(E,0):ae,ie(fe)?(w="",we!=null&&(w=we.replace(ge,"$&/")+"/"),D(fe,H,w,"",function(xt){return xt})):fe!=null&&(ne(fe)&&(fe=O(fe,w+(fe.key==null||E&&E.key===fe.key?"":(""+fe.key).replace(ge,"$&/")+"/")+we)),H.push(fe)),1;we=0;var Ye=ae===""?".":ae+":";if(ie(E))for(var be=0;be<E.length;be++)ae=E[be],he=Ye+oe(ae,be),we+=D(ae,H,w,he,fe);else if(be=v(E),typeof be=="function")for(E=be.call(E),be=0;!(ae=E.next()).done;)ae=ae.value,he=Ye+oe(ae,be++),we+=D(ae,H,w,he,fe);else if(he==="object"){if(typeof E.then=="function")return D(P(E),H,w,ae,fe);throw H=String(E),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return we}function Q(E,H,w){if(E==null)return E;var ae=[],fe=0;return D(E,ae,"","",function(he){return H.call(w,he,fe++)}),ae}function se(E){if(E._status===-1){var H=E._result;H=H(),H.then(function(w){(E._status===0||E._status===-1)&&(E._status=1,E._result=w)},function(w){(E._status===0||E._status===-1)&&(E._status=2,E._result=w)}),E._status===-1&&(E._status=0,E._result=H)}if(E._status===1)return E._result.default;throw E._result}var me=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=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(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},_={map:Q,forEach:function(E,H,w){Q(E,function(){H.apply(this,arguments)},w)},count:function(E){var H=0;return Q(E,function(){H++}),H},toArray:function(E){return Q(E,function(H){return H})||[]},only:function(E){if(!ne(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return Ne.Activity=x,Ne.Children=_,Ne.Component=C,Ne.Fragment=r,Ne.Profiler=o,Ne.PureComponent=U,Ne.StrictMode=u,Ne.Suspense=g,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(E){return I.H.useMemoCache(E)}},Ne.cache=function(E){return function(){return E.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(E,H,w){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var ae=T({},E.props),fe=E.key;if(H!=null)for(he in H.key!==void 0&&(fe=""+H.key),H)!ue.call(H,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&H.ref===void 0||(ae[he]=H[he]);var he=arguments.length-2;if(he===1)ae.children=w;else if(1<he){for(var we=Array(he),Ye=0;Ye<he;Ye++)we[Ye]=arguments[Ye+2];ae.children=we}return W(E.type,fe,ae)},Ne.createContext=function(E){return E={$$typeof:f,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:c,_context:E},E},Ne.createElement=function(E,H,w){var ae,fe={},he=null;if(H!=null)for(ae in H.key!==void 0&&(he=""+H.key),H)ue.call(H,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(fe[ae]=H[ae]);var we=arguments.length-2;if(we===1)fe.children=w;else if(1<we){for(var Ye=Array(we),be=0;be<we;be++)Ye[be]=arguments[be+2];fe.children=Ye}if(E&&E.defaultProps)for(ae in we=E.defaultProps,we)fe[ae]===void 0&&(fe[ae]=we[ae]);return W(E,he,fe)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(E){return{$$typeof:p,render:E}},Ne.isValidElement=ne,Ne.lazy=function(E){return{$$typeof:y,_payload:{_status:-1,_result:E},_init:se}},Ne.memo=function(E,H){return{$$typeof:m,type:E,compare:H===void 0?null:H}},Ne.startTransition=function(E){var H=I.T,w={};I.T=w;try{var ae=E(),fe=I.S;fe!==null&&fe(w,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(R,me)}catch(he){me(he)}finally{H!==null&&w.types!==null&&(H.types=w.types),I.T=H}},Ne.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ne.use=function(E){return I.H.use(E)},Ne.useActionState=function(E,H,w){return I.H.useActionState(E,H,w)},Ne.useCallback=function(E,H){return I.H.useCallback(E,H)},Ne.useContext=function(E){return I.H.useContext(E)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(E,H){return I.H.useDeferredValue(E,H)},Ne.useEffect=function(E,H){return I.H.useEffect(E,H)},Ne.useEffectEvent=function(E){return I.H.useEffectEvent(E)},Ne.useId=function(){return I.H.useId()},Ne.useImperativeHandle=function(E,H,w){return I.H.useImperativeHandle(E,H,w)},Ne.useInsertionEffect=function(E,H){return I.H.useInsertionEffect(E,H)},Ne.useLayoutEffect=function(E,H){return I.H.useLayoutEffect(E,H)},Ne.useMemo=function(E,H){return I.H.useMemo(E,H)},Ne.useOptimistic=function(E,H){return I.H.useOptimistic(E,H)},Ne.useReducer=function(E,H,w){return I.H.useReducer(E,H,w)},Ne.useRef=function(E){return I.H.useRef(E)},Ne.useState=function(E){return I.H.useState(E)},Ne.useSyncExternalStore=function(E,H,w){return I.H.useSyncExternalStore(E,H,w)},Ne.useTransition=function(){return I.H.useTransition()},Ne.version="19.2.8",Ne}var Hm;function ff(){return Hm||(Hm=1,ac.exports=y0()),ac.exports}var j=ff();const df=Uu(j);var uc={exports:{}},Xr={},sc={exports:{}},oc={};/**
|
|
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 Im;function b0(){return Im||(Im=1,(function(t){function i(D,Q){var se=D.length;D.push(Q);e:for(;0<se;){var me=se-1>>>1,_=D[me];if(0<o(_,Q))D[me]=Q,D[se]=_,se=me;else break e}}function r(D){return D.length===0?null:D[0]}function u(D){if(D.length===0)return null;var Q=D[0],se=D.pop();if(se!==Q){D[0]=se;e:for(var me=0,_=D.length,E=_>>>1;me<E;){var H=2*(me+1)-1,w=D[H],ae=H+1,fe=D[ae];if(0>o(w,se))ae<_&&0>o(fe,w)?(D[me]=fe,D[ae]=se,me=ae):(D[me]=w,D[H]=se,me=H);else if(ae<_&&0>o(fe,se))D[me]=fe,D[ae]=se,me=ae;else break e}}return Q}function o(D,Q){var se=D.sortIndex-Q.sortIndex;return se!==0?se:D.id-Q.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,p=f.now();t.unstable_now=function(){return f.now()-p}}var g=[],m=[],y=1,x=null,S=3,v=!1,N=!1,T=!1,L=!1,C=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function X(D){for(var Q=r(m);Q!==null;){if(Q.callback===null)u(m);else if(Q.startTime<=D)u(m),Q.sortIndex=Q.expirationTime,i(g,Q);else break;Q=r(m)}}function ie(D){if(T=!1,X(D),!N)if(r(g)!==null)N=!0,R||(R=!0,re());else{var Q=r(m);Q!==null&&P(ie,Q.startTime-D)}}var R=!1,I=-1,ue=5,W=-1;function O(){return L?!0:!(t.unstable_now()-W<ue)}function ne(){if(L=!1,R){var D=t.unstable_now();W=D;var Q=!0;try{e:{N=!1,T&&(T=!1,F(I),I=-1),v=!0;var se=S;try{t:{for(X(D),x=r(g);x!==null&&!(x.expirationTime>D&&O());){var me=x.callback;if(typeof me=="function"){x.callback=null,S=x.priorityLevel;var _=me(x.expirationTime<=D);if(D=t.unstable_now(),typeof _=="function"){x.callback=_,X(D),Q=!0;break t}x===r(g)&&u(g),X(D)}else u(g);x=r(g)}if(x!==null)Q=!0;else{var E=r(m);E!==null&&P(ie,E.startTime-D),Q=!1}}break e}finally{x=null,S=se,v=!1}Q=void 0}}finally{Q?re():R=!1}}}var re;if(typeof U=="function")re=function(){U(ne)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,oe=ge.port2;ge.port1.onmessage=ne,re=function(){oe.postMessage(null)}}else re=function(){C(ne,0)};function P(D,Q){I=C(function(){D(t.unstable_now())},Q)}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(D){D.callback=null},t.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<D?Math.floor(1e3/D):5},t.unstable_getCurrentPriorityLevel=function(){return S},t.unstable_next=function(D){switch(S){case 1:case 2:case 3:var Q=3;break;default:Q=S}var se=S;S=Q;try{return D()}finally{S=se}},t.unstable_requestPaint=function(){L=!0},t.unstable_runWithPriority=function(D,Q){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var se=S;S=D;try{return Q()}finally{S=se}},t.unstable_scheduleCallback=function(D,Q,se){var me=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?me+se:me):se=me,D){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=se+_,D={id:y++,callback:Q,priorityLevel:D,startTime:se,expirationTime:_,sortIndex:-1},se>me?(D.sortIndex=se,i(m,D),r(g)===null&&D===r(m)&&(T?(F(I),I=-1):T=!0,P(ie,se-me))):(D.sortIndex=_,i(g,D),N||v||(N=!0,R||(R=!0,re()))),D},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(D){var Q=S;return function(){var se=S;S=Q;try{return D.apply(this,arguments)}finally{S=se}}}})(oc)),oc}var Ym;function v0(){return Ym||(Ym=1,sc.exports=b0()),sc.exports}var cc={exports:{}},Rt={};/**
|
|
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 Gm;function S0(){if(Gm)return Rt;Gm=1;var t=ff();function i(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var u={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(g,m,y){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:x==null?null:""+x,children:g,containerInfo:m,implementation:y}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Rt.createPortal=function(g,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return c(g,m,null,y)},Rt.flushSync=function(g){var m=f.T,y=u.p;try{if(f.T=null,u.p=2,g)return g()}finally{f.T=m,u.p=y,u.d.f()}},Rt.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,u.d.C(g,m))},Rt.prefetchDNS=function(g){typeof g=="string"&&u.d.D(g)},Rt.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var y=m.as,x=p(y,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?u.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:v}):y==="script"&&u.d.X(g,{crossOrigin:x,integrity:S,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Rt.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=p(m.as,m.crossOrigin);u.d.M(g,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&u.d.M(g)},Rt.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,x=p(y,m.crossOrigin);u.d.L(g,y,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Rt.preloadModule=function(g,m){if(typeof g=="string")if(m){var y=p(m.as,m.crossOrigin);u.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else u.d.m(g)},Rt.requestFormReset=function(g){u.d.r(g)},Rt.unstable_batchedUpdates=function(g,m){return g(m)},Rt.useFormState=function(g,m,y){return f.H.useFormState(g,m,y)},Rt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Rt.version="19.2.8",Rt}var Vm;function k0(){if(Vm)return cc.exports;Vm=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(i){console.error(i)}}return t(),cc.exports=S0(),cc.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 Fm;function w0(){if(Fm)return Xr;Fm=1;var t=v0(),i=ff(),r=k0();function u(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function f(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 p(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 g(e){if(c(e)!==e)throw Error(u(188))}function m(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(u(188));return n!==e?null:e}for(var l=e,a=n;;){var s=l.return;if(s===null)break;var h=s.alternate;if(h===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===h.child){for(h=s.child;h;){if(h===l)return g(s),e;if(h===a)return g(s),n;h=h.sibling}throw Error(u(188))}if(l.return!==a.return)l=s,a=h;else{for(var b=!1,k=s.child;k;){if(k===l){b=!0,l=s,a=h;break}if(k===a){b=!0,a=s,l=h;break}k=k.sibling}if(!b){for(k=h.child;k;){if(k===l){b=!0,l=h,a=s;break}if(k===a){b=!0,a=h,l=s;break}k=k.sibling}if(!b)throw Error(u(189))}}if(l.alternate!==a)throw Error(u(190))}if(l.tag!==3)throw Error(u(188));return l.stateNode.current===l?e:n}function y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(e),n!==null)return n;e=e.sibling}return null}var x=Object.assign,S=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),U=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),ie=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),ue=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function re(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case C:return"Profiler";case L:return"StrictMode";case ie:return"Suspense";case R:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case U:return e.displayName||"Context";case F:return(e._context.displayName||"Context")+".Consumer";case X:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return n=e.displayName||null,n!==null?n:oe(e.type)||"Memo";case ue:n=e._payload,e=e._init;try{return oe(e(n))}catch{}}return null}var P=Array.isArray,D=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},me=[],_=-1;function E(e){return{current:e}}function H(e){0>_||(e.current=me[_],me[_]=null,_--)}function w(e,n){_++,me[_]=e.current,e.current=n}var ae=E(null),fe=E(null),he=E(null),we=E(null);function Ye(e,n){switch(w(he,n),w(fe,e),w(ae,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?am(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=am(n),e=um(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(ae),w(ae,e)}function be(){H(ae),H(fe),H(he)}function xt(e){e.memoizedState!==null&&w(we,e);var n=ae.current,l=um(n,e.type);n!==l&&(w(fe,e),w(ae,l))}function jt(e){fe.current===e&&(H(ae),H(fe)),we.current===e&&(H(we),Ir._currentValue=se)}var jn,Nn;function At(e){if(jn===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);jn=n&&n[1]||"",Nn=-1<l.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+jn+e+Nn}var nn=!1;function Cn(e,n){if(!e||nn)return"";nn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(n){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(G){var Y=G}Reflect.construct(e,[],K)}else{try{K.call()}catch(G){Y=G}e.call(K.prototype)}}else{try{throw Error()}catch(G){Y=G}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(G){if(G&&Y&&typeof G.stack=="string")return[G.stack,Y.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=a.DetermineComponentFrameRoot(),b=h[0],k=h[1];if(b&&k){var A=b.split(`
|
|
44
|
-
`),B=k.split(`
|
|
45
|
-
`);for(s=a=0;a<A.length&&!A[a].includes("DetermineComponentFrameRoot");)a++;for(;s<B.length&&!B[s].includes("DetermineComponentFrameRoot");)s++;if(a===A.length||s===B.length)for(a=A.length-1,s=B.length-1;1<=a&&0<=s&&A[a]!==B[s];)s--;for(;1<=a&&0<=s;a--,s--)if(A[a]!==B[s]){if(a!==1||s!==1)do if(a--,s--,0>s||A[a]!==B[s]){var $=`
|
|
46
|
-
`+A[a].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=a&&0<=s);break}}}finally{nn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?At(l):""}function Un(e,n){switch(e.tag){case 26:case 27:case 5:return At(e.type);case 16:return At("Lazy");case 13:return e.child!==n&&n!==null?At("Suspense Fallback"):At("Suspense");case 19:return At("SuspenseList");case 0:case 15:return Cn(e.type,!1);case 11:return Cn(e.type.render,!1);case 1:return Cn(e.type,!0);case 31:return At("Activity");default:return""}}function al(e){try{var n="",l=null;do n+=Un(e,l),l=e,e=e.return;while(e);return n}catch(a){return`
|
|
47
|
-
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}var ln=Object.prototype.hasOwnProperty,En=t.unstable_scheduleCallback,_n=t.unstable_cancelCallback,ee=t.unstable_shouldYield,He=t.unstable_requestPaint,Le=t.unstable_now,rn=t.unstable_getCurrentPriorityLevel,V=t.unstable_ImmediatePriority,le=t.unstable_UserBlockingPriority,xe=t.unstable_NormalPriority,Ee=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,zt=t.log,an=t.unstable_setDisableYieldValue,bt=null,rt=null;function vt(e){if(typeof zt=="function"&&an(e),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode(bt,e)}catch{}}var Xe=Math.clz32?Math.clz32:Xu,yn=Math.log,Dt=Math.LN2;function Xu(e){return e>>>=0,e===0?32:31-(yn(e)/Dt|0)|0}var Ol=256,ui=262144,si=4194304;function qn(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 J(e,n,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,h=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var k=a&134217727;return k!==0?(a=k&~h,a!==0?s=qn(a):(b&=k,b!==0?s=qn(b):l||(l=k&~e,l!==0&&(s=qn(l))))):(k=a&~h,k!==0?s=qn(k):b!==0?s=qn(b):l||(l=a&~e,l!==0&&(s=qn(l)))),s===0?0:n!==0&&n!==s&&(n&h)===0&&(h=s&-s,l=n&-n,h>=l||h===32&&(l&4194048)!==0)?n:s}function ce(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Ce(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 at(){var e=si;return si<<=1,(si&62914560)===0&&(si=4194304),e}function Tn(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function tr(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function i1(e,n,l,a,s,h){var b=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var k=e.entanglements,A=e.expirationTimes,B=e.hiddenUpdates;for(l=b&~l;0<l;){var $=31-Xe(l),K=1<<$;k[$]=0,A[$]=-1;var Y=B[$];if(Y!==null)for(B[$]=null,$=0;$<Y.length;$++){var G=Y[$];G!==null&&(G.lane&=-536870913)}l&=~K}a!==0&&Yf(e,a,0),h!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=h&~(b&~n))}function Yf(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var a=31-Xe(n);e.entangledLanes|=n,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Gf(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var a=31-Xe(l),s=1<<a;s&n|e[a]&n&&(e[a]|=n),l&=~s}}function Vf(e,n){var l=n&-n;return l=(l&42)!==0?1:$u(l),(l&(e.suspendedLanes|n))!==0?0:l}function $u(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 Qu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ff(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Am(e.type))}function Xf(e,n){var l=Q.p;try{return Q.p=e,n()}finally{Q.p=l}}var ul=Math.random().toString(36).slice(2),Nt="__reactFiber$"+ul,qt="__reactProps$"+ul,oi="__reactContainer$"+ul,Zu="__reactEvents$"+ul,r1="__reactListeners$"+ul,a1="__reactHandles$"+ul,$f="__reactResources$"+ul,nr="__reactMarker$"+ul;function Ku(e){delete e[Nt],delete e[qt],delete e[Zu],delete e[r1],delete e[a1]}function ci(e){var n=e[Nt];if(n)return n;for(var l=e.parentNode;l;){if(n=l[oi]||l[Nt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=pm(e);e!==null;){if(l=e[Nt])return l;e=pm(e)}return n}e=l,l=e.parentNode}return null}function fi(e){if(e=e[Nt]||e[oi]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function lr(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(u(33))}function di(e){var n=e[$f];return n||(n=e[$f]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function St(e){e[nr]=!0}var Qf=new Set,Zf={};function Ll(e,n){hi(e,n),hi(e+"Capture",n)}function hi(e,n){for(Zf[e]=n,e=0;e<n.length;e++)Qf.add(n[e])}var u1=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]*$"),Kf={},Jf={};function s1(e){return ln.call(Jf,e)?!0:ln.call(Kf,e)?!1:u1.test(e)?Jf[e]=!0:(Kf[e]=!0,!1)}function oa(e,n,l){if(s1(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var a=n.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+l)}}function ca(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function Bn(e,n,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+a)}}function un(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pf(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function o1(e,n,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,h=a.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return s.call(this)},set:function(b){l=""+b,h.call(this,b)}}),Object.defineProperty(e,n,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(b){l=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ju(e){if(!e._valueTracker){var n=Pf(e)?"checked":"value";e._valueTracker=o1(e,n,""+e[n])}}function Wf(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),a="";return e&&(a=Pf(e)?e.checked?"true":"false":e.value),e=a,e!==l?(n.setValue(e),!0):!1}function fa(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 c1=/[\n"\\]/g;function sn(e){return e.replace(c1,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Pu(e,n,l,a,s,h,b,k){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+un(n)):e.value!==""+un(n)&&(e.value=""+un(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?Wu(e,b,un(n)):l!=null?Wu(e,b,un(l)):a!=null&&e.removeAttribute("value"),s==null&&h!=null&&(e.defaultChecked=!!h),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+un(k):e.removeAttribute("name")}function ed(e,n,l,a,s,h,b,k){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||l!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){Ju(e);return}l=l!=null?""+un(l):"",n=n!=null?""+un(n):l,k||n===e.value||(e.value=n),e.defaultValue=n}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=k?e.checked:!!a,e.defaultChecked=!!a,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),Ju(e)}function Wu(e,n,l){n==="number"&&fa(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function pi(e,n,l,a){if(e=e.options,n){n={};for(var s=0;s<l.length;s++)n["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=n.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+un(l),n=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}n!==null||e[s].disabled||(n=e[s])}n!==null&&(n.selected=!0)}}function td(e,n,l){if(n!=null&&(n=""+un(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+un(l):""}function nd(e,n,l,a){if(n==null){if(a!=null){if(l!=null)throw Error(u(92));if(P(a)){if(1<a.length)throw Error(u(93));a=a[0]}l=a}l==null&&(l=""),n=l}l=un(n),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Ju(e)}function mi(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var f1=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 ld(e,n,l){var a=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":a?e.setProperty(n,l):typeof l!="number"||l===0||f1.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function id(e,n,l){if(n!=null&&typeof n!="object")throw Error(u(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||n!=null&&n.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in n)a=n[s],n.hasOwnProperty(s)&&l[s]!==a&&ld(e,s,a)}else for(var h in n)n.hasOwnProperty(h)&&ld(e,h,n[h])}function es(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var d1=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"]]),h1=/^[\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 da(e){return h1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Hn(){}var ts=null;function ns(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gi=null,xi=null;function rd(e){var n=fi(e);if(n&&(e=n.stateNode)){var l=e[qt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Pu(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+sn(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var a=l[n];if(a!==e&&a.form===e.form){var s=a[qt]||null;if(!s)throw Error(u(90));Pu(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(n=0;n<l.length;n++)a=l[n],a.form===e.form&&Wf(a)}break e;case"textarea":td(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&pi(e,!!l.multiple,n,!1)}}}var ls=!1;function ad(e,n,l){if(ls)return e(n,l);ls=!0;try{var a=e(n);return a}finally{if(ls=!1,(gi!==null||xi!==null)&&(Wa(),gi&&(n=gi,e=xi,xi=gi=null,rd(n),e)))for(n=0;n<e.length;n++)rd(e[n])}}function ir(e,n){var l=e.stateNode;if(l===null)return null;var a=l[qt]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(u(231,n,typeof l));return l}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),is=!1;if(In)try{var rr={};Object.defineProperty(rr,"passive",{get:function(){is=!0}}),window.addEventListener("test",rr,rr),window.removeEventListener("test",rr,rr)}catch{is=!1}var sl=null,rs=null,ha=null;function ud(){if(ha)return ha;var e,n=rs,l=n.length,a,s="value"in sl?sl.value:sl.textContent,h=s.length;for(e=0;e<l&&n[e]===s[e];e++);var b=l-e;for(a=1;a<=b&&n[l-a]===s[h-a];a++);return ha=s.slice(e,1<a?1-a:void 0)}function pa(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 ma(){return!0}function sd(){return!1}function Bt(e){function n(l,a,s,h,b){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=h,this.target=b,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(l=e[k],this[k]=l?l(h):h[k]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?ma:sd,this.isPropagationStopped=sd,this}return x(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ma)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ma)},persist:function(){},isPersistent:ma}),n}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ga=Bt(Ul),ar=x({},Ul,{view:0,detail:0}),p1=Bt(ar),as,us,ur,xa=x({},ar,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:os,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!==ur&&(ur&&e.type==="mousemove"?(as=e.screenX-ur.screenX,us=e.screenY-ur.screenY):us=as=0,ur=e),as)},movementY:function(e){return"movementY"in e?e.movementY:us}}),od=Bt(xa),m1=x({},xa,{dataTransfer:0}),g1=Bt(m1),x1=x({},ar,{relatedTarget:0}),ss=Bt(x1),y1=x({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),b1=Bt(y1),v1=x({},Ul,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),S1=Bt(v1),k1=x({},Ul,{data:0}),cd=Bt(k1),w1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},j1={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"},N1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C1(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=N1[e])?!!n[e]:!1}function os(){return C1}var E1=x({},ar,{key:function(e){if(e.key){var n=w1[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=pa(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?j1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:os,charCode:function(e){return e.type==="keypress"?pa(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?pa(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_1=Bt(E1),T1=x({},xa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fd=Bt(T1),A1=x({},ar,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:os}),z1=Bt(A1),D1=x({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),R1=Bt(D1),M1=x({},xa,{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}),O1=Bt(M1),L1=x({},Ul,{newState:0,oldState:0}),U1=Bt(L1),q1=[9,13,27,32],cs=In&&"CompositionEvent"in window,sr=null;In&&"documentMode"in document&&(sr=document.documentMode);var B1=In&&"TextEvent"in window&&!sr,dd=In&&(!cs||sr&&8<sr&&11>=sr),hd=" ",pd=!1;function md(e,n){switch(e){case"keyup":return q1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yi=!1;function H1(e,n){switch(e){case"compositionend":return gd(n);case"keypress":return n.which!==32?null:(pd=!0,hd);case"textInput":return e=n.data,e===hd&&pd?null:e;default:return null}}function I1(e,n){if(yi)return e==="compositionend"||!cs&&md(e,n)?(e=ud(),ha=rs=sl=null,yi=!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 dd&&n.locale!=="ko"?null:n.data;default:return null}}var Y1={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 xd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Y1[e.type]:n==="textarea"}function yd(e,n,l,a){gi?xi?xi.push(a):xi=[a]:gi=a,n=au(n,"onChange"),0<n.length&&(l=new ga("onChange","change",null,l,a),e.push({event:l,listeners:n}))}var or=null,cr=null;function G1(e){em(e,0)}function ya(e){var n=lr(e);if(Wf(n))return e}function bd(e,n){if(e==="change")return n}var vd=!1;if(In){var fs;if(In){var ds="oninput"in document;if(!ds){var Sd=document.createElement("div");Sd.setAttribute("oninput","return;"),ds=typeof Sd.oninput=="function"}fs=ds}else fs=!1;vd=fs&&(!document.documentMode||9<document.documentMode)}function kd(){or&&(or.detachEvent("onpropertychange",wd),cr=or=null)}function wd(e){if(e.propertyName==="value"&&ya(cr)){var n=[];yd(n,cr,e,ns(e)),ad(G1,n)}}function V1(e,n,l){e==="focusin"?(kd(),or=n,cr=l,or.attachEvent("onpropertychange",wd)):e==="focusout"&&kd()}function F1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ya(cr)}function X1(e,n){if(e==="click")return ya(n)}function $1(e,n){if(e==="input"||e==="change")return ya(n)}function Q1(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var $t=typeof Object.is=="function"?Object.is:Q1;function fr(e,n){if($t(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),a=Object.keys(n);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!ln.call(n,s)||!$t(e[s],n[s]))return!1}return!0}function jd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nd(e,n){var l=jd(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=n&&a>=n)return{node:l,offset:n-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=jd(l)}}function Cd(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Cd(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Ed(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=fa(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=fa(e.document)}return n}function hs(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 Z1=In&&"documentMode"in document&&11>=document.documentMode,bi=null,ps=null,dr=null,ms=!1;function _d(e,n,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ms||bi==null||bi!==fa(a)||(a=bi,"selectionStart"in a&&hs(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),dr&&fr(dr,a)||(dr=a,a=au(ps,"onSelect"),0<a.length&&(n=new ga("onSelect","select",null,n,l),e.push({event:n,listeners:a}),n.target=bi)))}function ql(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var vi={animationend:ql("Animation","AnimationEnd"),animationiteration:ql("Animation","AnimationIteration"),animationstart:ql("Animation","AnimationStart"),transitionrun:ql("Transition","TransitionRun"),transitionstart:ql("Transition","TransitionStart"),transitioncancel:ql("Transition","TransitionCancel"),transitionend:ql("Transition","TransitionEnd")},gs={},Td={};In&&(Td=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);function Bl(e){if(gs[e])return gs[e];if(!vi[e])return e;var n=vi[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in Td)return gs[e]=n[l];return e}var Ad=Bl("animationend"),zd=Bl("animationiteration"),Dd=Bl("animationstart"),K1=Bl("transitionrun"),J1=Bl("transitionstart"),P1=Bl("transitioncancel"),Rd=Bl("transitionend"),Md=new Map,xs="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(" ");xs.push("scrollEnd");function bn(e,n){Md.set(e,n),Ll(n,[e])}var ba=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)},on=[],Si=0,ys=0;function va(){for(var e=Si,n=ys=Si=0;n<e;){var l=on[n];on[n++]=null;var a=on[n];on[n++]=null;var s=on[n];on[n++]=null;var h=on[n];if(on[n++]=null,a!==null&&s!==null){var b=a.pending;b===null?s.next=s:(s.next=b.next,b.next=s),a.pending=s}h!==0&&Od(l,s,h)}}function Sa(e,n,l,a){on[Si++]=e,on[Si++]=n,on[Si++]=l,on[Si++]=a,ys|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function bs(e,n,l,a){return Sa(e,n,l,a),ka(e)}function Hl(e,n){return Sa(e,null,null,n),ka(e)}function Od(e,n,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,h=e.return;h!==null;)h.childLanes|=l,a=h.alternate,a!==null&&(a.childLanes|=l),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(s=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,s&&n!==null&&(s=31-Xe(l),e=h.hiddenUpdates,a=e[s],a===null?e[s]=[n]:a.push(n),n.lane=l|536870912),h):null}function ka(e){if(50<Mr)throw Mr=0,To=null,Error(u(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ki={};function W1(e,n,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(e,n,l,a){return new W1(e,n,l,a)}function vs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yn(e,n){var l=e.alternate;return l===null?(l=Qt(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Ld(e,n){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function wa(e,n,l,a,s,h){var b=0;if(a=e,typeof e=="function")vs(e)&&(b=1);else if(typeof e=="string")b=i0(e,l,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=Qt(31,l,n,s),e.elementType=W,e.lanes=h,e;case T:return Il(l.children,s,h,n);case L:b=8,s|=24;break;case C:return e=Qt(12,l,n,s|2),e.elementType=C,e.lanes=h,e;case ie:return e=Qt(13,l,n,s),e.elementType=ie,e.lanes=h,e;case R:return e=Qt(19,l,n,s),e.elementType=R,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U:b=10;break e;case F:b=9;break e;case X:b=11;break e;case I:b=14;break e;case ue:b=16,a=null;break e}b=29,l=Error(u(130,e===null?"null":typeof e,"")),a=null}return n=Qt(b,l,n,s),n.elementType=e,n.type=a,n.lanes=h,n}function Il(e,n,l,a){return e=Qt(7,e,a,n),e.lanes=l,e}function Ss(e,n,l){return e=Qt(6,e,null,n),e.lanes=l,e}function Ud(e){var n=Qt(18,null,null,0);return n.stateNode=e,n}function ks(e,n,l){return n=Qt(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var qd=new WeakMap;function cn(e,n){if(typeof e=="object"&&e!==null){var l=qd.get(e);return l!==void 0?l:(n={value:e,source:n,stack:al(n)},qd.set(e,n),n)}return{value:e,source:n,stack:al(n)}}var wi=[],ji=0,ja=null,hr=0,fn=[],dn=0,ol=null,An=1,zn="";function Gn(e,n){wi[ji++]=hr,wi[ji++]=ja,ja=e,hr=n}function Bd(e,n,l){fn[dn++]=An,fn[dn++]=zn,fn[dn++]=ol,ol=e;var a=An;e=zn;var s=32-Xe(a)-1;a&=~(1<<s),l+=1;var h=32-Xe(n)+s;if(30<h){var b=s-s%5;h=(a&(1<<b)-1).toString(32),a>>=b,s-=b,An=1<<32-Xe(n)+s|l<<s|a,zn=h+e}else An=1<<h|l<<s|a,zn=e}function ws(e){e.return!==null&&(Gn(e,1),Bd(e,1,0))}function js(e){for(;e===ja;)ja=wi[--ji],wi[ji]=null,hr=wi[--ji],wi[ji]=null;for(;e===ol;)ol=fn[--dn],fn[dn]=null,zn=fn[--dn],fn[dn]=null,An=fn[--dn],fn[dn]=null}function Hd(e,n){fn[dn++]=An,fn[dn++]=zn,fn[dn++]=ol,An=n.id,zn=n.overflow,ol=e}var Ct=null,nt=null,Ue=!1,cl=null,hn=!1,Ns=Error(u(519));function fl(e){var n=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pr(cn(n,e)),Ns}function Id(e){var n=e.stateNode,l=e.type,a=e.memoizedProps;switch(n[Nt]=e,n[qt]=a,l){case"dialog":De("cancel",n),De("close",n);break;case"iframe":case"object":case"embed":De("load",n);break;case"video":case"audio":for(l=0;l<Lr.length;l++)De(Lr[l],n);break;case"source":De("error",n);break;case"img":case"image":case"link":De("error",n),De("load",n);break;case"details":De("toggle",n);break;case"input":De("invalid",n),ed(n,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":De("invalid",n);break;case"textarea":De("invalid",n),nd(n,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||a.suppressHydrationWarning===!0||im(n.textContent,l)?(a.popover!=null&&(De("beforetoggle",n),De("toggle",n)),a.onScroll!=null&&De("scroll",n),a.onScrollEnd!=null&&De("scrollend",n),a.onClick!=null&&(n.onclick=Hn),n=!0):n=!1,n||fl(e,!0)}function Yd(e){for(Ct=e.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:Ct=Ct.return}}function Ni(e){if(e!==Ct)return!1;if(!Ue)return Yd(e),Ue=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Vo(e.type,e.memoizedProps)),l=!l),l&&nt&&fl(e),Yd(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));nt=hm(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));nt=hm(e)}else n===27?(n=nt,Nl(e.type)?(e=Zo,Zo=null,nt=e):nt=n):nt=Ct?mn(e.stateNode.nextSibling):null;return!0}function Yl(){nt=Ct=null,Ue=!1}function Cs(){var e=cl;return e!==null&&(Gt===null?Gt=e:Gt.push.apply(Gt,e),cl=null),e}function pr(e){cl===null?cl=[e]:cl.push(e)}var Es=E(null),Gl=null,Vn=null;function dl(e,n,l){w(Es,n._currentValue),n._currentValue=l}function Fn(e){e._currentValue=Es.current,H(Es)}function _s(e,n,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),e===l)break;e=e.return}}function Ts(e,n,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var h=s.dependencies;if(h!==null){var b=s.child;h=h.firstContext;e:for(;h!==null;){var k=h;h=s;for(var A=0;A<n.length;A++)if(k.context===n[A]){h.lanes|=l,k=h.alternate,k!==null&&(k.lanes|=l),_s(h.return,l,e),a||(b=null);break e}h=k.next}}else if(s.tag===18){if(b=s.return,b===null)throw Error(u(341));b.lanes|=l,h=b.alternate,h!==null&&(h.lanes|=l),_s(b,l,e),b=null}else b=s.child;if(b!==null)b.return=s;else for(b=s;b!==null;){if(b===e){b=null;break}if(s=b.sibling,s!==null){s.return=b.return,b=s;break}b=b.return}s=b}}function Ci(e,n,l,a){e=null;for(var s=n,h=!1;s!==null;){if(!h){if((s.flags&524288)!==0)h=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var b=s.alternate;if(b===null)throw Error(u(387));if(b=b.memoizedProps,b!==null){var k=s.type;$t(s.pendingProps.value,b.value)||(e!==null?e.push(k):e=[k])}}else if(s===we.current){if(b=s.alternate,b===null)throw Error(u(387));b.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Ir):e=[Ir])}s=s.return}e!==null&&Ts(n,e,l,a),n.flags|=262144}function Na(e){for(e=e.firstContext;e!==null;){if(!$t(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Vl(e){Gl=e,Vn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Et(e){return Gd(Gl,e)}function Ca(e,n){return Gl===null&&Vl(e),Gd(e,n)}function Gd(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},Vn===null){if(e===null)throw Error(u(308));Vn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Vn=Vn.next=n;return l}var eb=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},tb=t.unstable_scheduleCallback,nb=t.unstable_NormalPriority,dt={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function As(){return{controller:new eb,data:new Map,refCount:0}}function mr(e){e.refCount--,e.refCount===0&&tb(nb,function(){e.controller.abort()})}var gr=null,zs=0,Ei=0,_i=null;function lb(e,n){if(gr===null){var l=gr=[];zs=0,Ei=Oo(),_i={status:"pending",value:void 0,then:function(a){l.push(a)}}}return zs++,n.then(Vd,Vd),n}function Vd(){if(--zs===0&&gr!==null){_i!==null&&(_i.status="fulfilled");var e=gr;gr=null,Ei=0,_i=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function ib(e,n){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=n;for(var s=0;s<l.length;s++)(0,l[s])(n)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var Fd=D.S;D.S=function(e,n){_p=Le(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&lb(e,n),Fd!==null&&Fd(e,n)};var Fl=E(null);function Ds(){var e=Fl.current;return e!==null?e:We.pooledCache}function Ea(e,n){n===null?w(Fl,Fl.current):w(Fl,n.pool)}function Xd(){var e=Ds();return e===null?null:{parent:dt._currentValue,pool:e}}var Ti=Error(u(460)),Rs=Error(u(474)),_a=Error(u(542)),Ta={then:function(){}};function $d(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Qd(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(Hn,Hn),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Kd(e),e;default:if(typeof n.status=="string")n.then(Hn,Hn);else{if(e=We,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=n,e.status="pending",e.then(function(a){if(n.status==="pending"){var s=n;s.status="fulfilled",s.value=a}},function(a){if(n.status==="pending"){var s=n;s.status="rejected",s.reason=a}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Kd(e),e}throw $l=n,Ti}}function Xl(e){try{var n=e._init;return n(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?($l=l,Ti):l}}var $l=null;function Zd(){if($l===null)throw Error(u(459));var e=$l;return $l=null,e}function Kd(e){if(e===Ti||e===_a)throw Error(u(483))}var Ai=null,xr=0;function Aa(e){var n=xr;return xr+=1,Ai===null&&(Ai=[]),Qd(Ai,e,n)}function yr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function za(e,n){throw n.$$typeof===S?Error(u(525)):(e=Object.prototype.toString.call(n),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Jd(e){function n(M,z){if(e){var q=M.deletions;q===null?(M.deletions=[z],M.flags|=16):q.push(z)}}function l(M,z){if(!e)return null;for(;z!==null;)n(M,z),z=z.sibling;return null}function a(M){for(var z=new Map;M!==null;)M.key!==null?z.set(M.key,M):z.set(M.index,M),M=M.sibling;return z}function s(M,z){return M=Yn(M,z),M.index=0,M.sibling=null,M}function h(M,z,q){return M.index=q,e?(q=M.alternate,q!==null?(q=q.index,q<z?(M.flags|=67108866,z):q):(M.flags|=67108866,z)):(M.flags|=1048576,z)}function b(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function k(M,z,q,Z){return z===null||z.tag!==6?(z=Ss(q,M.mode,Z),z.return=M,z):(z=s(z,q),z.return=M,z)}function A(M,z,q,Z){var ye=q.type;return ye===T?$(M,z,q.props.children,Z,q.key):z!==null&&(z.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===ue&&Xl(ye)===z.type)?(z=s(z,q.props),yr(z,q),z.return=M,z):(z=wa(q.type,q.key,q.props,null,M.mode,Z),yr(z,q),z.return=M,z)}function B(M,z,q,Z){return z===null||z.tag!==4||z.stateNode.containerInfo!==q.containerInfo||z.stateNode.implementation!==q.implementation?(z=ks(q,M.mode,Z),z.return=M,z):(z=s(z,q.children||[]),z.return=M,z)}function $(M,z,q,Z,ye){return z===null||z.tag!==7?(z=Il(q,M.mode,Z,ye),z.return=M,z):(z=s(z,q),z.return=M,z)}function K(M,z,q){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=Ss(""+z,M.mode,q),z.return=M,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case v:return q=wa(z.type,z.key,z.props,null,M.mode,q),yr(q,z),q.return=M,q;case N:return z=ks(z,M.mode,q),z.return=M,z;case ue:return z=Xl(z),K(M,z,q)}if(P(z)||re(z))return z=Il(z,M.mode,q,null),z.return=M,z;if(typeof z.then=="function")return K(M,Aa(z),q);if(z.$$typeof===U)return K(M,Ca(M,z),q);za(M,z)}return null}function Y(M,z,q,Z){var ye=z!==null?z.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return ye!==null?null:k(M,z,""+q,Z);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case v:return q.key===ye?A(M,z,q,Z):null;case N:return q.key===ye?B(M,z,q,Z):null;case ue:return q=Xl(q),Y(M,z,q,Z)}if(P(q)||re(q))return ye!==null?null:$(M,z,q,Z,null);if(typeof q.then=="function")return Y(M,z,Aa(q),Z);if(q.$$typeof===U)return Y(M,z,Ca(M,q),Z);za(M,q)}return null}function G(M,z,q,Z,ye){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return M=M.get(q)||null,k(z,M,""+Z,ye);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:return M=M.get(Z.key===null?q:Z.key)||null,A(z,M,Z,ye);case N:return M=M.get(Z.key===null?q:Z.key)||null,B(z,M,Z,ye);case ue:return Z=Xl(Z),G(M,z,q,Z,ye)}if(P(Z)||re(Z))return M=M.get(q)||null,$(z,M,Z,ye,null);if(typeof Z.then=="function")return G(M,z,q,Aa(Z),ye);if(Z.$$typeof===U)return G(M,z,q,Ca(z,Z),ye);za(z,Z)}return null}function de(M,z,q,Z){for(var ye=null,Ge=null,pe=z,Te=z=0,Oe=null;pe!==null&&Te<q.length;Te++){pe.index>Te?(Oe=pe,pe=null):Oe=pe.sibling;var Ve=Y(M,pe,q[Te],Z);if(Ve===null){pe===null&&(pe=Oe);break}e&&pe&&Ve.alternate===null&&n(M,pe),z=h(Ve,z,Te),Ge===null?ye=Ve:Ge.sibling=Ve,Ge=Ve,pe=Oe}if(Te===q.length)return l(M,pe),Ue&&Gn(M,Te),ye;if(pe===null){for(;Te<q.length;Te++)pe=K(M,q[Te],Z),pe!==null&&(z=h(pe,z,Te),Ge===null?ye=pe:Ge.sibling=pe,Ge=pe);return Ue&&Gn(M,Te),ye}for(pe=a(pe);Te<q.length;Te++)Oe=G(pe,M,Te,q[Te],Z),Oe!==null&&(e&&Oe.alternate!==null&&pe.delete(Oe.key===null?Te:Oe.key),z=h(Oe,z,Te),Ge===null?ye=Oe:Ge.sibling=Oe,Ge=Oe);return e&&pe.forEach(function(Al){return n(M,Al)}),Ue&&Gn(M,Te),ye}function Se(M,z,q,Z){if(q==null)throw Error(u(151));for(var ye=null,Ge=null,pe=z,Te=z=0,Oe=null,Ve=q.next();pe!==null&&!Ve.done;Te++,Ve=q.next()){pe.index>Te?(Oe=pe,pe=null):Oe=pe.sibling;var Al=Y(M,pe,Ve.value,Z);if(Al===null){pe===null&&(pe=Oe);break}e&&pe&&Al.alternate===null&&n(M,pe),z=h(Al,z,Te),Ge===null?ye=Al:Ge.sibling=Al,Ge=Al,pe=Oe}if(Ve.done)return l(M,pe),Ue&&Gn(M,Te),ye;if(pe===null){for(;!Ve.done;Te++,Ve=q.next())Ve=K(M,Ve.value,Z),Ve!==null&&(z=h(Ve,z,Te),Ge===null?ye=Ve:Ge.sibling=Ve,Ge=Ve);return Ue&&Gn(M,Te),ye}for(pe=a(pe);!Ve.done;Te++,Ve=q.next())Ve=G(pe,M,Te,Ve.value,Z),Ve!==null&&(e&&Ve.alternate!==null&&pe.delete(Ve.key===null?Te:Ve.key),z=h(Ve,z,Te),Ge===null?ye=Ve:Ge.sibling=Ve,Ge=Ve);return e&&pe.forEach(function(m0){return n(M,m0)}),Ue&&Gn(M,Te),ye}function Je(M,z,q,Z){if(typeof q=="object"&&q!==null&&q.type===T&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case v:e:{for(var ye=q.key;z!==null;){if(z.key===ye){if(ye=q.type,ye===T){if(z.tag===7){l(M,z.sibling),Z=s(z,q.props.children),Z.return=M,M=Z;break e}}else if(z.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===ue&&Xl(ye)===z.type){l(M,z.sibling),Z=s(z,q.props),yr(Z,q),Z.return=M,M=Z;break e}l(M,z);break}else n(M,z);z=z.sibling}q.type===T?(Z=Il(q.props.children,M.mode,Z,q.key),Z.return=M,M=Z):(Z=wa(q.type,q.key,q.props,null,M.mode,Z),yr(Z,q),Z.return=M,M=Z)}return b(M);case N:e:{for(ye=q.key;z!==null;){if(z.key===ye)if(z.tag===4&&z.stateNode.containerInfo===q.containerInfo&&z.stateNode.implementation===q.implementation){l(M,z.sibling),Z=s(z,q.children||[]),Z.return=M,M=Z;break e}else{l(M,z);break}else n(M,z);z=z.sibling}Z=ks(q,M.mode,Z),Z.return=M,M=Z}return b(M);case ue:return q=Xl(q),Je(M,z,q,Z)}if(P(q))return de(M,z,q,Z);if(re(q)){if(ye=re(q),typeof ye!="function")throw Error(u(150));return q=ye.call(q),Se(M,z,q,Z)}if(typeof q.then=="function")return Je(M,z,Aa(q),Z);if(q.$$typeof===U)return Je(M,z,Ca(M,q),Z);za(M,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,z!==null&&z.tag===6?(l(M,z.sibling),Z=s(z,q),Z.return=M,M=Z):(l(M,z),Z=Ss(q,M.mode,Z),Z.return=M,M=Z),b(M)):l(M,z)}return function(M,z,q,Z){try{xr=0;var ye=Je(M,z,q,Z);return Ai=null,ye}catch(pe){if(pe===Ti||pe===_a)throw pe;var Ge=Qt(29,pe,null,M.mode);return Ge.lanes=Z,Ge.return=M,Ge}}}var Ql=Jd(!0),Pd=Jd(!1),hl=!1;function Ms(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Os(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 pl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ml(e,n,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Fe&2)!==0){var s=a.pending;return s===null?n.next=n:(n.next=s.next,s.next=n),a.pending=n,n=ka(e),Od(e,null,l),n}return Sa(e,a,n,l),ka(e)}function br(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var a=n.lanes;a&=e.pendingLanes,l|=a,n.lanes=l,Gf(e,l)}}function Ls(e,n){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,h=null;if(l=l.firstBaseUpdate,l!==null){do{var b={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};h===null?s=h=b:h=h.next=b,l=l.next}while(l!==null);h===null?s=h=n:h=h.next=n}else s=h=n;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:h,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var Us=!1;function vr(){if(Us){var e=_i;if(e!==null)throw e}}function Sr(e,n,l,a){Us=!1;var s=e.updateQueue;hl=!1;var h=s.firstBaseUpdate,b=s.lastBaseUpdate,k=s.shared.pending;if(k!==null){s.shared.pending=null;var A=k,B=A.next;A.next=null,b===null?h=B:b.next=B,b=A;var $=e.alternate;$!==null&&($=$.updateQueue,k=$.lastBaseUpdate,k!==b&&(k===null?$.firstBaseUpdate=B:k.next=B,$.lastBaseUpdate=A))}if(h!==null){var K=s.baseState;b=0,$=B=A=null,k=h;do{var Y=k.lane&-536870913,G=Y!==k.lane;if(G?(Me&Y)===Y:(a&Y)===Y){Y!==0&&Y===Ei&&(Us=!0),$!==null&&($=$.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var de=e,Se=k;Y=n;var Je=l;switch(Se.tag){case 1:if(de=Se.payload,typeof de=="function"){K=de.call(Je,K,Y);break e}K=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=Se.payload,Y=typeof de=="function"?de.call(Je,K,Y):de,Y==null)break e;K=x({},K,Y);break e;case 2:hl=!0}}Y=k.callback,Y!==null&&(e.flags|=64,G&&(e.flags|=8192),G=s.callbacks,G===null?s.callbacks=[Y]:G.push(Y))}else G={lane:Y,tag:k.tag,payload:k.payload,callback:k.callback,next:null},$===null?(B=$=G,A=K):$=$.next=G,b|=Y;if(k=k.next,k===null){if(k=s.shared.pending,k===null)break;G=k,k=G.next,G.next=null,s.lastBaseUpdate=G,s.shared.pending=null}}while(!0);$===null&&(A=K),s.baseState=A,s.firstBaseUpdate=B,s.lastBaseUpdate=$,h===null&&(s.shared.lanes=0),vl|=b,e.lanes=b,e.memoizedState=K}}function Wd(e,n){if(typeof e!="function")throw Error(u(191,e));e.call(n)}function eh(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Wd(l[e],n)}var zi=E(null),Da=E(0);function th(e,n){e=el,w(Da,e),w(zi,n),el=e|n.baseLanes}function qs(){w(Da,el),w(zi,zi.current)}function Bs(){el=Da.current,H(zi),H(Da)}var Zt=E(null),pn=null;function gl(e){var n=e.alternate;w(ot,ot.current&1),w(Zt,e),pn===null&&(n===null||zi.current!==null||n.memoizedState!==null)&&(pn=e)}function Hs(e){w(ot,ot.current),w(Zt,e),pn===null&&(pn=e)}function nh(e){e.tag===22?(w(ot,ot.current),w(Zt,e),pn===null&&(pn=e)):xl()}function xl(){w(ot,ot.current),w(Zt,Zt.current)}function Kt(e){H(Zt),pn===e&&(pn=null),H(ot)}var ot=E(0);function Ra(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||$o(l)||Qo(l)))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 Xn=0,_e=null,Ze=null,ht=null,Ma=!1,Di=!1,Zl=!1,Oa=0,kr=0,Ri=null,rb=0;function ut(){throw Error(u(321))}function Is(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!$t(e[l],n[l]))return!1;return!0}function Ys(e,n,l,a,s,h){return Xn=h,_e=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,D.H=e===null||e.memoizedState===null?Bh:lo,Zl=!1,h=l(a,s),Zl=!1,Di&&(h=ih(n,l,a,s)),lh(e),h}function lh(e){D.H=Nr;var n=Ze!==null&&Ze.next!==null;if(Xn=0,ht=Ze=_e=null,Ma=!1,kr=0,Ri=null,n)throw Error(u(300));e===null||pt||(e=e.dependencies,e!==null&&Na(e)&&(pt=!0))}function ih(e,n,l,a){_e=e;var s=0;do{if(Di&&(Ri=null),kr=0,Di=!1,25<=s)throw Error(u(301));if(s+=1,ht=Ze=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}D.H=Hh,h=n(l,a)}while(Di);return h}function ab(){var e=D.H,n=e.useState()[0];return n=typeof n.then=="function"?wr(n):n,e=e.useState()[0],(Ze!==null?Ze.memoizedState:null)!==e&&(_e.flags|=1024),n}function Gs(){var e=Oa!==0;return Oa=0,e}function Vs(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function Fs(e){if(Ma){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Ma=!1}Xn=0,ht=Ze=_e=null,Di=!1,kr=Oa=0,Ri=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?_e.memoizedState=ht=e:ht=ht.next=e,ht}function ct(){if(Ze===null){var e=_e.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var n=ht===null?_e.memoizedState:ht.next;if(n!==null)ht=n,Ze=e;else{if(e===null)throw _e.alternate===null?Error(u(467)):Error(u(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},ht===null?_e.memoizedState=ht=e:ht=ht.next=e}return ht}function La(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wr(e){var n=kr;return kr+=1,Ri===null&&(Ri=[]),e=Qd(Ri,e,n),n=_e,(ht===null?n.memoizedState:ht.next)===null&&(n=n.alternate,D.H=n===null||n.memoizedState===null?Bh:lo),e}function Ua(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return wr(e);if(e.$$typeof===U)return Et(e)}throw Error(u(438,String(e)))}function Xs(e){var n=null,l=_e.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var a=_e.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(n={data:a.data.map(function(s){return s.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=La(),_e.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),a=0;a<e;a++)l[a]=O;return n.index++,l}function $n(e,n){return typeof n=="function"?n(e):n}function qa(e){var n=ct();return $s(n,Ze,e)}function $s(e,n,l){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=l;var s=e.baseQueue,h=a.pending;if(h!==null){if(s!==null){var b=s.next;s.next=h.next,h.next=b}n.baseQueue=s=h,a.pending=null}if(h=e.baseState,s===null)e.memoizedState=h;else{n=s.next;var k=b=null,A=null,B=n,$=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Me&K)===K:(Xn&K)===K){var Y=B.revertLane;if(Y===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===Ei&&($=!0);else if((Xn&Y)===Y){B=B.next,Y===Ei&&($=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},A===null?(k=A=K,b=h):A=A.next=K,_e.lanes|=Y,vl|=Y;K=B.action,Zl&&l(h,K),h=B.hasEagerState?B.eagerState:l(h,K)}else Y={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},A===null?(k=A=Y,b=h):A=A.next=Y,_e.lanes|=K,vl|=K;B=B.next}while(B!==null&&B!==n);if(A===null?b=h:A.next=k,!$t(h,e.memoizedState)&&(pt=!0,$&&(l=_i,l!==null)))throw l;e.memoizedState=h,e.baseState=b,e.baseQueue=A,a.lastRenderedState=h}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Qs(e){var n=ct(),l=n.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,h=n.memoizedState;if(s!==null){l.pending=null;var b=s=s.next;do h=e(h,b.action),b=b.next;while(b!==s);$t(h,n.memoizedState)||(pt=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),l.lastRenderedState=h}return[h,a]}function rh(e,n,l){var a=_e,s=ct(),h=Ue;if(h){if(l===void 0)throw Error(u(407));l=l()}else l=n();var b=!$t((Ze||s).memoizedState,l);if(b&&(s.memoizedState=l,pt=!0),s=s.queue,Js(sh.bind(null,a,s,e),[e]),s.getSnapshot!==n||b||ht!==null&&ht.memoizedState.tag&1){if(a.flags|=2048,Mi(9,{destroy:void 0},uh.bind(null,a,s,l,n),null),We===null)throw Error(u(349));h||(Xn&127)!==0||ah(a,n,l)}return l}function ah(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=_e.updateQueue,n===null?(n=La(),_e.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function uh(e,n,l,a){n.value=l,n.getSnapshot=a,oh(n)&&ch(e)}function sh(e,n,l){return l(function(){oh(n)&&ch(e)})}function oh(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!$t(e,l)}catch{return!0}}function ch(e){var n=Hl(e,2);n!==null&&Vt(n,e,2)}function Zs(e){var n=Lt();if(typeof e=="function"){var l=e;if(e=l(),Zl){vt(!0);try{l()}finally{vt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:e},n}function fh(e,n,l,a){return e.baseState=l,$s(e,Ze,typeof a=="function"?a:$n)}function ub(e,n,l,a,s){if(Ia(e))throw Error(u(485));if(e=n.action,e!==null){var h={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){h.listeners.push(b)}};D.T!==null?l(!0):h.isTransition=!1,a(h),l=n.pending,l===null?(h.next=n.pending=h,dh(n,h)):(h.next=l.next,n.pending=l.next=h)}}function dh(e,n){var l=n.action,a=n.payload,s=e.state;if(n.isTransition){var h=D.T,b={};D.T=b;try{var k=l(s,a),A=D.S;A!==null&&A(b,k),hh(e,n,k)}catch(B){Ks(e,n,B)}finally{h!==null&&b.types!==null&&(h.types=b.types),D.T=h}}else try{h=l(s,a),hh(e,n,h)}catch(B){Ks(e,n,B)}}function hh(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){ph(e,n,a)},function(a){return Ks(e,n,a)}):ph(e,n,l)}function ph(e,n,l){n.status="fulfilled",n.value=l,mh(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,dh(e,l)))}function Ks(e,n,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do n.status="rejected",n.reason=l,mh(n),n=n.next;while(n!==a)}e.action=null}function mh(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function gh(e,n){return n}function xh(e,n){if(Ue){var l=We.formState;if(l!==null){e:{var a=_e;if(Ue){if(nt){t:{for(var s=nt,h=hn;s.nodeType!==8;){if(!h){s=null;break t}if(s=mn(s.nextSibling),s===null){s=null;break t}}h=s.data,s=h==="F!"||h==="F"?s:null}if(s){nt=mn(s.nextSibling),a=s.data==="F!";break e}}fl(a)}a=!1}a&&(n=l[0])}}return l=Lt(),l.memoizedState=l.baseState=n,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gh,lastRenderedState:n},l.queue=a,l=Lh.bind(null,_e,a),a.dispatch=l,a=Zs(!1),h=no.bind(null,_e,!1,a.queue),a=Lt(),s={state:n,dispatch:null,action:e,pending:null},a.queue=s,l=ub.bind(null,_e,s,h,l),s.dispatch=l,a.memoizedState=e,[n,l,!1]}function yh(e){var n=ct();return bh(n,Ze,e)}function bh(e,n,l){if(n=$s(e,n,gh)[0],e=qa($n)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var a=wr(n)}catch(b){throw b===Ti?_a:b}else a=n;n=ct();var s=n.queue,h=s.dispatch;return l!==n.memoizedState&&(_e.flags|=2048,Mi(9,{destroy:void 0},sb.bind(null,s,l),null)),[a,h,e]}function sb(e,n){e.action=n}function vh(e){var n=ct(),l=Ze;if(l!==null)return bh(n,l,e);ct(),n=n.memoizedState,l=ct();var a=l.queue.dispatch;return l.memoizedState=e,[n,a,!1]}function Mi(e,n,l,a){return e={tag:e,create:l,deps:a,inst:n,next:null},n=_e.updateQueue,n===null&&(n=La(),_e.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,n.lastEffect=e),e}function Sh(){return ct().memoizedState}function Ba(e,n,l,a){var s=Lt();_e.flags|=e,s.memoizedState=Mi(1|n,{destroy:void 0},l,a===void 0?null:a)}function Ha(e,n,l,a){var s=ct();a=a===void 0?null:a;var h=s.memoizedState.inst;Ze!==null&&a!==null&&Is(a,Ze.memoizedState.deps)?s.memoizedState=Mi(n,h,l,a):(_e.flags|=e,s.memoizedState=Mi(1|n,h,l,a))}function kh(e,n){Ba(8390656,8,e,n)}function Js(e,n){Ha(2048,8,e,n)}function ob(e){_e.flags|=4;var n=_e.updateQueue;if(n===null)n=La(),_e.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function wh(e){var n=ct().memoizedState;return ob({ref:n,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}function jh(e,n){return Ha(4,2,e,n)}function Nh(e,n){return Ha(4,4,e,n)}function Ch(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Eh(e,n,l){l=l!=null?l.concat([e]):null,Ha(4,4,Ch.bind(null,n,e),l)}function Ps(){}function _h(e,n){var l=ct();n=n===void 0?null:n;var a=l.memoizedState;return n!==null&&Is(n,a[1])?a[0]:(l.memoizedState=[e,n],e)}function Th(e,n){var l=ct();n=n===void 0?null:n;var a=l.memoizedState;if(n!==null&&Is(n,a[1]))return a[0];if(a=e(),Zl){vt(!0);try{e()}finally{vt(!1)}}return l.memoizedState=[a,n],a}function Ws(e,n,l){return l===void 0||(Xn&1073741824)!==0&&(Me&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=Ap(),_e.lanes|=e,vl|=e,l)}function Ah(e,n,l,a){return $t(l,n)?l:zi.current!==null?(e=Ws(e,l,a),$t(e,n)||(pt=!0),e):(Xn&42)===0||(Xn&1073741824)!==0&&(Me&261930)===0?(pt=!0,e.memoizedState=l):(e=Ap(),_e.lanes|=e,vl|=e,n)}function zh(e,n,l,a,s){var h=Q.p;Q.p=h!==0&&8>h?h:8;var b=D.T,k={};D.T=k,no(e,!1,n,l);try{var A=s(),B=D.S;if(B!==null&&B(k,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var $=ib(A,a);jr(e,n,$,Wt(e))}else jr(e,n,a,Wt(e))}catch(K){jr(e,n,{then:function(){},status:"rejected",reason:K},Wt())}finally{Q.p=h,b!==null&&k.types!==null&&(b.types=k.types),D.T=b}}function cb(){}function eo(e,n,l,a){if(e.tag!==5)throw Error(u(476));var s=Dh(e).queue;zh(e,s,n,se,l===null?cb:function(){return Rh(e),l(a)})}function Dh(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:se},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Rh(e){var n=Dh(e);n.next===null&&(n=e.alternate.memoizedState),jr(e,n.next.queue,{},Wt())}function to(){return Et(Ir)}function Mh(){return ct().memoizedState}function Oh(){return ct().memoizedState}function fb(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=Wt();e=pl(l);var a=ml(n,e,l);a!==null&&(Vt(a,n,l),br(a,n,l)),n={cache:As()},e.payload=n;return}n=n.return}}function db(e,n,l){var a=Wt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ia(e)?Uh(n,l):(l=bs(e,n,l,a),l!==null&&(Vt(l,e,a),qh(l,n,a)))}function Lh(e,n,l){var a=Wt();jr(e,n,l,a)}function jr(e,n,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ia(e))Uh(n,s);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var b=n.lastRenderedState,k=h(b,l);if(s.hasEagerState=!0,s.eagerState=k,$t(k,b))return Sa(e,n,s,0),We===null&&va(),!1}catch{}if(l=bs(e,n,s,a),l!==null)return Vt(l,e,a),qh(l,n,a),!0}return!1}function no(e,n,l,a){if(a={lane:2,revertLane:Oo(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ia(e)){if(n)throw Error(u(479))}else n=bs(e,l,a,2),n!==null&&Vt(n,e,2)}function Ia(e){var n=e.alternate;return e===_e||n!==null&&n===_e}function Uh(e,n){Di=Ma=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function qh(e,n,l){if((l&4194048)!==0){var a=n.lanes;a&=e.pendingLanes,l|=a,n.lanes=l,Gf(e,l)}}var Nr={readContext:Et,use:Ua,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};Nr.useEffectEvent=ut;var Bh={readContext:Et,use:Ua,useCallback:function(e,n){return Lt().memoizedState=[e,n===void 0?null:n],e},useContext:Et,useEffect:kh,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,Ba(4194308,4,Ch.bind(null,n,e),l)},useLayoutEffect:function(e,n){return Ba(4194308,4,e,n)},useInsertionEffect:function(e,n){Ba(4,2,e,n)},useMemo:function(e,n){var l=Lt();n=n===void 0?null:n;var a=e();if(Zl){vt(!0);try{e()}finally{vt(!1)}}return l.memoizedState=[a,n],a},useReducer:function(e,n,l){var a=Lt();if(l!==void 0){var s=l(n);if(Zl){vt(!0);try{l(n)}finally{vt(!1)}}}else s=n;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=db.bind(null,_e,e),[a.memoizedState,e]},useRef:function(e){var n=Lt();return e={current:e},n.memoizedState=e},useState:function(e){e=Zs(e);var n=e.queue,l=Lh.bind(null,_e,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:Ps,useDeferredValue:function(e,n){var l=Lt();return Ws(l,e,n)},useTransition:function(){var e=Zs(!1);return e=zh.bind(null,_e,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var a=_e,s=Lt();if(Ue){if(l===void 0)throw Error(u(407));l=l()}else{if(l=n(),We===null)throw Error(u(349));(Me&127)!==0||ah(a,n,l)}s.memoizedState=l;var h={value:l,getSnapshot:n};return s.queue=h,kh(sh.bind(null,a,h,e),[e]),a.flags|=2048,Mi(9,{destroy:void 0},uh.bind(null,a,h,l,n),null),l},useId:function(){var e=Lt(),n=We.identifierPrefix;if(Ue){var l=zn,a=An;l=(a&~(1<<32-Xe(a)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Oa++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=rb++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:to,useFormState:xh,useActionState:xh,useOptimistic:function(e){var n=Lt();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=no.bind(null,_e,!0,l),l.dispatch=n,[e,n]},useMemoCache:Xs,useCacheRefresh:function(){return Lt().memoizedState=fb.bind(null,_e)},useEffectEvent:function(e){var n=Lt(),l={impl:e};return n.memoizedState=l,function(){if((Fe&2)!==0)throw Error(u(440));return l.impl.apply(void 0,arguments)}}},lo={readContext:Et,use:Ua,useCallback:_h,useContext:Et,useEffect:Js,useImperativeHandle:Eh,useInsertionEffect:jh,useLayoutEffect:Nh,useMemo:Th,useReducer:qa,useRef:Sh,useState:function(){return qa($n)},useDebugValue:Ps,useDeferredValue:function(e,n){var l=ct();return Ah(l,Ze.memoizedState,e,n)},useTransition:function(){var e=qa($n)[0],n=ct().memoizedState;return[typeof e=="boolean"?e:wr(e),n]},useSyncExternalStore:rh,useId:Mh,useHostTransitionStatus:to,useFormState:yh,useActionState:yh,useOptimistic:function(e,n){var l=ct();return fh(l,Ze,e,n)},useMemoCache:Xs,useCacheRefresh:Oh};lo.useEffectEvent=wh;var Hh={readContext:Et,use:Ua,useCallback:_h,useContext:Et,useEffect:Js,useImperativeHandle:Eh,useInsertionEffect:jh,useLayoutEffect:Nh,useMemo:Th,useReducer:Qs,useRef:Sh,useState:function(){return Qs($n)},useDebugValue:Ps,useDeferredValue:function(e,n){var l=ct();return Ze===null?Ws(l,e,n):Ah(l,Ze.memoizedState,e,n)},useTransition:function(){var e=Qs($n)[0],n=ct().memoizedState;return[typeof e=="boolean"?e:wr(e),n]},useSyncExternalStore:rh,useId:Mh,useHostTransitionStatus:to,useFormState:vh,useActionState:vh,useOptimistic:function(e,n){var l=ct();return Ze!==null?fh(l,Ze,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Xs,useCacheRefresh:Oh};Hh.useEffectEvent=wh;function io(e,n,l,a){n=e.memoizedState,l=l(a,n),l=l==null?n:x({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var ro={enqueueSetState:function(e,n,l){e=e._reactInternals;var a=Wt(),s=pl(a);s.payload=n,l!=null&&(s.callback=l),n=ml(e,s,a),n!==null&&(Vt(n,e,a),br(n,e,a))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var a=Wt(),s=pl(a);s.tag=1,s.payload=n,l!=null&&(s.callback=l),n=ml(e,s,a),n!==null&&(Vt(n,e,a),br(n,e,a))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=Wt(),a=pl(l);a.tag=2,n!=null&&(a.callback=n),n=ml(e,a,l),n!==null&&(Vt(n,e,l),br(n,e,l))}};function Ih(e,n,l,a,s,h,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,h,b):n.prototype&&n.prototype.isPureReactComponent?!fr(l,a)||!fr(s,h):!0}function Yh(e,n,l,a){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,a),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,a),n.state!==e&&ro.enqueueReplaceState(n,n.state,null)}function Kl(e,n){var l=n;if("ref"in n){l={};for(var a in n)a!=="ref"&&(l[a]=n[a])}if(e=e.defaultProps){l===n&&(l=x({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function Gh(e){ba(e)}function Vh(e){console.error(e)}function Fh(e){ba(e)}function Ya(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(a){setTimeout(function(){throw a})}}function Xh(e,n,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function ao(e,n,l){return l=pl(l),l.tag=3,l.payload={element:null},l.callback=function(){Ya(e,n)},l}function $h(e){return e=pl(e),e.tag=3,e}function Qh(e,n,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var h=a.value;e.payload=function(){return s(h)},e.callback=function(){Xh(n,l,a)}}var b=l.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Xh(n,l,a),typeof s!="function"&&(Sl===null?Sl=new Set([this]):Sl.add(this));var k=a.stack;this.componentDidCatch(a.value,{componentStack:k!==null?k:""})})}function hb(e,n,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(n=l.alternate,n!==null&&Ci(n,l,s,!0),l=Zt.current,l!==null){switch(l.tag){case 31:case 13:return pn===null?eu():l.alternate===null&&st===0&&(st=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===Ta?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([a]):n.add(a),Do(e,a,s)),!1;case 22:return l.flags|=65536,a===Ta?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([a]):l.add(a)),Do(e,a,s)),!1}throw Error(u(435,l.tag))}return Do(e,a,s),eu(),!1}if(Ue)return n=Zt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=s,a!==Ns&&(e=Error(u(422),{cause:a}),pr(cn(e,l)))):(a!==Ns&&(n=Error(u(423),{cause:a}),pr(cn(n,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=cn(a,l),s=ao(e.stateNode,a,s),Ls(e,s),st!==4&&(st=2)),!1;var h=Error(u(520),{cause:a});if(h=cn(h,l),Rr===null?Rr=[h]:Rr.push(h),st!==4&&(st=2),n===null)return!0;a=cn(a,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=ao(l.stateNode,a,e),Ls(l,e),!1;case 1:if(n=l.type,h=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Sl===null||!Sl.has(h))))return l.flags|=65536,s&=-s,l.lanes|=s,s=$h(s),Qh(s,e,l,a),Ls(l,s),!1}l=l.return}while(l!==null);return!1}var uo=Error(u(461)),pt=!1;function _t(e,n,l,a){n.child=e===null?Pd(n,null,l,a):Ql(n,e.child,l,a)}function Zh(e,n,l,a,s){l=l.render;var h=n.ref;if("ref"in a){var b={};for(var k in a)k!=="ref"&&(b[k]=a[k])}else b=a;return Vl(n),a=Ys(e,n,l,b,h,s),k=Gs(),e!==null&&!pt?(Vs(e,n,s),Qn(e,n,s)):(Ue&&k&&ws(n),n.flags|=1,_t(e,n,a,s),n.child)}function Kh(e,n,l,a,s){if(e===null){var h=l.type;return typeof h=="function"&&!vs(h)&&h.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=h,Jh(e,n,h,a,s)):(e=wa(l.type,null,a,n,n.mode,s),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!go(e,s)){var b=h.memoizedProps;if(l=l.compare,l=l!==null?l:fr,l(b,a)&&e.ref===n.ref)return Qn(e,n,s)}return n.flags|=1,e=Yn(h,a),e.ref=n.ref,e.return=n,n.child=e}function Jh(e,n,l,a,s){if(e!==null){var h=e.memoizedProps;if(fr(h,a)&&e.ref===n.ref)if(pt=!1,n.pendingProps=a=h,go(e,s))(e.flags&131072)!==0&&(pt=!0);else return n.lanes=e.lanes,Qn(e,n,s)}return so(e,n,l,a,s)}function Ph(e,n,l,a){var s=a.children,h=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((n.flags&128)!==0){if(h=h!==null?h.baseLanes|l:l,e!==null){for(a=n.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~h}else a=0,n.child=null;return Wh(e,n,h,l,a)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ea(n,h!==null?h.cachePool:null),h!==null?th(n,h):qs(),nh(n);else return a=n.lanes=536870912,Wh(e,n,h!==null?h.baseLanes|l:l,l,a)}else h!==null?(Ea(n,h.cachePool),th(n,h),xl(),n.memoizedState=null):(e!==null&&Ea(n,null),qs(),xl());return _t(e,n,s,l),n.child}function Cr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Wh(e,n,l,a,s){var h=Ds();return h=h===null?null:{parent:dt._currentValue,pool:h},n.memoizedState={baseLanes:l,cachePool:h},e!==null&&Ea(n,null),qs(),nh(n),e!==null&&Ci(e,n,a,!0),n.childLanes=s,null}function Ga(e,n){return n=Fa({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function ep(e,n,l){return Ql(n,e.child,null,l),e=Ga(n,n.pendingProps),e.flags|=2,Kt(n),n.memoizedState=null,e}function pb(e,n,l){var a=n.pendingProps,s=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ue){if(a.mode==="hidden")return e=Ga(n,a),n.lanes=536870912,Cr(null,e);if(Hs(n),(e=nt)?(e=dm(e,hn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ol!==null?{id:An,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},l=Ud(e),l.return=n,n.child=l,Ct=n,nt=null)):e=null,e===null)throw fl(n);return n.lanes=536870912,null}return Ga(n,a)}var h=e.memoizedState;if(h!==null){var b=h.dehydrated;if(Hs(n),s)if(n.flags&256)n.flags&=-257,n=ep(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(u(558));else if(pt||Ci(e,n,l,!1),s=(l&e.childLanes)!==0,pt||s){if(a=We,a!==null&&(b=Vf(a,l),b!==0&&b!==h.retryLane))throw h.retryLane=b,Hl(e,b),Vt(a,e,b),uo;eu(),n=ep(e,n,l)}else e=h.treeContext,nt=mn(b.nextSibling),Ct=n,Ue=!0,cl=null,hn=!1,e!==null&&Hd(n,e),n=Ga(n,a),n.flags|=4096;return n}return e=Yn(e.child,{mode:a.mode,children:a.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Va(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(u(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function so(e,n,l,a,s){return Vl(n),l=Ys(e,n,l,a,void 0,s),a=Gs(),e!==null&&!pt?(Vs(e,n,s),Qn(e,n,s)):(Ue&&a&&ws(n),n.flags|=1,_t(e,n,l,s),n.child)}function tp(e,n,l,a,s,h){return Vl(n),n.updateQueue=null,l=ih(n,a,l,s),lh(e),a=Gs(),e!==null&&!pt?(Vs(e,n,h),Qn(e,n,h)):(Ue&&a&&ws(n),n.flags|=1,_t(e,n,l,h),n.child)}function np(e,n,l,a,s){if(Vl(n),n.stateNode===null){var h=ki,b=l.contextType;typeof b=="object"&&b!==null&&(h=Et(b)),h=new l(a,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=ro,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=a,h.state=n.memoizedState,h.refs={},Ms(n),b=l.contextType,h.context=typeof b=="object"&&b!==null?Et(b):ki,h.state=n.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(io(n,l,b,a),h.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(b=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),b!==h.state&&ro.enqueueReplaceState(h,h.state,null),Sr(n,a,h,s),vr(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),a=!0}else if(e===null){h=n.stateNode;var k=n.memoizedProps,A=Kl(l,k);h.props=A;var B=h.context,$=l.contextType;b=ki,typeof $=="object"&&$!==null&&(b=Et($));var K=l.getDerivedStateFromProps;$=typeof K=="function"||typeof h.getSnapshotBeforeUpdate=="function",k=n.pendingProps!==k,$||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(k||B!==b)&&Yh(n,h,a,b),hl=!1;var Y=n.memoizedState;h.state=Y,Sr(n,a,h,s),vr(),B=n.memoizedState,k||Y!==B||hl?(typeof K=="function"&&(io(n,l,K,a),B=n.memoizedState),(A=hl||Ih(n,l,A,a,Y,B,b))?($||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(n.flags|=4194308)):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=B),h.props=a,h.state=B,h.context=b,a=A):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{h=n.stateNode,Os(e,n),b=n.memoizedProps,$=Kl(l,b),h.props=$,K=n.pendingProps,Y=h.context,B=l.contextType,A=ki,typeof B=="object"&&B!==null&&(A=Et(B)),k=l.getDerivedStateFromProps,(B=typeof k=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(b!==K||Y!==A)&&Yh(n,h,a,A),hl=!1,Y=n.memoizedState,h.state=Y,Sr(n,a,h,s),vr();var G=n.memoizedState;b!==K||Y!==G||hl||e!==null&&e.dependencies!==null&&Na(e.dependencies)?(typeof k=="function"&&(io(n,l,k,a),G=n.memoizedState),($=hl||Ih(n,l,$,a,Y,G,A)||e!==null&&e.dependencies!==null&&Na(e.dependencies))?(B||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(a,G,A),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(a,G,A)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||b===e.memoizedProps&&Y===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&Y===e.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=G),h.props=a,h.state=G,h.context=A,a=$):(typeof h.componentDidUpdate!="function"||b===e.memoizedProps&&Y===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&Y===e.memoizedState||(n.flags|=1024),a=!1)}return h=a,Va(e,n),a=(n.flags&128)!==0,h||a?(h=n.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,e!==null&&a?(n.child=Ql(n,e.child,null,s),n.child=Ql(n,null,l,s)):_t(e,n,l,s),n.memoizedState=h.state,e=n.child):e=Qn(e,n,s),e}function lp(e,n,l,a){return Yl(),n.flags|=256,_t(e,n,l,a),n.child}var oo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function co(e){return{baseLanes:e,cachePool:Xd()}}function fo(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=Pt),e}function ip(e,n,l){var a=n.pendingProps,s=!1,h=(n.flags&128)!==0,b;if((b=h)||(b=e!==null&&e.memoizedState===null?!1:(ot.current&2)!==0),b&&(s=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ue){if(s?gl(n):xl(),(e=nt)?(e=dm(e,hn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ol!==null?{id:An,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},l=Ud(e),l.return=n,n.child=l,Ct=n,nt=null)):e=null,e===null)throw fl(n);return Qo(e)?n.lanes=32:n.lanes=536870912,null}var k=a.children;return a=a.fallback,s?(xl(),s=n.mode,k=Fa({mode:"hidden",children:k},s),a=Il(a,s,l,null),k.return=n,a.return=n,k.sibling=a,n.child=k,a=n.child,a.memoizedState=co(l),a.childLanes=fo(e,b,l),n.memoizedState=oo,Cr(null,a)):(gl(n),ho(n,k))}var A=e.memoizedState;if(A!==null&&(k=A.dehydrated,k!==null)){if(h)n.flags&256?(gl(n),n.flags&=-257,n=po(e,n,l)):n.memoizedState!==null?(xl(),n.child=e.child,n.flags|=128,n=null):(xl(),k=a.fallback,s=n.mode,a=Fa({mode:"visible",children:a.children},s),k=Il(k,s,l,null),k.flags|=2,a.return=n,k.return=n,a.sibling=k,n.child=a,Ql(n,e.child,null,l),a=n.child,a.memoizedState=co(l),a.childLanes=fo(e,b,l),n.memoizedState=oo,n=Cr(null,a));else if(gl(n),Qo(k)){if(b=k.nextSibling&&k.nextSibling.dataset,b)var B=b.dgst;b=B,a=Error(u(419)),a.stack="",a.digest=b,pr({value:a,source:null,stack:null}),n=po(e,n,l)}else if(pt||Ci(e,n,l,!1),b=(l&e.childLanes)!==0,pt||b){if(b=We,b!==null&&(a=Vf(b,l),a!==0&&a!==A.retryLane))throw A.retryLane=a,Hl(e,a),Vt(b,e,a),uo;$o(k)||eu(),n=po(e,n,l)}else $o(k)?(n.flags|=192,n.child=e.child,n=null):(e=A.treeContext,nt=mn(k.nextSibling),Ct=n,Ue=!0,cl=null,hn=!1,e!==null&&Hd(n,e),n=ho(n,a.children),n.flags|=4096);return n}return s?(xl(),k=a.fallback,s=n.mode,A=e.child,B=A.sibling,a=Yn(A,{mode:"hidden",children:a.children}),a.subtreeFlags=A.subtreeFlags&65011712,B!==null?k=Yn(B,k):(k=Il(k,s,l,null),k.flags|=2),k.return=n,a.return=n,a.sibling=k,n.child=a,Cr(null,a),a=n.child,k=e.child.memoizedState,k===null?k=co(l):(s=k.cachePool,s!==null?(A=dt._currentValue,s=s.parent!==A?{parent:A,pool:A}:s):s=Xd(),k={baseLanes:k.baseLanes|l,cachePool:s}),a.memoizedState=k,a.childLanes=fo(e,b,l),n.memoizedState=oo,Cr(e.child,a)):(gl(n),l=e.child,e=l.sibling,l=Yn(l,{mode:"visible",children:a.children}),l.return=n,l.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=l,n.memoizedState=null,l)}function ho(e,n){return n=Fa({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Fa(e,n){return e=Qt(22,e,null,n),e.lanes=0,e}function po(e,n,l){return Ql(n,e.child,null,l),e=ho(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function rp(e,n,l){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n),_s(e.return,n,l)}function mo(e,n,l,a,s,h){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:h}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=a,b.tail=l,b.tailMode=s,b.treeForkCount=h)}function ap(e,n,l){var a=n.pendingProps,s=a.revealOrder,h=a.tail;a=a.children;var b=ot.current,k=(b&2)!==0;if(k?(b=b&1|2,n.flags|=128):b&=1,w(ot,b),_t(e,n,a,l),a=Ue?hr:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rp(e,l,n);else if(e.tag===19)rp(e,l,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(s){case"forwards":for(l=n.child,s=null;l!==null;)e=l.alternate,e!==null&&Ra(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=n.child,n.child=null):(s=l.sibling,l.sibling=null),mo(n,!1,s,l,h,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=n.child,n.child=null;s!==null;){if(e=s.alternate,e!==null&&Ra(e)===null){n.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}mo(n,!0,l,null,h,a);break;case"together":mo(n,!1,null,null,void 0,a);break;default:n.memoizedState=null}return n.child}function Qn(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),vl|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(Ci(e,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(u(153));if(n.child!==null){for(e=n.child,l=Yn(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=Yn(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function go(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Na(e)))}function mb(e,n,l){switch(n.tag){case 3:Ye(n,n.stateNode.containerInfo),dl(n,dt,e.memoizedState.cache),Yl();break;case 27:case 5:xt(n);break;case 4:Ye(n,n.stateNode.containerInfo);break;case 10:dl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Hs(n),null;break;case 13:var a=n.memoizedState;if(a!==null)return a.dehydrated!==null?(gl(n),n.flags|=128,null):(l&n.child.childLanes)!==0?ip(e,n,l):(gl(n),e=Qn(e,n,l),e!==null?e.sibling:null);gl(n);break;case 19:var s=(e.flags&128)!==0;if(a=(l&n.childLanes)!==0,a||(Ci(e,n,l,!1),a=(l&n.childLanes)!==0),s){if(a)return ap(e,n,l);n.flags|=128}if(s=n.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),w(ot,ot.current),a)break;return null;case 22:return n.lanes=0,Ph(e,n,l,n.pendingProps);case 24:dl(n,dt,e.memoizedState.cache)}return Qn(e,n,l)}function up(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)pt=!0;else{if(!go(e,l)&&(n.flags&128)===0)return pt=!1,mb(e,n,l);pt=(e.flags&131072)!==0}else pt=!1,Ue&&(n.flags&1048576)!==0&&Bd(n,hr,n.index);switch(n.lanes=0,n.tag){case 16:e:{var a=n.pendingProps;if(e=Xl(n.elementType),n.type=e,typeof e=="function")vs(e)?(a=Kl(e,a),n.tag=1,n=np(null,n,e,a,l)):(n.tag=0,n=so(null,n,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===X){n.tag=11,n=Zh(null,n,e,a,l);break e}else if(s===I){n.tag=14,n=Kh(null,n,e,a,l);break e}}throw n=oe(e)||e,Error(u(306,n,""))}}return n;case 0:return so(e,n,n.type,n.pendingProps,l);case 1:return a=n.type,s=Kl(a,n.pendingProps),np(e,n,a,s,l);case 3:e:{if(Ye(n,n.stateNode.containerInfo),e===null)throw Error(u(387));a=n.pendingProps;var h=n.memoizedState;s=h.element,Os(e,n),Sr(n,a,null,l);var b=n.memoizedState;if(a=b.cache,dl(n,dt,a),a!==h.cache&&Ts(n,[dt],l,!0),vr(),a=b.element,h.isDehydrated)if(h={element:a,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){n=lp(e,n,a,l);break e}else if(a!==s){s=cn(Error(u(424)),n),pr(s),n=lp(e,n,a,l);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,nt=mn(e.firstChild),Ct=n,Ue=!0,cl=null,hn=!0,l=Pd(n,null,a,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Yl(),a===s){n=Qn(e,n,l);break e}_t(e,n,a,l)}n=n.child}return n;case 26:return Va(e,n),e===null?(l=ym(n.type,null,n.pendingProps,null))?n.memoizedState=l:Ue||(l=n.type,e=n.pendingProps,a=uu(he.current).createElement(l),a[Nt]=n,a[qt]=e,Tt(a,l,e),St(a),n.stateNode=a):n.memoizedState=ym(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return xt(n),e===null&&Ue&&(a=n.stateNode=mm(n.type,n.pendingProps,he.current),Ct=n,hn=!0,s=nt,Nl(n.type)?(Zo=s,nt=mn(a.firstChild)):nt=s),_t(e,n,n.pendingProps.children,l),Va(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ue&&((s=a=nt)&&(a=Fb(a,n.type,n.pendingProps,hn),a!==null?(n.stateNode=a,Ct=n,nt=mn(a.firstChild),hn=!1,s=!0):s=!1),s||fl(n)),xt(n),s=n.type,h=n.pendingProps,b=e!==null?e.memoizedProps:null,a=h.children,Vo(s,h)?a=null:b!==null&&Vo(s,b)&&(n.flags|=32),n.memoizedState!==null&&(s=Ys(e,n,ab,null,null,l),Ir._currentValue=s),Va(e,n),_t(e,n,a,l),n.child;case 6:return e===null&&Ue&&((e=l=nt)&&(l=Xb(l,n.pendingProps,hn),l!==null?(n.stateNode=l,Ct=n,nt=null,e=!0):e=!1),e||fl(n)),null;case 13:return ip(e,n,l);case 4:return Ye(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=Ql(n,null,a,l):_t(e,n,a,l),n.child;case 11:return Zh(e,n,n.type,n.pendingProps,l);case 7:return _t(e,n,n.pendingProps,l),n.child;case 8:return _t(e,n,n.pendingProps.children,l),n.child;case 12:return _t(e,n,n.pendingProps.children,l),n.child;case 10:return a=n.pendingProps,dl(n,n.type,a.value),_t(e,n,a.children,l),n.child;case 9:return s=n.type._context,a=n.pendingProps.children,Vl(n),s=Et(s),a=a(s),n.flags|=1,_t(e,n,a,l),n.child;case 14:return Kh(e,n,n.type,n.pendingProps,l);case 15:return Jh(e,n,n.type,n.pendingProps,l);case 19:return ap(e,n,l);case 31:return pb(e,n,l);case 22:return Ph(e,n,l,n.pendingProps);case 24:return Vl(n),a=Et(dt),e===null?(s=Ds(),s===null&&(s=We,h=As(),s.pooledCache=h,h.refCount++,h!==null&&(s.pooledCacheLanes|=l),s=h),n.memoizedState={parent:a,cache:s},Ms(n),dl(n,dt,s)):((e.lanes&l)!==0&&(Os(e,n),Sr(n,null,null,l),vr()),s=e.memoizedState,h=n.memoizedState,s.parent!==a?(s={parent:a,cache:a},n.memoizedState=s,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=s),dl(n,dt,a)):(a=h.cache,dl(n,dt,a),a!==s.cache&&Ts(n,[dt],l,!0))),_t(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(u(156,n.tag))}function Zn(e){e.flags|=4}function xo(e,n,l,a,s){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Mp())e.flags|=8192;else throw $l=Ta,Rs}else e.flags&=-16777217}function sp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wm(n))if(Mp())e.flags|=8192;else throw $l=Ta,Rs}function Xa(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?at():536870912,e.lanes|=n,qi|=n)}function Er(e,n){if(!Ue)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function lt(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(n)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,n}function gb(e,n,l){var a=n.pendingProps;switch(js(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(n),null;case 1:return lt(n),null;case 3:return l=n.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Fn(dt),be(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ni(n)?Zn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Cs())),lt(n),null;case 26:var s=n.type,h=n.memoizedState;return e===null?(Zn(n),h!==null?(lt(n),sp(n,h)):(lt(n),xo(n,s,null,a,l))):h?h!==e.memoizedState?(Zn(n),lt(n),sp(n,h)):(lt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==a&&Zn(n),lt(n),xo(n,s,e,a,l)),null;case 27:if(jt(n),l=he.current,s=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==a&&Zn(n);else{if(!a){if(n.stateNode===null)throw Error(u(166));return lt(n),null}e=ae.current,Ni(n)?Id(n):(e=mm(s,a,l),n.stateNode=e,Zn(n))}return lt(n),null;case 5:if(jt(n),s=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==a&&Zn(n);else{if(!a){if(n.stateNode===null)throw Error(u(166));return lt(n),null}if(h=ae.current,Ni(n))Id(n);else{var b=uu(he.current);switch(h){case 1:h=b.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:h=b.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":h=b.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":h=b.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":h=b.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof a.is=="string"?b.createElement("select",{is:a.is}):b.createElement("select"),a.multiple?h.multiple=!0:a.size&&(h.size=a.size);break;default:h=typeof a.is=="string"?b.createElement(s,{is:a.is}):b.createElement(s)}}h[Nt]=n,h[qt]=a;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)h.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=h;e:switch(Tt(h,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Zn(n)}}return lt(n),xo(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==a&&Zn(n);else{if(typeof a!="string"&&n.stateNode===null)throw Error(u(166));if(e=he.current,Ni(n)){if(e=n.stateNode,l=n.memoizedProps,a=null,s=Ct,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[Nt]=n,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||im(e.nodeValue,l)),e||fl(n,!0)}else e=uu(e).createTextNode(a),e[Nt]=n,n.stateNode=e}return lt(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(a=Ni(n),l!==null){if(e===null){if(!a)throw Error(u(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Nt]=n}else Yl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;lt(n),e=!1}else l=Cs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(Kt(n),n):(Kt(n),null);if((n.flags&128)!==0)throw Error(u(558))}return lt(n),null;case 13:if(a=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Ni(n),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(u(318));if(s=n.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(u(317));s[Nt]=n}else Yl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;lt(n),s=!1}else s=Cs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return n.flags&256?(Kt(n),n):(Kt(n),null)}return Kt(n),(n.flags&128)!==0?(n.lanes=l,n):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=n.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),h=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),h!==s&&(a.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),Xa(n,n.updateQueue),lt(n),null);case 4:return be(),e===null&&Bo(n.stateNode.containerInfo),lt(n),null;case 10:return Fn(n.type),lt(n),null;case 19:if(H(ot),a=n.memoizedState,a===null)return lt(n),null;if(s=(n.flags&128)!==0,h=a.rendering,h===null)if(s)Er(a,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Ra(e),h!==null){for(n.flags|=128,Er(a,!1),e=h.updateQueue,n.updateQueue=e,Xa(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)Ld(l,e),l=l.sibling;return w(ot,ot.current&1|2),Ue&&Gn(n,a.treeForkCount),n.child}e=e.sibling}a.tail!==null&&Le()>Ja&&(n.flags|=128,s=!0,Er(a,!1),n.lanes=4194304)}else{if(!s)if(e=Ra(h),e!==null){if(n.flags|=128,s=!0,e=e.updateQueue,n.updateQueue=e,Xa(n,e),Er(a,!0),a.tail===null&&a.tailMode==="hidden"&&!h.alternate&&!Ue)return lt(n),null}else 2*Le()-a.renderingStartTime>Ja&&l!==536870912&&(n.flags|=128,s=!0,Er(a,!1),n.lanes=4194304);a.isBackwards?(h.sibling=n.child,n.child=h):(e=a.last,e!==null?e.sibling=h:n.child=h,a.last=h)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Le(),e.sibling=null,l=ot.current,w(ot,s?l&1|2:l&1),Ue&&Gn(n,a.treeForkCount),e):(lt(n),null);case 22:case 23:return Kt(n),Bs(),a=n.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(n.flags|=8192):a&&(n.flags|=8192),a?(l&536870912)!==0&&(n.flags&128)===0&&(lt(n),n.subtreeFlags&6&&(n.flags|=8192)):lt(n),l=n.updateQueue,l!==null&&Xa(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),a!==l&&(n.flags|=2048),e!==null&&H(Fl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Fn(dt),lt(n),null;case 25:return null;case 30:return null}throw Error(u(156,n.tag))}function xb(e,n){switch(js(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Fn(dt),be(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return jt(n),null;case 31:if(n.memoizedState!==null){if(Kt(n),n.alternate===null)throw Error(u(340));Yl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Kt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(u(340));Yl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(ot),null;case 4:return be(),null;case 10:return Fn(n.type),null;case 22:case 23:return Kt(n),Bs(),e!==null&&H(Fl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Fn(dt),null;case 25:return null;default:return null}}function op(e,n){switch(js(n),n.tag){case 3:Fn(dt),be();break;case 26:case 27:case 5:jt(n);break;case 4:be();break;case 31:n.memoizedState!==null&&Kt(n);break;case 13:Kt(n);break;case 19:H(ot);break;case 10:Fn(n.type);break;case 22:case 23:Kt(n),Bs(),e!==null&&H(Fl);break;case 24:Fn(dt)}}function _r(e,n){try{var l=n.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var h=l.create,b=l.inst;a=h(),b.destroy=a}l=l.next}while(l!==s)}}catch(k){Qe(n,n.return,k)}}function yl(e,n,l){try{var a=n.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var h=s.next;a=h;do{if((a.tag&e)===e){var b=a.inst,k=b.destroy;if(k!==void 0){b.destroy=void 0,s=n;var A=l,B=k;try{B()}catch($){Qe(s,A,$)}}}a=a.next}while(a!==h)}}catch($){Qe(n,n.return,$)}}function cp(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{eh(n,l)}catch(a){Qe(e,e.return,a)}}}function fp(e,n,l){l.props=Kl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Qe(e,n,a)}}function Tr(e,n){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){Qe(e,n,s)}}function Dn(e,n){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){Qe(e,n,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){Qe(e,n,s)}else l.current=null}function dp(e){var n=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){Qe(e,e.return,s)}}function yo(e,n,l){try{var a=e.stateNode;Bb(a,e.type,l,n),a[qt]=n}catch(s){Qe(e,e.return,s)}}function hp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Nl(e.type)||e.tag===4}function bo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hp(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&&Nl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vo(e,n,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Hn));else if(a!==4&&(a===27&&Nl(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(vo(e,n,l),e=e.sibling;e!==null;)vo(e,n,l),e=e.sibling}function $a(e,n,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(a!==4&&(a===27&&Nl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for($a(e,n,l),e=e.sibling;e!==null;)$a(e,n,l),e=e.sibling}function pp(e){var n=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=n.attributes;s.length;)n.removeAttributeNode(s[0]);Tt(n,a,l),n[Nt]=e,n[qt]=l}catch(h){Qe(e,e.return,h)}}var Kn=!1,mt=!1,So=!1,mp=typeof WeakSet=="function"?WeakSet:Set,kt=null;function yb(e,n){if(e=e.containerInfo,Yo=pu,e=Ed(e),hs(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,h=a.focusNode;a=a.focusOffset;try{l.nodeType,h.nodeType}catch{l=null;break e}var b=0,k=-1,A=-1,B=0,$=0,K=e,Y=null;t:for(;;){for(var G;K!==l||s!==0&&K.nodeType!==3||(k=b+s),K!==h||a!==0&&K.nodeType!==3||(A=b+a),K.nodeType===3&&(b+=K.nodeValue.length),(G=K.firstChild)!==null;)Y=K,K=G;for(;;){if(K===e)break t;if(Y===l&&++B===s&&(k=b),Y===h&&++$===a&&(A=b),(G=K.nextSibling)!==null)break;K=Y,Y=K.parentNode}K=G}l=k===-1||A===-1?null:{start:k,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(Go={focusedElem:e,selectionRange:l},pu=!1,kt=n;kt!==null;)if(n=kt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,kt=e;else for(;kt!==null;){switch(n=kt,h=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(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,l=n,s=h.memoizedProps,h=h.memoizedState,a=l.stateNode;try{var de=Kl(l.type,s);e=a.getSnapshotBeforeUpdate(de,h),a.__reactInternalSnapshotBeforeUpdate=e}catch(Se){Qe(l,l.return,Se)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)Xo(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Xo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=n.sibling,e!==null){e.return=n.return,kt=e;break}kt=n.return}}function gp(e,n,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Pn(e,l),a&4&&_r(5,l);break;case 1:if(Pn(e,l),a&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(b){Qe(l,l.return,b)}else{var s=Kl(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(s,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Qe(l,l.return,b)}}a&64&&cp(l),a&512&&Tr(l,l.return);break;case 3:if(Pn(e,l),a&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{eh(e,n)}catch(b){Qe(l,l.return,b)}}break;case 27:n===null&&a&4&&pp(l);case 26:case 5:Pn(e,l),n===null&&a&4&&dp(l),a&512&&Tr(l,l.return);break;case 12:Pn(e,l);break;case 31:Pn(e,l),a&4&&bp(e,l);break;case 13:Pn(e,l),a&4&&vp(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Eb.bind(null,l),$b(e,l))));break;case 22:if(a=l.memoizedState!==null||Kn,!a){n=n!==null&&n.memoizedState!==null||mt,s=Kn;var h=mt;Kn=a,(mt=n)&&!h?Wn(e,l,(l.subtreeFlags&8772)!==0):Pn(e,l),Kn=s,mt=h}break;case 30:break;default:Pn(e,l)}}function xp(e){var n=e.alternate;n!==null&&(e.alternate=null,xp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Ku(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 it=null,Ht=!1;function Jn(e,n,l){for(l=l.child;l!==null;)yp(e,n,l),l=l.sibling}function yp(e,n,l){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(bt,l)}catch{}switch(l.tag){case 26:mt||Dn(l,n),Jn(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:mt||Dn(l,n);var a=it,s=Ht;Nl(l.type)&&(it=l.stateNode,Ht=!1),Jn(e,n,l),qr(l.stateNode),it=a,Ht=s;break;case 5:mt||Dn(l,n);case 6:if(a=it,s=Ht,it=null,Jn(e,n,l),it=a,Ht=s,it!==null)if(Ht)try{(it.nodeType===9?it.body:it.nodeName==="HTML"?it.ownerDocument.body:it).removeChild(l.stateNode)}catch(h){Qe(l,n,h)}else try{it.removeChild(l.stateNode)}catch(h){Qe(l,n,h)}break;case 18:it!==null&&(Ht?(e=it,cm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Xi(e)):cm(it,l.stateNode));break;case 4:a=it,s=Ht,it=l.stateNode.containerInfo,Ht=!0,Jn(e,n,l),it=a,Ht=s;break;case 0:case 11:case 14:case 15:yl(2,l,n),mt||yl(4,l,n),Jn(e,n,l);break;case 1:mt||(Dn(l,n),a=l.stateNode,typeof a.componentWillUnmount=="function"&&fp(l,n,a)),Jn(e,n,l);break;case 21:Jn(e,n,l);break;case 22:mt=(a=mt)||l.memoizedState!==null,Jn(e,n,l),mt=a;break;default:Jn(e,n,l)}}function bp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Xi(e)}catch(l){Qe(n,n.return,l)}}}function vp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Xi(e)}catch(l){Qe(n,n.return,l)}}function bb(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new mp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new mp),n;default:throw Error(u(435,e.tag))}}function Qa(e,n){var l=bb(e);n.forEach(function(a){if(!l.has(a)){l.add(a);var s=_b.bind(null,e,a);a.then(s,s)}})}function It(e,n){var l=n.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],h=e,b=n,k=b;e:for(;k!==null;){switch(k.tag){case 27:if(Nl(k.type)){it=k.stateNode,Ht=!1;break e}break;case 5:it=k.stateNode,Ht=!1;break e;case 3:case 4:it=k.stateNode.containerInfo,Ht=!0;break e}k=k.return}if(it===null)throw Error(u(160));yp(h,b,s),it=null,Ht=!1,h=s.alternate,h!==null&&(h.return=null),s.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Sp(n,e),n=n.sibling}var vn=null;function Sp(e,n){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:It(n,e),Yt(e),a&4&&(yl(3,e,e.return),_r(3,e),yl(5,e,e.return));break;case 1:It(n,e),Yt(e),a&512&&(mt||l===null||Dn(l,l.return)),a&64&&Kn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=vn;if(It(n,e),Yt(e),a&512&&(mt||l===null||Dn(l,l.return)),a&4){var h=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":h=s.getElementsByTagName("title")[0],(!h||h[nr]||h[Nt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=s.createElement(a),s.head.insertBefore(h,s.querySelector("head > title"))),Tt(h,a,l),h[Nt]=e,St(h),a=h;break e;case"link":var b=Sm("link","href",s).get(a+(l.href||""));if(b){for(var k=0;k<b.length;k++)if(h=b[k],h.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&h.getAttribute("rel")===(l.rel==null?null:l.rel)&&h.getAttribute("title")===(l.title==null?null:l.title)&&h.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){b.splice(k,1);break t}}h=s.createElement(a),Tt(h,a,l),s.head.appendChild(h);break;case"meta":if(b=Sm("meta","content",s).get(a+(l.content||""))){for(k=0;k<b.length;k++)if(h=b[k],h.getAttribute("content")===(l.content==null?null:""+l.content)&&h.getAttribute("name")===(l.name==null?null:l.name)&&h.getAttribute("property")===(l.property==null?null:l.property)&&h.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&h.getAttribute("charset")===(l.charSet==null?null:l.charSet)){b.splice(k,1);break t}}h=s.createElement(a),Tt(h,a,l),s.head.appendChild(h);break;default:throw Error(u(468,a))}h[Nt]=e,St(h),a=h}e.stateNode=a}else km(s,e.type,e.stateNode);else e.stateNode=vm(s,a,e.memoizedProps);else h!==a?(h===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):h.count--,a===null?km(s,e.type,e.stateNode):vm(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&yo(e,e.memoizedProps,l.memoizedProps)}break;case 27:It(n,e),Yt(e),a&512&&(mt||l===null||Dn(l,l.return)),l!==null&&a&4&&yo(e,e.memoizedProps,l.memoizedProps);break;case 5:if(It(n,e),Yt(e),a&512&&(mt||l===null||Dn(l,l.return)),e.flags&32){s=e.stateNode;try{mi(s,"")}catch(de){Qe(e,e.return,de)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,yo(e,s,l!==null?l.memoizedProps:s)),a&1024&&(So=!0);break;case 6:if(It(n,e),Yt(e),a&4){if(e.stateNode===null)throw Error(u(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(de){Qe(e,e.return,de)}}break;case 3:if(cu=null,s=vn,vn=su(n.containerInfo),It(n,e),vn=s,Yt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Xi(n.containerInfo)}catch(de){Qe(e,e.return,de)}So&&(So=!1,kp(e));break;case 4:a=vn,vn=su(e.stateNode.containerInfo),It(n,e),Yt(e),vn=a;break;case 12:It(n,e),Yt(e);break;case 31:It(n,e),Yt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Qa(e,a)));break;case 13:It(n,e),Yt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ka=Le()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Qa(e,a)));break;case 22:s=e.memoizedState!==null;var A=l!==null&&l.memoizedState!==null,B=Kn,$=mt;if(Kn=B||s,mt=$||A,It(n,e),mt=$,Kn=B,Yt(e),a&8192)e:for(n=e.stateNode,n._visibility=s?n._visibility&-2:n._visibility|1,s&&(l===null||A||Kn||mt||Jl(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){A=l=n;try{if(h=A.stateNode,s)b=h.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{k=A.stateNode;var K=A.memoizedProps.style,Y=K!=null&&K.hasOwnProperty("display")?K.display:null;k.style.display=Y==null||typeof Y=="boolean"?"":(""+Y).trim()}}catch(de){Qe(A,A.return,de)}}}else if(n.tag===6){if(l===null){A=n;try{A.stateNode.nodeValue=s?"":A.memoizedProps}catch(de){Qe(A,A.return,de)}}}else if(n.tag===18){if(l===null){A=n;try{var G=A.stateNode;s?fm(G,!0):fm(A.stateNode,!1)}catch(de){Qe(A,A.return,de)}}}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;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Qa(e,l))));break;case 19:It(n,e),Yt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Qa(e,a)));break;case 30:break;case 21:break;default:It(n,e),Yt(e)}}function Yt(e){var n=e.flags;if(n&2){try{for(var l,a=e.return;a!==null;){if(hp(a)){l=a;break}a=a.return}if(l==null)throw Error(u(160));switch(l.tag){case 27:var s=l.stateNode,h=bo(e);$a(e,h,s);break;case 5:var b=l.stateNode;l.flags&32&&(mi(b,""),l.flags&=-33);var k=bo(e);$a(e,k,b);break;case 3:case 4:var A=l.stateNode.containerInfo,B=bo(e);vo(e,B,A);break;default:throw Error(u(161))}}catch($){Qe(e,e.return,$)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function kp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;kp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Pn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)gp(e,n.alternate,n),n=n.sibling}function Jl(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:yl(4,n,n.return),Jl(n);break;case 1:Dn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&fp(n,n.return,l),Jl(n);break;case 27:qr(n.stateNode);case 26:case 5:Dn(n,n.return),Jl(n);break;case 22:n.memoizedState===null&&Jl(n);break;case 30:Jl(n);break;default:Jl(n)}e=e.sibling}}function Wn(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var a=n.alternate,s=e,h=n,b=h.flags;switch(h.tag){case 0:case 11:case 15:Wn(s,h,l),_r(4,h);break;case 1:if(Wn(s,h,l),a=h,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(B){Qe(a,a.return,B)}if(a=h,s=a.updateQueue,s!==null){var k=a.stateNode;try{var A=s.shared.hiddenCallbacks;if(A!==null)for(s.shared.hiddenCallbacks=null,s=0;s<A.length;s++)Wd(A[s],k)}catch(B){Qe(a,a.return,B)}}l&&b&64&&cp(h),Tr(h,h.return);break;case 27:pp(h);case 26:case 5:Wn(s,h,l),l&&a===null&&b&4&&dp(h),Tr(h,h.return);break;case 12:Wn(s,h,l);break;case 31:Wn(s,h,l),l&&b&4&&bp(s,h);break;case 13:Wn(s,h,l),l&&b&4&&vp(s,h);break;case 22:h.memoizedState===null&&Wn(s,h,l),Tr(h,h.return);break;case 30:break;default:Wn(s,h,l)}n=n.sibling}}function ko(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&mr(l))}function wo(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&mr(e))}function Sn(e,n,l,a){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)wp(e,n,l,a),n=n.sibling}function wp(e,n,l,a){var s=n.flags;switch(n.tag){case 0:case 11:case 15:Sn(e,n,l,a),s&2048&&_r(9,n);break;case 1:Sn(e,n,l,a);break;case 3:Sn(e,n,l,a),s&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&mr(e)));break;case 12:if(s&2048){Sn(e,n,l,a),e=n.stateNode;try{var h=n.memoizedProps,b=h.id,k=h.onPostCommit;typeof k=="function"&&k(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){Qe(n,n.return,A)}}else Sn(e,n,l,a);break;case 31:Sn(e,n,l,a);break;case 13:Sn(e,n,l,a);break;case 23:break;case 22:h=n.stateNode,b=n.alternate,n.memoizedState!==null?h._visibility&2?Sn(e,n,l,a):Ar(e,n):h._visibility&2?Sn(e,n,l,a):(h._visibility|=2,Oi(e,n,l,a,(n.subtreeFlags&10256)!==0||!1)),s&2048&&ko(b,n);break;case 24:Sn(e,n,l,a),s&2048&&wo(n.alternate,n);break;default:Sn(e,n,l,a)}}function Oi(e,n,l,a,s){for(s=s&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=e,b=n,k=l,A=a,B=b.flags;switch(b.tag){case 0:case 11:case 15:Oi(h,b,k,A,s),_r(8,b);break;case 23:break;case 22:var $=b.stateNode;b.memoizedState!==null?$._visibility&2?Oi(h,b,k,A,s):Ar(h,b):($._visibility|=2,Oi(h,b,k,A,s)),s&&B&2048&&ko(b.alternate,b);break;case 24:Oi(h,b,k,A,s),s&&B&2048&&wo(b.alternate,b);break;default:Oi(h,b,k,A,s)}n=n.sibling}}function Ar(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,a=n,s=a.flags;switch(a.tag){case 22:Ar(l,a),s&2048&&ko(a.alternate,a);break;case 24:Ar(l,a),s&2048&&wo(a.alternate,a);break;default:Ar(l,a)}n=n.sibling}}var zr=8192;function Li(e,n,l){if(e.subtreeFlags&zr)for(e=e.child;e!==null;)jp(e,n,l),e=e.sibling}function jp(e,n,l){switch(e.tag){case 26:Li(e,n,l),e.flags&zr&&e.memoizedState!==null&&r0(l,vn,e.memoizedState,e.memoizedProps);break;case 5:Li(e,n,l);break;case 3:case 4:var a=vn;vn=su(e.stateNode.containerInfo),Li(e,n,l),vn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=zr,zr=16777216,Li(e,n,l),zr=a):Li(e,n,l));break;default:Li(e,n,l)}}function Np(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 Dr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var a=n[l];kt=a,Ep(a,e)}Np(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Cp(e),e=e.sibling}function Cp(e){switch(e.tag){case 0:case 11:case 15:Dr(e),e.flags&2048&&yl(9,e,e.return);break;case 3:Dr(e);break;case 12:Dr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Za(e)):Dr(e);break;default:Dr(e)}}function Za(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var a=n[l];kt=a,Ep(a,e)}Np(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:yl(8,n,n.return),Za(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Za(n));break;default:Za(n)}e=e.sibling}}function Ep(e,n){for(;kt!==null;){var l=kt;switch(l.tag){case 0:case 11:case 15:yl(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:mr(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,kt=a;else e:for(l=e;kt!==null;){a=kt;var s=a.sibling,h=a.return;if(xp(a),a===l){kt=null;break e}if(s!==null){s.return=h,kt=s;break e}kt=h}}}var vb={getCacheForType:function(e){var n=Et(dt),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return Et(dt).controller.signal}},Sb=typeof WeakMap=="function"?WeakMap:Map,Fe=0,We=null,ze=null,Me=0,$e=0,Jt=null,bl=!1,Ui=!1,jo=!1,el=0,st=0,vl=0,Pl=0,No=0,Pt=0,qi=0,Rr=null,Gt=null,Co=!1,Ka=0,_p=0,Ja=1/0,Pa=null,Sl=null,yt=0,kl=null,Bi=null,tl=0,Eo=0,_o=null,Tp=null,Mr=0,To=null;function Wt(){return(Fe&2)!==0&&Me!==0?Me&-Me:D.T!==null?Oo():Ff()}function Ap(){if(Pt===0)if((Me&536870912)===0||Ue){var e=ui;ui<<=1,(ui&3932160)===0&&(ui=262144),Pt=e}else Pt=536870912;return e=Zt.current,e!==null&&(e.flags|=32),Pt}function Vt(e,n,l){(e===We&&($e===2||$e===9)||e.cancelPendingCommit!==null)&&(Hi(e,0),wl(e,Me,Pt,!1)),tr(e,l),((Fe&2)===0||e!==We)&&(e===We&&((Fe&2)===0&&(Pl|=l),st===4&&wl(e,Me,Pt,!1)),Rn(e))}function zp(e,n,l){if((Fe&6)!==0)throw Error(u(327));var a=!l&&(n&127)===0&&(n&e.expiredLanes)===0||ce(e,n),s=a?jb(e,n):zo(e,n,!0),h=a;do{if(s===0){Ui&&!a&&wl(e,n,0,!1);break}else{if(l=e.current.alternate,h&&!kb(l)){s=zo(e,n,!1),h=!1;continue}if(s===2){if(h=n,e.errorRecoveryDisabledLanes&h)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var k=e;s=Rr;var A=k.current.memoizedState.isDehydrated;if(A&&(Hi(k,b).flags|=256),b=zo(k,b,!1),b!==2){if(jo&&!A){k.errorRecoveryDisabledLanes|=h,Pl|=h,s=4;break e}h=Gt,Gt=s,h!==null&&(Gt===null?Gt=h:Gt.push.apply(Gt,h))}s=b}if(h=!1,s!==2)continue}}if(s===1){Hi(e,0),wl(e,n,0,!0);break}e:{switch(a=e,h=s,h){case 0:case 1:throw Error(u(345));case 4:if((n&4194048)!==n)break;case 6:wl(a,n,Pt,!bl);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((n&62914560)===n&&(s=Ka+300-Le(),10<s)){if(wl(a,n,Pt,!bl),J(a,0,!0)!==0)break e;tl=n,a.timeoutHandle=sm(Dp.bind(null,a,l,Gt,Pa,Co,n,Pt,Pl,qi,bl,h,"Throttled",-0,0),s);break e}Dp(a,l,Gt,Pa,Co,n,Pt,Pl,qi,bl,h,null,-0,0)}}break}while(!0);Rn(e)}function Dp(e,n,l,a,s,h,b,k,A,B,$,K,Y,G){if(e.timeoutHandle=-1,K=n.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Hn},jp(n,h,K);var de=(h&62914560)===h?Ka-Le():(h&4194048)===h?_p-Le():0;if(de=a0(K,de),de!==null){tl=h,e.cancelPendingCommit=de(Hp.bind(null,e,n,h,l,a,s,b,k,A,$,K,null,Y,G)),wl(e,h,b,!B);return}}Hp(e,n,h,l,a,s,b,k,A)}function kb(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],h=s.getSnapshot;s=s.value;try{if(!$t(h(),s))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;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 wl(e,n,l,a){n&=~No,n&=~Pl,e.suspendedLanes|=n,e.pingedLanes&=~n,a&&(e.warmLanes|=n),a=e.expirationTimes;for(var s=n;0<s;){var h=31-Xe(s),b=1<<h;a[h]=-1,s&=~b}l!==0&&Yf(e,l,n)}function Wa(){return(Fe&6)===0?(Or(0),!1):!0}function Ao(){if(ze!==null){if($e===0)var e=ze.return;else e=ze,Vn=Gl=null,Fs(e),Ai=null,xr=0,e=ze;for(;e!==null;)op(e.alternate,e),e=e.return;ze=null}}function Hi(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Yb(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),tl=0,Ao(),We=e,ze=l=Yn(e.current,null),Me=n,$e=0,Jt=null,bl=!1,Ui=ce(e,n),jo=!1,qi=Pt=No=Pl=vl=st=0,Gt=Rr=null,Co=!1,(n&8)!==0&&(n|=n&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=n;0<a;){var s=31-Xe(a),h=1<<s;n|=e[s],a&=~h}return el=n,va(),l}function Rp(e,n){_e=null,D.H=Nr,n===Ti||n===_a?(n=Zd(),$e=3):n===Rs?(n=Zd(),$e=4):$e=n===uo?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Jt=n,ze===null&&(st=1,Ya(e,cn(n,e.current)))}function Mp(){var e=Zt.current;return e===null?!0:(Me&4194048)===Me?pn===null:(Me&62914560)===Me||(Me&536870912)!==0?e===pn:!1}function Op(){var e=D.H;return D.H=Nr,e===null?Nr:e}function Lp(){var e=D.A;return D.A=vb,e}function eu(){st=4,bl||(Me&4194048)!==Me&&Zt.current!==null||(Ui=!0),(vl&134217727)===0&&(Pl&134217727)===0||We===null||wl(We,Me,Pt,!1)}function zo(e,n,l){var a=Fe;Fe|=2;var s=Op(),h=Lp();(We!==e||Me!==n)&&(Pa=null,Hi(e,n)),n=!1;var b=st;e:do try{if($e!==0&&ze!==null){var k=ze,A=Jt;switch($e){case 8:Ao(),b=6;break e;case 3:case 2:case 9:case 6:Zt.current===null&&(n=!0);var B=$e;if($e=0,Jt=null,Ii(e,k,A,B),l&&Ui){b=0;break e}break;default:B=$e,$e=0,Jt=null,Ii(e,k,A,B)}}wb(),b=st;break}catch($){Rp(e,$)}while(!0);return n&&e.shellSuspendCounter++,Vn=Gl=null,Fe=a,D.H=s,D.A=h,ze===null&&(We=null,Me=0,va()),b}function wb(){for(;ze!==null;)Up(ze)}function jb(e,n){var l=Fe;Fe|=2;var a=Op(),s=Lp();We!==e||Me!==n?(Pa=null,Ja=Le()+500,Hi(e,n)):Ui=ce(e,n);e:do try{if($e!==0&&ze!==null){n=ze;var h=Jt;t:switch($e){case 1:$e=0,Jt=null,Ii(e,n,h,1);break;case 2:case 9:if($d(h)){$e=0,Jt=null,qp(n);break}n=function(){$e!==2&&$e!==9||We!==e||($e=7),Rn(e)},h.then(n,n);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:$d(h)?($e=0,Jt=null,qp(n)):($e=0,Jt=null,Ii(e,n,h,7));break;case 5:var b=null;switch(ze.tag){case 26:b=ze.memoizedState;case 5:case 27:var k=ze;if(b?wm(b):k.stateNode.complete){$e=0,Jt=null;var A=k.sibling;if(A!==null)ze=A;else{var B=k.return;B!==null?(ze=B,tu(B)):ze=null}break t}}$e=0,Jt=null,Ii(e,n,h,5);break;case 6:$e=0,Jt=null,Ii(e,n,h,6);break;case 8:Ao(),st=6;break e;default:throw Error(u(462))}}Nb();break}catch($){Rp(e,$)}while(!0);return Vn=Gl=null,D.H=a,D.A=s,Fe=l,ze!==null?0:(We=null,Me=0,va(),st)}function Nb(){for(;ze!==null&&!ee();)Up(ze)}function Up(e){var n=up(e.alternate,e,el);e.memoizedProps=e.pendingProps,n===null?tu(e):ze=n}function qp(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=tp(l,n,n.pendingProps,n.type,void 0,Me);break;case 11:n=tp(l,n,n.pendingProps,n.type.render,n.ref,Me);break;case 5:Fs(n);default:op(l,n),n=ze=Ld(n,el),n=up(l,n,el)}e.memoizedProps=e.pendingProps,n===null?tu(e):ze=n}function Ii(e,n,l,a){Vn=Gl=null,Fs(n),Ai=null,xr=0;var s=n.return;try{if(hb(e,s,n,l,Me)){st=1,Ya(e,cn(l,e.current)),ze=null;return}}catch(h){if(s!==null)throw ze=s,h;st=1,Ya(e,cn(l,e.current)),ze=null;return}n.flags&32768?(Ue||a===1?e=!0:Ui||(Me&536870912)!==0?e=!1:(bl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Zt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Bp(n,e)):tu(n)}function tu(e){var n=e;do{if((n.flags&32768)!==0){Bp(n,bl);return}e=n.return;var l=gb(n.alternate,n,el);if(l!==null){ze=l;return}if(n=n.sibling,n!==null){ze=n;return}ze=n=e}while(n!==null);st===0&&(st=5)}function Bp(e,n){do{var l=xb(e.alternate,e);if(l!==null){l.flags&=32767,ze=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){ze=e;return}ze=e=l}while(e!==null);st=6,ze=null}function Hp(e,n,l,a,s,h,b,k,A){e.cancelPendingCommit=null;do nu();while(yt!==0);if((Fe&6)!==0)throw Error(u(327));if(n!==null){if(n===e.current)throw Error(u(177));if(h=n.lanes|n.childLanes,h|=ys,i1(e,l,h,b,k,A),e===We&&(ze=We=null,Me=0),Bi=n,kl=e,tl=l,Eo=h,_o=s,Tp=a,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Tb(xe,function(){return Fp(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||a){a=D.T,D.T=null,s=Q.p,Q.p=2,b=Fe,Fe|=4;try{yb(e,n,l)}finally{Fe=b,Q.p=s,D.T=a}}yt=1,Ip(),Yp(),Gp()}}function Ip(){if(yt===1){yt=0;var e=kl,n=Bi,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var a=Q.p;Q.p=2;var s=Fe;Fe|=4;try{Sp(n,e);var h=Go,b=Ed(e.containerInfo),k=h.focusedElem,A=h.selectionRange;if(b!==k&&k&&k.ownerDocument&&Cd(k.ownerDocument.documentElement,k)){if(A!==null&&hs(k)){var B=A.start,$=A.end;if($===void 0&&($=B),"selectionStart"in k)k.selectionStart=B,k.selectionEnd=Math.min($,k.value.length);else{var K=k.ownerDocument||document,Y=K&&K.defaultView||window;if(Y.getSelection){var G=Y.getSelection(),de=k.textContent.length,Se=Math.min(A.start,de),Je=A.end===void 0?Se:Math.min(A.end,de);!G.extend&&Se>Je&&(b=Je,Je=Se,Se=b);var M=Nd(k,Se),z=Nd(k,Je);if(M&&z&&(G.rangeCount!==1||G.anchorNode!==M.node||G.anchorOffset!==M.offset||G.focusNode!==z.node||G.focusOffset!==z.offset)){var q=K.createRange();q.setStart(M.node,M.offset),G.removeAllRanges(),Se>Je?(G.addRange(q),G.extend(z.node,z.offset)):(q.setEnd(z.node,z.offset),G.addRange(q))}}}}for(K=[],G=k;G=G.parentNode;)G.nodeType===1&&K.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<K.length;k++){var Z=K[k];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}pu=!!Yo,Go=Yo=null}finally{Fe=s,Q.p=a,D.T=l}}e.current=n,yt=2}}function Yp(){if(yt===2){yt=0;var e=kl,n=Bi,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var a=Q.p;Q.p=2;var s=Fe;Fe|=4;try{gp(e,n.alternate,n)}finally{Fe=s,Q.p=a,D.T=l}}yt=3}}function Gp(){if(yt===4||yt===3){yt=0,He();var e=kl,n=Bi,l=tl,a=Tp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?yt=5:(yt=0,Bi=kl=null,Vp(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Sl=null),Qu(l),n=n.stateNode,rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(bt,n,void 0,(n.current.flags&128)===128)}catch{}if(a!==null){n=D.T,s=Q.p,Q.p=2,D.T=null;try{for(var h=e.onRecoverableError,b=0;b<a.length;b++){var k=a[b];h(k.value,{componentStack:k.stack})}}finally{D.T=n,Q.p=s}}(tl&3)!==0&&nu(),Rn(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===To?Mr++:(Mr=0,To=e):Mr=0,Or(0)}}function Vp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,mr(n)))}function nu(){return Ip(),Yp(),Gp(),Fp()}function Fp(){if(yt!==5)return!1;var e=kl,n=Eo;Eo=0;var l=Qu(tl),a=D.T,s=Q.p;try{Q.p=32>l?32:l,D.T=null,l=_o,_o=null;var h=kl,b=tl;if(yt=0,Bi=kl=null,tl=0,(Fe&6)!==0)throw Error(u(331));var k=Fe;if(Fe|=4,Cp(h.current),wp(h,h.current,b,l),Fe=k,Or(0,!1),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(bt,h)}catch{}return!0}finally{Q.p=s,D.T=a,Vp(e,n)}}function Xp(e,n,l){n=cn(l,n),n=ao(e.stateNode,n,2),e=ml(e,n,2),e!==null&&(tr(e,2),Rn(e))}function Qe(e,n,l){if(e.tag===3)Xp(e,e,l);else for(;n!==null;){if(n.tag===3){Xp(n,e,l);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Sl===null||!Sl.has(a))){e=cn(l,e),l=$h(2),a=ml(n,l,2),a!==null&&(Qh(l,a,n,e),tr(a,2),Rn(a));break}}n=n.return}}function Do(e,n,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Sb;var s=new Set;a.set(n,s)}else s=a.get(n),s===void 0&&(s=new Set,a.set(n,s));s.has(l)||(jo=!0,s.add(l),e=Cb.bind(null,e,n,l),n.then(e,e))}function Cb(e,n,l){var a=e.pingCache;a!==null&&a.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,We===e&&(Me&l)===l&&(st===4||st===3&&(Me&62914560)===Me&&300>Le()-Ka?(Fe&2)===0&&Hi(e,0):No|=l,qi===Me&&(qi=0)),Rn(e)}function $p(e,n){n===0&&(n=at()),e=Hl(e,n),e!==null&&(tr(e,n),Rn(e))}function Eb(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),$p(e,l)}function _b(e,n){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(u(314))}a!==null&&a.delete(n),$p(e,l)}function Tb(e,n){return En(e,n)}var lu=null,Yi=null,Ro=!1,iu=!1,Mo=!1,jl=0;function Rn(e){e!==Yi&&e.next===null&&(Yi===null?lu=Yi=e:Yi=Yi.next=e),iu=!0,Ro||(Ro=!0,zb())}function Or(e,n){if(!Mo&&iu){Mo=!0;do for(var l=!1,a=lu;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var h=0;else{var b=a.suspendedLanes,k=a.pingedLanes;h=(1<<31-Xe(42|e)+1)-1,h&=s&~(b&~k),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(l=!0,Jp(a,h))}else h=Me,h=J(a,a===We?h:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(h&3)===0||ce(a,h)||(l=!0,Jp(a,h));a=a.next}while(l);Mo=!1}}function Ab(){Qp()}function Qp(){iu=Ro=!1;var e=0;jl!==0&&Ib()&&(e=jl);for(var n=Le(),l=null,a=lu;a!==null;){var s=a.next,h=Zp(a,n);h===0?(a.next=null,l===null?lu=s:l.next=s,s===null&&(Yi=l)):(l=a,(e!==0||(h&3)!==0)&&(iu=!0)),a=s}yt!==0&&yt!==5||Or(e),jl!==0&&(jl=0)}function Zp(e,n){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var b=31-Xe(h),k=1<<b,A=s[b];A===-1?((k&l)===0||(k&a)!==0)&&(s[b]=Ce(k,n)):A<=n&&(e.expiredLanes|=k),h&=~k}if(n=We,l=Me,l=J(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===n&&($e===2||$e===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&_n(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||ce(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(a!==null&&_n(a),Qu(l)){case 2:case 8:l=le;break;case 32:l=xe;break;case 268435456:l=Ie;break;default:l=xe}return a=Kp.bind(null,e),l=En(l,a),e.callbackPriority=n,e.callbackNode=l,n}return a!==null&&a!==null&&_n(a),e.callbackPriority=2,e.callbackNode=null,2}function Kp(e,n){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(nu()&&e.callbackNode!==l)return null;var a=Me;return a=J(e,e===We?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(zp(e,a,n),Zp(e,Le()),e.callbackNode!=null&&e.callbackNode===l?Kp.bind(null,e):null)}function Jp(e,n){if(nu())return null;zp(e,n,!0)}function zb(){Gb(function(){(Fe&6)!==0?En(V,Ab):Qp()})}function Oo(){if(jl===0){var e=Ei;e===0&&(e=Ol,Ol<<=1,(Ol&261888)===0&&(Ol=256)),jl=e}return jl}function Pp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:da(""+e)}function Wp(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function Db(e,n,l,a,s){if(n==="submit"&&l&&l.stateNode===s){var h=Pp((s[qt]||null).action),b=a.submitter;b&&(n=(n=b[qt]||null)?Pp(n.formAction):b.getAttribute("formAction"),n!==null&&(h=n,b=null));var k=new ga("action","action",null,a,s);e.push({event:k,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(jl!==0){var A=b?Wp(s,b):new FormData(s);eo(l,{pending:!0,data:A,method:s.method,action:h},null,A)}}else typeof h=="function"&&(k.preventDefault(),A=b?Wp(s,b):new FormData(s),eo(l,{pending:!0,data:A,method:s.method,action:h},h,A))},currentTarget:s}]})}}for(var Lo=0;Lo<xs.length;Lo++){var Uo=xs[Lo],Rb=Uo.toLowerCase(),Mb=Uo[0].toUpperCase()+Uo.slice(1);bn(Rb,"on"+Mb)}bn(Ad,"onAnimationEnd"),bn(zd,"onAnimationIteration"),bn(Dd,"onAnimationStart"),bn("dblclick","onDoubleClick"),bn("focusin","onFocus"),bn("focusout","onBlur"),bn(K1,"onTransitionRun"),bn(J1,"onTransitionStart"),bn(P1,"onTransitionCancel"),bn(Rd,"onTransitionEnd"),hi("onMouseEnter",["mouseout","mouseover"]),hi("onMouseLeave",["mouseout","mouseover"]),hi("onPointerEnter",["pointerout","pointerover"]),hi("onPointerLeave",["pointerout","pointerover"]),Ll("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ll("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ll("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ll("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ll("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ll("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lr="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(" "),Ob=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Lr));function em(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var h=void 0;if(n)for(var b=a.length-1;0<=b;b--){var k=a[b],A=k.instance,B=k.currentTarget;if(k=k.listener,A!==h&&s.isPropagationStopped())break e;h=k,s.currentTarget=B;try{h(s)}catch($){ba($)}s.currentTarget=null,h=A}else for(b=0;b<a.length;b++){if(k=a[b],A=k.instance,B=k.currentTarget,k=k.listener,A!==h&&s.isPropagationStopped())break e;h=k,s.currentTarget=B;try{h(s)}catch($){ba($)}s.currentTarget=null,h=A}}}}function De(e,n){var l=n[Zu];l===void 0&&(l=n[Zu]=new Set);var a=e+"__bubble";l.has(a)||(tm(n,e,2,!1),l.add(a))}function qo(e,n,l){var a=0;n&&(a|=4),tm(l,e,a,n)}var ru="_reactListening"+Math.random().toString(36).slice(2);function Bo(e){if(!e[ru]){e[ru]=!0,Qf.forEach(function(l){l!=="selectionchange"&&(Ob.has(l)||qo(l,!1,e),qo(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ru]||(n[ru]=!0,qo("selectionchange",!1,n))}}function tm(e,n,l,a){switch(Am(n)){case 2:var s=o0;break;case 8:s=c0;break;default:s=ec}l=s.bind(null,n,l,e),s=void 0,!is||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(n,l,{capture:!0,passive:s}):e.addEventListener(n,l,!0):s!==void 0?e.addEventListener(n,l,{passive:s}):e.addEventListener(n,l,!1)}function Ho(e,n,l,a,s){var h=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var b=a.tag;if(b===3||b===4){var k=a.stateNode.containerInfo;if(k===s)break;if(b===4)for(b=a.return;b!==null;){var A=b.tag;if((A===3||A===4)&&b.stateNode.containerInfo===s)return;b=b.return}for(;k!==null;){if(b=ci(k),b===null)return;if(A=b.tag,A===5||A===6||A===26||A===27){a=h=b;continue e}k=k.parentNode}}a=a.return}ad(function(){var B=h,$=ns(l),K=[];e:{var Y=Md.get(e);if(Y!==void 0){var G=ga,de=e;switch(e){case"keypress":if(pa(l)===0)break e;case"keydown":case"keyup":G=_1;break;case"focusin":de="focus",G=ss;break;case"focusout":de="blur",G=ss;break;case"beforeblur":case"afterblur":G=ss;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":G=od;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=g1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=z1;break;case Ad:case zd:case Dd:G=b1;break;case Rd:G=R1;break;case"scroll":case"scrollend":G=p1;break;case"wheel":G=O1;break;case"copy":case"cut":case"paste":G=S1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=fd;break;case"toggle":case"beforetoggle":G=U1}var Se=(n&4)!==0,Je=!Se&&(e==="scroll"||e==="scrollend"),M=Se?Y!==null?Y+"Capture":null:Y;Se=[];for(var z=B,q;z!==null;){var Z=z;if(q=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||q===null||M===null||(Z=ir(z,M),Z!=null&&Se.push(Ur(z,Z,q))),Je)break;z=z.return}0<Se.length&&(Y=new G(Y,de,null,l,$),K.push({event:Y,listeners:Se}))}}if((n&7)===0){e:{if(Y=e==="mouseover"||e==="pointerover",G=e==="mouseout"||e==="pointerout",Y&&l!==ts&&(de=l.relatedTarget||l.fromElement)&&(ci(de)||de[oi]))break e;if((G||Y)&&(Y=$.window===$?$:(Y=$.ownerDocument)?Y.defaultView||Y.parentWindow:window,G?(de=l.relatedTarget||l.toElement,G=B,de=de?ci(de):null,de!==null&&(Je=c(de),Se=de.tag,de!==Je||Se!==5&&Se!==27&&Se!==6)&&(de=null)):(G=null,de=B),G!==de)){if(Se=od,Z="onMouseLeave",M="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(Se=fd,Z="onPointerLeave",M="onPointerEnter",z="pointer"),Je=G==null?Y:lr(G),q=de==null?Y:lr(de),Y=new Se(Z,z+"leave",G,l,$),Y.target=Je,Y.relatedTarget=q,Z=null,ci($)===B&&(Se=new Se(M,z+"enter",de,l,$),Se.target=q,Se.relatedTarget=Je,Z=Se),Je=Z,G&&de)t:{for(Se=Lb,M=G,z=de,q=0,Z=M;Z;Z=Se(Z))q++;Z=0;for(var ye=z;ye;ye=Se(ye))Z++;for(;0<q-Z;)M=Se(M),q--;for(;0<Z-q;)z=Se(z),Z--;for(;q--;){if(M===z||z!==null&&M===z.alternate){Se=M;break t}M=Se(M),z=Se(z)}Se=null}else Se=null;G!==null&&nm(K,Y,G,Se,!1),de!==null&&Je!==null&&nm(K,Je,de,Se,!0)}}e:{if(Y=B?lr(B):window,G=Y.nodeName&&Y.nodeName.toLowerCase(),G==="select"||G==="input"&&Y.type==="file")var Ge=bd;else if(xd(Y))if(vd)Ge=$1;else{Ge=F1;var pe=V1}else G=Y.nodeName,!G||G.toLowerCase()!=="input"||Y.type!=="checkbox"&&Y.type!=="radio"?B&&es(B.elementType)&&(Ge=bd):Ge=X1;if(Ge&&(Ge=Ge(e,B))){yd(K,Ge,l,$);break e}pe&&pe(e,Y,B),e==="focusout"&&B&&Y.type==="number"&&B.memoizedProps.value!=null&&Wu(Y,"number",Y.value)}switch(pe=B?lr(B):window,e){case"focusin":(xd(pe)||pe.contentEditable==="true")&&(bi=pe,ps=B,dr=null);break;case"focusout":dr=ps=bi=null;break;case"mousedown":ms=!0;break;case"contextmenu":case"mouseup":case"dragend":ms=!1,_d(K,l,$);break;case"selectionchange":if(Z1)break;case"keydown":case"keyup":_d(K,l,$)}var Te;if(cs)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else yi?md(e,l)&&(Oe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Oe="onCompositionStart");Oe&&(dd&&l.locale!=="ko"&&(yi||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&yi&&(Te=ud()):(sl=$,rs="value"in sl?sl.value:sl.textContent,yi=!0)),pe=au(B,Oe),0<pe.length&&(Oe=new cd(Oe,e,null,l,$),K.push({event:Oe,listeners:pe}),Te?Oe.data=Te:(Te=gd(l),Te!==null&&(Oe.data=Te)))),(Te=B1?H1(e,l):I1(e,l))&&(Oe=au(B,"onBeforeInput"),0<Oe.length&&(pe=new cd("onBeforeInput","beforeinput",null,l,$),K.push({event:pe,listeners:Oe}),pe.data=Te)),Db(K,e,B,l,$)}em(K,n)})}function Ur(e,n,l){return{instance:e,listener:n,currentTarget:l}}function au(e,n){for(var l=n+"Capture",a=[];e!==null;){var s=e,h=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||h===null||(s=ir(e,l),s!=null&&a.unshift(Ur(e,s,h)),s=ir(e,n),s!=null&&a.push(Ur(e,s,h))),e.tag===3)return a;e=e.return}return[]}function Lb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function nm(e,n,l,a,s){for(var h=n._reactName,b=[];l!==null&&l!==a;){var k=l,A=k.alternate,B=k.stateNode;if(k=k.tag,A!==null&&A===a)break;k!==5&&k!==26&&k!==27||B===null||(A=B,s?(B=ir(l,h),B!=null&&b.unshift(Ur(l,B,A))):s||(B=ir(l,h),B!=null&&b.push(Ur(l,B,A)))),l=l.return}b.length!==0&&e.push({event:n,listeners:b})}var Ub=/\r\n?/g,qb=/\u0000|\uFFFD/g;function lm(e){return(typeof e=="string"?e:""+e).replace(Ub,`
|
|
49
|
-
`).replace(qb,"")}function im(e,n){return n=lm(n),lm(e)===n}function Ke(e,n,l,a,s,h){switch(l){case"children":typeof a=="string"?n==="body"||n==="textarea"&&a===""||mi(e,a):(typeof a=="number"||typeof a=="bigint")&&n!=="body"&&mi(e,""+a);break;case"className":ca(e,"class",a);break;case"tabIndex":ca(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ca(e,l,a);break;case"style":id(e,a,h);break;case"data":if(n!=="object"){ca(e,"data",a);break}case"src":case"href":if(a===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=da(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(l==="formAction"?(n!=="input"&&Ke(e,n,"name",s.name,s,null),Ke(e,n,"formEncType",s.formEncType,s,null),Ke(e,n,"formMethod",s.formMethod,s,null),Ke(e,n,"formTarget",s.formTarget,s,null)):(Ke(e,n,"encType",s.encType,s,null),Ke(e,n,"method",s.method,s,null),Ke(e,n,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=da(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Hn);break;case"onScroll":a!=null&&De("scroll",e);break;case"onScrollEnd":a!=null&&De("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=da(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":De("beforetoggle",e),De("toggle",e),oa(e,"popover",a);break;case"xlinkActuate":Bn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Bn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Bn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Bn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Bn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Bn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":oa(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=d1.get(l)||l,oa(e,l,a))}}function Io(e,n,l,a,s,h){switch(l){case"style":id(e,a,h);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"children":typeof a=="string"?mi(e,a):(typeof a=="number"||typeof a=="bigint")&&mi(e,""+a);break;case"onScroll":a!=null&&De("scroll",e);break;case"onScrollEnd":a!=null&&De("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Hn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Zf.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),n=l.slice(2,s?l.length-7:void 0),h=e[qt]||null,h=h!=null?h[l]:null,typeof h=="function"&&e.removeEventListener(n,h,s),typeof a=="function")){typeof h!="function"&&h!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):oa(e,l,a)}}}function Tt(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",e),De("load",e);var a=!1,s=!1,h;for(h in l)if(l.hasOwnProperty(h)){var b=l[h];if(b!=null)switch(h){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,n));default:Ke(e,n,h,b,l,null)}}s&&Ke(e,n,"srcSet",l.srcSet,l,null),a&&Ke(e,n,"src",l.src,l,null);return;case"input":De("invalid",e);var k=h=b=s=null,A=null,B=null;for(a in l)if(l.hasOwnProperty(a)){var $=l[a];if($!=null)switch(a){case"name":s=$;break;case"type":b=$;break;case"checked":A=$;break;case"defaultChecked":B=$;break;case"value":h=$;break;case"defaultValue":k=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(u(137,n));break;default:Ke(e,n,a,$,l,null)}}ed(e,h,k,A,B,b,s,!1);return;case"select":De("invalid",e),a=b=h=null;for(s in l)if(l.hasOwnProperty(s)&&(k=l[s],k!=null))switch(s){case"value":h=k;break;case"defaultValue":b=k;break;case"multiple":a=k;default:Ke(e,n,s,k,l,null)}n=h,l=b,e.multiple=!!a,n!=null?pi(e,!!a,n,!1):l!=null&&pi(e,!!a,l,!0);return;case"textarea":De("invalid",e),h=s=a=null;for(b in l)if(l.hasOwnProperty(b)&&(k=l[b],k!=null))switch(b){case"value":a=k;break;case"defaultValue":s=k;break;case"children":h=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(u(91));break;default:Ke(e,n,b,k,l,null)}nd(e,a,s,h);return;case"option":for(A in l)l.hasOwnProperty(A)&&(a=l[A],a!=null)&&(A==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ke(e,n,A,a,l,null));return;case"dialog":De("beforetoggle",e),De("toggle",e),De("cancel",e),De("close",e);break;case"iframe":case"object":De("load",e);break;case"video":case"audio":for(a=0;a<Lr.length;a++)De(Lr[a],e);break;case"image":De("error",e),De("load",e);break;case"details":De("toggle",e);break;case"embed":case"source":case"link":De("error",e),De("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in l)if(l.hasOwnProperty(B)&&(a=l[B],a!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,n));default:Ke(e,n,B,a,l,null)}return;default:if(es(n)){for($ in l)l.hasOwnProperty($)&&(a=l[$],a!==void 0&&Io(e,n,$,a,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(a=l[k],a!=null&&Ke(e,n,k,a,l,null))}function Bb(e,n,l,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,h=null,b=null,k=null,A=null,B=null,$=null;for(G in l){var K=l[G];if(l.hasOwnProperty(G)&&K!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":A=K;default:a.hasOwnProperty(G)||Ke(e,n,G,null,a,K)}}for(var Y in a){var G=a[Y];if(K=l[Y],a.hasOwnProperty(Y)&&(G!=null||K!=null))switch(Y){case"type":h=G;break;case"name":s=G;break;case"checked":B=G;break;case"defaultChecked":$=G;break;case"value":b=G;break;case"defaultValue":k=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(u(137,n));break;default:G!==K&&Ke(e,n,Y,G,a,K)}}Pu(e,b,k,A,B,$,h,s);return;case"select":G=b=k=Y=null;for(h in l)if(A=l[h],l.hasOwnProperty(h)&&A!=null)switch(h){case"value":break;case"multiple":G=A;default:a.hasOwnProperty(h)||Ke(e,n,h,null,a,A)}for(s in a)if(h=a[s],A=l[s],a.hasOwnProperty(s)&&(h!=null||A!=null))switch(s){case"value":Y=h;break;case"defaultValue":k=h;break;case"multiple":b=h;default:h!==A&&Ke(e,n,s,h,a,A)}n=k,l=b,a=G,Y!=null?pi(e,!!l,Y,!1):!!a!=!!l&&(n!=null?pi(e,!!l,n,!0):pi(e,!!l,l?[]:"",!1));return;case"textarea":G=Y=null;for(k in l)if(s=l[k],l.hasOwnProperty(k)&&s!=null&&!a.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Ke(e,n,k,null,a,s)}for(b in a)if(s=a[b],h=l[b],a.hasOwnProperty(b)&&(s!=null||h!=null))switch(b){case"value":Y=s;break;case"defaultValue":G=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(u(91));break;default:s!==h&&Ke(e,n,b,s,a,h)}td(e,Y,G);return;case"option":for(var de in l)Y=l[de],l.hasOwnProperty(de)&&Y!=null&&!a.hasOwnProperty(de)&&(de==="selected"?e.selected=!1:Ke(e,n,de,null,a,Y));for(A in a)Y=a[A],G=l[A],a.hasOwnProperty(A)&&Y!==G&&(Y!=null||G!=null)&&(A==="selected"?e.selected=Y&&typeof Y!="function"&&typeof Y!="symbol":Ke(e,n,A,Y,a,G));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 Se in l)Y=l[Se],l.hasOwnProperty(Se)&&Y!=null&&!a.hasOwnProperty(Se)&&Ke(e,n,Se,null,a,Y);for(B in a)if(Y=a[B],G=l[B],a.hasOwnProperty(B)&&Y!==G&&(Y!=null||G!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(u(137,n));break;default:Ke(e,n,B,Y,a,G)}return;default:if(es(n)){for(var Je in l)Y=l[Je],l.hasOwnProperty(Je)&&Y!==void 0&&!a.hasOwnProperty(Je)&&Io(e,n,Je,void 0,a,Y);for($ in a)Y=a[$],G=l[$],!a.hasOwnProperty($)||Y===G||Y===void 0&&G===void 0||Io(e,n,$,Y,a,G);return}}for(var M in l)Y=l[M],l.hasOwnProperty(M)&&Y!=null&&!a.hasOwnProperty(M)&&Ke(e,n,M,null,a,Y);for(K in a)Y=a[K],G=l[K],!a.hasOwnProperty(K)||Y===G||Y==null&&G==null||Ke(e,n,K,Y,a,G)}function rm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Hb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],h=s.transferSize,b=s.initiatorType,k=s.duration;if(h&&k&&rm(b)){for(b=0,k=s.responseEnd,a+=1;a<l.length;a++){var A=l[a],B=A.startTime;if(B>k)break;var $=A.transferSize,K=A.initiatorType;$&&rm(K)&&(A=A.responseEnd,b+=$*(A<k?1:(k-B)/(A-B)))}if(--a,n+=8*(h+b)/(s.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 Yo=null,Go=null;function uu(e){return e.nodeType===9?e:e.ownerDocument}function am(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 um(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 Vo(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 Fo=null;function Ib(){var e=window.event;return e&&e.type==="popstate"?e===Fo?!1:(Fo=e,!0):(Fo=null,!1)}var sm=typeof setTimeout=="function"?setTimeout:void 0,Yb=typeof clearTimeout=="function"?clearTimeout:void 0,om=typeof Promise=="function"?Promise:void 0,Gb=typeof queueMicrotask=="function"?queueMicrotask:typeof om<"u"?function(e){return om.resolve(null).then(e).catch(Vb)}:sm;function Vb(e){setTimeout(function(){throw e})}function Nl(e){return e==="head"}function cm(e,n){var l=n,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),Xi(n);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")qr(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,qr(l);for(var h=l.firstChild;h;){var b=h.nextSibling,k=h.nodeName;h[nr]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&h.rel.toLowerCase()==="stylesheet"||l.removeChild(h),h=b}}else l==="body"&&qr(e.ownerDocument.body);l=s}while(l);Xi(n)}function fm(e,n){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Xo(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Xo(l),Ku(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Fb(e,n,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[nr])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var h=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=mn(e.nextSibling),e===null)break}return null}function Xb(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=mn(e.nextSibling),e===null))return null;return e}function dm(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=mn(e.nextSibling),e===null))return null;return e}function $o(e){return e.data==="$?"||e.data==="$~"}function Qo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $b(e,n){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||l.readyState!=="loading")n();else{var a=function(){n(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function mn(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 Zo=null;function hm(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(n===0)return mn(e.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}e=e.nextSibling}return null}function pm(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return e;n--}else l!=="/$"&&l!=="/&"||n++}e=e.previousSibling}return null}function mm(e,n,l){switch(n=uu(l),e){case"html":if(e=n.documentElement,!e)throw Error(u(452));return e;case"head":if(e=n.head,!e)throw Error(u(453));return e;case"body":if(e=n.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function qr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Ku(e)}var gn=new Map,gm=new Set;function su(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var nl=Q.d;Q.d={f:Qb,r:Zb,D:Kb,C:Jb,L:Pb,m:Wb,X:t0,S:e0,M:n0};function Qb(){var e=nl.f(),n=Wa();return e||n}function Zb(e){var n=fi(e);n!==null&&n.tag===5&&n.type==="form"?Rh(n):nl.r(e)}var Gi=typeof document>"u"?null:document;function xm(e,n,l){var a=Gi;if(a&&typeof n=="string"&&n){var s=sn(n);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),gm.has(s)||(gm.add(s),e={rel:e,crossOrigin:l,href:n},a.querySelector(s)===null&&(n=a.createElement("link"),Tt(n,"link",e),St(n),a.head.appendChild(n)))}}function Kb(e){nl.D(e),xm("dns-prefetch",e,null)}function Jb(e,n){nl.C(e,n),xm("preconnect",e,n)}function Pb(e,n,l){nl.L(e,n,l);var a=Gi;if(a&&e&&n){var s='link[rel="preload"][as="'+sn(n)+'"]';n==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+sn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+sn(l.imageSizes)+'"]')):s+='[href="'+sn(e)+'"]';var h=s;switch(n){case"style":h=Vi(e);break;case"script":h=Fi(e)}gn.has(h)||(e=x({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),gn.set(h,e),a.querySelector(s)!==null||n==="style"&&a.querySelector(Br(h))||n==="script"&&a.querySelector(Hr(h))||(n=a.createElement("link"),Tt(n,"link",e),St(n),a.head.appendChild(n)))}}function Wb(e,n){nl.m(e,n);var l=Gi;if(l&&e){var a=n&&typeof n.as=="string"?n.as:"script",s='link[rel="modulepreload"][as="'+sn(a)+'"][href="'+sn(e)+'"]',h=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Fi(e)}if(!gn.has(h)&&(e=x({rel:"modulepreload",href:e},n),gn.set(h,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Hr(h)))return}a=l.createElement("link"),Tt(a,"link",e),St(a),l.head.appendChild(a)}}}function e0(e,n,l){nl.S(e,n,l);var a=Gi;if(a&&e){var s=di(a).hoistableStyles,h=Vi(e);n=n||"default";var b=s.get(h);if(!b){var k={loading:0,preload:null};if(b=a.querySelector(Br(h)))k.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":n},l),(l=gn.get(h))&&Ko(e,l);var A=b=a.createElement("link");St(A),Tt(A,"link",e),A._p=new Promise(function(B,$){A.onload=B,A.onerror=$}),A.addEventListener("load",function(){k.loading|=1}),A.addEventListener("error",function(){k.loading|=2}),k.loading|=4,ou(b,n,a)}b={type:"stylesheet",instance:b,count:1,state:k},s.set(h,b)}}}function t0(e,n){nl.X(e,n);var l=Gi;if(l&&e){var a=di(l).hoistableScripts,s=Fi(e),h=a.get(s);h||(h=l.querySelector(Hr(s)),h||(e=x({src:e,async:!0},n),(n=gn.get(s))&&Jo(e,n),h=l.createElement("script"),St(h),Tt(h,"link",e),l.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},a.set(s,h))}}function n0(e,n){nl.M(e,n);var l=Gi;if(l&&e){var a=di(l).hoistableScripts,s=Fi(e),h=a.get(s);h||(h=l.querySelector(Hr(s)),h||(e=x({src:e,async:!0,type:"module"},n),(n=gn.get(s))&&Jo(e,n),h=l.createElement("script"),St(h),Tt(h,"link",e),l.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},a.set(s,h))}}function ym(e,n,l,a){var s=(s=he.current)?su(s):null;if(!s)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=Vi(l.href),l=di(s).hoistableStyles,a=l.get(n),a||(a={type:"style",instance:null,count:0,state:null},l.set(n,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Vi(l.href);var h=di(s).hoistableStyles,b=h.get(e);if(b||(s=s.ownerDocument||s,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,b),(h=s.querySelector(Br(e)))&&!h._p&&(b.instance=h,b.state.loading=5),gn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},gn.set(e,l),h||l0(s,e,l,b.state))),n&&a===null)throw Error(u(528,""));return b}if(n&&a!==null)throw Error(u(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Fi(l),l=di(s).hoistableScripts,a=l.get(n),a||(a={type:"script",instance:null,count:0,state:null},l.set(n,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Vi(e){return'href="'+sn(e)+'"'}function Br(e){return'link[rel="stylesheet"]['+e+"]"}function bm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function l0(e,n,l,a){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?a.loading=1:(n=e.createElement("link"),a.preload=n,n.addEventListener("load",function(){return a.loading|=1}),n.addEventListener("error",function(){return a.loading|=2}),Tt(n,"link",l),St(n),e.head.appendChild(n))}function Fi(e){return'[src="'+sn(e)+'"]'}function Hr(e){return"script[async]"+e}function vm(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var a=e.querySelector('style[data-href~="'+sn(l.href)+'"]');if(a)return n.instance=a,St(a),a;var s=x({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),St(a),Tt(a,"style",s),ou(a,l.precedence,e),n.instance=a;case"stylesheet":s=Vi(l.href);var h=e.querySelector(Br(s));if(h)return n.state.loading|=4,n.instance=h,St(h),h;a=bm(l),(s=gn.get(s))&&Ko(a,s),h=(e.ownerDocument||e).createElement("link"),St(h);var b=h;return b._p=new Promise(function(k,A){b.onload=k,b.onerror=A}),Tt(h,"link",a),n.state.loading|=4,ou(h,l.precedence,e),n.instance=h;case"script":return h=Fi(l.src),(s=e.querySelector(Hr(h)))?(n.instance=s,St(s),s):(a=l,(s=gn.get(h))&&(a=x({},l),Jo(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),St(s),Tt(s,"link",a),e.head.appendChild(s),n.instance=s);case"void":return null;default:throw Error(u(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(a=n.instance,n.state.loading|=4,ou(a,l.precedence,e));return n.instance}function ou(e,n,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,h=s,b=0;b<a.length;b++){var k=a[b];if(k.dataset.precedence===n)h=k;else if(h!==s)break}h?h.parentNode.insertBefore(e,h.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function Ko(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Jo(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var cu=null;function Sm(e,n,l){if(cu===null){var a=new Map,s=cu=new Map;s.set(l,a)}else s=cu,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var h=l[s];if(!(h[nr]||h[Nt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var b=h.getAttribute(n)||"";b=e+b;var k=a.get(b);k?k.push(h):a.set(b,[h])}}return a}function km(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function i0(e,n,l){if(l===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;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!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 wm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function r0(e,n,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=Vi(a.href),h=n.querySelector(Br(s));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=fu.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=h,St(h);return}h=n.ownerDocument||n,a=bm(a),(s=gn.get(s))&&Ko(a,s),h=h.createElement("link"),St(h);var b=h;b._p=new Promise(function(k,A){b.onload=k,b.onerror=A}),Tt(h,"link",a),l.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=fu.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var Po=0;function a0(e,n){return e.stylesheets&&e.count===0&&hu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&hu(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+n);0<e.imgBytes&&Po===0&&(Po=62500*Hb());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hu(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>Po?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function fu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var du=null;function hu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,du=new Map,n.forEach(u0,e),du=null,fu.call(e))}function u0(e,n){if(!(n.state.loading&4)){var l=du.get(e);if(l)var a=l.get(null);else{l=new Map,du.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<s.length;h++){var b=s[h];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(l.set(b.dataset.precedence,b),a=b)}a&&l.set(null,a)}s=n.instance,b=s.getAttribute("data-precedence"),h=l.get(b)||a,h===a&&l.set(null,s),l.set(b,s),this.count++,a=fu.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),h?h.parentNode.insertBefore(s,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),n.state.loading|=4}}var Ir={$$typeof:U,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function s0(e,n,l,a,s,h,b,k,A){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Tn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tn(0),this.hiddenUpdates=Tn(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=h,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function jm(e,n,l,a,s,h,b,k,A,B,$,K){return e=new s0(e,n,l,b,A,B,$,K,k),n=1,h===!0&&(n|=24),h=Qt(3,null,null,n),e.current=h,h.stateNode=e,n=As(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:a,isDehydrated:l,cache:n},Ms(h),e}function Nm(e){return e?(e=ki,e):ki}function Cm(e,n,l,a,s,h){s=Nm(s),a.context===null?a.context=s:a.pendingContext=s,a=pl(n),a.payload={element:l},h=h===void 0?null:h,h!==null&&(a.callback=h),l=ml(e,a,n),l!==null&&(Vt(l,e,n),br(l,e,n))}function Em(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function Wo(e,n){Em(e,n),(e=e.alternate)&&Em(e,n)}function _m(e){if(e.tag===13||e.tag===31){var n=Hl(e,67108864);n!==null&&Vt(n,e,67108864),Wo(e,67108864)}}function Tm(e){if(e.tag===13||e.tag===31){var n=Wt();n=$u(n);var l=Hl(e,n);l!==null&&Vt(l,e,n),Wo(e,n)}}var pu=!0;function o0(e,n,l,a){var s=D.T;D.T=null;var h=Q.p;try{Q.p=2,ec(e,n,l,a)}finally{Q.p=h,D.T=s}}function c0(e,n,l,a){var s=D.T;D.T=null;var h=Q.p;try{Q.p=8,ec(e,n,l,a)}finally{Q.p=h,D.T=s}}function ec(e,n,l,a){if(pu){var s=tc(a);if(s===null)Ho(e,n,a,mu,l),zm(e,a);else if(d0(s,e,n,l,a))a.stopPropagation();else if(zm(e,a),n&4&&-1<f0.indexOf(e)){for(;s!==null;){var h=fi(s);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var b=qn(h.pendingLanes);if(b!==0){var k=h;for(k.pendingLanes|=2,k.entangledLanes|=2;b;){var A=1<<31-Xe(b);k.entanglements[1]|=A,b&=~A}Rn(h),(Fe&6)===0&&(Ja=Le()+500,Or(0))}}break;case 31:case 13:k=Hl(h,2),k!==null&&Vt(k,h,2),Wa(),Wo(h,2)}if(h=tc(a),h===null&&Ho(e,n,a,mu,l),h===s)break;s=h}s!==null&&a.stopPropagation()}else Ho(e,n,a,null,l)}}function tc(e){return e=ns(e),nc(e)}var mu=null;function nc(e){if(mu=null,e=ci(e),e!==null){var n=c(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=f(n),e!==null)return e;e=null}else if(l===31){if(e=p(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return mu=e,null}function Am(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(rn()){case V:return 2;case le:return 8;case xe:case Ee:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var lc=!1,Cl=null,El=null,_l=null,Yr=new Map,Gr=new Map,Tl=[],f0="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 zm(e,n){switch(e){case"focusin":case"focusout":Cl=null;break;case"dragenter":case"dragleave":El=null;break;case"mouseover":case"mouseout":_l=null;break;case"pointerover":case"pointerout":Yr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gr.delete(n.pointerId)}}function Vr(e,n,l,a,s,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:l,eventSystemFlags:a,nativeEvent:h,targetContainers:[s]},n!==null&&(n=fi(n),n!==null&&_m(n)),e):(e.eventSystemFlags|=a,n=e.targetContainers,s!==null&&n.indexOf(s)===-1&&n.push(s),e)}function d0(e,n,l,a,s){switch(n){case"focusin":return Cl=Vr(Cl,e,n,l,a,s),!0;case"dragenter":return El=Vr(El,e,n,l,a,s),!0;case"mouseover":return _l=Vr(_l,e,n,l,a,s),!0;case"pointerover":var h=s.pointerId;return Yr.set(h,Vr(Yr.get(h)||null,e,n,l,a,s)),!0;case"gotpointercapture":return h=s.pointerId,Gr.set(h,Vr(Gr.get(h)||null,e,n,l,a,s)),!0}return!1}function Dm(e){var n=ci(e.target);if(n!==null){var l=c(n);if(l!==null){if(n=l.tag,n===13){if(n=f(l),n!==null){e.blockedOn=n,Xf(e.priority,function(){Tm(l)});return}}else if(n===31){if(n=p(l),n!==null){e.blockedOn=n,Xf(e.priority,function(){Tm(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function gu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=tc(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);ts=a,l.target.dispatchEvent(a),ts=null}else return n=fi(l),n!==null&&_m(n),e.blockedOn=l,!1;n.shift()}return!0}function Rm(e,n,l){gu(e)&&l.delete(n)}function h0(){lc=!1,Cl!==null&&gu(Cl)&&(Cl=null),El!==null&&gu(El)&&(El=null),_l!==null&&gu(_l)&&(_l=null),Yr.forEach(Rm),Gr.forEach(Rm)}function xu(e,n){e.blockedOn===n&&(e.blockedOn=null,lc||(lc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,h0)))}var yu=null;function Mm(e){yu!==e&&(yu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){yu===e&&(yu=null);for(var n=0;n<e.length;n+=3){var l=e[n],a=e[n+1],s=e[n+2];if(typeof a!="function"){if(nc(a||l)===null)continue;break}var h=fi(l);h!==null&&(e.splice(n,3),n-=3,eo(h,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function Xi(e){function n(A){return xu(A,e)}Cl!==null&&xu(Cl,e),El!==null&&xu(El,e),_l!==null&&xu(_l,e),Yr.forEach(n),Gr.forEach(n);for(var l=0;l<Tl.length;l++){var a=Tl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Tl.length&&(l=Tl[0],l.blockedOn===null);)Dm(l),l.blockedOn===null&&Tl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],h=l[a+1],b=s[qt]||null;if(typeof h=="function")b||Mm(l);else if(b){var k=null;if(h&&h.hasAttribute("formAction")){if(s=h,b=h[qt]||null)k=b.formAction;else if(nc(s)!==null)continue}else k=b.action;typeof k=="function"?l[a+1]=k:(l.splice(a,3),a-=3),Mm(l)}}}function Om(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(b){return s=b})},focusReset:"manual",scroll:"manual"})}function n(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),s!==null&&(s(),s=null)}}}function ic(e){this._internalRoot=e}bu.prototype.render=ic.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(u(409));var l=n.current,a=Wt();Cm(l,a,e,n,null,null)},bu.prototype.unmount=ic.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Cm(e.current,2,null,e,null,null),Wa(),n[oi]=null}};function bu(e){this._internalRoot=e}bu.prototype.unstable_scheduleHydration=function(e){if(e){var n=Ff();e={blockedOn:null,target:e,priority:n};for(var l=0;l<Tl.length&&n!==0&&n<Tl[l].priority;l++);Tl.splice(l,0,e),l===0&&Dm(e)}};var Lm=i.version;if(Lm!=="19.2.8")throw Error(u(527,Lm,"19.2.8"));Q.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=m(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var p0={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vu.isDisabled&&vu.supportsFiber)try{bt=vu.inject(p0),rt=vu}catch{}}return Xr.createRoot=function(e,n){if(!o(e))throw Error(u(299));var l=!1,a="",s=Gh,h=Vh,b=Fh;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=jm(e,1,!1,null,null,l,a,null,s,h,b,Om),e[oi]=n.current,Bo(e),new ic(n)},Xr.hydrateRoot=function(e,n,l){if(!o(e))throw Error(u(299));var a=!1,s="",h=Gh,b=Vh,k=Fh,A=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(h=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(A=l.formState)),n=jm(e,1,!0,n,l??null,a,s,A,h,b,k,Om),n.context=Nm(null),l=n.current,a=Wt(),a=$u(a),s=pl(a),s.callback=null,ml(l,s,a),l=a,n.current.lanes=l,tr(n,l),Rn(n),e[oi]=n.current,Bo(e),new bu(n)},Xr.version="19.2.8",Xr}var Xm;function j0(){if(Xm)return uc.exports;Xm=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(i){console.error(i)}}return t(),uc.exports=w0(),uc.exports}var N0=j0();const C0=Uu(N0);function E0(t,i){const r=t.getElementById("product-config");if(!r)return i;let u;try{u=JSON.parse(r.textContent??"")}catch{throw new Error("Invalid public product configuration.")}if(typeof u!="object"||u===null)throw new Error("Invalid public product configuration.");const o=u,c=o.identity?.displayName,f=o.identity?.cliName,p=o.storage?.browserNamespace;if(![c,f,p].every(g=>typeof g=="string"&&g.trim()!==""))throw new Error("Public product configuration is missing required identity fields.");return{identity:{displayName:c,cliName:f},storage:{browserNamespace:p}}}const _0=Object.freeze(["not_available","stopping","in_progress","prompt_pending","unknown_session","unreadable","start_failed","limit","failed"]),T0=Object.freeze(["not_available","stopping","unknown_session","live_elsewhere","running","failed"]),A0="owner",Sx="agent";function qe(t){return typeof t=="object"&&!!t&&!Array.isArray(t)}const ke=t=>typeof t=="string",Pe=t=>typeof t=="string"&&t.length>0,Dl=t=>typeof t=="boolean",Au=t=>typeof t=="number"&&Number.isFinite(t),fc=t=>Number.isSafeInteger(t)&&t>=0,wt=t=>i=>i===void 0||t(i),Wl=t=>Array.isArray(t)&&t.every(qe),$m=t=>t===null||qe(t),kn=t=>i=>typeof i=="string"&&t.includes(i),z0={user:!0,"agent-wakeup":!0,peer:!0,external:!0},D0=t=>qe(t)&&ke(t.id)&&ke(t.timestamp)&&ke(t.category)&&ke(t.type),R0=t=>Array.isArray(t)&&t.every(D0),M0=t=>qe(t)&&ke(t.name)&&ke(t.description)&&ke(t.definedIn),O0=t=>Array.isArray(t)&&t.every(M0),L0=["cancel","close","send"],Qm={none:{},several:{message:ke},stopped:{loopId:Pe,message:wt(ke)},failed:{loopId:wt(Pe),message:ke}},U0=t=>{if(!qe(t)||!ke(t.kind))return!1;let i=t.kind;if(!Object.prototype.hasOwnProperty.call(Qm,i))return!1;let r=Qm[i];return Object.entries(r).every(([u,o])=>o(t[u]))};function hf(t){return i=>{if(!qe(i)||!ke(i.kind))return!1;let r=Object.prototype.hasOwnProperty.call(t,i.kind)?t[i.kind]:void 0;return r!==void 0&&Object.entries(r).every(([u,o])=>o(i[u]))}}const q0=["Added","Modified","Deleted","Renamed","Copied","Untracked","Conflicted"],B0=t=>qe(t)&&Pe(t.path)&&kn(q0)(t.status)&&wt(Pe)(t.renamedFrom)&&wt(Au)(t.added)&&wt(Au)(t.removed),H0=hf({status:{branch:wt(ke),unborn:Dl,files:t=>Array.isArray(t)&&t.every(B0),truncated:Dl},"not-a-repository":{},failed:{message:ke}}),I0=["add","remove","context","hunk"],Y0=t=>qe(t)&&kn(I0)(t.type)&&ke(t.text)&&Au(t.lineNumber),G0=hf({diff:{diffLines:t=>Array.isArray(t)&&t.every(Y0),truncated:Dl},"not-a-repository":{},"outside-workspace":{},failed:{message:ke}}),V0=hf({memory:{content:ke,path:Pe,truncated:Dl},unavailable:{message:ke}}),ll={driverId:wt(ke)},F0={text_delta:{delta:ke,...ll},user_message:{content:ke,...ll},tool_start:{state:qe,...ll},tool_end:{state:qe,...ll},thinking:{isThinking:Dl,...ll},complete:{result:qe,...ll},interrupted:{result:qe,...ll},error:{message:ke,code:wt(kn(["auth","rate_limit","model_unavailable","network","provider"])),provider:wt(ke),retryAfterSeconds:wt(Au),model:wt(ke),...ll},command_result:{name:ke,message:ke,success:Dl,requestId:wt(ke)},messages:{messages:Wl,display:wt(Wl),...ll},history:{startIndex:fc,total:fc,entries:R0},context:{state:qe},history_changed:{},turn_source:{source:kn(Object.keys(z0))},commands:{commands:Wl,skills:Wl},session_status:{status:qe},model_list:{requestId:Pe,groups:Wl,currentProfile:wt(ke),currentModel:ke},agent_definitions:{requestId:Pe,agents:O0,current:Pe},sessions:{requestId:Pe,listing:qe},sessions_error:{requestId:Pe,code:kn(["not_available","list_failed"]),message:ke},session_switched:{event:qe},session_change_failed:{code:kn(_0),message:ke,requestId:wt(ke)},session_renamed_in_list:{requestId:Pe,sessionId:ke,name:ke},session_rename_failed:{requestId:Pe,message:ke},session_deleted:{requestId:Pe,sessionId:ke},session_delete_failed:{requestId:Pe,code:kn(T0),message:ke},usage_report:{report:qe},personal_usage_report:{requestId:Pe,report:qe},personal_usage_report_error:{requestId:Pe,code:kn(["not_available","report_failed"]),message:ke},stored_session_usage_report:{requestId:Pe,sessionId:Pe,report:qe},stored_session_usage_report_error:{requestId:Pe,sessionId:Pe,code:kn(["not_available","report_failed"]),message:ke},executing:{executing:Dl},pending:{pending:t=>t===null||ke(t),pendingCount:wt(fc)},execution_workspace_event:{snapshot:qe},execution_detail:{requestId:Pe,page:qe},execution_detail_error:{requestId:Pe,message:ke},waiting_loop_stop:{requestId:Pe,outcome:U0},project_status:{requestId:Pe,result:H0},project_diff:{requestId:Pe,result:G0},project_memory:{requestId:Pe,result:V0},background_task_event:{event:qe},background_job_group_event:{event:qe},plan_event:{event:qe},context_file_refreshed:{event:qe},branch_event:{event:qe},background_tasks:{tasks:Wl},background_task:{taskId:ke,task:$m},background_job_groups:{groups:Wl},background_job_group:{groupId:ke,group:$m},background_task_log:{taskId:ke,page:qe},permission_request:{event:qe},ask_request:{event:qe},prompt_resolved:{event:qe},ui_intent:{event:qe},session_renamed:{event:qe},history_cleared:{},background_task_control_result:{action:kn(L0),taskId:ke,success:Dl,message:wt(ke)},protocol_error:{message:ke,requestId:wt(ke)},resume_gap:{},settings:{requestId:Pe,settings:qe},settings_error:{requestId:Pe,code:kn(["not_available","invalid","refused","update_failed"]),message:ke}};function X0(t,i,r){if(!qe(t))return{ok:!1,reason:"message must be a JSON object"};let u=t.type;if(!ke(u))return{ok:!1,reason:"message type must be a string"};let o=Object.prototype.hasOwnProperty.call(i,u)?i[u]:void 0;if(o===void 0)return{ok:!1,reason:`Unknown message type: ${u}`};for(let[c,f]of Object.entries(o))if(!f(t[c]))return{ok:!1,reason:r(c)};return{ok:!0,message:t}}function $0(t){return X0(t,F0,i=>`${i} has an invalid shape`)}function Q0(t,i){if(t.length>4194304)return{ok:!1,reason:"Frame too large"};let r;try{r=JSON.parse(t)}catch{return{ok:!1,reason:"Invalid JSON"}}return i(r)}function Z0(t,i){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const K0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,J0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,P0={};function Zm(t,i){return(P0.jsx?J0:K0).test(t)}const W0=/[ \t\n\f\r]/g;function ev(t){return typeof t=="object"?t.type==="text"?Km(t.value):!1:Km(t)}function Km(t){return t.replace(W0,"")===""}class ia{constructor(i,r,u){this.normal=r,this.property=i,u&&(this.space=u)}}ia.prototype.normal={};ia.prototype.property={};ia.prototype.space=void 0;function kx(t,i){const r={},u={};for(const o of t)Object.assign(r,o.property),Object.assign(u,o.normal);return new ia(r,u,i)}function Fc(t){return t.toLowerCase()}class Xt{constructor(i,r){this.attribute=r,this.property=i}}Xt.prototype.attribute="";Xt.prototype.booleanish=!1;Xt.prototype.boolean=!1;Xt.prototype.commaOrSpaceSeparated=!1;Xt.prototype.commaSeparated=!1;Xt.prototype.defined=!1;Xt.prototype.mustUseProperty=!1;Xt.prototype.number=!1;Xt.prototype.overloadedBoolean=!1;Xt.prototype.property="";Xt.prototype.spaceSeparated=!1;Xt.prototype.space=void 0;let tv=0;const je=ri(),gt=ri(),Xc=ri(),te=ri(),et=ri(),ni=ri(),en=ri();function ri(){return 2**++tv}const $c=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:gt,commaOrSpaceSeparated:en,commaSeparated:ni,number:te,overloadedBoolean:Xc,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),dc=Object.keys($c);class pf extends Xt{constructor(i,r,u,o){let c=-1;if(super(i,r),Jm(this,"space",o),typeof u=="number")for(;++c<dc.length;){const f=dc[c];Jm(this,dc[c],(u&$c[f])===$c[f])}}}pf.prototype.defined=!0;function Jm(t,i,r){r&&(t[i]=r)}function Pi(t){const i={},r={};for(const[u,o]of Object.entries(t.properties)){const c=new pf(u,t.transform(t.attributes||{},u),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(u)&&(c.mustUseProperty=!0),i[u]=c,r[Fc(u)]=u,r[Fc(c.attribute)]=u}return new ia(i,r,t.space)}const wx=Pi({properties:{ariaActiveDescendant:null,ariaAtomic:gt,ariaAutoComplete:null,ariaBusy:gt,ariaChecked:gt,ariaColCount:te,ariaColIndex:te,ariaColSpan:te,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:gt,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:gt,ariaFlowTo:et,ariaGrabbed:gt,ariaHasPopup:null,ariaHidden:gt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:te,ariaLive:null,ariaModal:gt,ariaMultiLine:gt,ariaMultiSelectable:gt,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:te,ariaPressed:gt,ariaReadOnly:gt,ariaRelevant:null,ariaRequired:gt,ariaRoleDescription:et,ariaRowCount:te,ariaRowIndex:te,ariaRowSpan:te,ariaSelected:gt,ariaSetSize:te,ariaSort:null,ariaValueMax:te,ariaValueMin:te,ariaValueNow:te,ariaValueText:null,role:null},transform(t,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function jx(t,i){return i in t?t[i]:i}function Nx(t,i){return jx(t,i.toLowerCase())}const nv=Pi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ni,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alpha:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:et,autoFocus:je,autoPlay:je,blocking:et,capture:null,charSet:null,checked:je,cite:null,className:et,closedBy:null,colorSpace:null,cols:te,colSpan:te,command:null,commandFor:null,content:null,contentEditable:gt,controls:je,controlsList:et,coords:te|ni,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:Xc,draggable:gt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:et,height:te,hidden:Xc,high:te,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:et,itemRef:et,itemScope:je,itemType:et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:te,manifest:null,max:null,maxLength:te,media:null,method:null,min:null,minLength:te,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:te,pattern:null,ping:et,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:et,required:je,reversed:je,rows:te,rowSpan:te,sandbox:et,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootCustomElementRegistry:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shadowRootSerializable:je,shape:null,size:te,sizes:null,slot:null,span:te,spellCheck:gt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:te,step:null,style:null,tabIndex:te,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:gt,width:te,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:et,axis:null,background:null,bgColor:null,border:te,borderColor:null,bottomMargin:te,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:te,leftMargin:te,link:null,longDesc:null,lowSrc:null,marginHeight:te,marginWidth:te,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:te,rules:null,scheme:null,scrolling:gt,standby:null,summary:null,text:null,topMargin:te,valueType:null,version:null,vAlign:null,vLink:null,vSpace:te,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:je,disablePictureInPicture:je,disableRemotePlayback:je,exportParts:ni,part:et,prefix:null,property:null,results:te,security:null,unselectable:null},space:"html",transform:Nx}),lv=Pi({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",maskType:"mask-type",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:en,accentHeight:te,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:te,amplitude:te,arabicForm:null,ascent:te,attributeName:null,attributeType:null,azimuth:te,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:te,by:null,calcMode:null,capHeight:te,className:et,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:te,diffuseConstant:te,direction:null,display:null,dur:null,divisor:te,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:te,enableBackground:null,end:null,event:null,exponent:te,externalResourcesRequired:null,fill:null,fillOpacity:te,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:ni,g2:ni,glyphName:ni,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:te,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:te,horizOriginX:te,horizOriginY:te,id:null,ideographic:te,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:te,k:te,k1:te,k2:te,k3:te,k4:te,kernelMatrix:en,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:te,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:te,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:te,overlineThickness:te,paintOrder:null,panose1:null,path:null,pathLength:te,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:te,pointsAtY:te,pointsAtZ:te,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:en,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:en,rev:en,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:en,requiredFeatures:en,requiredFonts:en,requiredFormats:en,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:te,specularExponent:te,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:te,strikethroughThickness:te,string:null,stroke:null,strokeDashArray:en,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:te,strokeOpacity:te,strokeWidth:null,style:null,surfaceScale:te,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:en,tabIndex:te,tableValues:null,target:null,targetX:te,targetY:te,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:en,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:te,underlineThickness:te,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:te,values:null,vAlphabetic:te,vMathematical:te,vectorEffect:null,vHanging:te,vIdeographic:te,version:null,vertAdvY:te,vertOriginX:te,vertOriginY:te,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:te,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:jx}),Cx=Pi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,i){return"xlink:"+i.slice(5).toLowerCase()}}),Ex=Pi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nx}),_x=Pi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,i){return"xml:"+i.slice(3).toLowerCase()}}),iv={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"},rv=/[A-Z]/g,Pm=/-[a-z]/g,av=/^data[-\w.:]+$/i;function uv(t,i){const r=Fc(i);let u=i,o=Xt;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&av.test(i)){if(i.charAt(4)==="-"){const c=i.slice(5).replace(Pm,ov);u="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=i.slice(4);if(!Pm.test(c)){let f=c.replace(rv,sv);f.charAt(0)!=="-"&&(f="-"+f),i="data"+f}}o=pf}return new o(u,i)}function sv(t){return"-"+t.toLowerCase()}function ov(t){return t.charAt(1).toUpperCase()}const cv=kx([wx,nv,Cx,Ex,_x],"html"),mf=kx([wx,lv,Cx,Ex,_x],"svg");function fv(t){return t.join(" ").trim()}var $i={},hc,Wm;function dv(){if(Wm)return hc;Wm=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,p=/^\s+|\s+$/g,g=`
|
|
50
|
-
`,m="/",y="*",x="",S="comment",v="declaration";function N(L,C){if(typeof L!="string")throw new TypeError("First argument must be a string");if(!L)return[];C=C||{};var F=1,U=1;function X(oe){var P=oe.match(i);P&&(F+=P.length);var D=oe.lastIndexOf(g);U=~D?oe.length-D:U+oe.length}function ie(){var oe={line:F,column:U};return function(P){return P.position=new R(oe),W(),P}}function R(oe){this.start=oe,this.end={line:F,column:U},this.source=C.source}R.prototype.content=L;function I(oe){var P=new Error(C.source+":"+F+":"+U+": "+oe);if(P.reason=oe,P.filename=C.source,P.line=F,P.column=U,P.source=L,!C.silent)throw P}function ue(oe){var P=oe.exec(L);if(P){var D=P[0];return X(D),L=L.slice(D.length),P}}function W(){ue(r)}function O(oe){var P;for(oe=oe||[];P=ne();)P!==!1&&oe.push(P);return oe}function ne(){var oe=ie();if(!(m!=L.charAt(0)||y!=L.charAt(1))){for(var P=2;x!=L.charAt(P)&&(y!=L.charAt(P)||m!=L.charAt(P+1));)++P;if(P+=2,x===L.charAt(P-1))return I("End of comment missing");var D=L.slice(2,P-2);return U+=2,X(D),L=L.slice(P),U+=2,oe({type:S,comment:D})}}function re(){var oe=ie(),P=ue(u);if(P){if(ne(),!ue(o))return I("property missing ':'");var D=ue(c),Q=oe({type:v,property:T(P[0].replace(t,x)),value:D?T(D[0].replace(t,x)):x});return ue(f),Q}}function ge(){var oe=[];O(oe);for(var P;P=re();)P!==!1&&(oe.push(P),O(oe));return oe}return W(),ge()}function T(L){return L?L.replace(p,x):x}return hc=N,hc}var eg;function hv(){if(eg)return $i;eg=1;var t=$i&&$i.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty($i,"__esModule",{value:!0}),$i.default=r;const i=t(dv());function r(u,o){let c=null;if(!u||typeof u!="string")return c;const f=(0,i.default)(u),p=typeof o=="function";return f.forEach(g=>{if(g.type!=="declaration")return;const{property:m,value:y}=g;p?o(m,y,g):y&&(c=c||{},c[m]=y)}),c}return $i}var $r={},tg;function pv(){if(tg)return $r;tg=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,u=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,c=function(m){return!m||r.test(m)||t.test(m)},f=function(m,y){return y.toUpperCase()},p=function(m,y){return"".concat(y,"-")},g=function(m,y){return y===void 0&&(y={}),c(m)?m:(m=m.toLowerCase(),y.reactCompat?m=m.replace(o,p):m=m.replace(u,p),m.replace(i,f))};return $r.camelCase=g,$r}var Qr,ng;function mv(){if(ng)return Qr;ng=1;var t=Qr&&Qr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},i=t(hv()),r=pv();function u(o,c){var f={};return!o||typeof o!="string"||(0,i.default)(o,function(p,g){p&&g&&(f[(0,r.camelCase)(p,c)]=g)}),f}return u.default=u,Qr=u,Qr}var gv=mv();const xv=Uu(gv),Tx=Ax("end"),gf=Ax("start");function Ax(t){return i;function i(r){const u=r&&r.position&&r.position[t]||{};if(typeof u.line=="number"&&u.line>0&&typeof u.column=="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset=="number"&&u.offset>-1?u.offset:void 0}}}function yv(t){const i=gf(t),r=Tx(t);if(i&&r)return{start:i,end:r}}function Wr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?lg(t.position):"start"in t||"end"in t?lg(t):"line"in t||"column"in t?Qc(t):""}function Qc(t){return ig(t&&t.line)+":"+ig(t&&t.column)}function lg(t){return Qc(t&&t.start)+"-"+Qc(t&&t.end)}function ig(t){return t&&typeof t=="number"?t:1}class Ot extends Error{constructor(i,r,u){super(),typeof r=="string"&&(u=r,r=void 0);let o="",c={},f=!1;if(r&&("line"in r&&"column"in r?c={place:r}:"start"in r&&"end"in r?c={place:r}:"type"in r?c={ancestors:[r],place:r.position}:c={...r}),typeof i=="string"?o=i:!c.cause&&i&&(f=!0,o=i.message,c.cause=i),!c.ruleId&&!c.source&&typeof u=="string"){const g=u.indexOf(":");g===-1?c.ruleId=u:(c.source=u.slice(0,g),c.ruleId=u.slice(g+1))}if(!c.place&&c.ancestors&&c.ancestors){const g=c.ancestors[c.ancestors.length-1];g&&(c.place=g.position)}const p=c.place&&"start"in c.place?c.place.start:c.place;this.ancestors=c.ancestors||void 0,this.cause=c.cause||void 0,this.column=p?p.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=p?p.line:void 0,this.name=Wr(c.place)||"1:1",this.place=c.place||void 0,this.reason=this.message,this.ruleId=c.ruleId||void 0,this.source=c.source||void 0,this.stack=f&&c.cause&&typeof c.cause.stack=="string"?c.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ot.prototype.file="";Ot.prototype.name="";Ot.prototype.reason="";Ot.prototype.message="";Ot.prototype.stack="";Ot.prototype.column=void 0;Ot.prototype.line=void 0;Ot.prototype.ancestors=void 0;Ot.prototype.cause=void 0;Ot.prototype.fatal=void 0;Ot.prototype.place=void 0;Ot.prototype.ruleId=void 0;Ot.prototype.source=void 0;const xf={}.hasOwnProperty,bv=new Map,vv=/[A-Z]/g,Sv=new Set(["table","tbody","thead","tfoot","tr"]),kv=new Set(["td","th"]),zx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wv(t,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let u;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");u=zv(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");u=Av(r,i.jsx,i.jsxs)}const o={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:u,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?mf:cv,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},c=Dx(o,t,void 0);return c&&typeof c!="string"?c:o.create(t,o.Fragment,{children:c||void 0},void 0)}function Dx(t,i,r){if(i.type==="element")return jv(t,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return Nv(t,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return Ev(t,i,r);if(i.type==="mdxjsEsm")return Cv(t,i);if(i.type==="root")return _v(t,i,r);if(i.type==="text")return Tv(t,i)}function jv(t,i,r){const u=t.schema;let o=u;i.tagName.toLowerCase()==="svg"&&u.space==="html"&&(o=mf,t.schema=o),t.ancestors.push(i);const c=Mx(t,i.tagName,!1),f=Dv(t,i);let p=bf(t,i);return Sv.has(i.tagName)&&(p=p.filter(function(g){return typeof g=="string"?!ev(g):!0})),Rx(t,f,c,i),yf(f,p),t.ancestors.pop(),t.schema=u,t.create(i,c,f,r)}function Nv(t,i){if(i.data&&i.data.estree&&t.evaluater){const u=i.data.estree.body[0];return u.type,t.evaluater.evaluateExpression(u.expression)}na(t,i.position)}function Cv(t,i){if(i.data&&i.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(i.data.estree);na(t,i.position)}function Ev(t,i,r){const u=t.schema;let o=u;i.name==="svg"&&u.space==="html"&&(o=mf,t.schema=o),t.ancestors.push(i);const c=i.name===null?t.Fragment:Mx(t,i.name,!0),f=Rv(t,i),p=bf(t,i);return Rx(t,f,c,i),yf(f,p),t.ancestors.pop(),t.schema=u,t.create(i,c,f,r)}function _v(t,i,r){const u={};return yf(u,bf(t,i)),t.create(i,t.Fragment,u,r)}function Tv(t,i){return i.value}function Rx(t,i,r,u){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(i.node=u)}function yf(t,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(t.children=r)}}function Av(t,i,r){return u;function u(o,c,f,p){const m=Array.isArray(f.children)?r:i;return p?m(c,f,p):m(c,f)}}function zv(t,i){return r;function r(u,o,c,f){const p=Array.isArray(c.children),g=gf(u);return i(o,c,f,p,{columnNumber:g?g.column-1:void 0,fileName:t,lineNumber:g?g.line:void 0},void 0)}}function Dv(t,i){const r={};let u,o;for(o in i.properties)if(o!=="children"&&xf.call(i.properties,o)){const c=Mv(t,o,i.properties[o]);if(c){const[f,p]=c;t.tableCellAlignToStyle&&f==="align"&&typeof p=="string"&&kv.has(i.tagName)?u=p:r[f]=p}}if(u){const c=r.style||(r.style={});c[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=u}return r}function Rv(t,i){const r={};for(const u of i.attributes)if(u.type==="mdxJsxExpressionAttribute")if(u.data&&u.data.estree&&t.evaluater){const c=u.data.estree.body[0];c.type;const f=c.expression;f.type;const p=f.properties[0];p.type,Object.assign(r,t.evaluater.evaluateExpression(p.argument))}else na(t,i.position);else{const o=u.name;let c;if(u.value&&typeof u.value=="object")if(u.value.data&&u.value.data.estree&&t.evaluater){const p=u.value.data.estree.body[0];p.type,c=t.evaluater.evaluateExpression(p.expression)}else na(t,i.position);else c=u.value===null?!0:u.value;r[o]=c}return r}function bf(t,i){const r=[];let u=-1;const o=t.passKeys?new Map:bv;for(;++u<i.children.length;){const c=i.children[u];let f;if(t.passKeys){const g=c.type==="element"?c.tagName:c.type==="mdxJsxFlowElement"||c.type==="mdxJsxTextElement"?c.name:void 0;if(g){const m=o.get(g)||0;f=g+"-"+m,o.set(g,m+1)}}const p=Dx(t,c,f);p!==void 0&&r.push(p)}return r}function Mv(t,i,r){const u=uv(t.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=u.commaSeparated?Z0(r):fv(r)),u.property==="style"){let o=typeof r=="object"?r:Ov(t,String(r));return t.stylePropertyNameCase==="css"&&(o=Lv(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&u.space?iv[u.property]||u.property:u.attribute,r]}}function Ov(t,i){try{return xv(i,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const u=r,o=new Ot("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:u,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=zx+"#cannot-parse-style-attribute",o}}function Mx(t,i,r){let u;if(!r)u={type:"Literal",value:i};else if(i.includes(".")){const o=i.split(".");let c=-1,f;for(;++c<o.length;){const p=Zm(o[c])?{type:"Identifier",name:o[c]}:{type:"Literal",value:o[c]};f=f?{type:"MemberExpression",object:f,property:p,computed:!!(c&&p.type==="Literal"),optional:!1}:p}u=f}else u=Zm(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(u.type==="Literal"){const o=u.value;return xf.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(u);na(t)}function na(t,i){const r=new Ot("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=zx+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Lv(t){const i={};let r;for(r in t)xf.call(t,r)&&(i[Uv(r)]=t[r]);return i}function Uv(t){let i=t.replace(vv,qv);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function qv(t){return"-"+t.toLowerCase()}const pc={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"]},Bv={};function vf(t,i){const r=Bv,u=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Ox(t,u,o)}function Ox(t,i,r){if(Hv(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(i&&"alt"in t&&t.alt)return t.alt;if("children"in t)return rg(t.children,i,r)}return Array.isArray(t)?rg(t,i,r):""}function rg(t,i,r){const u=[];let o=-1;for(;++o<t.length;)u[o]=Ox(t[o],i,r);return u.join("")}function Hv(t){return!!(t&&typeof t=="object")}const ag=document.createElement("i");function Sf(t){const i="&"+t+";";ag.innerHTML=i;const r=ag.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===i?!1:r}function tn(t,i,r,u){const o=t.length;let c=0,f;if(i<0?i=-i>o?0:o+i:i=i>o?o:i,r=r>0?r:0,u.length<1e4)f=Array.from(u),f.unshift(i,r),t.splice(...f);else for(r&&t.splice(i,r);c<u.length;)f=u.slice(c,c+1e4),f.unshift(i,0),t.splice(...f),c+=1e4,i+=1e4}function xn(t,i){return t.length>0?(tn(t,t.length,0,i),t):i}const ug={}.hasOwnProperty;function Lx(t){const i={};let r=-1;for(;++r<t.length;)Iv(i,t[r]);return i}function Iv(t,i){let r;for(r in i){const o=(ug.call(t,r)?t[r]:void 0)||(t[r]={}),c=i[r];let f;if(c)for(f in c){ug.call(o,f)||(o[f]=[]);const p=c[f];Yv(o[f],Array.isArray(p)?p:p?[p]:[])}}}function Yv(t,i){let r=-1;const u=[];for(;++r<i.length;)(i[r].add==="after"?t:u).push(i[r]);tn(t,0,0,u)}function Ux(t,i){const r=Number.parseInt(t,i);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function wn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ut=Ml(/[A-Za-z]/),Mt=Ml(/[\dA-Za-z]/),Gv=Ml(/[#-'*+\--9=?A-Z^-~]/);function zu(t){return t!==null&&(t<32||t===127)}const Zc=Ml(/\d/),Vv=Ml(/[\dA-Fa-f]/),Fv=Ml(/[!-/:-@[-`{-~]/);function ve(t){return t!==null&&t<-2}function tt(t){return t!==null&&(t<0||t===32)}function Re(t){return t===-2||t===-1||t===32}const qu=Ml(/\p{P}|\p{S}/u),ii=Ml(/\s/);function Ml(t){return i;function i(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function Wi(t){const i=[];let r=-1,u=0,o=0;for(;++r<t.length;){const c=t.charCodeAt(r);let f="";if(c===37&&Mt(t.charCodeAt(r+1))&&Mt(t.charCodeAt(r+2)))o=2;else if(c<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(c))||(f=String.fromCharCode(c));else if(c>55295&&c<57344){const p=t.charCodeAt(r+1);c<56320&&p>56319&&p<57344?(f=String.fromCharCode(c,p),o=1):f="�"}else f=String.fromCharCode(c);f&&(i.push(t.slice(u,r),encodeURIComponent(f)),u=r+o+1,f=""),o&&(r+=o,o=0)}return i.join("")+t.slice(u)}function Be(t,i,r,u){const o=u?u-1:Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return Re(g)?(t.enter(r),p(g)):i(g)}function p(g){return Re(g)&&c++<o?(t.consume(g),p):(t.exit(r),i(g))}}const Xv={tokenize:$v};function $v(t){const i=t.attempt(this.parser.constructs.contentInitial,u,o);let r;return i;function u(p){if(p===null){t.consume(p);return}return t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),Be(t,i,"linePrefix")}function o(p){return t.enter("paragraph"),c(p)}function c(p){const g=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=g),r=g,f(p)}function f(p){if(p===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(p);return}return ve(p)?(t.consume(p),t.exit("chunkText"),c):(t.consume(p),f)}}const Qv={tokenize:Zv},sg={tokenize:Kv};function Zv(t){const i=this,r=[];let u=0,o,c,f;return p;function p(U){if(u<r.length){const X=r[u];return i.containerState=X[1],t.attempt(X[0].continuation,g,m)(U)}return m(U)}function g(U){if(u++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,o&&F();const X=i.events.length;let ie=X,R;for(;ie--;)if(i.events[ie][0]==="exit"&&i.events[ie][1].type==="chunkFlow"){R=i.events[ie][1].end;break}C(u);let I=X;for(;I<i.events.length;)i.events[I][1].end={...R},I++;return tn(i.events,ie+1,0,i.events.slice(X)),i.events.length=I,m(U)}return p(U)}function m(U){if(u===r.length){if(!o)return S(U);if(o.currentConstruct&&o.currentConstruct.concrete)return N(U);i.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return i.containerState={},t.check(sg,y,x)(U)}function y(U){return o&&F(),C(u),S(U)}function x(U){return i.parser.lazy[i.now().line]=u!==r.length,f=i.now().offset,N(U)}function S(U){return i.containerState={},t.attempt(sg,v,N)(U)}function v(U){return u++,r.push([i.currentConstruct,i.containerState]),S(U)}function N(U){if(U===null){o&&F(),C(0),t.consume(U);return}return o=o||i.parser.flow(i.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:c}),T(U)}function T(U){if(U===null){L(t.exit("chunkFlow"),!0),C(0),t.consume(U);return}return ve(U)?(t.consume(U),L(t.exit("chunkFlow")),u=0,i.interrupt=void 0,p):(t.consume(U),T)}function L(U,X){const ie=i.sliceStream(U);if(X&&ie.push(null),U.previous=c,c&&(c.next=U),c=U,o.defineSkip(U.start),o.write(ie),i.parser.lazy[U.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<f&&(!o.events[R][1].end||o.events[R][1].end.offset>f))return;const I=i.events.length;let ue=I,W,O;for(;ue--;)if(i.events[ue][0]==="exit"&&i.events[ue][1].type==="chunkFlow"){if(W){O=i.events[ue][1].end;break}W=!0}for(C(u),R=I;R<i.events.length;)i.events[R][1].end={...O},R++;tn(i.events,ue+1,0,i.events.slice(I)),i.events.length=R}}function C(U){let X=r.length;for(;X-- >U;){const ie=r[X];i.containerState=ie[1],ie[0].exit.call(i,t)}r.length=U}function F(){o.write([null]),c=void 0,o=void 0,i.containerState._closeFlow=void 0}}function Kv(t,i,r){return Be(t,t.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ji(t){if(t===null||tt(t)||ii(t))return 1;if(qu(t))return 2}function Bu(t,i,r){const u=[];let o=-1;for(;++o<t.length;){const c=t[o].resolveAll;c&&!u.includes(c)&&(i=c(i,r),u.push(c))}return i}const Kc={name:"attention",resolveAll:Jv,tokenize:Pv};function Jv(t,i){let r=-1,u,o,c,f,p,g,m,y;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(u=r;u--;)if(t[u][0]==="exit"&&t[u][1].type==="attentionSequence"&&t[u][1]._open&&i.sliceSerialize(t[u][1]).charCodeAt(0)===i.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[u][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[u][1].end.offset-t[u][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;g=t[u][1].end.offset-t[u][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const x={...t[u][1].end},S={...t[r][1].start};og(x,-g),og(S,g),f={type:g>1?"strongSequence":"emphasisSequence",start:x,end:{...t[u][1].end}},p={type:g>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:S},c={type:g>1?"strongText":"emphasisText",start:{...t[u][1].end},end:{...t[r][1].start}},o={type:g>1?"strong":"emphasis",start:{...f.start},end:{...p.end}},t[u][1].end={...f.start},t[r][1].start={...p.end},m=[],t[u][1].end.offset-t[u][1].start.offset&&(m=xn(m,[["enter",t[u][1],i],["exit",t[u][1],i]])),m=xn(m,[["enter",o,i],["enter",f,i],["exit",f,i],["enter",c,i]]),m=xn(m,Bu(i.parser.constructs.insideSpan.null,t.slice(u+1,r),i)),m=xn(m,[["exit",c,i],["enter",p,i],["exit",p,i],["exit",o,i]]),t[r][1].end.offset-t[r][1].start.offset?(y=2,m=xn(m,[["enter",t[r][1],i],["exit",t[r][1],i]])):y=0,tn(t,u-1,r-u+3,m),r=u+m.length-y-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function Pv(t,i){const r=this.parser.constructs.attentionMarkers.null,u=this.previous,o=Ji(u);let c;return f;function f(g){return c=g,t.enter("attentionSequence"),p(g)}function p(g){if(g===c)return t.consume(g),p;const m=t.exit("attentionSequence"),y=Ji(g),x=!y||y===2&&o||r.includes(g),S=!o||o===2&&y||r.includes(u);return m._open=!!(c===42?x:x&&(o||!S)),m._close=!!(c===42?S:S&&(y||!x)),i(g)}}function og(t,i){t.column+=i,t.offset+=i,t._bufferIndex+=i}const Wv={name:"autolink",tokenize:eS};function eS(t,i,r){let u=0;return o;function o(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),c}function c(v){return Ut(v)?(t.consume(v),f):v===64?r(v):m(v)}function f(v){return v===43||v===45||v===46||Mt(v)?(u=1,p(v)):m(v)}function p(v){return v===58?(t.consume(v),u=0,g):(v===43||v===45||v===46||Mt(v))&&u++<32?(t.consume(v),p):(u=0,m(v))}function g(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),i):v===null||v===32||v===60||zu(v)?r(v):(t.consume(v),g)}function m(v){return v===64?(t.consume(v),y):Gv(v)?(t.consume(v),m):r(v)}function y(v){return Mt(v)?x(v):r(v)}function x(v){return v===46?(t.consume(v),u=0,y):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),i):S(v)}function S(v){if((v===45||Mt(v))&&u++<63){const N=v===45?S:x;return t.consume(v),N}return r(v)}}const ra={partial:!0,tokenize:tS};function tS(t,i,r){return u;function u(c){return Re(c)?Be(t,o,"linePrefix")(c):o(c)}function o(c){return c===null||ve(c)?i(c):r(c)}}const qx={continuation:{tokenize:lS},exit:iS,name:"blockQuote",tokenize:nS};function nS(t,i,r){const u=this;return o;function o(f){if(f===62){const p=u.containerState;return p.open||(t.enter("blockQuote",{_container:!0}),p.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(f),t.exit("blockQuoteMarker"),c}return r(f)}function c(f){return Re(f)?(t.enter("blockQuotePrefixWhitespace"),t.consume(f),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),i):(t.exit("blockQuotePrefix"),i(f))}}function lS(t,i,r){const u=this;return o;function o(f){return Re(f)?Be(t,c,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):c(f)}function c(f){return t.attempt(qx,i,r)(f)}}function iS(t){t.exit("blockQuote")}const Bx={name:"characterEscape",tokenize:rS};function rS(t,i,r){return u;function u(c){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(c),t.exit("escapeMarker"),o}function o(c){return Fv(c)?(t.enter("characterEscapeValue"),t.consume(c),t.exit("characterEscapeValue"),t.exit("characterEscape"),i):r(c)}}const Hx={name:"characterReference",tokenize:aS};function aS(t,i,r){const u=this;let o=0,c,f;return p;function p(x){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(x),t.exit("characterReferenceMarker"),g}function g(x){return x===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(x),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),c=31,f=Mt,y(x))}function m(x){return x===88||x===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(x),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),c=6,f=Vv,y):(t.enter("characterReferenceValue"),c=7,f=Zc,y(x))}function y(x){if(x===59&&o){const S=t.exit("characterReferenceValue");return f===Mt&&!Sf(u.sliceSerialize(S))?r(x):(t.enter("characterReferenceMarker"),t.consume(x),t.exit("characterReferenceMarker"),t.exit("characterReference"),i)}return f(x)&&o++<c?(t.consume(x),y):r(x)}}const cg={partial:!0,tokenize:sS},fg={concrete:!0,name:"codeFenced",tokenize:uS};function uS(t,i,r){const u=this,o={partial:!0,tokenize:ie};let c=0,f=0,p;return g;function g(R){return m(R)}function m(R){const I=u.events[u.events.length-1];return c=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,p=R,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(R)}function y(R){return R===p?(f++,t.consume(R),y):f<3?r(R):(t.exit("codeFencedFenceSequence"),Re(R)?Be(t,x,"whitespace")(R):x(R))}function x(R){return R===null||ve(R)?(t.exit("codeFencedFence"),u.interrupt?i(R):t.check(cg,T,X)(R)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),S(R))}function S(R){return R===null||ve(R)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),x(R)):Re(R)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Be(t,v,"whitespace")(R)):R===96&&R===p?r(R):(t.consume(R),S)}function v(R){return R===null||ve(R)?x(R):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),N(R))}function N(R){return R===null||ve(R)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),x(R)):R===96&&R===p?r(R):(t.consume(R),N)}function T(R){return t.attempt(o,X,L)(R)}function L(R){return t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),C}function C(R){return c>0&&Re(R)?Be(t,F,"linePrefix",c+1)(R):F(R)}function F(R){return R===null||ve(R)?t.check(cg,T,X)(R):(t.enter("codeFlowValue"),U(R))}function U(R){return R===null||ve(R)?(t.exit("codeFlowValue"),F(R)):(t.consume(R),U)}function X(R){return t.exit("codeFenced"),i(R)}function ie(R,I,ue){let W=0;return O;function O(P){return R.enter("lineEnding"),R.consume(P),R.exit("lineEnding"),ne}function ne(P){return R.enter("codeFencedFence"),Re(P)?Be(R,re,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):re(P)}function re(P){return P===p?(R.enter("codeFencedFenceSequence"),ge(P)):ue(P)}function ge(P){return P===p?(W++,R.consume(P),ge):W>=f?(R.exit("codeFencedFenceSequence"),Re(P)?Be(R,oe,"whitespace")(P):oe(P)):ue(P)}function oe(P){return P===null||ve(P)?(R.exit("codeFencedFence"),I(P)):ue(P)}}}function sS(t,i,r){const u=this;return o;function o(f){return f===null?r(f):(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c)}function c(f){return u.parser.lazy[u.now().line]?r(f):i(f)}}const mc={name:"codeIndented",tokenize:cS},oS={partial:!0,tokenize:fS};function cS(t,i,r){const u=this;return o;function o(m){return t.enter("codeIndented"),Be(t,c,"linePrefix",5)(m)}function c(m){const y=u.events[u.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?f(m):r(m)}function f(m){return m===null?g(m):ve(m)?t.attempt(oS,f,g)(m):(t.enter("codeFlowValue"),p(m))}function p(m){return m===null||ve(m)?(t.exit("codeFlowValue"),f(m)):(t.consume(m),p)}function g(m){return t.exit("codeIndented"),i(m)}}function fS(t,i,r){const u=this;return o;function o(f){return u.parser.lazy[u.now().line]?r(f):ve(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),o):Be(t,c,"linePrefix",5)(f)}function c(f){const p=u.events[u.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?i(f):ve(f)?o(f):r(f)}}const dS={name:"codeText",previous:pS,resolve:hS,tokenize:mS};function hS(t){let i=t.length-4,r=3,u,o;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[i][1].type==="lineEnding"||t[i][1].type==="space")){for(u=r;++u<i;)if(t[u][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(u=r-1,i++;++u<=i;)o===void 0?u!==i&&t[u][1].type!=="lineEnding"&&(o=u):(u===i||t[u][1].type==="lineEnding")&&(t[o][1].type="codeTextData",u!==o+2&&(t[o][1].end=t[u-1][1].end,t.splice(o+2,u-o-2),i-=u-o-2,u=o+2),o=void 0);return t}function pS(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function mS(t,i,r){let u=0,o,c;return f;function f(x){return t.enter("codeText"),t.enter("codeTextSequence"),p(x)}function p(x){return x===96?(t.consume(x),u++,p):(t.exit("codeTextSequence"),g(x))}function g(x){return x===null?r(x):x===32?(t.enter("space"),t.consume(x),t.exit("space"),g):x===96?(c=t.enter("codeTextSequence"),o=0,y(x)):ve(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),g):(t.enter("codeTextData"),m(x))}function m(x){return x===null||x===32||x===96||ve(x)?(t.exit("codeTextData"),g(x)):(t.consume(x),m)}function y(x){return x===96?(t.consume(x),o++,y):o===u?(t.exit("codeTextSequence"),t.exit("codeText"),i(x)):(c.type="codeTextData",m(x))}}class gS{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const u=r??Number.POSITIVE_INFINITY;return u<this.left.length?this.left.slice(i,u):i>this.left.length?this.right.slice(this.right.length-u+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-u+this.left.length).reverse())}splice(i,r,u){const o=r||0;this.setCursor(Math.trunc(i));const c=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return u&&Zr(this.left,u),c.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),Zr(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),Zr(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);Zr(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);Zr(this.left,r.reverse())}}}function Zr(t,i){let r=0;if(i.length<1e4)t.push(...i);else for(;r<i.length;)t.push(...i.slice(r,r+1e4)),r+=1e4}function Ix(t){const i={};let r=-1,u,o,c,f,p,g,m;const y=new gS(t);for(;++r<y.length;){for(;r in i;)r=i[r];if(u=y.get(r),r&&u[1].type==="chunkFlow"&&y.get(r-1)[1].type==="listItemPrefix"&&(g=u[1]._tokenizer.events,c=0,c<g.length&&g[c][1].type==="lineEndingBlank"&&(c+=2),c<g.length&&g[c][1].type==="content"))for(;++c<g.length&&g[c][1].type!=="content";)g[c][1].type==="chunkText"&&(g[c][1]._isInFirstContentOfListItem=!0,c++);if(u[0]==="enter")u[1].contentType&&(Object.assign(i,xS(y,r)),r=i[r],m=!0);else if(u[1]._container){for(c=r,o=void 0;c--;)if(f=y.get(c),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),f[1].type="lineEnding",o=c);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;o&&(u[1].end={...y.get(o)[1].start},p=y.slice(o,r),p.unshift(u),y.splice(o,r-o+1,p))}}return tn(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!m}function xS(t,i){const r=t.get(i)[1],u=t.get(i)[2];let o=i-1;const c=[];let f=r._tokenizer;f||(f=u.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const p=f.events,g=[],m={};let y,x,S=-1,v=r,N=0,T=0;const L=[T];for(;v;){for(;t.get(++o)[1]!==v;);c.push(o),v._tokenizer||(y=u.sliceStream(v),v.next||y.push(null),x&&f.defineSkip(v.start),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(y),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),x=v,v=v.next}for(v=r;++S<p.length;)p[S][0]==="exit"&&p[S-1][0]==="enter"&&p[S][1].type===p[S-1][1].type&&p[S][1].start.line!==p[S][1].end.line&&(T=S+1,L.push(T),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(f.events=[],v?(v._tokenizer=void 0,v.previous=void 0):L.pop(),S=L.length;S--;){const C=p.slice(L[S],L[S+1]),F=c.pop();g.push([F,F+C.length-1]),t.splice(F,2,C)}for(g.reverse(),S=-1;++S<g.length;)m[N+g[S][0]]=N+g[S][1],N+=g[S][1]-g[S][0]-1;return m}const yS={resolve:vS,tokenize:SS},bS={partial:!0,tokenize:kS};function vS(t){return Ix(t),t}function SS(t,i){let r;return u;function u(p){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),o(p)}function o(p){return p===null?c(p):ve(p)?t.check(bS,f,c)(p):(t.consume(p),o)}function c(p){return t.exit("chunkContent"),t.exit("content"),i(p)}function f(p){return t.consume(p),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function kS(t,i,r){const u=this;return o;function o(f){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),Be(t,c,"linePrefix")}function c(f){if(f===null||ve(f))return r(f);const p=u.events[u.events.length-1];return!u.parser.constructs.disable.null.includes("codeIndented")&&p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?i(f):t.interrupt(u.parser.constructs.flow,r,i)(f)}}function Yx(t,i,r,u,o,c,f,p,g){const m=g||Number.POSITIVE_INFINITY;let y=0;return x;function x(C){return C===60?(t.enter(u),t.enter(o),t.enter(c),t.consume(C),t.exit(c),S):C===null||C===32||C===41||zu(C)?r(C):(t.enter(u),t.enter(f),t.enter(p),t.enter("chunkString",{contentType:"string"}),T(C))}function S(C){return C===62?(t.enter(c),t.consume(C),t.exit(c),t.exit(o),t.exit(u),i):(t.enter(p),t.enter("chunkString",{contentType:"string"}),v(C))}function v(C){return C===62?(t.exit("chunkString"),t.exit(p),S(C)):C===null||C===60||ve(C)?r(C):(t.consume(C),C===92?N:v)}function N(C){return C===60||C===62||C===92?(t.consume(C),v):v(C)}function T(C){return!y&&(C===null||C===41||tt(C))?(t.exit("chunkString"),t.exit(p),t.exit(f),t.exit(u),i(C)):y<m&&C===40?(t.consume(C),y++,T):C===41?(t.consume(C),y--,T):C===null||C===32||C===40||zu(C)?r(C):(t.consume(C),C===92?L:T)}function L(C){return C===40||C===41||C===92?(t.consume(C),T):T(C)}}function Gx(t,i,r,u,o,c){const f=this;let p=0,g;return m;function m(v){return t.enter(u),t.enter(o),t.consume(v),t.exit(o),t.enter(c),y}function y(v){return p>999||v===null||v===91||v===93&&!g||v===94&&!p&&"_hiddenFootnoteSupport"in f.parser.constructs?r(v):v===93?(t.exit(c),t.enter(o),t.consume(v),t.exit(o),t.exit(u),i):ve(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===null||v===91||v===93||ve(v)||p++>999?(t.exit("chunkString"),y(v)):(t.consume(v),g||(g=!Re(v)),v===92?S:x)}function S(v){return v===91||v===92||v===93?(t.consume(v),p++,x):x(v)}}function Vx(t,i,r,u,o,c){let f;return p;function p(S){return S===34||S===39||S===40?(t.enter(u),t.enter(o),t.consume(S),t.exit(o),f=S===40?41:S,g):r(S)}function g(S){return S===f?(t.enter(o),t.consume(S),t.exit(o),t.exit(u),i):(t.enter(c),m(S))}function m(S){return S===f?(t.exit(c),g(f)):S===null?r(S):ve(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),Be(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===f||S===null||ve(S)?(t.exit("chunkString"),m(S)):(t.consume(S),S===92?x:y)}function x(S){return S===f||S===92?(t.consume(S),y):y(S)}}function ea(t,i){let r;return u;function u(o){return ve(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),r=!0,u):Re(o)?Be(t,u,r?"linePrefix":"lineSuffix")(o):i(o)}}const wS={name:"definition",tokenize:NS},jS={partial:!0,tokenize:CS};function NS(t,i,r){const u=this;let o;return c;function c(v){return t.enter("definition"),f(v)}function f(v){return Gx.call(u,t,p,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function p(v){return o=wn(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),g):r(v)}function g(v){return tt(v)?ea(t,m)(v):m(v)}function m(v){return Yx(t,y,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function y(v){return t.attempt(jS,x,x)(v)}function x(v){return Re(v)?Be(t,S,"whitespace")(v):S(v)}function S(v){return v===null||ve(v)?(t.exit("definition"),u.parser.defined.push(o),i(v)):r(v)}}function CS(t,i,r){return u;function u(p){return tt(p)?ea(t,o)(p):r(p)}function o(p){return Vx(t,c,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(p)}function c(p){return Re(p)?Be(t,f,"whitespace")(p):f(p)}function f(p){return p===null||ve(p)?i(p):r(p)}}const ES={name:"hardBreakEscape",tokenize:_S};function _S(t,i,r){return u;function u(c){return t.enter("hardBreakEscape"),t.consume(c),o}function o(c){return ve(c)?(t.exit("hardBreakEscape"),i(c)):r(c)}}const TS={name:"headingAtx",resolve:AS,tokenize:zS};function AS(t,i){let r=t.length-2,u=3,o,c;return t[u][1].type==="whitespace"&&(u+=2),r-2>u&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(u===r-1||r-4>u&&t[r-2][1].type==="whitespace")&&(r-=u+1===r?2:4),r>u&&(o={type:"atxHeadingText",start:t[u][1].start,end:t[r][1].end},c={type:"chunkText",start:t[u][1].start,end:t[r][1].end,contentType:"text"},tn(t,u,r-u+1,[["enter",o,i],["enter",c,i],["exit",c,i],["exit",o,i]])),t}function zS(t,i,r){let u=0;return o;function o(y){return t.enter("atxHeading"),c(y)}function c(y){return t.enter("atxHeadingSequence"),f(y)}function f(y){return y===35&&u++<6?(t.consume(y),f):y===null||tt(y)?(t.exit("atxHeadingSequence"),p(y)):r(y)}function p(y){return y===35?(t.enter("atxHeadingSequence"),g(y)):y===null||ve(y)?(t.exit("atxHeading"),i(y)):Re(y)?Be(t,p,"whitespace")(y):(t.enter("atxHeadingText"),m(y))}function g(y){return y===35?(t.consume(y),g):(t.exit("atxHeadingSequence"),p(y))}function m(y){return y===null||y===35||tt(y)?(t.exit("atxHeadingText"),p(y)):(t.consume(y),m)}}const DS=["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"],dg=["pre","script","style","textarea"],RS={concrete:!0,name:"htmlFlow",resolveTo:LS,tokenize:US},MS={partial:!0,tokenize:BS},OS={partial:!0,tokenize:qS};function LS(t){let i=t.length;for(;i--&&!(t[i][0]==="enter"&&t[i][1].type==="htmlFlow"););return i>1&&t[i-2][1].type==="linePrefix"&&(t[i][1].start=t[i-2][1].start,t[i+1][1].start=t[i-2][1].start,t.splice(i-2,2)),t}function US(t,i,r){const u=this;let o,c,f,p,g;return m;function m(w){return y(w)}function y(w){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(w),x}function x(w){return w===33?(t.consume(w),S):w===47?(t.consume(w),c=!0,T):w===63?(t.consume(w),o=3,u.interrupt?i:_):Ut(w)?(t.consume(w),f=String.fromCharCode(w),L):r(w)}function S(w){return w===45?(t.consume(w),o=2,v):w===91?(t.consume(w),o=5,p=0,N):Ut(w)?(t.consume(w),o=4,u.interrupt?i:_):r(w)}function v(w){return w===45?(t.consume(w),u.interrupt?i:_):r(w)}function N(w){const ae="CDATA[";return w===ae.charCodeAt(p++)?(t.consume(w),p===ae.length?u.interrupt?i:re:N):r(w)}function T(w){return Ut(w)?(t.consume(w),f=String.fromCharCode(w),L):r(w)}function L(w){if(w===null||w===47||w===62||tt(w)){const ae=w===47,fe=f.toLowerCase();return!ae&&!c&&dg.includes(fe)?(o=1,u.interrupt?i(w):re(w)):DS.includes(f.toLowerCase())?(o=6,ae?(t.consume(w),C):u.interrupt?i(w):re(w)):(o=7,u.interrupt&&!u.parser.lazy[u.now().line]?r(w):c?F(w):U(w))}return w===45||Mt(w)?(t.consume(w),f+=String.fromCharCode(w),L):r(w)}function C(w){return w===62?(t.consume(w),u.interrupt?i:re):r(w)}function F(w){return Re(w)?(t.consume(w),F):O(w)}function U(w){return w===47?(t.consume(w),O):w===58||w===95||Ut(w)?(t.consume(w),X):Re(w)?(t.consume(w),U):O(w)}function X(w){return w===45||w===46||w===58||w===95||Mt(w)?(t.consume(w),X):ie(w)}function ie(w){return w===61?(t.consume(w),R):Re(w)?(t.consume(w),ie):U(w)}function R(w){return w===null||w===60||w===61||w===62||w===96?r(w):w===34||w===39?(t.consume(w),g=w,I):Re(w)?(t.consume(w),R):ue(w)}function I(w){return w===g?(t.consume(w),g=null,W):w===null||ve(w)?r(w):(t.consume(w),I)}function ue(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||tt(w)?ie(w):(t.consume(w),ue)}function W(w){return w===47||w===62||Re(w)?U(w):r(w)}function O(w){return w===62?(t.consume(w),ne):r(w)}function ne(w){return w===null||ve(w)?re(w):Re(w)?(t.consume(w),ne):r(w)}function re(w){return w===45&&o===2?(t.consume(w),D):w===60&&o===1?(t.consume(w),Q):w===62&&o===4?(t.consume(w),E):w===63&&o===3?(t.consume(w),_):w===93&&o===5?(t.consume(w),me):ve(w)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(MS,H,ge)(w)):w===null||ve(w)?(t.exit("htmlFlowData"),ge(w)):(t.consume(w),re)}function ge(w){return t.check(OS,oe,H)(w)}function oe(w){return t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),P}function P(w){return w===null||ve(w)?ge(w):(t.enter("htmlFlowData"),re(w))}function D(w){return w===45?(t.consume(w),_):re(w)}function Q(w){return w===47?(t.consume(w),f="",se):re(w)}function se(w){if(w===62){const ae=f.toLowerCase();return dg.includes(ae)?(t.consume(w),E):re(w)}return Ut(w)&&f.length<8?(t.consume(w),f+=String.fromCharCode(w),se):re(w)}function me(w){return w===93?(t.consume(w),_):re(w)}function _(w){return w===62?(t.consume(w),E):w===45&&o===2?(t.consume(w),_):re(w)}function E(w){return w===null||ve(w)?(t.exit("htmlFlowData"),H(w)):(t.consume(w),E)}function H(w){return t.exit("htmlFlow"),i(w)}}function qS(t,i,r){const u=this;return o;function o(f){return ve(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c):r(f)}function c(f){return u.parser.lazy[u.now().line]?r(f):i(f)}}function BS(t,i,r){return u;function u(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(ra,i,r)}}const HS={name:"htmlText",tokenize:IS};function IS(t,i,r){const u=this;let o,c,f;return p;function p(_){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(_),g}function g(_){return _===33?(t.consume(_),m):_===47?(t.consume(_),ie):_===63?(t.consume(_),U):Ut(_)?(t.consume(_),ue):r(_)}function m(_){return _===45?(t.consume(_),y):_===91?(t.consume(_),c=0,N):Ut(_)?(t.consume(_),F):r(_)}function y(_){return _===45?(t.consume(_),v):r(_)}function x(_){return _===null?r(_):_===45?(t.consume(_),S):ve(_)?(f=x,Q(_)):(t.consume(_),x)}function S(_){return _===45?(t.consume(_),v):x(_)}function v(_){return _===62?D(_):_===45?S(_):x(_)}function N(_){const E="CDATA[";return _===E.charCodeAt(c++)?(t.consume(_),c===E.length?T:N):r(_)}function T(_){return _===null?r(_):_===93?(t.consume(_),L):ve(_)?(f=T,Q(_)):(t.consume(_),T)}function L(_){return _===93?(t.consume(_),C):T(_)}function C(_){return _===62?D(_):_===93?(t.consume(_),C):T(_)}function F(_){return _===null||_===62?D(_):ve(_)?(f=F,Q(_)):(t.consume(_),F)}function U(_){return _===null?r(_):_===63?(t.consume(_),X):ve(_)?(f=U,Q(_)):(t.consume(_),U)}function X(_){return _===62?D(_):U(_)}function ie(_){return Ut(_)?(t.consume(_),R):r(_)}function R(_){return _===45||Mt(_)?(t.consume(_),R):I(_)}function I(_){return ve(_)?(f=I,Q(_)):Re(_)?(t.consume(_),I):D(_)}function ue(_){return _===45||Mt(_)?(t.consume(_),ue):_===47||_===62||tt(_)?W(_):r(_)}function W(_){return _===47?(t.consume(_),D):_===58||_===95||Ut(_)?(t.consume(_),O):ve(_)?(f=W,Q(_)):Re(_)?(t.consume(_),W):D(_)}function O(_){return _===45||_===46||_===58||_===95||Mt(_)?(t.consume(_),O):ne(_)}function ne(_){return _===61?(t.consume(_),re):ve(_)?(f=ne,Q(_)):Re(_)?(t.consume(_),ne):W(_)}function re(_){return _===null||_===60||_===61||_===62||_===96?r(_):_===34||_===39?(t.consume(_),o=_,ge):ve(_)?(f=re,Q(_)):Re(_)?(t.consume(_),re):(t.consume(_),oe)}function ge(_){return _===o?(t.consume(_),o=void 0,P):_===null?r(_):ve(_)?(f=ge,Q(_)):(t.consume(_),ge)}function oe(_){return _===null||_===34||_===39||_===60||_===61||_===96?r(_):_===47||_===62||tt(_)?W(_):(t.consume(_),oe)}function P(_){return _===47||_===62||tt(_)?W(_):r(_)}function D(_){return _===62?(t.consume(_),t.exit("htmlTextData"),t.exit("htmlText"),i):r(_)}function Q(_){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),se}function se(_){return Re(_)?Be(t,me,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):me(_)}function me(_){return t.enter("htmlTextData"),f(_)}}const kf={name:"labelEnd",resolveAll:FS,resolveTo:XS,tokenize:$S},YS={tokenize:QS},GS={tokenize:ZS},VS={tokenize:KS};function FS(t){let i=-1;const r=[];for(;++i<t.length;){const u=t[i][1];if(r.push(t[i]),u.type==="labelImage"||u.type==="labelLink"||u.type==="labelEnd"){const o=u.type==="labelImage"?4:2;u.type="data",i+=o}}return t.length!==r.length&&tn(t,0,t.length,r),t}function XS(t,i){let r=t.length,u=0,o,c,f,p;for(;r--;)if(o=t[r][1],c){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(f){if(t[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(c=r,o.type!=="labelLink")){u=2;break}}else o.type==="labelEnd"&&(f=r);const g={type:t[c][1].type==="labelLink"?"link":"image",start:{...t[c][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[c][1].start},end:{...t[f][1].end}},y={type:"labelText",start:{...t[c+u+2][1].end},end:{...t[f-2][1].start}};return p=[["enter",g,i],["enter",m,i]],p=xn(p,t.slice(c+1,c+u+3)),p=xn(p,[["enter",y,i]]),p=xn(p,Bu(i.parser.constructs.insideSpan.null,t.slice(c+u+4,f-3),i)),p=xn(p,[["exit",y,i],t[f-2],t[f-1],["exit",m,i]]),p=xn(p,t.slice(f+1)),p=xn(p,[["exit",g,i]]),tn(t,c,t.length,p),t}function $S(t,i,r){const u=this;let o=u.events.length,c,f;for(;o--;)if((u.events[o][1].type==="labelImage"||u.events[o][1].type==="labelLink")&&!u.events[o][1]._balanced){c=u.events[o][1];break}return p;function p(S){return c?c._inactive?x(S):(f=u.parser.defined.includes(wn(u.sliceSerialize({start:c.end,end:u.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(S),t.exit("labelMarker"),t.exit("labelEnd"),g):r(S)}function g(S){return S===40?t.attempt(YS,y,f?y:x)(S):S===91?t.attempt(GS,y,f?m:x)(S):f?y(S):x(S)}function m(S){return t.attempt(VS,y,x)(S)}function y(S){return i(S)}function x(S){return c._balanced=!0,r(S)}}function QS(t,i,r){return u;function u(x){return t.enter("resource"),t.enter("resourceMarker"),t.consume(x),t.exit("resourceMarker"),o}function o(x){return tt(x)?ea(t,c)(x):c(x)}function c(x){return x===41?y(x):Yx(t,f,p,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function f(x){return tt(x)?ea(t,g)(x):y(x)}function p(x){return r(x)}function g(x){return x===34||x===39||x===40?Vx(t,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):y(x)}function m(x){return tt(x)?ea(t,y)(x):y(x)}function y(x){return x===41?(t.enter("resourceMarker"),t.consume(x),t.exit("resourceMarker"),t.exit("resource"),i):r(x)}}function ZS(t,i,r){const u=this;return o;function o(p){return Gx.call(u,t,c,f,"reference","referenceMarker","referenceString")(p)}function c(p){return u.parser.defined.includes(wn(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)))?i(p):r(p)}function f(p){return r(p)}}function KS(t,i,r){return u;function u(c){return t.enter("reference"),t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),o}function o(c){return c===93?(t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),t.exit("reference"),i):r(c)}}const JS={name:"labelStartImage",resolveAll:kf.resolveAll,tokenize:PS};function PS(t,i,r){const u=this;return o;function o(p){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(p),t.exit("labelImageMarker"),c}function c(p){return p===91?(t.enter("labelMarker"),t.consume(p),t.exit("labelMarker"),t.exit("labelImage"),f):r(p)}function f(p){return p===94&&"_hiddenFootnoteSupport"in u.parser.constructs?r(p):i(p)}}const WS={name:"labelStartLink",resolveAll:kf.resolveAll,tokenize:e2};function e2(t,i,r){const u=this;return o;function o(f){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelLink"),c}function c(f){return f===94&&"_hiddenFootnoteSupport"in u.parser.constructs?r(f):i(f)}}const gc={name:"lineEnding",tokenize:t2};function t2(t,i){return r;function r(u){return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),Be(t,i,"linePrefix")}}const _u={name:"thematicBreak",tokenize:n2};function n2(t,i,r){let u=0,o;return c;function c(m){return t.enter("thematicBreak"),f(m)}function f(m){return o=m,p(m)}function p(m){return m===o?(t.enter("thematicBreakSequence"),g(m)):u>=3&&(m===null||ve(m))?(t.exit("thematicBreak"),i(m)):r(m)}function g(m){return m===o?(t.consume(m),u++,g):(t.exit("thematicBreakSequence"),Re(m)?Be(t,p,"whitespace")(m):p(m))}}const Ft={continuation:{tokenize:a2},exit:s2,name:"list",tokenize:r2},l2={partial:!0,tokenize:o2},i2={partial:!0,tokenize:u2};function r2(t,i,r){const u=this,o=u.events[u.events.length-1];let c=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,f=0;return p;function p(v){const N=u.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!u.containerState.marker||v===u.containerState.marker:Zc(v)){if(u.containerState.type||(u.containerState.type=N,t.enter(N,{_container:!0})),N==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(_u,r,m)(v):m(v);if(!u.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),g(v)}return r(v)}function g(v){return Zc(v)&&++f<10?(t.consume(v),g):(!u.interrupt||f<2)&&(u.containerState.marker?v===u.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),m(v)):r(v)}function m(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),u.containerState.marker=u.containerState.marker||v,t.check(ra,u.interrupt?r:y,t.attempt(l2,S,x))}function y(v){return u.containerState.initialBlankLine=!0,c++,S(v)}function x(v){return Re(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),S):r(v)}function S(v){return u.containerState.size=c+u.sliceSerialize(t.exit("listItemPrefix"),!0).length,i(v)}}function a2(t,i,r){const u=this;return u.containerState._closeFlow=void 0,t.check(ra,o,c);function o(p){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,Be(t,i,"listItemIndent",u.containerState.size+1)(p)}function c(p){return u.containerState.furtherBlankLines||!Re(p)?(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,f(p)):(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,t.attempt(i2,i,f)(p))}function f(p){return u.containerState._closeFlow=!0,u.interrupt=void 0,Be(t,t.attempt(Ft,i,r),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p)}}function u2(t,i,r){const u=this;return Be(t,o,"listItemIndent",u.containerState.size+1);function o(c){const f=u.events[u.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===u.containerState.size?i(c):r(c)}}function s2(t){t.exit(this.containerState.type)}function o2(t,i,r){const u=this;return Be(t,o,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(c){const f=u.events[u.events.length-1];return!Re(c)&&f&&f[1].type==="listItemPrefixWhitespace"?i(c):r(c)}}const hg={name:"setextUnderline",resolveTo:c2,tokenize:f2};function c2(t,i){let r=t.length,u,o,c;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){u=r;break}t[r][1].type==="paragraph"&&(o=r)}else t[r][1].type==="content"&&t.splice(r,1),!c&&t[r][1].type==="definition"&&(c=r);const f={type:"setextHeading",start:{...t[u][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",c?(t.splice(o,0,["enter",f,i]),t.splice(c+1,0,["exit",t[u][1],i]),t[u][1].end={...t[c][1].end}):t[u][1]=f,t.push(["exit",f,i]),t}function f2(t,i,r){const u=this;let o;return c;function c(m){let y=u.events.length,x;for(;y--;)if(u.events[y][1].type!=="lineEnding"&&u.events[y][1].type!=="linePrefix"&&u.events[y][1].type!=="content"){x=u.events[y][1].type==="paragraph";break}return!u.parser.lazy[u.now().line]&&(u.interrupt||x)?(t.enter("setextHeadingLine"),o=m,f(m)):r(m)}function f(m){return t.enter("setextHeadingLineSequence"),p(m)}function p(m){return m===o?(t.consume(m),p):(t.exit("setextHeadingLineSequence"),Re(m)?Be(t,g,"lineSuffix")(m):g(m))}function g(m){return m===null||ve(m)?(t.exit("setextHeadingLine"),i(m)):r(m)}}const d2={tokenize:h2};function h2(t){const i=this,r=t.attempt(ra,u,t.attempt(this.parser.constructs.flowInitial,o,Be(t,t.attempt(this.parser.constructs.flow,o,t.attempt(yS,o)),"linePrefix")));return r;function u(c){if(c===null){t.consume(c);return}return t.enter("lineEndingBlank"),t.consume(c),t.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function o(c){if(c===null){t.consume(c);return}return t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),i.currentConstruct=void 0,r}}const p2={resolveAll:Xx()},m2=Fx("string"),g2=Fx("text");function Fx(t){return{resolveAll:Xx(t==="text"?x2:void 0),tokenize:i};function i(r){const u=this,o=this.parser.constructs[t],c=r.attempt(o,f,p);return f;function f(y){return m(y)?c(y):p(y)}function p(y){if(y===null){r.consume(y);return}return r.enter("data"),r.consume(y),g}function g(y){return m(y)?(r.exit("data"),c(y)):(r.consume(y),g)}function m(y){if(y===null)return!0;const x=o[y];let S=-1;if(x)for(;++S<x.length;){const v=x[S];if(!v.previous||v.previous.call(u,u.previous))return!0}return!1}}}function Xx(t){return i;function i(r,u){let o=-1,c;for(;++o<=r.length;)c===void 0?r[o]&&r[o][1].type==="data"&&(c=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==c+2&&(r[c][1].end=r[o-1][1].end,r.splice(c+2,o-c-2),o=c+2),c=void 0);return t?t(r,u):r}}function x2(t,i){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const u=t[r-1][1],o=i.sliceStream(u);let c=o.length,f=-1,p=0,g;for(;c--;){const m=o[c];if(typeof m=="string"){for(f=m.length;m.charCodeAt(f-1)===32;)p++,f--;if(f)break;f=-1}else if(m===-2)g=!0,p++;else if(m!==-1){c++;break}}if(i._contentTypeTextTrailing&&r===t.length&&(p=0),p){const m={type:r===t.length||g||p<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:c?f:u.start._bufferIndex+f,_index:u.start._index+c,line:u.end.line,column:u.end.column-p,offset:u.end.offset-p},end:{...u.end}};u.end={...m.start},u.start.offset===u.end.offset?Object.assign(u,m):(t.splice(r,0,["enter",m,i],["exit",m,i]),r+=2)}r++}return t}const y2={42:Ft,43:Ft,45:Ft,48:Ft,49:Ft,50:Ft,51:Ft,52:Ft,53:Ft,54:Ft,55:Ft,56:Ft,57:Ft,62:qx},b2={91:wS},v2={[-2]:mc,[-1]:mc,32:mc},S2={35:TS,42:_u,45:[hg,_u],60:RS,61:hg,95:_u,96:fg,126:fg},k2={38:Hx,92:Bx},w2={[-5]:gc,[-4]:gc,[-3]:gc,33:JS,38:Hx,42:Kc,60:[Wv,HS],91:WS,92:[ES,Bx],93:kf,95:Kc,96:dS},j2={null:[Kc,p2]},N2={null:[42,95]},C2={null:[]},E2=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:N2,contentInitial:b2,disable:C2,document:y2,flow:S2,flowInitial:v2,insideSpan:j2,string:k2,text:w2},Symbol.toStringTag,{value:"Module"}));function _2(t,i,r){let u={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},c=[];let f=[],p=[];const g={attempt:I(ie),check:I(R),consume:F,enter:U,exit:X,interrupt:I(R,{interrupt:!0})},m={code:null,containerState:{},defineSkip:T,events:[],now:N,parser:t,previous:null,sliceSerialize:S,sliceStream:v,write:x};let y=i.tokenize.call(m,g);return i.resolveAll&&c.push(i),m;function x(ne){return f=xn(f,ne),L(),f[f.length-1]!==null?[]:(ue(i,0),m.events=Bu(c,m.events,m),m.events)}function S(ne,re){return A2(v(ne),re)}function v(ne){return T2(f,ne)}function N(){const{_bufferIndex:ne,_index:re,line:ge,column:oe,offset:P}=u;return{_bufferIndex:ne,_index:re,line:ge,column:oe,offset:P}}function T(ne){o[ne.line]=ne.column,O()}function L(){let ne;for(;u._index<f.length;){const re=f[u._index];if(typeof re=="string")for(ne=u._index,u._bufferIndex<0&&(u._bufferIndex=0);u._index===ne&&u._bufferIndex<re.length;)C(re.charCodeAt(u._bufferIndex));else C(re)}}function C(ne){y=y(ne)}function F(ne){ve(ne)?(u.line++,u.column=1,u.offset+=ne===-3?2:1,O()):ne!==-1&&(u.column++,u.offset++),u._bufferIndex<0?u._index++:(u._bufferIndex++,u._bufferIndex===f[u._index].length&&(u._bufferIndex=-1,u._index++)),m.previous=ne}function U(ne,re){const ge=re||{};return ge.type=ne,ge.start=N(),m.events.push(["enter",ge,m]),p.push(ge),ge}function X(ne){const re=p.pop();return re.end=N(),m.events.push(["exit",re,m]),re}function ie(ne,re){ue(ne,re.from)}function R(ne,re){re.restore()}function I(ne,re){return ge;function ge(oe,P,D){let Q,se,me,_;return Array.isArray(oe)?H(oe):"tokenize"in oe?H([oe]):E(oe);function E(he){return we;function we(Ye){const be=Ye!==null&&he[Ye],xt=Ye!==null&&he.null,jt=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(xt)?xt:xt?[xt]:[]];return H(jt)(Ye)}}function H(he){return Q=he,se=0,he.length===0?D:w(he[se])}function w(he){return we;function we(Ye){return _=W(),me=he,he.partial||(m.currentConstruct=he),he.name&&m.parser.constructs.disable.null.includes(he.name)?fe():he.tokenize.call(re?Object.assign(Object.create(m),re):m,g,ae,fe)(Ye)}}function ae(he){return ne(me,_),P}function fe(he){return _.restore(),++se<Q.length?w(Q[se]):D}}}function ue(ne,re){ne.resolveAll&&!c.includes(ne)&&c.push(ne),ne.resolve&&tn(m.events,re,m.events.length-re,ne.resolve(m.events.slice(re),m)),ne.resolveTo&&(m.events=ne.resolveTo(m.events,m))}function W(){const ne=N(),re=m.previous,ge=m.currentConstruct,oe=m.events.length,P=Array.from(p);return{from:oe,restore:D};function D(){u=ne,m.previous=re,m.currentConstruct=ge,m.events.length=oe,p=P,O()}}function O(){u.line in o&&u.column<2&&(u.column=o[u.line],u.offset+=o[u.line]-1)}}function T2(t,i){const r=i.start._index,u=i.start._bufferIndex,o=i.end._index,c=i.end._bufferIndex;let f;if(r===o)f=[t[r].slice(u,c)];else{if(f=t.slice(r,o),u>-1){const p=f[0];typeof p=="string"?f[0]=p.slice(u):f.shift()}c>0&&f.push(t[o].slice(0,c))}return f}function A2(t,i){let r=-1;const u=[];let o;for(;++r<t.length;){const c=t[r];let f;if(typeof c=="string")f=c;else switch(c){case-5:{f="\r";break}case-4:{f=`
|
|
51
|
-
`;break}case-3:{f=`\r
|
|
52
|
-
`;break}case-2:{f=i?" ":" ";break}case-1:{if(!i&&o)continue;f=" ";break}default:f=String.fromCharCode(c)}o=c===-2,u.push(f)}return u.join("")}function z2(t){const u={constructs:Lx([E2,...(t||{}).extensions||[]]),content:o(Xv),defined:[],document:o(Qv),flow:o(d2),lazy:{},string:o(m2),text:o(g2)};return u;function o(c){return f;function f(p){return _2(u,c,p)}}}function D2(t){for(;!Ix(t););return t}const pg=/[\0\t\n\r]/g;function R2(){let t=1,i="",r=!0,u;return o;function o(c,f,p){const g=[];let m,y,x,S,v;for(c=i+(typeof c=="string"?c.toString():new TextDecoder(f||void 0).decode(c)),x=0,i="",r&&(c.charCodeAt(0)===65279&&x++,r=void 0);x<c.length;){if(pg.lastIndex=x,m=pg.exec(c),S=m&&m.index!==void 0?m.index:c.length,v=c.charCodeAt(S),!m){i=c.slice(x);break}if(v===10&&x===S&&u)g.push(-3),u=void 0;else switch(u&&(g.push(-5),u=void 0),x<S&&(g.push(c.slice(x,S)),t+=S-x),v){case 0:{g.push(65533),t++;break}case 9:{for(y=Math.ceil(t/4)*4,g.push(-2);t++<y;)g.push(-1);break}case 10:{g.push(-4),t=1;break}default:u=!0,t=1}x=S+1}return p&&(u&&g.push(-5),i&&g.push(i),g.push(null)),g}}const M2=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function O2(t){return t.replace(M2,L2)}function L2(t,i,r){if(i)return i;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),c=o===120||o===88;return Ux(r.slice(c?2:1),c?16:10)}return Sf(r)||t}const $x={}.hasOwnProperty;function U2(t,i,r){return i&&typeof i=="object"&&(r=i,i=void 0),q2(r)(D2(z2(r).document().write(R2()(t,i,!0))))}function q2(t){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(ln),autolinkProtocol:W,autolinkEmail:W,atxHeading:c(nn),blockQuote:c(xt),characterEscape:W,characterReference:W,codeFenced:c(jt),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:c(jt,f),codeText:c(jn,f),codeTextData:W,data:W,codeFlowValue:W,definition:c(Nn),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:c(At),hardBreakEscape:c(Cn),hardBreakTrailing:c(Cn),htmlFlow:c(Un,f),htmlFlowData:W,htmlText:c(Un,f),htmlTextData:W,image:c(al),label:f,link:c(ln),listItem:c(_n),listItemValue:S,listOrdered:c(En,x),listUnordered:c(En),paragraph:c(ee),reference:w,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:c(nn),strong:c(He),thematicBreak:c(rn)},exit:{atxHeading:g(),atxHeadingSequence:ie,autolink:g(),autolinkEmail:be,autolinkProtocol:Ye,blockQuote:g(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:he,characterReference:we,codeFenced:g(L),codeFencedFence:T,codeFencedFenceInfo:v,codeFencedFenceMeta:N,codeFlowValue:O,codeIndented:g(C),codeText:g(P),codeTextData:O,data:O,definition:g(),definitionDestinationString:X,definitionLabelString:F,definitionTitleString:U,emphasis:g(),hardBreakEscape:g(re),hardBreakTrailing:g(re),htmlFlow:g(ge),htmlFlowData:O,htmlText:g(oe),htmlTextData:O,image:g(Q),label:me,labelText:se,lineEnding:ne,link:g(D),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:ae,resourceDestinationString:_,resourceTitleString:E,resource:H,setextHeading:g(ue),setextHeadingLineSequence:I,setextHeadingText:R,strong:g(),thematicBreak:g()}};Qx(i,(t||{}).mdastExtensions||[]);const r={};return u;function u(V){let le={type:"root",children:[]};const xe={stack:[le],tokenStack:[],config:i,enter:p,exit:m,buffer:f,resume:y,data:r},Ee=[];let Ie=-1;for(;++Ie<V.length;)if(V[Ie][1].type==="listOrdered"||V[Ie][1].type==="listUnordered")if(V[Ie][0]==="enter")Ee.push(Ie);else{const zt=Ee.pop();Ie=o(V,zt,Ie)}for(Ie=-1;++Ie<V.length;){const zt=i[V[Ie][0]];$x.call(zt,V[Ie][1].type)&&zt[V[Ie][1].type].call(Object.assign({sliceSerialize:V[Ie][2].sliceSerialize},xe),V[Ie][1])}if(xe.tokenStack.length>0){const zt=xe.tokenStack[xe.tokenStack.length-1];(zt[1]||mg).call(xe,void 0,zt[0])}for(le.position={start:zl(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:zl(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<i.transforms.length;)le=i.transforms[Ie](le)||le;return le}function o(V,le,xe){let Ee=le-1,Ie=-1,zt=!1,an,bt,rt,vt;for(;++Ee<=xe;){const Xe=V[Ee];switch(Xe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xe[0]==="enter"?Ie++:Ie--,vt=void 0;break}case"lineEndingBlank":{Xe[0]==="enter"&&(an&&!vt&&!Ie&&!rt&&(rt=Ee),vt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:vt=void 0}if(!Ie&&Xe[0]==="enter"&&Xe[1].type==="listItemPrefix"||Ie===-1&&Xe[0]==="exit"&&(Xe[1].type==="listUnordered"||Xe[1].type==="listOrdered")){if(an){let yn=Ee;for(bt=void 0;yn--;){const Dt=V[yn];if(Dt[1].type==="lineEnding"||Dt[1].type==="lineEndingBlank"){if(Dt[0]==="exit")continue;bt&&(V[bt][1].type="lineEndingBlank",zt=!0),Dt[1].type="lineEnding",bt=yn}else if(!(Dt[1].type==="linePrefix"||Dt[1].type==="blockQuotePrefix"||Dt[1].type==="blockQuotePrefixWhitespace"||Dt[1].type==="blockQuoteMarker"||Dt[1].type==="listItemIndent"))break}rt&&(!bt||rt<bt)&&(an._spread=!0),an.end=Object.assign({},bt?V[bt][1].start:Xe[1].end),V.splice(bt||Ee,0,["exit",an,Xe[2]]),Ee++,xe++}if(Xe[1].type==="listItemPrefix"){const yn={type:"listItem",_spread:!1,start:Object.assign({},Xe[1].start),end:void 0};an=yn,V.splice(Ee,0,["enter",yn,Xe[2]]),Ee++,xe++,rt=void 0,vt=!0}}}return V[le][1]._spread=zt,xe}function c(V,le){return xe;function xe(Ee){p.call(this,V(Ee),Ee),le&&le.call(this,Ee)}}function f(){this.stack.push({type:"fragment",children:[]})}function p(V,le,xe){this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([le,xe||void 0]),V.position={start:zl(le.start),end:void 0}}function g(V){return le;function le(xe){V&&V.call(this,xe),m.call(this,xe)}}function m(V,le){const xe=this.stack.pop(),Ee=this.tokenStack.pop();if(Ee)Ee[0].type!==V.type&&(le?le.call(this,V,Ee[0]):(Ee[1]||mg).call(this,V,Ee[0]));else throw new Error("Cannot close `"+V.type+"` ("+Wr({start:V.start,end:V.end})+"): it’s not open");xe.position.end=zl(V.end)}function y(){return vf(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function S(V){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(V),10),this.data.expectingFirstListItemValue=void 0}}function v(){const V=this.resume(),le=this.stack[this.stack.length-1];le.lang=V}function N(){const V=this.resume(),le=this.stack[this.stack.length-1];le.meta=V}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function L(){const V=this.resume(),le=this.stack[this.stack.length-1];le.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const V=this.resume(),le=this.stack[this.stack.length-1];le.value=V.replace(/(\r?\n|\r)$/g,"")}function F(V){const le=this.resume(),xe=this.stack[this.stack.length-1];xe.label=le,xe.identifier=wn(this.sliceSerialize(V)).toLowerCase()}function U(){const V=this.resume(),le=this.stack[this.stack.length-1];le.title=V}function X(){const V=this.resume(),le=this.stack[this.stack.length-1];le.url=V}function ie(V){const le=this.stack[this.stack.length-1];if(!le.depth){const xe=this.sliceSerialize(V).length;le.depth=xe}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function I(V){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(V).codePointAt(0)===61?1:2}function ue(){this.data.setextHeadingSlurpLineEnding=void 0}function W(V){const xe=this.stack[this.stack.length-1].children;let Ee=xe[xe.length-1];(!Ee||Ee.type!=="text")&&(Ee=Le(),Ee.position={start:zl(V.start),end:void 0},xe.push(Ee)),this.stack.push(Ee)}function O(V){const le=this.stack.pop();le.value+=this.sliceSerialize(V),le.position.end=zl(V.end)}function ne(V){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=le.children[le.children.length-1];xe.position.end=zl(V.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(le.type)&&(W.call(this,V),O.call(this,V))}function re(){this.data.atHardBreak=!0}function ge(){const V=this.resume(),le=this.stack[this.stack.length-1];le.value=V}function oe(){const V=this.resume(),le=this.stack[this.stack.length-1];le.value=V}function P(){const V=this.resume(),le=this.stack[this.stack.length-1];le.value=V}function D(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=le,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function Q(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=le,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function se(V){const le=this.sliceSerialize(V),xe=this.stack[this.stack.length-2];xe.label=O2(le),xe.identifier=wn(le).toLowerCase()}function me(){const V=this.stack[this.stack.length-1],le=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const Ee=V.children;xe.children=Ee}else xe.alt=le}function _(){const V=this.resume(),le=this.stack[this.stack.length-1];le.url=V}function E(){const V=this.resume(),le=this.stack[this.stack.length-1];le.title=V}function H(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function ae(V){const le=this.resume(),xe=this.stack[this.stack.length-1];xe.label=le,xe.identifier=wn(this.sliceSerialize(V)).toLowerCase(),this.data.referenceType="full"}function fe(V){this.data.characterReferenceType=V.type}function he(V){const le=this.sliceSerialize(V),xe=this.data.characterReferenceType;let Ee;xe?(Ee=Ux(le,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ee=Sf(le);const Ie=this.stack[this.stack.length-1];Ie.value+=Ee}function we(V){const le=this.stack.pop();le.position.end=zl(V.end)}function Ye(V){O.call(this,V);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(V)}function be(V){O.call(this,V);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(V)}function xt(){return{type:"blockquote",children:[]}}function jt(){return{type:"code",lang:null,meta:null,value:""}}function jn(){return{type:"inlineCode",value:""}}function Nn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function At(){return{type:"emphasis",children:[]}}function nn(){return{type:"heading",depth:0,children:[]}}function Cn(){return{type:"break"}}function Un(){return{type:"html",value:""}}function al(){return{type:"image",title:null,url:"",alt:null}}function ln(){return{type:"link",title:null,url:"",children:[]}}function En(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function _n(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function ee(){return{type:"paragraph",children:[]}}function He(){return{type:"strong",children:[]}}function Le(){return{type:"text",value:""}}function rn(){return{type:"thematicBreak"}}}function zl(t){return{line:t.line,column:t.column,offset:t.offset}}function Qx(t,i){let r=-1;for(;++r<i.length;){const u=i[r];Array.isArray(u)?Qx(t,u):B2(t,u)}}function B2(t,i){let r;for(r in i)if($x.call(i,r))switch(r){case"canContainEols":{const u=i[r];u&&t[r].push(...u);break}case"transforms":{const u=i[r];u&&t[r].push(...u);break}case"enter":case"exit":{const u=i[r];u&&Object.assign(t[r],u);break}}}function mg(t,i){throw t?new Error("Cannot close `"+t.type+"` ("+Wr({start:t.start,end:t.end})+"): a different token (`"+i.type+"`, "+Wr({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+Wr({start:i.start,end:i.end})+") is still open")}function H2(t){const i=this;i.parser=r;function r(u){return U2(u,{...i.data("settings"),...t,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function I2(t,i){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(i),!0)};return t.patch(i,r),t.applyData(i,r)}function Y2(t,i){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(i,r),[t.applyData(i,r),{type:"text",value:`
|
|
53
|
-
`}]}function G2(t,i){const r=i.value?i.value+`
|
|
54
|
-
`:"",u={},o=i.lang?i.lang.split(/\s+/):[];o.length>0&&(u.className=["language-"+o[0]]);let c={type:"element",tagName:"code",properties:u,children:[{type:"text",value:r}]};return i.meta&&(c.data={meta:i.meta}),t.patch(i,c),c=t.applyData(i,c),c={type:"element",tagName:"pre",properties:{},children:[c]},t.patch(i,c),c}function V2(t,i){const r={type:"element",tagName:"del",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function F2(t,i){const r={type:"element",tagName:"em",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function X2(t,i){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",u=String(i.identifier).toUpperCase(),o=Wi(u.toLowerCase()),c=t.footnoteOrder.indexOf(u);let f,p=t.footnoteCounts.get(u);p===void 0?(p=0,t.footnoteOrder.push(u),f=t.footnoteOrder.length):f=c+1,p+=1,t.footnoteCounts.set(u,p);const g={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(p>1?"-"+p:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};t.patch(i,g);const m={type:"element",tagName:"sup",properties:{},children:[g]};return t.patch(i,m),t.applyData(i,m)}function $2(t,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function Q2(t,i){if(t.options.allowDangerousHtml){const r={type:"raw",value:i.value};return t.patch(i,r),t.applyData(i,r)}}function Zx(t,i){const r=i.referenceType;let u="]";if(r==="collapsed"?u+="[]":r==="full"&&(u+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+u}];const o=t.all(i),c=o[0];c&&c.type==="text"?c.value="["+c.value:o.unshift({type:"text",value:"["});const f=o[o.length-1];return f&&f.type==="text"?f.value+=u:o.push({type:"text",value:u}),o}function Z2(t,i){const r=String(i.identifier).toUpperCase(),u=t.definitionById.get(r);if(!u)return Zx(t,i);const o={src:Wi(u.url||""),alt:i.alt};u.title!==null&&u.title!==void 0&&(o.title=u.title);const c={type:"element",tagName:"img",properties:o,children:[]};return t.patch(i,c),t.applyData(i,c)}function K2(t,i){const r={src:Wi(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const u={type:"element",tagName:"img",properties:r,children:[]};return t.patch(i,u),t.applyData(i,u)}function J2(t,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};t.patch(i,r);const u={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(i,u),t.applyData(i,u)}function P2(t,i){const r=String(i.identifier).toUpperCase(),u=t.definitionById.get(r);if(!u)return Zx(t,i);const o={href:Wi(u.url||"")};u.title!==null&&u.title!==void 0&&(o.title=u.title);const c={type:"element",tagName:"a",properties:o,children:t.all(i)};return t.patch(i,c),t.applyData(i,c)}function W2(t,i){const r={href:Wi(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const u={type:"element",tagName:"a",properties:r,children:t.all(i)};return t.patch(i,u),t.applyData(i,u)}function ek(t,i,r){const u=t.all(i),o=r?tk(r):Kx(i),c={},f=[];if(typeof i.checked=="boolean"){const y=u[0];let x;y&&y.type==="element"&&y.tagName==="p"?x=y:(x={type:"element",tagName:"p",properties:{},children:[]},u.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),c.className=["task-list-item"]}let p=-1;for(;++p<u.length;){const y=u[p];(o||p!==0||y.type!=="element"||y.tagName!=="p")&&f.push({type:"text",value:`
|
|
55
|
-
`}),y.type==="element"&&y.tagName==="p"&&!o?f.push(...y.children):f.push(y)}const g=u[u.length-1];g&&(o||g.type!=="element"||g.tagName!=="p")&&f.push({type:"text",value:`
|
|
56
|
-
`});const m={type:"element",tagName:"li",properties:c,children:f};return t.patch(i,m),t.applyData(i,m)}function tk(t){let i=!1;if(t.type==="list"){i=t.spread||!1;const r=t.children;let u=-1;for(;!i&&++u<r.length;)i=Kx(r[u])}return i}function Kx(t){const i=t.spread;return i??t.children.length>1}function nk(t,i){const r={},u=t.all(i);let o=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++o<u.length;){const f=u[o];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const c={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:t.wrap(u,!0)};return t.patch(i,c),t.applyData(i,c)}function lk(t,i){const r={type:"element",tagName:"p",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function ik(t,i){const r={type:"root",children:t.wrap(t.all(i))};return t.patch(i,r),t.applyData(i,r)}function rk(t,i){const r={type:"element",tagName:"strong",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function ak(t,i){const r=t.all(i),u=r.shift(),o=[];if(u){const f={type:"element",tagName:"thead",properties:{},children:t.wrap([u],!0)};t.patch(i.children[0],f),o.push(f)}if(r.length>0){const f={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},p=gf(i.children[1]),g=Tx(i.children[i.children.length-1]);p&&g&&(f.position={start:p,end:g}),o.push(f)}const c={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(i,c),t.applyData(i,c)}function uk(t,i,r){const u=r?r.children:void 0,c=(u?u.indexOf(i):1)===0?"th":"td",f=r&&r.type==="table"?r.align:void 0,p=f?f.length:i.children.length;let g=-1;const m=[];for(;++g<p;){const x=i.children[g],S={},v=f?f[g]:void 0;v&&(S.align=v);let N={type:"element",tagName:c,properties:S,children:[]};x&&(N.children=t.all(x),t.patch(x,N),N=t.applyData(x,N)),m.push(N)}const y={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(i,y),t.applyData(i,y)}function sk(t,i){const r={type:"element",tagName:"td",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}const gg=9,xg=32;function ok(t){const i=String(t),r=/\r?\n|\r/g;let u=r.exec(i),o=0;const c=[];for(;u;)c.push(yg(i.slice(o,u.index),o>0,!0),u[0]),o=u.index+u[0].length,u=r.exec(i);return c.push(yg(i.slice(o),o>0,!1)),c.join("")}function yg(t,i,r){let u=0,o=t.length;if(i){let c=t.codePointAt(u);for(;c===gg||c===xg;)u++,c=t.codePointAt(u)}if(r){let c=t.codePointAt(o-1);for(;c===gg||c===xg;)o--,c=t.codePointAt(o-1)}return o>u?t.slice(u,o):""}function ck(t,i){const r={type:"text",value:ok(String(i.value))};return t.patch(i,r),t.applyData(i,r)}function fk(t,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(i,r),t.applyData(i,r)}const dk={blockquote:I2,break:Y2,code:G2,delete:V2,emphasis:F2,footnoteReference:X2,heading:$2,html:Q2,imageReference:Z2,image:K2,inlineCode:J2,linkReference:P2,link:W2,listItem:ek,list:nk,paragraph:lk,root:ik,strong:rk,table:ak,tableCell:sk,tableRow:uk,text:ck,thematicBreak:fk,toml:Su,yaml:Su,definition:Su,footnoteDefinition:Su};function Su(){}const Jx=-1,Hu=0,ta=1,Du=2,wf=3,jf=4,Nf=5,Cf=6,Px=7,Wx=8,hk=typeof self=="object"?self:globalThis,bg=(t,i)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new hk[t](i)},pk=(t,i)=>{const r=(o,c)=>(t.set(c,o),o),u=o=>{if(t.has(o))return t.get(o);const[c,f]=i[o];switch(c){case Hu:case Jx:return r(f,o);case ta:{const p=r([],o);for(const g of f)p.push(u(g));return p}case Du:{const p=r({},o);for(const[g,m]of f)p[u(g)]=u(m);return p}case wf:return r(new Date(f),o);case jf:{const{source:p,flags:g}=f;return r(new RegExp(p,g),o)}case Nf:{const p=r(new Map,o);for(const[g,m]of f)p.set(u(g),u(m));return p}case Cf:{const p=r(new Set,o);for(const g of f)p.add(u(g));return p}case Px:{const{name:p,message:g}=f;return r(bg(p,g),o)}case Wx:return r(BigInt(f),o);case"BigInt":return r(Object(BigInt(f)),o);case"ArrayBuffer":return r(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:p}=new Uint8Array(f);return r(new DataView(p),f)}}return r(bg(c,f),o)};return u},vg=t=>pk(new Map,t)(0),Qi="",{toString:mk}={},{keys:gk}=Object,Kr=t=>{const i=typeof t;if(i!=="object"||!t)return[Hu,i];const r=mk.call(t).slice(8,-1);switch(r){case"Array":return[ta,Qi];case"Object":return[Du,Qi];case"Date":return[wf,Qi];case"RegExp":return[jf,Qi];case"Map":return[Nf,Qi];case"Set":return[Cf,Qi];case"DataView":return[ta,r]}return r.includes("Array")?[ta,r]:r.includes("Error")?[Px,r]:[Du,r]},ku=([t,i])=>t===Hu&&(i==="function"||i==="symbol"),xk=(t,i,r,u)=>{const o=(f,p)=>{const g=u.push(f)-1;return r.set(p,g),g},c=f=>{if(r.has(f))return r.get(f);let[p,g]=Kr(f);switch(p){case Hu:{let y=f;switch(g){case"bigint":p=Wx,y=f.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+g);y=null;break;case"undefined":return o([Jx],f)}return o([p,y],f)}case ta:{if(g){let S=f;return g==="DataView"?S=new Uint8Array(f.buffer):g==="ArrayBuffer"&&(S=new Uint8Array(f)),o([g,[...S]],f)}const y=[],x=o([p,y],f);for(const S of f)y.push(c(S));return x}case Du:{if(g)switch(g){case"BigInt":return o([g,f.toString()],f);case"Boolean":case"Number":case"String":return o([g,f.valueOf()],f)}if(i&&"toJSON"in f)return c(f.toJSON());const y=[],x=o([p,y],f);for(const S of gk(f))(t||!ku(Kr(f[S])))&&y.push([c(S),c(f[S])]);return x}case wf:return o([p,f.toISOString()],f);case jf:{const{source:y,flags:x}=f;return o([p,{source:y,flags:x}],f)}case Nf:{const y=[],x=o([p,y],f);for(const[S,v]of f)(t||!(ku(Kr(S))||ku(Kr(v))))&&y.push([c(S),c(v)]);return x}case Cf:{const y=[],x=o([p,y],f);for(const S of f)(t||!ku(Kr(S)))&&y.push(c(S));return x}}const{message:m}=f;return o([p,{name:g,message:m}],f)};return c},Sg=(t,{json:i,lossy:r}={})=>{const u=[];return xk(!(i||r),!!i,new Map,u)(t),u},Ru=typeof structuredClone=="function"?(t,i)=>i&&("json"in i||"lossy"in i)?vg(Sg(t,i)):structuredClone(t):(t,i)=>vg(Sg(t,i));function yk(t,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function bk(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function vk(t){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||yk,u=t.options.footnoteBackLabel||bk,o=t.options.footnoteLabel||"Footnotes",c=t.options.footnoteLabelTagName||"h2",f=t.options.footnoteLabelProperties||{className:["sr-only"]},p=[];let g=-1;for(;++g<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[g]);if(!m)continue;const y=t.all(m),x=String(m.identifier).toUpperCase(),S=Wi(x.toLowerCase());let v=0;const N=[],T=t.footnoteCounts.get(x);for(;T!==void 0&&++v<=T;){N.length>0&&N.push({type:"text",value:" "});let F=typeof r=="string"?r:r(g,v);typeof F=="string"&&(F={type:"text",value:F}),N.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+S+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof u=="string"?u:u(g,v),className:["data-footnote-backref"]},children:Array.isArray(F)?F:[F]})}const L=y[y.length-1];if(L&&L.type==="element"&&L.tagName==="p"){const F=L.children[L.children.length-1];F&&F.type==="text"?F.value+=" ":L.children.push({type:"text",value:" "}),L.children.push(...N)}else y.push(...N);const C={type:"element",tagName:"li",properties:{id:i+"fn-"+S},children:t.wrap(y,!0)};t.patch(m,C),p.push(C)}if(p.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:c,properties:{...Ru(f),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
57
|
-
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(p,!0)},{type:"text",value:`
|
|
58
|
-
`}]}}const Iu=(function(t){if(t==null)return jk;if(typeof t=="function")return Yu(t);if(typeof t=="object")return Array.isArray(t)?Sk(t):kk(t);if(typeof t=="string")return wk(t);throw new Error("Expected function, string, or object as test")});function Sk(t){const i=[];let r=-1;for(;++r<t.length;)i[r]=Iu(t[r]);return Yu(u);function u(...o){let c=-1;for(;++c<i.length;)if(i[c].apply(this,o))return!0;return!1}}function kk(t){const i=t;return Yu(r);function r(u){const o=u;let c;for(c in t)if(o[c]!==i[c])return!1;return!0}}function wk(t){return Yu(i);function i(r){return r&&r.type===t}}function Yu(t){return i;function i(r,u,o){return!!(Nk(r)&&t.call(this,r,typeof u=="number"?u:void 0,o||void 0))}}function jk(){return!0}function Nk(t){return t!==null&&typeof t=="object"&&"type"in t}const ey=[],Ck=!0,Jc=!1,Ek="skip";function ty(t,i,r,u){let o;typeof i=="function"&&typeof r!="function"?(u=r,r=i):o=i;const c=Iu(o),f=u?-1:1;p(t,void 0,[])();function p(g,m,y){const x=g&&typeof g=="object"?g:{};if(typeof x.type=="string"){const v=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(g.type+(v?"<"+v+">":""))+")"})}return S;function S(){let v=ey,N,T,L;if((!i||c(g,m,y[y.length-1]||void 0))&&(v=_k(r(g,y)),v[0]===Jc))return v;if("children"in g&&g.children){const C=g;if(C.children&&v[0]!==Ek)for(T=(u?C.children.length:-1)+f,L=y.concat(C);T>-1&&T<C.children.length;){const F=C.children[T];if(N=p(F,T,L)(),N[0]===Jc)return N;T=typeof N[1]=="number"?N[1]:T+f}}return v}}}function _k(t){return Array.isArray(t)?t:typeof t=="number"?[Ck,t]:t==null?ey:[t]}function Ef(t,i,r,u){let o,c,f;typeof i=="function"&&typeof r!="function"?(c=void 0,f=i,o=r):(c=i,f=r,o=u),ty(t,c,p,o);function p(g,m){const y=m[m.length-1],x=y?y.children.indexOf(g):void 0;return f(g,x,y)}}const Pc={}.hasOwnProperty,Tk={};function Ak(t,i){const r=i||Tk,u=new Map,o=new Map,c=new Map,f={...dk,...r.handlers},p={all:m,applyData:Dk,definitionById:u,footnoteById:o,footnoteCounts:c,footnoteOrder:[],handlers:f,one:g,options:r,patch:zk,wrap:Mk};return Ef(t,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const x=y.type==="definition"?u:o,S=String(y.identifier).toUpperCase();x.has(S)||x.set(S,y)}}),p;function g(y,x){const S=y.type,v=p.handlers[S];if(Pc.call(p.handlers,S)&&v)return v(p,y,x);if(p.options.passThrough&&p.options.passThrough.includes(S)){if("children"in y){const{children:T,...L}=y,C=Ru(L);return C.children=p.all(y),C}return Ru(y)}return(p.options.unknownHandler||Rk)(p,y,x)}function m(y){const x=[];if("children"in y){const S=y.children;let v=-1;for(;++v<S.length;){const N=p.one(S[v],y);if(N){if(v&&S[v-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=kg(N.value)),!Array.isArray(N)&&N.type==="element")){const T=N.children[0];T&&T.type==="text"&&(T.value=kg(T.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function zk(t,i){t.position&&(i.position=yv(t))}function Dk(t,i){let r=i;if(t&&t.data){const u=t.data.hName,o=t.data.hChildren,c=t.data.hProperties;if(typeof u=="string")if(r.type==="element")r.tagName=u;else{const f="children"in r?r.children:[r];r={type:"element",tagName:u,properties:{},children:f}}r.type==="element"&&c&&Object.assign(r.properties,Ru(c)),"children"in r&&r.children&&o!==null&&o!==void 0&&(r.children=o)}return r}function Rk(t,i){const r=i.data||{},u="value"in i&&!(Pc.call(r,"hProperties")||Pc.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:t.all(i)};return t.patch(i,u),t.applyData(i,u)}function Mk(t,i){const r=[];let u=-1;for(i&&r.push({type:"text",value:`
|
|
59
|
-
`});++u<t.length;)u&&r.push({type:"text",value:`
|
|
60
|
-
`}),r.push(t[u]);return i&&t.length>0&&r.push({type:"text",value:`
|
|
61
|
-
`}),r}function kg(t){let i=0,r=t.charCodeAt(i);for(;r===9||r===32;)i++,r=t.charCodeAt(i);return t.slice(i)}function wg(t,i){const r=Ak(t,i),u=r.one(t,void 0),o=vk(r),c=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};return o&&c.children.push({type:"text",value:`
|
|
62
|
-
`},o),c}function Ok(t,i){return t&&"run"in t?async function(r,u){const o=wg(r,{file:u,...i});await t.run(o,u)}:function(r,u){return wg(r,{file:u,...t||i})}}function jg(t){if(t)throw t}var xc,Ng;function Lk(){if(Ng)return xc;Ng=1;var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):i.call(m)==="[object Array]"},c=function(m){if(!m||i.call(m)!=="[object Object]")return!1;var y=t.call(m,"constructor"),x=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!y&&!x)return!1;var S;for(S in m);return typeof S>"u"||t.call(m,S)},f=function(m,y){r&&y.name==="__proto__"?r(m,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):m[y.name]=y.newValue},p=function(m,y){if(y==="__proto__")if(t.call(m,y)){if(u)return u(m,y).value}else return;return m[y]};return xc=function g(){var m,y,x,S,v,N,T=arguments[0],L=1,C=arguments.length,F=!1;for(typeof T=="boolean"&&(F=T,T=arguments[1]||{},L=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});L<C;++L)if(m=arguments[L],m!=null)for(y in m)x=p(T,y),S=p(m,y),T!==S&&(F&&S&&(c(S)||(v=o(S)))?(v?(v=!1,N=x&&o(x)?x:[]):N=x&&c(x)?x:{},f(T,{name:y,newValue:g(F,N,S)})):typeof S<"u"&&f(T,{name:y,newValue:S}));return T},xc}var Uk=Lk();const yc=Uu(Uk);function Wc(t){if(typeof t!="object"||t===null)return!1;const i=Object.getPrototypeOf(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function qk(){const t=[],i={run:r,use:u};return i;function r(...o){let c=-1;const f=o.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);p(null,...o);function p(g,...m){const y=t[++c];let x=-1;if(g){f(g);return}for(;++x<o.length;)(m[x]===null||m[x]===void 0)&&(m[x]=o[x]);o=m,y?Bk(y,p)(...m):f(null,...m)}}function u(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),i}}function Bk(t,i){let r;return u;function u(...f){const p=t.length>f.length;let g;p&&f.push(o);try{g=t.apply(this,f)}catch(m){const y=m;if(p&&r)throw y;return o(y)}p||(g&&g.then&&typeof g.then=="function"?g.then(c,o):g instanceof Error?o(g):c(g))}function o(f,...p){r||(r=!0,i(f,...p))}function c(f){o(null,f)}}const Mn={basename:Hk,dirname:Ik,extname:Yk,join:Gk,sep:"/"};function Hk(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');aa(t);let r=0,u=-1,o=t.length,c;if(i===void 0||i.length===0||i.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(c){r=o+1;break}}else u<0&&(c=!0,u=o+1);return u<0?"":t.slice(r,u)}if(i===t)return"";let f=-1,p=i.length-1;for(;o--;)if(t.codePointAt(o)===47){if(c){r=o+1;break}}else f<0&&(c=!0,f=o+1),p>-1&&(t.codePointAt(o)===i.codePointAt(p--)?p<0&&(u=o):(p=-1,u=f));return r===u?u=f:u<0&&(u=t.length),t.slice(r,u)}function Ik(t){if(aa(t),t.length===0)return".";let i=-1,r=t.length,u;for(;--r;)if(t.codePointAt(r)===47){if(u){i=r;break}}else u||(u=!0);return i<0?t.codePointAt(0)===47?"/":".":i===1&&t.codePointAt(0)===47?"//":t.slice(0,i)}function Yk(t){aa(t);let i=t.length,r=-1,u=0,o=-1,c=0,f;for(;i--;){const p=t.codePointAt(i);if(p===47){if(f){u=i+1;break}continue}r<0&&(f=!0,r=i+1),p===46?o<0?o=i:c!==1&&(c=1):o>-1&&(c=-1)}return o<0||r<0||c===0||c===1&&o===r-1&&o===u+1?"":t.slice(o,r)}function Gk(...t){let i=-1,r;for(;++i<t.length;)aa(t[i]),t[i]&&(r=r===void 0?t[i]:r+"/"+t[i]);return r===void 0?".":Vk(r)}function Vk(t){aa(t);const i=t.codePointAt(0)===47;let r=Fk(t,!i);return r.length===0&&!i&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),i?"/"+r:r}function Fk(t,i){let r="",u=0,o=-1,c=0,f=-1,p,g;for(;++f<=t.length;){if(f<t.length)p=t.codePointAt(f);else{if(p===47)break;p=47}if(p===47){if(!(o===f-1||c===1))if(o!==f-1&&c===2){if(r.length<2||u!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(g=r.lastIndexOf("/"),g!==r.length-1){g<0?(r="",u=0):(r=r.slice(0,g),u=r.length-1-r.lastIndexOf("/")),o=f,c=0;continue}}else if(r.length>0){r="",u=0,o=f,c=0;continue}}i&&(r=r.length>0?r+"/..":"..",u=2)}else r.length>0?r+="/"+t.slice(o+1,f):r=t.slice(o+1,f),u=f-o-1;o=f,c=0}else p===46&&c>-1?c++:c=-1}return r}function aa(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Xk={cwd:$k};function $k(){return"/"}function ef(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Qk(t){if(typeof t=="string")t=new URL(t);else if(!ef(t)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(t.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return Zk(t)}function Zk(t){if(t.hostname!==""){const u=new TypeError('File URL host must be "localhost" or empty on darwin');throw u.code="ERR_INVALID_FILE_URL_HOST",u}const i=t.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const u=i.codePointAt(r+2);if(u===70||u===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(i)}const bc=["history","path","basename","stem","extname","dirname"];class ny{constructor(i){let r;i?ef(i)?r={path:i}:typeof i=="string"||Kk(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":Xk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let u=-1;for(;++u<bc.length;){const c=bc[u];c in r&&r[c]!==void 0&&r[c]!==null&&(this[c]=c==="history"?[...r[c]]:r[c])}let o;for(o in r)bc.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?Mn.basename(this.path):void 0}set basename(i){Sc(i,"basename"),vc(i,"basename"),this.path=Mn.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?Mn.dirname(this.path):void 0}set dirname(i){Cg(this.basename,"dirname"),this.path=Mn.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?Mn.extname(this.path):void 0}set extname(i){if(vc(i,"extname"),Cg(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Mn.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){ef(i)&&(i=Qk(i)),Sc(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?Mn.basename(this.path,this.extname):void 0}set stem(i){Sc(i,"stem"),vc(i,"stem"),this.path=Mn.join(this.dirname||"",i+(this.extname||""))}fail(i,r,u){const o=this.message(i,r,u);throw o.fatal=!0,o}info(i,r,u){const o=this.message(i,r,u);return o.fatal=void 0,o}message(i,r,u){const o=new Ot(i,r,u);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function vc(t,i){if(t&&t.includes(Mn.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+Mn.sep+"`")}function Sc(t,i){if(!t)throw new Error("`"+i+"` cannot be empty")}function Cg(t,i){if(!t)throw new Error("Setting `"+i+"` requires `path` to be set too")}function Kk(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Jk=(function(t){const u=this.constructor.prototype,o=u[t],c=function(){return o.apply(c,arguments)};return Object.setPrototypeOf(c,u),c}),Pk={}.hasOwnProperty;class _f extends Jk{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=qk()}copy(){const i=new _f;let r=-1;for(;++r<this.attachers.length;){const u=this.attachers[r];i.use(...u)}return i.data(yc(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(jc("data",this.frozen),this.namespace[i]=r,this):Pk.call(this.namespace,i)&&this.namespace[i]||void 0:i?(jc("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...u]=this.attachers[this.freezeIndex];if(u[0]===!1)continue;u[0]===!0&&(u[0]=void 0);const o=r.call(i,...u);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=wu(i),u=this.parser||this.Parser;return kc("parse",u),u(String(r),r)}process(i,r){const u=this;return this.freeze(),kc("process",this.parser||this.Parser),wc("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(c,f){const p=wu(i),g=u.parse(p);u.run(g,p,function(y,x,S){if(y||!x||!S)return m(y);const v=x,N=u.stringify(v,S);tw(N)?S.value=N:S.result=N,m(y,S)});function m(y,x){y||!x?f(y):c?c(x):r(void 0,x)}}}processSync(i){let r=!1,u;return this.freeze(),kc("processSync",this.parser||this.Parser),wc("processSync",this.compiler||this.Compiler),this.process(i,o),_g("processSync","process",r),u;function o(c,f){r=!0,jg(c),u=f}}run(i,r,u){Eg(i),this.freeze();const o=this.transformers;return!u&&typeof r=="function"&&(u=r,r=void 0),u?c(void 0,u):new Promise(c);function c(f,p){const g=wu(r);o.run(i,g,m);function m(y,x,S){const v=x||i;y?p(y):f?f(v):u(void 0,v,S)}}}runSync(i,r){let u=!1,o;return this.run(i,r,c),_g("runSync","run",u),o;function c(f,p){jg(f),o=p,u=!0}}stringify(i,r){this.freeze();const u=wu(r),o=this.compiler||this.Compiler;return wc("stringify",o),Eg(i),o(i,u)}use(i,...r){const u=this.attachers,o=this.namespace;if(jc("use",this.frozen),i!=null)if(typeof i=="function")g(i,r);else if(typeof i=="object")Array.isArray(i)?p(i):f(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function c(m){if(typeof m=="function")g(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[y,...x]=m;g(y,x)}else f(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function f(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");p(m.plugins),m.settings&&(o.settings=yc(!0,o.settings,m.settings))}function p(m){let y=-1;if(m!=null)if(Array.isArray(m))for(;++y<m.length;){const x=m[y];c(x)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function g(m,y){let x=-1,S=-1;for(;++x<u.length;)if(u[x][0]===m){S=x;break}if(S===-1)u.push([m,...y]);else if(y.length>0){let[v,...N]=y;const T=u[S][1];Wc(T)&&Wc(v)&&(v=yc(!0,T,v)),u[S]=[m,v,...N]}}}}const Wk=new _f().freeze();function kc(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function wc(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function jc(t,i){if(i)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Eg(t){if(!Wc(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function _g(t,i,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+i+"` instead")}function wu(t){return ew(t)?t:new ny(t)}function ew(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function tw(t){return typeof t=="string"||nw(t)}function nw(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const lw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Tg=[],Ag={allowDangerousHtml:!0},iw=/^(https?|ircs?|mailto|xmpp)$/i,rw=[{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:"className",id:"remove-classname"},{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 aw(t){const i=uw(t),r=sw(t);return ow(i.runSync(i.parse(r),r),t)}function uw(t){const i=t.rehypePlugins||Tg,r=t.remarkPlugins||Tg,u=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Ag}:Ag;return Wk().use(H2).use(r).use(Ok,u).use(i)}function sw(t){const i=t.children||"",r=new ny;return typeof i=="string"&&(r.value=i),r}function ow(t,i){const r=i.allowedElements,u=i.allowElement,o=i.components,c=i.disallowedElements,f=i.skipHtml,p=i.unwrapDisallowed,g=i.urlTransform||cw;for(const y of rw)Object.hasOwn(i,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+lw+y.id,void 0);return Ef(t,m),wv(t,{Fragment:d.Fragment,components:o,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function m(y,x,S){if(y.type==="raw"&&S&&typeof x=="number")return f?S.children.splice(x,1):S.children[x]={type:"text",value:y.value},x;if(y.type==="element"){let v;for(v in pc)if(Object.hasOwn(pc,v)&&Object.hasOwn(y.properties,v)){const N=y.properties[v],T=pc[v];(T===null||T.includes(y.tagName))&&(y.properties[v]=g(String(N||""),v,y))}}if(y.type==="element"){let v=r?!r.includes(y.tagName):c?c.includes(y.tagName):!1;if(!v&&u&&typeof x=="number"&&(v=!u(y,x,S)),v&&S&&typeof x=="number")return p&&y.children?S.children.splice(x,1,...y.children):S.children.splice(x,1),x}}}function cw(t){const i=t.indexOf(":"),r=t.indexOf("?"),u=t.indexOf("#"),o=t.indexOf("/");return i===-1||o!==-1&&i>o||r!==-1&&i>r||u!==-1&&i>u||iw.test(t.slice(0,i))?t:""}function zg(t,i){const r=String(t);if(typeof i!="string")throw new TypeError("Expected character");let u=0,o=r.indexOf(i);for(;o!==-1;)u++,o=r.indexOf(i,o+i.length);return u}function fw(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function dw(t,i,r){const o=Iu((r||{}).ignore||[]),c=hw(i);let f=-1;for(;++f<c.length;)ty(t,"text",p);function p(m,y){let x=-1,S;for(;++x<y.length;){const v=y[x],N=S?S.children:void 0;if(o(v,N?N.indexOf(v):void 0,S))return;S=v}if(S)return g(m,y)}function g(m,y){const x=y[y.length-1],S=c[f][0],v=c[f][1];let N=0;const L=x.children.indexOf(m);let C=!1,F=[];S.lastIndex=0;let U=S.exec(m.value);for(;U;){const X=U.index,ie={index:U.index,input:U.input,stack:[...y,m]};let R=v(...U,ie);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?S.lastIndex=X+1:(N!==X&&F.push({type:"text",value:m.value.slice(N,X)}),Array.isArray(R)?F.push(...R):R&&F.push(R),N=X+U[0].length,C=!0),!S.global)break;U=S.exec(m.value)}return C?(N<m.value.length&&F.push({type:"text",value:m.value.slice(N)}),x.children.splice(L,1,...F)):F=[m],L+F.length}}function hw(t){const i=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let u=-1;for(;++u<r.length;){const o=r[u];i.push([pw(o[0]),mw(o[1])])}return i}function pw(t){return typeof t=="string"?new RegExp(fw(t),"g"):t}function mw(t){return typeof t=="function"?t:function(){return t}}const Nc="phrasing",Cc=["autolink","link","image","label"];function gw(){return{transforms:[ww],enter:{literalAutolink:yw,literalAutolinkEmail:Ec,literalAutolinkHttp:Ec,literalAutolinkWww:Ec},exit:{literalAutolink:kw,literalAutolinkEmail:Sw,literalAutolinkHttp:bw,literalAutolinkWww:vw}}}function xw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Nc,notInConstruct:Cc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Nc,notInConstruct:Cc},{character:":",before:"[ps]",after:"\\/",inConstruct:Nc,notInConstruct:Cc}]}}function yw(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Ec(t){this.config.enter.autolinkProtocol.call(this,t)}function bw(t){this.config.exit.autolinkProtocol.call(this,t)}function vw(t){this.config.exit.data.call(this,t);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(t)}function Sw(t){this.config.exit.autolinkEmail.call(this,t)}function kw(t){this.exit(t)}function ww(t){dw(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,jw],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Nw]],{ignore:["link","linkReference"]})}function jw(t,i,r,u,o){let c="";if(!ly(o)||(/^w/i.test(i)&&(r=i+r,i="",c="http://"),!Cw(r)))return!1;const f=Ew(r+u);if(!f[0])return!1;const p={type:"link",title:null,url:c+i+f[0],children:[{type:"text",value:i+f[0]}]};return f[1]?[p,{type:"text",value:f[1]}]:p}function Nw(t,i,r,u){return!ly(u,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+r,children:[{type:"text",value:i+"@"+r}]}}function Cw(t){const i=t.split(".");return!(i.length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))}function Ew(t){const i=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!i)return[t,void 0];t=t.slice(0,i.index);let r=i[0],u=r.indexOf(")");const o=zg(t,"(");let c=zg(t,")");for(;u!==-1&&o>c;)t+=r.slice(0,u+1),r=r.slice(u+1),u=r.indexOf(")"),c++;return[t,r]}function ly(t,i){const r=t.input.charCodeAt(t.index-1);return(t.index===0||ii(r)||qu(r))&&(!i||r!==47)}iy.peek=Lw;function _w(){this.buffer()}function Tw(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Aw(){this.buffer()}function zw(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Dw(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=wn(this.sliceSerialize(t)).toLowerCase(),r.label=i}function Rw(t){this.exit(t)}function Mw(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=wn(this.sliceSerialize(t)).toLowerCase(),r.label=i}function Ow(t){this.exit(t)}function Lw(){return"["}function iy(t,i,r,u){const o=r.createTracker(u);let c=o.move("[^");const f=r.enter("footnoteReference"),p=r.enter("reference");return c+=o.move(r.safe(r.associationId(t),{after:"]",before:c})),p(),f(),c+=o.move("]"),c}function Uw(){return{enter:{gfmFootnoteCallString:_w,gfmFootnoteCall:Tw,gfmFootnoteDefinitionLabelString:Aw,gfmFootnoteDefinition:zw},exit:{gfmFootnoteCallString:Dw,gfmFootnoteCall:Rw,gfmFootnoteDefinitionLabelString:Mw,gfmFootnoteDefinition:Ow}}}function qw(t){let i=!1;return t&&t.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:r,footnoteReference:iy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(u,o,c,f){const p=c.createTracker(f);let g=p.move("[^");const m=c.enter("footnoteDefinition"),y=c.enter("label");return g+=p.move(c.safe(c.associationId(u),{before:g,after:"]"})),y(),g+=p.move("]:"),u.children&&u.children.length>0&&(p.shift(4),g+=p.move((i?`
|
|
63
|
-
`:" ")+c.indentLines(c.containerFlow(u,p.current()),i?ry:Bw))),m(),g}}function Bw(t,i,r){return i===0?t:ry(t,i,r)}function ry(t,i,r){return(r?"":" ")+t}const Hw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ay.peek=Fw;function Iw(){return{canContainEols:["delete"],enter:{strikethrough:Gw},exit:{strikethrough:Vw}}}function Yw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Hw}],handlers:{delete:ay}}}function Gw(t){this.enter({type:"delete",children:[]},t)}function Vw(t){this.exit(t)}function ay(t,i,r,u){const o=r.createTracker(u),c=r.enter("strikethrough");let f=o.move("~~");return f+=r.containerPhrasing(t,{...o.current(),before:f,after:"~"}),f+=o.move("~~"),c(),f}function Fw(){return"~"}function Xw(t){return t.length}function $w(t,i){const r=i||{},u=(r.align||[]).concat(),o=r.stringLength||Xw,c=[],f=[],p=[],g=[];let m=0,y=-1;for(;++y<t.length;){const T=[],L=[];let C=-1;for(t[y].length>m&&(m=t[y].length);++C<t[y].length;){const F=Qw(t[y][C]);if(r.alignDelimiters!==!1){const U=o(F);L[C]=U,(g[C]===void 0||U>g[C])&&(g[C]=U)}T.push(F)}f[y]=T,p[y]=L}let x=-1;if(typeof u=="object"&&"length"in u)for(;++x<m;)c[x]=Dg(u[x]);else{const T=Dg(u);for(;++x<m;)c[x]=T}x=-1;const S=[],v=[];for(;++x<m;){const T=c[x];let L="",C="";T===99?(L=":",C=":"):T===108?L=":":T===114&&(C=":");let F=r.alignDelimiters===!1?1:Math.max(1,g[x]-L.length-C.length);const U=L+"-".repeat(F)+C;r.alignDelimiters!==!1&&(F=L.length+F+C.length,F>g[x]&&(g[x]=F),v[x]=F),S[x]=U}f.splice(1,0,S),p.splice(1,0,v),y=-1;const N=[];for(;++y<f.length;){const T=f[y],L=p[y];x=-1;const C=[];for(;++x<m;){const F=T[x]||"";let U="",X="";if(r.alignDelimiters!==!1){const ie=g[x]-(L[x]||0),R=c[x];R===114?U=" ".repeat(ie):R===99?ie%2?(U=" ".repeat(ie/2+.5),X=" ".repeat(ie/2-.5)):(U=" ".repeat(ie/2),X=U):X=" ".repeat(ie)}r.delimiterStart!==!1&&!x&&C.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&F==="")&&(r.delimiterStart!==!1||x)&&C.push(" "),r.alignDelimiters!==!1&&C.push(U),C.push(F),r.alignDelimiters!==!1&&C.push(X),r.padding!==!1&&C.push(" "),(r.delimiterEnd!==!1||x!==m-1)&&C.push("|")}N.push(r.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return N.join(`
|
|
64
|
-
`)}function Qw(t){return t==null?"":String(t)}function Dg(t){const i=typeof t=="string"?t.codePointAt(0):0;return i===67||i===99?99:i===76||i===108?108:i===82||i===114?114:0}function Zw(t,i,r,u){const o=r.enter("blockquote"),c=r.createTracker(u);c.move("> "),c.shift(2);const f=r.indentLines(r.containerFlow(t,c.current()),Kw);return o(),f}function Kw(t,i,r){return">"+(r?"":" ")+t}function Jw(t,i){return Rg(t,i.inConstruct,!0)&&!Rg(t,i.notInConstruct,!1)}function Rg(t,i,r){if(typeof i=="string"&&(i=[i]),!i||i.length===0)return r;let u=-1;for(;++u<i.length;)if(t.includes(i[u]))return!0;return!1}function Mg(t,i,r,u){let o=-1;for(;++o<r.unsafe.length;)if(r.unsafe[o].character===`
|
|
65
|
-
`&&Jw(r.stack,r.unsafe[o]))return/[ \t]/.test(u.before)?"":" ";return`\\
|
|
66
|
-
`}function Pw(t,i){const r=String(t);let u=r.indexOf(i),o=u,c=0,f=0;if(typeof i!="string")throw new TypeError("Expected substring");for(;u!==-1;)u===o?++c>f&&(f=c):c=1,o=u+i.length,u=r.indexOf(i,o);return f}function Ww(t,i){return!!(i.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function ej(t){const i=t.options.fence||"`";if(i!=="`"&&i!=="~")throw new Error("Cannot serialize code with `"+i+"` for `options.fence`, expected `` ` `` or `~`");return i}function tj(t,i,r,u){const o=ej(r),c=t.value||"",f=o==="`"?"GraveAccent":"Tilde";if(Ww(t,r)){const x=r.enter("codeIndented"),S=r.indentLines(c,nj);return x(),S}const p=r.createTracker(u),g=o.repeat(Math.max(Pw(c,o)+1,3)),m=r.enter("codeFenced");let y=p.move(g);if(t.lang){const x=r.enter(`codeFencedLang${f}`);y+=p.move(r.safe(t.lang,{before:y,after:" ",encode:["`"],...p.current()})),x()}if(t.lang&&t.meta){const x=r.enter(`codeFencedMeta${f}`);y+=p.move(" "),y+=p.move(r.safe(t.meta,{before:y,after:`
|
|
67
|
-
`,encode:["`"],...p.current()})),x()}return y+=p.move(`
|
|
68
|
-
`),c&&(y+=p.move(c+`
|
|
69
|
-
`)),y+=p.move(g),m(),y}function nj(t,i,r){return(r?"":" ")+t}function Tf(t){const i=t.options.quote||'"';if(i!=='"'&&i!=="'")throw new Error("Cannot serialize title with `"+i+"` for `options.quote`, expected `\"`, or `'`");return i}function lj(t,i,r,u){const o=Tf(r),c=o==='"'?"Quote":"Apostrophe",f=r.enter("definition");let p=r.enter("label");const g=r.createTracker(u);let m=g.move("[");return m+=g.move(r.safe(r.associationId(t),{before:m,after:"]",...g.current()})),m+=g.move("]: "),p(),!t.url||/[\0- \u007F]/.test(t.url)?(p=r.enter("destinationLiteral"),m+=g.move("<"),m+=g.move(r.safe(t.url,{before:m,after:">",...g.current()})),m+=g.move(">")):(p=r.enter("destinationRaw"),m+=g.move(r.safe(t.url,{before:m,after:t.title?" ":`
|
|
70
|
-
`,...g.current()}))),p(),t.title&&(p=r.enter(`title${c}`),m+=g.move(" "+o),m+=g.move(r.safe(t.title,{before:m,after:o,...g.current()})),m+=g.move(o),p()),f(),m}function ij(t){const i=t.options.emphasis||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize emphasis with `"+i+"` for `options.emphasis`, expected `*`, or `_`");return i}function la(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Mu(t,i,r){const u=Ji(t),o=Ji(i);return u===void 0?o===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:u===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}uy.peek=rj;function uy(t,i,r,u){const o=ij(r),c=r.enter("emphasis"),f=r.createTracker(u),p=f.move(o);let g=f.move(r.containerPhrasing(t,{after:o,before:p,...f.current()}));const m=g.charCodeAt(0),y=Mu(u.before.charCodeAt(u.before.length-1),m,o);y.inside&&(g=la(m)+g.slice(1));const x=g.charCodeAt(g.length-1),S=Mu(u.after.charCodeAt(0),x,o);S.inside&&(g=g.slice(0,-1)+la(x));const v=f.move(o);return c(),r.attentionEncodeSurroundingInfo={after:S.outside,before:y.outside},p+g+v}function rj(t,i,r){return r.options.emphasis||"*"}function aj(t,i){let r=!1;return Ef(t,function(u){if("value"in u&&/\r?\n|\r/.test(u.value)||u.type==="break")return r=!0,Jc}),!!((!t.depth||t.depth<3)&&vf(t)&&(i.options.setext||r))}function uj(t,i,r,u){const o=Math.max(Math.min(6,t.depth||1),1),c=r.createTracker(u);if(aj(t,r)){const y=r.enter("headingSetext"),x=r.enter("phrasing"),S=r.containerPhrasing(t,{...c.current(),before:`
|
|
71
|
-
`,after:`
|
|
72
|
-
`});return x(),y(),S+`
|
|
73
|
-
`+(o===1?"=":"-").repeat(S.length-(Math.max(S.lastIndexOf("\r"),S.lastIndexOf(`
|
|
74
|
-
`))+1))}const f="#".repeat(o),p=r.enter("headingAtx"),g=r.enter("phrasing");c.move(f+" ");let m=r.containerPhrasing(t,{before:"# ",after:`
|
|
75
|
-
`,...c.current()});return/^[\t ]/.test(m)&&(m=la(m.charCodeAt(0))+m.slice(1)),m=m?f+" "+m:f,r.options.closeAtx&&(m+=" "+f),g(),p(),m}sy.peek=sj;function sy(t){return t.value||""}function sj(){return"<"}oy.peek=oj;function oy(t,i,r,u){const o=Tf(r),c=o==='"'?"Quote":"Apostrophe",f=r.enter("image");let p=r.enter("label");const g=r.createTracker(u);let m=g.move("![");return m+=g.move(r.safe(t.alt,{before:m,after:"]",...g.current()})),m+=g.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=r.enter("destinationLiteral"),m+=g.move("<"),m+=g.move(r.safe(t.url,{before:m,after:">",...g.current()})),m+=g.move(">")):(p=r.enter("destinationRaw"),m+=g.move(r.safe(t.url,{before:m,after:t.title?" ":")",...g.current()}))),p(),t.title&&(p=r.enter(`title${c}`),m+=g.move(" "+o),m+=g.move(r.safe(t.title,{before:m,after:o,...g.current()})),m+=g.move(o),p()),m+=g.move(")"),f(),m}function oj(){return"!"}cy.peek=cj;function cy(t,i,r,u){const o=t.referenceType,c=r.enter("imageReference");let f=r.enter("label");const p=r.createTracker(u);let g=p.move("![");const m=r.safe(t.alt,{before:g,after:"]",...p.current()});g+=p.move(m+"]["),f();const y=r.stack;r.stack=[],f=r.enter("reference");const x=r.safe(r.associationId(t),{before:g,after:"]",...p.current()});return f(),r.stack=y,c(),o==="full"||!m||m!==x?g+=p.move(x+"]"):o==="shortcut"?g=g.slice(0,-1):g+=p.move("]"),g}function cj(){return"!"}fy.peek=fj;function fy(t,i,r){let u=t.value||"",o="`",c=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(u);)o+="`";for(/[^ \r\n]/.test(u)&&(/^[ \r\n]/.test(u)&&/[ \r\n]$/.test(u)||/^`|`$/.test(u))&&(u=" "+u+" ");++c<r.unsafe.length;){const f=r.unsafe[c],p=r.compilePattern(f);let g;if(f.atBreak)for(;g=p.exec(u);){let m=g.index;u.charCodeAt(m)===10&&u.charCodeAt(m-1)===13&&m--,u=u.slice(0,m)+" "+u.slice(g.index+1)}}return o+u+o}function fj(){return"`"}function dy(t,i){const r=vf(t);return!!(!i.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}hy.peek=dj;function hy(t,i,r,u){const o=Tf(r),c=o==='"'?"Quote":"Apostrophe",f=r.createTracker(u);let p,g;if(dy(t,r)){const y=r.stack;r.stack=[],p=r.enter("autolink");let x=f.move("<");return x+=f.move(r.containerPhrasing(t,{before:x,after:">",...f.current()})),x+=f.move(">"),p(),r.stack=y,x}p=r.enter("link"),g=r.enter("label");let m=f.move("[");return m+=f.move(r.containerPhrasing(t,{before:m,after:"](",...f.current()})),m+=f.move("]("),g(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(g=r.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(r.safe(t.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(g=r.enter("destinationRaw"),m+=f.move(r.safe(t.url,{before:m,after:t.title?" ":")",...f.current()}))),g(),t.title&&(g=r.enter(`title${c}`),m+=f.move(" "+o),m+=f.move(r.safe(t.title,{before:m,after:o,...f.current()})),m+=f.move(o),g()),m+=f.move(")"),p(),m}function dj(t,i,r){return dy(t,r)?"<":"["}py.peek=hj;function py(t,i,r,u){const o=t.referenceType,c=r.enter("linkReference");let f=r.enter("label");const p=r.createTracker(u);let g=p.move("[");const m=r.containerPhrasing(t,{before:g,after:"]",...p.current()});g+=p.move(m+"]["),f();const y=r.stack;r.stack=[],f=r.enter("reference");const x=r.safe(r.associationId(t),{before:g,after:"]",...p.current()});return f(),r.stack=y,c(),o==="full"||!m||m!==x?g+=p.move(x+"]"):o==="shortcut"?g=g.slice(0,-1):g+=p.move("]"),g}function hj(){return"["}function Af(t){const i=t.options.bullet||"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bullet`, expected `*`, `+`, or `-`");return i}function pj(t){const i=Af(t),r=t.options.bulletOther;if(!r)return i==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===i)throw new Error("Expected `bullet` (`"+i+"`) and `bulletOther` (`"+r+"`) to be different");return r}function mj(t){const i=t.options.bulletOrdered||".";if(i!=="."&&i!==")")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOrdered`, expected `.` or `)`");return i}function my(t){const i=t.options.rule||"*";if(i!=="*"&&i!=="-"&&i!=="_")throw new Error("Cannot serialize rules with `"+i+"` for `options.rule`, expected `*`, `-`, or `_`");return i}function gj(t,i,r,u){const o=r.enter("list"),c=r.bulletCurrent;let f=t.ordered?mj(r):Af(r);const p=t.ordered?f==="."?")":".":pj(r);let g=i&&r.bulletLastUsed?f===r.bulletLastUsed:!1;if(!t.ordered){const y=t.children?t.children[0]:void 0;if((f==="*"||f==="-")&&y&&(!y.children||!y.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(g=!0),my(r)===f&&y){let x=-1;for(;++x<t.children.length;){const S=t.children[x];if(S&&S.type==="listItem"&&S.children&&S.children[0]&&S.children[0].type==="thematicBreak"){g=!0;break}}}}g&&(f=p),r.bulletCurrent=f;const m=r.containerFlow(t,u);return r.bulletLastUsed=f,r.bulletCurrent=c,o(),m}function xj(t){const i=t.options.listItemIndent||"one";if(i!=="tab"&&i!=="one"&&i!=="mixed")throw new Error("Cannot serialize items with `"+i+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return i}function yj(t,i,r,u){const o=xj(r);let c=r.bulletCurrent||Af(r);i&&i.type==="list"&&i.ordered&&(c=(typeof i.start=="number"&&i.start>-1?i.start:1)+(r.options.incrementListMarker===!1?0:i.children.indexOf(t))+c);let f=c.length+1;(o==="tab"||o==="mixed"&&(i&&i.type==="list"&&i.spread||t.spread))&&(f=Math.ceil(f/4)*4);const p=r.createTracker(u);p.move(c+" ".repeat(f-c.length)),p.shift(f);const g=r.enter("listItem"),m=r.indentLines(r.containerFlow(t,p.current()),y);return g(),m;function y(x,S,v){return S?(v?"":" ".repeat(f))+x:(v?c:c+" ".repeat(f-c.length))+x}}function bj(t,i,r,u){const o=r.enter("paragraph"),c=r.enter("phrasing"),f=r.containerPhrasing(t,u);return c(),o(),f}const vj=Iu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Sj(t,i,r,u){return(t.children.some(function(f){return vj(f)})?r.containerPhrasing:r.containerFlow).call(r,t,u)}function kj(t){const i=t.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}gy.peek=wj;function gy(t,i,r,u){const o=kj(r),c=r.enter("strong"),f=r.createTracker(u),p=f.move(o+o);let g=f.move(r.containerPhrasing(t,{after:o,before:p,...f.current()}));const m=g.charCodeAt(0),y=Mu(u.before.charCodeAt(u.before.length-1),m,o);y.inside&&(g=la(m)+g.slice(1));const x=g.charCodeAt(g.length-1),S=Mu(u.after.charCodeAt(0),x,o);S.inside&&(g=g.slice(0,-1)+la(x));const v=f.move(o+o);return c(),r.attentionEncodeSurroundingInfo={after:S.outside,before:y.outside},p+g+v}function wj(t,i,r){return r.options.strong||"*"}function jj(t,i,r,u){return r.safe(t.value,u)}function Nj(t){const i=t.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}function Cj(t,i,r){const u=(my(r)+(r.options.ruleSpaces?" ":"")).repeat(Nj(r));return r.options.ruleSpaces?u.slice(0,-1):u}const xy={blockquote:Zw,break:Mg,code:tj,definition:lj,emphasis:uy,hardBreak:Mg,heading:uj,html:sy,image:oy,imageReference:cy,inlineCode:fy,link:hy,linkReference:py,list:gj,listItem:yj,paragraph:bj,root:Sj,strong:gy,text:jj,thematicBreak:Cj};function Ej(){return{enter:{table:_j,tableData:Og,tableHeader:Og,tableRow:Aj},exit:{codeText:zj,table:Tj,tableData:_c,tableHeader:_c,tableRow:_c}}}function _j(t){const i=t._align;this.enter({type:"table",align:i.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function Tj(t){this.exit(t),this.data.inTable=void 0}function Aj(t){this.enter({type:"tableRow",children:[]},t)}function _c(t){this.exit(t)}function Og(t){this.enter({type:"tableCell",children:[]},t)}function zj(t){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,Dj));const r=this.stack[this.stack.length-1];r.type,r.value=i,this.exit(t)}function Dj(t,i){return i==="|"?i:t}function Rj(t){const i=t||{},r=i.tableCellPadding,u=i.tablePipeAlign,o=i.stringLength,c=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
76
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:S,table:f,tableCell:g,tableRow:p}};function f(v,N,T,L){return m(y(v,T,L),v.align)}function p(v,N,T,L){const C=x(v,T,L),F=m([C]);return F.slice(0,F.indexOf(`
|
|
77
|
-
`))}function g(v,N,T,L){const C=T.enter("tableCell"),F=T.enter("phrasing"),U=T.containerPhrasing(v,{...L,before:c,after:c});return F(),C(),U}function m(v,N){return $w(v,{align:N,alignDelimiters:u,padding:r,stringLength:o})}function y(v,N,T){const L=v.children;let C=-1;const F=[],U=N.enter("table");for(;++C<L.length;)F[C]=x(L[C],N,T);return U(),F}function x(v,N,T){const L=v.children;let C=-1;const F=[],U=N.enter("tableRow");for(;++C<L.length;)F[C]=g(L[C],v,N,T);return U(),F}function S(v,N,T){let L=xy.inlineCode(v,N,T);return T.stack.includes("tableCell")&&(L=L.replace(/\|/g,"\\$&")),L}}function Mj(){return{exit:{taskListCheckValueChecked:Lg,taskListCheckValueUnchecked:Lg,paragraph:Lj}}}function Oj(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Uj}}}function Lg(t){const i=this.stack[this.stack.length-2];i.type,i.checked=t.type==="taskListCheckValueChecked"}function Lj(t){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const u=r.children[0];if(u&&u.type==="text"){const o=i.children;let c=-1,f;for(;++c<o.length;){const p=o[c];if(p.type==="paragraph"){f=p;break}}f===r&&(u.value=u.value.slice(1),u.value.length===0?r.children.shift():r.position&&u.position&&typeof u.position.start.offset=="number"&&(u.position.start.column++,u.position.start.offset++,r.position.start=Object.assign({},u.position.start)))}}this.exit(t)}function Uj(t,i,r,u){const o=t.children[0],c=typeof t.checked=="boolean"&&o&&o.type==="paragraph",f="["+(t.checked?"x":" ")+"] ",p=r.createTracker(u);c&&p.move(f);let g=xy.listItem(t,i,r,{...u,...p.current()});return c&&(g=g.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),g;function m(y){return y+f}}function qj(){return[gw(),Uw(),Iw(),Ej(),Mj()]}function Bj(t){return{extensions:[xw(),qw(t),Yw(),Rj(t),Oj()]}}const Hj={tokenize:Xj,partial:!0},yy={tokenize:$j,partial:!0},by={tokenize:Qj,partial:!0},vy={tokenize:Zj,partial:!0},Ij={tokenize:Kj,partial:!0},Sy={name:"wwwAutolink",tokenize:Vj,previous:wy},ky={name:"protocolAutolink",tokenize:Fj,previous:jy},rl={name:"emailAutolink",tokenize:Gj,previous:Ny},Ln={};function Yj(){return{text:Ln}}let ei=48;for(;ei<123;)Ln[ei]=rl,ei++,ei===58?ei=65:ei===91&&(ei=97);Ln[43]=rl;Ln[45]=rl;Ln[46]=rl;Ln[95]=rl;Ln[72]=[rl,ky];Ln[104]=[rl,ky];Ln[87]=[rl,Sy];Ln[119]=[rl,Sy];function Gj(t,i,r){const u=this;let o,c;return f;function f(x){return!tf(x)||!Ny.call(u,u.previous)||zf(u.events)?r(x):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),p(x))}function p(x){return tf(x)?(t.consume(x),p):x===64?(t.consume(x),g):r(x)}function g(x){return x===46?t.check(Ij,y,m)(x):x===45||x===95||Mt(x)?(c=!0,t.consume(x),g):y(x)}function m(x){return t.consume(x),o=!0,g}function y(x){return c&&o&&Ut(u.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),i(x)):r(x)}}function Vj(t,i,r){const u=this;return o;function o(f){return f!==87&&f!==119||!wy.call(u,u.previous)||zf(u.events)?r(f):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Hj,t.attempt(yy,t.attempt(by,c),r),r)(f))}function c(f){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),i(f)}}function Fj(t,i,r){const u=this;let o="",c=!1;return f;function f(x){return(x===72||x===104)&&jy.call(u,u.previous)&&!zf(u.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(x),t.consume(x),p):r(x)}function p(x){if(Ut(x)&&o.length<5)return o+=String.fromCodePoint(x),t.consume(x),p;if(x===58){const S=o.toLowerCase();if(S==="http"||S==="https")return t.consume(x),g}return r(x)}function g(x){return x===47?(t.consume(x),c?m:(c=!0,g)):r(x)}function m(x){return x===null||zu(x)||tt(x)||ii(x)||qu(x)?r(x):t.attempt(yy,t.attempt(by,y),r)(x)}function y(x){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),i(x)}}function Xj(t,i,r){let u=0;return o;function o(f){return(f===87||f===119)&&u<3?(u++,t.consume(f),o):f===46&&u===3?(t.consume(f),c):r(f)}function c(f){return f===null?r(f):i(f)}}function $j(t,i,r){let u,o,c;return f;function f(m){return m===46||m===95?t.check(vy,g,p)(m):m===null||tt(m)||ii(m)||m!==45&&qu(m)?g(m):(c=!0,t.consume(m),f)}function p(m){return m===95?u=!0:(o=u,u=void 0),t.consume(m),f}function g(m){return o||u||!c?r(m):i(m)}}function Qj(t,i){let r=0,u=0;return o;function o(f){return f===40?(r++,t.consume(f),o):f===41&&u<r?c(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?t.check(vy,i,c)(f):f===null||tt(f)||ii(f)?i(f):(t.consume(f),o)}function c(f){return f===41&&u++,t.consume(f),o}}function Zj(t,i,r){return u;function u(p){return p===33||p===34||p===39||p===41||p===42||p===44||p===46||p===58||p===59||p===63||p===95||p===126?(t.consume(p),u):p===38?(t.consume(p),c):p===93?(t.consume(p),o):p===60||p===null||tt(p)||ii(p)?i(p):r(p)}function o(p){return p===null||p===40||p===91||tt(p)||ii(p)?i(p):u(p)}function c(p){return Ut(p)?f(p):r(p)}function f(p){return p===59?(t.consume(p),u):Ut(p)?(t.consume(p),f):r(p)}}function Kj(t,i,r){return u;function u(c){return t.consume(c),o}function o(c){return Mt(c)?r(c):i(c)}}function wy(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||tt(t)}function jy(t){return!Ut(t)}function Ny(t){return!(t===47||tf(t))}function tf(t){return t===43||t===45||t===46||t===95||Mt(t)}function zf(t){let i=t.length,r=!1;for(;i--;){const u=t[i][1];if((u.type==="labelLink"||u.type==="labelImage")&&!u._balanced){r=!0;break}if(u._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const Jj={tokenize:rN,partial:!0};function Pj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:nN,continuation:{tokenize:lN},exit:iN}},text:{91:{name:"gfmFootnoteCall",tokenize:tN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Wj,resolveTo:eN}}}}function Wj(t,i,r){const u=this;let o=u.events.length;const c=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let f;for(;o--;){const g=u.events[o][1];if(g.type==="labelImage"){f=g;break}if(g.type==="gfmFootnoteCall"||g.type==="labelLink"||g.type==="label"||g.type==="image"||g.type==="link")break}return p;function p(g){if(!f||!f._balanced)return r(g);const m=wn(u.sliceSerialize({start:f.end,end:u.now()}));return m.codePointAt(0)!==94||!c.includes(m.slice(1))?r(g):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),i(g))}}function eN(t,i){let r=t.length;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";const u={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const c={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},c.start),end:Object.assign({},c.end)},p=[t[r+1],t[r+2],["enter",u,i],t[r+3],t[r+4],["enter",o,i],["exit",o,i],["enter",c,i],["enter",f,i],["exit",f,i],["exit",c,i],t[t.length-2],t[t.length-1],["exit",u,i]];return t.splice(r,t.length-r+1,...p),t}function tN(t,i,r){const u=this,o=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let c=0,f;return p;function p(x){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(x),t.exit("gfmFootnoteCallLabelMarker"),g}function g(x){return x!==94?r(x):(t.enter("gfmFootnoteCallMarker"),t.consume(x),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(x){if(c>999||x===93&&!f||x===null||x===91||tt(x))return r(x);if(x===93){t.exit("chunkString");const S=t.exit("gfmFootnoteCallString");return o.includes(wn(u.sliceSerialize(S)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(x),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),i):r(x)}return tt(x)||(f=!0),c++,t.consume(x),x===92?y:m}function y(x){return x===91||x===92||x===93?(t.consume(x),c++,m):m(x)}}function nN(t,i,r){const u=this,o=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let c,f=0,p;return g;function g(N){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(N){return N===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):r(N)}function y(N){if(f>999||N===93&&!p||N===null||N===91||tt(N))return r(N);if(N===93){t.exit("chunkString");const T=t.exit("gfmFootnoteDefinitionLabelString");return c=wn(u.sliceSerialize(T)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),S}return tt(N)||(p=!0),f++,t.consume(N),N===92?x:y}function x(N){return N===91||N===92||N===93?(t.consume(N),f++,y):y(N)}function S(N){return N===58?(t.enter("definitionMarker"),t.consume(N),t.exit("definitionMarker"),o.includes(c)||o.push(c),Be(t,v,"gfmFootnoteDefinitionWhitespace")):r(N)}function v(N){return i(N)}}function lN(t,i,r){return t.check(ra,i,t.attempt(Jj,i,r))}function iN(t){t.exit("gfmFootnoteDefinition")}function rN(t,i,r){const u=this;return Be(t,o,"gfmFootnoteDefinitionIndent",5);function o(c){const f=u.events[u.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?i(c):r(c)}}function aN(t){let r=(t||{}).singleTilde;const u={name:"strikethrough",tokenize:c,resolveAll:o};return r==null&&(r=!0),{text:{126:u},insideSpan:{null:[u]},attentionMarkers:{null:[126]}};function o(f,p){let g=-1;for(;++g<f.length;)if(f[g][0]==="enter"&&f[g][1].type==="strikethroughSequenceTemporary"&&f[g][1]._close){let m=g;for(;m--;)if(f[m][0]==="exit"&&f[m][1].type==="strikethroughSequenceTemporary"&&f[m][1]._open&&f[g][1].end.offset-f[g][1].start.offset===f[m][1].end.offset-f[m][1].start.offset){f[g][1].type="strikethroughSequence",f[m][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},f[m][1].start),end:Object.assign({},f[g][1].end)},x={type:"strikethroughText",start:Object.assign({},f[m][1].end),end:Object.assign({},f[g][1].start)},S=[["enter",y,p],["enter",f[m][1],p],["exit",f[m][1],p],["enter",x,p]],v=p.parser.constructs.insideSpan.null;v&&tn(S,S.length,0,Bu(v,f.slice(m+1,g),p)),tn(S,S.length,0,[["exit",x,p],["enter",f[g][1],p],["exit",f[g][1],p],["exit",y,p]]),tn(f,m-1,g-m+3,S),g=m+S.length-2;break}}for(g=-1;++g<f.length;)f[g][1].type==="strikethroughSequenceTemporary"&&(f[g][1].type="data");return f}function c(f,p,g){const m=this.previous,y=this.events;let x=0;return S;function S(N){return m===126&&y[y.length-1][1].type!=="characterEscape"?g(N):(f.enter("strikethroughSequenceTemporary"),v(N))}function v(N){const T=Ji(m);if(N===126)return x>1?g(N):(f.consume(N),x++,v);if(x<2&&!r)return g(N);const L=f.exit("strikethroughSequenceTemporary"),C=Ji(N);return L._open=!C||C===2&&!!T,L._close=!T||T===2&&!!C,p(N)}}}class uN{constructor(){this.map=[]}add(i,r,u){sN(this,i,r,u)}consume(i){if(this.map.sort(function(c,f){return c[0]-f[0]}),this.map.length===0)return;let r=this.map.length;const u=[];for(;r>0;)r-=1,u.push(i.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),i.length=this.map[r][0];u.push(i.slice()),i.length=0;let o=u.pop();for(;o;){for(const c of o)i.push(c);o=u.pop()}this.map.length=0}}function sN(t,i,r,u){let o=0;if(!(r===0&&u.length===0)){for(;o<t.map.length;){if(t.map[o][0]===i){t.map[o][1]+=r,t.map[o][2].push(...u);return}o+=1}t.map.push([i,r,u])}}function oN(t,i){let r=!1;const u=[];for(;i<t.length;){const o=t[i];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&u.push(t[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[i-1][1].type==="tableDelimiterMarker"){const c=u.length-1;u[c]=u[c]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);i+=1}return u}function cN(){return{flow:{null:{name:"table",tokenize:fN,resolveAll:dN}}}}function fN(t,i,r){const u=this;let o=0,c=0,f;return p;function p(O){let ne=u.events.length-1;for(;ne>-1;){const oe=u.events[ne][1].type;if(oe==="lineEnding"||oe==="linePrefix")ne--;else break}const re=ne>-1?u.events[ne][1].type:null,ge=re==="tableHead"||re==="tableRow"?R:g;return ge===R&&u.parser.lazy[u.now().line]?r(O):ge(O)}function g(O){return t.enter("tableHead"),t.enter("tableRow"),m(O)}function m(O){return O===124||(f=!0,c+=1),y(O)}function y(O){return O===null?r(O):ve(O)?c>1?(c=0,u.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),v):r(O):Re(O)?Be(t,y,"whitespace")(O):(c+=1,f&&(f=!1,o+=1),O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),f=!0,y):(t.enter("data"),x(O)))}function x(O){return O===null||O===124||tt(O)?(t.exit("data"),y(O)):(t.consume(O),O===92?S:x)}function S(O){return O===92||O===124?(t.consume(O),x):x(O)}function v(O){return u.interrupt=!1,u.parser.lazy[u.now().line]?r(O):(t.enter("tableDelimiterRow"),f=!1,Re(O)?Be(t,N,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):N(O))}function N(O){return O===45||O===58?L(O):O===124?(f=!0,t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),T):ie(O)}function T(O){return Re(O)?Be(t,L,"whitespace")(O):L(O)}function L(O){return O===58?(c+=1,f=!0,t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),C):O===45?(c+=1,C(O)):O===null||ve(O)?X(O):ie(O)}function C(O){return O===45?(t.enter("tableDelimiterFiller"),F(O)):ie(O)}function F(O){return O===45?(t.consume(O),F):O===58?(f=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),U):(t.exit("tableDelimiterFiller"),U(O))}function U(O){return Re(O)?Be(t,X,"whitespace")(O):X(O)}function X(O){return O===124?N(O):O===null||ve(O)?!f||o!==c?ie(O):(t.exit("tableDelimiterRow"),t.exit("tableHead"),i(O)):ie(O)}function ie(O){return r(O)}function R(O){return t.enter("tableRow"),I(O)}function I(O){return O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),I):O===null||ve(O)?(t.exit("tableRow"),i(O)):Re(O)?Be(t,I,"whitespace")(O):(t.enter("data"),ue(O))}function ue(O){return O===null||O===124||tt(O)?(t.exit("data"),I(O)):(t.consume(O),O===92?W:ue)}function W(O){return O===92||O===124?(t.consume(O),ue):ue(O)}}function dN(t,i){let r=-1,u=!0,o=0,c=[0,0,0,0],f=[0,0,0,0],p=!1,g=0,m,y,x;const S=new uN;for(;++r<t.length;){const v=t[r],N=v[1];v[0]==="enter"?N.type==="tableHead"?(p=!1,g!==0&&(Ug(S,i,g,m,y),y=void 0,g=0),m={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},S.add(r,0,[["enter",m,i]])):N.type==="tableRow"||N.type==="tableDelimiterRow"?(u=!0,x=void 0,c=[0,0,0,0],f=[0,r+1,0,0],p&&(p=!1,y={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},S.add(r,0,[["enter",y,i]])),o=N.type==="tableDelimiterRow"?2:y?3:1):o&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")?(u=!1,f[2]===0&&(c[1]!==0&&(f[0]=f[1],x=ju(S,i,c,o,void 0,x),c=[0,0,0,0]),f[2]=r)):N.type==="tableCellDivider"&&(u?u=!1:(c[1]!==0&&(f[0]=f[1],x=ju(S,i,c,o,void 0,x)),c=f,f=[c[1],r,0,0])):N.type==="tableHead"?(p=!0,g=r):N.type==="tableRow"||N.type==="tableDelimiterRow"?(g=r,c[1]!==0?(f[0]=f[1],x=ju(S,i,c,o,r,x)):f[1]!==0&&(x=ju(S,i,f,o,r,x)),o=0):o&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(f[3]=r)}for(g!==0&&Ug(S,i,g,m,y),S.consume(i.events),r=-1;++r<i.events.length;){const v=i.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=oN(i.events,r))}return t}function ju(t,i,r,u,o,c){const f=u===1?"tableHeader":u===2?"tableDelimiter":"tableData",p="tableContent";r[0]!==0&&(c.end=Object.assign({},Ki(i.events,r[0])),t.add(r[0],0,[["exit",c,i]]));const g=Ki(i.events,r[1]);if(c={type:f,start:Object.assign({},g),end:Object.assign({},g)},t.add(r[1],0,[["enter",c,i]]),r[2]!==0){const m=Ki(i.events,r[2]),y=Ki(i.events,r[3]),x={type:p,start:Object.assign({},m),end:Object.assign({},y)};if(t.add(r[2],0,[["enter",x,i]]),u!==2){const S=i.events[r[2]],v=i.events[r[3]];if(S[1].end=Object.assign({},v[1].end),S[1].type="chunkText",S[1].contentType="text",r[3]>r[2]+1){const N=r[2]+1,T=r[3]-r[2]-1;t.add(N,T,[])}}t.add(r[3]+1,0,[["exit",x,i]])}return o!==void 0&&(c.end=Object.assign({},Ki(i.events,o)),t.add(o,0,[["exit",c,i]]),c=void 0),c}function Ug(t,i,r,u,o){const c=[],f=Ki(i.events,r);o&&(o.end=Object.assign({},f),c.push(["exit",o,i])),u.end=Object.assign({},f),c.push(["exit",u,i]),t.add(r+1,0,c)}function Ki(t,i){const r=t[i],u=r[0]==="enter"?"start":"end";return r[1][u]}const hN={name:"tasklistCheck",tokenize:mN};function pN(){return{text:{91:hN}}}function mN(t,i,r){const u=this;return o;function o(g){return u.previous!==null||!u._gfmTasklistFirstContentOfListItem?r(g):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(g),t.exit("taskListCheckMarker"),c)}function c(g){return tt(g)?(t.enter("taskListCheckValueUnchecked"),t.consume(g),t.exit("taskListCheckValueUnchecked"),f):g===88||g===120?(t.enter("taskListCheckValueChecked"),t.consume(g),t.exit("taskListCheckValueChecked"),f):r(g)}function f(g){return g===93?(t.enter("taskListCheckMarker"),t.consume(g),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),p):r(g)}function p(g){return ve(g)?i(g):Re(g)?t.check({tokenize:gN},i,r)(g):r(g)}}function gN(t,i,r){return Be(t,u,"whitespace");function u(o){return o===null?r(o):i(o)}}function xN(t){return Lx([Yj(),Pj(),aN(t),cN(),pN()])}const yN={};function bN(t){const i=this,r=t||yN,u=i.data(),o=u.micromarkExtensions||(u.micromarkExtensions=[]),c=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),f=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);o.push(xN(r)),c.push(qj()),f.push(Bj(r))}/**
|
|
78
|
-
* @license lucide-react v1.26.0 - ISC
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the ISC license.
|
|
81
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const Cy=(...t)=>t.filter((i,r,u)=>!!i&&i.trim()!==""&&u.indexOf(i)===r).join(" ").trim();/**
|
|
83
|
-
* @license lucide-react v1.26.0 - ISC
|
|
84
|
-
*
|
|
85
|
-
* This source code is licensed under the ISC license.
|
|
86
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const vN=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
88
|
-
* @license lucide-react v1.26.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const SN=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,u)=>u?u.toUpperCase():r.toLowerCase());/**
|
|
93
|
-
* @license lucide-react v1.26.0 - ISC
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the ISC license.
|
|
96
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const qg=t=>{const i=SN(t);return i.charAt(0).toUpperCase()+i.slice(1)};/**
|
|
98
|
-
* @license lucide-react v1.26.0 - ISC
|
|
99
|
-
*
|
|
100
|
-
* This source code is licensed under the ISC license.
|
|
101
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/var Tc={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"};/**
|
|
103
|
-
* @license lucide-react v1.26.0 - ISC
|
|
104
|
-
*
|
|
105
|
-
* This source code is licensed under the ISC license.
|
|
106
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const kN=t=>{for(const i in t)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},wN=j.createContext({}),jN=()=>j.useContext(wN),NN=j.forwardRef(({color:t,size:i,strokeWidth:r,absoluteStrokeWidth:u,className:o="",children:c,iconNode:f,...p},g)=>{const{size:m=24,strokeWidth:y=2,absoluteStrokeWidth:x=!1,color:S="currentColor",className:v=""}=jN()??{},N=u??x?Number(r??y)*24/Number(i??m):r??y;return j.createElement("svg",{ref:g,...Tc,width:i??m??Tc.width,height:i??m??Tc.height,stroke:t??S,strokeWidth:N,className:Cy("lucide",v,o),...!c&&!kN(p)&&{"aria-hidden":"true"},...p},[...f.map(([T,L])=>j.createElement(T,L)),...Array.isArray(c)?c:[c]])});/**
|
|
108
|
-
* @license lucide-react v1.26.0 - ISC
|
|
109
|
-
*
|
|
110
|
-
* This source code is licensed under the ISC license.
|
|
111
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const Ae=(t,i)=>{const r=j.forwardRef(({className:u,...o},c)=>j.createElement(NN,{ref:c,iconNode:i,className:Cy(`lucide-${vN(qg(t))}`,`lucide-${t}`,u),...o}));return r.displayName=qg(t),r};/**
|
|
113
|
-
* @license lucide-react v1.26.0 - ISC
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the ISC license.
|
|
116
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const CN=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],EN=Ae("arrow-down",CN);/**
|
|
118
|
-
* @license lucide-react v1.26.0 - ISC
|
|
119
|
-
*
|
|
120
|
-
* This source code is licensed under the ISC license.
|
|
121
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const _N=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],TN=Ae("arrow-up",_N);/**
|
|
123
|
-
* @license lucide-react v1.26.0 - ISC
|
|
124
|
-
*
|
|
125
|
-
* This source code is licensed under the ISC license.
|
|
126
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const AN=[["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"}]],zN=Ae("bot",AN);/**
|
|
128
|
-
* @license lucide-react v1.26.0 - ISC
|
|
129
|
-
*
|
|
130
|
-
* This source code is licensed under the ISC license.
|
|
131
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const DN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ua=Ae("check",DN);/**
|
|
133
|
-
* @license lucide-react v1.26.0 - ISC
|
|
134
|
-
*
|
|
135
|
-
* This source code is licensed under the ISC license.
|
|
136
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const RN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ey=Ae("chevron-down",RN);/**
|
|
138
|
-
* @license lucide-react v1.26.0 - ISC
|
|
139
|
-
*
|
|
140
|
-
* This source code is licensed under the ISC license.
|
|
141
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const MN=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ON=Ae("chevron-left",MN);/**
|
|
143
|
-
* @license lucide-react v1.26.0 - ISC
|
|
144
|
-
*
|
|
145
|
-
* This source code is licensed under the ISC license.
|
|
146
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const LN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Gu=Ae("chevron-right",LN);/**
|
|
148
|
-
* @license lucide-react v1.26.0 - ISC
|
|
149
|
-
*
|
|
150
|
-
* This source code is licensed under the ISC license.
|
|
151
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const UN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],qN=Ae("circle-check",UN);/**
|
|
153
|
-
* @license lucide-react v1.26.0 - ISC
|
|
154
|
-
*
|
|
155
|
-
* This source code is licensed under the ISC license.
|
|
156
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const BN=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],HN=Ae("circle-dashed",BN);/**
|
|
158
|
-
* @license lucide-react v1.26.0 - ISC
|
|
159
|
-
*
|
|
160
|
-
* This source code is licensed under the ISC license.
|
|
161
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const IN=[["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"}]],Bg=Ae("circle-x",IN);/**
|
|
163
|
-
* @license lucide-react v1.26.0 - ISC
|
|
164
|
-
*
|
|
165
|
-
* This source code is licensed under the ISC license.
|
|
166
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const YN=[["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"}]],GN=Ae("copy",YN);/**
|
|
168
|
-
* @license lucide-react v1.26.0 - ISC
|
|
169
|
-
*
|
|
170
|
-
* This source code is licensed under the ISC license.
|
|
171
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const VN=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],FN=Ae("ellipsis",VN);/**
|
|
173
|
-
* @license lucide-react v1.26.0 - ISC
|
|
174
|
-
*
|
|
175
|
-
* This source code is licensed under the ISC license.
|
|
176
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const XN=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],$N=Ae("external-link",XN);/**
|
|
178
|
-
* @license lucide-react v1.26.0 - ISC
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the ISC license.
|
|
181
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const QN=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ZN=Ae("file-text",QN);/**
|
|
183
|
-
* @license lucide-react v1.26.0 - ISC
|
|
184
|
-
*
|
|
185
|
-
* This source code is licensed under the ISC license.
|
|
186
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
-
*/const KN=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],JN=Ae("gauge",KN);/**
|
|
188
|
-
* @license lucide-react v1.26.0 - ISC
|
|
189
|
-
*
|
|
190
|
-
* This source code is licensed under the ISC license.
|
|
191
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
-
*/const PN=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],WN=Ae("git-branch",PN);/**
|
|
193
|
-
* @license lucide-react v1.26.0 - ISC
|
|
194
|
-
*
|
|
195
|
-
* This source code is licensed under the ISC license.
|
|
196
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
-
*/const eC=[["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"}]],tC=Ae("globe",eC);/**
|
|
198
|
-
* @license lucide-react v1.26.0 - ISC
|
|
199
|
-
*
|
|
200
|
-
* This source code is licensed under the ISC license.
|
|
201
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
-
*/const nC=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Df=Ae("loader-circle",nC);/**
|
|
203
|
-
* @license lucide-react v1.26.0 - ISC
|
|
204
|
-
*
|
|
205
|
-
* This source code is licensed under the ISC license.
|
|
206
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/const lC=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],iC=Ae("message-circle-question-mark",lC);/**
|
|
208
|
-
* @license lucide-react v1.26.0 - ISC
|
|
209
|
-
*
|
|
210
|
-
* This source code is licensed under the ISC license.
|
|
211
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/const rC=[["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"}]],aC=Ae("panel-left-close",rC);/**
|
|
213
|
-
* @license lucide-react v1.26.0 - ISC
|
|
214
|
-
*
|
|
215
|
-
* This source code is licensed under the ISC license.
|
|
216
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
-
*/const uC=[["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"}]],sC=Ae("panel-left-open",uC);/**
|
|
218
|
-
* @license lucide-react v1.26.0 - ISC
|
|
219
|
-
*
|
|
220
|
-
* This source code is licensed under the ISC license.
|
|
221
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
-
*/const oC=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Hg=Ae("paperclip",oC);/**
|
|
223
|
-
* @license lucide-react v1.26.0 - ISC
|
|
224
|
-
*
|
|
225
|
-
* This source code is licensed under the ISC license.
|
|
226
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
-
*/const cC=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],fC=Ae("pause",cC);/**
|
|
228
|
-
* @license lucide-react v1.26.0 - ISC
|
|
229
|
-
*
|
|
230
|
-
* This source code is licensed under the ISC license.
|
|
231
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
-
*/const dC=[["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"}]],_y=Ae("pencil",dC);/**
|
|
233
|
-
* @license lucide-react v1.26.0 - ISC
|
|
234
|
-
*
|
|
235
|
-
* This source code is licensed under the ISC license.
|
|
236
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
-
*/const hC=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],pC=Ae("play",hC);/**
|
|
238
|
-
* @license lucide-react v1.26.0 - ISC
|
|
239
|
-
*
|
|
240
|
-
* This source code is licensed under the ISC license.
|
|
241
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
-
*/const mC=[["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"}]],Rf=Ae("refresh-cw",mC);/**
|
|
243
|
-
* @license lucide-react v1.26.0 - ISC
|
|
244
|
-
*
|
|
245
|
-
* This source code is licensed under the ISC license.
|
|
246
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
-
*/const gC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],xC=Ae("search",gC);/**
|
|
248
|
-
* @license lucide-react v1.26.0 - ISC
|
|
249
|
-
*
|
|
250
|
-
* This source code is licensed under the ISC license.
|
|
251
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
-
*/const yC=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ty=Ae("settings",yC);/**
|
|
253
|
-
* @license lucide-react v1.26.0 - ISC
|
|
254
|
-
*
|
|
255
|
-
* This source code is licensed under the ISC license.
|
|
256
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
257
|
-
*/const bC=[["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"}]],nf=Ae("shield-alert",bC);/**
|
|
258
|
-
* @license lucide-react v1.26.0 - ISC
|
|
259
|
-
*
|
|
260
|
-
* This source code is licensed under the ISC license.
|
|
261
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
262
|
-
*/const vC=[["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"}]],SC=Ae("shield",vC);/**
|
|
263
|
-
* @license lucide-react v1.26.0 - ISC
|
|
264
|
-
*
|
|
265
|
-
* This source code is licensed under the ISC license.
|
|
266
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
267
|
-
*/const kC=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],wC=Ae("sparkles",kC);/**
|
|
268
|
-
* @license lucide-react v1.26.0 - ISC
|
|
269
|
-
*
|
|
270
|
-
* This source code is licensed under the ISC license.
|
|
271
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
-
*/const jC=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Ay=Ae("square-pen",jC);/**
|
|
273
|
-
* @license lucide-react v1.26.0 - ISC
|
|
274
|
-
*
|
|
275
|
-
* This source code is licensed under the ISC license.
|
|
276
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
-
*/const NC=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],CC=Ae("square-terminal",NC);/**
|
|
278
|
-
* @license lucide-react v1.26.0 - ISC
|
|
279
|
-
*
|
|
280
|
-
* This source code is licensed under the ISC license.
|
|
281
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
282
|
-
*/const EC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Mf=Ae("square",EC);/**
|
|
283
|
-
* @license lucide-react v1.26.0 - ISC
|
|
284
|
-
*
|
|
285
|
-
* This source code is licensed under the ISC license.
|
|
286
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
287
|
-
*/const _C=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],zy=Ae("target",_C);/**
|
|
288
|
-
* @license lucide-react v1.26.0 - ISC
|
|
289
|
-
*
|
|
290
|
-
* This source code is licensed under the ISC license.
|
|
291
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
292
|
-
*/const TC=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Of=Ae("trash-2",TC);/**
|
|
293
|
-
* @license lucide-react v1.26.0 - ISC
|
|
294
|
-
*
|
|
295
|
-
* This source code is licensed under the ISC license.
|
|
296
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
297
|
-
*/const AC=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Dy=Ae("wrench",AC);/**
|
|
298
|
-
* @license lucide-react v1.26.0 - ISC
|
|
299
|
-
*
|
|
300
|
-
* This source code is licensed under the ISC license.
|
|
301
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
302
|
-
*/const zC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],er=Ae("x",zC),Ry=new Map([["theme","This app follows your system appearance."],["keybindings","This app uses standard keyboard shortcuts here."],["editor","Type your message directly in the composer."],["statusline","The GUI shows session status in its own status row, not a terminal status line."],["shell","Use the Terminal app for shell commands."],["exit","Close the window or tab to end this session; delete it from the sidebar to remove it for good."],["devices","Device pairing is managed from the terminal for now."]]),DC="This command runs in the host terminal.";function My(t){return Ry.has(t.name)?!0:t.runner==="client"&&!(t.surfaces??[]).includes("gui")}function Oy(t){return Ry.get(t)??DC}function RC(t,i){switch(i.type){case"permission_request":{const{id:r,toolName:u,toolArgs:o,requesterDriverId:c,requester:f,diffLines:p,diffFile:g,cwd:m}=i.event;return t.some(y=>y.id===r)?t:[...t,{kind:"permission",id:r,toolName:u,toolArgs:o,...c?{requesterDriverId:c}:{},...f?{requester:f}:{},...p?{diffLines:p,diffFile:g}:{},...m?{cwd:m}:{}}]}case"ask_request":{const{id:r,request:u,requesterDriverId:o}=i.event;return t.some(c=>c.id===r)?t:[...t,{kind:"ask",id:r,request:u,...o?{requesterDriverId:o}:{}}]}case"prompt_resolved":{const{id:r}=i.event,u=t.filter(o=>o.id!==r);return u.length===t.length?t:u}default:return t}}function MC(t,i){return{type:"permission-response",id:t,result:i}}function OC(t,i){return{type:"ask-response",id:t,response:i}}function Jr(t){switch(t.type){case"show-plugin-manager":return"plugin";case"show-settings":return"settings";case"show-session-picker":return"resume";case"show-agent-switcher":return"agent";case"show-theme-picker":return"theme";default:return t.type}}function Nu(t){return t.type==="show-session-picker"?"session-sidebar":t.type==="show-settings"?"settings":t.type==="show-plugin-manager"?"settings-plugins":t.type==="show-agent-switcher"?"agent-switcher":null}function LC(t){switch(t.type){case"show-session-picker":return"This host cannot list sessions, so there is nothing to resume.";case"show-theme-picker":return Oy("theme");default:return`This client does not have a screen for '${t.type}' yet.`}}const UC=2e3,qC=10;function BC(t,i){let r=null,u="disconnected",o=null,c=0,f=!1;function p(v){u=v,i.onStatusChange(v)}function g(){if(!f){if(c>=qC){i.onGiveUp?.();return}o=setTimeout(()=>{c++,m()},UC)}}function m(){p("connecting"),r=new WebSocket(t),r.onopen=()=>{c=0,p("connected"),S({type:"get-messages"})},r.onmessage=v=>{const N=v.data;if(typeof N!="string")return;const T=Q0(N,$0);if(!T.ok){i.onMessage({type:"protocol_error",message:`Malformed message from server (${T.reason})`});return}i.onMessage(T.message)},r.onclose=()=>{r=null,f?p("disconnected"):(p("disconnected"),g())},r.onerror=()=>{p("error")}}function y(){f=!1,o!==null&&(clearTimeout(o),o=null),m()}function x(){f=!0,o!==null&&(clearTimeout(o),o=null),r?.close(),r=null,p("disconnected")}function S(v){r?.readyState===WebSocket.OPEN&&r.send(JSON.stringify(v))}return{connect:y,disconnect:x,send:S,status:()=>u}}const HC={text_delta:"reducer-state",user_message:"reducer-state",tool_start:"reducer-state",tool_end:"reducer-state",thinking:"reducer-state",complete:"reducer-state",interrupted:"reducer-state",error:"visible-notice",command_result:"reducer-state",messages:"reducer-state",history:"intentionally-not-rendered",history_changed:"intentionally-not-rendered",context:"intentionally-not-rendered",turn_source:"intentionally-not-rendered",commands:"reducer-state",session_status:"reducer-state",model_list:"reducer-state",agent_definitions:"reducer-state",sessions:"reducer-state",sessions_error:"reducer-state",session_switched:"reducer-state",session_change_failed:"visible-notice",session_renamed_in_list:"reducer-state",session_rename_failed:"visible-notice",session_deleted:"reducer-state",session_delete_failed:"visible-notice",usage_report:"reducer-state",personal_usage_report:"reducer-state",personal_usage_report_error:"visible-notice",stored_session_usage_report:"reducer-state",stored_session_usage_report_error:"visible-notice",executing:"intentionally-not-rendered",pending:"reducer-state",execution_workspace_event:"reducer-state",execution_detail:"reducer-state",execution_detail_error:"reducer-state",waiting_loop_stop:"intentionally-not-rendered",project_status:"reducer-state",project_diff:"reducer-state",project_memory:"reducer-state",background_task_event:"intentionally-not-rendered",background_job_group_event:"intentionally-not-rendered",plan_event:"intentionally-not-rendered",context_file_refreshed:"intentionally-not-rendered",branch_event:"intentionally-not-rendered",background_tasks:"reducer-state",background_task:"intentionally-not-rendered",background_job_groups:"intentionally-not-rendered",background_job_group:"intentionally-not-rendered",background_task_log:"intentionally-not-rendered",permission_request:"reducer-state",ask_request:"reducer-state",prompt_resolved:"reducer-state",ui_intent:"reducer-state",session_renamed:"reducer-state",history_cleared:"reducer-state",background_task_control_result:"visible-notice",protocol_error:"visible-notice",resume_gap:"transport-control",settings:"reducer-state",settings_error:"reducer-state"};let Ig=0;function Yg(t){return Ig+=1,`${t}_${Ig}_${Date.now()}`}function IC(t){const[i,r]=j.useState(!1),[u,o]=j.useState("idle"),[c,f]=j.useState([]),[p,g]=j.useState(null),[m,y]=j.useState(null),x=j.useRef(null),S=j.useRef(null),v=j.useCallback(T=>T.type!=="agent_definitions"?!1:(x.current!==T.requestId||(f(T.agents),g(T.current),o("ready")),!0),[]),N=j.useCallback(()=>{const T=Yg("get_agent_definitions");x.current=T,t({type:"get-agent-definitions",requestId:T})},[t]);return{agentSwitcherOpen:i,agentSwitcherStatus:u,agentDefinitions:c,currentAgentType:p,agentSwitchMessage:m,openAgentSwitcher:j.useCallback(()=>{r(!0),o(T=>T==="ready"?"ready":"loading"),y(null),N()},[N]),closeAgentSwitcher:j.useCallback(()=>{r(!1)},[]),selectAgent:j.useCallback(T=>{const L=Yg("agent_switch");S.current=L,y(null),t({type:"command",name:"agent",args:T,requestId:L})},[t]),handleAgentDefinitionsMessage:v,resolveSwitchResult:j.useCallback((T,L)=>T===void 0||S.current!==T?!1:(S.current=null,y(L.message),L.success&&N(),!0),[N])}}let Gg=0;function YC(){return Gg+=1,`execdetail_${Gg}_${Date.now()}`}function GC(t){const[i,r]=j.useState(null),[u,o]=j.useState("idle"),[c,f]=j.useState([]),[p,g]=j.useState(null),[m,y]=j.useState(!1),x=j.useRef(null),S=j.useRef(null),v=j.useRef(void 0),N=j.useCallback((T,L)=>{const C=YC();x.current=C,S.current=T,o("loading"),g(null),t({type:"read-execution-detail",requestId:C,entryId:T,cursor:L})},[t]);return{openEntryId:i,executionDetailStatus:u,executionDetailRecords:c,executionDetailError:p,executionDetailComplete:m,openExecutionDetail:j.useCallback(T=>{r(T),f([]),y(!1),v.current=void 0,N(T)},[N]),loadMoreExecutionDetail:j.useCallback(()=>{!i||u==="loading"||m||N(i,v.current)},[i,u,m,N]),closeExecutionDetail:j.useCallback(()=>{r(null),x.current=null,S.current=null,f([]),o("idle"),g(null),y(!1)},[]),handleExecutionDetailMessage:j.useCallback(T=>T.type!=="execution_detail"&&T.type!=="execution_detail_error"?!1:x.current!==T.requestId?!0:T.type==="execution_detail_error"?(o("error"),g(T.message),!0):(f(L=>T.page.cursor===void 0?T.page.records:[...L,...T.page.records]),v.current=T.page.nextCursor,y(T.page.nextCursor===void 0),o("ready"),!0),[])}}let Vg=0;function VC(){return Vg+=1,`model_list_${Vg}_${Date.now()}`}function FC(t){const[i,r]=j.useState(null),u=j.useRef(null),o=j.useCallback(c=>c.type!=="model_list"?!1:(u.current!==c.requestId||r({groups:c.groups,currentModel:c.currentModel,...c.currentProfile!==void 0?{currentProfile:c.currentProfile}:{}}),!0),[]);return{modelList:i,requestModelList:j.useCallback(()=>{const c=VC();u.current=c,t({type:"list-models",requestId:c})},[t]),handleModelListMessage:o}}let Fg=0;function Xg(t){return Fg+=1,`${t}_${Fg}_${Date.now()}`}function XC(t){const[i,r]=j.useState("idle"),[u,o]=j.useState(null),[c,f]=j.useState(null),[p,g]=j.useState("idle"),[m,y]=j.useState(null),[x,S]=j.useState(null),[v,N]=j.useState(null),[T,L]=j.useState("idle"),[C,F]=j.useState(null),U=j.useRef(null),X=j.useRef(null),ie=j.useCallback(R=>R.type==="personal_usage_report"||R.type==="personal_usage_report_error"?(U.current!==R.requestId||(o(R.type==="personal_usage_report"?R.report:null),f(R.type==="personal_usage_report_error"?R.message:null),r(R.type==="personal_usage_report"?"ready":"error")),!0):R.type==="usage_report"?(F(R.report),L("ready"),!0):R.type==="stored_session_usage_report"||R.type==="stored_session_usage_report_error"?(X.current!==R.requestId||(y(R.type==="stored_session_usage_report"?R.report:null),S(R.sessionId),N(R.type==="stored_session_usage_report_error"?R.message:null),g(R.type==="stored_session_usage_report"?"ready":"error")),!0):(R.type==="protocol_error"&&L(I=>I==="loading"?"error":I),!1),[]);return{personalUsageStatus:i,personalUsageReport:u,personalUsageError:c,requestPersonalUsage:j.useCallback(R=>{const I=Xg("personal_usage");U.current=I,r("loading"),f(null),t({type:"get-personal-usage-report",requestId:I,period:R,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"})},[t]),storedSessionUsageStatus:p,storedSessionUsageReport:m,storedSessionUsageSessionId:x,storedSessionUsageError:v,requestStoredSessionUsage:j.useCallback(R=>{const I=Xg("stored_session_usage");X.current=I,g("loading"),y(null),S(R),N(null),t({type:"get-stored-session-usage-report",requestId:I,sessionId:R})},[t]),currentSessionUsageStatus:T,currentSessionUsageReport:C,requestCurrentSessionUsage:j.useCallback(()=>{L("loading"),t({type:"get-usage-report"})},[t]),handleUsageMessage:ie}}let $g=0;function Ac(t){return $g+=1,`${t}_${$g}_${Date.now()}`}function $C(t){const[i,r]=j.useState("idle"),[u,o]=j.useState(null),[c,f]=j.useState("idle"),[p,g]=j.useState(null),[m,y]=j.useState(null),[x,S]=j.useState("idle"),[v,N]=j.useState(null),T=j.useRef(null),L=j.useRef(null),C=j.useRef(null),F=j.useCallback(U=>U.type==="project_status"?(T.current!==U.requestId||(o(U.result),r("ready")),!0):U.type==="project_diff"?(L.current!==U.requestId||(y(U.result),f("ready")),!0):U.type==="project_memory"?(C.current!==U.requestId||(N(U.result),S("ready")),!0):(U.type==="protocol_error"&&U.requestId!==void 0&&(T.current===U.requestId&&r("error"),L.current===U.requestId&&f("error"),C.current===U.requestId&&S("error")),!1),[]);return{projectStatusState:i,projectStatus:u,requestProjectStatus:j.useCallback(()=>{const U=Ac("project_status");T.current=U,r("loading"),t({type:"project-status",requestId:U})},[t]),projectDiffState:c,projectDiffPath:p,projectDiff:m,requestProjectDiff:j.useCallback(U=>{const X=Ac("project_diff");L.current=X,g(U),f("loading"),y(null),t({type:"project-diff",requestId:X,path:U})},[t]),projectMemoryState:x,projectMemory:v,requestProjectMemory:j.useCallback(()=>{const U=Ac("project_memory");C.current=U,S("loading"),t({type:"project-memory",requestId:U})},[t]),handleProjectMessage:F}}function QC(t){const[i,r]=j.useState([]),u=j.useCallback(()=>{t({type:"get-background-tasks",filter:{kind:"scheduled"}})},[t]),o=j.useCallback(c=>c.type==="background_tasks"?(r(c.tasks.filter(f=>f.kind==="scheduled")),!0):c.type==="background_task_control_result"&&c.action==="cancel"?(c.success&&u(),!1):(c.type==="command_result"&&c.name==="schedule"&&c.success&&u(),!1),[u]);return{scheduledTasks:i,pauseSchedule:j.useCallback(c=>{t({type:"command",name:"schedule",args:`pause ${c}`})},[t]),resumeSchedule:j.useCallback(c=>{t({type:"command",name:"schedule",args:`resume ${c}`})},[t]),deleteSchedule:j.useCallback(c=>{t({type:"cancel-background-task",taskId:c})},[t]),handleSchedulesMessage:o,requestSchedules:u}}const Ly=j.createContext(null);function ZC({value:t,children:i}){if(!t.identity.displayName||!t.identity.cliName||!t.storage.browserNamespace)throw new Error("A public product identity is required");return d.jsx(Ly.Provider,{value:t,children:i},t.storage.browserNamespace)}function ai(){const t=j.useContext(Ly);if(t===null)throw new Error("ProductIdentityProvider is required");return t}let Qg=0;function Zi(t){return Qg+=1,`${t}_${Qg}_${Date.now()}`}function KC(t){return t.sessions.some(i=>typeof i.live=="boolean")}function Lf(t){return`${t}.restoreSessionId`}function JC(t,i){try{window.sessionStorage.setItem(Lf(t),i)}catch{}}function PC(t){try{return window.sessionStorage.getItem(Lf(t))}catch{return null}}function WC(t){try{window.sessionStorage.removeItem(Lf(t))}catch{}}function eE(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(min-width: 768px)").matches}function tE(t){const{storage:{browserNamespace:i}}=ai(),[r,u]=j.useState(null),[o,c]=j.useState(null),[f,p]=j.useState(eE),g=j.useRef(null),m=j.useRef(!1),y=j.useCallback(()=>{const X=Zi("sessions");g.current=X,t({type:"list-sessions",requestId:X})},[t]),x=j.useRef(null);x.current=r?.currentSessionId??null;const S=j.useCallback(X=>{X!==x.current&&t({type:"switch-session",sessionId:X,requestId:Zi("session_change")})},[t,i]),v=j.useCallback(()=>t({type:"new-session",requestId:Zi("session_change")}),[t,i]),N=j.useCallback((X,ie)=>t({type:"rename-session",sessionId:X,name:ie,requestId:Zi("session_rename")}),[t,i]),T=j.useCallback(X=>t({type:"delete-session",sessionId:X,requestId:Zi("session_delete")}),[t,i]),L=j.useRef(null),C=j.useRef(null),F=j.useCallback(()=>{C.current=PC(i)??L.current},[i]),U=j.useCallback(X=>{const ie=C.current;C.current=null,ie!==null&&(WC(i),ie!==X.currentSessionId&&KC(X)&&X.sessions.some(R=>R.id===ie)&&t({type:"switch-session",sessionId:ie,requestId:Zi("session_change")}))},[t,i]);return{sessionListing:r,sessionsError:o,requestSessions:y,switchSession:S,newSession:v,renameSessionInList:N,deleteSession:T,sessionSidebarOpen:f,setSessionSidebarOpen:p,handleSessionsMessage:j.useCallback(X=>X.type!=="sessions"&&X.type!=="sessions_error"?!1:X.requestId!==g.current?!0:X.type==="sessions"?(m.current=!1,u(X.listing),c(null),U(X.listing),!0):(C.current=null,m.current=X.code==="not_available",X.code==="not_available"&&u(null),c({code:X.code,message:X.message}),!0),[U]),canListSessions:j.useCallback(()=>!m.current,[]),markCurrent:j.useCallback(X=>{L.current=X,u(ie=>ie===null?ie:{...ie,currentSessionId:X})},[i]),armRestore:F}}let Zg=0;function Kg(t){return Zg+=1,`${t}_${Zg}_${Date.now()}`}function nE(t){const[i,r]=j.useState(!1),[u,o]=j.useState("idle"),[c,f]=j.useState(null),[p,g]=j.useState(null),[m,y]=j.useState(null),x=j.useRef(null),S=j.useCallback(N=>N.type!=="settings"&&N.type!=="settings_error"?!1:x.current!==N.requestId?!0:N.type==="settings"?(f(N.settings),o("ready"),g(null),!0):(g(N.message),o(T=>T==="ready"?"ready":"error"),!0),[]),v=j.useCallback(()=>{o(T=>T==="ready"?"ready":"loading"),g(null);const N=Kg("get_settings");x.current=N,t({type:"get-settings",requestId:N})},[t]);return{settingsOpen:i,settingsStatus:u,settingsSnapshot:c,settingsError:p,settingsInitialSectionId:m,openSettings:j.useCallback(N=>{r(!0),y(N??null),v()},[v]),closeSettings:j.useCallback(()=>{r(!1)},[]),updateSettings:j.useCallback(N=>{const T=Kg("update_settings");x.current=T,g(null),t({type:"update-settings",requestId:T,patch:N})},[t]),handleSettingsMessage:S,refreshSettings:v}}let lE=0;function ft(){return`msg_${++lE}_${Date.now()}`}let Jg=0;function iE(){return Jg+=1,`silent_command_${Jg}_${Date.now()}`}function Uy(t,i){const r=t[t.length-1];return r&&r.type==="text"?[...t.slice(0,-1),{...r,text:r.text+i}]:[...t,{type:"text",id:ft(),text:i}]}function qy(t,i){const r=t[t.length-1];return r&&r.type==="tools"?[...t.slice(0,-1),{...r,tools:[...r.tools,i]}]:[...t,{type:"tools",id:ft(),tools:[i]}]}function By(t,i){return i.executionId!==void 0?t.findIndex(r=>r.executionId===i.executionId&&r.status==="running"):t.findIndex(r=>r.name===i.toolName&&r.status==="running")}function Hy(t){return{id:ft(),name:t.toolName,input:t.firstArg,...t.executionId?{executionId:t.executionId}:{},...t.displayPath?{displayPath:t.displayPath}:{},...t.commandName?{commandName:t.commandName}:{},...t.internal?{internal:!0}:{}}}function Uf(t){return{status:t.isRunning?"running":t.result==="error"||t.result==="denied"?"error":"done",result:t.result,...t.diffLines?{diffLines:t.diffLines}:{},...t.diffFile?{diffFile:t.diffFile}:{},...t.toolResultData!==void 0?{toolResultData:t.toolResultData}:{},...t.toolResultParts?{toolResultParts:t.toolResultParts}:{}}}function rE(t,i){let r=!1;return t.map(u=>{if(r||u.type!=="tools")return u;const o=By(u.tools,i);if(o===-1)return u;r=!0;const c=[...u.tools];return c[o]={...c[o],...Uf(i)},{...u,tools:c}})}function Iy(t){const i=new Map;for(const r of t)if(r.type==="tools")for(const u of r.tools){if(!u.diffFile||!u.diffLines||u.diffLines.length===0)continue;const o=u.diffLines.filter(p=>p.type==="add").length,c=u.diffLines.filter(p=>p.type==="remove").length,f=i.get(u.diffFile);i.set(u.diffFile,{path:u.diffFile,added:(f?.added??0)+o,removed:(f?.removed??0)+c,diffLines:u.diffLines})}return[...i.values()]}function aE(t){return{...Hy(t),...Uf(t)}}function uE(t){const i=[];let r=[];const u=()=>{for(const c of r)i.push(c.type==="tools"?{id:c.id,role:"tools",tools:c.tools}:{id:c.id,role:"assistant",content:c.text});const o=Iy(r);o.length>0&&i.push({id:ft(),role:"changed-files",files:o}),r=[]};for(const o of t)o.type==="text"&&o.role==="user"?(u(),i.push({id:ft(),role:"user",content:o.content})):o.type==="text"?r=Uy(r,o.content):r=qy(r,aE(o.tool));return u(),i}function sE(t){const[i,r]=j.useState("disconnected"),[u,o]=j.useState([]),[c,f]=j.useState([]),[p,g]=j.useState(""),[m,y]=j.useState(!1),[x,S]=j.useState(null),[v,N]=j.useState([]),[T,L]=j.useState(null),[C,F]=j.useState(null),[U,X]=j.useState([]),[ie,R]=j.useState(null),I=j.useRef(null),[ue,W]=j.useState(null),[O,ne]=j.useState(null),[re,ge]=j.useState(!1),oe=j.useCallback(()=>ge(!0),[]),P=j.useCallback(()=>ge(!1),[]),D=j.useRef(null),Q=j.useRef(""),se=j.useRef([]),me=j.useRef([]),_=j.useRef(null),E=j.useRef(null),H=j.useCallback(J=>{se.current=J(se.current),f(se.current)},[]),w=j.useCallback(J=>{o(ce=>[...ce,J])},[]),ae=j.useCallback(J=>{const ce=me.current;me.current=[],Q.current="",g(""),y(!1),H(()=>[]);for(const at of ce)at.type==="tools"?w({id:at.id,role:"tools",tools:at.tools.map(Tn=>({...Tn,status:J(Tn)}))}):w({id:at.id,role:"assistant",content:at.text});const Ce=Iy(ce);Ce.length>0&&w({id:ft(),role:"changed-files",files:Ce})},[w,H]),fe=j.useRef(0),he=j.useRef(new Set),we=j.useRef(0),Ye=j.useRef(new Set),be=j.useCallback(J=>{if(J.type==="command"){if(J.name==="help"){ge(!0);return}const ce=I.current?.commands.find(Ce=>Ce.name===J.name);if(My(ce??{name:J.name})){w({id:ft(),role:"command",name:J.name,content:Oy(J.name),tone:"info"});return}fe.current+=1}(J.type==="switch-session"||J.type==="new-session")&&(we.current+=1,J.requestId!==void 0&&Ye.current.add(J.requestId)),D.current?.send(J)},[w]),xt=j.useCallback(J=>{we.current=Math.max(0,we.current-1),J!==void 0&&Ye.current.delete(J)},[]),jt=j.useCallback((J,ce)=>{const Ce=iE();he.current.add(Ce),be({type:"command",name:J,requestId:Ce,...ce?{args:ce}:{}})},[be]),{handleUsageMessage:jn,...Nn}=XC(be),{handleExecutionDetailMessage:At,closeExecutionDetail:nn,...Cn}=GC(be),{handleModelListMessage:Un,...al}=FC(be),{handleProjectMessage:ln,...En}=$C(be),{handleSessionsMessage:_n,canListSessions:ee,markCurrent:He,armRestore:Le,...rn}=tE(be),{requestSessions:V,setSessionSidebarOpen:le}=rn,{handleSettingsMessage:xe,openSettings:Ee,refreshSettings:Ie,...zt}=nE(be),an=j.useRef(!1);an.current=zt.settingsOpen;const{handleAgentDefinitionsMessage:bt,resolveSwitchResult:rt,openAgentSwitcher:vt,...Xe}=IC(be),{handleSchedulesMessage:yn,requestSchedules:Dt,...Xu}=QC(be),Ol=j.useCallback(J=>{if(HC[J.type],!jn(J)&&!At(J)&&!Un(J)&&!ln(J)&&!_n(J)&&!xe(J)&&!bt(J)&&!yn(J))switch(J.type){case"messages":{const ce=J.display?uE(J.display):J.messages.flatMap(Ce=>{if(Ce.role!=="user"&&Ce.role!=="assistant")return[];const at=Ce.content??"";return[{id:ft(),role:Ce.role,content:at}]});o(ce),J.driverId&&ne(J.driverId);break}case"user_message":o(ce=>[...ce,{id:ft(),role:"user",content:J.content??"",...J.driverId?{author:J.driverId}:{}}]);break;case"text_delta":{const ce=Q.current+J.delta;Q.current=ce,g(ce),me.current=Uy(me.current,J.delta);break}case"thinking":y(J.isThinking);break;case"tool_start":{const{state:ce}=J,Ce={...Hy(ce),status:"running"};H(at=>[...at,Ce]),me.current=qy(me.current,Ce);break}case"tool_end":{const{state:ce}=J;H(Ce=>{const at=By(Ce,ce);if(at===-1)return Ce;const Tn=[...Ce];return Tn[at]={...Tn[at],...Uf(ce)},Tn}),me.current=rE(me.current,ce);break}case"execution_workspace_event":S(J.snapshot);break;case"background_task_control_result":J.success||X(ce=>[...ce,{id:ft(),kind:"background-task-control-failed",message:J.message??`Could not stop ${J.taskId}.`}]);break;case"pending":L(J.pending===null?null:{text:J.pending,count:J.pendingCount??1});break;case"permission_request":case"ask_request":case"prompt_resolved":N(ce=>RC(ce,J));break;case"ui_intent":{if(Nu(J.event.intent)==="session-sidebar"&&ee()){le(!0),V(),fe.current>0&&(_.current={name:Jr(J.event.intent),text:null});break}if(Nu(J.event.intent)==="settings"){Ee(),fe.current>0&&(_.current={name:Jr(J.event.intent),text:null});break}if(Nu(J.event.intent)==="settings-plugins"){Ee("plugins"),fe.current>0&&(_.current={name:Jr(J.event.intent),text:null});break}if(Nu(J.event.intent)==="agent-switcher"){vt(),fe.current>0&&(_.current={name:Jr(J.event.intent),text:null});break}const ce={name:Jr(J.event.intent),text:LC(J.event.intent)};fe.current>0?_.current=ce:w({id:ft(),role:"command",name:ce.name,content:ce.text,tone:"info"});break}case"session_renamed":F(J.event.name),V();break;case"session_switched":xt(),E.current=null,W(null),Q.current="",me.current=[],g(""),y(!1),H(()=>[]),o([]),N([]),L(null),F(null),S(null),nn(),He(J.event.sessionId),be({type:"get-messages"}),be({type:"get-status"}),be({type:"get-commands"}),be({type:"get-execution-workspace"}),be({type:"get-pending"}),V(),Dt();break;case"history_cleared":Q.current="",me.current=[],g(""),o([]);break;case"error":{const ce=J.model??E.current?.model;be({type:"get-status"}),ae(Ce=>Ce.status==="running"?"error":Ce.status),X(Ce=>[...Ce,{id:ft(),kind:"session-error",message:J.message,...J.code!==void 0&&{code:J.code},...J.provider!==void 0&&{provider:J.provider},...ce!==void 0&&{model:ce},...J.retryAfterSeconds!==void 0&&{retryAfterSeconds:J.retryAfterSeconds}}]);break}case"session_change_failed":if(J.requestId!==void 0&&!Ye.current.has(J.requestId))break;xt(J.requestId),X(ce=>[...ce,{id:ft(),kind:"session-change-refused",message:J.message}]);break;case"session_renamed_in_list":V();break;case"session_rename_failed":X(ce=>[...ce,{id:ft(),kind:"session-change-refused",message:J.message}]);break;case"session_deleted":V();break;case"session_delete_failed":X(ce=>[...ce,{id:ft(),kind:"session-change-refused",message:J.message}]);break;case"protocol_error":{if(we.current>0){xt(),X(Ce=>[...Ce,{id:ft(),kind:"protocol-error",message:J.message}]);break}fe.current=Math.max(0,fe.current-1);const ce=_.current;_.current=null,ce!==null&&ce.text!==null&&w({id:ft(),role:"command",name:ce.name,content:ce.text,tone:"info"}),X(Ce=>[...Ce,{id:ft(),kind:"protocol-error",message:J.message}]);break}case"commands":{const ce={commands:J.commands,skills:J.skills};I.current=ce,R(ce);break}case"session_status":E.current=J.status,W(J.status);break;case"command_result":{be({type:"get-status"}),be({type:"get-commands"}),fe.current=Math.max(0,fe.current-1),J.name==="provider"&&J.success&&an.current&&Ie();const ce=J.requestId!==void 0&&he.current.delete(J.requestId);if(rt(J.requestId,J))break;const Ce=_.current;if(_.current=null,Ce!==null&&J.success){Ce.text!==null&&w({id:ft(),role:"command",name:J.name,content:Ce.text,tone:"info"});break}if(J.message.trim().length===0)break;if(ce){J.success||X(at=>[...at,{id:ft(),kind:"command-failed",message:J.message}]);break}w({id:ft(),role:"command",name:J.name,content:J.message,tone:J.success?"success":"error"});break}case"complete":case"interrupted":be({type:"get-status"}),be({type:"get-pending"}),V(),ae(ce=>ce.status==="running"?"done":ce.status);break}},[w,ee,nn,ae,bt,At,Un,ln,yn,_n,xe,jn,He,vt,Ee,Ie,Dt,V,rt,be,le,xt,H]),ui=j.useCallback((J,ce)=>{D.current?.send(MC(J,ce)),N(Ce=>Ce.filter(at=>at.id!==J))},[]),si=j.useCallback((J,ce)=>{D.current?.send(OC(J,ce)),N(Ce=>Ce.filter(at=>at.id!==J))},[]),qn=j.useCallback(J=>{X(ce=>ce.filter(Ce=>Ce.id!==J))},[]);return j.useEffect(()=>{const ce=t({onMessage:Ol,onStatusChange:Ce=>{r(Ce),Ce==="connected"&&(fe.current=0,he.current.clear(),we.current=0,Ye.current.clear(),_.current=null,ce.send({type:"get-commands"}),ce.send({type:"get-status"}),ce.send({type:"get-pending"}),Le(),V(),Dt())}});return D.current=ce,ce.connect(),()=>{ce.disconnect(),D.current=null}},[t,Ol,V,Dt,Le]),{status:i,messages:u,activeTools:c,streamingText:p,isThinking:m,executionWorkspace:x,sessionName:C,commandCatalog:ie,sessionStatus:ue,ownDriverId:O,send:be,sendCommandSilently:jt,pendingPrompts:v,queuedPrompt:T,answerPermission:ui,answerAsk:si,...Nn,...Cn,closeExecutionDetail:nn,...al,...En,...rn,sessionNotices:U,dismissSessionNotice:qn,openSettings:Ee,...zt,openAgentSwitcher:vt,...Xe,...Xu,helpOpen:re,openHelp:oe,closeHelp:P}}function oE(t){const[i,r]=j.useState(!1),u=sE(j.useCallback(o=>BC(t,{...o,onGiveUp:()=>r(!0)}),[t]));return j.useEffect(()=>{u.status==="connected"&&r(!1)},[u.status]),{...u,connectionLost:i}}async function cE(t){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(t);return}catch{}if(!fE(t))throw new Error("copy failed")}function fE(t){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const i=document.activeElement instanceof HTMLElement?document.activeElement:null,r=document.createElement("textarea");r.value=t,r.setAttribute("readonly",""),r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.opacity="0",r.style.pointerEvents="none",document.body.appendChild(r),r.focus(),r.select();let u=!1;try{u=document.execCommand("copy")}catch{u=!1}return document.body.removeChild(r),i?.focus(),u}const dE=2e3;function hE(){const[t,i]=j.useState("idle");return j.useEffect(()=>{if(t==="idle")return;const u=setTimeout(()=>i("idle"),dE);return()=>clearTimeout(u)},[t]),{status:t,copy:u=>{cE(u).then(()=>i("copied"),()=>i("error"))}}}function lf(t){return t.startsWith("attach:")?"terminal":t==="app"?"desktop-app":t==="browser"?"browser":t==="remote:ws"?"remote":t.startsWith("peer:")?"peer":null}function Yy(t,i){if(t===A0)return!0;if(t===Sx||i===null)return!1;if(t===i)return!0;const r=lf(t);return r!==null&&r===lf(i)}function pE(t){switch(lf(t)){case"terminal":return"the terminal";case"desktop-app":return"the desktop app";case"browser":return"the browser";case"remote":case"peer":return"a remote device";default:return"another surface"}}function Gy(t){return t===Sx?"Automatic — loop":`from ${pE(t)}`}const mE={add:"bg-accent/10 text-foreground",remove:"bg-destructive/10 text-foreground",context:"text-muted-foreground",hunk:"text-subtle"},gE={add:"+ ",remove:"- ",context:" ",hunk:""},zc=40,Cu=500;function Pg({line:t}){return d.jsx("div",{className:`whitespace-pre ${mE[t.type]}`,children:`${gE[t.type]}${t.text}`})}function Vu({diffLines:t}){const[i,r]=j.useState(!1);if(t.length<=zc)return d.jsx("pre",{className:"overflow-x-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:t.map((f,p)=>d.jsx(Pg,{line:f},p))});const u=t.slice(0,Cu),o=i?u:t.slice(0,zc),c=Math.min(t.length,Cu)-zc;return d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx("pre",{className:"overflow-x-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:o.map((f,p)=>d.jsx(Pg,{line:f},p))}),i&&t.length>Cu&&d.jsxs("p",{className:"text-[12px] text-subtle",children:[t.length-Cu," more lines not shown"]}),d.jsx("button",{type:"button",onClick:()=>r(f=>!f),className:"self-start text-[12.5px] text-accent hover:underline",children:i?"Show less":`Show more (${c} more lines)`})]})}function rf(t){return t==null||typeof t=="boolean"?"":typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(rf).join(""):df.isValidElement(t)?rf(t.props.children):""}function Vy({label:t,getText:i,className:r=""}){const{status:u,copy:o}=hE(),c=u==="copied"?"Copied":u==="error"?"Couldn't copy":"";return d.jsxs("span",{className:`inline-flex items-center ${r}`,children:[d.jsxs("button",{type:"button",onClick:()=>o(i()),className:"inline-flex items-center gap-1.5 rounded-md border border-border/60 bg-card px-2 py-1 text-[12px] font-medium text-muted-foreground shadow-sm shadow-black/5 transition-colors hover:bg-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[u==="copied"?d.jsx(ua,{size:13,strokeWidth:2}):d.jsx(GN,{size:13,strokeWidth:1.9}),d.jsx("span",{children:t})]}),d.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:c})]})}function xE({children:t}){const i=rf(t).replace(/\n$/,"");return d.jsxs("div",{className:"group/code relative my-1",children:[d.jsx("pre",{tabIndex:0,"aria-label":"Code block, horizontally scrollable",className:"gui-code-scroll overflow-x-auto rounded-xl bg-sidebar px-4 py-3.5 font-mono text-[13px] leading-[1.65] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:t}),d.jsx(Vy,{label:"Copy code",getText:()=>i,className:"absolute right-2 top-2 opacity-0 transition-opacity group-hover/code:opacity-100 group-focus-within/code:opacity-100 [@media(hover:none)]:opacity-100"})]})}function yE({children:t}){return d.jsx(aw,{remarkPlugins:[bN],components:{h1:({children:i})=>d.jsx("h1",{className:"mt-6 text-[20px] font-semibold leading-snug tracking-[-0.015em] first:mt-0",children:i}),h2:({children:i})=>d.jsx("h2",{className:"mt-6 text-[17px] font-semibold leading-snug tracking-[-0.01em] first:mt-0",children:i}),h3:({children:i})=>d.jsx("h3",{className:"mt-5 text-[15px] font-semibold leading-snug first:mt-0",children:i}),p:({children:i})=>d.jsx("p",{children:i}),pre:xE,code:({className:i,children:r})=>i?d.jsx("code",{className:`font-mono ${i??""}`,children:r}):d.jsx("code",{className:"rounded-md bg-raised px-1.5 py-0.5 font-mono text-[0.85em]",children:r}),ul:({children:i})=>d.jsx("ul",{className:"ml-5 list-outside list-disc space-y-1.5 marker:text-subtle",children:i}),ol:({children:i})=>d.jsx("ol",{className:"ml-5 list-outside list-decimal space-y-1.5 marker:text-subtle",children:i}),li:({children:i})=>d.jsx("li",{className:"pl-1",children:i}),strong:({children:i})=>d.jsx("strong",{className:"font-semibold",children:i}),em:({children:i})=>d.jsx("em",{className:"italic",children:i}),a:({href:i,children:r})=>d.jsx("a",{href:i,className:"text-accent underline decoration-accent/40 underline-offset-[3px] hover:decoration-accent",target:"_blank",rel:"noopener noreferrer",children:r}),table:({children:i})=>d.jsx("div",{className:"overflow-x-auto",children:d.jsx("table",{className:"w-full border-collapse text-[14px]",children:i})}),thead:({children:i})=>d.jsx("thead",{children:i}),th:({children:i})=>d.jsx("th",{className:"border-b border-border px-3 py-2 text-left text-[13px] font-medium text-muted-foreground",children:i}),td:({children:i})=>d.jsx("td",{className:"px-3 py-2 align-top",children:i}),blockquote:({children:i})=>d.jsx("blockquote",{className:"border-l-2 border-subtle/50 pl-4 text-muted-foreground",children:i}),hr:()=>d.jsx("hr",{className:"mx-auto my-7 w-12 border-subtle/40"})},children:t})}function bE({content:t,author:i,ownDriverId:r}){const u=i&&!Yy(i,r)?Gy(i):void 0;return d.jsxs("div",{className:"flex flex-col items-end gap-1.5 pl-12",children:[u&&d.jsx("span",{className:"px-1 text-[12.5px] text-subtle",children:u}),d.jsx("div",{className:"max-w-full whitespace-pre-wrap break-words rounded-[20px] bg-raised px-4 py-2.5 text-[15px] leading-relaxed text-foreground",children:t})]})}function Wg({content:t,isStreaming:i=!1}){return d.jsxs("div",{className:"group/message gui-prose",children:[d.jsx(yE,{children:t}),i&&d.jsx("span",{className:"ml-1 inline-block h-2.5 w-2.5 animate-pulse rounded-full bg-foreground/70 align-middle"}),!i&&d.jsx("div",{className:"flex opacity-0 transition-opacity focus-within:opacity-100 group-hover/message:opacity-100 group-focus-within/message:opacity-100 [@media(hover:none)]:opacity-100",children:d.jsx(Vy,{label:"Copy message",getText:()=>t})})]})}function vE({name:t,className:i}){const r=t.toLowerCase(),u={size:15,strokeWidth:1.75,className:i};return/(read|view|cat|open)/u.test(r)?d.jsx(ZN,{...u}):/(grep|glob|search|find|list|ls)/u.test(r)?d.jsx(xC,{...u}):/(edit|write|patch|replace|create)/u.test(r)?d.jsx(_y,{...u}):/(bash|shell|exec|run|command|terminal)/u.test(r)?d.jsx(CC,{...u}):/(web|fetch|http|url|browse)/u.test(r)?d.jsx(tC,{...u}):/(agent|task|delegate)/u.test(r)?d.jsx(zN,{...u}):d.jsx(Dy,{...u})}const SE=52;function Fy(t,i=SE){if(t.length<=i)return t;const r=t.lastIndexOf("/");if(r===-1)return t;const u=t.slice(r+1),o=t.slice(0,r),c=i-u.length-2;return c<=0?`…/${u}`:`…${o.slice(o.length-c)}/${u}`}function kE(t){if(t)try{const i=JSON.parse(t);if(typeof i!="object"||i===null)return{output:t};const r=i;return{structured:t,...typeof r.output=="string"&&r.output?{output:r.output}:{},...typeof r.error=="string"&&r.error?{error:r.error}:{},...typeof r.exitCode=="number"?{exitCode:r.exitCode}:{}}}catch{return{output:t}}}const Dc=20,Rc=500;function Ou({text:t}){const[i,r]=j.useState(!1),u=t.split(`
|
|
303
|
-
`);if(u.length<=Dc)return d.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-[12.5px] leading-relaxed text-muted-foreground",children:t});const o=u.slice(0,Rc);return d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-[12.5px] leading-relaxed text-muted-foreground",children:(i?o:u.slice(0,Dc)).join(`
|
|
304
|
-
`)}),i&&u.length>Rc&&d.jsxs("p",{className:"text-[12px] text-subtle",children:[u.length-Rc," more lines"]}),d.jsx("button",{type:"button",onClick:()=>r(c=>!c),className:"self-start text-[12.5px] text-accent hover:underline",children:i?"Show less":`Show more (${u.length-Dc} more lines)`})]})}function wE({tool:t}){return d.jsxs("div",{className:"flex flex-col gap-2",children:[t.executionId&&d.jsx("code",{className:"text-[12px] text-subtle",children:t.executionId}),t.toolResultParts?.map((i,r)=>{switch(i.type){case"text":return d.jsx(Ou,{text:i.text},r);case"image_inline":return/^image\/(png|jpeg|gif|webp)$/.test(i.mimeType)?d.jsx("img",{src:`data:${i.mimeType};base64,${i.data}`,alt:`Observation from ${t.name}`,className:"max-h-96 max-w-full object-contain"},r):d.jsxs("p",{children:["Image preview unavailable (",i.mimeType,")."]},r);case"image_uri":return d.jsxs("div",{children:[d.jsx("p",{children:"Image reference; an admitted read is required."}),d.jsx("code",{children:i.uri})]},r);case"resource_link":return d.jsxs("div",{children:[d.jsx("p",{children:i.title??i.name}),d.jsx("code",{children:i.uri}),d.jsx("p",{children:"An admitted read is required."})]},r);case"resource_embedded":return d.jsxs("div",{children:[d.jsx("code",{children:i.uri}),i.text!==void 0?d.jsx(Ou,{text:i.text}):d.jsxs("p",{children:["Embedded binary resource (",i.mimeType??"unknown type","); preview unavailable."]})]},r);case"audio_inline":return d.jsxs("p",{children:["Audio preview unavailable (",i.mimeType,")."]},r)}})]})}function Xy({tool:t}){const i=t.status==="running",r=t.status==="error",[u,o]=j.useState(!1),c=kE(t.toolResultData),f=t.diffLines!==void 0&&t.diffLines.length>0,p=!!c?.output||!!c?.error||!!c?.structured,g=!!t.toolResultParts?.length,m=f||p||g,y=t.commandName?`Ran /${t.commandName}`:t.name;return d.jsxs("div",{className:"flex flex-col text-[14px]",children:[d.jsxs("button",{type:"button",disabled:!m,"aria-expanded":m?u:void 0,onClick:()=>m&&o(x=>!x),className:`group -mx-2 flex min-w-0 items-center gap-2.5 rounded-lg px-2 py-1 text-left ${m?"hover:bg-hover":"cursor-default"}`,children:[d.jsx(vE,{name:t.name,className:`flex-shrink-0 ${r?"text-destructive":"text-subtle"}`}),d.jsx("span",{className:`flex-shrink-0 font-medium ${i?"gui-shimmer":r?"text-destructive":"text-muted-foreground"}`,children:y}),t.displayPath?d.jsx("span",{className:"min-w-0 flex-1 break-all font-mono text-[12.5px] text-subtle",title:t.displayPath,children:Fy(t.displayPath)}):typeof t.input=="string"&&t.input&&d.jsx("span",{className:"min-w-0 truncate font-mono text-[12.5px] text-subtle",children:t.input}),d.jsxs("span",{className:"ml-auto flex flex-shrink-0 items-center gap-1.5 text-[12.5px] text-subtle",children:[i?d.jsx(Df,{size:14,className:"animate-spin","aria-label":"running"}):r?d.jsx("span",{className:"text-destructive",children:"failed"}):d.jsx(ua,{size:14,"aria-label":"done"}),m&&d.jsx(Gu,{size:13,className:`transition-transform ${u?"rotate-90":""}`})]})]}),u&&m&&d.jsxs("div",{className:"flex flex-col gap-1 pb-1 pl-[25px] pt-0.5",children:[f&&d.jsx(Vu,{diffLines:t.diffLines}),!f&&c?.output&&d.jsx(Ou,{text:c.output}),c?.error&&d.jsx("p",{className:"font-mono text-[12.5px] text-destructive",children:c.error}),typeof c?.exitCode=="number"&&d.jsxs("p",{className:"text-[12px] text-subtle",children:["exit ",c.exitCode]}),c?.structured&&d.jsx(Ou,{text:c.structured}),g&&d.jsx(wE,{tool:t})]})]})}const ex=12,tx=280,jE={success:{dot:"bg-accent",text:"text-foreground/90"},error:{dot:"bg-destructive",text:"text-destructive"},info:{dot:"bg-subtle",text:"text-muted-foreground"}};function NE({entry:t}){const i=t.content.split(`
|
|
305
|
-
`),r=j.useRef(null),[u,o]=j.useState(!1),[c,f]=j.useState(!1);j.useLayoutEffect(()=>{const S=r.current;S&&o(S.scrollHeight>tx)},[t.content]);const p=i.length>ex,g=p||u,m=g&&!c,y=m&&p?i.slice(0,ex).join(`
|
|
306
|
-
`):t.content,x=jE[t.tone];return d.jsxs("div",{"data-testid":"command-output","data-tone":t.tone,className:"overflow-hidden rounded-xl bg-card",children:[d.jsxs("div",{className:"flex items-center gap-2 px-4 pt-3 text-[13px]",children:[d.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${x.dot}`}),d.jsxs("span",{className:"font-mono font-medium text-foreground",children:["/",t.name]})]}),d.jsxs("div",{className:"relative",children:[d.jsx("pre",{ref:r,style:m?{maxHeight:tx}:void 0,className:`overflow-hidden whitespace-pre-wrap break-words px-4 pb-3 pt-1.5 leading-[1.65] ${g?"font-mono text-[13px]":"font-sans text-[14.5px]"} ${x.text}`,children:y}),m&&d.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-12 bg-gradient-to-t from-card to-transparent"})]}),g&&d.jsxs("button",{type:"button",onClick:()=>f(S=>!S),className:"flex w-full items-center gap-1.5 px-4 pb-2.5 pt-1 text-left text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(Ey,{size:14,className:c?"rotate-180":""}),c?"Show less":`Show all ${i.length} lines`]})]})}function CE({tools:t}){const[i,r]=j.useState(!1),u=t.filter(f=>!f.internal),o=u.filter(f=>f.status==="error").length,c=[...new Set(u.map(f=>f.commandName?`/${f.commandName}`:f.name))].join(", ");return u.length===0?null:d.jsxs("div",{className:"text-[14px]",children:[d.jsxs("button",{type:"button","aria-expanded":i,onClick:()=>r(f=>!f),className:"group -mx-2 flex max-w-full items-center gap-2.5 rounded-lg px-2 py-1 text-left text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(Dy,{size:15,strokeWidth:1.75,className:"flex-shrink-0 text-subtle"}),d.jsxs("span",{className:"flex-shrink-0",children:[u.length," tool ",u.length===1?"call":"calls"]}),d.jsx("span",{className:"min-w-0 truncate text-subtle",children:c}),o>0&&d.jsxs("span",{className:"flex-shrink-0 rounded-md bg-destructive/12 px-1.5 text-[12.5px] text-destructive",children:[o," failed"]}),d.jsx(Gu,{size:14,className:`flex-shrink-0 text-subtle transition-transform ${i?"rotate-90":""}`})]}),i&&d.jsx("div",{className:"mt-0.5 flex flex-col pl-[25px]",children:u.map(f=>d.jsx(Xy,{tool:f},f.id))})]})}function EE({files:t}){const[i,r]=j.useState(null);return d.jsxs("div",{className:"flex flex-col gap-0.5 rounded-lg bg-card px-2 py-1.5 text-[13px]",children:[d.jsx("p",{className:"px-1 text-[12px] font-medium text-muted-foreground",children:"Changed files"}),t.map(u=>d.jsxs("div",{className:"flex flex-col",children:[d.jsxs("button",{type:"button","aria-expanded":i===u.path,onClick:()=>r(o=>o===u.path?null:u.path),className:"flex min-w-0 items-center gap-2 rounded-md px-1 py-1 text-left hover:bg-hover",children:[d.jsx("span",{className:"min-w-0 flex-1 break-all font-mono text-[12.5px] text-foreground",title:u.path,children:Fy(u.path)}),d.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-accent",children:["+",u.added]}),d.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-destructive",children:["-",u.removed]})]}),i===u.path&&d.jsx("div",{className:"pl-2",children:d.jsx(Vu,{diffLines:u.diffLines})})]},u.path))]})}function _E(){return d.jsx("p",{className:"gui-shimmer w-fit text-[15px] font-medium",children:"Thinking…"})}const TE=80;function AE({messages:t,activeTools:i,streamingText:r,isThinking:u,ownDriverId:o}){const c=j.useRef(null),f=j.useRef(!0),[p,g]=j.useState(!0),[m,y]=j.useState(!1),x=C=>{f.current=C,g(C)};j.useLayoutEffect(()=>{if(f.current){const C=c.current;C&&(C.scrollTop=C.scrollHeight),x(!0),y(!1)}else y(!0)},[t.length,r,u,i.length]);const S=()=>{const C=c.current;if(!C)return;const F=C.scrollHeight-C.scrollTop-C.clientHeight<=TE;x(F),F&&y(!1)},v=()=>{const C=c.current;C&&(C.scrollTop=C.scrollHeight),x(!0),y(!1)},N=t.length===0&&!u&&i.length===0&&!r,T=u||r.length>0||i.some(C=>C.status==="running"),L=!p&&(m||T);return d.jsxs("div",{className:"agent-ui relative flex h-full min-h-0 flex-col",children:[d.jsx("main",{ref:c,onScroll:S,className:"min-h-0 flex-1 overflow-y-auto","aria-label":"Conversation",children:d.jsxs("div",{className:"mx-auto flex w-full max-w-[760px] flex-col gap-6 px-6 pb-6 pt-8",children:[N&&d.jsx("div",{className:"flex h-full items-center justify-center",children:d.jsx("p",{className:"text-[14px] text-subtle",children:"No messages yet"})}),t.map(C=>{switch(C.role){case"user":return d.jsx(bE,{content:C.content,author:C.author,ownDriverId:o},C.id);case"assistant":return d.jsx(Wg,{content:C.content},C.id);case"command":return d.jsx(NE,{entry:C},C.id);case"tools":return d.jsx(CE,{tools:C.tools},C.id);case"changed-files":return d.jsx(EE,{files:C.files},C.id)}}),u&&!r&&d.jsx(_E,{}),i.some(C=>!C.internal)&&d.jsx("div",{className:"flex flex-col",children:i.filter(C=>!C.internal).map(C=>d.jsx(Xy,{tool:C},C.id))}),r&&d.jsx(Wg,{content:r,isStreaming:!0})]})}),L&&d.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-4 flex justify-center",children:d.jsxs("button",{type:"button",onClick:v,className:"pointer-events-auto flex items-center gap-1.5 rounded-full bg-primary px-3.5 py-2 text-[13px] font-medium text-primary-foreground shadow-lg shadow-black/25 hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:[d.jsx(EN,{size:14,strokeWidth:2.25}),"Jump to latest"]})})]})}const nx='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';let Pr=[];function sa({open:t,onClose:i,title:r,children:u,destructive:o=!1,panelClassName:c,describedById:f,restoreFocusTo:p,role:g="dialog"}){const m=j.useRef(null),y=j.useRef(null),x=j.useId(),S=j.useRef(Symbol("dialog"));return j.useEffect(()=>{if(!t)return;y.current=p??document.activeElement;const v=m.current;return(v?.querySelector(nx)??v)?.focus(),()=>{y.current?.focus?.()}},[t]),j.useEffect(()=>{if(!t)return;const v=S.current;return Pr.push(v),()=>{Pr=Pr.filter(N=>N!==v)}},[t]),j.useEffect(()=>{if(!t)return;const v=S.current,N=()=>Pr[Pr.length-1]===v,T=L=>{if(!N())return;if(L.key==="Escape"){L.stopImmediatePropagation(),i();return}if(L.key!=="Tab")return;const C=m.current;if(!C)return;const F=Array.from(C.querySelectorAll(nx));if(F.length===0)return;const U=F[0],X=F[F.length-1];L.shiftKey&&document.activeElement===U?(L.preventDefault(),X?.focus()):!L.shiftKey&&document.activeElement===X&&(L.preventDefault(),U?.focus())};return document.addEventListener("keydown",T,!0),()=>document.removeEventListener("keydown",T,!0)},[t,i]),t?d.jsx("div",{className:"agent-ui fixed inset-0 z-50 flex items-center justify-center bg-black/55 p-4 backdrop-blur-[2px]",onMouseDown:v=>{o||v.target===v.currentTarget&&i()},children:d.jsxs("div",{ref:m,role:g,"aria-modal":"true","aria-labelledby":x,...f?{"aria-describedby":f}:{},tabIndex:-1,className:c??"flex max-h-[85vh] w-full max-w-lg flex-col rounded-2xl bg-card text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[d.jsx("h2",{id:x,className:"sr-only",children:r}),u]})}):null}const qf="inline-flex items-center gap-2 rounded-lg px-3.5 py-1.5 text-[14px] font-medium transition-colors",zE=`${qf} bg-primary text-primary-foreground hover:opacity-90`,DE=`${qf} bg-raised text-foreground hover:bg-hover`,RE=`${qf} bg-destructive text-destructive-foreground hover:opacity-90`;function Rl({open:t,title:i,body:r,confirmLabel:u,cancelLabel:o="Cancel",destructive:c=!1,onConfirm:f,onCancel:p,restoreFocusTo:g}){const m=j.useId();return d.jsxs(sa,{open:t,onClose:p,title:i,destructive:c,role:c?"alertdialog":"dialog",describedById:m,restoreFocusTo:g,panelClassName:"w-full max-w-sm rounded-2xl bg-card p-5 text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[d.jsx("p",{className:"text-[15px] font-medium text-foreground",children:i}),d.jsx("p",{id:m,className:"mt-2 text-[13.5px] text-muted-foreground",children:r}),d.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[d.jsx("button",{type:"button",className:DE,onClick:p,children:o}),d.jsx("button",{type:"button",className:c?RE:zE,onClick:f,children:u})]})]})}const ME={satisfied:"Satisfied","max-iterations":"Stopped — reached the iteration limit",cancelled:"Cancelled","no-progress":"Stopped — no progress"};function OE(t){return t.status==="active"?"Active":t.status==="satisfied"?"Satisfied":t.stopReason?ME[t.stopReason]:"Stopped"}const $y=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function LE(t){return t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})}function lx(t,i){return t.getFullYear()===i.getFullYear()&&t.getMonth()===i.getMonth()&&t.getDate()===i.getDate()}function UE(t,i=new Date){const r=new Date(t);if(Number.isNaN(r.getTime()))return"Unknown";const u=LE(r);if(lx(r,i))return`Today ${u}`;const o=new Date(i);if(o.setDate(i.getDate()+1),lx(r,o))return`Tomorrow ${u}`;const c=new Date(i);return c.setDate(i.getDate()+6),r.getTime()>i.getTime()&&r.getTime()<=c.getTime()?`${$y[r.getDay()]} ${u}`:`${r.toLocaleDateString("en-US",{month:"short",day:"numeric"})} ${u}`}function qE(t){const i=t.trim().split(/\s+/);if(i.length!==5)return;const[r,u,o,c,f]=i;if(o!=="*"||c!=="*"||!/^\d{1,2}$/.test(r)||!/^\d{1,2}$/.test(u))return;const p=`${u.padStart(2,"0")}:${r.padStart(2,"0")}`;if(f==="*")return`Every day at ${p}`;if(f==="1-5")return`Every weekday at ${p}`;if(f==="0,6"||f==="6,0")return`Every weekend at ${p}`;if(/^\d$/.test(f)){const g=$y[Number(f)];return g?`Every ${g} at ${p}`:void 0}}function BE(t,i=new Date){if(t.nextFireAt)return UE(t.nextFireAt,i);const r=t.schedule?.cronExpression;return r?qE(r)??"Repeats":"—"}function Qy(t){return t.schedule?.agentInstruction??t.label}const HE={sleeping:"Active",paused:"Paused",running:"Running",queued:"Queued",cancelled:"Deleted",failed:"Failed",completed:"Done",waiting_permission:"Needs you"};function IE(t){return HE[t.status]??t.status}function Zy(t,i){return t==="completed"&&(i??0)>0}function YE(t){return Ky(t.status,t.attention,t.deniedToolCalls)}function Ky(t,i,r){return i==="permission"||t==="waiting_permission"?{label:"Needs you",tone:"warning"}:i==="failed"||t==="failed"?{label:"Failed",tone:"destructive"}:Zy(t,r)?{label:"Needs permission",tone:"warning"}:t==="completed"?{label:"Done",tone:"muted"}:t==="cancelled"?{label:"Stopped",tone:"muted"}:t==="queued"?{label:"Queued",tone:"muted"}:t==="running"?{label:"Running",tone:"muted"}:null}function GE({tasks:t,schedules:i=[],goal:r=null,onPauseSchedule:u,onResumeSchedule:o,onDeleteSchedule:c,onCancelGoal:f,className:p,onSelect:g,onReturnToConversation:m,onStop:y,selectedEntryId:x}){const S=t.filter(C=>C.status==="running").length,v=i.filter(C=>C.status!=="cancelled"),[N,T]=j.useState(null),L=v.find(C=>C.id===N)??null;return d.jsxs("div",{className:`agent-ui flex flex-col overflow-hidden ${p??""}`,children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-2 px-4",children:[d.jsx("span",{className:"text-[14px] font-medium text-foreground",children:"Agents"}),S>0&&d.jsxs("span",{className:"ml-auto text-[13px] tabular-nums text-subtle",children:[S," running"]})]}),d.jsxs("div",{className:"flex-1 space-y-4 overflow-y-auto px-3 pb-3",children:[t.length>0&&d.jsx("div",{className:"space-y-2",children:t.map(C=>d.jsx(VE,{entry:C,selected:C.id===x,onOpen:C.kind==="main_thread"?m:g&&(()=>g(C)),onStop:y&&C.controls?.includes("cancel")?()=>y(C):void 0},C.id))}),v.length>0&&d.jsxs("div",{children:[d.jsx("p",{className:"px-0.5 pb-1.5 text-[12px] font-medium uppercase tracking-wide text-subtle",children:"Scheduled"}),d.jsx("div",{className:"space-y-2",children:v.map(C=>d.jsx(FE,{task:C,onPause:u,onResume:o,onRequestDelete:()=>T(C.id)},C.id))})]}),r&&d.jsxs("div",{children:[d.jsx("p",{className:"px-0.5 pb-1.5 text-[12px] font-medium uppercase tracking-wide text-subtle",children:"Goal"}),d.jsx(XE,{goal:r,onCancel:f})]})]}),d.jsx(Rl,{open:L!==null,title:"Delete this schedule?",body:L?`"${Qy(L)}" will stop running. This cannot be undone.`:"",confirmLabel:"Delete",destructive:!0,onConfirm:()=>{L&&c?.(L.id),T(null)},onCancel:()=>T(null)})]})}function VE({entry:t,selected:i,onOpen:r,onStop:u}){const o=t.attention==="permission"||t.status==="waiting_permission",c=t.attention==="failed"||t.status==="failed";return d.jsxs("div",{role:r?"button":void 0,tabIndex:r?0:void 0,onClick:r,onKeyDown:r?f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),r())}:void 0,"aria-label":r?t.title:void 0,className:`rounded-xl px-3.5 py-3 transition-opacity duration-500 ${o?"bg-warning/10":c?"bg-destructive/10":"bg-card"} ${t.status==="completed"?"opacity-60":""} ${i?"ring-1 ring-inset ring-accent":""} ${r?"cursor-pointer":""}`,children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx($E,{status:t.status,attention:t.attention,deniedToolCalls:t.deniedToolCalls}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-foreground",children:t.title}),d.jsx(ZE,{status:t.status,attention:t.attention,deniedToolCalls:t.deniedToolCalls}),u&&d.jsx("button",{type:"button","aria-label":`Stop ${t.title}`,onClick:f=>{f.stopPropagation(),u()},className:"flex-shrink-0 rounded-md px-1.5 py-px text-[12px] text-subtle hover:bg-destructive/10 hover:text-destructive",children:"Stop"})]}),t.currentAction&&d.jsx("p",{className:"mt-1.5 truncate pl-[26px] text-[13px] leading-snug text-muted-foreground",children:t.currentAction}),t.preview&&d.jsx("p",{className:"mt-1 truncate pl-[26px] font-mono text-[12px] leading-snug text-subtle",children:t.preview})]})}function FE({task:t,onPause:i,onResume:r,onRequestDelete:u}){const o=t.status==="paused";return d.jsxs("div",{className:"rounded-xl bg-card px-3.5 py-3",children:[d.jsx("p",{className:"truncate text-[14px] font-medium text-foreground",children:Qy(t)}),d.jsxs("p",{className:"mt-1 text-[13px] text-muted-foreground",children:[BE(t)," · ",IE(t)]}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[o?d.jsxs("button",{type:"button",onClick:()=>r?.(t.id),className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(pC,{size:11,fill:"currentColor","aria-hidden":"true"}),"Resume"]}):d.jsxs("button",{type:"button",onClick:()=>i?.(t.id),className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(fC,{size:11,fill:"currentColor","aria-hidden":"true"}),"Pause"]}),d.jsx("button",{type:"button",onClick:u,className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-destructive hover:bg-destructive/10",children:"Delete…"})]})]})}function XE({goal:t,onCancel:i}){return d.jsxs("div",{className:"rounded-xl bg-card px-3.5 py-3",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx(zy,{size:16,strokeWidth:1.9,className:"flex-shrink-0 text-accent"}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-foreground",children:t.objective})]}),d.jsx("p",{className:"mt-1.5 pl-[26px] text-[13px] text-muted-foreground",children:OE(t)}),t.status==="active"&&d.jsx("div",{className:"mt-2 pl-[26px]",children:d.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(Mf,{size:11,fill:"currentColor","aria-hidden":"true"}),"Cancel goal"]})})]})}function $E({status:t,attention:i,deniedToolCalls:r}){const u={size:16,strokeWidth:1.9,className:"flex-shrink-0"};return i==="permission"||t==="waiting_permission"?d.jsx(nf,{...u,className:`${u.className} text-warning`}):i==="failed"||t==="failed"?d.jsx(Bg,{...u,className:`${u.className} text-destructive`}):Zy(t,r)?d.jsx(nf,{...u,className:`${u.className} text-warning`}):t==="running"?d.jsx(Df,{...u,className:`${u.className} animate-spin text-muted-foreground`}):t==="completed"?d.jsx(qN,{...u,className:`${u.className} text-success`}):t==="cancelled"?d.jsx(Bg,{...u,className:`${u.className} text-subtle`}):d.jsx(HN,{...u,className:`${u.className} text-subtle`})}const QE={warning:"bg-warning/15 text-warning",destructive:"bg-destructive/12 text-destructive",muted:"text-subtle"};function ZE({attention:t,status:i,deniedToolCalls:r}){const u=Ky(i,t,r);return!u||u.label==="Running"?null:d.jsx("span",{className:`flex-shrink-0 rounded-md px-1.5 py-px text-[12px] ${QE[u.tone]}`,children:u.label})}function KE({state:t}){if(!t.agentSwitcherOpen)return null;const i=t.agentSwitcherStatus==="loading"&&t.agentDefinitions.length===0;return d.jsxs(sa,{open:!0,onClose:()=>t.closeAgentSwitcher(),title:"Switch agent",panelClassName:"flex max-h-[min(560px,85vh)] w-full max-w-md flex-col overflow-hidden rounded-2xl bg-card text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-1 border-b border-border px-3",children:[d.jsx("h2",{className:"px-1.5 text-[15px] font-semibold text-foreground",children:"Switch agent"}),d.jsx("button",{type:"button","aria-label":"Close",onClick:()=>t.closeAgentSwitcher(),className:"ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(er,{size:17,strokeWidth:1.75})})]}),t.agentSwitchMessage?d.jsx("p",{role:"status",className:"mx-4 mt-3 rounded-lg bg-raised px-3 py-2 text-[13px] text-foreground",children:t.agentSwitchMessage}):null,d.jsx("ul",{className:"min-h-0 flex-1 overflow-y-auto p-2",children:i?d.jsx("li",{className:"px-3 py-4 text-[13.5px] text-muted-foreground",children:"Loading agents…"}):t.agentDefinitions.length===0?d.jsx("li",{className:"px-3 py-4 text-[13.5px] text-muted-foreground",children:"No agents are configured on this host."}):t.agentDefinitions.map(r=>{const u=r.name===t.currentAgentType;return d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>t.selectAgent(r.name),"aria-current":u?"true":void 0,className:"flex w-full items-start gap-3 rounded-xl px-3 py-2.5 text-left hover:bg-hover",children:[d.jsx("span",{className:"mt-0.5 flex h-4 w-4 flex-shrink-0 items-center justify-center",children:u?d.jsx(ua,{size:16,strokeWidth:2,className:"text-accent"}):null}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate text-[14px] font-medium text-foreground",children:r.name}),d.jsx("span",{className:"block truncate text-[13px] text-muted-foreground",children:r.description}),d.jsx("span",{className:"block truncate text-[12px] text-subtle",children:r.definedIn})]})]})},r.name)})})]})}function JE(t){return t!==null&&t.matches("input, textarea, select, [contenteditable]")}function ix(t,i){return t==="provider-profile-action"&&i==="delete"}function Mc({prompts:t,onAnswerPermission:i,onAnswerAsk:r,ownDriverId:u=null,layout:o="modal",armDelayMs:c=450,onFocusReturn:f}){const p=t[0],g=p?.id,m=j.useRef(null),y=j.useRef(null),x=p?.kind==="ask"&&p.request.allowFreeText===!0,[S,v]=j.useState(void 0),[N,T]=j.useState(!1),[L,C]=j.useState(!1),F=j.useRef(null),U=j.useRef(!1);j.useEffect(()=>{if(g===void 0||c<=0)return;const E=setTimeout(()=>v(g),c);return()=>clearTimeout(E)},[g,c]);const X=g!==void 0&&(c<=0||S===g);if(j.useLayoutEffect(()=>{const E=m.current;if(!E)return;const H=document.activeElement,w=!!(H&&H!==E&&E.contains(H)),ae=U.current&&H===document.body;(w||ae)&&E.focus()},[g]),j.useEffect(()=>{X&&(JE(document.activeElement)||(x?y.current:m.current)?.focus())},[X,g,x]),j.useEffect(()=>{if(g!==void 0){U.current=!1;return}T(!1),U.current&&(U.current=!1,f?.())},[g,f]),!p)return null;if(p.kind==="ask"&&p.request.id==="provider-delete")return d.jsx(Rl,{open:!0,title:p.request.title,body:"This removes it from your provider profiles. This can't be undone.",confirmLabel:"Delete",destructive:!0,onCancel:()=>r(p.id,{type:"cancelled"}),onConfirm:()=>r(p.id,{type:"answer",values:["yes"]})});const ie=p.requesterDriverId&&!Yy(p.requesterDriverId,u)?Gy(p.requesterDriverId):void 0,R=o==="dock",I=()=>{const E=m.current,H=document.activeElement;U.current=!!(E&&H&&E.contains(H))},ue=(E,H)=>{I(),i(E,H)},W=(E,H)=>{I(),F.current?.clear(),r(E,H)},O=E=>{x&&(E.target.closest("button, input")||y.current?.focus())},ne=E=>H=>{!X&&H.detail===0||E()},re=E=>{if(E.key==="Escape"){E.preventDefault(),p.kind==="permission"?ue(p.id,!1):W(p.id,{type:"cancelled"});return}if(!X)return;const H=Number(E.key)-1;if(!Number.isInteger(H)||H<0)return;if(p.kind==="permission"){H<2&&ue(p.id,H===0);return}const w=(p.request.options??[]).filter(ae=>!ix(p.request.id,ae.value))[H];w&&W(p.id,{type:"answer",values:[w.value]})},ge=p.kind==="permission"&&(p.diffLines?.length??0)>0,oe=p.kind==="permission"&&typeof p.toolArgs.command=="string"?p.toolArgs.command:void 0,P=p.kind==="permission"&&p.toolName==="Bash"&&oe!==void 0,D=p.kind==="ask"?p.request.id:void 0,Q=p.kind==="ask"?p.request.options??[]:[],se=Q.find(E=>ix(D,E.value)),me=se?Q.filter(E=>E!==se):Q,_=x&&L?"Enter to submit · Esc to cancel":Q.length>0?"1–9 choose · Esc cancel":"Esc cancels";return d.jsx("div",{className:R?"agent-ui gui-rise flex-shrink-0":"agent-ui fixed inset-0 z-50 flex items-center justify-center bg-black/55 p-4 backdrop-blur-[2px]",children:d.jsx("div",{ref:m,tabIndex:R?0:-1,onKeyDown:R?re:void 0,onClick:O,onFocus:()=>T(!0),onBlur:E=>{E.currentTarget.contains(E.relatedTarget)||T(!1)},role:"dialog","aria-label":"pending question","data-armed":R?String(X):void 0,className:`w-full rounded-2xl bg-card text-[14px] text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring ${R?"p-4":"max-w-lg p-5"}`,children:p.kind==="permission"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("span",{className:"mt-0.5 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-warning/15 text-warning",children:d.jsx(nf,{size:17,strokeWidth:1.9})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("p",{className:"text-[13px] text-muted-foreground",children:["Permission request",ie&&d.jsxs(d.Fragment,{children:[" ","· ",d.jsx("span",{className:"text-foreground",children:ie})]})]}),p.requester?.kind==="background-agent"?d.jsxs("p",{className:"mt-0.5 text-[15px] font-medium text-foreground",children:["Background agent ",d.jsx("span",{className:"font-semibold",children:p.requester.label})," ","wants to"," ",ge?d.jsxs(d.Fragment,{children:[p.toolName.toLowerCase()," ",d.jsx("span",{className:"font-mono font-semibold",children:p.diffFile})]}):d.jsxs(d.Fragment,{children:["run ",d.jsx("span",{className:"font-semibold",children:p.toolName})]})]}):ge?d.jsxs("p",{className:"mt-0.5 text-[15px] font-medium text-foreground",children:[p.toolName," ",d.jsx("span",{className:"font-mono font-semibold",children:p.diffFile})]}):d.jsxs("p",{className:"mt-0.5 text-[15px] font-medium text-foreground",children:["Allow ",d.jsx("span",{className:"font-semibold",children:p.toolName})," to run?"]}),ge?d.jsx("div",{className:"mt-2.5",children:d.jsx(Vu,{diffLines:p.diffLines})}):P?d.jsx(n_,{command:oe,cwd:p.cwd}):d.jsx(t_,{args:p.toolArgs})]})]}),d.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 pl-11",children:[d.jsxs("button",{type:"button","aria-keyshortcuts":R?"1":void 0,className:af,onClick:ne(()=>ue(p.id,!0)),children:[d.jsx("span",{children:"Allow"}),R&&d.jsx(Oc,{children:"1"})]}),d.jsxs("button",{type:"button","aria-keyshortcuts":R?"2":void 0,className:rx,onClick:ne(()=>ue(p.id,!1)),children:[d.jsx("span",{children:"Deny"}),R&&d.jsx(Oc,{children:"2"})]}),R&&d.jsx(ax,{hasFocus:N,armed:X,armedText:"1 allow · 2 deny · Esc deny"})]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("span",{className:"mt-0.5 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-accent/15 text-accent",children:d.jsx(iC,{size:17,strokeWidth:1.9})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[ie&&d.jsx("p",{className:"text-[13px] text-muted-foreground",children:d.jsx("span",{className:"text-foreground",children:ie})}),d.jsx("p",{className:"text-[15px] font-medium text-foreground",children:p.request.title}),p.request.description?d.jsx("p",{className:"mt-1 leading-relaxed text-muted-foreground",children:p.request.description}):null]})]}),d.jsxs("div",{className:"mt-4 flex flex-col gap-3 pl-11",children:[me.length>0&&d.jsx("div",{className:"flex flex-wrap items-start gap-3",children:me.map((E,H)=>d.jsxs("div",{className:"flex flex-col items-start gap-0.5",children:[d.jsxs("button",{type:"button","aria-keyshortcuts":R&&H<9?String(H+1):void 0,className:H===0?af:rx,onClick:ne(()=>W(p.id,{type:"answer",values:[E.value]})),children:[d.jsx("span",{children:E.label}),R&&H<9&&d.jsx(Oc,{children:H+1})]}),E.description&&d.jsx("p",{className:"pl-0.5 text-[11.5px] leading-snug text-subtle",children:E.description})]},E.value))}),se&&d.jsx("div",{className:"flex flex-wrap items-start gap-3",children:d.jsx("button",{type:"button",className:WE,onClick:ne(()=>W(p.id,{type:"answer",values:[se.value]})),children:d.jsx("span",{children:se.label})})}),x&&d.jsxs("div",{className:"flex flex-col gap-1.5",children:[Q.length>0&&d.jsx("p",{className:"text-[12.5px] text-subtle",children:"or type an answer"}),d.jsx(e_,{ref:F,inputRef:y,masked:p.request.masked===!0,placeholder:p.request.placeholder,allowEmpty:p.request.allowEmpty===!0,wrapClick:ne,onSubmit:E=>W(p.id,{type:"answer",values:[],text:E}),onCancel:()=>W(p.id,{type:"cancelled"}),onFocusChange:C},p.id)]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("button",{type:"button",className:PE,onClick:ne(()=>W(p.id,{type:"cancelled"})),children:"Cancel"}),R&&d.jsx(ax,{hasFocus:N,armed:X,armedText:_})]})]})]})})})}const Fu="inline-flex items-center gap-2 rounded-lg px-3.5 py-1.5 text-[14px] font-medium transition-colors",af=`${Fu} bg-primary text-primary-foreground hover:opacity-90`,rx=`${Fu} bg-raised text-foreground hover:bg-hover`,PE=`${Fu} text-muted-foreground hover:bg-hover hover:text-foreground`,WE=`${Fu} bg-destructive/12 text-destructive hover:bg-destructive/20`,e_=j.forwardRef(function({masked:i,placeholder:r,allowEmpty:u,inputRef:o,wrapClick:c,onSubmit:f,onCancel:p,onFocusChange:g},m){const[y,x]=j.useState("");j.useImperativeHandle(m,()=>({clear:()=>x("")}),[]);const S=()=>{const T=y.trim();!T&&!u||(x(""),f(T))},v=()=>{x(""),p()},N=T=>{if(T.stopPropagation(),T.key==="Enter"){if(T.nativeEvent.isComposing||T.keyCode===229)return;T.preventDefault(),S()}else T.key==="Escape"&&(T.preventDefault(),v())};return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("input",{ref:o,type:i?"password":"text",autoComplete:"off","aria-label":"answer",placeholder:r,value:y,onChange:T=>x(T.target.value),onKeyDown:N,onFocus:()=>g(!0),onBlur:()=>g(!1),className:"min-w-0 flex-1 rounded-lg bg-sidebar px-3 py-1.5 text-[14px] text-foreground placeholder:text-subtle focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"}),d.jsx("button",{type:"button",className:af,disabled:!y.trim()&&!u,onClick:c(S),children:"Continue"})]})});function Oc({children:t}){return d.jsx("kbd",{"aria-hidden":"true",className:"rounded bg-foreground/10 px-1 font-mono text-[11px] leading-[1.45] opacity-70",children:t})}function ax({hasFocus:t,armed:i,armedText:r}){return d.jsx("p",{className:"ml-auto text-[12.5px] text-subtle",children:t?i?r:"keys answer in a moment · click to answer now":"Click to answer, or press Shift+Tab to use the keys"})}function t_({args:t}){if(t===null||typeof t!="object")return null;const i=Object.entries(t);if(i.length===0)return null;const r=i.find(([c,f])=>(c==="command"||c==="cmd")&&typeof f=="string")?.[0],u=i.filter(([c])=>c!==r),o=c=>typeof c=="string"?c:JSON.stringify(c,null,2);return d.jsxs("div",{className:"mt-2.5 max-h-48 overflow-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:[r?d.jsx("pre",{className:"whitespace-pre-wrap break-all text-foreground",children:t[r]}):null,u.length>0?d.jsx("dl",{className:`text-muted-foreground ${r?"mt-1.5":""}`,children:u.map(([c,f])=>d.jsxs("div",{className:"flex gap-2",children:[d.jsxs("dt",{className:"flex-shrink-0 text-subtle",children:[c,":"]}),d.jsx("dd",{className:"min-w-0 whitespace-pre-wrap break-all",children:o(f)})]},c))}):null]})}function n_({command:t,cwd:i}){return d.jsxs("div",{className:"mt-2.5 max-h-48 overflow-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:[d.jsx("pre",{className:"whitespace-pre-wrap break-all text-foreground",children:t}),i&&d.jsxs("p",{className:"mt-1.5 text-muted-foreground",children:[d.jsx("span",{className:"text-subtle",children:"in "}),i]})]})}const uf=6e4,sf=60*uf,Lc=24*sf;function l_(t,i=Date.now()){const r=Date.parse(t);if(Number.isNaN(r))return"";const u=Math.max(0,i-r);return u<uf?"just now":u<sf?`${Math.floor(u/uf)}m ago`:u<Lc?`${Math.floor(u/sf)}h ago`:u<7*Lc?`${Math.floor(u/Lc)}d ago`:new Date(r).toISOString().slice(0,10)}function On(t){const i=t.name?.trim();if(i)return i;const r=t.title?.trim();return r||"New session"}function i_(t,i){if(t.clients===void 0)return null;const r=t.clients-(i?1:0);return r>=1?r:null}function r_({state:t,brand:i,className:r}){const u=t.sessionListing??null,o=u?.currentSessionId??null,c=u?.unreadableSessionIds??[],f=t.sessionsError?.code==="list_failed"?t.sessionsError.message:null,p=t.status==="connected",[g,m]=j.useState(null),[y,x]=j.useState(null),[S,v]=j.useState(""),[N,T]=j.useState(null),L=j.useRef(null),C=j.useRef(new Map);j.useEffect(()=>{if(g===null)return;const I=W=>{W.key==="Escape"&&m(null)},ue=W=>{L.current&&!L.current.contains(W.target)&&m(null)};return document.addEventListener("keydown",I),document.addEventListener("mousedown",ue),()=>{document.removeEventListener("keydown",I),document.removeEventListener("mousedown",ue)}},[g]),j.useEffect(()=>{g!==null&&L.current?.querySelector('[role="menuitem"]')?.focus()},[g]);const F=(I,ue,W)=>m({sessionId:I,x:ue,y:W}),U=I=>{m(null),x(I.id),v(On(I))},X=I=>{const ue=S.trim();x(null),!(ue.length===0||ue===On(I))&&(I.id===o?t.send({type:"command",name:"rename",args:ue}):t.renameSessionInList?.(I.id,ue))},ie=u?.sessions??[],R=ie.find(I=>I.id===N)??null;return d.jsxs("aside",{"aria-label":"Sessions",className:`agent-ui flex w-[272px] flex-shrink-0 flex-col overflow-hidden bg-sidebar ${r??""}`,children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-2 px-4",children:[i,d.jsx("button",{type:"button","aria-label":"Hide sessions",title:"Hide sessions",onClick:()=>t.setSessionSidebarOpen?.(!1),className:"ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(aC,{size:17,strokeWidth:1.75})})]}),d.jsx("div",{className:"flex-shrink-0 px-2.5 pt-1",children:d.jsxs("button",{type:"button",disabled:!p,title:p?void 0:"Reconnecting…",onClick:()=>t.newSession?.(),className:"flex w-full items-center gap-2.5 rounded-lg px-2.5 py-2 text-[14px] font-medium text-foreground hover:bg-hover disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-transparent",children:[d.jsx(Ay,{size:16,strokeWidth:1.75,className:"text-muted-foreground"}),"New session"]})}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-2.5 pb-3 pt-4",children:[d.jsx("h2",{className:"px-2.5 pb-1.5 text-[12.5px] font-medium text-subtle",children:"Sessions"}),f!==null?d.jsx("p",{className:"px-2.5 py-1 text-[13px] leading-snug text-destructive",children:f}):null,u===null&&f===null?d.jsx("p",{className:"px-2.5 py-1 text-[13px] text-subtle",children:"Loading sessions…"}):null,d.jsxs("ul",{className:"space-y-px",children:[ie.map(I=>{const ue=I.id===o,W=i_(I,ue),O=y===I.id,ne=[I.live===!0?"Live":null,W!==null?`${W} ${W===1?"other":"others"}`:null].filter(P=>P!==null),re=`session-status-${I.id}`,ge=`session-updated-${I.id}`,oe=ne.length>0?`${ge} ${re}`:ge;return d.jsxs("li",{className:"group relative",children:[O?d.jsx("input",{autoFocus:!0,"aria-label":`Rename ${On(I)}`,value:S,onChange:P=>v(P.target.value),onBlur:()=>X(I),onKeyDown:P=>{P.key==="Enter"?(P.preventDefault(),X(I)):P.key==="Escape"&&(P.preventDefault(),x(null))},className:"w-full rounded-lg border border-accent bg-raised px-2.5 py-2 text-[14px] text-foreground outline-none"}):d.jsxs("button",{type:"button","aria-current":ue?"true":void 0,"aria-label":On(I),"aria-describedby":oe,title:p?I.preview||I.id:"Reconnecting…",disabled:!p,onClick:()=>{ue||t.switchSession?.(I.id)},onContextMenu:P=>{P.preventDefault(),F(I.id,P.clientX,P.clientY)},className:`w-full rounded-lg py-2 pl-2.5 pr-8 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-60 ${ue?"bg-raised":"hover:bg-hover"}`,children:[d.jsx("span",{className:`block truncate text-[14px] leading-snug ${ue?"font-medium text-foreground":"text-foreground/85"}`,children:On(I)}),d.jsxs("span",{className:"mt-0.5 flex items-center gap-1.5 text-[12.5px] tabular-nums text-subtle",children:[I.live===!0?d.jsx("span",{title:"Live in the host",className:"h-1.5 w-1.5 flex-shrink-0 rounded-full bg-accent",children:d.jsx("span",{className:"sr-only",children:"live"})}):null,d.jsx("span",{id:ge,children:l_(I.updatedAt)}),W!==null?d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":"true",children:"·"}),d.jsxs("span",{className:"text-muted-foreground",children:[W," ",W===1?"other":"others"]})]}):null,ne.length>0?d.jsx("span",{id:re,className:"sr-only",children:ne.join(", ")}):null]})]}),O?null:d.jsx("button",{type:"button",ref:P=>{P?C.current.set(I.id,P):C.current.delete(I.id)},"aria-label":`More for ${On(I)}`,"aria-haspopup":"menu","aria-expanded":g?.sessionId===I.id,onClick:P=>{const D=P.currentTarget.getBoundingClientRect();F(I.id,D.left,D.bottom)},className:"absolute right-1 top-1/2 -translate-y-1/2 rounded-md p-1 text-muted-foreground opacity-0 hover:bg-hover hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100",children:d.jsx(FN,{size:15,strokeWidth:1.75})})]},I.id)}),c.length>0&&d.jsx("li",{children:d.jsxs("details",{className:"px-2.5 py-2 text-[12.5px] text-subtle",children:[d.jsxs("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground",children:[c.length," older ",c.length===1?"session":"sessions"," in this folder can't be opened"]}),d.jsx("ul",{className:"mt-1.5 space-y-0.5 font-mono text-[11.5px]",children:c.map(I=>d.jsx("li",{className:"truncate",children:I},I))})]})})]})]}),d.jsx("div",{className:"flex-shrink-0 border-t border-border/60 px-2.5 py-2",children:d.jsxs("button",{type:"button","aria-label":"Settings",title:"Settings",onClick:()=>t.openSettings(),className:"flex w-full items-center gap-2.5 rounded-lg px-2.5 py-2 text-[13.5px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(Ty,{size:16,strokeWidth:1.75}),"Settings"]})}),g!==null?(()=>{const I=ie.find(ue=>ue.id===g.sessionId);return I?d.jsxs("div",{ref:L,role:"menu","aria-label":`Actions for ${On(I)}`,style:{position:"fixed",left:g.x,top:g.y},className:"gui-rise z-40 min-w-[140px] overflow-hidden rounded-lg bg-popover py-1 text-popover-foreground shadow-xl shadow-black/30",children:[d.jsxs("button",{type:"button",role:"menuitem",onClick:()=>U(I),className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-[13.5px] hover:bg-hover",children:[d.jsx(_y,{size:14,strokeWidth:1.75}),"Rename"]}),d.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{m(null),T(I.id)},className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-[13.5px] text-destructive hover:bg-hover",children:[d.jsx(Of,{size:14,strokeWidth:1.75}),"Delete…"]})]}):null})():null,R!==null?d.jsx(Rl,{open:!0,title:`Delete "${On(R)}"?`,body:"This removes its conversation from this computer.",confirmLabel:"Delete",destructive:!0,restoreFocusTo:C.current.get(R.id)??null,onCancel:()=>T(null),onConfirm:()=>{t.deleteSession?.(R.id),T(null)}}):null]})}function a_({state:t}){const i=t.status==="connected";return d.jsxs("div",{className:"flex w-12 flex-shrink-0 flex-col items-center gap-1 bg-sidebar py-2.5",children:[d.jsx("button",{type:"button","aria-label":"Show sessions",title:"Show sessions",onClick:()=>t.setSessionSidebarOpen?.(!0),className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(sC,{size:17,strokeWidth:1.75})}),d.jsx("button",{type:"button","aria-label":"New session",title:i?"New session":"Reconnecting…",disabled:!i,onClick:()=>t.newSession?.(),className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-transparent",children:d.jsx(Ay,{size:16,strokeWidth:1.75})}),d.jsx("button",{type:"button","aria-label":"Settings",title:"Settings",onClick:()=>t.openSettings(),className:"mt-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(Ty,{size:16,strokeWidth:1.75})})]})}const il=new Intl.NumberFormat("en-US"),u_=100,s_=["model","provider","surface","source"];function o_(t){return t==="activity"?"Activity":`By ${t}`}function c_(t){return t==="cli"?"Terminal":t==="remote"?"App or browser":t.split(/[-_]/).filter(i=>i.length>0).map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ")}function f_(t){return t.length===1&&t[0]?.key==="unknown"}function d_(t){return[...s_.filter(i=>!f_(Py(t,i))),"activity"]}const h_=new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"});function Jy(t,i,r){const u=t.sessionListing?.sessions.find(f=>f.id===r);if(u)return On(u);const o=i.sessionFirstSeen?.[r],c=o?new Date(o):void 0;return c&&!Number.isNaN(c.getTime())?`Session from ${h_.format(c)}`:"Another session"}function ti({label:t,value:i,note:r}){return d.jsxs("div",{className:"rounded-2xl bg-card p-5",children:[d.jsxs("div",{className:"flex items-baseline gap-1.5 text-[13px] text-muted-foreground",children:[t,r?d.jsxs("span",{className:"text-subtle",children:["· ",r]}):null]}),d.jsx("div",{className:"mt-1.5 text-[28px] font-semibold tabular-nums tracking-[-0.02em] text-foreground",children:i})]})}function Py(t,i){return i==="model"?t.byModel:i==="provider"?t.byProvider:i==="surface"?t.bySurface:i==="source"?t.bySource:[]}function p_({state:t,report:i,breakdown:r,setBreakdown:u}){const o=d_(i),c=o.includes(r)?r:o[0]??r;return d.jsxs("section",{className:"rounded-2xl bg-card p-5",children:[d.jsx(m_,{breakdown:c,setBreakdown:u,visible:o}),d.jsx("div",{className:"mt-4 space-y-3",children:c==="activity"?d.jsx(g_,{report:i}):d.jsx(x_,{state:t,report:i,breakdown:c,dimensions:Py(i,c)})})]})}function m_({breakdown:t,setBreakdown:i,visible:r}){return d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsx("h2",{className:"text-[15px] font-semibold",children:"Breakdown"}),d.jsx("div",{className:"flex flex-wrap gap-1",children:r.map(u=>d.jsx("button",{type:"button","aria-pressed":t===u,onClick:()=>i(u),className:`rounded-lg px-2.5 py-1 text-[13px] font-medium ${t===u?"bg-raised text-foreground":"text-muted-foreground hover:text-foreground"}`,children:o_(u)},u))})]})}function g_({report:t}){return d.jsx(d.Fragment,{children:t.byActivity.map(i=>d.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl bg-raised/60 px-3.5 py-2.5",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("span",{className:"truncate text-[14px] text-foreground",children:i.label})," ",d.jsx("span",{className:"ml-1 rounded-full bg-raised px-2 py-0.5 text-[11px] font-medium text-subtle",children:i.kind})]}),d.jsxs("span",{className:"text-[13px] tabular-nums text-muted-foreground",children:[il.format(i.count)," calls"]})]},i.key))})}function x_({state:t,report:i,breakdown:r,dimensions:u}){return d.jsx(d.Fragment,{children:u.map(o=>d.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-3",children:[d.jsx(y_,{report:i,breakdown:r,dimension:o}),d.jsxs("span",{className:"self-start text-[13px] tabular-nums text-subtle",children:[il.format(o.turns)," turns"]}),d.jsx(b_,{state:t,report:i,dimension:o})]},o.key))})}function y_({report:t,breakdown:i,dimension:r}){const u=t.totals.totalTokens===0?0:r.totalTokens/t.totals.totalTokens*u_;return d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex justify-between gap-3 text-[14px]",children:[d.jsx("span",{className:"truncate text-foreground",children:i==="surface"?c_(r.key):r.label}),d.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[il.format(r.totalTokens)," tokens"]})]}),d.jsx("div",{className:"mt-2 h-1.5 overflow-hidden rounded-full bg-raised",children:d.jsx("div",{className:"h-full rounded-full bg-accent/80",style:{width:`${u}%`}})})]})}function b_({state:t,report:i,dimension:r}){return d.jsx("div",{className:"col-span-2 flex flex-wrap gap-1",children:r.sessionIds.map(u=>{const o=Jy(t,i,u);return d.jsx("button",{type:"button","data-session-id":u,onClick:()=>t.requestStoredSessionUsage(u),"aria-label":`Open session ${o}`,className:"rounded-md bg-raised px-2 py-1 text-[12px] text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx("span",{className:"max-w-40 truncate align-middle",children:o})},u)})})}function v_({state:t}){if(t.storedSessionUsageStatus==="idle")return null;const i=t.storedSessionUsageSessionId??"";return d.jsxs("section",{className:"rounded-2xl bg-card p-5","aria-label":"Session usage detail","data-session-id":i,children:[d.jsx("h2",{className:"text-[15px] font-semibold",children:t.personalUsageReport?Jy(t,t.personalUsageReport,i):"Another session"}),d.jsx(S_,{state:t})]})}function S_({state:t}){if(t.storedSessionUsageStatus==="loading")return d.jsx("p",{className:"mt-3 text-[14px] text-muted-foreground",children:"Loading trace…"});if(t.storedSessionUsageStatus==="error")return d.jsx("p",{className:"mt-3 text-[14px] text-destructive",children:t.storedSessionUsageError??"Session usage failed."});const i=t.storedSessionUsageReport;return i?d.jsxs("div",{className:"mt-3 grid gap-3 sm:grid-cols-3",children:[d.jsx(ti,{label:"Session tokens",value:il.format(i.totalTokens)}),d.jsx(ti,{label:"Sources",value:il.format(i.bySource.length)}),d.jsx(ti,{label:"Trace turns",value:il.format(i.timeline.length)})]}):null}function k_(t){const{coverage:i}=t,r=[];if(i.unsupportedSessions>0){const u=i.unsupportedSessions===1?"session":"sessions",o=i.unsupportedSessions===1?"uses":"use";r.push(`${il.format(i.unsupportedSessions)} older ${u} ${o} a format this view can't read and ${i.unsupportedSessions===1?"isn't":"aren't"} counted.`)}if(i.corruptSessions>0){const u=i.corruptSessions===1?"session":"sessions";r.push(`${il.format(i.corruptSessions)} ${u} couldn't be read and ${i.corruptSessions===1?"isn't":"aren't"} counted.`)}if(i.legacyObservations>0){const u=i.legacyObservations===1?"record":"records";r.push(`${il.format(i.legacyObservations)} older usage ${u} ${i.legacyObservations===1?"doesn't":"don't"} have enough detail to break down, so ${i.legacyObservations===1?"it counts":"they count"} only toward the totals.`)}return r}function w_({report:t}){const i=k_(t);return i.length===0?null:d.jsx("div",{className:"space-y-1.5 rounded-xl bg-warning/10 px-4 py-3 text-[13px] leading-relaxed text-warning",children:i.map(r=>d.jsx("p",{children:r},r))})}const li=new Intl.NumberFormat("en-US"),j_=100,ux=2,N_=5,C_=2;function Uc({children:t}){return d.jsx("div",{className:"flex min-h-64 items-center justify-center rounded-2xl bg-card px-8 text-center text-[15px] text-muted-foreground",children:t})}function E_({period:t,setPeriod:i,requestCurrentSessionUsage:r}){return d.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[13px] font-medium text-accent",children:"Local analytics"}),d.jsx("h1",{className:"mt-1 text-[28px] font-semibold tracking-[-0.02em]",children:"Personal usage"}),d.jsx("p",{className:"mt-1 text-[15px] text-muted-foreground",children:"Cross-session activity grouped by local calendar day."})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("button",{type:"button",onClick:r,className:"rounded-lg bg-raised px-3 py-2 text-[13px] font-medium text-foreground hover:bg-hover",children:"Current session trace"}),d.jsx(__,{period:t,setPeriod:i})]})]})}function __({period:t,setPeriod:i}){return d.jsx("div",{className:"flex rounded-lg bg-raised p-0.5",children:["7d","30d"].map(r=>d.jsx("button",{type:"button","aria-pressed":t===r,onClick:()=>i(r),className:`rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors ${t===r?"bg-card text-foreground shadow-sm shadow-black/25":"text-muted-foreground hover:text-foreground"}`,children:r==="7d"?"7 days":"30 days"},r))})}function T_({state:t}){if(t.currentSessionUsageStatus==="idle")return null;let i=null;if(t.currentSessionUsageStatus==="loading")i=d.jsx("p",{className:"mt-3 text-[14px] text-muted-foreground",children:"Loading trace…"});else if(t.currentSessionUsageStatus==="error")i=d.jsx("p",{className:"mt-3 text-[14px] text-destructive",children:"Current trace unavailable."});else if(t.currentSessionUsageReport){const r=t.currentSessionUsageReport.timeline.length;i=d.jsxs("p",{className:"mt-3 text-[14px] tabular-nums text-muted-foreground",children:["This session: ",li.format(t.currentSessionUsageReport.totalTokens)," tokens",r>0?` · ${li.format(r)} turns`:""]})}return d.jsxs("section",{className:"rounded-2xl bg-card p-5","aria-label":"Current session usage",children:[d.jsx("h2",{className:"text-[15px] font-semibold",children:"Current session trace"}),i]})}function A_(t){if(t.totals.costStatus==="unknown")return null;const i=t.totals.unpricedTurns??0;if(i===0)return null;const r=i===1?"turn":"turns",u=i===1?"is":"are";return`${li.format(i)} ${r} without a price ${u} not included.`}function z_({report:t}){const i=t.totals.costStatus==="unknown"?"Unknown":`$${t.totals.costUsd.toFixed(C_)}`,r=A_(t);return d.jsxs("section",{"aria-label":"Usage totals",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[d.jsx(ti,{label:"Turns",value:li.format(t.totals.turns)}),d.jsx(ti,{label:"Sessions",value:li.format(t.totals.sessions)}),d.jsx(ti,{label:"Tokens",value:li.format(t.totals.totalTokens)}),d.jsx(ti,{label:"Cost",value:i,...t.totals.costStatus==="estimated"?{note:"estimated"}:{}})]}),r?d.jsx("p",{className:"mt-2 text-[13px] text-subtle",children:r}):null]})}function D_({report:t}){const i=t.daily.reduce((r,u)=>Math.max(r,u.totals.totalTokens),0);return d.jsxs("section",{className:"rounded-2xl bg-card p-5",children:[d.jsx(R_,{report:t}),d.jsx("div",{className:"mt-5 flex h-44 items-end gap-1.5",role:"img","aria-label":"Daily token usage chart",children:t.daily.map(r=>d.jsxs("div",{className:"group flex min-w-0 flex-1 flex-col items-center justify-end gap-2",children:[d.jsx("div",{className:"relative flex h-32 w-full items-end",children:d.jsx("div",{className:"mx-auto w-full max-w-10 rounded-md bg-accent/75 transition-colors group-hover:bg-accent",style:{height:`${i===0?ux:Math.max(ux,r.totals.totalTokens/i*j_)}%`},title:`${r.date}: ${li.format(r.totals.totalTokens)} tokens`})}),d.jsx("span",{className:"truncate text-[12px] tabular-nums text-subtle",children:r.date.slice(N_)})]},r.date))})]})}function R_({report:t}){return d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-[15px] font-semibold",children:"Daily usage"}),d.jsxs("p",{className:"mt-0.5 text-[13px] text-muted-foreground",children:[t.interval.startDate," → ",t.interval.endDate," · ",t.timezone]})]}),t.daily.at(-1)?.partial?d.jsx("span",{className:"rounded-full bg-warning/15 px-2.5 py-1 text-[12px] font-medium text-warning",children:"Partial day"}):null]})}function M_({state:t,breakdown:i,setBreakdown:r}){const u=t.personalUsageReport;return t.personalUsageStatus==="loading"&&!u?d.jsx(Uc,{children:"Loading local usage…"}):t.personalUsageStatus==="error"?d.jsx(Uc,{children:t.personalUsageError??"Usage report failed."}):!u||O_(u)?d.jsx(Uc,{children:"No recorded usage in this period."}):d.jsxs(d.Fragment,{children:[d.jsx(z_,{report:u}),d.jsx(D_,{report:u}),d.jsx(p_,{state:t,report:u,breakdown:i,setBreakdown:r}),d.jsx(v_,{state:t}),d.jsx(w_,{report:u})]})}function O_(t){return t.totals.sessions===0&&t.totals.totalTokens===0&&t.byActivity.length===0}function L_({state:t}){const[i,r]=j.useState("7d"),[u,o]=j.useState("model");return j.useEffect(()=>{t.requestPersonalUsage(i)},[i,t.requestPersonalUsage]),d.jsx("main",{className:"agent-ui gui-rise h-full overflow-y-auto p-5 md:p-7","aria-label":"Personal usage",children:d.jsxs("div",{className:"mx-auto flex max-w-6xl flex-col gap-5",children:[d.jsx(E_,{period:i,setPeriod:r,requestCurrentSessionUsage:t.requestCurrentSessionUsage}),d.jsx(T_,{state:t}),d.jsx(M_,{state:t,breakdown:u,setBreakdown:o})]})})}function Bf({size:t=20}){return d.jsxs("svg",{width:t,height:t,viewBox:"0 0 20 20","aria-hidden":"true",className:"flex-shrink-0",children:[d.jsx("rect",{x:"1",y:"2.5",width:"18",height:"15",rx:"5.5",className:"fill-accent"}),d.jsx("circle",{cx:"7.2",cy:"10",r:"1.7",className:"fill-accent-foreground"}),d.jsx("circle",{cx:"12.8",cy:"10",r:"1.7",className:"fill-accent-foreground"})]})}function Hf({surface:t}){const{identity:i}=ai();return d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx(Bf,{}),d.jsx("span",{className:"text-[15px] font-semibold tracking-[-0.01em] text-foreground",children:i.displayName}),t?d.jsx("span",{className:"rounded-md bg-raised px-1.5 py-px text-[11px] font-medium text-muted-foreground",children:t}):null]})}const U_=200;function Wy(t,i){if(!t||!i.startsWith("/")||/\s/u.test(i))return null;const r=i.slice(1).toLowerCase(),u=t.commands.filter(f=>!My(f)).map(f=>({name:f.name,description:f.description,kind:"command"})),o=t.skills.filter(f=>f.userInvocable).map(f=>({name:f.name,description:f.description,kind:"skill"})),c=[...sx(u,r),...sx(o,r)].slice(0,U_);return c.length>0?c:null}function sx(t,i){const r=t.filter(o=>o.name.toLowerCase().startsWith(i)),u=t.filter(o=>!o.name.toLowerCase().startsWith(i)&&o.name.toLowerCase().includes(i));return[...r.sort(ox),...u.sort(ox)]}function ox(t,i){return t.name.localeCompare(i.name)}const q_=64*1024,B_=256*1024,cx="Only files inside this project folder can be attached.",H_="You can attach up to 8 files to one message.",I_="Images and other non-text files can't be attached yet.";function fx(t){return t.replaceAll("\\","/")}function dx(t){const i=t.startsWith("/"),r=[];for(const u of t.split("/"))if(!(u===""||u===".")){if(u===".."){r.length>0&&r[r.length-1]!==".."?r.pop():i||r.push("..");continue}r.push(u)}return(i?"/":"")+r.join("/")}function Y_(t,i){if(!t)return null;const r=dx(fx(t));if(!r||r==="/")return null;const u=dx(fx(i));if(u===r)return null;const o=`${r}/`;if(!u.startsWith(o))return null;const c=u.slice(o.length);return c||null}function G_(t){return/^text\//.test(t)||/[+/](?:json|xml)$/.test(t)}const V_=new Set(["png","jpg","jpeg","gif","webp","bmp","ico","tiff","heic","pdf","zip","tar","gz","tgz","7z","rar","exe","dll","so","dylib","bin","class","wasm","woff","woff2","ttf","otf","eot","mp3","mp4","mov","avi","wav","ogg","flac","m4a"]);function F_(t,i){if(i)return!G_(i);const r=t.lastIndexOf(".");return r<0?!1:V_.has(t.slice(r+1).toLowerCase())}const X_=/[\s)\]}>,;"'`]/u,$_=/[.,:;!?]$/u;function hx(t){return t>=1024?`${Math.round(t/1024)} KB`:`${t} B`}function Q_(){const t=typeof crypto<"u"?crypto:void 0;return t?.randomUUID?t.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}function Z_(t,i,r,u){if(u>=8)return{kind:"rejected",message:H_};if(!t.absolutePath)return{kind:"rejected",message:cx};const o=Y_(i,t.absolutePath);return o===null?{kind:"rejected",message:cx}:X_.test(o)||$_.test(o)?{kind:"rejected",message:`"${t.name}" has a character (such as a space, or a period/punctuation mark at the end) the @file syntax can't carry — rename it to attach it.`}:F_(t.name,t.mimeType)?{kind:"rejected",message:I_}:t.size>65536?{kind:"rejected",message:`${t.name} is larger than ${hx(q_)} and cannot be attached.`}:r+t.size>262144?{kind:"rejected",message:`Attachments cannot total more than ${hx(B_)}.`}:{kind:"attached",attachment:{id:Q_(),name:t.name,relativePath:o,size:t.size}}}function K_(t,i){if(i.length===0)return t;const r=i.map(u=>`@./${u.relativePath}`).join(" ");return t?`${t}
|
|
307
|
-
|
|
308
|
-
${r}`:r}function e1({label:t,sections:i,onClose:r,triggerRef:u}){const o=i.flatMap(v=>v.items),c=j.useId(),f=j.useRef(null),p=j.useRef([]),[g,m]=j.useState(()=>{const v=o.findIndex(N=>N.checked);return v>=0?v:0}),y=v=>{r(),v&&u.current?.focus()};j.useEffect(()=>{p.current[g]?.focus()},[g]),j.useEffect(()=>{const v=N=>{const T=N.target;f.current?.contains(T)||u.current?.contains(T)||y(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);const x=v=>{if(v.key==="Escape"){v.preventDefault(),y(!0);return}if(v.key==="ArrowDown"||v.key==="ArrowUp"){if(v.preventDefault(),o.length===0)return;const N=v.key==="ArrowDown"?1:-1;m(T=>(T+N+o.length)%o.length);return}if(v.key==="Enter"||v.key===" "){v.preventDefault();const N=o[g];N&&(N.onSelect(),y(!0))}};let S=-1;return d.jsx("div",{ref:f,role:"menu","aria-label":t,onKeyDown:x,className:"gui-rise absolute bottom-full z-30 mb-2 max-h-[360px] w-64 overflow-y-auto rounded-2xl bg-popover p-1.5 shadow-2xl shadow-black/35 focus:outline-none",children:i.map((v,N)=>d.jsxs("div",{role:"group","aria-label":v.heading,children:[v.heading?d.jsx("div",{role:"presentation",className:"px-3 pb-1 pt-2 text-[11px] font-medium uppercase tracking-wide text-subtle",children:v.heading}):null,v.items.map(T=>{S+=1;const L=S,C=T.kind==="action",F=T.description?`${c}-desc-${T.key}`:void 0;return d.jsxs("button",{ref:U=>{p.current[L]=U},type:"button",role:C?"menuitem":"menuitemradio","aria-checked":C?void 0:T.checked===!0,"aria-label":T.label,"aria-describedby":F,tabIndex:L===g?0:-1,onFocus:()=>m(L),onClick:()=>{T.onSelect(),y(!0)},className:`flex w-full items-start gap-2 rounded-xl px-3 py-2 text-left text-[13.5px] ${T.destructive?"text-destructive hover:bg-destructive/10":"text-foreground hover:bg-hover"} ${L===g?"bg-hover":""}`,children:[C?null:d.jsx("span",{className:"mt-0.5 flex h-4 w-4 flex-shrink-0 items-center justify-center",children:T.checked?d.jsx(ua,{size:14,strokeWidth:2.25,"aria-hidden":"true"}):null}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate",children:T.label}),T.description?d.jsx("span",{id:F,className:"block truncate text-[12px] text-muted-foreground",children:T.description}):null]})]},T.key)})]},v.heading??N))})}const qc={auto:"Auto",none:"None",minimal:"Minimal",low:"Low",medium:"Medium",high:"High",xhigh:"Extra high",max:"Maximum"},J_=["auto","low","medium","high"],P_=["none","minimal","xhigh","max"];function t1(t){return t?.commands.find(i=>i.name==="mode")?.subcommands??[]}function W_(t,i){return t1(t).find(r=>r.name===i)?.displayName??i}const e3="flex min-w-0 items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-transparent",t3="text-warning hover:text-warning";function Bc({chipLabel:t,value:i,icon:r,connected:u,warning:o=!1,menuLabel:c,sections:f,onOpen:p}){const[g,m]=j.useState(!1),y=j.useRef(null);return d.jsxs("span",{className:"relative",children:[d.jsxs("button",{ref:y,type:"button","aria-label":`${t}: ${i}`,"aria-haspopup":"menu","aria-expanded":g,title:u?`${t}: ${i}`:"Reconnecting…",disabled:!u,onClick:()=>{p?.(),m(!0)},className:`${e3} ${o?t3:""}`,children:[r,d.jsx("span",{className:"hidden truncate md:inline",children:i})]}),g?d.jsx(e1,{label:c,sections:f,triggerRef:y,onClose:()=>m(!1)}):null]})}const Hc={size:14,strokeWidth:1.75,"aria-hidden":!0};function n3({status:t,catalog:i,modelList:r,onRequestModelList:u,onManageProviders:o,onSilentCommand:c,connected:f}){const p=t?Math.round(t.context.usedPercentage):null,[g,m]=j.useState(!1),y=[...(r?.groups??[]).map(v=>({heading:v.providerLabel,items:v.models.map(N=>({key:N.id,label:N.label,checked:N.id===r?.currentModel&&v.profileName===r?.currentProfile,onSelect:()=>c("model",N.id)}))})),{items:[{key:"manage-providers",label:"Manage providers…",kind:"action",onSelect:o}]}],x=[{items:t1(i).map(v=>({key:v.name,label:v.displayName??v.name,description:v.description,checked:v.name===t?.permissionMode,onSelect:v.name==="bypassPermissions"?()=>m(!0):()=>c("mode",v.name)}))}],S=[{items:J_.map(v=>({key:v,label:qc[v],checked:v===t?.effort,onSelect:()=>c("effort",v)}))},{heading:"More",items:P_.map(v=>({key:v,label:qc[v],checked:v===t?.effort,onSelect:()=>c("effort",v)}))}];return d.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-0.5",children:[t?d.jsxs(d.Fragment,{children:[d.jsx(Bc,{chipLabel:"mode",value:W_(i,t.permissionMode),icon:d.jsx(SC,{...Hc}),connected:f,warning:t.permissionMode==="bypassPermissions",menuLabel:"Mode",sections:x}),d.jsx("span",{className:"ml-auto"}),d.jsx(Bc,{chipLabel:"model",value:t.model,icon:d.jsx(wC,{...Hc}),connected:f,menuLabel:"Model",sections:y,onOpen:u}),d.jsx(Bc,{chipLabel:"effort",value:qc[t.effort],icon:d.jsx(JN,{...Hc}),connected:f,menuLabel:"Effort",sections:S})]}):d.jsx("span",{className:"ml-auto px-2 text-[13px] text-subtle",children:"…"}),d.jsxs("span",{className:"flex items-center gap-1.5 px-1.5 text-[12.5px] tabular-nums text-subtle",title:"Context used","aria-label":`context ${p??0}% used`,children:[d.jsx(l3,{percent:p??0}),p===null?"":`${p}%`]}),d.jsx(Rl,{open:g,title:"Skip all permission checks?",body:"Every action runs without asking first — file edits, shell commands and network access included. You can turn this back on at any time.",confirmLabel:"Skip all checks",destructive:!0,onCancel:()=>m(!1),onConfirm:()=>{m(!1),c("mode","bypassPermissions")}})]})}function l3({percent:t}){const r=2*Math.PI*5,u=Math.min(100,Math.max(0,t))/100;return d.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:[d.jsx("circle",{cx:"7",cy:"7",r:5,className:"fill-none stroke-raised",strokeWidth:"2"}),d.jsx("circle",{cx:"7",cy:"7",r:5,className:`fill-none ${t>=80?"stroke-warning":"stroke-muted-foreground"}`,strokeWidth:"2",strokeDasharray:`${r*u} ${r}`,transform:"rotate(-90 7 7)"})]})}const Lu={text:"",attachments:[]},i3=new Set(["settings","resume","help"]);function px(t){return t.kind==="command"&&i3.has(t.name)}function Ic(t){return t.kind==="skill"?"Skills":"Commands"}function n1(t,i){return i?`${t}.draft.${i}`:`${t}.draft`}function r3(t){if(!t||typeof t!="object")return!1;const i=t;return typeof i.id=="string"&&typeof i.name=="string"&&typeof i.relativePath=="string"&&typeof i.size=="number"}function a3(t){if(!t)return Lu;try{const i=JSON.parse(t);if(i&&typeof i=="object"&&typeof i.text=="string"){const r=i.attachments;return{text:i.text,attachments:Array.isArray(r)?r.filter(r3):[]}}}catch{}return{text:t,attachments:[]}}function mx(t,i){try{return a3(window.localStorage.getItem(n1(t,i)))}catch{return Lu}}function Eu(t,i,r){try{const u=n1(t,i);!r.text&&r.attachments.length===0?window.localStorage.removeItem(u):window.localStorage.setItem(u,JSON.stringify(r))}catch{}}const u3=j.forwardRef(function({onSubmit:i,onCommand:r,catalog:u,status:o,connected:c=!0,running:f,onStop:p,queued:g,onCancelQueue:m,pickFiles:y,getPathForFile:x,modelList:S=null,onRequestModelList:v=()=>{},onSilentCommand:N=r,onManageProviders:T=()=>r("provider")},L){const{identity:C,storage:{browserNamespace:F}}=ai(),U=j.useRef(null);j.useImperativeHandle(L,()=>({focus:()=>U.current?.focus()}),[]);const X=o?.sessionId,ie=j.useRef(X),R=j.useRef(X!==void 0),I=j.useRef(Lu),[ue,W]=j.useState(()=>{const ee=mx(F,X);return I.current=ee,ee.text}),[O,ne]=j.useState(()=>I.current.attachments),[re,ge]=j.useState(null),[oe,P]=j.useState(0),[D,Q]=j.useState(!1),se=D||!c?null:Wy(u,ue);j.useEffect(()=>{P(0),Q(!1)},[ue]);const me=j.useRef([]);j.useEffect(()=>{me.current[oe]?.scrollIntoView?.({block:"nearest"})},[oe,se]);const _=ee=>{I.current={...I.current,text:ee},W(ee),Eu(F,ie.current,I.current)},E=ee=>{const He=typeof ee=="function"?ee(I.current.attachments):ee;I.current={...I.current,attachments:He},ne(He),Eu(F,ie.current,I.current)};j.useEffect(()=>{if(X===void 0&&R.current||ie.current===X)return;const ee=!R.current,He=ie.current;ie.current=X,X!==void 0&&(R.current=!0);const Le=mx(F,X),rn=Le.text!==""||Le.attachments.length>0,V=I.current.text!==""||I.current.attachments.length>0;if(ee&&!rn&&V){Eu(F,X,I.current),Eu(F,He,Lu);return}I.current=Le,W(Le.text),ne(Le.attachments),ge(null)},[F,X]);const H=()=>{if(!c)return;const ee=ue.trim();!ee&&O.length===0||(i(K_(ee,O)),_(""),E([]),ge(null))},w=o?.workspace?.path,ae=O.reduce((ee,He)=>ee+He.size,0),fe=ee=>{if(ee.length===0)return;let He=ae,Le=O.length;const rn=[];let V=null;for(const le of ee){const xe=Z_(le,w,He,Le);xe.kind==="attached"?(rn.push(xe.attachment),He+=xe.attachment.size,Le+=1):V=xe.message}rn.length>0&&E(le=>[...le,...rn]),ge(V)},he=ee=>{E(He=>He.filter(Le=>Le.id!==ee))},we=ee=>({name:ee.name,size:ee.size,mimeType:ee.type||void 0,absolutePath:x&&x(ee)||void 0}),Ye=j.useRef(null),be=()=>{if(c){if(y){y().then(ee=>fe(ee.map(He=>({name:He.name,size:He.size,absolutePath:He.path})))).catch(()=>ge("Could not open the file picker. Try again."));return}Ye.current?.click()}},xt=ee=>{const He=Array.from(ee.target.files??[]);ee.target.value="",fe(He.map(we))},jt=j.useRef(0),[jn,Nn]=j.useState(!1),At=ee=>Array.from(ee.dataTransfer?.types??[]).includes("Files"),nn=ee=>{!c||!At(ee)||(ee.preventDefault(),jt.current+=1,Nn(!0))},Cn=ee=>{!c||!At(ee)||ee.preventDefault()},Un=()=>{jt.current=Math.max(0,jt.current-1),jt.current===0&&Nn(!1)},al=ee=>{!c||!At(ee)||(ee.preventDefault(),jt.current=0,Nn(!1),fe(Array.from(ee.dataTransfer?.files??[]).map(we)))},ln=ee=>{if(px(ee)){_(""),r(ee.name);return}_(`/${ee.name} `)},En=()=>{const ee=se?.[oe];return!ee||!px(ee)&&ue===`/${ee.name}`?!1:(ln(ee),!0)},_n=()=>{g&&(_(g.text),m())};return d.jsxs("div",{className:"relative flex-shrink-0",onDragEnter:nn,onDragOver:Cn,onDragLeave:Un,onDrop:al,children:[d.jsx("p",{id:"composer-attach-hint",className:"sr-only",children:"Drag files here, or use Attach files, to add them to your message."}),jn&&d.jsx("div",{role:"status","aria-live":"polite",className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center rounded-[22px] border-2 border-dashed border-accent bg-accent/10 text-[14px] font-medium text-accent",children:"Drop to attach"}),g&&d.jsxs("div",{role:"status","aria-label":"queued prompt",className:"gui-rise mb-2 flex items-center gap-3 rounded-2xl bg-card px-4 py-2 text-[13px]",children:[d.jsxs("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:["Queued: ",g.text,g.count>1&&d.jsxs("span",{className:"text-subtle",children:[" and ",g.count-1," more"]})]}),g.count===1?d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:_n,className:"flex-shrink-0 rounded-lg px-2 py-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:"Edit"}),d.jsx("button",{type:"button",onClick:m,className:"flex-shrink-0 rounded-lg px-2 py-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:"Remove"})]}):d.jsx("button",{type:"button",onClick:m,className:"flex-shrink-0 rounded-lg px-2 py-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:"Remove all"})]}),se&&d.jsx("div",{role:"listbox","aria-label":"commands",className:"gui-rise absolute bottom-full left-0 right-0 mb-2 max-h-[320px] overflow-y-auto rounded-2xl bg-popover p-1.5 shadow-2xl shadow-black/35",children:se.map((ee,He)=>d.jsxs("div",{children:[(He===0||Ic(se[He-1])!==Ic(ee))&&d.jsx("div",{role:"presentation",className:"px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wide text-subtle first:pt-1",children:Ic(ee)}),d.jsxs("button",{ref:Le=>{me.current[He]=Le},type:"button",role:"option","aria-selected":He===oe,onMouseEnter:()=>P(He),onMouseDown:Le=>{Le.preventDefault(),ln(ee)},className:`flex w-full items-baseline gap-3 rounded-xl px-3 py-2 text-left text-[14px] ${He===oe?"bg-hover":""}`,children:[d.jsxs("span",{className:"flex-shrink-0 font-mono text-[13.5px] text-foreground",children:["/",ee.name]}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:ee.description})]})]},`${ee.kind}:${ee.name}`))}),d.jsxs("form",{className:"rounded-[22px] bg-card px-2.5 pb-2 pt-2.5 shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] transition-shadow focus-within:ring-2 focus-within:ring-ring",onSubmit:ee=>{ee.preventDefault(),H()},children:[O.length>0&&d.jsx("ul",{"aria-label":"attachments",className:"mb-1.5 flex flex-wrap gap-1.5 px-1 pt-0.5",children:O.map(ee=>d.jsxs("li",{title:ee.relativePath,className:"flex max-w-full items-center gap-1.5 rounded-lg bg-raised px-2 py-1 text-[12.5px] text-muted-foreground",children:[d.jsx(Hg,{size:12,strokeWidth:1.75,"aria-hidden":"true",className:"flex-shrink-0"}),d.jsx("span",{className:"max-w-[180px] truncate",children:ee.name}),d.jsx("button",{type:"button","aria-label":`Remove ${ee.name}`,onClick:()=>he(ee.id),className:"flex-shrink-0 rounded-full p-0.5 hover:bg-hover hover:text-foreground",children:d.jsx(er,{size:12,strokeWidth:2,"aria-hidden":"true"})})]},ee.id))}),re&&d.jsx("p",{role:"status","aria-live":"polite",className:"mb-1.5 px-1.5 text-[12.5px] text-muted-foreground",children:re}),d.jsx("input",{ref:Ye,type:"file",multiple:!0,onChange:xt,className:"sr-only",tabIndex:-1,"aria-hidden":"true"}),d.jsx("textarea",{ref:U,"aria-label":"message","aria-describedby":"composer-attach-hint",rows:1,value:ue,onChange:ee=>_(ee.target.value),onKeyDown:ee=>{if(!(ee.key==="Enter"&&(ee.nativeEvent.isComposing||ee.keyCode===229))){if(se){if(ee.key==="ArrowDown"||ee.key==="ArrowUp"){ee.preventDefault();const He=ee.key==="ArrowDown"?1:-1;P(Le=>(Le+He+se.length)%se.length);return}if(ee.key==="Escape"){ee.preventDefault(),Q(!0);return}if((ee.key==="Tab"||ee.key==="Enter"&&!ee.shiftKey)&&En()){ee.preventDefault();return}}if(ee.key==="Escape"&&f&&c){ee.preventDefault(),p();return}ee.key==="Enter"&&!ee.shiftKey&&(ee.preventDefault(),H())}},placeholder:`Ask ${C.displayName} anything — type / for commands`,className:"block max-h-[220px] min-h-[48px] w-full resize-none bg-transparent px-2 py-1 text-[15px] leading-relaxed text-foreground [field-sizing:content] focus:outline-none"}),d.jsxs("div",{className:"mt-1 flex items-center gap-1",children:[d.jsx("button",{type:"button","aria-label":"Attach files",title:c?"Attach files":"Reconnecting…",disabled:!c,onClick:be,className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full text-muted-foreground hover:bg-hover hover:text-foreground disabled:text-subtle disabled:hover:bg-transparent",children:d.jsx(Hg,{size:16,strokeWidth:1.75,"aria-hidden":"true"})}),d.jsx(n3,{status:o,catalog:u,modelList:S,onRequestModelList:v,onManageProviders:T,onSilentCommand:N,connected:c}),d.jsxs("button",{type:f?"button":"submit",onClick:f?p:void 0,disabled:!c||!f&&!ue.trim()&&O.length===0,"aria-description":c?void 0:"Not connected",className:"ml-1 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground transition-all hover:opacity-85 disabled:bg-raised disabled:text-subtle",children:[f?d.jsx(Mf,{size:13,strokeWidth:2,fill:"currentColor","aria-hidden":"true"}):d.jsx(TN,{size:17,strokeWidth:2.25,"aria-hidden":"true"}),d.jsx("span",{className:"sr-only",children:f?"Stop":"Send"})]})]})]})]})});function s3({status:t,onStop:i}){const r=t?.goal;if(!r||r.status!=="active")return null;const u=r.maxIterations>0?Math.min(1,r.iterations/r.maxIterations):0;return d.jsxs("div",{role:"status","aria-label":"goal",className:"gui-rise relative flex flex-shrink-0 items-center gap-3 overflow-hidden rounded-2xl bg-card px-4 py-2.5 text-[14px]",children:[d.jsx(zy,{size:16,strokeWidth:1.75,className:"flex-shrink-0 text-accent"}),d.jsx("span",{className:"flex-shrink-0 font-medium text-foreground",children:"Goal"}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:r.objective}),d.jsxs("span",{className:"flex-shrink-0 text-[13px] tabular-nums text-subtle",children:[r.iterations,"/",r.maxIterations]}),d.jsxs("button",{type:"button","aria-label":"Stop goal",onClick:i,className:"flex flex-shrink-0 items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[d.jsx(Mf,{size:11,fill:"currentColor","aria-hidden":"true"}),"Stop"]}),d.jsx("span",{"aria-hidden":"true",className:"absolute bottom-0 left-0 h-[2px] bg-accent/70 transition-[width]",style:{width:`${u*100}%`}})]})}const o3={warning:"bg-warning/15 text-warning",destructive:"bg-destructive/12 text-destructive",muted:"bg-subtle/15 text-subtle"},gx={message:"",tool_activity:"Tool",process_output:"Output",progress:"Progress",result:"Result",error:"Error",group_summary:"Summary"};function c3({entry:t,status:i,records:r,error:u,complete:o,onClose:c,onLoadMore:f,onStop:p}){if(!t)return null;const g=YE(t),m=p!==void 0&&t.controls.includes("cancel"),y=t.headline?.text??t.preview;return d.jsxs("div",{role:"dialog","aria-label":t.title,onKeyDown:x=>{x.key==="Escape"&&(x.preventDefault(),c())},className:"agent-ui absolute inset-y-0 right-0 z-30 flex w-96 flex-col overflow-hidden border-l border-subtle/20 bg-background shadow-2xl shadow-black/40",children:[d.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2 border-b border-subtle/15 px-4 py-3",children:[d.jsx("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-foreground",children:t.title}),g&&d.jsx("span",{className:`flex-shrink-0 rounded-md px-1.5 py-px text-[12px] ${o3[g.tone]}`,children:g.label}),m&&d.jsx("button",{type:"button","aria-label":`Stop ${t.title}`,onClick:p,className:"flex-shrink-0 rounded-md px-1.5 py-px text-[12px] text-subtle hover:bg-destructive/10 hover:text-destructive",children:"Stop"}),d.jsx("button",{type:"button","aria-label":"Close","aria-keyshortcuts":"Escape",onClick:c,className:"flex-shrink-0 rounded-md p-1 text-subtle hover:bg-card hover:text-foreground",children:d.jsx(er,{size:16,strokeWidth:1.9,"aria-hidden":"true"})})]}),y&&d.jsx("p",{className:"flex-shrink-0 border-b border-subtle/15 px-4 py-2.5 text-[13px] leading-snug text-muted-foreground",children:y}),t.deniedToolCalls!==void 0&&t.deniedToolCalls>0&&d.jsxs("p",{className:"flex-shrink-0 px-4 pt-2 text-[12px] text-warning",children:[t.deniedToolCalls," tool ",t.deniedToolCalls===1?"call was":"calls were"," refused."]}),d.jsxs("div",{className:"flex-1 space-y-2 overflow-y-auto px-4 py-3",children:[r.map(x=>d.jsxs("div",{className:"text-[13px] leading-relaxed text-foreground",children:[gx[x.kind]&&d.jsx("span",{className:"mr-1.5 text-[11px] font-medium uppercase tracking-wide text-subtle",children:gx[x.kind]}),d.jsx("span",{className:"whitespace-pre-wrap break-words",children:x.text})]},x.id)),i==="loading"&&r.length===0&&d.jsx("p",{className:"text-[13px] text-subtle",children:"Loading…"}),u&&d.jsx("p",{className:"text-[13px] text-destructive",children:u}),!o&&i!=="loading"&&d.jsx("button",{type:"button",onClick:f,className:"text-[12px] text-subtle underline hover:text-foreground",children:"Load more"}),!o&&i==="loading"&&r.length>0&&d.jsx("p",{className:"text-[12px] text-subtle",children:"Loading more…"})]})]})}const f3=[{keys:"⌘,",description:"Open Settings"},{keys:"Esc",description:"Close a dialog or menu, or stop the current run"},{keys:"Shift+Tab",description:"Answer a pending question with the keyboard"},{keys:"Enter",description:"Send the message"},{keys:"Shift+Enter",description:"Start a new line"}];function d3({open:t,onClose:i,catalog:r}){const u=Wy(r,"/")??[],o=u.filter(f=>f.kind==="command"),c=u.filter(f=>f.kind==="skill");return d.jsxs(sa,{open:t,onClose:i,title:"Help",panelClassName:"flex h-[min(600px,85vh)] w-full max-w-lg flex-col overflow-hidden rounded-2xl bg-card text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-1 border-b border-border px-3",children:[d.jsx("h2",{className:"px-1.5 text-[15px] font-semibold text-foreground",children:"Help"}),d.jsx("button",{type:"button","aria-label":"Close Help",onClick:i,className:"ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(er,{size:17,strokeWidth:1.75})})]}),d.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4",children:[d.jsxs("section",{"aria-label":"Shortcuts",children:[d.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wide text-subtle",children:"Shortcuts"}),d.jsx("dl",{className:"mt-2 mb-5 space-y-1.5",children:f3.map(f=>d.jsxs("div",{className:"flex items-baseline gap-3 text-[13.5px]",children:[d.jsx("dt",{className:"w-24 flex-shrink-0 font-mono text-foreground",children:f.keys}),d.jsx("dd",{className:"min-w-0 flex-1 text-muted-foreground",children:f.description})]},f.keys))})]}),d.jsx(xx,{label:"Commands",items:o}),c.length>0&&d.jsx(xx,{label:"Skills",items:c})]})]})}function xx({label:t,items:i}){return d.jsxs("section",{"aria-label":t,className:"mb-5 last:mb-0",children:[d.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wide text-subtle",children:t}),d.jsx("ul",{className:"mt-2 space-y-1.5",children:i.map(r=>d.jsxs("li",{className:"flex items-baseline gap-3 text-[13.5px]",children:[d.jsxs("span",{className:"w-24 flex-shrink-0 truncate font-mono text-foreground",children:["/",r.name]}),d.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:r.description})]},r.name))})]})}const h3={Added:"text-accent",Modified:"text-warning",Deleted:"text-destructive",Renamed:"text-muted-foreground",Copied:"text-muted-foreground",Untracked:"text-subtle",Conflicted:"text-destructive"};function p3({file:t,open:i,onOpen:r}){return d.jsxs("button",{type:"button","aria-expanded":i,onClick:r,className:"flex min-w-0 items-center gap-2 rounded-md px-1.5 py-1.5 text-left hover:bg-hover",children:[d.jsx(Gu,{size:13,className:`flex-shrink-0 text-subtle transition-transform ${i?"rotate-90":""}`}),d.jsx("span",{className:`w-[76px] flex-shrink-0 text-[12px] font-medium ${h3[t.status]}`,children:t.status}),d.jsx("span",{className:"min-w-0 flex-1 truncate break-all font-mono text-[12.5px] text-foreground",title:t.path,children:t.path}),typeof t.added=="number"&&d.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-accent",children:["+",t.added]}),typeof t.removed=="number"&&d.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-destructive",children:["-",t.removed]})]})}function m3({status:t,statusState:i,onRefresh:r,openPath:u,onSelectFile:o,diff:c,diffState:f,diffPath:p}){return d.jsxs("div",{className:"flex flex-col gap-1.5 rounded-xl bg-card px-2 py-2",children:[d.jsxs("div",{className:"flex items-center gap-2 px-1",children:[d.jsx("p",{className:"flex-1 text-[12px] font-medium text-muted-foreground",children:t?.kind==="status"&&t.branch?`Changes — ${t.branch}`:"Changes"}),d.jsxs("button",{type:"button",onClick:r,disabled:i==="loading","aria-label":"Refresh",className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[12px] text-subtle hover:bg-hover hover:text-foreground disabled:opacity-60",children:[d.jsx(Rf,{size:12,className:i==="loading"?"animate-spin":""}),"Refresh"]})]}),i==="loading"&&t===null&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-muted-foreground",children:"Reading git status…"}),i==="error"&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-destructive",children:"Could not read git status."}),t?.kind==="not-a-repository"&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-muted-foreground",children:"This folder is not a git repository."}),t?.kind==="failed"&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-destructive",children:t.message}),t?.kind==="status"&&t.files.length===0&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-muted-foreground",children:"No changes."}),t?.kind==="status"&&t.files.map(g=>d.jsxs("div",{className:"flex flex-col",children:[d.jsx(p3,{file:g,open:u===g.path,onOpen:()=>o(g.path)}),u===g.path&&d.jsxs("div",{className:"pl-6",children:[f==="loading"&&p===g.path&&d.jsx("p",{className:"py-1.5 text-[12.5px] text-muted-foreground",children:"Reading diff…"}),c&&p===g.path&&c.kind==="diff"&&c.diffLines.length===0&&d.jsx("p",{className:"py-1.5 text-[12.5px] text-muted-foreground",children:"No differences."}),c&&p===g.path&&c.kind==="diff"&&c.diffLines.length>0&&d.jsxs(d.Fragment,{children:[d.jsx(Vu,{diffLines:c.diffLines}),c.truncated&&d.jsx("p",{className:"py-1 text-[12px] text-subtle",children:"The diff was too long and was cut short."})]}),c&&p===g.path&&c.kind==="failed"&&d.jsx("p",{className:"py-1.5 text-[12.5px] text-destructive",children:c.message}),c&&p===g.path&&c.kind==="outside-workspace"&&d.jsx("p",{className:"py-1.5 text-[12.5px] text-destructive",children:"That path is outside the workspace."}),c&&p===g.path&&c.kind==="not-a-repository"&&d.jsx("p",{className:"py-1.5 text-[12.5px] text-muted-foreground",children:"This folder is not a git repository."})]})]},g.path)),t?.kind==="status"&&t.truncated&&d.jsx("p",{className:"px-1 pt-1 text-[12px] text-subtle",children:"Showing the first files only — there are more."})]})}function g3({memory:t,memoryState:i,onOpenInEditor:r}){return d.jsxs("div",{className:"flex flex-col gap-1.5 rounded-xl bg-card px-2 py-2",children:[d.jsxs("div",{className:"flex items-center gap-2 px-1",children:[d.jsx("p",{className:"flex-1 text-[12px] font-medium text-muted-foreground",children:"Memory"}),t?.kind==="memory"&&r&&d.jsxs("button",{type:"button",onClick:()=>r(t.path),className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[12px] text-subtle hover:bg-hover hover:text-foreground",children:[d.jsx($N,{size:12}),"Open in editor"]})]}),i==="loading"&&t===null&&d.jsx("p",{className:"px-1 py-1 text-[13px] text-muted-foreground",children:"Reading project memory…"}),t?.kind==="unavailable"&&d.jsx("p",{className:"px-1 py-1 text-[13px] text-muted-foreground",children:t.message}),t?.kind==="memory"&&d.jsxs(d.Fragment,{children:[d.jsx("pre",{className:"max-h-64 overflow-y-auto whitespace-pre-wrap break-words rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed text-foreground",children:t.content.length>0?t.content:"(empty)"}),t.truncated&&d.jsx("p",{className:"px-1 pt-1 text-[12px] text-subtle",children:"The memory was too long and was cut short."})]})]})}function x3({state:t,className:i,onOpenMemoryInEditor:r}){j.useEffect(()=>{t.requestProjectStatus(),t.requestProjectMemory()},[t.requestProjectStatus,t.requestProjectMemory]);const[u,o]=j.useState(null);return d.jsxs("div",{className:`agent-ui flex flex-col overflow-hidden ${i??""}`,children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-2 px-4",children:[d.jsx(WN,{size:15,className:"text-subtle"}),d.jsx("span",{className:"text-[14px] font-medium text-foreground",children:"Project"}),t.projectStatusState==="loading"&&d.jsx(Df,{size:13,className:"ml-auto animate-spin text-subtle","aria-label":"loading"})]}),d.jsxs("div",{className:"flex-1 space-y-2 overflow-y-auto px-3 pb-3",children:[d.jsx(m3,{status:t.projectStatus,statusState:t.projectStatusState,onRefresh:()=>t.requestProjectStatus(),openPath:u,onSelectFile:c=>{if(u===c){o(null);return}o(c),t.requestProjectDiff(c)},diff:t.projectDiffPath===u?t.projectDiff:null,diffState:t.projectDiffPath===u?t.projectDiffState:"loading",diffPath:t.projectDiffPath}),d.jsx(g3,{memory:t.projectMemory,memoryState:t.projectMemoryState,onOpenInEditor:r})]})]})}const yx={connected:{dot:"bg-accent status-glow",label:"Connected"},connecting:{dot:"bg-warning animate-pulse",label:"Connecting…"},disconnected:{dot:"bg-subtle",label:"Disconnected"},error:{dot:"bg-destructive",label:"Connection error"}},y3={chat:"Chat",usage:"Usage",project:"Project"};function b3(t){const{identity:i}=ai();j.useEffect(()=>{typeof document>"u"||t===void 0||(document.title=`${t.name} — ${i.displayName}`)},[t,i.displayName])}function v3({status:t,surface:i,title:r,workspace:u,showBrand:o,view:c,onView:f,personalUsageEnabled:p,connectionLost:g=!1}){const m=yx[t]??yx.disconnected;b3(u);const y=j.useRef(!1);j.useEffect(()=>{t==="connected"&&(y.current=!0)},[t]);const x=t!=="connected"&&(g||y.current),S=p?["chat","usage","project"]:["chat","project"];return d.jsxs("header",{className:"agent-gui-status flex h-12 flex-shrink-0 items-center gap-3 px-5","data-status":t,children:[o?d.jsx(Hf,{surface:i}):null,c==="chat"&&r?d.jsx("h1",{className:"min-w-0 truncate text-[14px] font-medium text-foreground/90",children:r}):null,c==="chat"&&u?d.jsx("span",{title:u.path,className:"min-w-0 flex-shrink truncate text-[13px] text-muted-foreground",children:u.name}):null,d.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[d.jsx("nav",{className:"flex items-center rounded-lg bg-raised p-0.5","aria-label":"Primary",children:S.map(v=>d.jsx("button",{type:"button","aria-pressed":c===v,onClick:()=>f(v),className:`rounded-md px-3 py-1 text-[13px] font-medium transition-colors ${c===v?"bg-card text-foreground shadow-sm shadow-black/25":"text-muted-foreground hover:text-foreground"}`,children:y3[v]},v))}),x?null:d.jsxs("span",{className:"flex items-center gap-2",title:m.label,children:[d.jsx("span",{className:`h-2 w-2 rounded-full ${m.dot}`}),t==="connected"?d.jsx("span",{className:"sr-only",children:t}):d.jsx("span",{className:"text-[13px] text-muted-foreground",children:m.label})]})]})]})}const bx="mx-auto w-full max-w-[760px] px-6";function S3({status:t,connectionLost:i,onReconnect:r}){const u=j.useRef(!1);j.useEffect(()=>{t==="connected"&&(u.current=!0)},[t]);const{identity:o}=ai(),[c,f]=j.useState(!1),[p,g]=j.useState(null);if(t==="connected"||!i&&!u.current)return null;if(!i)return d.jsx("div",{role:"status",className:`${bx} flex-shrink-0 pt-3`,children:d.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl bg-warning/15 px-4 py-2.5 text-[13.5px] text-foreground",children:[d.jsx("span",{className:"h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-warning","aria-hidden":"true"}),"Connection lost. Reconnecting…"]})});const m=()=>{r&&(f(!0),g(null),r().catch(y=>{f(!1),g(y instanceof Error?y.message:String(y))}))};return d.jsx("div",{role:"alert",className:`${bx} flex-shrink-0 pt-3`,children:d.jsxs("div",{className:"flex flex-col gap-2 rounded-xl bg-destructive/15 px-4 py-3 text-[13.5px] text-foreground",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-destructive","aria-hidden":"true"}),d.jsxs("span",{className:"min-w-0 flex-1",children:[o.displayName," stopped.",!r&&d.jsxs(d.Fragment,{children:[" ","Run ",d.jsxs("code",{className:"font-mono",children:[o.cliName," --serve --open"]})," again to reopen it."]})]}),r?d.jsx("button",{type:"button",onClick:m,disabled:c,className:"flex-shrink-0 rounded-lg bg-primary px-3 py-1.5 text-[13px] font-medium text-primary-foreground hover:opacity-90 disabled:opacity-60",children:c?"Reconnecting…":"Reconnect"}):null]}),p?d.jsx("p",{className:"text-destructive",children:p}):null]})})}const k3={openai:"OpenAI",deepseek:"DeepSeek"};function w3(t){return t===void 0||t.length===0?"The provider":k3[t]??t[0].toUpperCase()+t.slice(1)}function j3(t){const i=w3(t.provider);switch(t.code){case"auth":return`${i} rejected the API key. Check the key for this provider.`;case"rate_limit":return`${i} is limiting requests. Try again in ${t.retryAfterSeconds!==void 0?`${t.retryAfterSeconds} second${t.retryAfterSeconds===1?"":"s"}`:"a moment"}.`;case"model_unavailable":return t.model?`The model "${t.model}" isn't available with this key.`:"The model isn't available with this key.";case"network":return`Can't reach ${i}. Check your connection.`;case"provider":return`${i} returned an error.`;default:return null}}function N3({state:t}){const i=t.sessionNotices??[];return i.length===0?null:d.jsx("div",{className:"pointer-events-none absolute right-4 top-16 z-40 flex w-[min(400px,calc(100%-32px))] flex-col gap-2",children:i.slice(-3).map(r=>{const u=j3(r);return d.jsxs("div",{role:"alert",className:"gui-rise pointer-events-auto flex items-start gap-3 rounded-xl bg-popover px-4 py-3 text-[14px] leading-snug text-popover-foreground shadow-xl shadow-black/30",children:[d.jsx("span",{className:"mt-[7px] h-2 w-2 flex-shrink-0 rounded-full bg-destructive"}),d.jsxs("span",{className:"max-h-40 flex-1 overflow-y-auto whitespace-pre-wrap break-words",children:[u??r.message,u&&d.jsxs("details",{className:"mt-1.5",children:[d.jsx("summary",{className:"cursor-pointer text-[12.5px] text-muted-foreground hover:text-foreground",children:"Details"}),d.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words text-[12.5px] text-muted-foreground",children:r.message})]})]}),d.jsx("button",{type:"button","aria-label":"Dismiss notice",onClick:()=>t.dismissSessionNotice?.(r.id),className:"-mr-1 rounded-md p-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(er,{size:15})})]},r.id)})})}const l1="min-w-[160px] flex-shrink-0 rounded-lg border border-border bg-raised px-2.5 py-1.5 text-[13.5px] text-foreground";function of({label:t,note:i,value:r,options:u,onChange:o,disabled:c=!1}){const f=j.useId(),p=u.find(m=>m.id===r),g=i??p?.description;return d.jsxs("div",{className:"flex flex-col gap-1.5 border-b border-border/60 py-3.5 last:border-b-0",children:[d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsx("label",{htmlFor:f,className:"text-[14px] font-medium text-foreground",children:t}),d.jsxs("select",{id:f,value:u.some(m=>m.id===r)?r:"",disabled:c,onChange:m=>o(m.target.value),className:l1,children:[u.some(m=>m.id===r)?null:d.jsx("option",{value:"",disabled:!0,children:r||"Unset"}),u.map(m=>d.jsx("option",{value:m.id,children:m.label},m.id))]})]}),g?d.jsx("p",{className:"text-[12.5px] leading-snug text-muted-foreground",children:g}):null]})}const Yc="__other__";function C3({label:t,current:i,recommended:r,note:u,onChange:o,disabled:c=!1}){const f=j.useId(),p=r.some(v=>v.id===i),[g,m]=j.useState(!p&&i.length>0),[y,x]=j.useState(p?"":i);j.useEffect(()=>{const v=r.some(N=>N.id===i);m(!v&&i.length>0),x(v?"":i)},[i,r]);function S(){const v=y.trim();v.length>0&&v!==i&&o(v)}return d.jsxs("div",{className:"flex flex-col gap-1.5 border-b border-border/60 py-3.5 last:border-b-0",children:[d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsx("label",{htmlFor:f,className:"text-[14px] font-medium text-foreground",children:t}),d.jsxs("select",{id:f,disabled:c,value:g?Yc:p?i:"",onChange:v=>{if(v.target.value===Yc){m(!0);return}m(!1),o(v.target.value)},className:l1,children:[!p&&!g?d.jsx("option",{value:"",disabled:!0,children:i||"Unset"}):null,r.map(v=>d.jsx("option",{value:v.id,children:v.label},v.id)),d.jsx("option",{value:Yc,children:"Other…"})]})]}),g?d.jsx("input",{type:"text","aria-label":`${t} — other`,placeholder:"Language code, e.g. fr",value:y,disabled:c,onChange:v=>x(v.target.value),onBlur:S,onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),S())},className:"rounded-lg border border-border bg-raised px-2.5 py-1.5 text-[13.5px] text-foreground"}):null,d.jsx("p",{className:"text-[12.5px] leading-snug text-muted-foreground",children:u})]})}function E3({snapshot:t,onUpdate:i,onRequestPresetChange:r}){return d.jsxs("section",{"aria-labelledby":"settings-general-heading",children:[d.jsx("h3",{id:"settings-general-heading",className:"sr-only",children:"General"}),d.jsx(C3,{label:"Language",current:t.language.current,recommended:t.language.recommended,note:t.language.appliesNote,onChange:u=>i({field:"language",language:u})}),d.jsx(of,{label:"Output style",value:t.outputStyle.current,options:t.outputStyle.choices,onChange:u=>i({field:"outputStyle",styleId:u})}),d.jsx(of,{label:"Preset",note:"Applies to this session — it is not saved for the next one.",value:t.preset.current,options:t.preset.choices,onChange:r})]})}const _3={connected:"Connected",failed:"Failed",disabled:"Disabled"},T3={connected:"text-success",failed:"text-destructive",disabled:"text-muted-foreground"};function A3({server:t,expanded:i,onToggleExpanded:r,onToggleEnabled:u}){const o=j.useId(),c=t.toolNames.length>0;return d.jsx("li",{className:"border-b border-border/60 py-3 last:border-b-0",children:d.jsxs("div",{className:"flex items-start justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("button",{type:"button",onClick:c?r:void 0,disabled:!c,"aria-expanded":c?i:void 0,className:"flex w-full items-center gap-1.5 text-left disabled:cursor-default",children:[c?i?d.jsx(Ey,{size:14,strokeWidth:1.75,className:"flex-shrink-0 text-muted-foreground"}):d.jsx(Gu,{size:14,strokeWidth:1.75,className:"flex-shrink-0 text-muted-foreground"}):d.jsx("span",{className:"w-[14px] flex-shrink-0"}),d.jsx("span",{id:o,className:"truncate text-[14px] font-medium text-foreground",children:t.name})]}),d.jsxs("p",{className:"mt-0.5 text-[12.5px] text-muted-foreground",children:[t.scopeLabel," · ",d.jsx("span",{className:T3[t.status],children:_3[t.status]}),t.status==="failed"&&t.statusReason?`: ${t.statusReason}`:""," · ",t.toolNames.length===1?"1 tool":`${t.toolNames.length} tools`]}),i&&c?d.jsx("ul",{className:"mt-2 flex flex-col gap-0.5 pl-[20px]",children:t.toolNames.map(f=>d.jsx("li",{className:"truncate font-mono text-[12px] text-muted-foreground",children:f},f))}):null]}),d.jsx("button",{type:"button",role:"switch","aria-checked":t.enabled,"aria-labelledby":o,onClick:()=>u(!t.enabled),className:`relative h-6 w-11 flex-shrink-0 rounded-full transition-colors ${t.enabled?"bg-primary":"bg-raised"}`,children:d.jsx("span",{className:`absolute top-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform ${t.enabled?"translate-x-[22px]":"translate-x-0.5"}`})})]})})}function z3({snapshot:t,onToggleServer:i,onReload:r,reloading:u}){const[o,c]=j.useState(new Set),{servers:f}=t.mcp;function p(g){c(m=>{const y=new Set(m);return y.has(g)?y.delete(g):y.add(g),y})}return d.jsxs("section",{"aria-labelledby":"settings-mcp-heading",className:"flex flex-col gap-3",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsx("h3",{id:"settings-mcp-heading",className:"text-[14px] font-medium text-foreground",children:"MCP Servers"}),d.jsxs("button",{type:"button",onClick:r,disabled:u,className:"inline-flex items-center gap-1.5 rounded-lg bg-raised px-2.5 py-1.5 text-[13px] text-foreground hover:bg-hover disabled:opacity-60",children:[d.jsx(Rf,{size:13,strokeWidth:1.75,className:u?"animate-spin":""}),"Reload servers"]})]}),f.length===0?d.jsx("p",{className:"text-[13px] leading-snug text-muted-foreground",children:"No MCP servers are configured."}):d.jsx("ul",{children:f.map(g=>d.jsx(A3,{server:g,expanded:o.has(g.id),onToggleExpanded:()=>p(g.id),onToggleEnabled:m=>i(g.id,m)},g.id))})]})}const vx={allow:"Allow",deny:"Deny",ask:"Ask"},D3={allow:"allowed",deny:"denied",ask:"asked about"};function R3({rule:t,onRequestRemove:i}){return d.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-lg px-2.5 py-2 hover:bg-hover",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("p",{className:"truncate text-[13.5px] text-foreground",children:[d.jsx("span",{className:"font-medium",children:vx[t.kind]})," ",d.jsx("span",{className:"font-mono text-[12.5px]",children:t.pattern})]}),d.jsx("p",{className:"truncate text-[12px] text-muted-foreground",children:t.source})]}),t.removable?d.jsx("button",{type:"button","aria-label":`Remove rule: ${vx[t.kind]} ${t.pattern}`,onClick:()=>i(t),className:"flex-shrink-0 rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-destructive",children:d.jsx(Of,{size:15,strokeWidth:1.75})}):null]})}function M3({snapshot:t,onRequestModeChange:i,onToggleSandbox:r,onRequestRemoveRule:u}){const o=j.useId(),{sandbox:c}=t;return d.jsxs("section",{"aria-labelledby":"settings-permissions-heading",className:"flex flex-col gap-5",children:[d.jsxs("div",{children:[d.jsx("h3",{id:"settings-permissions-heading",className:"sr-only",children:"Permissions"}),d.jsx(of,{label:"Default permission mode",value:t.permissionMode.current,options:t.permissionMode.choices,onChange:i})]}),d.jsxs("div",{children:[d.jsx("h4",{className:"mb-1.5 text-[13px] font-medium text-foreground",children:"Rules"}),t.permissionRules.length===0?d.jsx("p",{className:"text-[13px] leading-snug text-muted-foreground",children:"No permission rules are configured — the default mode above governs every action."}):d.jsx("ul",{className:"space-y-0.5",children:t.permissionRules.map(f=>d.jsx(R3,{rule:f,onRequestRemove:u},f.id))})]}),d.jsxs("div",{className:"flex items-start justify-between gap-4 border-t border-border/60 pt-4",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("span",{id:o,className:"text-[14px] font-medium text-foreground",children:"Sandbox"}),d.jsx("p",{className:"mt-0.5 text-[12.5px] leading-snug text-muted-foreground",children:c.description}),!c.available&&c.unavailableReason?d.jsxs("p",{className:"mt-0.5 text-[12.5px] text-destructive",children:["Not available on this machine: ",c.unavailableReason]}):null]}),d.jsx("button",{type:"button",role:"switch","aria-checked":c.enabled,"aria-labelledby":o,disabled:!c.available,onClick:()=>r(!c.enabled),className:`relative h-6 w-11 flex-shrink-0 rounded-full transition-colors ${c.enabled?"bg-primary":"bg-raised"} ${c.available?"":"cursor-not-allowed opacity-50"}`,children:d.jsx("span",{className:`absolute top-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform ${c.enabled?"translate-x-[22px]":"translate-x-0.5"}`})})]})]})}function O3(t){return`"${t.pattern}" will no longer be ${D3[t.kind]} automatically.`}function L3({plugin:t,canInstall:i,onToggleEnabled:r,onRequestUninstall:u}){const o=j.useId();return d.jsxs("li",{className:"flex items-start justify-between gap-3 border-b border-border/60 py-3 last:border-b-0",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("span",{id:o,className:"truncate text-[14px] font-medium text-foreground",children:t.name}),t.description?d.jsx("p",{className:"mt-0.5 text-[12.5px] leading-snug text-muted-foreground",children:t.description}):null]}),d.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2",children:[i?d.jsx("button",{type:"button","aria-label":`Uninstall ${t.name}`,onClick:u,className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-destructive",children:d.jsx(Of,{size:15,strokeWidth:1.75})}):null,d.jsx("button",{type:"button",role:"switch","aria-checked":t.enabled,"aria-labelledby":o,onClick:()=>r(!t.enabled),className:`relative h-6 w-11 flex-shrink-0 rounded-full transition-colors ${t.enabled?"bg-primary":"bg-raised"}`,children:d.jsx("span",{className:`absolute top-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform ${t.enabled?"translate-x-[22px]":"translate-x-0.5"}`})})]})]})}function U3({snapshot:t,onTogglePlugin:i,onReload:r,reloading:u,onRequestInstall:o,onRequestUninstall:c}){const[f,p]=j.useState(""),{plugins:g,canInstall:m}=t.plugins,y=j.useId();function x(){const S=f.trim();S.length!==0&&(o(S),p(""))}return d.jsxs("section",{"aria-labelledby":"settings-plugins-heading",className:"flex flex-col gap-3",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsx("h3",{id:"settings-plugins-heading",className:"text-[14px] font-medium text-foreground",children:"Plugins"}),d.jsxs("button",{type:"button",onClick:r,disabled:u,className:"inline-flex items-center gap-1.5 rounded-lg bg-raised px-2.5 py-1.5 text-[13px] text-foreground hover:bg-hover disabled:opacity-60",children:[d.jsx(Rf,{size:13,strokeWidth:1.75,className:u?"animate-spin":""}),"Reload plugins"]})]}),g.length===0?d.jsx("p",{className:"text-[13px] leading-snug text-muted-foreground",children:"No plugins are installed."}):d.jsx("ul",{children:g.map(S=>d.jsx(L3,{plugin:S,canInstall:m,onToggleEnabled:v=>i(S.id,v),onRequestUninstall:()=>c(S)},S.id))}),d.jsx("div",{className:"border-t border-border/60 pt-3",children:m?d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsx("label",{htmlFor:y,className:"text-[13px] font-medium text-foreground",children:"Install a plugin"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:y,type:"text",placeholder:"name@marketplace",value:f,onChange:S=>p(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),x())},className:"min-w-0 flex-1 rounded-lg border border-border bg-raised px-2.5 py-1.5 text-[13.5px] text-foreground"}),d.jsx("button",{type:"button",onClick:x,disabled:f.trim().length===0,className:"flex-shrink-0 rounded-lg bg-raised px-3 py-1.5 text-[13px] text-foreground hover:bg-hover disabled:opacity-60",children:"Install"})]})]}):d.jsx("p",{className:"text-[12.5px] leading-snug text-muted-foreground",children:"Installing and uninstalling plugins runs code on this computer, so it only works from the desktop app or the page opened here — not from a remote device."})})]})}const If="rounded-lg px-2.5 py-1.5 text-[12.5px] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",q3=`${If} bg-primary text-primary-foreground hover:opacity-90`,Tu=`${If} bg-raised text-foreground hover:bg-hover`,B3=`${If} text-destructive hover:bg-destructive/10`;function H3({profile:t,modelList:i,onSelect:r}){const[u,o]=j.useState(!1),c=j.useRef(null),f=i?.groups.find(p=>p.profileName===t.name)?.models??[];return d.jsxs("span",{className:"relative inline-block",children:[d.jsx("button",{ref:c,type:"button","aria-haspopup":"menu","aria-expanded":u,disabled:f.length===0,onClick:()=>o(!0),className:Tu,children:"Model"}),u?d.jsx(e1,{label:`Models for ${t.name}`,sections:[{items:f.map(p=>({key:p.id,label:p.label,checked:t.model!==void 0&&p.id===t.model.id,onSelect:()=>r(t.name,p.id)}))}],triggerRef:c,onClose:()=>o(!1)}):null]})}function I3({profile:t,modelList:i,onUse:r,onModelChange:u,onCommand:o,onRequestDelete:c}){return d.jsxs("li",{className:"rounded-xl border border-border/60 p-3",children:[d.jsxs("div",{className:"flex items-start gap-1.5",children:[t.current?d.jsx(ua,{size:14,strokeWidth:2.25,className:"mt-0.5 flex-shrink-0 text-primary","aria-hidden":"true"}):d.jsx("span",{className:"mt-0.5 w-3.5 flex-shrink-0","aria-hidden":"true"}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("p",{className:"truncate text-[14px] font-medium text-foreground",children:[t.name,t.current?d.jsx("span",{className:"sr-only",children:" (in use)"}):null]}),d.jsxs("p",{className:"truncate text-[12.5px] text-muted-foreground",children:[t.providerLabel,t.model?` · ${t.model.label}`:" · No model configured"]}),t.connectionState?d.jsx("p",{className:"text-[12.5px] text-destructive",children:t.connectionState}):null]})]}),d.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5",children:[d.jsx("button",{type:"button",disabled:t.current,onClick:()=>r(t.name),className:q3,children:"Use"}),d.jsx(H3,{profile:t,modelList:i,onSelect:u}),d.jsx("button",{type:"button",onClick:()=>o(`edit ${t.name}`),className:Tu,children:"Edit…"}),d.jsx("button",{type:"button",onClick:()=>o(`test ${t.name}`),className:Tu,children:"Test connection"}),d.jsx("button",{type:"button",onClick:()=>o(`duplicate ${t.name}`),className:Tu,children:"Duplicate…"}),d.jsx("button",{type:"button",onClick:()=>c(t.name),className:`${B3} ml-auto`,children:"Delete…"})]})]})}function Y3({snapshot:t,modelList:i,onRequestModelList:r,onUse:u,onModelChange:o,onCommand:c,onRequestDelete:f}){j.useEffect(()=>{r()},[]);const{profiles:p}=t.providers;return d.jsxs("section",{"aria-labelledby":"settings-providers-heading",className:"flex flex-col gap-4",children:[d.jsx("h3",{id:"settings-providers-heading",className:"sr-only",children:"Providers & Models"}),p.length===0?d.jsx("p",{className:"text-[13.5px] text-muted-foreground",children:"No providers configured yet."}):d.jsx("ul",{className:"flex flex-col gap-3",children:p.map(g=>d.jsx(I3,{profile:g,modelList:i,onUse:u,onModelChange:o,onCommand:c,onRequestDelete:f},g.name))}),d.jsx("button",{type:"button",onClick:()=>c("add"),className:"self-start rounded-lg bg-raised px-3 py-1.5 text-[13px] font-medium text-foreground hover:bg-hover",children:"Add provider…"})]})}const Gc=[{id:"general",label:"General"},{id:"permissions",label:"Permissions"},{id:"mcp",label:"MCP Servers"},{id:"plugins",label:"Plugins"},{id:"providers",label:"Providers & Models"}];function G3({state:t}){const[i,r]=j.useState("general"),[u,o]=j.useState(!0),[c,f]=j.useState(null),[p,g]=j.useState(null),[m,y]=j.useState(null),[x,S]=j.useState(!1),[v,N]=j.useState(!1),[T,L]=j.useState(null);if(j.useEffect(()=>{t.settingsOpen&&(r(t.settingsInitialSectionId??"general"),o(!0))},[t.settingsOpen,t.settingsInitialSectionId]),j.useEffect(()=>{S(!1),N(!1)},[t.settingsSnapshot,t.settingsError]),!t.settingsOpen)return null;const C=t.settingsSnapshot,F=Gc.find(W=>W.id===i)??Gc[0];function U(W){r(W),o(!1)}function X(W){if(C&&W===C.permissionMode.skipsAllChecksMode){f({kind:"mode"});return}t.updateSettings({field:"permissionMode",mode:W})}function ie(W){if(C?.preset.skipsAllChecksPresetIds.includes(W)){f({kind:"preset",presetId:W});return}t.updateSettings({field:"preset",presetId:W})}function R(){S(!0),t.updateSettings({field:"reloadMcpServers"})}function I(){N(!0),t.updateSettings({field:"reloadPlugins"})}function ue(){m?.kind==="install"?t.updateSettings({field:"installPlugin",pluginId:m.pluginId}):m?.kind==="uninstall"&&t.updateSettings({field:"uninstallPlugin",pluginId:m.plugin.id}),y(null)}return d.jsxs(d.Fragment,{children:[d.jsxs(sa,{open:!0,onClose:()=>t.closeSettings(),title:"Settings",panelClassName:"flex h-[min(680px,85vh)] w-full max-w-3xl flex-col overflow-hidden rounded-2xl bg-card text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-1 border-b border-border px-3",children:[u?null:d.jsx("button",{type:"button","aria-label":"Back to sections",onClick:()=>o(!0),className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground md:hidden",children:d.jsx(ON,{size:18,strokeWidth:1.75})}),d.jsx("h2",{className:"px-1.5 text-[15px] font-semibold text-foreground",children:"Settings"}),d.jsx("button",{type:"button","aria-label":"Close Settings",onClick:()=>t.closeSettings(),className:"ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx(er,{size:17,strokeWidth:1.75})})]}),d.jsxs("div",{className:"flex min-h-0 flex-1",children:[d.jsx("nav",{"aria-label":"Settings sections",className:`w-full flex-shrink-0 overflow-y-auto border-r border-border bg-sidebar px-2 py-3 md:block md:w-[200px] ${u?"block":"hidden"}`,children:d.jsx("ul",{className:"space-y-0.5",children:Gc.map(W=>d.jsx("li",{children:d.jsx("button",{type:"button",onClick:()=>U(W.id),"aria-current":W.id===i?"true":void 0,className:`w-full rounded-lg px-2.5 py-2 text-left text-[13.5px] ${W.id===i?"bg-raised font-medium text-foreground":"text-foreground/85 hover:bg-hover"}`,children:W.label})},W.id))})}),d.jsx("div",{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4 md:block ${u?"hidden":"block"}`,children:C===null?t.settingsStatus==="error"?d.jsxs("div",{className:"flex flex-col items-start gap-2",children:[d.jsx("p",{className:"text-[13.5px] text-destructive",children:t.settingsError??"Settings could not be read."}),d.jsx("button",{type:"button",onClick:()=>t.openSettings(),className:"rounded-lg bg-raised px-3 py-1.5 text-[13px] text-foreground hover:bg-hover",children:"Try again"})]}):d.jsx("p",{className:"text-[13.5px] text-muted-foreground",children:"Loading settings…"}):d.jsxs(d.Fragment,{children:[t.settingsError?d.jsx("p",{className:"mb-3 rounded-lg bg-destructive/12 px-3 py-2 text-[13px] text-destructive",children:t.settingsError}):null,F.id==="general"?d.jsx(E3,{snapshot:C,onUpdate:t.updateSettings,onRequestPresetChange:ie}):F.id==="mcp"?d.jsx(z3,{snapshot:C,onToggleServer:(W,O)=>t.updateSettings({field:"mcpServerEnabled",serverId:W,enabled:O}),onReload:R,reloading:x}):F.id==="plugins"?d.jsx(U3,{snapshot:C,onTogglePlugin:(W,O)=>t.updateSettings({field:"pluginEnabled",pluginId:W,enabled:O}),onReload:I,reloading:v,onRequestInstall:W=>y({kind:"install",pluginId:W}),onRequestUninstall:W=>y({kind:"uninstall",plugin:W})}):F.id==="providers"?d.jsx(Y3,{snapshot:C,modelList:t.modelList,onRequestModelList:t.requestModelList,onUse:W=>t.updateSettings({field:"providerProfile",profileName:W}),onModelChange:(W,O)=>t.updateSettings({field:"providerModel",profileName:W,modelId:O}),onCommand:W=>t.send({type:"command",name:"provider",args:W}),onRequestDelete:W=>L(W)}):d.jsx(M3,{snapshot:C,onRequestModeChange:X,onToggleSandbox:W=>t.updateSettings({field:"sandbox",enabled:W}),onRequestRemoveRule:W=>g(W)})]})})]})]}),d.jsx(Rl,{open:c!==null,title:"Skip all permission checks?",body:"Every action runs without asking first — file edits, shell commands and network access included. You can turn this back on at any time.",confirmLabel:"Skip all checks",destructive:!0,onCancel:()=>f(null),onConfirm:()=>{c?.kind==="mode"&&C?t.updateSettings({field:"permissionMode",mode:C.permissionMode.skipsAllChecksMode}):c?.kind==="preset"&&t.updateSettings({field:"preset",presetId:c.presetId}),f(null)}}),d.jsx(Rl,{open:p!==null,title:"Remove this rule?",body:p?O3(p):"",confirmLabel:"Remove",destructive:!0,onCancel:()=>g(null),onConfirm:()=>{p&&t.updateSettings({field:"removePermissionRule",scope:p.scope,kind:p.kind,pattern:p.pattern}),g(null)}}),d.jsx(Rl,{open:m!==null,title:m?.kind==="uninstall"?"Uninstall this plugin?":"Install this plugin?",body:m?V3(m):"",confirmLabel:m?.kind==="uninstall"?"Uninstall":"Install",destructive:!0,onCancel:()=>y(null),onConfirm:ue}),d.jsx(Rl,{open:T!==null,title:T?`Delete profile "${T}"?`:"",body:"This removes the profile and its stored key. This cannot be undone.",confirmLabel:"Delete",destructive:!0,onCancel:()=>L(null),onConfirm:()=>{T&&t.updateSettings({field:"deleteProviderProfile",profileName:T}),L(null)}})]})}function V3(t){if(t.kind==="uninstall")return`"${t.plugin.name}" will be removed from this computer.`;const i=t.pluginId.lastIndexOf("@"),r=i===-1?t.pluginId:t.pluginId.slice(0,i),u=i===-1?void 0:t.pluginId.slice(i+1);return`Install "${r}"${u?` from ${u}`:""}. It can run code on this computer.`}function F3(t){const[i,r]=j.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(t).matches);return j.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const u=window.matchMedia(t),o=()=>r(u.matches);return o(),u.addEventListener("change",o),()=>u.removeEventListener("change",o)},[t]),i}const X3="(max-width: 767.98px)",$3="mx-auto w-full max-w-[760px] px-6";function Q3(){return d.jsx("main",{className:"flex h-full items-center justify-center","aria-label":"Conversation",children:d.jsxs("div",{className:"gui-rise flex max-w-[440px] flex-col items-center gap-4 px-8 text-center",children:[d.jsx(Bf,{size:40}),d.jsx("h2",{className:"text-[26px] font-semibold tracking-[-0.02em] text-foreground",children:"What are we working on?"}),d.jsx("p",{className:"text-[15px] leading-relaxed text-muted-foreground",children:"Session connected. Send a message to start — the agent works in the host runtime and asks you here before anything that needs your permission."})]})})}function Z3({onSetUp:t,disabled:i}){return d.jsx("main",{className:"flex h-full items-center justify-center","aria-label":"Set up a provider",children:d.jsxs("div",{className:"gui-rise flex max-w-[440px] flex-col items-center gap-4 px-8 text-center",children:[d.jsx(Bf,{size:40}),d.jsx("h2",{className:"text-[26px] font-semibold tracking-[-0.02em] text-foreground",children:"Connect a model provider to start."}),d.jsx("p",{className:"text-[15px] leading-relaxed text-muted-foreground",children:"Choose a provider and model to start. Enter a key if your provider requires one. You can add more providers or change them later the same way."}),d.jsx("button",{type:"button",onClick:t,disabled:i,className:"rounded-lg bg-primary px-4 py-2 text-[14px] font-medium text-primary-foreground hover:opacity-90 disabled:opacity-60",children:"Set up provider"})]})})}function K3({state:t,surface:i,personalUsageEnabled:r=!1,onReconnect:u,pickFiles:o,getPathForFile:c,onOpenMemoryInEditor:f}){const[p,g]=j.useState("chat"),m=j.useRef(null),y=t.executionWorkspace?.entries??[],x=y.some(D=>D.kind!=="main_thread"),S=y.find(D=>D.id===t.openEntryId)??null,v=D=>{D.loopId!==void 0?t.send({type:"command",name:"loop",args:`stop ${D.loopId}`}):t.send({type:"cancel-background-task",taskId:D.sourceId})},N=t.sessionStatus?.goal??null,T=x||t.scheduledTasks.length>0||N!==null,L=t.messages.length===0&&!t.streamingText&&!t.isThinking&&t.activeTools.length===0,C=t.sessionStatus?.setupRequired===!0,F=(t.sessionListing??null)!==null||t.sessionsError?.code==="list_failed",U=F&&t.sessionSidebarOpen,X=r&&p==="usage",ie=p==="project",R=t.sessionListing??null,I=R?.sessions.find(D=>D.id===R.currentSessionId),ue=t.sessionName??(I?On(I):null),W=F3(X3),O=U&&W,ne=()=>t.setSessionSidebarOpen?.(!1),re=j.useRef(null);j.useEffect(()=>{if(O)return;const D=Q=>{Q.target instanceof HTMLElement&&(re.current=Q.target)};return document.addEventListener("focusin",D),()=>document.removeEventListener("focusin",D)},[O]);const ge=j.useRef(!1);j.useEffect(()=>{if(ge.current&&!O){const D=re.current,Q=D?.getAttribute("aria-label");(D&&document.contains(D)?D:Q?document.querySelector(`[aria-label="${Q}"]`):null)?.focus()}ge.current=O},[O]);const oe={...t,switchSession:D=>{g("chat"),t.switchSession?.(D),O&&ne()},newSession:()=>{g("chat"),t.newSession?.(),O&&ne()}},P=d.jsx(r_,{state:oe,brand:d.jsx(Hf,{surface:i}),className:O?"h-full":"absolute inset-y-0 left-0 z-30 shadow-2xl shadow-black/40 md:static md:z-auto md:shadow-none"});return d.jsxs("div",{className:"agent-ui relative flex h-full bg-background text-foreground",children:[F?U?W?d.jsx(sa,{open:O,onClose:ne,title:"Sessions",panelClassName:"mr-auto flex h-full w-[272px] max-w-[85vw] flex-col self-stretch overflow-hidden rounded-2xl bg-sidebar shadow-2xl shadow-black/40 focus:outline-none",children:P}):P:d.jsx(a_,{state:oe}):null,d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[d.jsx(v3,{status:t.status,surface:i,title:ue,workspace:t.sessionStatus?.workspace,showBrand:!U,view:p,onView:g,personalUsageEnabled:r,connectionLost:t.connectionLost??!1}),X?d.jsxs("div",{className:"min-h-0 flex-1",children:[d.jsx(L_,{state:t}),d.jsx(Mc,{layout:"modal",prompts:t.pendingPrompts,onAnswerPermission:t.answerPermission,onAnswerAsk:t.answerAsk,ownDriverId:t.ownDriverId})]}):ie?d.jsxs("div",{className:"min-h-0 flex-1",children:[d.jsx(x3,{state:t,onOpenMemoryInEditor:f}),d.jsx(Mc,{layout:"modal",prompts:t.pendingPrompts,onAnswerPermission:t.answerPermission,onAnswerAsk:t.answerAsk,ownDriverId:t.ownDriverId})]}):d.jsxs("div",{className:"flex min-h-0 flex-1",children:[d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[d.jsx(S3,{status:t.status,connectionLost:t.connectionLost??!1,onReconnect:u}),d.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:C?d.jsx(Z3,{onSetUp:()=>t.send({type:"command",name:"provider",args:"add"}),disabled:t.status!=="connected"}):L?d.jsx(Q3,{}):d.jsx(AE,{messages:t.messages,activeTools:t.activeTools,streamingText:t.streamingText,isThinking:t.isThinking,ownDriverId:t.ownDriverId})}),d.jsxs("div",{className:`${$3} relative flex flex-shrink-0 flex-col gap-2 pb-4 before:pointer-events-none before:absolute before:inset-x-0 before:-top-8 before:h-8 before:bg-gradient-to-t before:from-background before:to-transparent`,children:[d.jsx(s3,{status:t.sessionStatus??null,onStop:()=>t.send({type:"command",name:"goal",args:"cancel"})}),d.jsx(Mc,{layout:"dock",prompts:t.pendingPrompts,onAnswerPermission:t.answerPermission,onAnswerAsk:t.answerAsk,ownDriverId:t.ownDriverId,onFocusReturn:()=>m.current?.focus()}),C?null:d.jsx(u3,{ref:m,catalog:t.commandCatalog??null,status:t.sessionStatus??null,connected:t.status==="connected",running:t.isThinking,onStop:()=>t.send({type:"abort"}),queued:t.queuedPrompt,pickFiles:o,getPathForFile:c,onCancelQueue:()=>{t.send({type:"cancel-queue"}),t.send({type:"get-pending"})},onCommand:(D,Q)=>t.send({type:"command",name:D,...Q?{args:Q}:{}}),modelList:t.modelList,onRequestModelList:()=>t.requestModelList(),onSilentCommand:(D,Q)=>t.sendCommandSilently(D,Q),onManageProviders:()=>t.openSettings("providers"),onSubmit:D=>{if(!D.startsWith("/")){t.send({type:"submit",prompt:D});return}const[Q,...se]=D.slice(1).trim().split(/\s+/u);if(!Q)return;const me=se.join(" ");t.send({type:"command",name:Q,...me?{args:me}:{}})}})]})]}),T&&d.jsx("aside",{"aria-label":"Agents",className:"flex w-72 flex-shrink-0 overflow-hidden bg-sidebar",children:d.jsx(GE,{tasks:y,className:"flex-1",selectedEntryId:t.openEntryId??void 0,onSelect:D=>t.openExecutionDetail(D.id),onReturnToConversation:()=>t.closeExecutionDetail(),onStop:v,schedules:t.scheduledTasks,goal:N,onPauseSchedule:t.pauseSchedule,onResumeSchedule:t.resumeSchedule,onDeleteSchedule:t.deleteSchedule,onCancelGoal:()=>t.send({type:"command",name:"goal",args:"cancel"})})}),d.jsx(c3,{entry:S,status:t.executionDetailStatus,records:t.executionDetailRecords,error:t.executionDetailError,complete:t.executionDetailComplete,onClose:()=>t.closeExecutionDetail(),onLoadMore:()=>t.loadMoreExecutionDetail(),onStop:S?()=>v(S):void 0})]})]}),d.jsx(N3,{state:t}),d.jsx(G3,{state:t}),d.jsx(KE,{state:t}),d.jsx(d3,{open:t.helpOpen,onClose:()=>t.closeHelp(),catalog:t.commandCatalog})]})}function cf({tone:t,children:i}){return d.jsxs("div",{className:"agent-ui flex h-full flex-col bg-background text-foreground",children:[d.jsx("header",{className:"flex h-12 flex-shrink-0 items-center px-5",children:d.jsx(Hf,{})}),d.jsx("main",{className:"flex flex-1 items-center justify-center",children:d.jsxs("div",{className:"gui-rise flex max-w-[520px] flex-col items-center gap-4 px-8 text-center",children:[d.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${t==="fatal"?"bg-destructive":"animate-pulse bg-warning"}`}),d.jsx("div",{className:`text-[15px] leading-relaxed ${t==="fatal"?"text-foreground":"text-muted-foreground"}`,children:i})]})})]})}function J3({url:t,host:i}){const{storage:r}=ai(),u=oE(t);j.useEffect(()=>{u.status==="connected"&&i.signalReady()},[u.status,i]);const{openSettings:o}=u;j.useEffect(()=>i.onOpenSettings(o),[i,o]);const c=i.restartRuntime,f=u.sessionListing?.currentSessionId??null,p=c?async()=>{f&&JC(r.browserNamespace,f),await c()}:void 0;return d.jsx(K3,{state:u,surface:i.kind==="desktop"?"app":"web",personalUsageEnabled:!0,onReconnect:p,pickFiles:i.pickFiles,getPathForFile:i.getPathForFile,onOpenMemoryInEditor:i.openMemoryInEditor})}const Vc="rounded-lg px-4 py-2 text-[14px] font-medium disabled:opacity-60 focus-visible:outline focus-visible:outline-2";function P3({detail:t,retry:i}){const[r,u]=j.useState(!1),[o,c]=j.useState(null),f=()=>{i&&(u(!0),c(null),i().catch(p=>{u(!1),c(p instanceof Error?p.message:String(p))}))};return d.jsxs(d.Fragment,{children:[t?d.jsxs(d.Fragment,{children:["The agent process stopped:",d.jsx("pre",{className:"mt-4 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-card p-4 text-left font-mono text-[12.5px] leading-relaxed text-muted-foreground",children:t})]}):"The agent process stopped. Personal Usage is unavailable.",i?d.jsx("div",{className:"mt-4",children:d.jsx("button",{type:"button",onClick:f,disabled:r,className:"rounded-lg bg-primary px-4 py-2 text-[14px] font-medium text-primary-foreground hover:opacity-90 disabled:opacity-60",children:r?"Trying again…":"Try again"})}):d.jsx("p",{className:"mt-3",children:"Restart the app to reconnect."}),o?d.jsx("p",{className:"mt-3 text-[13px] text-destructive",children:o}):null]})}function W3({question:t,answer:i}){const{identity:r}=ai(),[u,o]=j.useState(!1),[c,f]=j.useState(null),p=g=>{o(!0),f(null),i(g).then(m=>{m.error!==void 0&&(o(!1),f(m.error))},m=>{o(!1),f(m instanceof Error?m.message:String(m))})};return d.jsx("div",{role:"dialog","aria-labelledby":"trust-title",className:"flex h-full flex-col",children:d.jsxs(cf,{tone:"muted",children:[d.jsx("h1",{id:"trust-title",className:"text-[16px] font-medium text-foreground",children:"Do you trust this folder?"}),d.jsx("p",{className:"mt-2 break-all font-mono text-[13px] text-foreground",children:t.folder}),d.jsxs("p",{className:"mt-3",children:["Trusting this folder lets ",r.displayName," use the project's own settings, hooks, skills and MCP servers. Restricted starts without them."]}),t.loads.length>0?d.jsxs("details",{className:"mt-4 text-left",children:[d.jsx("summary",{className:"cursor-pointer text-[13px] text-muted-foreground hover:text-foreground",children:"Details"}),d.jsx("pre",{"aria-label":"What trust would load",className:"mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-card p-4 font-mono text-[12px] leading-relaxed text-muted-foreground",children:t.loads.join(`
|
|
309
|
-
`)})]}):null,d.jsxs("div",{className:"mt-5 flex flex-wrap justify-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>p("trust"),disabled:u,className:`${Vc} bg-primary text-primary-foreground hover:opacity-90`,children:"Trust folder"}),d.jsx("button",{type:"button",onClick:()=>p("restricted"),disabled:u,className:`${Vc} bg-card text-foreground hover:opacity-90`,children:"Start Restricted"}),d.jsx("button",{type:"button",onClick:()=>p("quit"),disabled:u,className:`${Vc} text-muted-foreground hover:text-foreground`,children:"Quit"})]}),c?d.jsx("p",{role:"alert",className:"mt-3 whitespace-pre-wrap text-[13px] text-destructive",children:c}):null]})})}function e5({host:t,product:i}){return d.jsx(ZC,{value:i,children:d.jsx(t5,{host:t})})}function t5({host:t}){const[i,r]=j.useState(null),[u,o]=j.useState(null),[c,f]=j.useState(null);return j.useEffect(()=>{let p=!1;const g=t.onState((m,y)=>{m==="fatal"&&o(y?{detail:y}:{})});return(async()=>{const m=await t.trustQuestion?.()??null;if(p)return;if(m){f(m);return}const y=await t.getEndpoint();p||r(y)})(),()=>{p=!0,g()}},[t]),u?d.jsx("div",{role:"alert",className:"flex h-full flex-col",children:d.jsx(cf,{tone:"fatal",children:d.jsx(P3,{detail:u.detail,retry:t.restartRuntime})})}):c&&t.answerTrust?d.jsx(W3,{question:c,answer:t.answerTrust}):i?d.jsx(J3,{url:i,host:t}):d.jsx(cf,{tone:"muted",children:"Starting the agent…"})}class n5 extends df.Component{constructor(i){super(i),this.state={error:null}}static getDerivedStateFromError(i){return{error:i}}render(){return this.state.error?d.jsx("main",{className:"min-h-screen bg-[var(--background)] flex items-center justify-center p-8",children:d.jsxs("div",{className:"max-w-[600px] text-[15px] text-[var(--destructive)]",children:[d.jsx("p",{className:"mb-2 text-[20px] font-semibold text-[var(--foreground)]",children:"The application encountered an error"}),d.jsx("p",{className:"text-[var(--muted-foreground)] mb-2",children:this.state.error.message}),d.jsx("pre",{className:"overflow-auto whitespace-pre-wrap rounded-xl bg-[var(--card)] p-4 font-mono text-[12.5px] leading-relaxed text-[var(--muted-foreground)]",children:this.state.error.stack})]})}):this.props.children}}function l5(t,i){const r=t?.trim();return r||`ws://${i}`}function i5(t){return t.querySelector('meta[name="ws-url"]')?.getAttribute("content")??null}function r5(t){const i=i5(t.document);if(i?.trim())return i.trim();const r=new URLSearchParams(t.location.search).get("ws");return l5(r,t.location.host)}function a5(t){const{bridge:i}=t;if(i)return{kind:"desktop",getEndpoint:()=>i.getEndpoint(),signalReady:()=>i.signalReady(),onState:u=>i.onState(u),restartRuntime:()=>i.restartRuntime(),trustQuestion:i.runtimeMode==="remote"?void 0:()=>i.trustQuestion(),answerTrust:i.runtimeMode==="remote"?void 0:u=>i.answerTrust(u),pickFiles:i.runtimeMode==="remote"?void 0:()=>i.pickFiles(),getPathForFile:i.runtimeMode==="remote"?void 0:u=>i.getPathForFile(u),onOpenSettings:u=>i.onOpenSettings(u),openMemoryInEditor:i.runtimeMode==="remote"?void 0:u=>{i.openPath(u)}};const r=r5(t);return{kind:"browser",getEndpoint:async()=>r,signalReady:()=>{},onState:()=>()=>{},onOpenSettings:()=>()=>{}}}function u5(t){const i=t.getElementById("root");if(!i)throw new Error("No #root element");return i}var s5={identity:{id:"robota",displayName:"Robota",cliName:"robota",envPrefix:"ROBOTA_",packageScope:"@robota-sdk",repositoryUrl:"https://github.com/woojubb/robota",websiteUrl:"https://robota.io/",docsUrl:"https://docs.robota.io/",appId:"com.robota-sdk.desktop",protocolScheme:"robota"},storage:{browserNamespace:"robota",browserCredentialDatabase:"robota-credentials"},crypto:{namespace:"robota"},services:{}};const o5=a5({bridge:window.agentGui,document,location:window.location});C0.createRoot(u5(document)).render(d.jsx(df.StrictMode,{children:d.jsx(n5,{children:d.jsx("div",{className:"h-screen w-screen overflow-hidden",children:d.jsx(e5,{host:o5,product:E0(document,s5)})})})}));
|