vibe-coding-master 0.4.6 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,95 @@
1
+ var Z0=Object.defineProperty;var J0=(n,r,s)=>r in n?Z0(n,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[r]=s;var am=(n,r,s)=>J0(n,typeof r!="symbol"?r+"":r,s);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))o(d);new MutationObserver(d=>{for(const v of d)if(v.type==="childList")for(const f of v.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function s(d){const v={};return d.integrity&&(v.integrity=d.integrity),d.referrerPolicy&&(v.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?v.credentials="include":d.crossOrigin==="anonymous"?v.credentials="omit":v.credentials="same-origin",v}function o(d){if(d.ep)return;d.ep=!0;const v=s(d);fetch(d.href,v)}})();function Tg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var yu={exports:{}},_l={};/**
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 om;function e1(){if(om)return _l;om=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(o,d,v){var f=null;if(v!==void 0&&(f=""+v),d.key!==void 0&&(f=""+d.key),"key"in d){v={};for(var a in d)a!=="key"&&(v[a]=d[a])}else v=d;return d=v.ref,{$$typeof:n,type:o,key:f,ref:d!==void 0?d:null,props:v}}return _l.Fragment=r,_l.jsx=s,_l.jsxs=s,_l}var cm;function t1(){return cm||(cm=1,yu.exports=e1()),yu.exports}var T=t1(),Su={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 um;function n1(){if(um)return Ne;um=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),f=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),u=Symbol.for("react.activity"),b=Symbol.iterator;function C(H){return H===null||typeof H!="object"?null:(H=b&&H[b]||H["@@iterator"],typeof H=="function"?H:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,y={};function _(H,G,N){this.props=H,this.context=G,this.refs=y,this.updater=N||E}_.prototype.isReactComponent={},_.prototype.setState=function(H,G){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,G,"setState")},_.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function g(){}g.prototype=_.prototype;function S(H,G,N){this.props=H,this.context=G,this.refs=y,this.updater=N||E}var k=S.prototype=new g;k.constructor=S,x(k,_.prototype),k.isPureReactComponent=!0;var M=Array.isArray;function D(){}var R={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function L(H,G,N){var Z=N.ref;return{$$typeof:n,type:H,key:G,ref:Z!==void 0?Z:null,props:N}}function B(H,G){return L(H.type,G,H.props)}function I(H){return typeof H=="object"&&H!==null&&H.$$typeof===n}function U(H){var G={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(N){return G[N]})}var F=/\/+/g;function $(H,G){return typeof H=="object"&&H!==null&&H.key!=null?U(""+H.key):G.toString(36)}function K(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(D,D):(H.status="pending",H.then(function(G){H.status==="pending"&&(H.status="fulfilled",H.value=G)},function(G){H.status==="pending"&&(H.status="rejected",H.reason=G)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function V(H,G,N,Z,he){var _e=typeof H;(_e==="undefined"||_e==="boolean")&&(H=null);var X=!1;if(H===null)X=!0;else switch(_e){case"bigint":case"string":case"number":X=!0;break;case"object":switch(H.$$typeof){case n:case r:X=!0;break;case m:return X=H._init,V(X(H._payload),G,N,Z,he)}}if(X)return he=he(H),X=Z===""?"."+$(H,0):Z,M(he)?(N="",X!=null&&(N=X.replace(F,"$&/")+"/"),V(he,G,N,"",function(te){return te})):he!=null&&(I(he)&&(he=B(he,N+(he.key==null||H&&H.key===he.key?"":(""+he.key).replace(F,"$&/")+"/")+X)),G.push(he)),1;X=0;var q=Z===""?".":Z+":";if(M(H))for(var ce=0;ce<H.length;ce++)Z=H[ce],_e=q+$(Z,ce),X+=V(Z,G,N,_e,he);else if(ce=C(H),typeof ce=="function")for(H=ce.call(H),ce=0;!(Z=H.next()).done;)Z=Z.value,_e=q+$(Z,ce++),X+=V(Z,G,N,_e,he);else if(_e==="object"){if(typeof H.then=="function")return V(K(H),G,N,Z,he);throw G=String(H),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return X}function W(H,G,N){if(H==null)return H;var Z=[],he=0;return V(H,Z,"","",function(_e){return G.call(N,_e,he++)}),Z}function J(H){if(H._status===-1){var G=H._result;G=G(),G.then(function(N){(H._status===0||H._status===-1)&&(H._status=1,H._result=N)},function(N){(H._status===0||H._status===-1)&&(H._status=2,H._result=N)}),H._status===-1&&(H._status=0,H._result=G)}if(H._status===1)return H._result.default;throw H._result}var z=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},j={map:W,forEach:function(H,G,N){W(H,function(){G.apply(this,arguments)},N)},count:function(H){var G=0;return W(H,function(){G++}),G},toArray:function(H){return W(H,function(G){return G})||[]},only:function(H){if(!I(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return Ne.Activity=u,Ne.Children=j,Ne.Component=_,Ne.Fragment=s,Ne.Profiler=d,Ne.PureComponent=S,Ne.StrictMode=o,Ne.Suspense=c,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(H){return R.H.useMemoCache(H)}},Ne.cache=function(H){return function(){return H.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(H,G,N){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var Z=x({},H.props),he=H.key;if(G!=null)for(_e in G.key!==void 0&&(he=""+G.key),G)!A.call(G,_e)||_e==="key"||_e==="__self"||_e==="__source"||_e==="ref"&&G.ref===void 0||(Z[_e]=G[_e]);var _e=arguments.length-2;if(_e===1)Z.children=N;else if(1<_e){for(var X=Array(_e),q=0;q<_e;q++)X[q]=arguments[q+2];Z.children=X}return L(H.type,he,Z)},Ne.createContext=function(H){return H={$$typeof:f,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:v,_context:H},H},Ne.createElement=function(H,G,N){var Z,he={},_e=null;if(G!=null)for(Z in G.key!==void 0&&(_e=""+G.key),G)A.call(G,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(he[Z]=G[Z]);var X=arguments.length-2;if(X===1)he.children=N;else if(1<X){for(var q=Array(X),ce=0;ce<X;ce++)q[ce]=arguments[ce+2];he.children=q}if(H&&H.defaultProps)for(Z in X=H.defaultProps,X)he[Z]===void 0&&(he[Z]=X[Z]);return L(H,_e,he)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(H){return{$$typeof:a,render:H}},Ne.isValidElement=I,Ne.lazy=function(H){return{$$typeof:m,_payload:{_status:-1,_result:H},_init:J}},Ne.memo=function(H,G){return{$$typeof:h,type:H,compare:G===void 0?null:G}},Ne.startTransition=function(H){var G=R.T,N={};R.T=N;try{var Z=H(),he=R.S;he!==null&&he(N,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(D,z)}catch(_e){z(_e)}finally{G!==null&&N.types!==null&&(G.types=N.types),R.T=G}},Ne.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Ne.use=function(H){return R.H.use(H)},Ne.useActionState=function(H,G,N){return R.H.useActionState(H,G,N)},Ne.useCallback=function(H,G){return R.H.useCallback(H,G)},Ne.useContext=function(H){return R.H.useContext(H)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(H,G){return R.H.useDeferredValue(H,G)},Ne.useEffect=function(H,G){return R.H.useEffect(H,G)},Ne.useEffectEvent=function(H){return R.H.useEffectEvent(H)},Ne.useId=function(){return R.H.useId()},Ne.useImperativeHandle=function(H,G,N){return R.H.useImperativeHandle(H,G,N)},Ne.useInsertionEffect=function(H,G){return R.H.useInsertionEffect(H,G)},Ne.useLayoutEffect=function(H,G){return R.H.useLayoutEffect(H,G)},Ne.useMemo=function(H,G){return R.H.useMemo(H,G)},Ne.useOptimistic=function(H,G){return R.H.useOptimistic(H,G)},Ne.useReducer=function(H,G,N){return R.H.useReducer(H,G,N)},Ne.useRef=function(H){return R.H.useRef(H)},Ne.useState=function(H){return R.H.useState(H)},Ne.useSyncExternalStore=function(H,G,N){return R.H.useSyncExternalStore(H,G,N)},Ne.useTransition=function(){return R.H.useTransition()},Ne.version="19.2.6",Ne}var hm;function rh(){return hm||(hm=1,Su.exports=n1()),Su.exports}var re=rh(),bu={exports:{}},vl={},Cu={exports:{}},wu={};/**
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 fm;function i1(){return fm||(fm=1,(function(n){function r(V,W){var J=V.length;V.push(W);e:for(;0<J;){var z=J-1>>>1,j=V[z];if(0<d(j,W))V[z]=W,V[J]=j,J=z;else break e}}function s(V){return V.length===0?null:V[0]}function o(V){if(V.length===0)return null;var W=V[0],J=V.pop();if(J!==W){V[0]=J;e:for(var z=0,j=V.length,H=j>>>1;z<H;){var G=2*(z+1)-1,N=V[G],Z=G+1,he=V[Z];if(0>d(N,J))Z<j&&0>d(he,N)?(V[z]=he,V[Z]=J,z=Z):(V[z]=N,V[G]=J,z=G);else if(Z<j&&0>d(he,J))V[z]=he,V[Z]=J,z=Z;else break e}}return W}function d(V,W){var J=V.sortIndex-W.sortIndex;return J!==0?J:V.id-W.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var v=performance;n.unstable_now=function(){return v.now()}}else{var f=Date,a=f.now();n.unstable_now=function(){return f.now()-a}}var c=[],h=[],m=1,u=null,b=3,C=!1,E=!1,x=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function k(V){for(var W=s(h);W!==null;){if(W.callback===null)o(h);else if(W.startTime<=V)o(h),W.sortIndex=W.expirationTime,r(c,W);else break;W=s(h)}}function M(V){if(x=!1,k(V),!E)if(s(c)!==null)E=!0,D||(D=!0,U());else{var W=s(h);W!==null&&K(M,W.startTime-V)}}var D=!1,R=-1,A=5,L=-1;function B(){return y?!0:!(n.unstable_now()-L<A)}function I(){if(y=!1,D){var V=n.unstable_now();L=V;var W=!0;try{e:{E=!1,x&&(x=!1,g(R),R=-1),C=!0;var J=b;try{t:{for(k(V),u=s(c);u!==null&&!(u.expirationTime>V&&B());){var z=u.callback;if(typeof z=="function"){u.callback=null,b=u.priorityLevel;var j=z(u.expirationTime<=V);if(V=n.unstable_now(),typeof j=="function"){u.callback=j,k(V),W=!0;break t}u===s(c)&&o(c),k(V)}else o(c);u=s(c)}if(u!==null)W=!0;else{var H=s(h);H!==null&&K(M,H.startTime-V),W=!1}}break e}finally{u=null,b=J,C=!1}W=void 0}}finally{W?U():D=!1}}}var U;if(typeof S=="function")U=function(){S(I)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,$=F.port2;F.port1.onmessage=I,U=function(){$.postMessage(null)}}else U=function(){_(I,0)};function K(V,W){R=_(function(){V(n.unstable_now())},W)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(V){V.callback=null},n.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<V?Math.floor(1e3/V):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(V){switch(b){case 1:case 2:case 3:var W=3;break;default:W=b}var J=b;b=W;try{return V()}finally{b=J}},n.unstable_requestPaint=function(){y=!0},n.unstable_runWithPriority=function(V,W){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var J=b;b=V;try{return W()}finally{b=J}},n.unstable_scheduleCallback=function(V,W,J){var z=n.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?z+J:z):J=z,V){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=J+j,V={id:m++,callback:W,priorityLevel:V,startTime:J,expirationTime:j,sortIndex:-1},J>z?(V.sortIndex=J,r(h,V),s(c)===null&&V===s(h)&&(x?(g(R),R=-1):x=!0,K(M,J-z))):(V.sortIndex=j,r(c,V),E||C||(E=!0,D||(D=!0,U()))),V},n.unstable_shouldYield=B,n.unstable_wrapCallback=function(V){var W=b;return function(){var J=b;b=W;try{return V.apply(this,arguments)}finally{b=J}}}})(wu)),wu}var dm;function r1(){return dm||(dm=1,Cu.exports=i1()),Cu.exports}var xu={exports:{}},qt={};/**
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 pm;function s1(){if(pm)return qt;pm=1;var n=rh();function r(c){var h="https://react.dev/errors/"+c;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+c+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal");function v(c,h,m){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:u==null?null:""+u,children:c,containerInfo:h,implementation:m}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(c,h){if(c==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,qt.createPortal=function(c,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return v(c,h,null,m)},qt.flushSync=function(c){var h=f.T,m=o.p;try{if(f.T=null,o.p=2,c)return c()}finally{f.T=h,o.p=m,o.d.f()}},qt.preconnect=function(c,h){typeof c=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(c,h))},qt.prefetchDNS=function(c){typeof c=="string"&&o.d.D(c)},qt.preinit=function(c,h){if(typeof c=="string"&&h&&typeof h.as=="string"){var m=h.as,u=a(m,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,C=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?o.d.S(c,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:u,integrity:b,fetchPriority:C}):m==="script"&&o.d.X(c,{crossOrigin:u,integrity:b,fetchPriority:C,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},qt.preinitModule=function(c,h){if(typeof c=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=a(h.as,h.crossOrigin);o.d.M(c,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(c)},qt.preload=function(c,h){if(typeof c=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,u=a(m,h.crossOrigin);o.d.L(c,m,{crossOrigin:u,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},qt.preloadModule=function(c,h){if(typeof c=="string")if(h){var m=a(h.as,h.crossOrigin);o.d.m(c,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(c)},qt.requestFormReset=function(c){o.d.r(c)},qt.unstable_batchedUpdates=function(c,h){return c(h)},qt.useFormState=function(c,h,m){return f.H.useFormState(c,h,m)},qt.useFormStatus=function(){return f.H.useHostTransitionStatus()},qt.version="19.2.6",qt}var mm;function l1(){if(mm)return xu.exports;mm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),xu.exports=s1(),xu.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 gm;function a1(){if(gm)return vl;gm=1;var n=r1(),r=rh(),s=l1();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function v(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function a(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(v(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=v(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,l=t;;){var p=i.return;if(p===null)break;var w=p.alternate;if(w===null){if(l=p.return,l!==null){i=l;continue}break}if(p.child===w.child){for(w=p.child;w;){if(w===i)return c(p),e;if(w===l)return c(p),t;w=w.sibling}throw Error(o(188))}if(i.return!==l.return)i=p,l=w;else{for(var O=!1,P=p.child;P;){if(P===i){O=!0,i=p,l=w;break}if(P===l){O=!0,l=p,i=w;break}P=P.sibling}if(!O){for(P=w.child;P;){if(P===i){O=!0,i=w,l=p;break}if(P===l){O=!0,l=w,i=p;break}P=P.sibling}if(!O)throw Error(o(189))}}if(i.alternate!==l)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var u=Object.assign,b=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),S=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function U(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var F=Symbol.for("react.client.reference");function $(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===F?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case _:return"Profiler";case y:return"StrictMode";case M:return"Suspense";case D:return"SuspenseList";case L:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case S:return e.displayName||"Context";case g:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R:return t=e.displayName||null,t!==null?t:$(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return $(e(t))}catch{}}return null}var K=Array.isArray,V=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},z=[],j=-1;function H(e){return{current:e}}function G(e){0>j||(e.current=z[j],z[j]=null,j--)}function N(e,t){j++,z[j]=e.current,e.current=t}var Z=H(null),he=H(null),_e=H(null),X=H(null);function q(e,t){switch(N(_e,t),N(he,e),N(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Dp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Dp(t),e=Mp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(Z),N(Z,e)}function ce(){G(Z),G(he),G(_e)}function te(e){e.memoizedState!==null&&N(X,e);var t=Z.current,i=Mp(t,e.type);t!==i&&(N(he,e),N(Z,i))}function se(e){he.current===e&&(G(Z),G(he)),X.current===e&&(G(X),dl._currentValue=J)}var de,Ce;function xe(e){if(de===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||"",Ce=-1<i.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+de+e+Ce}var We=!1;function dt(e,t){if(!e||We)return"";We=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(ue){var oe=ue}Reflect.construct(e,[],ge)}else{try{ge.call()}catch(ue){oe=ue}e.call(ge.prototype)}}else{try{throw Error()}catch(ue){oe=ue}(ge=e())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(ue){if(ue&&oe&&typeof ue.stack=="string")return[ue.stack,oe.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=l.DetermineComponentFrameRoot(),O=w[0],P=w[1];if(O&&P){var Q=O.split(`
44
+ `),ae=P.split(`
45
+ `);for(p=l=0;l<Q.length&&!Q[l].includes("DetermineComponentFrameRoot");)l++;for(;p<ae.length&&!ae[p].includes("DetermineComponentFrameRoot");)p++;if(l===Q.length||p===ae.length)for(l=Q.length-1,p=ae.length-1;1<=l&&0<=p&&Q[l]!==ae[p];)p--;for(;1<=l&&0<=p;l--,p--)if(Q[l]!==ae[p]){if(l!==1||p!==1)do if(l--,p--,0>p||Q[l]!==ae[p]){var pe=`
46
+ `+Q[l].replace(" at new "," at ");return e.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",e.displayName)),pe}while(1<=l&&0<=p);break}}}finally{We=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?xe(i):""}function De(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe("Lazy");case 13:return e.child!==t&&t!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return dt(e.type,!1);case 11:return dt(e.type.render,!1);case 1:return dt(e.type,!0);case 31:return xe("Activity");default:return""}}function Wt(e){try{var t="",i=null;do t+=De(e,i),i=e,e=e.return;while(e);return t}catch(l){return`
47
+ Error generating stack: `+l.message+`
48
+ `+l.stack}}var Pt=Object.prototype.hasOwnProperty,Xt=n.unstable_scheduleCallback,Qt=n.unstable_cancelCallback,vn=n.unstable_shouldYield,St=n.unstable_requestPaint,Xe=n.unstable_now,pt=n.unstable_getCurrentPriorityLevel,fe=n.unstable_ImmediatePriority,Se=n.unstable_UserBlockingPriority,Ae=n.unstable_NormalPriority,Be=n.unstable_LowPriority,je=n.unstable_IdlePriority,ct=n.log,Ee=n.unstable_setDisableYieldValue,et=null,ut=null;function mt(e){if(typeof ct=="function"&&Ee(e),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(et,e)}catch{}}var Ke=Math.clz32?Math.clz32:Ji,Ft=Math.log,ht=Math.LN2;function Ji(e){return e>>>=0,e===0?32:31-(Ft(e)/ht|0)|0}var He=256,_i=262144,Vn=4194304;function $n(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function kr(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var p=0,w=e.suspendedLanes,O=e.pingedLanes;e=e.warmLanes;var P=l&134217727;return P!==0?(l=P&~w,l!==0?p=$n(l):(O&=P,O!==0?p=$n(O):i||(i=P&~e,i!==0&&(p=$n(i))))):(P=l&~w,P!==0?p=$n(P):O!==0?p=$n(O):i||(i=l&~e,i!==0&&(p=$n(i)))),p===0?0:t!==0&&t!==p&&(t&w)===0&&(w=p&-p,i=t&-t,w>=i||w===32&&(i&4194048)!==0)?t:p}function er(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ol(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tr(){var e=Vn;return Vn<<=1,(Vn&62914560)===0&&(Vn=4194304),e}function Ar(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function nr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Tr(e,t,i,l,p,w){var O=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var P=e.entanglements,Q=e.expirationTimes,ae=e.hiddenUpdates;for(i=O&~i;0<i;){var pe=31-Ke(i),ge=1<<pe;P[pe]=0,Q[pe]=-1;var oe=ae[pe];if(oe!==null)for(ae[pe]=null,pe=0;pe<oe.length;pe++){var ue=oe[pe];ue!==null&&(ue.lane&=-536870913)}i&=~ge}l!==0&&Ss(e,l,0),w!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=w&~(O&~t))}function Ss(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Ke(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|i&261930}function bs(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-Ke(i),p=1<<l;p&t|e[l]&t&&(e[l]|=t),i&=~p}}function Bt(e,t){var i=t&-t;return i=(i&42)!==0?1:Rr(i),(i&(e.suspendedLanes|t))!==0?0:i}function Rr(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 yn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vi(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:em(e.type))}function yi(e,t){var i=W.p;try{return W.p=e,t()}finally{W.p=i}}var Sn=Math.random().toString(36).slice(2),ne="__reactFiber$"+Sn,it="__reactProps$"+Sn,jn="__reactContainer$"+Sn,Dr="__reactEvents$"+Sn,Cs="__reactListeners$"+Sn,ws="__reactHandles$"+Sn,xs="__reactResources$"+Sn,ir="__reactMarker$"+Sn;function Es(e){delete e[ne],delete e[it],delete e[Dr],delete e[Cs],delete e[ws]}function At(e){var t=e[ne];if(t)return t;for(var i=e.parentNode;i;){if(t=i[jn]||i[ne]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=zp(e);e!==null;){if(i=e[ne])return i;e=zp(e)}return t}e=i,i=e.parentNode}return null}function Nt(e){if(e=e[ne]||e[jn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Si(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Wn(e){var t=e[xs];return t||(t=e[xs]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[ir]=!0}var Bl=new Set,rr={};function Kn(e,t){bi(e,t),bi(e+"Capture",t)}function bi(e,t){for(rr[e]=t,e=0;e<t.length;e++)Bl.add(t[e])}var po=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]*$"),jl={},Nl={};function sr(e){return Pt.call(Nl,e)?!0:Pt.call(jl,e)?!1:po.test(e)?Nl[e]=!0:(jl[e]=!0,!1)}function Nn(e,t,i){if(sr(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Hn(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function on(e,t,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+l)}}function Zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ks(e,t,i){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var p=l.get,w=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return p.call(this)},set:function(O){i=""+O,w.call(this,O)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(O){i=""+O},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zn(e){if(!e._valueTracker){var t=Mr(e)?"checked":"value";e._valueTracker=ks(e,t,""+e[t])}}function lr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=Mr(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function Dn(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 Yn=/[\n"\\]/g;function Me(e){return e.replace(Yn,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function As(e,t,i,l,p,w,O,P){e.name="",O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?e.type=O:e.removeAttribute("type"),t!=null?O==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Zt(t)):e.value!==""+Zt(t)&&(e.value=""+Zt(t)):O!=="submit"&&O!=="reset"||e.removeAttribute("value"),t!=null?Ts(e,O,Zt(t)):i!=null?Ts(e,O,Zt(i)):l!=null&&e.removeAttribute("value"),p==null&&w!=null&&(e.defaultChecked=!!w),p!=null&&(e.checked=p&&typeof p!="function"&&typeof p!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?e.name=""+Zt(P):e.removeAttribute("name")}function Hl(e,t,i,l,p,w,O,P){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(e.type=w),t!=null||i!=null){if(!(w!=="submit"&&w!=="reset"||t!=null)){zn(e);return}i=i!=null?""+Zt(i):"",t=t!=null?""+Zt(t):i,P||t===e.value||(e.value=t),e.defaultValue=t}l=l??p,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=P?e.checked:!!l,e.defaultChecked=!!l,O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(e.name=O),zn(e)}function Ts(e,t,i){t==="number"&&Dn(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ci(e,t,i,l){if(e=e.options,t){t={};for(var p=0;p<i.length;p++)t["$"+i[p]]=!0;for(i=0;i<e.length;i++)p=t.hasOwnProperty("$"+e[i].value),e[i].selected!==p&&(e[i].selected=p),p&&l&&(e[i].defaultSelected=!0)}else{for(i=""+Zt(i),t=null,p=0;p<e.length;p++){if(e[p].value===i){e[p].selected=!0,l&&(e[p].defaultSelected=!0);return}t!==null||e[p].disabled||(t=e[p])}t!==null&&(t.selected=!0)}}function Lr(e,t,i){if(t!=null&&(t=""+Zt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Zt(i):""}function Rs(e,t,i,l){if(t==null){if(l!=null){if(i!=null)throw Error(o(92));if(K(l)){if(1<l.length)throw Error(o(93));l=l[0]}i=l}i==null&&(i=""),t=i}i=Zt(t),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l),zn(e)}function Y(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var ve=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 gt(e,t,i){var l=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,i):typeof i!="number"||i===0||ve.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function xt(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var p in t)l=t[p],t.hasOwnProperty(p)&&i[p]!==l&&gt(e,p,l)}else for(var w in t)t.hasOwnProperty(w)&&gt(e,w,t[w])}function Xn(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 wi=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"]]),mo=/^[\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 zl(e){return mo.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qn(){}var go=null;function _o(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Or=null,Br=null;function Th(e){var t=Nt(e);if(t&&(e=t.stateNode)){var i=e[it]||null;e:switch(e=t.stateNode,t.type){case"input":if(As(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Me(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var l=i[t];if(l!==e&&l.form===e.form){var p=l[it]||null;if(!p)throw Error(o(90));As(l,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&lr(l)}break e;case"textarea":Lr(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ci(e,!!i.multiple,t,!1)}}}var vo=!1;function Rh(e,t,i){if(vo)return e(t,i);vo=!0;try{var l=e(t);return l}finally{if(vo=!1,(Or!==null||Br!==null)&&(Ea(),Or&&(t=Or,e=Br,Br=Or=null,Th(t),e)))for(t=0;t<e.length;t++)Th(e[t])}}function Ds(e,t){var i=e.stateNode;if(i===null)return null;var l=i[it]||null;if(l===null)return null;i=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var Zn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yo=!1;if(Zn)try{var Ms={};Object.defineProperty(Ms,"passive",{get:function(){yo=!0}}),window.addEventListener("test",Ms,Ms),window.removeEventListener("test",Ms,Ms)}catch{yo=!1}var xi=null,So=null,Il=null;function Dh(){if(Il)return Il;var e,t=So,i=t.length,l,p="value"in xi?xi.value:xi.textContent,w=p.length;for(e=0;e<i&&t[e]===p[e];e++);var O=i-e;for(l=1;l<=O&&t[i-l]===p[w-l];l++);return Il=p.slice(e,1<l?1-l:void 0)}function Ul(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Pl(){return!0}function Mh(){return!1}function Jt(e){function t(i,l,p,w,O){this._reactName=i,this._targetInst=p,this.type=l,this.nativeEvent=w,this.target=O,this.currentTarget=null;for(var P in e)e.hasOwnProperty(P)&&(i=e[P],this[P]=i?i(w):w[P]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Pl:Mh,this.isPropagationStopped=Mh,this}return u(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Pl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Pl)},persist:function(){},isPersistent:Pl}),t}var ar={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fl=Jt(ar),Ls=u({},ar,{view:0,detail:0}),X_=Jt(Ls),bo,Co,Os,ql=u({},Ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xo,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!==Os&&(Os&&e.type==="mousemove"?(bo=e.screenX-Os.screenX,Co=e.screenY-Os.screenY):Co=bo=0,Os=e),bo)},movementY:function(e){return"movementY"in e?e.movementY:Co}}),Lh=Jt(ql),Q_=u({},ql,{dataTransfer:0}),Z_=Jt(Q_),J_=u({},Ls,{relatedTarget:0}),wo=Jt(J_),ev=u({},ar,{animationName:0,elapsedTime:0,pseudoElement:0}),tv=Jt(ev),nv=u({},ar,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),iv=Jt(nv),rv=u({},ar,{data:0}),Oh=Jt(rv),sv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lv={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"},av={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ov(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=av[e])?!!t[e]:!1}function xo(){return ov}var cv=u({},Ls,{key:function(e){if(e.key){var t=sv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ul(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?lv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xo,charCode:function(e){return e.type==="keypress"?Ul(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ul(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),uv=Jt(cv),hv=u({},ql,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bh=Jt(hv),fv=u({},Ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xo}),dv=Jt(fv),pv=u({},ar,{propertyName:0,elapsedTime:0,pseudoElement:0}),mv=Jt(pv),gv=u({},ql,{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}),_v=Jt(gv),vv=u({},ar,{newState:0,oldState:0}),yv=Jt(vv),Sv=[9,13,27,32],Eo=Zn&&"CompositionEvent"in window,Bs=null;Zn&&"documentMode"in document&&(Bs=document.documentMode);var bv=Zn&&"TextEvent"in window&&!Bs,jh=Zn&&(!Eo||Bs&&8<Bs&&11>=Bs),Nh=" ",Hh=!1;function zh(e,t){switch(e){case"keyup":return Sv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ih(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jr=!1;function Cv(e,t){switch(e){case"compositionend":return Ih(t);case"keypress":return t.which!==32?null:(Hh=!0,Nh);case"textInput":return e=t.data,e===Nh&&Hh?null:e;default:return null}}function wv(e,t){if(jr)return e==="compositionend"||!Eo&&zh(e,t)?(e=Dh(),Il=So=xi=null,jr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return jh&&t.locale!=="ko"?null:t.data;default:return null}}var xv={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 Uh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xv[e.type]:t==="textarea"}function Ph(e,t,i,l){Or?Br?Br.push(l):Br=[l]:Or=l,t=La(t,"onChange"),0<t.length&&(i=new Fl("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var js=null,Ns=null;function Ev(e){xp(e,0)}function Gl(e){var t=Si(e);if(lr(t))return e}function Fh(e,t){if(e==="change")return t}var qh=!1;if(Zn){var ko;if(Zn){var Ao="oninput"in document;if(!Ao){var Gh=document.createElement("div");Gh.setAttribute("oninput","return;"),Ao=typeof Gh.oninput=="function"}ko=Ao}else ko=!1;qh=ko&&(!document.documentMode||9<document.documentMode)}function Vh(){js&&(js.detachEvent("onpropertychange",$h),Ns=js=null)}function $h(e){if(e.propertyName==="value"&&Gl(Ns)){var t=[];Ph(t,Ns,e,_o(e)),Rh(Ev,t)}}function kv(e,t,i){e==="focusin"?(Vh(),js=t,Ns=i,js.attachEvent("onpropertychange",$h)):e==="focusout"&&Vh()}function Av(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gl(Ns)}function Tv(e,t){if(e==="click")return Gl(t)}function Rv(e,t){if(e==="input"||e==="change")return Gl(t)}function Dv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cn=typeof Object.is=="function"?Object.is:Dv;function Hs(e,t){if(cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var p=i[l];if(!Pt.call(t,p)||!cn(e[p],t[p]))return!1}return!0}function Wh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kh(e,t){var i=Wh(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=t&&l>=t)return{node:i,offset:t-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Wh(i)}}function Yh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Dn(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Dn(e.document)}return t}function To(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Mv=Zn&&"documentMode"in document&&11>=document.documentMode,Nr=null,Ro=null,zs=null,Do=!1;function Qh(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Do||Nr==null||Nr!==Dn(l)||(l=Nr,"selectionStart"in l&&To(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),zs&&Hs(zs,l)||(zs=l,l=La(Ro,"onSelect"),0<l.length&&(t=new Fl("onSelect","select",null,t,i),e.push({event:t,listeners:l}),t.target=Nr)))}function or(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Hr={animationend:or("Animation","AnimationEnd"),animationiteration:or("Animation","AnimationIteration"),animationstart:or("Animation","AnimationStart"),transitionrun:or("Transition","TransitionRun"),transitionstart:or("Transition","TransitionStart"),transitioncancel:or("Transition","TransitionCancel"),transitionend:or("Transition","TransitionEnd")},Mo={},Zh={};Zn&&(Zh=document.createElement("div").style,"AnimationEvent"in window||(delete Hr.animationend.animation,delete Hr.animationiteration.animation,delete Hr.animationstart.animation),"TransitionEvent"in window||delete Hr.transitionend.transition);function cr(e){if(Mo[e])return Mo[e];if(!Hr[e])return e;var t=Hr[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Zh)return Mo[e]=t[i];return e}var Jh=cr("animationend"),ef=cr("animationiteration"),tf=cr("animationstart"),Lv=cr("transitionrun"),Ov=cr("transitionstart"),Bv=cr("transitioncancel"),nf=cr("transitionend"),rf=new Map,Lo="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(" ");Lo.push("scrollEnd");function Mn(e,t){rf.set(e,t),Kn(t,[e])}var Vl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},bn=[],zr=0,Oo=0;function $l(){for(var e=zr,t=Oo=zr=0;t<e;){var i=bn[t];bn[t++]=null;var l=bn[t];bn[t++]=null;var p=bn[t];bn[t++]=null;var w=bn[t];if(bn[t++]=null,l!==null&&p!==null){var O=l.pending;O===null?p.next=p:(p.next=O.next,O.next=p),l.pending=p}w!==0&&sf(i,p,w)}}function Wl(e,t,i,l){bn[zr++]=e,bn[zr++]=t,bn[zr++]=i,bn[zr++]=l,Oo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Bo(e,t,i,l){return Wl(e,t,i,l),Kl(e)}function ur(e,t){return Wl(e,null,null,t),Kl(e)}function sf(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var p=!1,w=e.return;w!==null;)w.childLanes|=i,l=w.alternate,l!==null&&(l.childLanes|=i),w.tag===22&&(e=w.stateNode,e===null||e._visibility&1||(p=!0)),e=w,w=w.return;return e.tag===3?(w=e.stateNode,p&&t!==null&&(p=31-Ke(i),e=w.hiddenUpdates,l=e[p],l===null?e[p]=[t]:l.push(t),t.lane=i|536870912),w):null}function Kl(e){if(50<ll)throw ll=0,qc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ir={};function jv(e,t,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(e,t,i,l){return new jv(e,t,i,l)}function jo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jn(e,t){var i=e.alternate;return i===null?(i=un(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function lf(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Yl(e,t,i,l,p,w){var O=0;if(l=e,typeof e=="function")jo(e)&&(O=1);else if(typeof e=="string")O=U0(e,i,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case L:return e=un(31,i,t,p),e.elementType=L,e.lanes=w,e;case x:return hr(i.children,p,w,t);case y:O=8,p|=24;break;case _:return e=un(12,i,t,p|2),e.elementType=_,e.lanes=w,e;case M:return e=un(13,i,t,p),e.elementType=M,e.lanes=w,e;case D:return e=un(19,i,t,p),e.elementType=D,e.lanes=w,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case S:O=10;break e;case g:O=9;break e;case k:O=11;break e;case R:O=14;break e;case A:O=16,l=null;break e}O=29,i=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=un(O,i,t,p),t.elementType=e,t.type=l,t.lanes=w,t}function hr(e,t,i,l){return e=un(7,e,l,t),e.lanes=i,e}function No(e,t,i){return e=un(6,e,null,t),e.lanes=i,e}function af(e){var t=un(18,null,null,0);return t.stateNode=e,t}function Ho(e,t,i){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var of=new WeakMap;function Cn(e,t){if(typeof e=="object"&&e!==null){var i=of.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Wt(t)},of.set(e,t),t)}return{value:e,source:t,stack:Wt(t)}}var Ur=[],Pr=0,Xl=null,Is=0,wn=[],xn=0,Ei=null,In=1,Un="";function ei(e,t){Ur[Pr++]=Is,Ur[Pr++]=Xl,Xl=e,Is=t}function cf(e,t,i){wn[xn++]=In,wn[xn++]=Un,wn[xn++]=Ei,Ei=e;var l=In;e=Un;var p=32-Ke(l)-1;l&=~(1<<p),i+=1;var w=32-Ke(t)+p;if(30<w){var O=p-p%5;w=(l&(1<<O)-1).toString(32),l>>=O,p-=O,In=1<<32-Ke(t)+p|i<<p|l,Un=w+e}else In=1<<w|i<<p|l,Un=e}function zo(e){e.return!==null&&(ei(e,1),cf(e,1,0))}function Io(e){for(;e===Xl;)Xl=Ur[--Pr],Ur[Pr]=null,Is=Ur[--Pr],Ur[Pr]=null;for(;e===Ei;)Ei=wn[--xn],wn[xn]=null,Un=wn[--xn],wn[xn]=null,In=wn[--xn],wn[xn]=null}function uf(e,t){wn[xn++]=In,wn[xn++]=Un,wn[xn++]=Ei,In=t.id,Un=t.overflow,Ei=e}var Ht=null,_t=null,$e=!1,ki=null,En=!1,Uo=Error(o(519));function Ai(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Us(Cn(t,e)),Uo}function hf(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[ne]=e,t[it]=l,i){case"dialog":Fe("cancel",t),Fe("close",t);break;case"iframe":case"object":case"embed":Fe("load",t);break;case"video":case"audio":for(i=0;i<ol.length;i++)Fe(ol[i],t);break;case"source":Fe("error",t);break;case"img":case"image":case"link":Fe("error",t),Fe("load",t);break;case"details":Fe("toggle",t);break;case"input":Fe("invalid",t),Hl(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Fe("invalid",t);break;case"textarea":Fe("invalid",t),Rs(t,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||l.suppressHydrationWarning===!0||Tp(t.textContent,i)?(l.popover!=null&&(Fe("beforetoggle",t),Fe("toggle",t)),l.onScroll!=null&&Fe("scroll",t),l.onScrollEnd!=null&&Fe("scrollend",t),l.onClick!=null&&(t.onclick=Qn),t=!0):t=!1,t||Ai(e,!0)}function ff(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:En=!1;return;case 27:case 3:En=!0;return;default:Ht=Ht.return}}function Fr(e){if(e!==Ht)return!1;if(!$e)return ff(e),$e=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||ru(e.type,e.memoizedProps)),i=!i),i&&_t&&Ai(e),ff(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));_t=Hp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));_t=Hp(e)}else t===27?(t=_t,Pi(e.type)?(e=cu,cu=null,_t=e):_t=t):_t=Ht?An(e.stateNode.nextSibling):null;return!0}function fr(){_t=Ht=null,$e=!1}function Po(){var e=ki;return e!==null&&(rn===null?rn=e:rn.push.apply(rn,e),ki=null),e}function Us(e){ki===null?ki=[e]:ki.push(e)}var Fo=H(null),dr=null,ti=null;function Ti(e,t,i){N(Fo,t._currentValue),t._currentValue=i}function ni(e){e._currentValue=Fo.current,G(Fo)}function qo(e,t,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===i)break;e=e.return}}function Go(e,t,i,l){var p=e.child;for(p!==null&&(p.return=e);p!==null;){var w=p.dependencies;if(w!==null){var O=p.child;w=w.firstContext;e:for(;w!==null;){var P=w;w=p;for(var Q=0;Q<t.length;Q++)if(P.context===t[Q]){w.lanes|=i,P=w.alternate,P!==null&&(P.lanes|=i),qo(w.return,i,e),l||(O=null);break e}w=P.next}}else if(p.tag===18){if(O=p.return,O===null)throw Error(o(341));O.lanes|=i,w=O.alternate,w!==null&&(w.lanes|=i),qo(O,i,e),O=null}else O=p.child;if(O!==null)O.return=p;else for(O=p;O!==null;){if(O===e){O=null;break}if(p=O.sibling,p!==null){p.return=O.return,O=p;break}O=O.return}p=O}}function qr(e,t,i,l){e=null;for(var p=t,w=!1;p!==null;){if(!w){if((p.flags&524288)!==0)w=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var O=p.alternate;if(O===null)throw Error(o(387));if(O=O.memoizedProps,O!==null){var P=p.type;cn(p.pendingProps.value,O.value)||(e!==null?e.push(P):e=[P])}}else if(p===X.current){if(O=p.alternate,O===null)throw Error(o(387));O.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(e!==null?e.push(dl):e=[dl])}p=p.return}e!==null&&Go(t,e,i,l),t.flags|=262144}function Ql(e){for(e=e.firstContext;e!==null;){if(!cn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function pr(e){dr=e,ti=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function zt(e){return df(dr,e)}function Zl(e,t){return dr===null&&pr(e),df(e,t)}function df(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},ti===null){if(e===null)throw Error(o(308));ti=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ti=ti.next=t;return i}var Nv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},Hv=n.unstable_scheduleCallback,zv=n.unstable_NormalPriority,Tt={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vo(){return{controller:new Nv,data:new Map,refCount:0}}function Ps(e){e.refCount--,e.refCount===0&&Hv(zv,function(){e.controller.abort()})}var Fs=null,$o=0,Gr=0,Vr=null;function Iv(e,t){if(Fs===null){var i=Fs=[];$o=0,Gr=Yc(),Vr={status:"pending",value:void 0,then:function(l){i.push(l)}}}return $o++,t.then(pf,pf),t}function pf(){if(--$o===0&&Fs!==null){Vr!==null&&(Vr.status="fulfilled");var e=Fs;Fs=null,Gr=0,Vr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Uv(e,t){var i=[],l={status:"pending",value:null,reason:null,then:function(p){i.push(p)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var p=0;p<i.length;p++)(0,i[p])(t)},function(p){for(l.status="rejected",l.reason=p,p=0;p<i.length;p++)(0,i[p])(void 0)}),l}var mf=V.S;V.S=function(e,t){Zd=Xe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Iv(e,t),mf!==null&&mf(e,t)};var mr=H(null);function Wo(){var e=mr.current;return e!==null?e:at.pooledCache}function Jl(e,t){t===null?N(mr,mr.current):N(mr,t.pool)}function gf(){var e=Wo();return e===null?null:{parent:Tt._currentValue,pool:e}}var $r=Error(o(460)),Ko=Error(o(474)),ea=Error(o(542)),ta={then:function(){}};function _f(e){return e=e.status,e==="fulfilled"||e==="rejected"}function vf(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Qn,Qn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Sf(e),e;default:if(typeof t.status=="string")t.then(Qn,Qn);else{if(e=at,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var p=t;p.status="fulfilled",p.value=l}},function(l){if(t.status==="pending"){var p=t;p.status="rejected",p.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Sf(e),e}throw _r=t,$r}}function gr(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(_r=i,$r):i}}var _r=null;function yf(){if(_r===null)throw Error(o(459));var e=_r;return _r=null,e}function Sf(e){if(e===$r||e===ea)throw Error(o(483))}var Wr=null,qs=0;function na(e){var t=qs;return qs+=1,Wr===null&&(Wr=[]),vf(Wr,e,t)}function Gs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ia(e,t){throw t.$$typeof===b?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function bf(e){function t(ie,ee){if(e){var le=ie.deletions;le===null?(ie.deletions=[ee],ie.flags|=16):le.push(ee)}}function i(ie,ee){if(!e)return null;for(;ee!==null;)t(ie,ee),ee=ee.sibling;return null}function l(ie){for(var ee=new Map;ie!==null;)ie.key!==null?ee.set(ie.key,ie):ee.set(ie.index,ie),ie=ie.sibling;return ee}function p(ie,ee){return ie=Jn(ie,ee),ie.index=0,ie.sibling=null,ie}function w(ie,ee,le){return ie.index=le,e?(le=ie.alternate,le!==null?(le=le.index,le<ee?(ie.flags|=67108866,ee):le):(ie.flags|=67108866,ee)):(ie.flags|=1048576,ee)}function O(ie){return e&&ie.alternate===null&&(ie.flags|=67108866),ie}function P(ie,ee,le,me){return ee===null||ee.tag!==6?(ee=No(le,ie.mode,me),ee.return=ie,ee):(ee=p(ee,le),ee.return=ie,ee)}function Q(ie,ee,le,me){var Re=le.type;return Re===x?pe(ie,ee,le.props.children,me,le.key):ee!==null&&(ee.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===A&&gr(Re)===ee.type)?(ee=p(ee,le.props),Gs(ee,le),ee.return=ie,ee):(ee=Yl(le.type,le.key,le.props,null,ie.mode,me),Gs(ee,le),ee.return=ie,ee)}function ae(ie,ee,le,me){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==le.containerInfo||ee.stateNode.implementation!==le.implementation?(ee=Ho(le,ie.mode,me),ee.return=ie,ee):(ee=p(ee,le.children||[]),ee.return=ie,ee)}function pe(ie,ee,le,me,Re){return ee===null||ee.tag!==7?(ee=hr(le,ie.mode,me,Re),ee.return=ie,ee):(ee=p(ee,le),ee.return=ie,ee)}function ge(ie,ee,le){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=No(""+ee,ie.mode,le),ee.return=ie,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case C:return le=Yl(ee.type,ee.key,ee.props,null,ie.mode,le),Gs(le,ee),le.return=ie,le;case E:return ee=Ho(ee,ie.mode,le),ee.return=ie,ee;case A:return ee=gr(ee),ge(ie,ee,le)}if(K(ee)||U(ee))return ee=hr(ee,ie.mode,le,null),ee.return=ie,ee;if(typeof ee.then=="function")return ge(ie,na(ee),le);if(ee.$$typeof===S)return ge(ie,Zl(ie,ee),le);ia(ie,ee)}return null}function oe(ie,ee,le,me){var Re=ee!==null?ee.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Re!==null?null:P(ie,ee,""+le,me);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case C:return le.key===Re?Q(ie,ee,le,me):null;case E:return le.key===Re?ae(ie,ee,le,me):null;case A:return le=gr(le),oe(ie,ee,le,me)}if(K(le)||U(le))return Re!==null?null:pe(ie,ee,le,me,null);if(typeof le.then=="function")return oe(ie,ee,na(le),me);if(le.$$typeof===S)return oe(ie,ee,Zl(ie,le),me);ia(ie,le)}return null}function ue(ie,ee,le,me,Re){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return ie=ie.get(le)||null,P(ee,ie,""+me,Re);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case C:return ie=ie.get(me.key===null?le:me.key)||null,Q(ee,ie,me,Re);case E:return ie=ie.get(me.key===null?le:me.key)||null,ae(ee,ie,me,Re);case A:return me=gr(me),ue(ie,ee,le,me,Re)}if(K(me)||U(me))return ie=ie.get(le)||null,pe(ee,ie,me,Re,null);if(typeof me.then=="function")return ue(ie,ee,le,na(me),Re);if(me.$$typeof===S)return ue(ie,ee,le,Zl(ee,me),Re);ia(ee,me)}return null}function ke(ie,ee,le,me){for(var Re=null,Qe=null,Te=ee,Ie=ee=0,Ve=null;Te!==null&&Ie<le.length;Ie++){Te.index>Ie?(Ve=Te,Te=null):Ve=Te.sibling;var Ze=oe(ie,Te,le[Ie],me);if(Ze===null){Te===null&&(Te=Ve);break}e&&Te&&Ze.alternate===null&&t(ie,Te),ee=w(Ze,ee,Ie),Qe===null?Re=Ze:Qe.sibling=Ze,Qe=Ze,Te=Ve}if(Ie===le.length)return i(ie,Te),$e&&ei(ie,Ie),Re;if(Te===null){for(;Ie<le.length;Ie++)Te=ge(ie,le[Ie],me),Te!==null&&(ee=w(Te,ee,Ie),Qe===null?Re=Te:Qe.sibling=Te,Qe=Te);return $e&&ei(ie,Ie),Re}for(Te=l(Te);Ie<le.length;Ie++)Ve=ue(Te,ie,Ie,le[Ie],me),Ve!==null&&(e&&Ve.alternate!==null&&Te.delete(Ve.key===null?Ie:Ve.key),ee=w(Ve,ee,Ie),Qe===null?Re=Ve:Qe.sibling=Ve,Qe=Ve);return e&&Te.forEach(function($i){return t(ie,$i)}),$e&&ei(ie,Ie),Re}function Oe(ie,ee,le,me){if(le==null)throw Error(o(151));for(var Re=null,Qe=null,Te=ee,Ie=ee=0,Ve=null,Ze=le.next();Te!==null&&!Ze.done;Ie++,Ze=le.next()){Te.index>Ie?(Ve=Te,Te=null):Ve=Te.sibling;var $i=oe(ie,Te,Ze.value,me);if($i===null){Te===null&&(Te=Ve);break}e&&Te&&$i.alternate===null&&t(ie,Te),ee=w($i,ee,Ie),Qe===null?Re=$i:Qe.sibling=$i,Qe=$i,Te=Ve}if(Ze.done)return i(ie,Te),$e&&ei(ie,Ie),Re;if(Te===null){for(;!Ze.done;Ie++,Ze=le.next())Ze=ge(ie,Ze.value,me),Ze!==null&&(ee=w(Ze,ee,Ie),Qe===null?Re=Ze:Qe.sibling=Ze,Qe=Ze);return $e&&ei(ie,Ie),Re}for(Te=l(Te);!Ze.done;Ie++,Ze=le.next())Ze=ue(Te,ie,Ie,Ze.value,me),Ze!==null&&(e&&Ze.alternate!==null&&Te.delete(Ze.key===null?Ie:Ze.key),ee=w(Ze,ee,Ie),Qe===null?Re=Ze:Qe.sibling=Ze,Qe=Ze);return e&&Te.forEach(function(Q0){return t(ie,Q0)}),$e&&ei(ie,Ie),Re}function lt(ie,ee,le,me){if(typeof le=="object"&&le!==null&&le.type===x&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case C:e:{for(var Re=le.key;ee!==null;){if(ee.key===Re){if(Re=le.type,Re===x){if(ee.tag===7){i(ie,ee.sibling),me=p(ee,le.props.children),me.return=ie,ie=me;break e}}else if(ee.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===A&&gr(Re)===ee.type){i(ie,ee.sibling),me=p(ee,le.props),Gs(me,le),me.return=ie,ie=me;break e}i(ie,ee);break}else t(ie,ee);ee=ee.sibling}le.type===x?(me=hr(le.props.children,ie.mode,me,le.key),me.return=ie,ie=me):(me=Yl(le.type,le.key,le.props,null,ie.mode,me),Gs(me,le),me.return=ie,ie=me)}return O(ie);case E:e:{for(Re=le.key;ee!==null;){if(ee.key===Re)if(ee.tag===4&&ee.stateNode.containerInfo===le.containerInfo&&ee.stateNode.implementation===le.implementation){i(ie,ee.sibling),me=p(ee,le.children||[]),me.return=ie,ie=me;break e}else{i(ie,ee);break}else t(ie,ee);ee=ee.sibling}me=Ho(le,ie.mode,me),me.return=ie,ie=me}return O(ie);case A:return le=gr(le),lt(ie,ee,le,me)}if(K(le))return ke(ie,ee,le,me);if(U(le)){if(Re=U(le),typeof Re!="function")throw Error(o(150));return le=Re.call(le),Oe(ie,ee,le,me)}if(typeof le.then=="function")return lt(ie,ee,na(le),me);if(le.$$typeof===S)return lt(ie,ee,Zl(ie,le),me);ia(ie,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,ee!==null&&ee.tag===6?(i(ie,ee.sibling),me=p(ee,le),me.return=ie,ie=me):(i(ie,ee),me=No(le,ie.mode,me),me.return=ie,ie=me),O(ie)):i(ie,ee)}return function(ie,ee,le,me){try{qs=0;var Re=lt(ie,ee,le,me);return Wr=null,Re}catch(Te){if(Te===$r||Te===ea)throw Te;var Qe=un(29,Te,null,ie.mode);return Qe.lanes=me,Qe.return=ie,Qe}finally{}}}var vr=bf(!0),Cf=bf(!1),Ri=!1;function Yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Di(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Mi(e,t,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Je&2)!==0){var p=l.pending;return p===null?t.next=t:(t.next=p.next,p.next=t),l.pending=t,t=Kl(e),sf(e,null,i),t}return Wl(e,l,t,i),Kl(e)}function Vs(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,bs(e,i)}}function Qo(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var p=null,w=null;if(i=i.firstBaseUpdate,i!==null){do{var O={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};w===null?p=w=O:w=w.next=O,i=i.next}while(i!==null);w===null?p=w=t:w=w.next=t}else p=w=t;i={baseState:l.baseState,firstBaseUpdate:p,lastBaseUpdate:w,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Zo=!1;function $s(){if(Zo){var e=Vr;if(e!==null)throw e}}function Ws(e,t,i,l){Zo=!1;var p=e.updateQueue;Ri=!1;var w=p.firstBaseUpdate,O=p.lastBaseUpdate,P=p.shared.pending;if(P!==null){p.shared.pending=null;var Q=P,ae=Q.next;Q.next=null,O===null?w=ae:O.next=ae,O=Q;var pe=e.alternate;pe!==null&&(pe=pe.updateQueue,P=pe.lastBaseUpdate,P!==O&&(P===null?pe.firstBaseUpdate=ae:P.next=ae,pe.lastBaseUpdate=Q))}if(w!==null){var ge=p.baseState;O=0,pe=ae=Q=null,P=w;do{var oe=P.lane&-536870913,ue=oe!==P.lane;if(ue?(Ge&oe)===oe:(l&oe)===oe){oe!==0&&oe===Gr&&(Zo=!0),pe!==null&&(pe=pe.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var ke=e,Oe=P;oe=t;var lt=i;switch(Oe.tag){case 1:if(ke=Oe.payload,typeof ke=="function"){ge=ke.call(lt,ge,oe);break e}ge=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Oe.payload,oe=typeof ke=="function"?ke.call(lt,ge,oe):ke,oe==null)break e;ge=u({},ge,oe);break e;case 2:Ri=!0}}oe=P.callback,oe!==null&&(e.flags|=64,ue&&(e.flags|=8192),ue=p.callbacks,ue===null?p.callbacks=[oe]:ue.push(oe))}else ue={lane:oe,tag:P.tag,payload:P.payload,callback:P.callback,next:null},pe===null?(ae=pe=ue,Q=ge):pe=pe.next=ue,O|=oe;if(P=P.next,P===null){if(P=p.shared.pending,P===null)break;ue=P,P=ue.next,ue.next=null,p.lastBaseUpdate=ue,p.shared.pending=null}}while(!0);pe===null&&(Q=ge),p.baseState=Q,p.firstBaseUpdate=ae,p.lastBaseUpdate=pe,w===null&&(p.shared.lanes=0),Ni|=O,e.lanes=O,e.memoizedState=ge}}function wf(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function xf(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)wf(i[e],t)}var Kr=H(null),ra=H(0);function Ef(e,t){e=hi,N(ra,e),N(Kr,t),hi=e|t.baseLanes}function Jo(){N(ra,hi),N(Kr,Kr.current)}function ec(){hi=ra.current,G(Kr),G(ra)}var hn=H(null),kn=null;function Li(e){var t=e.alternate;N(Et,Et.current&1),N(hn,e),kn===null&&(t===null||Kr.current!==null||t.memoizedState!==null)&&(kn=e)}function tc(e){N(Et,Et.current),N(hn,e),kn===null&&(kn=e)}function kf(e){e.tag===22?(N(Et,Et.current),N(hn,e),kn===null&&(kn=e)):Oi()}function Oi(){N(Et,Et.current),N(hn,hn.current)}function fn(e){G(hn),kn===e&&(kn=null),G(Et)}var Et=H(0);function sa(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||au(i)||ou(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ii=0,ze=null,rt=null,Rt=null,la=!1,Yr=!1,yr=!1,aa=0,Ks=0,Xr=null,Pv=0;function Ct(){throw Error(o(321))}function nc(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!cn(e[i],t[i]))return!1;return!0}function ic(e,t,i,l,p,w){return ii=w,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?cd:vc,yr=!1,w=i(l,p),yr=!1,Yr&&(w=Tf(t,i,l,p)),Af(e),w}function Af(e){V.H=Qs;var t=rt!==null&&rt.next!==null;if(ii=0,Rt=rt=ze=null,la=!1,Ks=0,Xr=null,t)throw Error(o(300));e===null||Dt||(e=e.dependencies,e!==null&&Ql(e)&&(Dt=!0))}function Tf(e,t,i,l){ze=e;var p=0;do{if(Yr&&(Xr=null),Ks=0,Yr=!1,25<=p)throw Error(o(301));if(p+=1,Rt=rt=null,e.updateQueue!=null){var w=e.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}V.H=ud,w=t(i,l)}while(Yr);return w}function Fv(){var e=V.H,t=e.useState()[0];return t=typeof t.then=="function"?Ys(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(ze.flags|=1024),t}function rc(){var e=aa!==0;return aa=0,e}function sc(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function lc(e){if(la){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}la=!1}ii=0,Rt=rt=ze=null,Yr=!1,Ks=aa=0,Xr=null}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?ze.memoizedState=Rt=e:Rt=Rt.next=e,Rt}function kt(){if(rt===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Rt===null?ze.memoizedState:Rt.next;if(t!==null)Rt=t,rt=e;else{if(e===null)throw ze.alternate===null?Error(o(467)):Error(o(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Rt===null?ze.memoizedState=Rt=e:Rt=Rt.next=e}return Rt}function oa(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ys(e){var t=Ks;return Ks+=1,Xr===null&&(Xr=[]),e=vf(Xr,e,t),t=ze,(Rt===null?t.memoizedState:Rt.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?cd:vc),e}function ca(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ys(e);if(e.$$typeof===S)return zt(e)}throw Error(o(438,String(e)))}function ac(e){var t=null,i=ze.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var l=ze.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(p){return p.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=oa(),ze.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),l=0;l<e;l++)i[l]=B;return t.index++,i}function ri(e,t){return typeof t=="function"?t(e):t}function ua(e){var t=kt();return oc(t,rt,e)}function oc(e,t,i){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var p=e.baseQueue,w=l.pending;if(w!==null){if(p!==null){var O=p.next;p.next=w.next,w.next=O}t.baseQueue=p=w,l.pending=null}if(w=e.baseState,p===null)e.memoizedState=w;else{t=p.next;var P=O=null,Q=null,ae=t,pe=!1;do{var ge=ae.lane&-536870913;if(ge!==ae.lane?(Ge&ge)===ge:(ii&ge)===ge){var oe=ae.revertLane;if(oe===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),ge===Gr&&(pe=!0);else if((ii&oe)===oe){ae=ae.next,oe===Gr&&(pe=!0);continue}else ge={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Q===null?(P=Q=ge,O=w):Q=Q.next=ge,ze.lanes|=oe,Ni|=oe;ge=ae.action,yr&&i(w,ge),w=ae.hasEagerState?ae.eagerState:i(w,ge)}else oe={lane:ge,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Q===null?(P=Q=oe,O=w):Q=Q.next=oe,ze.lanes|=ge,Ni|=ge;ae=ae.next}while(ae!==null&&ae!==t);if(Q===null?O=w:Q.next=P,!cn(w,e.memoizedState)&&(Dt=!0,pe&&(i=Vr,i!==null)))throw i;e.memoizedState=w,e.baseState=O,e.baseQueue=Q,l.lastRenderedState=w}return p===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function cc(e){var t=kt(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var l=i.dispatch,p=i.pending,w=t.memoizedState;if(p!==null){i.pending=null;var O=p=p.next;do w=e(w,O.action),O=O.next;while(O!==p);cn(w,t.memoizedState)||(Dt=!0),t.memoizedState=w,t.baseQueue===null&&(t.baseState=w),i.lastRenderedState=w}return[w,l]}function Rf(e,t,i){var l=ze,p=kt(),w=$e;if(w){if(i===void 0)throw Error(o(407));i=i()}else i=t();var O=!cn((rt||p).memoizedState,i);if(O&&(p.memoizedState=i,Dt=!0),p=p.queue,fc(Lf.bind(null,l,p,e),[e]),p.getSnapshot!==t||O||Rt!==null&&Rt.memoizedState.tag&1){if(l.flags|=2048,Qr(9,{destroy:void 0},Mf.bind(null,l,p,i,t),null),at===null)throw Error(o(349));w||(ii&127)!==0||Df(l,t,i)}return i}function Df(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=ze.updateQueue,t===null?(t=oa(),ze.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Mf(e,t,i,l){t.value=i,t.getSnapshot=l,Of(t)&&Bf(e)}function Lf(e,t,i){return i(function(){Of(t)&&Bf(e)})}function Of(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!cn(e,i)}catch{return!0}}function Bf(e){var t=ur(e,2);t!==null&&sn(t,e,2)}function uc(e){var t=Kt();if(typeof e=="function"){var i=e;if(e=i(),yr){mt(!0);try{i()}finally{mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:e},t}function jf(e,t,i,l){return e.baseState=i,oc(e,rt,typeof l=="function"?l:ri)}function qv(e,t,i,l,p){if(da(e))throw Error(o(485));if(e=t.action,e!==null){var w={payload:p,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(O){w.listeners.push(O)}};V.T!==null?i(!0):w.isTransition=!1,l(w),i=t.pending,i===null?(w.next=t.pending=w,Nf(t,w)):(w.next=i.next,t.pending=i.next=w)}}function Nf(e,t){var i=t.action,l=t.payload,p=e.state;if(t.isTransition){var w=V.T,O={};V.T=O;try{var P=i(p,l),Q=V.S;Q!==null&&Q(O,P),Hf(e,t,P)}catch(ae){hc(e,t,ae)}finally{w!==null&&O.types!==null&&(w.types=O.types),V.T=w}}else try{w=i(p,l),Hf(e,t,w)}catch(ae){hc(e,t,ae)}}function Hf(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){zf(e,t,l)},function(l){return hc(e,t,l)}):zf(e,t,i)}function zf(e,t,i){t.status="fulfilled",t.value=i,If(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Nf(e,i)))}function hc(e,t,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=i,If(t),t=t.next;while(t!==l)}e.action=null}function If(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Uf(e,t){return t}function Pf(e,t){if($e){var i=at.formState;if(i!==null){e:{var l=ze;if($e){if(_t){t:{for(var p=_t,w=En;p.nodeType!==8;){if(!w){p=null;break t}if(p=An(p.nextSibling),p===null){p=null;break t}}w=p.data,p=w==="F!"||w==="F"?p:null}if(p){_t=An(p.nextSibling),l=p.data==="F!";break e}}Ai(l)}l=!1}l&&(t=i[0])}}return i=Kt(),i.memoizedState=i.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uf,lastRenderedState:t},i.queue=l,i=ld.bind(null,ze,l),l.dispatch=i,l=uc(!1),w=_c.bind(null,ze,!1,l.queue),l=Kt(),p={state:t,dispatch:null,action:e,pending:null},l.queue=p,i=qv.bind(null,ze,p,w,i),p.dispatch=i,l.memoizedState=e,[t,i,!1]}function Ff(e){var t=kt();return qf(t,rt,e)}function qf(e,t,i){if(t=oc(e,t,Uf)[0],e=ua(ri)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ys(t)}catch(O){throw O===$r?ea:O}else l=t;t=kt();var p=t.queue,w=p.dispatch;return i!==t.memoizedState&&(ze.flags|=2048,Qr(9,{destroy:void 0},Gv.bind(null,p,i),null)),[l,w,e]}function Gv(e,t){e.action=t}function Gf(e){var t=kt(),i=rt;if(i!==null)return qf(t,i,e);kt(),t=t.memoizedState,i=kt();var l=i.queue.dispatch;return i.memoizedState=e,[t,l,!1]}function Qr(e,t,i,l){return e={tag:e,create:i,deps:l,inst:t,next:null},t=ze.updateQueue,t===null&&(t=oa(),ze.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,t.lastEffect=e),e}function Vf(){return kt().memoizedState}function ha(e,t,i,l){var p=Kt();ze.flags|=e,p.memoizedState=Qr(1|t,{destroy:void 0},i,l===void 0?null:l)}function fa(e,t,i,l){var p=kt();l=l===void 0?null:l;var w=p.memoizedState.inst;rt!==null&&l!==null&&nc(l,rt.memoizedState.deps)?p.memoizedState=Qr(t,w,i,l):(ze.flags|=e,p.memoizedState=Qr(1|t,w,i,l))}function $f(e,t){ha(8390656,8,e,t)}function fc(e,t){fa(2048,8,e,t)}function Vv(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=oa(),ze.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Wf(e){var t=kt().memoizedState;return Vv({ref:t,nextImpl:e}),function(){if((Je&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Kf(e,t){return fa(4,2,e,t)}function Yf(e,t){return fa(4,4,e,t)}function Xf(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Qf(e,t,i){i=i!=null?i.concat([e]):null,fa(4,4,Xf.bind(null,t,e),i)}function dc(){}function Zf(e,t){var i=kt();t=t===void 0?null:t;var l=i.memoizedState;return t!==null&&nc(t,l[1])?l[0]:(i.memoizedState=[e,t],e)}function Jf(e,t){var i=kt();t=t===void 0?null:t;var l=i.memoizedState;if(t!==null&&nc(t,l[1]))return l[0];if(l=e(),yr){mt(!0);try{e()}finally{mt(!1)}}return i.memoizedState=[l,t],l}function pc(e,t,i){return i===void 0||(ii&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=ep(),ze.lanes|=e,Ni|=e,i)}function ed(e,t,i,l){return cn(i,t)?i:Kr.current!==null?(e=pc(e,i,l),cn(e,t)||(Dt=!0),e):(ii&42)===0||(ii&1073741824)!==0&&(Ge&261930)===0?(Dt=!0,e.memoizedState=i):(e=ep(),ze.lanes|=e,Ni|=e,t)}function td(e,t,i,l,p){var w=W.p;W.p=w!==0&&8>w?w:8;var O=V.T,P={};V.T=P,_c(e,!1,t,i);try{var Q=p(),ae=V.S;if(ae!==null&&ae(P,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var pe=Uv(Q,l);Xs(e,t,pe,mn(e))}else Xs(e,t,l,mn(e))}catch(ge){Xs(e,t,{then:function(){},status:"rejected",reason:ge},mn())}finally{W.p=w,O!==null&&P.types!==null&&(O.types=P.types),V.T=O}}function $v(){}function mc(e,t,i,l){if(e.tag!==5)throw Error(o(476));var p=nd(e).queue;td(e,p,t,J,i===null?$v:function(){return id(e),i(l)})}function nd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:J},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function id(e){var t=nd(e);t.next===null&&(t=e.alternate.memoizedState),Xs(e,t.next.queue,{},mn())}function gc(){return zt(dl)}function rd(){return kt().memoizedState}function sd(){return kt().memoizedState}function Wv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=mn();e=Di(i);var l=Mi(t,e,i);l!==null&&(sn(l,t,i),Vs(l,t,i)),t={cache:Vo()},e.payload=t;return}t=t.return}}function Kv(e,t,i){var l=mn();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},da(e)?ad(t,i):(i=Bo(e,t,i,l),i!==null&&(sn(i,e,l),od(i,t,l)))}function ld(e,t,i){var l=mn();Xs(e,t,i,l)}function Xs(e,t,i,l){var p={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(da(e))ad(t,p);else{var w=e.alternate;if(e.lanes===0&&(w===null||w.lanes===0)&&(w=t.lastRenderedReducer,w!==null))try{var O=t.lastRenderedState,P=w(O,i);if(p.hasEagerState=!0,p.eagerState=P,cn(P,O))return Wl(e,t,p,0),at===null&&$l(),!1}catch{}finally{}if(i=Bo(e,t,p,l),i!==null)return sn(i,e,l),od(i,t,l),!0}return!1}function _c(e,t,i,l){if(l={lane:2,revertLane:Yc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},da(e)){if(t)throw Error(o(479))}else t=Bo(e,i,l,2),t!==null&&sn(t,e,2)}function da(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function ad(e,t){Yr=la=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function od(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,bs(e,i)}}var Qs={readContext:zt,use:ca,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct};Qs.useEffectEvent=Ct;var cd={readContext:zt,use:ca,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:$f,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,ha(4194308,4,Xf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return ha(4194308,4,e,t)},useInsertionEffect:function(e,t){ha(4,2,e,t)},useMemo:function(e,t){var i=Kt();t=t===void 0?null:t;var l=e();if(yr){mt(!0);try{e()}finally{mt(!1)}}return i.memoizedState=[l,t],l},useReducer:function(e,t,i){var l=Kt();if(i!==void 0){var p=i(t);if(yr){mt(!0);try{i(t)}finally{mt(!1)}}}else p=t;return l.memoizedState=l.baseState=p,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:p},l.queue=e,e=e.dispatch=Kv.bind(null,ze,e),[l.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:function(e){e=uc(e);var t=e.queue,i=ld.bind(null,ze,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:dc,useDeferredValue:function(e,t){var i=Kt();return pc(i,e,t)},useTransition:function(){var e=uc(!1);return e=td.bind(null,ze,e.queue,!0,!1),Kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=ze,p=Kt();if($e){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),at===null)throw Error(o(349));(Ge&127)!==0||Df(l,t,i)}p.memoizedState=i;var w={value:i,getSnapshot:t};return p.queue=w,$f(Lf.bind(null,l,w,e),[e]),l.flags|=2048,Qr(9,{destroy:void 0},Mf.bind(null,l,w,i,t),null),i},useId:function(){var e=Kt(),t=at.identifierPrefix;if($e){var i=Un,l=In;i=(l&~(1<<32-Ke(l)-1)).toString(32)+i,t="_"+t+"R_"+i,i=aa++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Pv++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:gc,useFormState:Pf,useActionState:Pf,useOptimistic:function(e){var t=Kt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=_c.bind(null,ze,!0,i),i.dispatch=t,[e,t]},useMemoCache:ac,useCacheRefresh:function(){return Kt().memoizedState=Wv.bind(null,ze)},useEffectEvent:function(e){var t=Kt(),i={impl:e};return t.memoizedState=i,function(){if((Je&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},vc={readContext:zt,use:ca,useCallback:Zf,useContext:zt,useEffect:fc,useImperativeHandle:Qf,useInsertionEffect:Kf,useLayoutEffect:Yf,useMemo:Jf,useReducer:ua,useRef:Vf,useState:function(){return ua(ri)},useDebugValue:dc,useDeferredValue:function(e,t){var i=kt();return ed(i,rt.memoizedState,e,t)},useTransition:function(){var e=ua(ri)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:Ys(e),t]},useSyncExternalStore:Rf,useId:rd,useHostTransitionStatus:gc,useFormState:Ff,useActionState:Ff,useOptimistic:function(e,t){var i=kt();return jf(i,rt,e,t)},useMemoCache:ac,useCacheRefresh:sd};vc.useEffectEvent=Wf;var ud={readContext:zt,use:ca,useCallback:Zf,useContext:zt,useEffect:fc,useImperativeHandle:Qf,useInsertionEffect:Kf,useLayoutEffect:Yf,useMemo:Jf,useReducer:cc,useRef:Vf,useState:function(){return cc(ri)},useDebugValue:dc,useDeferredValue:function(e,t){var i=kt();return rt===null?pc(i,e,t):ed(i,rt.memoizedState,e,t)},useTransition:function(){var e=cc(ri)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:Ys(e),t]},useSyncExternalStore:Rf,useId:rd,useHostTransitionStatus:gc,useFormState:Gf,useActionState:Gf,useOptimistic:function(e,t){var i=kt();return rt!==null?jf(i,rt,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:ac,useCacheRefresh:sd};ud.useEffectEvent=Wf;function yc(e,t,i,l){t=e.memoizedState,i=i(l,t),i=i==null?t:u({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Sc={enqueueSetState:function(e,t,i){e=e._reactInternals;var l=mn(),p=Di(l);p.payload=t,i!=null&&(p.callback=i),t=Mi(e,p,l),t!==null&&(sn(t,e,l),Vs(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=mn(),p=Di(l);p.tag=1,p.payload=t,i!=null&&(p.callback=i),t=Mi(e,p,l),t!==null&&(sn(t,e,l),Vs(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=mn(),l=Di(i);l.tag=2,t!=null&&(l.callback=t),t=Mi(e,l,i),t!==null&&(sn(t,e,i),Vs(t,e,i))}};function hd(e,t,i,l,p,w,O){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,w,O):t.prototype&&t.prototype.isPureReactComponent?!Hs(i,l)||!Hs(p,w):!0}function fd(e,t,i,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,l),t.state!==e&&Sc.enqueueReplaceState(t,t.state,null)}function Sr(e,t){var i=t;if("ref"in t){i={};for(var l in t)l!=="ref"&&(i[l]=t[l])}if(e=e.defaultProps){i===t&&(i=u({},i));for(var p in e)i[p]===void 0&&(i[p]=e[p])}return i}function dd(e){Vl(e)}function pd(e){console.error(e)}function md(e){Vl(e)}function pa(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function gd(e,t,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function bc(e,t,i){return i=Di(i),i.tag=3,i.payload={element:null},i.callback=function(){pa(e,t)},i}function _d(e){return e=Di(e),e.tag=3,e}function vd(e,t,i,l){var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var w=l.value;e.payload=function(){return p(w)},e.callback=function(){gd(t,i,l)}}var O=i.stateNode;O!==null&&typeof O.componentDidCatch=="function"&&(e.callback=function(){gd(t,i,l),typeof p!="function"&&(Hi===null?Hi=new Set([this]):Hi.add(this));var P=l.stack;this.componentDidCatch(l.value,{componentStack:P!==null?P:""})})}function Yv(e,t,i,l,p){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&qr(t,i,p,!0),i=hn.current,i!==null){switch(i.tag){case 31:case 13:return kn===null?ka():i.alternate===null&&wt===0&&(wt=3),i.flags&=-257,i.flags|=65536,i.lanes=p,l===ta?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),$c(e,l,p)),!1;case 22:return i.flags|=65536,l===ta?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([l]):i.add(l)),$c(e,l,p)),!1}throw Error(o(435,i.tag))}return $c(e,l,p),ka(),!1}if($e)return t=hn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=p,l!==Uo&&(e=Error(o(422),{cause:l}),Us(Cn(e,i)))):(l!==Uo&&(t=Error(o(423),{cause:l}),Us(Cn(t,i))),e=e.current.alternate,e.flags|=65536,p&=-p,e.lanes|=p,l=Cn(l,i),p=bc(e.stateNode,l,p),Qo(e,p),wt!==4&&(wt=2)),!1;var w=Error(o(520),{cause:l});if(w=Cn(w,i),sl===null?sl=[w]:sl.push(w),wt!==4&&(wt=2),t===null)return!0;l=Cn(l,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=p&-p,i.lanes|=e,e=bc(i.stateNode,l,e),Qo(i,e),!1;case 1:if(t=i.type,w=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Hi===null||!Hi.has(w))))return i.flags|=65536,p&=-p,i.lanes|=p,p=_d(p),vd(p,e,i,l),Qo(i,p),!1}i=i.return}while(i!==null);return!1}var Cc=Error(o(461)),Dt=!1;function It(e,t,i,l){t.child=e===null?Cf(t,null,i,l):vr(t,e.child,i,l)}function yd(e,t,i,l,p){i=i.render;var w=t.ref;if("ref"in l){var O={};for(var P in l)P!=="ref"&&(O[P]=l[P])}else O=l;return pr(t),l=ic(e,t,i,O,w,p),P=rc(),e!==null&&!Dt?(sc(e,t,p),si(e,t,p)):($e&&P&&zo(t),t.flags|=1,It(e,t,l,p),t.child)}function Sd(e,t,i,l,p){if(e===null){var w=i.type;return typeof w=="function"&&!jo(w)&&w.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=w,bd(e,t,w,l,p)):(e=Yl(i.type,null,l,t,t.mode,p),e.ref=t.ref,e.return=t,t.child=e)}if(w=e.child,!Dc(e,p)){var O=w.memoizedProps;if(i=i.compare,i=i!==null?i:Hs,i(O,l)&&e.ref===t.ref)return si(e,t,p)}return t.flags|=1,e=Jn(w,l),e.ref=t.ref,e.return=t,t.child=e}function bd(e,t,i,l,p){if(e!==null){var w=e.memoizedProps;if(Hs(w,l)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=l=w,Dc(e,p))(e.flags&131072)!==0&&(Dt=!0);else return t.lanes=e.lanes,si(e,t,p)}return wc(e,t,i,l,p)}function Cd(e,t,i,l){var p=l.children,w=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(w=w!==null?w.baseLanes|i:i,e!==null){for(l=t.child=e.child,p=0;l!==null;)p=p|l.lanes|l.childLanes,l=l.sibling;l=p&~w}else l=0,t.child=null;return wd(e,t,w,i,l)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Jl(t,w!==null?w.cachePool:null),w!==null?Ef(t,w):Jo(),kf(t);else return l=t.lanes=536870912,wd(e,t,w!==null?w.baseLanes|i:i,i,l)}else w!==null?(Jl(t,w.cachePool),Ef(t,w),Oi(),t.memoizedState=null):(e!==null&&Jl(t,null),Jo(),Oi());return It(e,t,p,i),t.child}function Zs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function wd(e,t,i,l,p){var w=Wo();return w=w===null?null:{parent:Tt._currentValue,pool:w},t.memoizedState={baseLanes:i,cachePool:w},e!==null&&Jl(t,null),Jo(),kf(t),e!==null&&qr(e,t,l,!0),t.childLanes=p,null}function ma(e,t){return t=_a({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function xd(e,t,i){return vr(t,e.child,null,i),e=ma(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function Xv(e,t,i){var l=t.pendingProps,p=(t.flags&128)!==0;if(t.flags&=-129,e===null){if($e){if(l.mode==="hidden")return e=ma(t,l),t.lanes=536870912,Zs(null,e);if(tc(t),(e=_t)?(e=Np(e,En),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei!==null?{id:In,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},i=af(e),i.return=t,t.child=i,Ht=t,_t=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return ma(t,l)}var w=e.memoizedState;if(w!==null){var O=w.dehydrated;if(tc(t),p)if(t.flags&256)t.flags&=-257,t=xd(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Dt||qr(e,t,i,!1),p=(i&e.childLanes)!==0,Dt||p){if(l=at,l!==null&&(O=Bt(l,i),O!==0&&O!==w.retryLane))throw w.retryLane=O,ur(e,O),sn(l,e,O),Cc;ka(),t=xd(e,t,i)}else e=w.treeContext,_t=An(O.nextSibling),Ht=t,$e=!0,ki=null,En=!1,e!==null&&uf(t,e),t=ma(t,l),t.flags|=4096;return t}return e=Jn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ga(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function wc(e,t,i,l,p){return pr(t),i=ic(e,t,i,l,void 0,p),l=rc(),e!==null&&!Dt?(sc(e,t,p),si(e,t,p)):($e&&l&&zo(t),t.flags|=1,It(e,t,i,p),t.child)}function Ed(e,t,i,l,p,w){return pr(t),t.updateQueue=null,i=Tf(t,l,i,p),Af(e),l=rc(),e!==null&&!Dt?(sc(e,t,w),si(e,t,w)):($e&&l&&zo(t),t.flags|=1,It(e,t,i,w),t.child)}function kd(e,t,i,l,p){if(pr(t),t.stateNode===null){var w=Ir,O=i.contextType;typeof O=="object"&&O!==null&&(w=zt(O)),w=new i(l,w),t.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=Sc,t.stateNode=w,w._reactInternals=t,w=t.stateNode,w.props=l,w.state=t.memoizedState,w.refs={},Yo(t),O=i.contextType,w.context=typeof O=="object"&&O!==null?zt(O):Ir,w.state=t.memoizedState,O=i.getDerivedStateFromProps,typeof O=="function"&&(yc(t,i,O,l),w.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(O=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),O!==w.state&&Sc.enqueueReplaceState(w,w.state,null),Ws(t,l,w,p),$s(),w.state=t.memoizedState),typeof w.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){w=t.stateNode;var P=t.memoizedProps,Q=Sr(i,P);w.props=Q;var ae=w.context,pe=i.contextType;O=Ir,typeof pe=="object"&&pe!==null&&(O=zt(pe));var ge=i.getDerivedStateFromProps;pe=typeof ge=="function"||typeof w.getSnapshotBeforeUpdate=="function",P=t.pendingProps!==P,pe||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(P||ae!==O)&&fd(t,w,l,O),Ri=!1;var oe=t.memoizedState;w.state=oe,Ws(t,l,w,p),$s(),ae=t.memoizedState,P||oe!==ae||Ri?(typeof ge=="function"&&(yc(t,i,ge,l),ae=t.memoizedState),(Q=Ri||hd(t,i,Q,l,oe,ae,O))?(pe||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(t.flags|=4194308)):(typeof w.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=ae),w.props=l,w.state=ae,w.context=O,l=Q):(typeof w.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{w=t.stateNode,Xo(e,t),O=t.memoizedProps,pe=Sr(i,O),w.props=pe,ge=t.pendingProps,oe=w.context,ae=i.contextType,Q=Ir,typeof ae=="object"&&ae!==null&&(Q=zt(ae)),P=i.getDerivedStateFromProps,(ae=typeof P=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(O!==ge||oe!==Q)&&fd(t,w,l,Q),Ri=!1,oe=t.memoizedState,w.state=oe,Ws(t,l,w,p),$s();var ue=t.memoizedState;O!==ge||oe!==ue||Ri||e!==null&&e.dependencies!==null&&Ql(e.dependencies)?(typeof P=="function"&&(yc(t,i,P,l),ue=t.memoizedState),(pe=Ri||hd(t,i,pe,l,oe,ue,Q)||e!==null&&e.dependencies!==null&&Ql(e.dependencies))?(ae||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(l,ue,Q),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(l,ue,Q)),typeof w.componentDidUpdate=="function"&&(t.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof w.componentDidUpdate!="function"||O===e.memoizedProps&&oe===e.memoizedState||(t.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||O===e.memoizedProps&&oe===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ue),w.props=l,w.state=ue,w.context=Q,l=pe):(typeof w.componentDidUpdate!="function"||O===e.memoizedProps&&oe===e.memoizedState||(t.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||O===e.memoizedProps&&oe===e.memoizedState||(t.flags|=1024),l=!1)}return w=l,ga(e,t),l=(t.flags&128)!==0,w||l?(w=t.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:w.render(),t.flags|=1,e!==null&&l?(t.child=vr(t,e.child,null,p),t.child=vr(t,null,i,p)):It(e,t,i,p),t.memoizedState=w.state,e=t.child):e=si(e,t,p),e}function Ad(e,t,i,l){return fr(),t.flags|=256,It(e,t,i,l),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ec(e){return{baseLanes:e,cachePool:gf()}}function kc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=pn),e}function Td(e,t,i){var l=t.pendingProps,p=!1,w=(t.flags&128)!==0,O;if((O=w)||(O=e!==null&&e.memoizedState===null?!1:(Et.current&2)!==0),O&&(p=!0,t.flags&=-129),O=(t.flags&32)!==0,t.flags&=-33,e===null){if($e){if(p?Li(t):Oi(),(e=_t)?(e=Np(e,En),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei!==null?{id:In,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},i=af(e),i.return=t,t.child=i,Ht=t,_t=null)):e=null,e===null)throw Ai(t);return ou(e)?t.lanes=32:t.lanes=536870912,null}var P=l.children;return l=l.fallback,p?(Oi(),p=t.mode,P=_a({mode:"hidden",children:P},p),l=hr(l,p,i,null),P.return=t,l.return=t,P.sibling=l,t.child=P,l=t.child,l.memoizedState=Ec(i),l.childLanes=kc(e,O,i),t.memoizedState=xc,Zs(null,l)):(Li(t),Ac(t,P))}var Q=e.memoizedState;if(Q!==null&&(P=Q.dehydrated,P!==null)){if(w)t.flags&256?(Li(t),t.flags&=-257,t=Tc(e,t,i)):t.memoizedState!==null?(Oi(),t.child=e.child,t.flags|=128,t=null):(Oi(),P=l.fallback,p=t.mode,l=_a({mode:"visible",children:l.children},p),P=hr(P,p,i,null),P.flags|=2,l.return=t,P.return=t,l.sibling=P,t.child=l,vr(t,e.child,null,i),l=t.child,l.memoizedState=Ec(i),l.childLanes=kc(e,O,i),t.memoizedState=xc,t=Zs(null,l));else if(Li(t),ou(P)){if(O=P.nextSibling&&P.nextSibling.dataset,O)var ae=O.dgst;O=ae,l=Error(o(419)),l.stack="",l.digest=O,Us({value:l,source:null,stack:null}),t=Tc(e,t,i)}else if(Dt||qr(e,t,i,!1),O=(i&e.childLanes)!==0,Dt||O){if(O=at,O!==null&&(l=Bt(O,i),l!==0&&l!==Q.retryLane))throw Q.retryLane=l,ur(e,l),sn(O,e,l),Cc;au(P)||ka(),t=Tc(e,t,i)}else au(P)?(t.flags|=192,t.child=e.child,t=null):(e=Q.treeContext,_t=An(P.nextSibling),Ht=t,$e=!0,ki=null,En=!1,e!==null&&uf(t,e),t=Ac(t,l.children),t.flags|=4096);return t}return p?(Oi(),P=l.fallback,p=t.mode,Q=e.child,ae=Q.sibling,l=Jn(Q,{mode:"hidden",children:l.children}),l.subtreeFlags=Q.subtreeFlags&65011712,ae!==null?P=Jn(ae,P):(P=hr(P,p,i,null),P.flags|=2),P.return=t,l.return=t,l.sibling=P,t.child=l,Zs(null,l),l=t.child,P=e.child.memoizedState,P===null?P=Ec(i):(p=P.cachePool,p!==null?(Q=Tt._currentValue,p=p.parent!==Q?{parent:Q,pool:Q}:p):p=gf(),P={baseLanes:P.baseLanes|i,cachePool:p}),l.memoizedState=P,l.childLanes=kc(e,O,i),t.memoizedState=xc,Zs(e.child,l)):(Li(t),i=e.child,e=i.sibling,i=Jn(i,{mode:"visible",children:l.children}),i.return=t,i.sibling=null,e!==null&&(O=t.deletions,O===null?(t.deletions=[e],t.flags|=16):O.push(e)),t.child=i,t.memoizedState=null,i)}function Ac(e,t){return t=_a({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function _a(e,t){return e=un(22,e,null,t),e.lanes=0,e}function Tc(e,t,i){return vr(t,e.child,null,i),e=Ac(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rd(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),qo(e.return,t,i)}function Rc(e,t,i,l,p,w){var O=e.memoizedState;O===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:p,treeForkCount:w}:(O.isBackwards=t,O.rendering=null,O.renderingStartTime=0,O.last=l,O.tail=i,O.tailMode=p,O.treeForkCount=w)}function Dd(e,t,i){var l=t.pendingProps,p=l.revealOrder,w=l.tail;l=l.children;var O=Et.current,P=(O&2)!==0;if(P?(O=O&1|2,t.flags|=128):O&=1,N(Et,O),It(e,t,l,i),l=$e?Is:0,!P&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rd(e,i,t);else if(e.tag===19)Rd(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(p){case"forwards":for(i=t.child,p=null;i!==null;)e=i.alternate,e!==null&&sa(e)===null&&(p=i),i=i.sibling;i=p,i===null?(p=t.child,t.child=null):(p=i.sibling,i.sibling=null),Rc(t,!1,p,i,w,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,p=t.child,t.child=null;p!==null;){if(e=p.alternate,e!==null&&sa(e)===null){t.child=p;break}e=p.sibling,p.sibling=i,i=p,p=e}Rc(t,!0,i,null,w,l);break;case"together":Rc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function si(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ni|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(qr(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,i=Jn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Jn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Dc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ql(e)))}function Qv(e,t,i){switch(t.tag){case 3:q(t,t.stateNode.containerInfo),Ti(t,Tt,e.memoizedState.cache),fr();break;case 27:case 5:te(t);break;case 4:q(t,t.stateNode.containerInfo);break;case 10:Ti(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,tc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Li(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Td(e,t,i):(Li(t),e=si(e,t,i),e!==null?e.sibling:null);Li(t);break;case 19:var p=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(qr(e,t,i,!1),l=(i&t.childLanes)!==0),p){if(l)return Dd(e,t,i);t.flags|=128}if(p=t.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),N(Et,Et.current),l)break;return null;case 22:return t.lanes=0,Cd(e,t,i,t.pendingProps);case 24:Ti(t,Tt,e.memoizedState.cache)}return si(e,t,i)}function Md(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Dt=!0;else{if(!Dc(e,i)&&(t.flags&128)===0)return Dt=!1,Qv(e,t,i);Dt=(e.flags&131072)!==0}else Dt=!1,$e&&(t.flags&1048576)!==0&&cf(t,Is,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=gr(t.elementType),t.type=e,typeof e=="function")jo(e)?(l=Sr(e,l),t.tag=1,t=kd(null,t,e,l,i)):(t.tag=0,t=wc(null,t,e,l,i));else{if(e!=null){var p=e.$$typeof;if(p===k){t.tag=11,t=yd(null,t,e,l,i);break e}else if(p===R){t.tag=14,t=Sd(null,t,e,l,i);break e}}throw t=$(e)||e,Error(o(306,t,""))}}return t;case 0:return wc(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,p=Sr(l,t.pendingProps),kd(e,t,l,p,i);case 3:e:{if(q(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var w=t.memoizedState;p=w.element,Xo(e,t),Ws(t,l,null,i);var O=t.memoizedState;if(l=O.cache,Ti(t,Tt,l),l!==w.cache&&Go(t,[Tt],i,!0),$s(),l=O.element,w.isDehydrated)if(w={element:l,isDehydrated:!1,cache:O.cache},t.updateQueue.baseState=w,t.memoizedState=w,t.flags&256){t=Ad(e,t,l,i);break e}else if(l!==p){p=Cn(Error(o(424)),t),Us(p),t=Ad(e,t,l,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(_t=An(e.firstChild),Ht=t,$e=!0,ki=null,En=!0,i=Cf(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(fr(),l===p){t=si(e,t,i);break e}It(e,t,l,i)}t=t.child}return t;case 26:return ga(e,t),e===null?(i=Fp(t.type,null,t.pendingProps,null))?t.memoizedState=i:$e||(i=t.type,e=t.pendingProps,l=Oa(_e.current).createElement(i),l[ne]=t,l[it]=e,Ut(l,i,e),bt(l),t.stateNode=l):t.memoizedState=Fp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return te(t),e===null&&$e&&(l=t.stateNode=Ip(t.type,t.pendingProps,_e.current),Ht=t,En=!0,p=_t,Pi(t.type)?(cu=p,_t=An(l.firstChild)):_t=p),It(e,t,t.pendingProps.children,i),ga(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&$e&&((p=l=_t)&&(l=A0(l,t.type,t.pendingProps,En),l!==null?(t.stateNode=l,Ht=t,_t=An(l.firstChild),En=!1,p=!0):p=!1),p||Ai(t)),te(t),p=t.type,w=t.pendingProps,O=e!==null?e.memoizedProps:null,l=w.children,ru(p,w)?l=null:O!==null&&ru(p,O)&&(t.flags|=32),t.memoizedState!==null&&(p=ic(e,t,Fv,null,null,i),dl._currentValue=p),ga(e,t),It(e,t,l,i),t.child;case 6:return e===null&&$e&&((e=i=_t)&&(i=T0(i,t.pendingProps,En),i!==null?(t.stateNode=i,Ht=t,_t=null,e=!0):e=!1),e||Ai(t)),null;case 13:return Td(e,t,i);case 4:return q(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=vr(t,null,l,i):It(e,t,l,i),t.child;case 11:return yd(e,t,t.type,t.pendingProps,i);case 7:return It(e,t,t.pendingProps,i),t.child;case 8:return It(e,t,t.pendingProps.children,i),t.child;case 12:return It(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,Ti(t,t.type,l.value),It(e,t,l.children,i),t.child;case 9:return p=t.type._context,l=t.pendingProps.children,pr(t),p=zt(p),l=l(p),t.flags|=1,It(e,t,l,i),t.child;case 14:return Sd(e,t,t.type,t.pendingProps,i);case 15:return bd(e,t,t.type,t.pendingProps,i);case 19:return Dd(e,t,i);case 31:return Xv(e,t,i);case 22:return Cd(e,t,i,t.pendingProps);case 24:return pr(t),l=zt(Tt),e===null?(p=Wo(),p===null&&(p=at,w=Vo(),p.pooledCache=w,w.refCount++,w!==null&&(p.pooledCacheLanes|=i),p=w),t.memoizedState={parent:l,cache:p},Yo(t),Ti(t,Tt,p)):((e.lanes&i)!==0&&(Xo(e,t),Ws(t,null,null,i),$s()),p=e.memoizedState,w=t.memoizedState,p.parent!==l?(p={parent:l,cache:l},t.memoizedState=p,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=p),Ti(t,Tt,l)):(l=w.cache,Ti(t,Tt,l),l!==p.cache&&Go(t,[Tt],i,!0))),It(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function li(e){e.flags|=4}function Mc(e,t,i,l,p){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(p&335544128)===p)if(e.stateNode.complete)e.flags|=8192;else if(rp())e.flags|=8192;else throw _r=ta,Ko}else e.flags&=-16777217}function Ld(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Wp(t))if(rp())e.flags|=8192;else throw _r=ta,Ko}function va(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?tr():536870912,e.lanes|=t,ts|=t)}function Js(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function vt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(t)for(var p=e.child;p!==null;)i|=p.lanes|p.childLanes,l|=p.subtreeFlags&65011712,l|=p.flags&65011712,p.return=e,p=p.sibling;else for(p=e.child;p!==null;)i|=p.lanes|p.childLanes,l|=p.subtreeFlags,l|=p.flags,p.return=e,p=p.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function Zv(e,t,i){var l=t.pendingProps;switch(Io(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(t),null;case 1:return vt(t),null;case 3:return i=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ni(Tt),ce(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Fr(t)?li(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Po())),vt(t),null;case 26:var p=t.type,w=t.memoizedState;return e===null?(li(t),w!==null?(vt(t),Ld(t,w)):(vt(t),Mc(t,p,null,l,i))):w?w!==e.memoizedState?(li(t),vt(t),Ld(t,w)):(vt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&li(t),vt(t),Mc(t,p,e,l,i)),null;case 27:if(se(t),i=_e.current,p=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&li(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return vt(t),null}e=Z.current,Fr(t)?hf(t):(e=Ip(p,l,i),t.stateNode=e,li(t))}return vt(t),null;case 5:if(se(t),p=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&li(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return vt(t),null}if(w=Z.current,Fr(t))hf(t);else{var O=Oa(_e.current);switch(w){case 1:w=O.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:w=O.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":w=O.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":w=O.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":w=O.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof l.is=="string"?O.createElement("select",{is:l.is}):O.createElement("select"),l.multiple?w.multiple=!0:l.size&&(w.size=l.size);break;default:w=typeof l.is=="string"?O.createElement(p,{is:l.is}):O.createElement(p)}}w[ne]=t,w[it]=l;e:for(O=t.child;O!==null;){if(O.tag===5||O.tag===6)w.appendChild(O.stateNode);else if(O.tag!==4&&O.tag!==27&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===t)break e;for(;O.sibling===null;){if(O.return===null||O.return===t)break e;O=O.return}O.sibling.return=O.return,O=O.sibling}t.stateNode=w;e:switch(Ut(w,p,l),p){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&li(t)}}return vt(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&li(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=_e.current,Fr(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,p=Ht,p!==null)switch(p.tag){case 27:case 5:l=p.memoizedProps}e[ne]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Tp(e.nodeValue,i)),e||Ai(t,!0)}else e=Oa(e).createTextNode(l),e[ne]=t,t.stateNode=e}return vt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(l=Fr(t),i!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[ne]=t}else fr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),e=!1}else i=Po(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(fn(t),t):(fn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return vt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(p=Fr(t),l!==null&&l.dehydrated!==null){if(e===null){if(!p)throw Error(o(318));if(p=t.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(o(317));p[ne]=t}else fr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),p=!1}else p=Po(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=p),p=!0;if(!p)return t.flags&256?(fn(t),t):(fn(t),null)}return fn(t),(t.flags&128)!==0?(t.lanes=i,t):(i=l!==null,e=e!==null&&e.memoizedState!==null,i&&(l=t.child,p=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(p=l.alternate.memoizedState.cachePool.pool),w=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(w=l.memoizedState.cachePool.pool),w!==p&&(l.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),va(t,t.updateQueue),vt(t),null);case 4:return ce(),e===null&&Jc(t.stateNode.containerInfo),vt(t),null;case 10:return ni(t.type),vt(t),null;case 19:if(G(Et),l=t.memoizedState,l===null)return vt(t),null;if(p=(t.flags&128)!==0,w=l.rendering,w===null)if(p)Js(l,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(w=sa(e),w!==null){for(t.flags|=128,Js(l,!1),e=w.updateQueue,t.updateQueue=e,va(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)lf(i,e),i=i.sibling;return N(Et,Et.current&1|2),$e&&ei(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Xe()>wa&&(t.flags|=128,p=!0,Js(l,!1),t.lanes=4194304)}else{if(!p)if(e=sa(w),e!==null){if(t.flags|=128,p=!0,e=e.updateQueue,t.updateQueue=e,va(t,e),Js(l,!0),l.tail===null&&l.tailMode==="hidden"&&!w.alternate&&!$e)return vt(t),null}else 2*Xe()-l.renderingStartTime>wa&&i!==536870912&&(t.flags|=128,p=!0,Js(l,!1),t.lanes=4194304);l.isBackwards?(w.sibling=t.child,t.child=w):(e=l.last,e!==null?e.sibling=w:t.child=w,l.last=w)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Xe(),e.sibling=null,i=Et.current,N(Et,p?i&1|2:i&1),$e&&ei(t,l.treeForkCount),e):(vt(t),null);case 22:case 23:return fn(t),ec(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(i&536870912)!==0&&(t.flags&128)===0&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),i=t.updateQueue,i!==null&&va(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==i&&(t.flags|=2048),e!==null&&G(mr),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ni(Tt),vt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Jv(e,t){switch(Io(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ni(Tt),ce(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return se(t),null;case 31:if(t.memoizedState!==null){if(fn(t),t.alternate===null)throw Error(o(340));fr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));fr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Et),null;case 4:return ce(),null;case 10:return ni(t.type),null;case 22:case 23:return fn(t),ec(),e!==null&&G(mr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ni(Tt),null;case 25:return null;default:return null}}function Od(e,t){switch(Io(t),t.tag){case 3:ni(Tt),ce();break;case 26:case 27:case 5:se(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&fn(t);break;case 13:fn(t);break;case 19:G(Et);break;case 10:ni(t.type);break;case 22:case 23:fn(t),ec(),e!==null&&G(mr);break;case 24:ni(Tt)}}function el(e,t){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var p=l.next;i=p;do{if((i.tag&e)===e){l=void 0;var w=i.create,O=i.inst;l=w(),O.destroy=l}i=i.next}while(i!==p)}}catch(P){nt(t,t.return,P)}}function Bi(e,t,i){try{var l=t.updateQueue,p=l!==null?l.lastEffect:null;if(p!==null){var w=p.next;l=w;do{if((l.tag&e)===e){var O=l.inst,P=O.destroy;if(P!==void 0){O.destroy=void 0,p=t;var Q=i,ae=P;try{ae()}catch(pe){nt(p,Q,pe)}}}l=l.next}while(l!==w)}}catch(pe){nt(t,t.return,pe)}}function Bd(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{xf(t,i)}catch(l){nt(e,e.return,l)}}}function jd(e,t,i){i.props=Sr(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){nt(e,t,l)}}function tl(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof i=="function"?e.refCleanup=i(l):i.current=l}}catch(p){nt(e,t,p)}}function Pn(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(p){nt(e,t,p)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(p){nt(e,t,p)}else i.current=null}function Nd(e){var t=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(p){nt(e,e.return,p)}}function Lc(e,t,i){try{var l=e.stateNode;b0(l,e.type,i,t),l[it]=t}catch(p){nt(e,e.return,p)}}function Hd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pi(e.type)||e.tag===4}function Oc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hd(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&&Pi(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 Bc(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Qn));else if(l!==4&&(l===27&&Pi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Bc(e,t,i),e=e.sibling;e!==null;)Bc(e,t,i),e=e.sibling}function ya(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(l!==4&&(l===27&&Pi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(ya(e,t,i),e=e.sibling;e!==null;)ya(e,t,i),e=e.sibling}function zd(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,p=t.attributes;p.length;)t.removeAttributeNode(p[0]);Ut(t,l,i),t[ne]=e,t[it]=i}catch(w){nt(e,e.return,w)}}var ai=!1,Mt=!1,jc=!1,Id=typeof WeakSet=="function"?WeakSet:Set,jt=null;function e0(e,t){if(e=e.containerInfo,nu=Ua,e=Xh(e),To(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var p=l.anchorOffset,w=l.focusNode;l=l.focusOffset;try{i.nodeType,w.nodeType}catch{i=null;break e}var O=0,P=-1,Q=-1,ae=0,pe=0,ge=e,oe=null;t:for(;;){for(var ue;ge!==i||p!==0&&ge.nodeType!==3||(P=O+p),ge!==w||l!==0&&ge.nodeType!==3||(Q=O+l),ge.nodeType===3&&(O+=ge.nodeValue.length),(ue=ge.firstChild)!==null;)oe=ge,ge=ue;for(;;){if(ge===e)break t;if(oe===i&&++ae===p&&(P=O),oe===w&&++pe===l&&(Q=O),(ue=ge.nextSibling)!==null)break;ge=oe,oe=ge.parentNode}ge=ue}i=P===-1||Q===-1?null:{start:P,end:Q}}else i=null}i=i||{start:0,end:0}}else i=null;for(iu={focusedElem:e,selectionRange:i},Ua=!1,jt=t;jt!==null;)if(t=jt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,jt=e;else for(;jt!==null;){switch(t=jt,w=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)p=e[i],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&w!==null){e=void 0,i=t,p=w.memoizedProps,w=w.memoizedState,l=i.stateNode;try{var ke=Sr(i.type,p);e=l.getSnapshotBeforeUpdate(ke,w),l.__reactInternalSnapshotBeforeUpdate=e}catch(Oe){nt(i,i.return,Oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)lu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":lu(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,jt=e;break}jt=t.return}}function Ud(e,t,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:ci(e,i),l&4&&el(5,i);break;case 1:if(ci(e,i),l&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(O){nt(i,i.return,O)}else{var p=Sr(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(p,t,e.__reactInternalSnapshotBeforeUpdate)}catch(O){nt(i,i.return,O)}}l&64&&Bd(i),l&512&&tl(i,i.return);break;case 3:if(ci(e,i),l&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{xf(e,t)}catch(O){nt(i,i.return,O)}}break;case 27:t===null&&l&4&&zd(i);case 26:case 5:ci(e,i),t===null&&l&4&&Nd(i),l&512&&tl(i,i.return);break;case 12:ci(e,i);break;case 31:ci(e,i),l&4&&qd(e,i);break;case 13:ci(e,i),l&4&&Gd(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=c0.bind(null,i),R0(e,i))));break;case 22:if(l=i.memoizedState!==null||ai,!l){t=t!==null&&t.memoizedState!==null||Mt,p=ai;var w=Mt;ai=l,(Mt=t)&&!w?ui(e,i,(i.subtreeFlags&8772)!==0):ci(e,i),ai=p,Mt=w}break;case 30:break;default:ci(e,i)}}function Pd(e){var t=e.alternate;t!==null&&(e.alternate=null,Pd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Es(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var yt=null,en=!1;function oi(e,t,i){for(i=i.child;i!==null;)Fd(e,t,i),i=i.sibling}function Fd(e,t,i){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(et,i)}catch{}switch(i.tag){case 26:Mt||Pn(i,t),oi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Mt||Pn(i,t);var l=yt,p=en;Pi(i.type)&&(yt=i.stateNode,en=!1),oi(e,t,i),ul(i.stateNode),yt=l,en=p;break;case 5:Mt||Pn(i,t);case 6:if(l=yt,p=en,yt=null,oi(e,t,i),yt=l,en=p,yt!==null)if(en)try{(yt.nodeType===9?yt.body:yt.nodeName==="HTML"?yt.ownerDocument.body:yt).removeChild(i.stateNode)}catch(w){nt(i,t,w)}else try{yt.removeChild(i.stateNode)}catch(w){nt(i,t,w)}break;case 18:yt!==null&&(en?(e=yt,Bp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),cs(e)):Bp(yt,i.stateNode));break;case 4:l=yt,p=en,yt=i.stateNode.containerInfo,en=!0,oi(e,t,i),yt=l,en=p;break;case 0:case 11:case 14:case 15:Bi(2,i,t),Mt||Bi(4,i,t),oi(e,t,i);break;case 1:Mt||(Pn(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&jd(i,t,l)),oi(e,t,i);break;case 21:oi(e,t,i);break;case 22:Mt=(l=Mt)||i.memoizedState!==null,oi(e,t,i),Mt=l;break;default:oi(e,t,i)}}function qd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{cs(e)}catch(i){nt(t,t.return,i)}}}function Gd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{cs(e)}catch(i){nt(t,t.return,i)}}function t0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Id),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Id),t;default:throw Error(o(435,e.tag))}}function Sa(e,t){var i=t0(e);t.forEach(function(l){if(!i.has(l)){i.add(l);var p=u0.bind(null,e,l);l.then(p,p)}})}function tn(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var p=i[l],w=e,O=t,P=O;e:for(;P!==null;){switch(P.tag){case 27:if(Pi(P.type)){yt=P.stateNode,en=!1;break e}break;case 5:yt=P.stateNode,en=!1;break e;case 3:case 4:yt=P.stateNode.containerInfo,en=!0;break e}P=P.return}if(yt===null)throw Error(o(160));Fd(w,O,p),yt=null,en=!1,w=p.alternate,w!==null&&(w.return=null),p.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Vd(t,e),t=t.sibling}var Ln=null;function Vd(e,t){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(t,e),nn(e),l&4&&(Bi(3,e,e.return),el(3,e),Bi(5,e,e.return));break;case 1:tn(t,e),nn(e),l&512&&(Mt||i===null||Pn(i,i.return)),l&64&&ai&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var p=Ln;if(tn(t,e),nn(e),l&512&&(Mt||i===null||Pn(i,i.return)),l&4){var w=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,p=p.ownerDocument||p;t:switch(l){case"title":w=p.getElementsByTagName("title")[0],(!w||w[ir]||w[ne]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=p.createElement(l),p.head.insertBefore(w,p.querySelector("head > title"))),Ut(w,l,i),w[ne]=e,bt(w),l=w;break e;case"link":var O=Vp("link","href",p).get(l+(i.href||""));if(O){for(var P=0;P<O.length;P++)if(w=O[P],w.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&w.getAttribute("rel")===(i.rel==null?null:i.rel)&&w.getAttribute("title")===(i.title==null?null:i.title)&&w.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){O.splice(P,1);break t}}w=p.createElement(l),Ut(w,l,i),p.head.appendChild(w);break;case"meta":if(O=Vp("meta","content",p).get(l+(i.content||""))){for(P=0;P<O.length;P++)if(w=O[P],w.getAttribute("content")===(i.content==null?null:""+i.content)&&w.getAttribute("name")===(i.name==null?null:i.name)&&w.getAttribute("property")===(i.property==null?null:i.property)&&w.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&w.getAttribute("charset")===(i.charSet==null?null:i.charSet)){O.splice(P,1);break t}}w=p.createElement(l),Ut(w,l,i),p.head.appendChild(w);break;default:throw Error(o(468,l))}w[ne]=e,bt(w),l=w}e.stateNode=l}else $p(p,e.type,e.stateNode);else e.stateNode=Gp(p,l,e.memoizedProps);else w!==l?(w===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):w.count--,l===null?$p(p,e.type,e.stateNode):Gp(p,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Lc(e,e.memoizedProps,i.memoizedProps)}break;case 27:tn(t,e),nn(e),l&512&&(Mt||i===null||Pn(i,i.return)),i!==null&&l&4&&Lc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(tn(t,e),nn(e),l&512&&(Mt||i===null||Pn(i,i.return)),e.flags&32){p=e.stateNode;try{Y(p,"")}catch(ke){nt(e,e.return,ke)}}l&4&&e.stateNode!=null&&(p=e.memoizedProps,Lc(e,p,i!==null?i.memoizedProps:p)),l&1024&&(jc=!0);break;case 6:if(tn(t,e),nn(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(ke){nt(e,e.return,ke)}}break;case 3:if(Na=null,p=Ln,Ln=Ba(t.containerInfo),tn(t,e),Ln=p,nn(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{cs(t.containerInfo)}catch(ke){nt(e,e.return,ke)}jc&&(jc=!1,$d(e));break;case 4:l=Ln,Ln=Ba(e.stateNode.containerInfo),tn(t,e),nn(e),Ln=l;break;case 12:tn(t,e),nn(e);break;case 31:tn(t,e),nn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sa(e,l)));break;case 13:tn(t,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Ca=Xe()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sa(e,l)));break;case 22:p=e.memoizedState!==null;var Q=i!==null&&i.memoizedState!==null,ae=ai,pe=Mt;if(ai=ae||p,Mt=pe||Q,tn(t,e),Mt=pe,ai=ae,nn(e),l&8192)e:for(t=e.stateNode,t._visibility=p?t._visibility&-2:t._visibility|1,p&&(i===null||Q||ai||Mt||br(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){Q=i=t;try{if(w=Q.stateNode,p)O=w.style,typeof O.setProperty=="function"?O.setProperty("display","none","important"):O.display="none";else{P=Q.stateNode;var ge=Q.memoizedProps.style,oe=ge!=null&&ge.hasOwnProperty("display")?ge.display:null;P.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(ke){nt(Q,Q.return,ke)}}}else if(t.tag===6){if(i===null){Q=t;try{Q.stateNode.nodeValue=p?"":Q.memoizedProps}catch(ke){nt(Q,Q.return,ke)}}}else if(t.tag===18){if(i===null){Q=t;try{var ue=Q.stateNode;p?jp(ue,!0):jp(Q.stateNode,!1)}catch(ke){nt(Q,Q.return,ke)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Sa(e,i))));break;case 19:tn(t,e),nn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Sa(e,l)));break;case 30:break;case 21:break;default:tn(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{for(var i,l=e.return;l!==null;){if(Hd(l)){i=l;break}l=l.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var p=i.stateNode,w=Oc(e);ya(e,w,p);break;case 5:var O=i.stateNode;i.flags&32&&(Y(O,""),i.flags&=-33);var P=Oc(e);ya(e,P,O);break;case 3:case 4:var Q=i.stateNode.containerInfo,ae=Oc(e);Bc(e,ae,Q);break;default:throw Error(o(161))}}catch(pe){nt(e,e.return,pe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $d(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;$d(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ci(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ud(e,t.alternate,t),t=t.sibling}function br(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Bi(4,t,t.return),br(t);break;case 1:Pn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&jd(t,t.return,i),br(t);break;case 27:ul(t.stateNode);case 26:case 5:Pn(t,t.return),br(t);break;case 22:t.memoizedState===null&&br(t);break;case 30:br(t);break;default:br(t)}e=e.sibling}}function ui(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,p=e,w=t,O=w.flags;switch(w.tag){case 0:case 11:case 15:ui(p,w,i),el(4,w);break;case 1:if(ui(p,w,i),l=w,p=l.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(ae){nt(l,l.return,ae)}if(l=w,p=l.updateQueue,p!==null){var P=l.stateNode;try{var Q=p.shared.hiddenCallbacks;if(Q!==null)for(p.shared.hiddenCallbacks=null,p=0;p<Q.length;p++)wf(Q[p],P)}catch(ae){nt(l,l.return,ae)}}i&&O&64&&Bd(w),tl(w,w.return);break;case 27:zd(w);case 26:case 5:ui(p,w,i),i&&l===null&&O&4&&Nd(w),tl(w,w.return);break;case 12:ui(p,w,i);break;case 31:ui(p,w,i),i&&O&4&&qd(p,w);break;case 13:ui(p,w,i),i&&O&4&&Gd(p,w);break;case 22:w.memoizedState===null&&ui(p,w,i),tl(w,w.return);break;case 30:break;default:ui(p,w,i)}t=t.sibling}}function Nc(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Ps(i))}function Hc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ps(e))}function On(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Wd(e,t,i,l),t=t.sibling}function Wd(e,t,i,l){var p=t.flags;switch(t.tag){case 0:case 11:case 15:On(e,t,i,l),p&2048&&el(9,t);break;case 1:On(e,t,i,l);break;case 3:On(e,t,i,l),p&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ps(e)));break;case 12:if(p&2048){On(e,t,i,l),e=t.stateNode;try{var w=t.memoizedProps,O=w.id,P=w.onPostCommit;typeof P=="function"&&P(O,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Q){nt(t,t.return,Q)}}else On(e,t,i,l);break;case 31:On(e,t,i,l);break;case 13:On(e,t,i,l);break;case 23:break;case 22:w=t.stateNode,O=t.alternate,t.memoizedState!==null?w._visibility&2?On(e,t,i,l):nl(e,t):w._visibility&2?On(e,t,i,l):(w._visibility|=2,Zr(e,t,i,l,(t.subtreeFlags&10256)!==0||!1)),p&2048&&Nc(O,t);break;case 24:On(e,t,i,l),p&2048&&Hc(t.alternate,t);break;default:On(e,t,i,l)}}function Zr(e,t,i,l,p){for(p=p&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var w=e,O=t,P=i,Q=l,ae=O.flags;switch(O.tag){case 0:case 11:case 15:Zr(w,O,P,Q,p),el(8,O);break;case 23:break;case 22:var pe=O.stateNode;O.memoizedState!==null?pe._visibility&2?Zr(w,O,P,Q,p):nl(w,O):(pe._visibility|=2,Zr(w,O,P,Q,p)),p&&ae&2048&&Nc(O.alternate,O);break;case 24:Zr(w,O,P,Q,p),p&&ae&2048&&Hc(O.alternate,O);break;default:Zr(w,O,P,Q,p)}t=t.sibling}}function nl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,p=l.flags;switch(l.tag){case 22:nl(i,l),p&2048&&Nc(l.alternate,l);break;case 24:nl(i,l),p&2048&&Hc(l.alternate,l);break;default:nl(i,l)}t=t.sibling}}var il=8192;function Jr(e,t,i){if(e.subtreeFlags&il)for(e=e.child;e!==null;)Kd(e,t,i),e=e.sibling}function Kd(e,t,i){switch(e.tag){case 26:Jr(e,t,i),e.flags&il&&e.memoizedState!==null&&P0(i,Ln,e.memoizedState,e.memoizedProps);break;case 5:Jr(e,t,i);break;case 3:case 4:var l=Ln;Ln=Ba(e.stateNode.containerInfo),Jr(e,t,i),Ln=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=il,il=16777216,Jr(e,t,i),il=l):Jr(e,t,i));break;default:Jr(e,t,i)}}function Yd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function rl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];jt=l,Qd(l,e)}Yd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xd(e),e=e.sibling}function Xd(e){switch(e.tag){case 0:case 11:case 15:rl(e),e.flags&2048&&Bi(9,e,e.return);break;case 3:rl(e);break;case 12:rl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ba(e)):rl(e);break;default:rl(e)}}function ba(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];jt=l,Qd(l,e)}Yd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Bi(8,t,t.return),ba(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,ba(t));break;default:ba(t)}e=e.sibling}}function Qd(e,t){for(;jt!==null;){var i=jt;switch(i.tag){case 0:case 11:case 15:Bi(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ps(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,jt=l;else e:for(i=e;jt!==null;){l=jt;var p=l.sibling,w=l.return;if(Pd(l),l===i){jt=null;break e}if(p!==null){p.return=w,jt=p;break e}jt=w}}}var n0={getCacheForType:function(e){var t=zt(Tt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return zt(Tt).controller.signal}},i0=typeof WeakMap=="function"?WeakMap:Map,Je=0,at=null,Pe=null,Ge=0,tt=0,dn=null,ji=!1,es=!1,zc=!1,hi=0,wt=0,Ni=0,Cr=0,Ic=0,pn=0,ts=0,sl=null,rn=null,Uc=!1,Ca=0,Zd=0,wa=1/0,xa=null,Hi=null,Ot=0,zi=null,ns=null,fi=0,Pc=0,Fc=null,Jd=null,ll=0,qc=null;function mn(){return(Je&2)!==0&&Ge!==0?Ge&-Ge:V.T!==null?Yc():vi()}function ep(){if(pn===0)if((Ge&536870912)===0||$e){var e=_i;_i<<=1,(_i&3932160)===0&&(_i=262144),pn=e}else pn=536870912;return e=hn.current,e!==null&&(e.flags|=32),pn}function sn(e,t,i){(e===at&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(is(e,0),Ii(e,Ge,pn,!1)),nr(e,i),((Je&2)===0||e!==at)&&(e===at&&((Je&2)===0&&(Cr|=i),wt===4&&Ii(e,Ge,pn,!1)),Fn(e))}function tp(e,t,i){if((Je&6)!==0)throw Error(o(327));var l=!i&&(t&127)===0&&(t&e.expiredLanes)===0||er(e,t),p=l?l0(e,t):Vc(e,t,!0),w=l;do{if(p===0){es&&!l&&Ii(e,t,0,!1);break}else{if(i=e.current.alternate,w&&!r0(i)){p=Vc(e,t,!1),w=!1;continue}if(p===2){if(w=t,e.errorRecoveryDisabledLanes&w)var O=0;else O=e.pendingLanes&-536870913,O=O!==0?O:O&536870912?536870912:0;if(O!==0){t=O;e:{var P=e;p=sl;var Q=P.current.memoizedState.isDehydrated;if(Q&&(is(P,O).flags|=256),O=Vc(P,O,!1),O!==2){if(zc&&!Q){P.errorRecoveryDisabledLanes|=w,Cr|=w,p=4;break e}w=rn,rn=p,w!==null&&(rn===null?rn=w:rn.push.apply(rn,w))}p=O}if(w=!1,p!==2)continue}}if(p===1){is(e,0),Ii(e,t,0,!0);break}e:{switch(l=e,w=p,w){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Ii(l,t,pn,!ji);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(p=Ca+300-Xe(),10<p)){if(Ii(l,t,pn,!ji),kr(l,0,!0)!==0)break e;fi=t,l.timeoutHandle=Lp(np.bind(null,l,i,rn,xa,Uc,t,pn,Cr,ts,ji,w,"Throttled",-0,0),p);break e}np(l,i,rn,xa,Uc,t,pn,Cr,ts,ji,w,null,-0,0)}}break}while(!0);Fn(e)}function np(e,t,i,l,p,w,O,P,Q,ae,pe,ge,oe,ue){if(e.timeoutHandle=-1,ge=t.subtreeFlags,ge&8192||(ge&16785408)===16785408){ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qn},Kd(t,w,ge);var ke=(w&62914560)===w?Ca-Xe():(w&4194048)===w?Zd-Xe():0;if(ke=F0(ge,ke),ke!==null){fi=w,e.cancelPendingCommit=ke(up.bind(null,e,t,w,i,l,p,O,P,Q,pe,ge,null,oe,ue)),Ii(e,w,O,!ae);return}}up(e,t,w,i,l,p,O,P,Q)}function r0(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var p=i[l],w=p.getSnapshot;p=p.value;try{if(!cn(w(),p))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ii(e,t,i,l){t&=~Ic,t&=~Cr,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var p=t;0<p;){var w=31-Ke(p),O=1<<w;l[w]=-1,p&=~O}i!==0&&Ss(e,i,t)}function Ea(){return(Je&6)===0?(al(0),!1):!0}function Gc(){if(Pe!==null){if(tt===0)var e=Pe.return;else e=Pe,ti=dr=null,lc(e),Wr=null,qs=0,e=Pe;for(;e!==null;)Od(e.alternate,e),e=e.return;Pe=null}}function is(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,x0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),fi=0,Gc(),at=e,Pe=i=Jn(e.current,null),Ge=t,tt=0,dn=null,ji=!1,es=er(e,t),zc=!1,ts=pn=Ic=Cr=Ni=wt=0,rn=sl=null,Uc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var p=31-Ke(l),w=1<<p;t|=e[p],l&=~w}return hi=t,$l(),i}function ip(e,t){ze=null,V.H=Qs,t===$r||t===ea?(t=yf(),tt=3):t===Ko?(t=yf(),tt=4):tt=t===Cc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,Pe===null&&(wt=1,pa(e,Cn(t,e.current)))}function rp(){var e=hn.current;return e===null?!0:(Ge&4194048)===Ge?kn===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===kn:!1}function sp(){var e=V.H;return V.H=Qs,e===null?Qs:e}function lp(){var e=V.A;return V.A=n0,e}function ka(){wt=4,ji||(Ge&4194048)!==Ge&&hn.current!==null||(es=!0),(Ni&134217727)===0&&(Cr&134217727)===0||at===null||Ii(at,Ge,pn,!1)}function Vc(e,t,i){var l=Je;Je|=2;var p=sp(),w=lp();(at!==e||Ge!==t)&&(xa=null,is(e,t)),t=!1;var O=wt;e:do try{if(tt!==0&&Pe!==null){var P=Pe,Q=dn;switch(tt){case 8:Gc(),O=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(t=!0);var ae=tt;if(tt=0,dn=null,rs(e,P,Q,ae),i&&es){O=0;break e}break;default:ae=tt,tt=0,dn=null,rs(e,P,Q,ae)}}s0(),O=wt;break}catch(pe){ip(e,pe)}while(!0);return t&&e.shellSuspendCounter++,ti=dr=null,Je=l,V.H=p,V.A=w,Pe===null&&(at=null,Ge=0,$l()),O}function s0(){for(;Pe!==null;)ap(Pe)}function l0(e,t){var i=Je;Je|=2;var l=sp(),p=lp();at!==e||Ge!==t?(xa=null,wa=Xe()+500,is(e,t)):es=er(e,t);e:do try{if(tt!==0&&Pe!==null){t=Pe;var w=dn;t:switch(tt){case 1:tt=0,dn=null,rs(e,t,w,1);break;case 2:case 9:if(_f(w)){tt=0,dn=null,op(t);break}t=function(){tt!==2&&tt!==9||at!==e||(tt=7),Fn(e)},w.then(t,t);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:_f(w)?(tt=0,dn=null,op(t)):(tt=0,dn=null,rs(e,t,w,7));break;case 5:var O=null;switch(Pe.tag){case 26:O=Pe.memoizedState;case 5:case 27:var P=Pe;if(O?Wp(O):P.stateNode.complete){tt=0,dn=null;var Q=P.sibling;if(Q!==null)Pe=Q;else{var ae=P.return;ae!==null?(Pe=ae,Aa(ae)):Pe=null}break t}}tt=0,dn=null,rs(e,t,w,5);break;case 6:tt=0,dn=null,rs(e,t,w,6);break;case 8:Gc(),wt=6;break e;default:throw Error(o(462))}}a0();break}catch(pe){ip(e,pe)}while(!0);return ti=dr=null,V.H=l,V.A=p,Je=i,Pe!==null?0:(at=null,Ge=0,$l(),wt)}function a0(){for(;Pe!==null&&!vn();)ap(Pe)}function ap(e){var t=Md(e.alternate,e,hi);e.memoizedProps=e.pendingProps,t===null?Aa(e):Pe=t}function op(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Ed(i,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=Ed(i,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:lc(t);default:Od(i,t),t=Pe=lf(t,hi),t=Md(i,t,hi)}e.memoizedProps=e.pendingProps,t===null?Aa(e):Pe=t}function rs(e,t,i,l){ti=dr=null,lc(t),Wr=null,qs=0;var p=t.return;try{if(Yv(e,p,t,i,Ge)){wt=1,pa(e,Cn(i,e.current)),Pe=null;return}}catch(w){if(p!==null)throw Pe=p,w;wt=1,pa(e,Cn(i,e.current)),Pe=null;return}t.flags&32768?($e||l===1?e=!0:es||(Ge&536870912)!==0?e=!1:(ji=e=!0,(l===2||l===9||l===3||l===6)&&(l=hn.current,l!==null&&l.tag===13&&(l.flags|=16384))),cp(t,e)):Aa(t)}function Aa(e){var t=e;do{if((t.flags&32768)!==0){cp(t,ji);return}e=t.return;var i=Zv(t.alternate,t,hi);if(i!==null){Pe=i;return}if(t=t.sibling,t!==null){Pe=t;return}Pe=t=e}while(t!==null);wt===0&&(wt=5)}function cp(e,t){do{var i=Jv(e.alternate,e);if(i!==null){i.flags&=32767,Pe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Pe=e;return}Pe=e=i}while(e!==null);wt=6,Pe=null}function up(e,t,i,l,p,w,O,P,Q){e.cancelPendingCommit=null;do Ta();while(Ot!==0);if((Je&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(w=t.lanes|t.childLanes,w|=Oo,Tr(e,i,w,O,P,Q),e===at&&(Pe=at=null,Ge=0),ns=t,zi=e,fi=i,Pc=w,Fc=p,Jd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,h0(Ae,function(){return mp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=V.T,V.T=null,p=W.p,W.p=2,O=Je,Je|=4;try{e0(e,t,i)}finally{Je=O,W.p=p,V.T=l}}Ot=1,hp(),fp(),dp()}}function hp(){if(Ot===1){Ot=0;var e=zi,t=ns,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=V.T,V.T=null;var l=W.p;W.p=2;var p=Je;Je|=4;try{Vd(t,e);var w=iu,O=Xh(e.containerInfo),P=w.focusedElem,Q=w.selectionRange;if(O!==P&&P&&P.ownerDocument&&Yh(P.ownerDocument.documentElement,P)){if(Q!==null&&To(P)){var ae=Q.start,pe=Q.end;if(pe===void 0&&(pe=ae),"selectionStart"in P)P.selectionStart=ae,P.selectionEnd=Math.min(pe,P.value.length);else{var ge=P.ownerDocument||document,oe=ge&&ge.defaultView||window;if(oe.getSelection){var ue=oe.getSelection(),ke=P.textContent.length,Oe=Math.min(Q.start,ke),lt=Q.end===void 0?Oe:Math.min(Q.end,ke);!ue.extend&&Oe>lt&&(O=lt,lt=Oe,Oe=O);var ie=Kh(P,Oe),ee=Kh(P,lt);if(ie&&ee&&(ue.rangeCount!==1||ue.anchorNode!==ie.node||ue.anchorOffset!==ie.offset||ue.focusNode!==ee.node||ue.focusOffset!==ee.offset)){var le=ge.createRange();le.setStart(ie.node,ie.offset),ue.removeAllRanges(),Oe>lt?(ue.addRange(le),ue.extend(ee.node,ee.offset)):(le.setEnd(ee.node,ee.offset),ue.addRange(le))}}}}for(ge=[],ue=P;ue=ue.parentNode;)ue.nodeType===1&&ge.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<ge.length;P++){var me=ge[P];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}Ua=!!nu,iu=nu=null}finally{Je=p,W.p=l,V.T=i}}e.current=t,Ot=2}}function fp(){if(Ot===2){Ot=0;var e=zi,t=ns,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=V.T,V.T=null;var l=W.p;W.p=2;var p=Je;Je|=4;try{Ud(e,t.alternate,t)}finally{Je=p,W.p=l,V.T=i}}Ot=3}}function dp(){if(Ot===4||Ot===3){Ot=0,St();var e=zi,t=ns,i=fi,l=Jd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ot=5:(Ot=0,ns=zi=null,pp(e,e.pendingLanes));var p=e.pendingLanes;if(p===0&&(Hi=null),yn(i),t=t.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(et,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=V.T,p=W.p,W.p=2,V.T=null;try{for(var w=e.onRecoverableError,O=0;O<l.length;O++){var P=l[O];w(P.value,{componentStack:P.stack})}}finally{V.T=t,W.p=p}}(fi&3)!==0&&Ta(),Fn(e),p=e.pendingLanes,(i&261930)!==0&&(p&42)!==0?e===qc?ll++:(ll=0,qc=e):ll=0,al(0)}}function pp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ps(t)))}function Ta(){return hp(),fp(),dp(),mp()}function mp(){if(Ot!==5)return!1;var e=zi,t=Pc;Pc=0;var i=yn(fi),l=V.T,p=W.p;try{W.p=32>i?32:i,V.T=null,i=Fc,Fc=null;var w=zi,O=fi;if(Ot=0,ns=zi=null,fi=0,(Je&6)!==0)throw Error(o(331));var P=Je;if(Je|=4,Xd(w.current),Wd(w,w.current,O,i),Je=P,al(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(et,w)}catch{}return!0}finally{W.p=p,V.T=l,pp(e,t)}}function gp(e,t,i){t=Cn(i,t),t=bc(e.stateNode,t,2),e=Mi(e,t,2),e!==null&&(nr(e,2),Fn(e))}function nt(e,t,i){if(e.tag===3)gp(e,e,i);else for(;t!==null;){if(t.tag===3){gp(t,e,i);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Hi===null||!Hi.has(l))){e=Cn(i,e),i=_d(2),l=Mi(t,i,2),l!==null&&(vd(i,l,t,e),nr(l,2),Fn(l));break}}t=t.return}}function $c(e,t,i){var l=e.pingCache;if(l===null){l=e.pingCache=new i0;var p=new Set;l.set(t,p)}else p=l.get(t),p===void 0&&(p=new Set,l.set(t,p));p.has(i)||(zc=!0,p.add(i),e=o0.bind(null,e,t,i),t.then(e,e))}function o0(e,t,i){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,at===e&&(Ge&i)===i&&(wt===4||wt===3&&(Ge&62914560)===Ge&&300>Xe()-Ca?(Je&2)===0&&is(e,0):Ic|=i,ts===Ge&&(ts=0)),Fn(e)}function _p(e,t){t===0&&(t=tr()),e=ur(e,t),e!==null&&(nr(e,t),Fn(e))}function c0(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),_p(e,i)}function u0(e,t){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,p=e.memoizedState;p!==null&&(i=p.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),_p(e,i)}function h0(e,t){return Xt(e,t)}var Ra=null,ss=null,Wc=!1,Da=!1,Kc=!1,Ui=0;function Fn(e){e!==ss&&e.next===null&&(ss===null?Ra=ss=e:ss=ss.next=e),Da=!0,Wc||(Wc=!0,d0())}function al(e,t){if(!Kc&&Da){Kc=!0;do for(var i=!1,l=Ra;l!==null;){if(e!==0){var p=l.pendingLanes;if(p===0)var w=0;else{var O=l.suspendedLanes,P=l.pingedLanes;w=(1<<31-Ke(42|e)+1)-1,w&=p&~(O&~P),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(i=!0,bp(l,w))}else w=Ge,w=kr(l,l===at?w:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(w&3)===0||er(l,w)||(i=!0,bp(l,w));l=l.next}while(i);Kc=!1}}function f0(){vp()}function vp(){Da=Wc=!1;var e=0;Ui!==0&&w0()&&(e=Ui);for(var t=Xe(),i=null,l=Ra;l!==null;){var p=l.next,w=yp(l,t);w===0?(l.next=null,i===null?Ra=p:i.next=p,p===null&&(ss=i)):(i=l,(e!==0||(w&3)!==0)&&(Da=!0)),l=p}Ot!==0&&Ot!==5||al(e),Ui!==0&&(Ui=0)}function yp(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,p=e.expirationTimes,w=e.pendingLanes&-62914561;0<w;){var O=31-Ke(w),P=1<<O,Q=p[O];Q===-1?((P&i)===0||(P&l)!==0)&&(p[O]=Ol(P,t)):Q<=t&&(e.expiredLanes|=P),w&=~P}if(t=at,i=Ge,i=kr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,i===0||e===t&&(tt===2||tt===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Qt(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||er(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(l!==null&&Qt(l),yn(i)){case 2:case 8:i=Se;break;case 32:i=Ae;break;case 268435456:i=je;break;default:i=Ae}return l=Sp.bind(null,e),i=Xt(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&Qt(l),e.callbackPriority=2,e.callbackNode=null,2}function Sp(e,t){if(Ot!==0&&Ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Ta()&&e.callbackNode!==i)return null;var l=Ge;return l=kr(e,e===at?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(tp(e,l,t),yp(e,Xe()),e.callbackNode!=null&&e.callbackNode===i?Sp.bind(null,e):null)}function bp(e,t){if(Ta())return null;tp(e,t,!0)}function d0(){E0(function(){(Je&6)!==0?Xt(fe,f0):vp()})}function Yc(){if(Ui===0){var e=Gr;e===0&&(e=He,He<<=1,(He&261888)===0&&(He=256)),Ui=e}return Ui}function Cp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:zl(""+e)}function wp(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function p0(e,t,i,l,p){if(t==="submit"&&i&&i.stateNode===p){var w=Cp((p[it]||null).action),O=l.submitter;O&&(t=(t=O[it]||null)?Cp(t.formAction):O.getAttribute("formAction"),t!==null&&(w=t,O=null));var P=new Fl("action","action",null,l,p);e.push({event:P,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ui!==0){var Q=O?wp(p,O):new FormData(p);mc(i,{pending:!0,data:Q,method:p.method,action:w},null,Q)}}else typeof w=="function"&&(P.preventDefault(),Q=O?wp(p,O):new FormData(p),mc(i,{pending:!0,data:Q,method:p.method,action:w},w,Q))},currentTarget:p}]})}}for(var Xc=0;Xc<Lo.length;Xc++){var Qc=Lo[Xc],m0=Qc.toLowerCase(),g0=Qc[0].toUpperCase()+Qc.slice(1);Mn(m0,"on"+g0)}Mn(Jh,"onAnimationEnd"),Mn(ef,"onAnimationIteration"),Mn(tf,"onAnimationStart"),Mn("dblclick","onDoubleClick"),Mn("focusin","onFocus"),Mn("focusout","onBlur"),Mn(Lv,"onTransitionRun"),Mn(Ov,"onTransitionStart"),Mn(Bv,"onTransitionCancel"),Mn(nf,"onTransitionEnd"),bi("onMouseEnter",["mouseout","mouseover"]),bi("onMouseLeave",["mouseout","mouseover"]),bi("onPointerEnter",["pointerout","pointerover"]),bi("onPointerLeave",["pointerout","pointerover"]),Kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Kn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Kn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ol="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(" "),_0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ol));function xp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],p=l.event;l=l.listeners;e:{var w=void 0;if(t)for(var O=l.length-1;0<=O;O--){var P=l[O],Q=P.instance,ae=P.currentTarget;if(P=P.listener,Q!==w&&p.isPropagationStopped())break e;w=P,p.currentTarget=ae;try{w(p)}catch(pe){Vl(pe)}p.currentTarget=null,w=Q}else for(O=0;O<l.length;O++){if(P=l[O],Q=P.instance,ae=P.currentTarget,P=P.listener,Q!==w&&p.isPropagationStopped())break e;w=P,p.currentTarget=ae;try{w(p)}catch(pe){Vl(pe)}p.currentTarget=null,w=Q}}}}function Fe(e,t){var i=t[Dr];i===void 0&&(i=t[Dr]=new Set);var l=e+"__bubble";i.has(l)||(Ep(t,e,2,!1),i.add(l))}function Zc(e,t,i){var l=0;t&&(l|=4),Ep(i,e,l,t)}var Ma="_reactListening"+Math.random().toString(36).slice(2);function Jc(e){if(!e[Ma]){e[Ma]=!0,Bl.forEach(function(i){i!=="selectionchange"&&(_0.has(i)||Zc(i,!1,e),Zc(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ma]||(t[Ma]=!0,Zc("selectionchange",!1,t))}}function Ep(e,t,i,l){switch(em(t)){case 2:var p=V0;break;case 8:p=$0;break;default:p=pu}i=p.bind(null,t,i,e),p=void 0,!yo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(p=!0),l?p!==void 0?e.addEventListener(t,i,{capture:!0,passive:p}):e.addEventListener(t,i,!0):p!==void 0?e.addEventListener(t,i,{passive:p}):e.addEventListener(t,i,!1)}function eu(e,t,i,l,p){var w=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var O=l.tag;if(O===3||O===4){var P=l.stateNode.containerInfo;if(P===p)break;if(O===4)for(O=l.return;O!==null;){var Q=O.tag;if((Q===3||Q===4)&&O.stateNode.containerInfo===p)return;O=O.return}for(;P!==null;){if(O=At(P),O===null)return;if(Q=O.tag,Q===5||Q===6||Q===26||Q===27){l=w=O;continue e}P=P.parentNode}}l=l.return}Rh(function(){var ae=w,pe=_o(i),ge=[];e:{var oe=rf.get(e);if(oe!==void 0){var ue=Fl,ke=e;switch(e){case"keypress":if(Ul(i)===0)break e;case"keydown":case"keyup":ue=uv;break;case"focusin":ke="focus",ue=wo;break;case"focusout":ke="blur",ue=wo;break;case"beforeblur":case"afterblur":ue=wo;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=Lh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=Z_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=dv;break;case Jh:case ef:case tf:ue=tv;break;case nf:ue=mv;break;case"scroll":case"scrollend":ue=X_;break;case"wheel":ue=_v;break;case"copy":case"cut":case"paste":ue=iv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=Bh;break;case"toggle":case"beforetoggle":ue=yv}var Oe=(t&4)!==0,lt=!Oe&&(e==="scroll"||e==="scrollend"),ie=Oe?oe!==null?oe+"Capture":null:oe;Oe=[];for(var ee=ae,le;ee!==null;){var me=ee;if(le=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||le===null||ie===null||(me=Ds(ee,ie),me!=null&&Oe.push(cl(ee,me,le))),lt)break;ee=ee.return}0<Oe.length&&(oe=new ue(oe,ke,null,i,pe),ge.push({event:oe,listeners:Oe}))}}if((t&7)===0){e:{if(oe=e==="mouseover"||e==="pointerover",ue=e==="mouseout"||e==="pointerout",oe&&i!==go&&(ke=i.relatedTarget||i.fromElement)&&(At(ke)||ke[jn]))break e;if((ue||oe)&&(oe=pe.window===pe?pe:(oe=pe.ownerDocument)?oe.defaultView||oe.parentWindow:window,ue?(ke=i.relatedTarget||i.toElement,ue=ae,ke=ke?At(ke):null,ke!==null&&(lt=v(ke),Oe=ke.tag,ke!==lt||Oe!==5&&Oe!==27&&Oe!==6)&&(ke=null)):(ue=null,ke=ae),ue!==ke)){if(Oe=Lh,me="onMouseLeave",ie="onMouseEnter",ee="mouse",(e==="pointerout"||e==="pointerover")&&(Oe=Bh,me="onPointerLeave",ie="onPointerEnter",ee="pointer"),lt=ue==null?oe:Si(ue),le=ke==null?oe:Si(ke),oe=new Oe(me,ee+"leave",ue,i,pe),oe.target=lt,oe.relatedTarget=le,me=null,At(pe)===ae&&(Oe=new Oe(ie,ee+"enter",ke,i,pe),Oe.target=le,Oe.relatedTarget=lt,me=Oe),lt=me,ue&&ke)t:{for(Oe=v0,ie=ue,ee=ke,le=0,me=ie;me;me=Oe(me))le++;me=0;for(var Re=ee;Re;Re=Oe(Re))me++;for(;0<le-me;)ie=Oe(ie),le--;for(;0<me-le;)ee=Oe(ee),me--;for(;le--;){if(ie===ee||ee!==null&&ie===ee.alternate){Oe=ie;break t}ie=Oe(ie),ee=Oe(ee)}Oe=null}else Oe=null;ue!==null&&kp(ge,oe,ue,Oe,!1),ke!==null&&lt!==null&&kp(ge,lt,ke,Oe,!0)}}e:{if(oe=ae?Si(ae):window,ue=oe.nodeName&&oe.nodeName.toLowerCase(),ue==="select"||ue==="input"&&oe.type==="file")var Qe=Fh;else if(Uh(oe))if(qh)Qe=Rv;else{Qe=Av;var Te=kv}else ue=oe.nodeName,!ue||ue.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?ae&&Xn(ae.elementType)&&(Qe=Fh):Qe=Tv;if(Qe&&(Qe=Qe(e,ae))){Ph(ge,Qe,i,pe);break e}Te&&Te(e,oe,ae),e==="focusout"&&ae&&oe.type==="number"&&ae.memoizedProps.value!=null&&Ts(oe,"number",oe.value)}switch(Te=ae?Si(ae):window,e){case"focusin":(Uh(Te)||Te.contentEditable==="true")&&(Nr=Te,Ro=ae,zs=null);break;case"focusout":zs=Ro=Nr=null;break;case"mousedown":Do=!0;break;case"contextmenu":case"mouseup":case"dragend":Do=!1,Qh(ge,i,pe);break;case"selectionchange":if(Mv)break;case"keydown":case"keyup":Qh(ge,i,pe)}var Ie;if(Eo)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else jr?zh(e,i)&&(Ve="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ve="onCompositionStart");Ve&&(jh&&i.locale!=="ko"&&(jr||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&jr&&(Ie=Dh()):(xi=pe,So="value"in xi?xi.value:xi.textContent,jr=!0)),Te=La(ae,Ve),0<Te.length&&(Ve=new Oh(Ve,e,null,i,pe),ge.push({event:Ve,listeners:Te}),Ie?Ve.data=Ie:(Ie=Ih(i),Ie!==null&&(Ve.data=Ie)))),(Ie=bv?Cv(e,i):wv(e,i))&&(Ve=La(ae,"onBeforeInput"),0<Ve.length&&(Te=new Oh("onBeforeInput","beforeinput",null,i,pe),ge.push({event:Te,listeners:Ve}),Te.data=Ie)),p0(ge,e,ae,i,pe)}xp(ge,t)})}function cl(e,t,i){return{instance:e,listener:t,currentTarget:i}}function La(e,t){for(var i=t+"Capture",l=[];e!==null;){var p=e,w=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||w===null||(p=Ds(e,i),p!=null&&l.unshift(cl(e,p,w)),p=Ds(e,t),p!=null&&l.push(cl(e,p,w))),e.tag===3)return l;e=e.return}return[]}function v0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kp(e,t,i,l,p){for(var w=t._reactName,O=[];i!==null&&i!==l;){var P=i,Q=P.alternate,ae=P.stateNode;if(P=P.tag,Q!==null&&Q===l)break;P!==5&&P!==26&&P!==27||ae===null||(Q=ae,p?(ae=Ds(i,w),ae!=null&&O.unshift(cl(i,ae,Q))):p||(ae=Ds(i,w),ae!=null&&O.push(cl(i,ae,Q)))),i=i.return}O.length!==0&&e.push({event:t,listeners:O})}var y0=/\r\n?/g,S0=/\u0000|\uFFFD/g;function Ap(e){return(typeof e=="string"?e:""+e).replace(y0,`
49
+ `).replace(S0,"")}function Tp(e,t){return t=Ap(t),Ap(e)===t}function st(e,t,i,l,p,w){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Y(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Y(e,""+l);break;case"className":Hn(e,"class",l);break;case"tabIndex":Hn(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Hn(e,i,l);break;case"style":xt(e,l,w);break;case"data":if(t!=="object"){Hn(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=zl(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof w=="function"&&(i==="formAction"?(t!=="input"&&st(e,t,"name",p.name,p,null),st(e,t,"formEncType",p.formEncType,p,null),st(e,t,"formMethod",p.formMethod,p,null),st(e,t,"formTarget",p.formTarget,p,null)):(st(e,t,"encType",p.encType,p,null),st(e,t,"method",p.method,p,null),st(e,t,"target",p.target,p,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=zl(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=Qn);break;case"onScroll":l!=null&&Fe("scroll",e);break;case"onScrollEnd":l!=null&&Fe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(p.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}i=zl(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""+l):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":Fe("beforetoggle",e),Fe("toggle",e),Nn(e,"popover",l);break;case"xlinkActuate":on(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":on(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":on(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":on(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":on(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":on(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":on(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":on(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":on(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Nn(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=wi.get(i)||i,Nn(e,i,l))}}function tu(e,t,i,l,p,w){switch(i){case"style":xt(e,l,w);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(p.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof l=="string"?Y(e,l):(typeof l=="number"||typeof l=="bigint")&&Y(e,""+l);break;case"onScroll":l!=null&&Fe("scroll",e);break;case"onScrollEnd":l!=null&&Fe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Qn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!rr.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(p=i.endsWith("Capture"),t=i.slice(2,p?i.length-7:void 0),w=e[it]||null,w=w!=null?w[i]:null,typeof w=="function"&&e.removeEventListener(t,w,p),typeof l=="function")){typeof w!="function"&&w!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,p);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):Nn(e,i,l)}}}function Ut(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Fe("error",e),Fe("load",e);var l=!1,p=!1,w;for(w in i)if(i.hasOwnProperty(w)){var O=i[w];if(O!=null)switch(w){case"src":l=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,w,O,i,null)}}p&&st(e,t,"srcSet",i.srcSet,i,null),l&&st(e,t,"src",i.src,i,null);return;case"input":Fe("invalid",e);var P=w=O=p=null,Q=null,ae=null;for(l in i)if(i.hasOwnProperty(l)){var pe=i[l];if(pe!=null)switch(l){case"name":p=pe;break;case"type":O=pe;break;case"checked":Q=pe;break;case"defaultChecked":ae=pe;break;case"value":w=pe;break;case"defaultValue":P=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(o(137,t));break;default:st(e,t,l,pe,i,null)}}Hl(e,w,P,Q,ae,O,p,!1);return;case"select":Fe("invalid",e),l=O=w=null;for(p in i)if(i.hasOwnProperty(p)&&(P=i[p],P!=null))switch(p){case"value":w=P;break;case"defaultValue":O=P;break;case"multiple":l=P;default:st(e,t,p,P,i,null)}t=w,i=O,e.multiple=!!l,t!=null?Ci(e,!!l,t,!1):i!=null&&Ci(e,!!l,i,!0);return;case"textarea":Fe("invalid",e),w=p=l=null;for(O in i)if(i.hasOwnProperty(O)&&(P=i[O],P!=null))switch(O){case"value":l=P;break;case"defaultValue":p=P;break;case"children":w=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(91));break;default:st(e,t,O,P,i,null)}Rs(e,l,p,w);return;case"option":for(Q in i)if(i.hasOwnProperty(Q)&&(l=i[Q],l!=null))switch(Q){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:st(e,t,Q,l,i,null)}return;case"dialog":Fe("beforetoggle",e),Fe("toggle",e),Fe("cancel",e),Fe("close",e);break;case"iframe":case"object":Fe("load",e);break;case"video":case"audio":for(l=0;l<ol.length;l++)Fe(ol[l],e);break;case"image":Fe("error",e),Fe("load",e);break;case"details":Fe("toggle",e);break;case"embed":case"source":case"link":Fe("error",e),Fe("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(ae in i)if(i.hasOwnProperty(ae)&&(l=i[ae],l!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,ae,l,i,null)}return;default:if(Xn(t)){for(pe in i)i.hasOwnProperty(pe)&&(l=i[pe],l!==void 0&&tu(e,t,pe,l,i,void 0));return}}for(P in i)i.hasOwnProperty(P)&&(l=i[P],l!=null&&st(e,t,P,l,i,null))}function b0(e,t,i,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,w=null,O=null,P=null,Q=null,ae=null,pe=null;for(ue in i){var ge=i[ue];if(i.hasOwnProperty(ue)&&ge!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":Q=ge;default:l.hasOwnProperty(ue)||st(e,t,ue,null,l,ge)}}for(var oe in l){var ue=l[oe];if(ge=i[oe],l.hasOwnProperty(oe)&&(ue!=null||ge!=null))switch(oe){case"type":w=ue;break;case"name":p=ue;break;case"checked":ae=ue;break;case"defaultChecked":pe=ue;break;case"value":O=ue;break;case"defaultValue":P=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(o(137,t));break;default:ue!==ge&&st(e,t,oe,ue,l,ge)}}As(e,O,P,Q,ae,pe,w,p);return;case"select":ue=O=P=oe=null;for(w in i)if(Q=i[w],i.hasOwnProperty(w)&&Q!=null)switch(w){case"value":break;case"multiple":ue=Q;default:l.hasOwnProperty(w)||st(e,t,w,null,l,Q)}for(p in l)if(w=l[p],Q=i[p],l.hasOwnProperty(p)&&(w!=null||Q!=null))switch(p){case"value":oe=w;break;case"defaultValue":P=w;break;case"multiple":O=w;default:w!==Q&&st(e,t,p,w,l,Q)}t=P,i=O,l=ue,oe!=null?Ci(e,!!i,oe,!1):!!l!=!!i&&(t!=null?Ci(e,!!i,t,!0):Ci(e,!!i,i?[]:"",!1));return;case"textarea":ue=oe=null;for(P in i)if(p=i[P],i.hasOwnProperty(P)&&p!=null&&!l.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:st(e,t,P,null,l,p)}for(O in l)if(p=l[O],w=i[O],l.hasOwnProperty(O)&&(p!=null||w!=null))switch(O){case"value":oe=p;break;case"defaultValue":ue=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(o(91));break;default:p!==w&&st(e,t,O,p,l,w)}Lr(e,oe,ue);return;case"option":for(var ke in i)if(oe=i[ke],i.hasOwnProperty(ke)&&oe!=null&&!l.hasOwnProperty(ke))switch(ke){case"selected":e.selected=!1;break;default:st(e,t,ke,null,l,oe)}for(Q in l)if(oe=l[Q],ue=i[Q],l.hasOwnProperty(Q)&&oe!==ue&&(oe!=null||ue!=null))switch(Q){case"selected":e.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:st(e,t,Q,oe,l,ue)}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 Oe in i)oe=i[Oe],i.hasOwnProperty(Oe)&&oe!=null&&!l.hasOwnProperty(Oe)&&st(e,t,Oe,null,l,oe);for(ae in l)if(oe=l[ae],ue=i[ae],l.hasOwnProperty(ae)&&oe!==ue&&(oe!=null||ue!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,t));break;default:st(e,t,ae,oe,l,ue)}return;default:if(Xn(t)){for(var lt in i)oe=i[lt],i.hasOwnProperty(lt)&&oe!==void 0&&!l.hasOwnProperty(lt)&&tu(e,t,lt,void 0,l,oe);for(pe in l)oe=l[pe],ue=i[pe],!l.hasOwnProperty(pe)||oe===ue||oe===void 0&&ue===void 0||tu(e,t,pe,oe,l,ue);return}}for(var ie in i)oe=i[ie],i.hasOwnProperty(ie)&&oe!=null&&!l.hasOwnProperty(ie)&&st(e,t,ie,null,l,oe);for(ge in l)oe=l[ge],ue=i[ge],!l.hasOwnProperty(ge)||oe===ue||oe==null&&ue==null||st(e,t,ge,oe,l,ue)}function Rp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function C0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var p=i[l],w=p.transferSize,O=p.initiatorType,P=p.duration;if(w&&P&&Rp(O)){for(O=0,P=p.responseEnd,l+=1;l<i.length;l++){var Q=i[l],ae=Q.startTime;if(ae>P)break;var pe=Q.transferSize,ge=Q.initiatorType;pe&&Rp(ge)&&(Q=Q.responseEnd,O+=pe*(Q<P?1:(P-ae)/(Q-ae)))}if(--l,t+=8*(w+O)/(p.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var nu=null,iu=null;function Oa(e){return e.nodeType===9?e:e.ownerDocument}function Dp(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 Mp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ru(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var su=null;function w0(){var e=window.event;return e&&e.type==="popstate"?e===su?!1:(su=e,!0):(su=null,!1)}var Lp=typeof setTimeout=="function"?setTimeout:void 0,x0=typeof clearTimeout=="function"?clearTimeout:void 0,Op=typeof Promise=="function"?Promise:void 0,E0=typeof queueMicrotask=="function"?queueMicrotask:typeof Op<"u"?function(e){return Op.resolve(null).then(e).catch(k0)}:Lp;function k0(e){setTimeout(function(){throw e})}function Pi(e){return e==="head"}function Bp(e,t){var i=t,l=0;do{var p=i.nextSibling;if(e.removeChild(i),p&&p.nodeType===8)if(i=p.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(p),cs(t);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")ul(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,ul(i);for(var w=i.firstChild;w;){var O=w.nextSibling,P=w.nodeName;w[ir]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&w.rel.toLowerCase()==="stylesheet"||i.removeChild(w),w=O}}else i==="body"&&ul(e.ownerDocument.body);i=p}while(i);cs(t)}function jp(e,t){var i=e;e=0;do{var l=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=l}while(i)}function lu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":lu(i),Es(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function A0(e,t,i,l){for(;e.nodeType===1;){var p=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ir])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(w=e.getAttribute("rel"),w==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(w!==p.rel||e.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||e.getAttribute("title")!==(p.title==null?null:p.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(w=e.getAttribute("src"),(w!==(p.src==null?null:p.src)||e.getAttribute("type")!==(p.type==null?null:p.type)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&w&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var w=p.name==null?null:""+p.name;if(p.type==="hidden"&&e.getAttribute("name")===w)return e}else return e;if(e=An(e.nextSibling),e===null)break}return null}function T0(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=An(e.nextSibling),e===null))return null;return e}function Np(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=An(e.nextSibling),e===null))return null;return e}function au(e){return e.data==="$?"||e.data==="$~"}function ou(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function R0(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var l=function(){t(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function An(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var cu=null;function Hp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return An(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function zp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function Ip(e,t,i){switch(t=Oa(i),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ul(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Es(e)}var Tn=new Map,Up=new Set;function Ba(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var di=W.d;W.d={f:D0,r:M0,D:L0,C:O0,L:B0,m:j0,X:H0,S:N0,M:z0};function D0(){var e=di.f(),t=Ea();return e||t}function M0(e){var t=Nt(e);t!==null&&t.tag===5&&t.type==="form"?id(t):di.r(e)}var ls=typeof document>"u"?null:document;function Pp(e,t,i){var l=ls;if(l&&typeof t=="string"&&t){var p=Me(t);p='link[rel="'+e+'"][href="'+p+'"]',typeof i=="string"&&(p+='[crossorigin="'+i+'"]'),Up.has(p)||(Up.add(p),e={rel:e,crossOrigin:i,href:t},l.querySelector(p)===null&&(t=l.createElement("link"),Ut(t,"link",e),bt(t),l.head.appendChild(t)))}}function L0(e){di.D(e),Pp("dns-prefetch",e,null)}function O0(e,t){di.C(e,t),Pp("preconnect",e,t)}function B0(e,t,i){di.L(e,t,i);var l=ls;if(l&&e&&t){var p='link[rel="preload"][as="'+Me(t)+'"]';t==="image"&&i&&i.imageSrcSet?(p+='[imagesrcset="'+Me(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(p+='[imagesizes="'+Me(i.imageSizes)+'"]')):p+='[href="'+Me(e)+'"]';var w=p;switch(t){case"style":w=as(e);break;case"script":w=os(e)}Tn.has(w)||(e=u({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Tn.set(w,e),l.querySelector(p)!==null||t==="style"&&l.querySelector(hl(w))||t==="script"&&l.querySelector(fl(w))||(t=l.createElement("link"),Ut(t,"link",e),bt(t),l.head.appendChild(t)))}}function j0(e,t){di.m(e,t);var i=ls;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",p='link[rel="modulepreload"][as="'+Me(l)+'"][href="'+Me(e)+'"]',w=p;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=os(e)}if(!Tn.has(w)&&(e=u({rel:"modulepreload",href:e},t),Tn.set(w,e),i.querySelector(p)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(fl(w)))return}l=i.createElement("link"),Ut(l,"link",e),bt(l),i.head.appendChild(l)}}}function N0(e,t,i){di.S(e,t,i);var l=ls;if(l&&e){var p=Wn(l).hoistableStyles,w=as(e);t=t||"default";var O=p.get(w);if(!O){var P={loading:0,preload:null};if(O=l.querySelector(hl(w)))P.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Tn.get(w))&&uu(e,i);var Q=O=l.createElement("link");bt(Q),Ut(Q,"link",e),Q._p=new Promise(function(ae,pe){Q.onload=ae,Q.onerror=pe}),Q.addEventListener("load",function(){P.loading|=1}),Q.addEventListener("error",function(){P.loading|=2}),P.loading|=4,ja(O,t,l)}O={type:"stylesheet",instance:O,count:1,state:P},p.set(w,O)}}}function H0(e,t){di.X(e,t);var i=ls;if(i&&e){var l=Wn(i).hoistableScripts,p=os(e),w=l.get(p);w||(w=i.querySelector(fl(p)),w||(e=u({src:e,async:!0},t),(t=Tn.get(p))&&hu(e,t),w=i.createElement("script"),bt(w),Ut(w,"link",e),i.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},l.set(p,w))}}function z0(e,t){di.M(e,t);var i=ls;if(i&&e){var l=Wn(i).hoistableScripts,p=os(e),w=l.get(p);w||(w=i.querySelector(fl(p)),w||(e=u({src:e,async:!0,type:"module"},t),(t=Tn.get(p))&&hu(e,t),w=i.createElement("script"),bt(w),Ut(w,"link",e),i.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},l.set(p,w))}}function Fp(e,t,i,l){var p=(p=_e.current)?Ba(p):null;if(!p)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=as(i.href),i=Wn(p).hoistableStyles,l=i.get(t),l||(l={type:"style",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=as(i.href);var w=Wn(p).hoistableStyles,O=w.get(e);if(O||(p=p.ownerDocument||p,O={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(e,O),(w=p.querySelector(hl(e)))&&!w._p&&(O.instance=w,O.state.loading=5),Tn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Tn.set(e,i),w||I0(p,e,i,O.state))),t&&l===null)throw Error(o(528,""));return O}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=os(i),i=Wn(p).hoistableScripts,l=i.get(t),l||(l={type:"script",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function as(e){return'href="'+Me(e)+'"'}function hl(e){return'link[rel="stylesheet"]['+e+"]"}function qp(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function I0(e,t,i,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Ut(t,"link",i),bt(t),e.head.appendChild(t))}function os(e){return'[src="'+Me(e)+'"]'}function fl(e){return"script[async]"+e}function Gp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Me(i.href)+'"]');if(l)return t.instance=l,bt(l),l;var p=u({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),bt(l),Ut(l,"style",p),ja(l,i.precedence,e),t.instance=l;case"stylesheet":p=as(i.href);var w=e.querySelector(hl(p));if(w)return t.state.loading|=4,t.instance=w,bt(w),w;l=qp(i),(p=Tn.get(p))&&uu(l,p),w=(e.ownerDocument||e).createElement("link"),bt(w);var O=w;return O._p=new Promise(function(P,Q){O.onload=P,O.onerror=Q}),Ut(w,"link",l),t.state.loading|=4,ja(w,i.precedence,e),t.instance=w;case"script":return w=os(i.src),(p=e.querySelector(fl(w)))?(t.instance=p,bt(p),p):(l=i,(p=Tn.get(w))&&(l=u({},i),hu(l,p)),e=e.ownerDocument||e,p=e.createElement("script"),bt(p),Ut(p,"link",l),e.head.appendChild(p),t.instance=p);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ja(l,i.precedence,e));return t.instance}function ja(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=l.length?l[l.length-1]:null,w=p,O=0;O<l.length;O++){var P=l[O];if(P.dataset.precedence===t)w=P;else if(w!==p)break}w?w.parentNode.insertBefore(e,w.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function uu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function hu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Na=null;function Vp(e,t,i){if(Na===null){var l=new Map,p=Na=new Map;p.set(i,l)}else p=Na,l=p.get(i),l||(l=new Map,p.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),p=0;p<i.length;p++){var w=i[p];if(!(w[ir]||w[ne]||e==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var O=w.getAttribute(t)||"";O=e+O;var P=l.get(O);P?P.push(w):l.set(O,[w])}}return l}function $p(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function U0(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Wp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function P0(e,t,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var p=as(l.href),w=t.querySelector(hl(p));if(w){t=w._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ha.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=w,bt(w);return}w=t.ownerDocument||t,l=qp(l),(p=Tn.get(p))&&uu(l,p),w=w.createElement("link"),bt(w);var O=w;O._p=new Promise(function(P,Q){O.onload=P,O.onerror=Q}),Ut(w,"link",l),i.instance=w}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Ha.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var fu=0;function F0(e,t){return e.stylesheets&&e.count===0&&Ia(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&Ia(e,e.stylesheets),e.unsuspend){var w=e.unsuspend;e.unsuspend=null,w()}},6e4+t);0<e.imgBytes&&fu===0&&(fu=62500*C0());var p=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ia(e,e.stylesheets),e.unsuspend)){var w=e.unsuspend;e.unsuspend=null,w()}},(e.imgBytes>fu?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(p)}}:null}function Ha(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ia(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var za=null;function Ia(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,za=new Map,t.forEach(q0,e),za=null,Ha.call(e))}function q0(e,t){if(!(t.state.loading&4)){var i=za.get(e);if(i)var l=i.get(null);else{i=new Map,za.set(e,i);for(var p=e.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<p.length;w++){var O=p[w];(O.nodeName==="LINK"||O.getAttribute("media")!=="not all")&&(i.set(O.dataset.precedence,O),l=O)}l&&i.set(null,l)}p=t.instance,O=p.getAttribute("data-precedence"),w=i.get(O)||l,w===l&&i.set(null,p),i.set(O,p),this.count++,l=Ha.bind(this),p.addEventListener("load",l),p.addEventListener("error",l),w?w.parentNode.insertBefore(p,w.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(p,e.firstChild)),t.state.loading|=4}}var dl={$$typeof:S,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function G0(e,t,i,l,p,w,O,P,Q){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=Ar(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ar(0),this.hiddenUpdates=Ar(null),this.identifierPrefix=l,this.onUncaughtError=p,this.onCaughtError=w,this.onRecoverableError=O,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function Kp(e,t,i,l,p,w,O,P,Q,ae,pe,ge){return e=new G0(e,t,i,O,Q,ae,pe,ge,P),t=1,w===!0&&(t|=24),w=un(3,null,null,t),e.current=w,w.stateNode=e,t=Vo(),t.refCount++,e.pooledCache=t,t.refCount++,w.memoizedState={element:l,isDehydrated:i,cache:t},Yo(w),e}function Yp(e){return e?(e=Ir,e):Ir}function Xp(e,t,i,l,p,w){p=Yp(p),l.context===null?l.context=p:l.pendingContext=p,l=Di(t),l.payload={element:i},w=w===void 0?null:w,w!==null&&(l.callback=w),i=Mi(e,l,t),i!==null&&(sn(i,e,t),Vs(i,e,t))}function Qp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function du(e,t){Qp(e,t),(e=e.alternate)&&Qp(e,t)}function Zp(e){if(e.tag===13||e.tag===31){var t=ur(e,67108864);t!==null&&sn(t,e,67108864),du(e,67108864)}}function Jp(e){if(e.tag===13||e.tag===31){var t=mn();t=Rr(t);var i=ur(e,t);i!==null&&sn(i,e,t),du(e,t)}}var Ua=!0;function V0(e,t,i,l){var p=V.T;V.T=null;var w=W.p;try{W.p=2,pu(e,t,i,l)}finally{W.p=w,V.T=p}}function $0(e,t,i,l){var p=V.T;V.T=null;var w=W.p;try{W.p=8,pu(e,t,i,l)}finally{W.p=w,V.T=p}}function pu(e,t,i,l){if(Ua){var p=mu(l);if(p===null)eu(e,t,l,Pa,i),tm(e,l);else if(K0(p,e,t,i,l))l.stopPropagation();else if(tm(e,l),t&4&&-1<W0.indexOf(e)){for(;p!==null;){var w=Nt(p);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var O=$n(w.pendingLanes);if(O!==0){var P=w;for(P.pendingLanes|=2,P.entangledLanes|=2;O;){var Q=1<<31-Ke(O);P.entanglements[1]|=Q,O&=~Q}Fn(w),(Je&6)===0&&(wa=Xe()+500,al(0))}}break;case 31:case 13:P=ur(w,2),P!==null&&sn(P,w,2),Ea(),du(w,2)}if(w=mu(l),w===null&&eu(e,t,l,Pa,i),w===p)break;p=w}p!==null&&l.stopPropagation()}else eu(e,t,l,null,i)}}function mu(e){return e=_o(e),gu(e)}var Pa=null;function gu(e){if(Pa=null,e=At(e),e!==null){var t=v(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(t),e!==null)return e;e=null}else if(i===31){if(e=a(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Pa=e,null}function em(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(pt()){case fe:return 2;case Se:return 8;case Ae:case Be:return 32;case je:return 268435456;default:return 32}default:return 32}}var _u=!1,Fi=null,qi=null,Gi=null,pl=new Map,ml=new Map,Vi=[],W0="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 tm(e,t){switch(e){case"focusin":case"focusout":Fi=null;break;case"dragenter":case"dragleave":qi=null;break;case"mouseover":case"mouseout":Gi=null;break;case"pointerover":case"pointerout":pl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ml.delete(t.pointerId)}}function gl(e,t,i,l,p,w){return e===null||e.nativeEvent!==w?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:w,targetContainers:[p]},t!==null&&(t=Nt(t),t!==null&&Zp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,p!==null&&t.indexOf(p)===-1&&t.push(p),e)}function K0(e,t,i,l,p){switch(t){case"focusin":return Fi=gl(Fi,e,t,i,l,p),!0;case"dragenter":return qi=gl(qi,e,t,i,l,p),!0;case"mouseover":return Gi=gl(Gi,e,t,i,l,p),!0;case"pointerover":var w=p.pointerId;return pl.set(w,gl(pl.get(w)||null,e,t,i,l,p)),!0;case"gotpointercapture":return w=p.pointerId,ml.set(w,gl(ml.get(w)||null,e,t,i,l,p)),!0}return!1}function nm(e){var t=At(e.target);if(t!==null){var i=v(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,yi(e.priority,function(){Jp(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,yi(e.priority,function(){Jp(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=mu(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);go=l,i.target.dispatchEvent(l),go=null}else return t=Nt(i),t!==null&&Zp(t),e.blockedOn=i,!1;t.shift()}return!0}function im(e,t,i){Fa(e)&&i.delete(t)}function Y0(){_u=!1,Fi!==null&&Fa(Fi)&&(Fi=null),qi!==null&&Fa(qi)&&(qi=null),Gi!==null&&Fa(Gi)&&(Gi=null),pl.forEach(im),ml.forEach(im)}function qa(e,t){e.blockedOn===t&&(e.blockedOn=null,_u||(_u=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Y0)))}var Ga=null;function rm(e){Ga!==e&&(Ga=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ga===e&&(Ga=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],p=e[t+2];if(typeof l!="function"){if(gu(l||i)===null)continue;break}var w=Nt(i);w!==null&&(e.splice(t,3),t-=3,mc(w,{pending:!0,data:p,method:i.method,action:l},l,p))}}))}function cs(e){function t(Q){return qa(Q,e)}Fi!==null&&qa(Fi,e),qi!==null&&qa(qi,e),Gi!==null&&qa(Gi,e),pl.forEach(t),ml.forEach(t);for(var i=0;i<Vi.length;i++){var l=Vi[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Vi.length&&(i=Vi[0],i.blockedOn===null);)nm(i),i.blockedOn===null&&Vi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var p=i[l],w=i[l+1],O=p[it]||null;if(typeof w=="function")O||rm(i);else if(O){var P=null;if(w&&w.hasAttribute("formAction")){if(p=w,O=w[it]||null)P=O.formAction;else if(gu(p)!==null)continue}else P=O.action;typeof P=="function"?i[l+1]=P:(i.splice(l,3),l-=3),rm(i)}}}function sm(){function e(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(O){return p=O})},focusReset:"manual",scroll:"manual"})}function t(){p!==null&&(p(),p=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,p=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),p!==null&&(p(),p=null)}}}function vu(e){this._internalRoot=e}Va.prototype.render=vu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,l=mn();Xp(i,l,e,t,null,null)},Va.prototype.unmount=vu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xp(e.current,2,null,e,null,null),Ea(),t[jn]=null}};function Va(e){this._internalRoot=e}Va.prototype.unstable_scheduleHydration=function(e){if(e){var t=vi();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Vi.length&&t!==0&&t<Vi[i].priority;i++);Vi.splice(i,0,e),i===0&&nm(e)}};var lm=r.version;if(lm!=="19.2.6")throw Error(o(527,lm,"19.2.6"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(t),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var X0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $a=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$a.isDisabled&&$a.supportsFiber)try{et=$a.inject(X0),ut=$a}catch{}}return vl.createRoot=function(e,t){if(!d(e))throw Error(o(299));var i=!1,l="",p=dd,w=pd,O=md;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(p=t.onUncaughtError),t.onCaughtError!==void 0&&(w=t.onCaughtError),t.onRecoverableError!==void 0&&(O=t.onRecoverableError)),t=Kp(e,1,!1,null,null,i,l,null,p,w,O,sm),e[jn]=t.current,Jc(e),new vu(t)},vl.hydrateRoot=function(e,t,i){if(!d(e))throw Error(o(299));var l=!1,p="",w=dd,O=pd,P=md,Q=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onUncaughtError!==void 0&&(w=i.onUncaughtError),i.onCaughtError!==void 0&&(O=i.onCaughtError),i.onRecoverableError!==void 0&&(P=i.onRecoverableError),i.formState!==void 0&&(Q=i.formState)),t=Kp(e,1,!0,t,i??null,l,p,Q,w,O,P,sm),t.context=Yp(null),i=t.current,l=mn(),l=Rr(l),p=Di(l),p.callback=null,Mi(i,p,l),i=l,t.current.lanes=i,nr(t,i),Fn(t),e[jn]=t.current,Jc(e),new Va(t)},vl.version="19.2.6",vl}var _m;function o1(){if(_m)return bu.exports;_m=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),bu.exports=a1(),bu.exports}var c1=o1();const _s=function(n,r){let d=n;const v=wl[r];let f=null,a=0,c=null;const h=[],m={},u=function(R,A){a=d*4+17,f=(function(L){const B=new Array(L);for(let I=0;I<L;I+=1){B[I]=new Array(L);for(let U=0;U<L;U+=1)B[I][U]=null}return B})(a),b(0,0),b(a-7,0),b(0,a-7),x(),E(),_(R,A),d>=7&&y(R),c==null&&(c=k(d,v,h)),g(c,A)},b=function(R,A){for(let L=-1;L<=7;L+=1)if(!(R+L<=-1||a<=R+L))for(let B=-1;B<=7;B+=1)A+B<=-1||a<=A+B||(0<=L&&L<=6&&(B==0||B==6)||0<=B&&B<=6&&(L==0||L==6)||2<=L&&L<=4&&2<=B&&B<=4?f[R+L][A+B]=!0:f[R+L][A+B]=!1)},C=function(){let R=0,A=0;for(let L=0;L<8;L+=1){u(!0,L);const B=Ki.getLostPoint(m);(L==0||R>B)&&(R=B,A=L)}return A},E=function(){for(let R=8;R<a-8;R+=1)f[R][6]==null&&(f[R][6]=R%2==0);for(let R=8;R<a-8;R+=1)f[6][R]==null&&(f[6][R]=R%2==0)},x=function(){const R=Ki.getPatternPosition(d);for(let A=0;A<R.length;A+=1)for(let L=0;L<R.length;L+=1){const B=R[A],I=R[L];if(f[B][I]==null)for(let U=-2;U<=2;U+=1)for(let F=-2;F<=2;F+=1)U==-2||U==2||F==-2||F==2||U==0&&F==0?f[B+U][I+F]=!0:f[B+U][I+F]=!1}},y=function(R){const A=Ki.getBCHTypeNumber(d);for(let L=0;L<18;L+=1){const B=!R&&(A>>L&1)==1;f[Math.floor(L/3)][L%3+a-8-3]=B}for(let L=0;L<18;L+=1){const B=!R&&(A>>L&1)==1;f[L%3+a-8-3][Math.floor(L/3)]=B}},_=function(R,A){const L=v<<3|A,B=Ki.getBCHTypeInfo(L);for(let I=0;I<15;I+=1){const U=!R&&(B>>I&1)==1;I<6?f[I][8]=U:I<8?f[I+1][8]=U:f[a-15+I][8]=U}for(let I=0;I<15;I+=1){const U=!R&&(B>>I&1)==1;I<8?f[8][a-I-1]=U:I<9?f[8][15-I-1+1]=U:f[8][15-I-1]=U}f[a-8][8]=!R},g=function(R,A){let L=-1,B=a-1,I=7,U=0;const F=Ki.getMaskFunction(A);for(let $=a-1;$>0;$-=2)for($==6&&($-=1);;){for(let K=0;K<2;K+=1)if(f[B][$-K]==null){let V=!1;U<R.length&&(V=(R[U]>>>I&1)==1),F(B,$-K)&&(V=!V),f[B][$-K]=V,I-=1,I==-1&&(U+=1,I=7)}if(B+=L,B<0||a<=B){B-=L,L=-L;break}}},S=function(R,A){let L=0,B=0,I=0;const U=new Array(A.length),F=new Array(A.length);for(let W=0;W<A.length;W+=1){const J=A[W].dataCount,z=A[W].totalCount-J;B=Math.max(B,J),I=Math.max(I,z),U[W]=new Array(J);for(let N=0;N<U[W].length;N+=1)U[W][N]=255&R.getBuffer()[N+L];L+=J;const j=Ki.getErrorCorrectPolynomial(z),G=Al(U[W],j.getLength()-1).mod(j);F[W]=new Array(j.getLength()-1);for(let N=0;N<F[W].length;N+=1){const Z=N+G.getLength()-F[W].length;F[W][N]=Z>=0?G.getAt(Z):0}}let $=0;for(let W=0;W<A.length;W+=1)$+=A[W].totalCount;const K=new Array($);let V=0;for(let W=0;W<B;W+=1)for(let J=0;J<A.length;J+=1)W<U[J].length&&(K[V]=U[J][W],V+=1);for(let W=0;W<I;W+=1)for(let J=0;J<A.length;J+=1)W<F[J].length&&(K[V]=F[J][W],V+=1);return K},k=function(R,A,L){const B=vm.getRSBlocks(R,A),I=ym();for(let F=0;F<L.length;F+=1){const $=L[F];I.put($.getMode(),4),I.put($.getLength(),Ki.getLengthInBits($.getMode(),R)),$.write(I)}let U=0;for(let F=0;F<B.length;F+=1)U+=B[F].dataCount;if(I.getLengthInBits()>U*8)throw"code length overflow. ("+I.getLengthInBits()+">"+U*8+")";for(I.getLengthInBits()+4<=U*8&&I.put(0,4);I.getLengthInBits()%8!=0;)I.putBit(!1);for(;!(I.getLengthInBits()>=U*8||(I.put(236,8),I.getLengthInBits()>=U*8));)I.put(17,8);return S(I,B)};m.addData=function(R,A){A=A||"Byte";let L=null;switch(A){case"Numeric":L=u1(R);break;case"Alphanumeric":L=h1(R);break;case"Byte":L=f1(R);break;case"Kanji":L=d1(R);break;default:throw"mode:"+A}h.push(L),c=null},m.isDark=function(R,A){if(R<0||a<=R||A<0||a<=A)throw R+","+A;return f[R][A]},m.getModuleCount=function(){return a},m.make=function(){if(d<1){let R=1;for(;R<40;R++){const A=vm.getRSBlocks(R,v),L=ym();for(let I=0;I<h.length;I++){const U=h[I];L.put(U.getMode(),4),L.put(U.getLength(),Ki.getLengthInBits(U.getMode(),R)),U.write(L)}let B=0;for(let I=0;I<A.length;I++)B+=A[I].dataCount;if(L.getLengthInBits()<=B*8)break}d=R}u(!1,C())},m.createTableTag=function(R,A){R=R||2,A=typeof A>"u"?R*4:A;let L="";L+='<table style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: "+A+"px;",L+='">',L+="<tbody>";for(let B=0;B<m.getModuleCount();B+=1){L+="<tr>";for(let I=0;I<m.getModuleCount();I+=1)L+='<td style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: 0px;",L+=" width: "+R+"px;",L+=" height: "+R+"px;",L+=" background-color: ",L+=m.isDark(B,I)?"#000000":"#ffffff",L+=";",L+='"/>';L+="</tr>"}return L+="</tbody>",L+="</table>",L},m.createSvgTag=function(R,A,L,B){let I={};typeof arguments[0]=="object"&&(I=arguments[0],R=I.cellSize,A=I.margin,L=I.alt,B=I.title),R=R||2,A=typeof A>"u"?R*4:A,L=typeof L=="string"?{text:L}:L||{},L.text=L.text||null,L.id=L.text?L.id||"qrcode-description":null,B=typeof B=="string"?{text:B}:B||{},B.text=B.text||null,B.id=B.text?B.id||"qrcode-title":null;const U=m.getModuleCount()*R+A*2;let F,$,K,V,W="",J;for(J="l"+R+",0 0,"+R+" -"+R+",0 0,-"+R+"z ",W+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',W+=I.scalable?"":' width="'+U+'px" height="'+U+'px"',W+=' viewBox="0 0 '+U+" "+U+'" ',W+=' preserveAspectRatio="xMinYMin meet"',W+=B.text||L.text?' role="img" aria-labelledby="'+M([B.id,L.id].join(" ").trim())+'"':"",W+=">",W+=B.text?'<title id="'+M(B.id)+'">'+M(B.text)+"</title>":"",W+=L.text?'<description id="'+M(L.id)+'">'+M(L.text)+"</description>":"",W+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',W+='<path d="',K=0;K<m.getModuleCount();K+=1)for(V=K*R+A,F=0;F<m.getModuleCount();F+=1)m.isDark(K,F)&&($=F*R+A,W+="M"+$+","+V+J);return W+='" stroke="transparent" fill="black"/>',W+="</svg>",W},m.createDataURL=function(R,A){R=R||2,A=typeof A>"u"?R*4:A;const L=m.getModuleCount()*R+A*2,B=A,I=L-A;return _1(L,L,function(U,F){if(B<=U&&U<I&&B<=F&&F<I){const $=Math.floor((U-B)/R),K=Math.floor((F-B)/R);return m.isDark(K,$)?0:1}else return 1})},m.createImgTag=function(R,A,L){R=R||2,A=typeof A>"u"?R*4:A;const B=m.getModuleCount()*R+A*2;let I="";return I+="<img",I+=' src="',I+=m.createDataURL(R,A),I+='"',I+=' width="',I+=B,I+='"',I+=' height="',I+=B,I+='"',L&&(I+=' alt="',I+=M(L),I+='"'),I+="/>",I};const M=function(R){let A="";for(let L=0;L<R.length;L+=1){const B=R.charAt(L);switch(B){case"<":A+="&lt;";break;case">":A+="&gt;";break;case"&":A+="&amp;";break;case'"':A+="&quot;";break;default:A+=B;break}}return A},D=function(R){R=typeof R>"u"?2:R;const L=m.getModuleCount()*1+R*2,B=R,I=L-R;let U,F,$,K,V;const W={"██":"█","█ ":"▀"," █":"▄"," ":" "},J={"██":"▀","█ ":"▀"," █":" "," ":" "};let z="";for(U=0;U<L;U+=2){for($=Math.floor((U-B)/1),K=Math.floor((U+1-B)/1),F=0;F<L;F+=1)V="█",B<=F&&F<I&&B<=U&&U<I&&m.isDark($,Math.floor((F-B)/1))&&(V=" "),B<=F&&F<I&&B<=U+1&&U+1<I&&m.isDark(K,Math.floor((F-B)/1))?V+=" ":V+="█",z+=R<1&&U+1>=I?J[V]:W[V];z+=`
50
+ `}return L%2&&R>0?z.substring(0,z.length-L-1)+Array(L+1).join("▀"):z.substring(0,z.length-1)};return m.createASCII=function(R,A){if(R=R||1,R<2)return D(A);R-=1,A=typeof A>"u"?R*2:A;const L=m.getModuleCount()*R+A*2,B=A,I=L-A;let U,F,$,K;const V=Array(R+1).join("██"),W=Array(R+1).join(" ");let J="",z="";for(U=0;U<L;U+=1){for($=Math.floor((U-B)/R),z="",F=0;F<L;F+=1)K=1,B<=F&&F<I&&B<=U&&U<I&&m.isDark($,Math.floor((F-B)/R))&&(K=0),z+=K?V:W;for($=0;$<R;$+=1)J+=z+`
51
+ `}return J.substring(0,J.length-1)},m.renderTo2dContext=function(R,A){A=A||2;const L=m.getModuleCount();for(let B=0;B<L;B++)for(let I=0;I<L;I++)R.fillStyle=m.isDark(B,I)?"black":"white",R.fillRect(I*A,B*A,A,A)},m};_s.stringToBytes=function(n){const r=[];for(let s=0;s<n.length;s+=1){const o=n.charCodeAt(s);r.push(o&255)}return r};_s.createStringToBytes=function(n,r){const s=(function(){const d=m1(n),v=function(){const c=d.read();if(c==-1)throw"eof";return c};let f=0;const a={};for(;;){const c=d.read();if(c==-1)break;const h=v(),m=v(),u=v(),b=String.fromCharCode(c<<8|h),C=m<<8|u;a[b]=C,f+=1}if(f!=r)throw f+" != "+r;return a})(),o=63;return function(d){const v=[];for(let f=0;f<d.length;f+=1){const a=d.charCodeAt(f);if(a<128)v.push(a);else{const c=s[d.charAt(f)];typeof c=="number"?(c&255)==c?v.push(c):(v.push(c>>>8),v.push(c&255)):v.push(o)}}return v}};const Gt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},wl={L:1,M:0,Q:3,H:2},Wi={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Ki=(function(){const n=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],r=1335,s=7973,o=21522,d={},v=function(f){let a=0;for(;f!=0;)a+=1,f>>>=1;return a};return d.getBCHTypeInfo=function(f){let a=f<<10;for(;v(a)-v(r)>=0;)a^=r<<v(a)-v(r);return(f<<10|a)^o},d.getBCHTypeNumber=function(f){let a=f<<12;for(;v(a)-v(s)>=0;)a^=s<<v(a)-v(s);return f<<12|a},d.getPatternPosition=function(f){return n[f-1]},d.getMaskFunction=function(f){switch(f){case Wi.PATTERN000:return function(a,c){return(a+c)%2==0};case Wi.PATTERN001:return function(a,c){return a%2==0};case Wi.PATTERN010:return function(a,c){return c%3==0};case Wi.PATTERN011:return function(a,c){return(a+c)%3==0};case Wi.PATTERN100:return function(a,c){return(Math.floor(a/2)+Math.floor(c/3))%2==0};case Wi.PATTERN101:return function(a,c){return a*c%2+a*c%3==0};case Wi.PATTERN110:return function(a,c){return(a*c%2+a*c%3)%2==0};case Wi.PATTERN111:return function(a,c){return(a*c%3+(a+c)%2)%2==0};default:throw"bad maskPattern:"+f}},d.getErrorCorrectPolynomial=function(f){let a=Al([1],0);for(let c=0;c<f;c+=1)a=a.multiply(Al([1,Xi.gexp(c)],0));return a},d.getLengthInBits=function(f,a){if(1<=a&&a<10)switch(f){case Gt.MODE_NUMBER:return 10;case Gt.MODE_ALPHA_NUM:return 9;case Gt.MODE_8BIT_BYTE:return 8;case Gt.MODE_KANJI:return 8;default:throw"mode:"+f}else if(a<27)switch(f){case Gt.MODE_NUMBER:return 12;case Gt.MODE_ALPHA_NUM:return 11;case Gt.MODE_8BIT_BYTE:return 16;case Gt.MODE_KANJI:return 10;default:throw"mode:"+f}else if(a<41)switch(f){case Gt.MODE_NUMBER:return 14;case Gt.MODE_ALPHA_NUM:return 13;case Gt.MODE_8BIT_BYTE:return 16;case Gt.MODE_KANJI:return 12;default:throw"mode:"+f}else throw"type:"+a},d.getLostPoint=function(f){const a=f.getModuleCount();let c=0;for(let u=0;u<a;u+=1)for(let b=0;b<a;b+=1){let C=0;const E=f.isDark(u,b);for(let x=-1;x<=1;x+=1)if(!(u+x<0||a<=u+x))for(let y=-1;y<=1;y+=1)b+y<0||a<=b+y||x==0&&y==0||E==f.isDark(u+x,b+y)&&(C+=1);C>5&&(c+=3+C-5)}for(let u=0;u<a-1;u+=1)for(let b=0;b<a-1;b+=1){let C=0;f.isDark(u,b)&&(C+=1),f.isDark(u+1,b)&&(C+=1),f.isDark(u,b+1)&&(C+=1),f.isDark(u+1,b+1)&&(C+=1),(C==0||C==4)&&(c+=3)}for(let u=0;u<a;u+=1)for(let b=0;b<a-6;b+=1)f.isDark(u,b)&&!f.isDark(u,b+1)&&f.isDark(u,b+2)&&f.isDark(u,b+3)&&f.isDark(u,b+4)&&!f.isDark(u,b+5)&&f.isDark(u,b+6)&&(c+=40);for(let u=0;u<a;u+=1)for(let b=0;b<a-6;b+=1)f.isDark(b,u)&&!f.isDark(b+1,u)&&f.isDark(b+2,u)&&f.isDark(b+3,u)&&f.isDark(b+4,u)&&!f.isDark(b+5,u)&&f.isDark(b+6,u)&&(c+=40);let h=0;for(let u=0;u<a;u+=1)for(let b=0;b<a;b+=1)f.isDark(b,u)&&(h+=1);const m=Math.abs(100*h/a/a-50)/5;return c+=m*10,c},d})(),Xi=(function(){const n=new Array(256),r=new Array(256);for(let o=0;o<8;o+=1)n[o]=1<<o;for(let o=8;o<256;o+=1)n[o]=n[o-4]^n[o-5]^n[o-6]^n[o-8];for(let o=0;o<255;o+=1)r[n[o]]=o;const s={};return s.glog=function(o){if(o<1)throw"glog("+o+")";return r[o]},s.gexp=function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return n[o]},s})(),Al=function(n,r){if(typeof n.length>"u")throw n.length+"/"+r;const s=(function(){let d=0;for(;d<n.length&&n[d]==0;)d+=1;const v=new Array(n.length-d+r);for(let f=0;f<n.length-d;f+=1)v[f]=n[f+d];return v})(),o={};return o.getAt=function(d){return s[d]},o.getLength=function(){return s.length},o.multiply=function(d){const v=new Array(o.getLength()+d.getLength()-1);for(let f=0;f<o.getLength();f+=1)for(let a=0;a<d.getLength();a+=1)v[f+a]^=Xi.gexp(Xi.glog(o.getAt(f))+Xi.glog(d.getAt(a)));return Al(v,0)},o.mod=function(d){if(o.getLength()-d.getLength()<0)return o;const v=Xi.glog(o.getAt(0))-Xi.glog(d.getAt(0)),f=new Array(o.getLength());for(let a=0;a<o.getLength();a+=1)f[a]=o.getAt(a);for(let a=0;a<d.getLength();a+=1)f[a]^=Xi.gexp(Xi.glog(d.getAt(a))+v);return Al(f,0).mod(d)},o},vm=(function(){const n=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(d,v){const f={};return f.totalCount=d,f.dataCount=v,f},s={},o=function(d,v){switch(v){case wl.L:return n[(d-1)*4+0];case wl.M:return n[(d-1)*4+1];case wl.Q:return n[(d-1)*4+2];case wl.H:return n[(d-1)*4+3];default:return}};return s.getRSBlocks=function(d,v){const f=o(d,v);if(typeof f>"u")throw"bad rs block @ typeNumber:"+d+"/errorCorrectionLevel:"+v;const a=f.length/3,c=[];for(let h=0;h<a;h+=1){const m=f[h*3+0],u=f[h*3+1],b=f[h*3+2];for(let C=0;C<m;C+=1)c.push(r(u,b))}return c},s})(),ym=function(){const n=[];let r=0;const s={};return s.getBuffer=function(){return n},s.getAt=function(o){const d=Math.floor(o/8);return(n[d]>>>7-o%8&1)==1},s.put=function(o,d){for(let v=0;v<d;v+=1)s.putBit((o>>>d-v-1&1)==1)},s.getLengthInBits=function(){return r},s.putBit=function(o){const d=Math.floor(r/8);n.length<=d&&n.push(0),o&&(n[d]|=128>>>r%8),r+=1},s},u1=function(n){const r=Gt.MODE_NUMBER,s=n,o={};o.getMode=function(){return r},o.getLength=function(f){return s.length},o.write=function(f){const a=s;let c=0;for(;c+2<a.length;)f.put(d(a.substring(c,c+3)),10),c+=3;c<a.length&&(a.length-c==1?f.put(d(a.substring(c,c+1)),4):a.length-c==2&&f.put(d(a.substring(c,c+2)),7))};const d=function(f){let a=0;for(let c=0;c<f.length;c+=1)a=a*10+v(f.charAt(c));return a},v=function(f){if("0"<=f&&f<="9")return f.charCodeAt(0)-48;throw"illegal char :"+f};return o},h1=function(n){const r=Gt.MODE_ALPHA_NUM,s=n,o={};o.getMode=function(){return r},o.getLength=function(v){return s.length},o.write=function(v){const f=s;let a=0;for(;a+1<f.length;)v.put(d(f.charAt(a))*45+d(f.charAt(a+1)),11),a+=2;a<f.length&&v.put(d(f.charAt(a)),6)};const d=function(v){if("0"<=v&&v<="9")return v.charCodeAt(0)-48;if("A"<=v&&v<="Z")return v.charCodeAt(0)-65+10;switch(v){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+v}};return o},f1=function(n){const r=Gt.MODE_8BIT_BYTE,s=_s.stringToBytes(n),o={};return o.getMode=function(){return r},o.getLength=function(d){return s.length},o.write=function(d){for(let v=0;v<s.length;v+=1)d.put(s[v],8)},o},d1=function(n){const r=Gt.MODE_KANJI,s=_s.stringToBytes;(function(v,f){const a=s(v);if(a.length!=2||(a[0]<<8|a[1])!=f)throw"sjis not supported."})("友",38726);const o=s(n),d={};return d.getMode=function(){return r},d.getLength=function(v){return~~(o.length/2)},d.write=function(v){const f=o;let a=0;for(;a+1<f.length;){let c=(255&f[a])<<8|255&f[a+1];if(33088<=c&&c<=40956)c-=33088;else if(57408<=c&&c<=60351)c-=49472;else throw"illegal char at "+(a+1)+"/"+c;c=(c>>>8&255)*192+(c&255),v.put(c,13),a+=2}if(a<f.length)throw"illegal char at "+(a+1)},d},Rg=function(){const n=[],r={};return r.writeByte=function(s){n.push(s&255)},r.writeShort=function(s){r.writeByte(s),r.writeByte(s>>>8)},r.writeBytes=function(s,o,d){o=o||0,d=d||s.length;for(let v=0;v<d;v+=1)r.writeByte(s[v+o])},r.writeString=function(s){for(let o=0;o<s.length;o+=1)r.writeByte(s.charCodeAt(o))},r.toByteArray=function(){return n},r.toString=function(){let s="";s+="[";for(let o=0;o<n.length;o+=1)o>0&&(s+=","),s+=n[o];return s+="]",s},r},p1=function(){let n=0,r=0,s=0,o="";const d={},v=function(a){o+=String.fromCharCode(f(a&63))},f=function(a){if(a<0)throw"n:"+a;if(a<26)return 65+a;if(a<52)return 97+(a-26);if(a<62)return 48+(a-52);if(a==62)return 43;if(a==63)return 47;throw"n:"+a};return d.writeByte=function(a){for(n=n<<8|a&255,r+=8,s+=1;r>=6;)v(n>>>r-6),r-=6},d.flush=function(){if(r>0&&(v(n<<6-r),n=0,r=0),s%3!=0){const a=3-s%3;for(let c=0;c<a;c+=1)o+="="}},d.toString=function(){return o},d},m1=function(n){const r=n;let s=0,o=0,d=0;const v={};v.read=function(){for(;d<8;){if(s>=r.length){if(d==0)return-1;throw"unexpected end of file./"+d}const c=r.charAt(s);if(s+=1,c=="=")return d=0,-1;if(c.match(/^\s$/))continue;o=o<<6|f(c.charCodeAt(0)),d+=6}const a=o>>>d-8&255;return d-=8,a};const f=function(a){if(65<=a&&a<=90)return a-65;if(97<=a&&a<=122)return a-97+26;if(48<=a&&a<=57)return a-48+52;if(a==43)return 62;if(a==47)return 63;throw"c:"+a};return v},g1=function(n,r){const s=n,o=r,d=new Array(n*r),v={};v.setPixel=function(h,m,u){d[m*s+h]=u},v.write=function(h){h.writeString("GIF87a"),h.writeShort(s),h.writeShort(o),h.writeByte(128),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(255),h.writeByte(255),h.writeByte(255),h.writeString(","),h.writeShort(0),h.writeShort(0),h.writeShort(s),h.writeShort(o),h.writeByte(0);const m=2,u=a(m);h.writeByte(m);let b=0;for(;u.length-b>255;)h.writeByte(255),h.writeBytes(u,b,255),b+=255;h.writeByte(u.length-b),h.writeBytes(u,b,u.length-b),h.writeByte(0),h.writeString(";")};const f=function(h){const m=h;let u=0,b=0;const C={};return C.write=function(E,x){if(E>>>x)throw"length over";for(;u+x>=8;)m.writeByte(255&(E<<u|b)),x-=8-u,E>>>=8-u,b=0,u=0;b=E<<u|b,u=u+x},C.flush=function(){u>0&&m.writeByte(b)},C},a=function(h){const m=1<<h,u=(1<<h)+1;let b=h+1;const C=c();for(let g=0;g<m;g+=1)C.add(String.fromCharCode(g));C.add(String.fromCharCode(m)),C.add(String.fromCharCode(u));const E=Rg(),x=f(E);x.write(m,b);let y=0,_=String.fromCharCode(d[y]);for(y+=1;y<d.length;){const g=String.fromCharCode(d[y]);y+=1,C.contains(_+g)?_=_+g:(x.write(C.indexOf(_),b),C.size()<4095&&(C.size()==1<<b&&(b+=1),C.add(_+g)),_=g)}return x.write(C.indexOf(_),b),x.write(u,b),x.flush(),E.toByteArray()},c=function(){const h={};let m=0;const u={};return u.add=function(b){if(u.contains(b))throw"dup key:"+b;h[b]=m,m+=1},u.size=function(){return m},u.indexOf=function(b){return h[b]},u.contains=function(b){return typeof h[b]<"u"},u};return v},_1=function(n,r,s){const o=g1(n,r);for(let a=0;a<r;a+=1)for(let c=0;c<n;c+=1)o.setPixel(c,a,s(c,a));const d=Rg();o.write(d);const v=p1(),f=d.toByteArray();for(let a=0;a<f.length;a+=1)v.writeByte(f[a]);return v.flush(),"data:image/gif;base64,"+v};_s.stringToBytes;const ms=[{name:"project-manager",label:"Project Manager",commandAgent:"project-manager",dispatchable:!1},{name:"architect",label:"Architect",commandAgent:"architect",dispatchable:!0},{name:"coder",label:"Coder",commandAgent:"coder",dispatchable:!0},{name:"reviewer",label:"Reviewer",commandAgent:"reviewer",dispatchable:!0}],Dg={name:"gate-reviewer",label:"Gate Reviewer",commandAgent:"gate-reviewer",dispatchable:!1},sh=[...ms,Dg],v1={name:"translator",label:"Translator",commandAgent:"translator",dispatchable:!1},y1={name:"harness-engineer",label:"Harness Engineer",commandAgent:"harness-engineer",dispatchable:!1},Mg=[v1,y1],lh=[...sh,...Mg],S1=ms.map(n=>n.name),Lg=sh.map(n=>n.name);Mg.map(n=>n.name);lh.map(n=>n.name);lh.filter(n=>n.dispatchable).map(n=>n.name);function b1(n){return Lg.includes(n)}const C1="zh-CN",w1="pm-final-only",Og=[{value:"zh-CN",label:"Chinese"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"}],x1=[{value:"pm-final-only",label:"PM final reply"},{value:"final-only",label:"Each role final reply"},{value:"all",label:"All replies"}];function E1(){const n={};for(const r of Lg)n[r]={permissionMode:"default",model:"default",effort:"default"};return{version:1,roles:n,autoOrchestration:!0}}function k1({sidebar:n,children:r}){const[s,o]=re.useState(!1);return T.jsxs("div",{className:s?"app-shell is-sidebar-collapsed":"app-shell",children:[T.jsxs("aside",{className:"app-sidebar",children:[T.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":s?"Expand sidebar":"Collapse sidebar",title:s?"Expand sidebar":"Collapse sidebar",onClick:()=>o(d=>!d)}),T.jsx("div",{className:"sidebar-content",children:n})]}),T.jsx("main",{className:"app-main",children:r})]})}const ye={getAppPreferences(){return we("/api/settings/preferences")},updateAppPreferences(n){return we("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getRuntimeDiagnostics(){return we("/api/diagnostics/runtime")},getCurrentProject(){return we("/api/projects/current")},pullCurrentProject(){return we("/api/projects/current/pull",{method:"POST"})},getRecentRepositoryPaths(){return we("/api/projects/recent")},connectProject(n){return we("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return we("/api/tasks")},createTask(n){return we("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,r={}){return we(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(r)})},getHarnessStatus(n){const r=new URLSearchParams({taskSlug:n});return we(`/api/projects/harness?${r.toString()}`)},applyHarness(n){return we("/api/projects/harness/apply",{method:"POST",body:JSON.stringify(n)})},getHarnessFileContent(n,r){const s=new URLSearchParams({path:r,taskSlug:n});return we(`/api/projects/harness/file?${s.toString()}`)},updateHarnessFileContent(n,r,s){const o=new URLSearchParams({path:r,taskSlug:n});return we(`/api/projects/harness/file?${o.toString()}`,{method:"PUT",body:JSON.stringify(s)})},getRepositoryDiff(n,r){const s=new URLSearchParams({taskSlug:n});return r&&s.set("commit",r),we(`/api/projects/harness/repository-diff?${s.toString()}`)},getHarnessBootstrapStatus(n){const r=new URLSearchParams({taskSlug:n});return we(`/api/projects/harness/bootstrap?${r.toString()}`)},startHarnessBootstrap(n={}){return we("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},restartHarnessBootstrap(n={}){return we("/api/projects/harness/bootstrap/restart",{method:"POST",body:JSON.stringify(n)})},stopHarnessBootstrap(){return we("/api/projects/harness/bootstrap/stop",{method:"POST"})},runHarnessBootstrap(n){return we("/api/projects/harness/bootstrap/run",{method:"POST",body:JSON.stringify(n)})},getHarnessEngineerSession(){return we("/api/projects/harness/engineer/session")},ensureHarnessEngineerSession(n={}){return we("/api/projects/harness/engineer/session/ensure",{method:"POST",body:JSON.stringify(n)})},startHarnessEngineerSession(n={}){return we("/api/projects/harness/engineer/session/start",{method:"POST",body:JSON.stringify(n)})},resumeHarnessEngineerSession(n={}){return we("/api/projects/harness/engineer/session/resume",{method:"POST",body:JSON.stringify(n)})},restartHarnessEngineerSession(n={}){return we("/api/projects/harness/engineer/session/restart",{method:"POST",body:JSON.stringify(n)})},stopHarnessEngineerSession(){return we("/api/projects/harness/engineer/session/stop",{method:"POST"})},notifyHarnessEngineerHarnessUpdated(){return we("/api/projects/harness/engineer/session/notify-harness",{method:"POST"})},getTaskStatus(n){return we(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return we(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,r,s={}){return we(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/start`,{method:"POST",body:JSON.stringify(s)})},stopRoleSession(n,r){return we(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/stop`,{method:"POST"})},restartRoleSession(n,r,s={}){return we(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/restart`,{method:"POST",body:JSON.stringify(s)})},resumeRoleSession(n,r,s={}){return we(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/resume`,{method:"POST",body:JSON.stringify(s)})},notifyRoleHarnessUpdated(n,r){return we(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/notify-harness`,{method:"POST"})},dispatchRoleCommand(n,r){return we(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/dispatch`,{method:"POST"})},listMessages(n){return we(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return we(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return we(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return we(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,r){return we(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(r)})},getSessionRoundState(n){return we(`/api/tasks/${encodeURIComponent(n)}/round`)},getGateReviewState(n){return we(`/api/tasks/${encodeURIComponent(n)}/gate-review`)},updateGateReviewSettings(n,r){return we(`/api/tasks/${encodeURIComponent(n)}/gate-review/settings`,{method:"PUT",body:JSON.stringify(r)})},requestGateReviewGate(n,r){return we(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/request`,{method:"POST"})},retryGateReviewGate(n,r){return we(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/retry`,{method:"POST"})},skipGateReviewGate(n,r,s){return we(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/skip`,{method:"POST",body:JSON.stringify(s)})},overrideGateReviewGate(n,r,s){return we(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/override`,{method:"POST",body:JSON.stringify(s)})},getGateReviewReport(n,r){return we(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/report`)},startTranslationSession(n,r){return we(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/start`,{method:"POST"})},pollTranslationSession(n,r,s){const o=new URLSearchParams({after:String(r)});return s!==void 0&&o.set("limit",String(s)),we(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,r,s){return we(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/input`,{method:"POST",body:JSON.stringify(s)})},sendTranslatedInput(n,r,s){return we(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/send`,{method:"POST",body:JSON.stringify(s)})},clearTranslationSession(n){return we(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},stopTranslationSession(n){return we(`/api/translation/sessions/${encodeURIComponent(n)}/stop`,{method:"POST"})},notifyTranslatorHarnessUpdated(){return we("/api/projects/translation/session/notify-harness",{method:"POST"})},retryTranslation(n,r){return we(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(r)}`,{method:"POST"})},ignoreTranslationFailures(n){return we(`/api/translation/sessions/${encodeURIComponent(n)}/failures/ignore`,{method:"POST"})},retryTranslationFailures(n){return we(`/api/translation/sessions/${encodeURIComponent(n)}/failures/retry`,{method:"POST"})},getTranslationState(){return we("/api/translation/state")},getTranslatorSession(){return we("/api/translation/session")},ensureTranslatorSession(n={}){return we("/api/translation/session/ensure",{method:"POST",body:JSON.stringify(n)})},startTranslatorSession(n={}){return we("/api/translation/session/start",{method:"POST",body:JSON.stringify(n)})},resumeTranslatorSession(n={}){return we("/api/translation/session/resume",{method:"POST",body:JSON.stringify(n)})},restartTranslatorSession(n={}){return we("/api/translation/session/restart",{method:"POST",body:JSON.stringify(n)})},stopTranslatorSession(){return we("/api/translation/session/stop",{method:"POST"})},browseTranslationSourceFiles(n={}){const r=new URLSearchParams;n.path&&r.set("path",n.path),n.query&&r.set("query",n.query),n.limit!==void 0&&r.set("limit",String(n.limit));const s=r.toString()?`?${r.toString()}`:"";return we(`/api/translation/source-files${s}`)},createFileTranslation(n){return we("/api/translation/files",{method:"POST",body:JSON.stringify(n)})},readFileTranslation(n){return we(`/api/translation/files/${encodeURIComponent(n)}`)},createTranslationBootstrap(n){return we("/api/translation/bootstrap",{method:"POST",body:JSON.stringify(n)})},createTranslationMemoryUpdate(n){return we("/api/translation/memory-update",{method:"POST",body:JSON.stringify(n)})},promoteTranslation(n,r){return we(`/api/translation/files/${encodeURIComponent(n)}/promote`,{method:"POST",body:JSON.stringify({targetPath:r})})},getGatewayStatus(){return we("/api/gateway/status")},updateGatewaySettings(n){return we("/api/gateway/settings",{method:"PUT",body:JSON.stringify(n)})},startGatewayQrLogin(){return we("/api/gateway/qr/start",{method:"POST"})},checkGatewayQrLogin(n={}){return we("/api/gateway/qr/check",{method:"POST",body:JSON.stringify(n)})},resetGatewayBinding(){return we("/api/gateway/binding/reset",{method:"POST"})}};async function we(n,r={}){var d,v,f;const s=new Headers(r.headers);r.body!==void 0&&r.body!==null&&!s.has("content-type")&&s.set("content-type","application/json");const o=await fetch(n,{...r,headers:s});if(!o.ok){const a=await o.json().catch(()=>null),c=(d=a==null?void 0:a.error)!=null&&d.hint?`${a.error.message} ${a.error.hint}`:((v=a==null?void 0:a.error)==null?void 0:v.message)??`Request failed: ${o.status}`,h=(f=a==null?void 0:a.error)==null?void 0:f.runtime,m=h?` [backend ${h.version??"unknown"} pid=${h.pid??"unknown"} cwd=${h.cwd??"unknown"}]`:"";throw new Error(`${c}${m}`)}return o.json()}var Eu={exports:{}},Sm;function A1(){return Sm||(Sm=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={};return(()=>{var o=s;Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0,o.FitAddon=class{activate(d){this._terminal=d}dispose(){}fit(){const d=this.proposeDimensions();if(!d||!this._terminal||isNaN(d.cols)||isNaN(d.rows))return;const v=this._terminal._core;this._terminal.rows===d.rows&&this._terminal.cols===d.cols||(v._renderService.clear(),this._terminal.resize(d.cols,d.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const d=this._terminal._core,v=d._renderService.dimensions;if(v.css.cell.width===0||v.css.cell.height===0)return;const f=this._terminal.options.scrollback===0?0:d.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(a.getPropertyValue("height")),h=Math.max(0,parseInt(a.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),u=c-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),b=h-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-f;return{cols:Math.max(2,Math.floor(b/v.css.cell.width)),rows:Math.max(1,Math.floor(u/v.css.cell.height))}}}})(),s})()))})(Eu)),Eu.exports}var T1=A1(),ku={exports:{}},bm;function R1(){return bm||(bm=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={6:(f,a)=>{function c(m){try{const u=new URL(m),b=u.password&&u.username?`${u.protocol}//${u.username}:${u.password}@${u.host}`:u.username?`${u.protocol}//${u.username}@${u.host}`:`${u.protocol}//${u.host}`;return m.toLocaleLowerCase().startsWith(b.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(m,u,b,C={}){this._terminal=m,this._regex=u,this._handler=b,this._options=C}provideLinks(m,u){const b=h.computeLink(m,this._regex,this._terminal,this._handler);u(this._addCallbacks(b))}_addCallbacks(m){return m.map((u=>(u.leave=this._options.leave,u.hover=(b,C)=>{if(this._options.hover){const{range:E}=u;this._options.hover(b,C,E)}},u)))}};class h{static computeLink(u,b,C,E){const x=new RegExp(b.source,(b.flags||"")+"g"),[y,_]=h._getWindowedLineStrings(u-1,C),g=y.join("");let S;const k=[];for(;S=x.exec(g);){const M=S[0];if(!c(M))continue;const[D,R]=h._mapStrIdx(C,_,0,S.index),[A,L]=h._mapStrIdx(C,D,R,M.length);if(D===-1||R===-1||A===-1||L===-1)continue;const B={start:{x:R+1,y:D+1},end:{x:L,y:A+1}};k.push({range:B,text:M,activate:E})}return k}static _getWindowedLineStrings(u,b){let C,E=u,x=u,y=0,_="";const g=[];if(C=b.buffer.active.getLine(u)){const S=C.translateToString(!0);if(C.isWrapped&&S[0]!==" "){for(y=0;(C=b.buffer.active.getLine(--E))&&y<2048&&(_=C.translateToString(!0),y+=_.length,g.push(_),C.isWrapped&&_.indexOf(" ")===-1););g.reverse()}for(g.push(S),y=0;(C=b.buffer.active.getLine(++x))&&C.isWrapped&&y<2048&&(_=C.translateToString(!0),y+=_.length,g.push(_),_.indexOf(" ")===-1););}return[g,E]}static _mapStrIdx(u,b,C,E){const x=u.buffer.active,y=x.getNullCell();let _=C;for(;E;){const g=x.getLine(b);if(!g)return[-1,-1];for(let S=_;S<g.length;++S){g.getCell(S,y);const k=y.getChars();if(y.getWidth()&&(E-=k.length||1,S===g.length-1&&k==="")){const M=x.getLine(b+1);M&&M.isWrapped&&(M.getCell(0,y),y.getWidth()===2&&(E+=1))}if(E<0)return[b,S]}b++,_=0}return[b,_]}}a.LinkComputer=h}},o={};function d(f){var a=o[f];if(a!==void 0)return a.exports;var c=o[f]={exports:{}};return s[f](c,c.exports,d),c.exports}var v={};return(()=>{var f=v;Object.defineProperty(f,"__esModule",{value:!0}),f.WebLinksAddon=void 0;const a=d(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(m,u){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}f.WebLinksAddon=class{constructor(m=h,u={}){this._handler=m,this._options=u}activate(m){this._terminal=m;const u=this._options,b=u.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,b,this._handler,u))}dispose(){var m;(m=this._linkProvider)==null||m.dispose()}}})(),v})()))})(ku)),ku.exports}var D1=R1(),Au={exports:{}},Cm;function M1(){return Cm||(Cm=1,(function(n,r){(function(s,o){n.exports=o()})(globalThis,(()=>(()=>{var s={4567:function(f,a,c){var h=this&&this.__decorate||function(g,S,k,M){var D,R=arguments.length,A=R<3?S:M===null?M=Object.getOwnPropertyDescriptor(S,k):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(g,S,k,M);else for(var L=g.length-1;L>=0;L--)(D=g[L])&&(A=(R<3?D(A):R>3?D(S,k,A):D(S,k))||A);return R>3&&A&&Object.defineProperty(S,k,A),A},m=this&&this.__param||function(g,S){return function(k,M){S(k,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const u=c(9042),b=c(9924),C=c(844),E=c(4725),x=c(2585),y=c(3656);let _=a.AccessibilityManager=class extends C.Disposable{constructor(g,S,k,M){super(),this._terminal=g,this._coreBrowserService=k,this._renderService=M,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let D=0;D<this._terminal.rows;D++)this._rowElements[D]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[D]);if(this._topBoundaryFocusListener=D=>this._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new b.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((D=>this._handleResize(D.rows)))),this.register(this._terminal.onRender((D=>this._refreshRows(D.start,D.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((D=>this._handleChar(D)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
52
+ `)))),this.register(this._terminal.onA11yTab((D=>this._handleTab(D)))),this.register(this._terminal.onKey((D=>this._handleKey(D.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,y.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,C.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(g){for(let S=0;S<g;S++)this._handleChar(" ")}_handleChar(g){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==g&&(this._charsToAnnounce+=g):this._charsToAnnounce+=g,g===`
53
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(g){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(g)||this._charsToConsume.push(g)}_refreshRows(g,S){this._liveRegionDebouncer.refresh(g,S,this._terminal.rows)}_renderRows(g,S){const k=this._terminal.buffer,M=k.lines.length.toString();for(let D=g;D<=S;D++){const R=k.lines.get(k.ydisp+D),A=[],L=(R==null?void 0:R.translateToString(!0,void 0,void 0,A))||"",B=(k.ydisp+D+1).toString(),I=this._rowElements[D];I&&(L.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=L,this._rowColumns.set(I,A)),I.setAttribute("aria-posinset",B),I.setAttribute("aria-setsize",M))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(g,S){const k=g.target,M=this._rowElements[S===0?1:this._rowElements.length-2];if(k.getAttribute("aria-posinset")===(S===0?"1":`${this._terminal.buffer.lines.length}`)||g.relatedTarget!==M)return;let D,R;if(S===0?(D=k,R=this._rowElements.pop(),this._rowContainer.removeChild(R)):(D=this._rowElements.shift(),R=k,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),R.removeEventListener("focus",this._bottomBoundaryFocusListener),S===0){const A=this._createAccessibilityTreeNode();this._rowElements.unshift(A),this._rowContainer.insertAdjacentElement("afterbegin",A)}else{const A=this._createAccessibilityTreeNode();this._rowElements.push(A),this._rowContainer.appendChild(A)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(S===0?-1:1),this._rowElements[S===0?1:this._rowElements.length-2].focus(),g.preventDefault(),g.stopImmediatePropagation()}_handleSelectionChange(){var L;if(this._rowElements.length===0)return;const g=document.getSelection();if(!g)return;if(g.isCollapsed)return void(this._rowContainer.contains(g.anchorNode)&&this._terminal.clearSelection());if(!g.anchorNode||!g.focusNode)return void console.error("anchorNode and/or focusNode are null");let S={node:g.anchorNode,offset:g.anchorOffset},k={node:g.focusNode,offset:g.focusOffset};if((S.node.compareDocumentPosition(k.node)&Node.DOCUMENT_POSITION_PRECEDING||S.node===k.node&&S.offset>k.offset)&&([S,k]=[k,S]),S.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(S={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(S.node))return;const M=this._rowElements.slice(-1)[0];if(k.node.compareDocumentPosition(M)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(k={node:M,offset:((L=M.textContent)==null?void 0:L.length)??0}),!this._rowContainer.contains(k.node))return;const D=({node:B,offset:I})=>{const U=B instanceof Text?B.parentNode:B;let F=parseInt(U==null?void 0:U.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const $=this._rowColumns.get(U);if(!$)return console.warn("columns is null. Race condition?"),null;let K=I<$.length?$[I]:$.slice(-1)[0]+1;return K>=this._terminal.cols&&(++F,K=0),{row:F,column:K}},R=D(S),A=D(k);if(R&&A){if(R.row>A.row||R.row===A.row&&R.column>=A.column)throw new Error("invalid range");this._terminal.select(R.column,R.row,(A.row-R.row)*this._terminal.cols-R.column+A.column)}}_handleResize(g){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let S=this._rowContainer.children.length;S<this._terminal.rows;S++)this._rowElements[S]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[S]);for(;this._rowElements.length>g;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const g=this._coreBrowserService.mainDocument.createElement("div");return g.setAttribute("role","listitem"),g.tabIndex=-1,this._refreshRowDimensions(g),g}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let g=0;g<this._terminal.rows;g++)this._refreshRowDimensions(this._rowElements[g])}}_refreshRowDimensions(g){g.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=_=h([m(1,x.IInstantiationService),m(2,E.ICoreBrowserService),m(3,E.IRenderService)],_)},3614:(f,a)=>{function c(b){return b.replace(/\r?\n/g,"\r")}function h(b,C){return C?"\x1B[200~"+b+"\x1B[201~":b}function m(b,C,E,x){b=h(b=c(b),E.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(b,!0),C.value=""}function u(b,C,E){const x=E.getBoundingClientRect(),y=b.clientX-x.left-10,_=b.clientY-x.top-10;C.style.width="20px",C.style.height="20px",C.style.left=`${y}px`,C.style.top=`${_}px`,C.style.zIndex="1000",C.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=c,a.bracketTextForPaste=h,a.copyHandler=function(b,C){b.clipboardData&&b.clipboardData.setData("text/plain",C.selectionText),b.preventDefault()},a.handlePasteEvent=function(b,C,E,x){b.stopPropagation(),b.clipboardData&&m(b.clipboardData.getData("text/plain"),C,E,x)},a.paste=m,a.moveTextAreaUnderMouseCursor=u,a.rightClickHandler=function(b,C,E,x,y){u(b,C,E),y&&x.rightClickSelect(b),C.value=x.selectionText,C.select()}},7239:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const h=c(1505);a.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(m,u,b){this._css.set(m,u,b)}getCss(m,u){return this._css.get(m,u)}setColor(m,u,b){this._color.set(m,u,b)}getColor(m,u){return this._color.get(m,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(c,h,m,u){c.addEventListener(h,m,u);let b=!1;return{dispose:()=>{b||(b=!0,c.removeEventListener(h,m,u))}}}},3551:function(f,a,c){var h=this&&this.__decorate||function(_,g,S,k){var M,D=arguments.length,R=D<3?g:k===null?k=Object.getOwnPropertyDescriptor(g,S):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,g,S,k);else for(var A=_.length-1;A>=0;A--)(M=_[A])&&(R=(D<3?M(R):D>3?M(g,S,R):M(g,S))||R);return D>3&&R&&Object.defineProperty(g,S,R),R},m=this&&this.__param||function(_,g){return function(S,k){g(S,k,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const u=c(3656),b=c(8460),C=c(844),E=c(2585),x=c(4725);let y=a.Linkifier=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(_,g,S,k,M){super(),this._element=_,this._mouseService=g,this._renderService=S,this._bufferService=k,this._linkProviderService=M,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new b.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new b.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,C.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,C.toDisposable)((()=>{var D;this._lastMouseEvent=void 0,(D=this._activeProviderReplies)==null||D.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(_){this._lastMouseEvent=_;const g=this._positionFromMouseEvent(_,this._element,this._mouseService);if(!g)return;this._isMouseOut=!1;const S=_.composedPath();for(let k=0;k<S.length;k++){const M=S[k];if(M.classList.contains("xterm"))break;if(M.classList.contains("xterm-hover"))return}this._lastBufferCell&&g.x===this._lastBufferCell.x&&g.y===this._lastBufferCell.y||(this._handleHover(g),this._lastBufferCell=g)}_handleHover(_){if(this._activeLine!==_.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(_,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,_)||(this._clearCurrentLink(),this._askForLink(_,!0))}_askForLink(_,g){var k,M;this._activeProviderReplies&&g||((k=this._activeProviderReplies)==null||k.forEach((D=>{D==null||D.forEach((R=>{R.link.dispose&&R.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=_.y);let S=!1;for(const[D,R]of this._linkProviderService.linkProviders.entries())g?(M=this._activeProviderReplies)!=null&&M.get(D)&&(S=this._checkLinkProviderResult(D,_,S)):R.provideLinks(_.y,(A=>{var B,I;if(this._isMouseOut)return;const L=A==null?void 0:A.map((U=>({link:U})));(B=this._activeProviderReplies)==null||B.set(D,L),S=this._checkLinkProviderResult(D,_,S),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(_.y,this._activeProviderReplies)}))}_removeIntersectingLinks(_,g){const S=new Set;for(let k=0;k<g.size;k++){const M=g.get(k);if(M)for(let D=0;D<M.length;D++){const R=M[D],A=R.link.range.start.y<_?0:R.link.range.start.x,L=R.link.range.end.y>_?this._bufferService.cols:R.link.range.end.x;for(let B=A;B<=L;B++){if(S.has(B)){M.splice(D--,1);break}S.add(B)}}}}_checkLinkProviderResult(_,g,S){var D;if(!this._activeProviderReplies)return S;const k=this._activeProviderReplies.get(_);let M=!1;for(let R=0;R<_;R++)this._activeProviderReplies.has(R)&&!this._activeProviderReplies.get(R)||(M=!0);if(!M&&k){const R=k.find((A=>this._linkAtPosition(A.link,g)));R&&(S=!0,this._handleNewLink(R))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!S)for(let R=0;R<this._activeProviderReplies.size;R++){const A=(D=this._activeProviderReplies.get(R))==null?void 0:D.find((L=>this._linkAtPosition(L.link,g)));if(A){S=!0,this._handleNewLink(A);break}}return S}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(_){if(!this._currentLink)return;const g=this._positionFromMouseEvent(_,this._element,this._mouseService);g&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,g)&&this._currentLink.link.activate(_,this._currentLink.link.text)}_clearCurrentLink(_,g){this._currentLink&&this._lastMouseEvent&&(!_||!g||this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=g)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))}_handleNewLink(_){if(!this._lastMouseEvent)return;const g=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);g&&this._linkAtPosition(_.link,g)&&(this._currentLink=_,this._currentLink.state={decorations:{underline:_.link.decorations===void 0||_.link.decorations.underline,pointerCursor:_.link.decorations===void 0||_.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,_.link,this._lastMouseEvent),_.link.decorations={},Object.defineProperties(_.link.decorations,{pointerCursor:{get:()=>{var S,k;return(k=(S=this._currentLink)==null?void 0:S.state)==null?void 0:k.decorations.pointerCursor},set:S=>{var k;(k=this._currentLink)!=null&&k.state&&this._currentLink.state.decorations.pointerCursor!==S&&(this._currentLink.state.decorations.pointerCursor=S,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",S))}},underline:{get:()=>{var S,k;return(k=(S=this._currentLink)==null?void 0:S.state)==null?void 0:k.decorations.underline},set:S=>{var k,M,D;(k=this._currentLink)!=null&&k.state&&((D=(M=this._currentLink)==null?void 0:M.state)==null?void 0:D.decorations.underline)!==S&&(this._currentLink.state.decorations.underline=S,this._currentLink.state.isHovered&&this._fireUnderlineEvent(_.link,S))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((S=>{if(!this._currentLink)return;const k=S.start===0?0:S.start+1+this._bufferService.buffer.ydisp,M=this._bufferService.buffer.ydisp+1+S.end;if(this._currentLink.link.range.start.y>=k&&this._currentLink.link.range.end.y<=M&&(this._clearCurrentLink(k,M),this._lastMouseEvent)){const D=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);D&&this._askForLink(D,!1)}}))))}_linkHover(_,g,S){var k;(k=this._currentLink)!=null&&k.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(g,!0),this._currentLink.state.decorations.pointerCursor&&_.classList.add("xterm-cursor-pointer")),g.hover&&g.hover(S,g.text)}_fireUnderlineEvent(_,g){const S=_.range,k=this._bufferService.buffer.ydisp,M=this._createLinkUnderlineEvent(S.start.x-1,S.start.y-k-1,S.end.x,S.end.y-k-1,void 0);(g?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(M)}_linkLeave(_,g,S){var k;(k=this._currentLink)!=null&&k.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(g,!1),this._currentLink.state.decorations.pointerCursor&&_.classList.remove("xterm-cursor-pointer")),g.leave&&g.leave(S,g.text)}_linkAtPosition(_,g){const S=_.range.start.y*this._bufferService.cols+_.range.start.x,k=_.range.end.y*this._bufferService.cols+_.range.end.x,M=g.y*this._bufferService.cols+g.x;return S<=M&&M<=k}_positionFromMouseEvent(_,g,S){const k=S.getCoords(_,g,this._bufferService.cols,this._bufferService.rows);if(k)return{x:k[0],y:k[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(_,g,S,k,M){return{x1:_,y1:g,x2:S,y2:k,cols:this._bufferService.cols,fg:M}}};a.Linkifier=y=h([m(1,x.IMouseService),m(2,x.IRenderService),m(3,E.IBufferService),m(4,x.ILinkProviderService)],y)},9042:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(f,a,c){var h=this&&this.__decorate||function(x,y,_,g){var S,k=arguments.length,M=k<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,y,_,g);else for(var D=x.length-1;D>=0;D--)(S=x[D])&&(M=(k<3?S(M):k>3?S(y,_,M):S(y,_))||M);return k>3&&M&&Object.defineProperty(y,_,M),M},m=this&&this.__param||function(x,y){return function(_,g){y(_,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const u=c(511),b=c(2585);let C=a.OscLinkProvider=class{constructor(x,y,_){this._bufferService=x,this._optionsService=y,this._oscLinkService=_}provideLinks(x,y){var L;const _=this._bufferService.buffer.lines.get(x-1);if(!_)return void y(void 0);const g=[],S=this._optionsService.rawOptions.linkHandler,k=new u.CellData,M=_.getTrimmedLength();let D=-1,R=-1,A=!1;for(let B=0;B<M;B++)if(R!==-1||_.hasContent(B)){if(_.loadCell(B,k),k.hasExtendedAttrs()&&k.extended.urlId){if(R===-1){R=B,D=k.extended.urlId;continue}A=k.extended.urlId!==D}else R!==-1&&(A=!0);if(A||R!==-1&&B===M-1){const I=(L=this._oscLinkService.getLinkData(D))==null?void 0:L.uri;if(I){const U={start:{x:R+1,y:x},end:{x:B+(A||B!==M-1?0:1),y:x}};let F=!1;if(!(S!=null&&S.allowNonHttpProtocols))try{const $=new URL(I);["http:","https:"].includes($.protocol)||(F=!0)}catch{F=!0}F||g.push({text:I,range:U,activate:($,K)=>S?S.activate($,K,U):E(0,K),hover:($,K)=>{var V;return(V=S==null?void 0:S.hover)==null?void 0:V.call(S,$,K,U)},leave:($,K)=>{var V;return(V=S==null?void 0:S.leave)==null?void 0:V.call(S,$,K,U)}})}A=!1,k.hasExtendedAttrs()&&k.extended.urlId?(R=B,D=k.extended.urlId):(R=-1,D=-1)}}y(g)}};function E(x,y){if(confirm(`Do you want to navigate to ${y}?
54
+
55
+ WARNING: This link could potentially be dangerous`)){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=y}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=C=h([m(0,b.IBufferService),m(1,b.IOptionsService),m(2,b.IOscLinkService)],C)},6193:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(c,h){this._renderCallback=c,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,h,m){this._rowCount=m,c=c!==void 0?c:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const h=c(3614),m=c(3656),u=c(3551),b=c(9042),C=c(3730),E=c(1680),x=c(3107),y=c(5744),_=c(2950),g=c(1296),S=c(428),k=c(4269),M=c(5114),D=c(8934),R=c(3230),A=c(9312),L=c(4725),B=c(6731),I=c(8055),U=c(8969),F=c(8460),$=c(844),K=c(6114),V=c(8437),W=c(2584),J=c(7399),z=c(5941),j=c(9074),H=c(2585),G=c(5435),N=c(4567),Z=c(779);class he extends U.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(X={}){super(X),this.browser=K,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new $.MutableDisposable),this._onCursorMove=this.register(new F.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new F.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new F.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new F.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new F.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new F.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new F.EventEmitter),this._onBlur=this.register(new F.EventEmitter),this._onA11yCharEmitter=this.register(new F.EventEmitter),this._onA11yTabEmitter=this.register(new F.EventEmitter),this._onWillOpen=this.register(new F.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(j.DecorationService),this._instantiationService.setService(H.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Z.LinkProviderService),this._instantiationService.setService(L.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(C.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((q,ce)=>this.refresh(q,ce)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((q=>this._reportWindowsOptions(q)))),this.register(this._inputHandler.onColor((q=>this._handleColorEvent(q)))),this.register((0,F.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,F.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((q=>this._afterResize(q.cols,q.rows)))),this.register((0,$.toDisposable)((()=>{var q,ce;this._customKeyEventHandler=void 0,(ce=(q=this.element)==null?void 0:q.parentNode)==null||ce.removeChild(this.element)})))}_handleColorEvent(X){if(this._themeService)for(const q of X){let ce,te="";switch(q.index){case 256:ce="foreground",te="10";break;case 257:ce="background",te="11";break;case 258:ce="cursor",te="12";break;default:ce="ansi",te="4;"+q.index}switch(q.type){case 0:const se=I.color.toColorRGB(ce==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[ce]);this.coreService.triggerDataEvent(`${W.C0.ESC}]${te};${(0,z.toRgbString)(se)}${W.C1_ESCAPED.ST}`);break;case 1:if(ce==="ansi")this._themeService.modifyColors((de=>de.ansi[q.index]=I.channels.toColor(...q.color)));else{const de=ce;this._themeService.modifyColors((Ce=>Ce[de]=I.channels.toColor(...q.color)))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(X){X?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(N.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(X){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(W.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var X;return(X=this.textarea)==null?void 0:X.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(W.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const X=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(X);if(!q)return;const ce=Math.min(this.buffer.x,this.cols-1),te=this._renderService.dimensions.css.cell.height,se=q.getWidth(ce),de=this._renderService.dimensions.css.cell.width*se,Ce=this.buffer.y*this._renderService.dimensions.css.cell.height,xe=ce*this._renderService.dimensions.css.cell.width;this.textarea.style.left=xe+"px",this.textarea.style.top=Ce+"px",this.textarea.style.width=de+"px",this.textarea.style.height=te+"px",this.textarea.style.lineHeight=te+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,h.copyHandler)(q,this._selectionService)})));const X=q=>(0,h.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",X)),this.register((0,m.addDisposableDomListener)(this.element,"paste",X)),K.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),K.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,h.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",(X=>this._keyUp(X)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",(X=>this._keyDown(X)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",(X=>this._keyPress(X)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",(X=>this._compositionHelper.compositionupdate(X)))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,m.addDisposableDomListener)(this.textarea,"input",(X=>this._inputEvent(X)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(X){var ce;if(!X)throw new Error("Terminal requires a parent element.");if(X.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ce=this.element)==null?void 0:ce.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=X.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),X.appendChild(this.element);const q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,m.addDisposableDomListener)(this.screenElement,"mousemove",(te=>this.updateCursorStyle(te)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",b.promptLabel),K.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(M.CoreBrowserService,this.textarea,X.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(L.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",(te=>this._handleTextAreaFocus(te)))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(S.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(L.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(B.ThemeService),this._instantiationService.setService(L.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(k.CharacterJoinerService),this._instantiationService.setService(L.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(R.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(L.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((te=>this._onRender.fire(te)))),this.onResize((te=>this._renderService.resize(te.cols,te.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(_.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(L.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(E.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((te=>this.scrollLines(te.amount,te.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(A.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(L.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((te=>this.scrollLines(te.amount,te.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((te=>this._renderService.handleSelectionChanged(te.start,te.end,te.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((te=>{this.textarea.value=te,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((te=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(te=>this._selectionService.handleMouseDown(te)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(N.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(te=>this._handleScreenReaderModeOptionChange(te)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(y.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(te=>{!this._overviewRulerRenderer&&te&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(y.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(g.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const X=this,q=this.element;function ce(de){const Ce=X._mouseService.getMouseReportCoords(de,X.screenElement);if(!Ce)return!1;let xe,We;switch(de.overrideType||de.type){case"mousemove":We=32,de.buttons===void 0?(xe=3,de.button!==void 0&&(xe=de.button<3?de.button:3)):xe=1&de.buttons?0:4&de.buttons?1:2&de.buttons?2:3;break;case"mouseup":We=0,xe=de.button<3?de.button:3;break;case"mousedown":We=1,xe=de.button<3?de.button:3;break;case"wheel":if(X._customWheelEventHandler&&X._customWheelEventHandler(de)===!1||X.viewport.getLinesScrolled(de)===0)return!1;We=de.deltaY<0?0:1,xe=4;break;default:return!1}return!(We===void 0||xe===void 0||xe>4)&&X.coreMouseService.triggerMouseEvent({col:Ce.col,row:Ce.row,x:Ce.x,y:Ce.y,button:xe,action:We,ctrl:de.ctrlKey,alt:de.altKey,shift:de.shiftKey})}const te={mouseup:null,wheel:null,mousedrag:null,mousemove:null},se={mouseup:de=>(ce(de),de.buttons||(this._document.removeEventListener("mouseup",te.mouseup),te.mousedrag&&this._document.removeEventListener("mousemove",te.mousedrag)),this.cancel(de)),wheel:de=>(ce(de),this.cancel(de,!0)),mousedrag:de=>{de.buttons&&ce(de)},mousemove:de=>{de.buttons||ce(de)}};this.register(this.coreMouseService.onProtocolChange((de=>{de?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(de)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&de?te.mousemove||(q.addEventListener("mousemove",se.mousemove),te.mousemove=se.mousemove):(q.removeEventListener("mousemove",te.mousemove),te.mousemove=null),16&de?te.wheel||(q.addEventListener("wheel",se.wheel,{passive:!1}),te.wheel=se.wheel):(q.removeEventListener("wheel",te.wheel),te.wheel=null),2&de?te.mouseup||(te.mouseup=se.mouseup):(this._document.removeEventListener("mouseup",te.mouseup),te.mouseup=null),4&de?te.mousedrag||(te.mousedrag=se.mousedrag):(this._document.removeEventListener("mousemove",te.mousedrag),te.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(q,"mousedown",(de=>{if(de.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(de))return ce(de),te.mouseup&&this._document.addEventListener("mouseup",te.mouseup),te.mousedrag&&this._document.addEventListener("mousemove",te.mousedrag),this.cancel(de)}))),this.register((0,m.addDisposableDomListener)(q,"wheel",(de=>{if(!te.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(de)===!1)return!1;if(!this.buffer.hasScrollback){const Ce=this.viewport.getLinesScrolled(de);if(Ce===0)return;const xe=W.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(de.deltaY<0?"A":"B");let We="";for(let dt=0;dt<Math.abs(Ce);dt++)We+=xe;return this.coreService.triggerDataEvent(We,!0),this.cancel(de,!0)}return this.viewport.handleWheel(de)?this.cancel(de):void 0}}),{passive:!1})),this.register((0,m.addDisposableDomListener)(q,"touchstart",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(de),this.cancel(de)}),{passive:!0})),this.register((0,m.addDisposableDomListener)(q,"touchmove",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(de)?void 0:this.cancel(de)}),{passive:!1}))}refresh(X,q){var ce;(ce=this._renderService)==null||ce.refreshRows(X,q)}updateCursorStyle(X){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(X)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(X,q,ce=0){var te;ce===1?(super.scrollLines(X,q,ce),this.refresh(0,this.rows-1)):(te=this.viewport)==null||te.scrollLines(X)}paste(X){(0,h.paste)(X,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(X){this._customKeyEventHandler=X}attachCustomWheelEventHandler(X){this._customWheelEventHandler=X}registerLinkProvider(X){return this._linkProviderService.registerLinkProvider(X)}registerCharacterJoiner(X){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(X);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(X){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(X)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(X){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+X)}registerDecoration(X){return this._decorationService.registerDecoration(X)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(X,q,ce){this._selectionService.setSelection(X,q,ce)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var X;(X=this._selectionService)==null||X.clearSelection()}selectAll(){var X;(X=this._selectionService)==null||X.selectAll()}selectLines(X,q){var ce;(ce=this._selectionService)==null||ce.selectLines(X,q)}_keyDown(X){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&X.altKey;if(!q&&!this._compositionHelper.keydown(X))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||X.key!=="Dead"&&X.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ce=(0,J.evaluateKeyboardEvent)(X,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(X),ce.type===3||ce.type===2){const te=this.rows-1;return this.scrollLines(ce.type===2?-te:te),this.cancel(X,!0)}return ce.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,X)||(ce.cancel&&this.cancel(X,!0),!ce.key||!!(X.key&&!X.ctrlKey&&!X.altKey&&!X.metaKey&&X.key.length===1&&X.key.charCodeAt(0)>=65&&X.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ce.key!==W.C0.ETX&&ce.key!==W.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ce.key,domEvent:X}),this._showCursor(),this.coreService.triggerDataEvent(ce.key,!0),!this.optionsService.rawOptions.screenReaderMode||X.altKey||X.ctrlKey?this.cancel(X,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(X,q){const ce=X.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||X.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||X.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?ce:ce&&(!q.keyCode||q.keyCode>47)}_keyUp(X){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(X)||this.focus(),this.updateCursorStyle(X),this._keyPressHandled=!1)}_keyPress(X){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;if(this.cancel(X),X.charCode)q=X.charCode;else if(X.which===null||X.which===void 0)q=X.keyCode;else{if(X.which===0||X.charCode===0)return!1;q=X.which}return!(!q||(X.altKey||X.ctrlKey||X.metaKey)&&!this._isThirdLevelShift(this.browser,X)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:X}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(X){if(X.data&&X.inputType==="insertText"&&(!X.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=X.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(X),!0}return!1}resize(X,q){X!==this.cols||q!==this.rows?super.resize(X,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(X,q){var ce,te;(ce=this._charSizeService)==null||ce.measure(),(te=this.viewport)==null||te.syncScrollArea(!0)}clear(){var X;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let q=1;q<this.rows;q++)this.buffer.lines.push(this.buffer.getBlankLine(V.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(X=this.viewport)==null||X.reset(),this.refresh(0,this.rows-1)}}reset(){var q,ce;this.options.rows=this.rows,this.options.cols=this.cols;const X=this._customKeyEventHandler;this._setup(),super.reset(),(q=this._selectionService)==null||q.reset(),this._decorationService.reset(),(ce=this.viewport)==null||ce.reset(),this._customKeyEventHandler=X,this.refresh(0,this.rows-1)}clearTextureAtlas(){var X;(X=this._renderService)==null||X.clearTextureAtlas()}_reportFocus(){var X;(X=this.element)!=null&&X.classList.contains("focus")?this.coreService.triggerDataEvent(W.C0.ESC+"[I"):this.coreService.triggerDataEvent(W.C0.ESC+"[O")}_reportWindowsOptions(X){if(this._renderService)switch(X){case G.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const q=this._renderService.dimensions.css.canvas.width.toFixed(0),ce=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${W.C0.ESC}[4;${ce};${q}t`);break;case G.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const te=this._renderService.dimensions.css.cell.width.toFixed(0),se=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${W.C0.ESC}[6;${se};${te}t`)}}cancel(X,q){if(this.options.cancelEvents||q)return X.preventDefault(),X.stopPropagation(),!1}}a.Terminal=he},9924:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(c,h=1e3){this._renderCallback=c,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,h,m){this._rowCount=m,c=c!==void 0?c:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const b=u-this._lastRefreshMs,C=this._debounceThresholdMS-b;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),C)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,h)}}},1680:function(f,a,c){var h=this&&this.__decorate||function(_,g,S,k){var M,D=arguments.length,R=D<3?g:k===null?k=Object.getOwnPropertyDescriptor(g,S):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,g,S,k);else for(var A=_.length-1;A>=0;A--)(M=_[A])&&(R=(D<3?M(R):D>3?M(g,S,R):M(g,S))||R);return D>3&&R&&Object.defineProperty(g,S,R),R},m=this&&this.__param||function(_,g){return function(S,k){g(S,k,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const u=c(3656),b=c(4725),C=c(8460),E=c(844),x=c(2585);let y=a.Viewport=class extends E.Disposable{constructor(_,g,S,k,M,D,R,A){super(),this._viewportElement=_,this._scrollArea=g,this._bufferService=S,this._optionsService=k,this._charSizeService=M,this._renderService=D,this._coreBrowserService=R,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new C.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((L=>this._activeBuffer=L.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((L=>this._renderDimensions=L))),this._handleThemeChange(A.colors),this.register(A.onChangeColors((L=>this._handleThemeChange(L)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(_){this._viewportElement.style.backgroundColor=_.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(_){if(_)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const g=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==g&&(this._lastRecordedBufferHeight=g,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const _=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==_&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=_),this._refreshAnimationFrame=null}syncScrollArea(_=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(_);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(_)}_handleScroll(_){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const g=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:g,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const _=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(_*(this._smoothScrollState.target-this._smoothScrollState.origin)),_<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(_,g){const S=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(g<0&&this._viewportElement.scrollTop!==0||g>0&&S<this._lastRecordedBufferHeight)||(_.cancelable&&_.preventDefault(),!1)}handleWheel(_){const g=this._getPixelsScrolled(_);return g!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+g:this._smoothScrollState.target+=g,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=g,this._bubbleScroll(_,g))}scrollLines(_){if(_!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const g=_*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+g,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:_,suppressScrollEvent:!1})}_getPixelsScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let g=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_LINE?g*=this._currentRowHeight:_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(g*=this._currentRowHeight*this._bufferService.rows),g}getBufferElements(_,g){var A;let S,k="";const M=[],D=g??this._bufferService.buffer.lines.length,R=this._bufferService.buffer.lines;for(let L=_;L<D;L++){const B=R.get(L);if(!B)continue;const I=(A=R.get(L+1))==null?void 0:A.isWrapped;if(k+=B.translateToString(!I),!I||L===R.length-1){const U=document.createElement("div");U.textContent=k,M.push(U),k.length>0&&(S=U),k=""}}return{bufferElements:M,cursorElement:S}}getLinesScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let g=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(g/=this._currentRowHeight+0,this._wheelPartialScroll+=g,g=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(g*=this._bufferService.rows),g}_applyScrollModifier(_,g){const S=this._optionsService.rawOptions.fastScrollModifier;return S==="alt"&&g.altKey||S==="ctrl"&&g.ctrlKey||S==="shift"&&g.shiftKey?_*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:_*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(_){this._lastTouchY=_.touches[0].pageY}handleTouchMove(_){const g=this._lastTouchY-_.touches[0].pageY;return this._lastTouchY=_.touches[0].pageY,g!==0&&(this._viewportElement.scrollTop+=g,this._bubbleScroll(_,g))}};a.Viewport=y=h([m(2,x.IBufferService),m(3,x.IOptionsService),m(4,b.ICharSizeService),m(5,b.IRenderService),m(6,b.ICoreBrowserService),m(7,b.IThemeService)],y)},3107:function(f,a,c){var h=this&&this.__decorate||function(x,y,_,g){var S,k=arguments.length,M=k<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,y,_,g);else for(var D=x.length-1;D>=0;D--)(S=x[D])&&(M=(k<3?S(M):k>3?S(y,_,M):S(y,_))||M);return k>3&&M&&Object.defineProperty(y,_,M),M},m=this&&this.__param||function(x,y){return function(_,g){y(_,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const u=c(4725),b=c(844),C=c(2585);let E=a.BufferDecorationRenderer=class extends b.Disposable{constructor(x,y,_,g,S){super(),this._screenElement=x,this._bufferService=y,this._coreBrowserService=_,this._decorationService=g,this._renderService=S,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((k=>this._removeDecoration(k)))),this.register((0,b.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){var g;const y=this._coreBrowserService.mainDocument.createElement("div");y.classList.add("xterm-decoration"),y.classList.toggle("xterm-decoration-top-layer",((g=x==null?void 0:x.options)==null?void 0:g.layer)==="top"),y.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,y.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",y.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",y.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const _=x.options.x??0;return _&&_>this._bufferService.cols&&(y.style.display="none"),this._refreshXPosition(x,y),y}_refreshStyle(x){const y=x.marker.line-this._bufferService.buffers.active.ydisp;if(y<0||y>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let _=this._decorationElements.get(x);_||(_=this._createElement(x),x.element=_,this._decorationElements.set(x,_),this._container.appendChild(_),x.onDispose((()=>{this._decorationElements.delete(x),_.remove()}))),_.style.top=y*this._renderService.dimensions.css.cell.height+"px",_.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(_)}}_refreshXPosition(x,y=x.element){if(!y)return;const _=x.options.x??0;(x.options.anchor||"left")==="right"?y.style.right=_?_*this._renderService.dimensions.css.cell.width+"px":"":y.style.left=_?_*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){var y;(y=this._decorationElements.get(x))==null||y.remove(),this._decorationElements.delete(x),x.dispose()}};a.BufferDecorationRenderer=E=h([m(1,C.IBufferService),m(2,u.ICoreBrowserService),m(3,C.IDecorationService),m(4,u.IRenderService)],E)},5871:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const h of this._zones)if(h.color===c.options.overviewRulerOptions.color&&h.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,c.marker.line))return;if(this._lineAdjacentToZone(h,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(h,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,h){return h>=c.startBufferLine&&h<=c.endBufferLine}_lineAdjacentToZone(c,h,m){return h>=c.startBufferLine-this._linePadding[m||"full"]&&h<=c.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(c,h){c.startBufferLine=Math.min(c.startBufferLine,h),c.endBufferLine=Math.max(c.endBufferLine,h)}}},5744:function(f,a,c){var h=this&&this.__decorate||function(S,k,M,D){var R,A=arguments.length,L=A<3?k:D===null?D=Object.getOwnPropertyDescriptor(k,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(S,k,M,D);else for(var B=S.length-1;B>=0;B--)(R=S[B])&&(L=(A<3?R(L):A>3?R(k,M,L):R(k,M))||L);return A>3&&L&&Object.defineProperty(k,M,L),L},m=this&&this.__param||function(S,k){return function(M,D){k(M,D,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const u=c(5871),b=c(4725),C=c(844),E=c(2585),x={full:0,left:0,center:0,right:0},y={full:0,left:0,center:0,right:0},_={full:0,left:0,center:0,right:0};let g=a.OverviewRulerRenderer=class extends C.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(S,k,M,D,R,A,L){var I;super(),this._viewportElement=S,this._screenElement=k,this._bufferService=M,this._decorationService=D,this._renderService=R,this._optionsService=A,this._coreBrowserService=L,this._colorZoneStore=new u.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(I=this._viewportElement.parentElement)==null||I.insertBefore(this._canvas,this._viewportElement);const B=this._canvas.getContext("2d");if(!B)throw new Error("Ctx cannot be null");this._ctx=B,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,C.toDisposable)((()=>{var U;(U=this._canvas)==null||U.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const S=Math.floor(this._canvas.width/3),k=Math.ceil(this._canvas.width/3);y.full=this._canvas.width,y.left=S,y.center=k,y.right=S,this._refreshDrawHeightConstants(),_.full=0,_.left=0,_.center=y.left,_.right=y.left+y.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const S=this._canvas.height/this._bufferService.buffer.lines.length,k=Math.round(Math.max(Math.min(S,12),6)*this._coreBrowserService.dpr);x.left=k,x.center=k,x.right=k}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const k of this._decorationService.decorations)this._colorZoneStore.addDecoration(k);this._ctx.lineWidth=1;const S=this._colorZoneStore.zones;for(const k of S)k.position!=="full"&&this._renderColorZone(k);for(const k of S)k.position==="full"&&this._renderColorZone(k);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(S){this._ctx.fillStyle=S.color,this._ctx.fillRect(_[S.position||"full"],Math.round((this._canvas.height-1)*(S.startBufferLine/this._bufferService.buffers.active.lines.length)-x[S.position||"full"]/2),y[S.position||"full"],Math.round((this._canvas.height-1)*((S.endBufferLine-S.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[S.position||"full"]))}_queueRefresh(S,k){this._shouldUpdateDimensions=S||this._shouldUpdateDimensions,this._shouldUpdateAnchor=k||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=g=h([m(2,E.IBufferService),m(3,E.IDecorationService),m(4,b.IRenderService),m(5,E.IOptionsService),m(6,b.ICoreBrowserService)],g)},2950:function(f,a,c){var h=this&&this.__decorate||function(x,y,_,g){var S,k=arguments.length,M=k<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,y,_,g);else for(var D=x.length-1;D>=0;D--)(S=x[D])&&(M=(k<3?S(M):k>3?S(y,_,M):S(y,_))||M);return k>3&&M&&Object.defineProperty(y,_,M),M},m=this&&this.__param||function(x,y){return function(_,g){y(_,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const u=c(4725),b=c(2585),C=c(2584);let E=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,y,_,g,S,k){this._textarea=x,this._compositionView=y,this._bufferService=_,this._optionsService=g,this._coreService=S,this._renderService=k,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){const y={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let _;this._isSendingComposition=!1,y.start+=this._dataAlreadySent.length,_=this._isComposing?this._textarea.value.substring(y.start,y.end):this._textarea.value.substring(y.start),_.length>0&&this._coreService.triggerDataEvent(_,!0)}}),0)}else{this._isSendingComposition=!1;const y=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(y,!0)}}_handleAnyTextareaChanges(){const x=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const y=this._textarea.value,_=y.replace(x,"");this._dataAlreadySent=_,y.length>x.length?this._coreService.triggerDataEvent(_,!0):y.length<x.length?this._coreService.triggerDataEvent(`${C.C0.DEL}`,!0):y.length===x.length&&y!==x&&this._coreService.triggerDataEvent(y,!0)}}),0)}updateCompositionElements(x){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const y=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),_=this._renderService.dimensions.css.cell.height,g=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,S=y*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=S+"px",this._compositionView.style.top=g+"px",this._compositionView.style.height=_+"px",this._compositionView.style.lineHeight=_+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const k=this._compositionView.getBoundingClientRect();this._textarea.style.left=S+"px",this._textarea.style.top=g+"px",this._textarea.style.width=Math.max(k.width,1)+"px",this._textarea.style.height=Math.max(k.height,1)+"px",this._textarea.style.lineHeight=k.height+"px"}x||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=E=h([m(2,b.IBufferService),m(3,b.IOptionsService),m(4,b.ICoreService),m(5,u.IRenderService)],E)},9806:(f,a)=>{function c(h,m,u){const b=u.getBoundingClientRect(),C=h.getComputedStyle(u),E=parseInt(C.getPropertyValue("padding-left")),x=parseInt(C.getPropertyValue("padding-top"));return[m.clientX-b.left-E,m.clientY-b.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=c,a.getCoords=function(h,m,u,b,C,E,x,y,_){if(!E)return;const g=c(h,m,u);return g?(g[0]=Math.ceil((g[0]+(_?x/2:0))/x),g[1]=Math.ceil(g[1]/y),g[0]=Math.min(Math.max(g[0],1),b+(_?1:0)),g[1]=Math.min(Math.max(g[1],1),C),g):void 0}},9504:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const h=c(2584);function m(y,_,g,S){const k=y-u(y,g),M=_-u(_,g),D=Math.abs(k-M)-(function(R,A,L){let B=0;const I=R-u(R,L),U=A-u(A,L);for(let F=0;F<Math.abs(I-U);F++){const $=b(R,A)==="A"?-1:1,K=L.buffer.lines.get(I+$*F);K!=null&&K.isWrapped&&B++}return B})(y,_,g);return x(D,E(b(y,_),S))}function u(y,_){let g=0,S=_.buffer.lines.get(y),k=S==null?void 0:S.isWrapped;for(;k&&y>=0&&y<_.rows;)g++,S=_.buffer.lines.get(--y),k=S==null?void 0:S.isWrapped;return g}function b(y,_){return y>_?"A":"B"}function C(y,_,g,S,k,M){let D=y,R=_,A="";for(;D!==g||R!==S;)D+=k?1:-1,k&&D>M.cols-1?(A+=M.buffer.translateBufferLineToString(R,!1,y,D),D=0,y=0,R++):!k&&D<0&&(A+=M.buffer.translateBufferLineToString(R,!1,0,y+1),D=M.cols-1,y=D,R--);return A+M.buffer.translateBufferLineToString(R,!1,y,D)}function E(y,_){const g=_?"O":"[";return h.C0.ESC+g+y}function x(y,_){y=Math.floor(y);let g="";for(let S=0;S<y;S++)g+=_;return g}a.moveToCellSequence=function(y,_,g,S){const k=g.buffer.x,M=g.buffer.y;if(!g.buffer.hasScrollback)return(function(A,L,B,I,U,F){return m(L,I,U,F).length===0?"":x(C(A,L,A,L-u(L,U),!1,U).length,E("D",F))})(k,M,0,_,g,S)+m(M,_,g,S)+(function(A,L,B,I,U,F){let $;$=m(L,I,U,F).length>0?I-u(I,U):L;const K=I,V=(function(W,J,z,j,H,G){let N;return N=m(z,j,H,G).length>0?j-u(j,H):J,W<z&&N<=j||W>=z&&N<j?"C":"D"})(A,L,B,I,U,F);return x(C(A,$,B,K,V==="C",U).length,E(V,F))})(k,M,y,_,g,S);let D;if(M===_)return D=k>y?"D":"C",x(Math.abs(k-y),E(D,S));D=M>_?"D":"C";const R=Math.abs(M-_);return x((function(A,L){return L.cols-A})(M>_?y:k,g)+(R-1)*g.cols+1+((M>_?k:y)-1),E(D,S))}},1296:function(f,a,c){var h=this&&this.__decorate||function(F,$,K,V){var W,J=arguments.length,z=J<3?$:V===null?V=Object.getOwnPropertyDescriptor($,K):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(F,$,K,V);else for(var j=F.length-1;j>=0;j--)(W=F[j])&&(z=(J<3?W(z):J>3?W($,K,z):W($,K))||z);return J>3&&z&&Object.defineProperty($,K,z),z},m=this&&this.__param||function(F,$){return function(K,V){$(K,V,F)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const u=c(3787),b=c(2550),C=c(2223),E=c(6171),x=c(6052),y=c(4725),_=c(8055),g=c(8460),S=c(844),k=c(2585),M="xterm-dom-renderer-owner-",D="xterm-rows",R="xterm-fg-",A="xterm-bg-",L="xterm-focus",B="xterm-selection";let I=1,U=a.DomRenderer=class extends S.Disposable{constructor(F,$,K,V,W,J,z,j,H,G,N,Z,he){super(),this._terminal=F,this._document=$,this._element=K,this._screenElement=V,this._viewportElement=W,this._helperContainer=J,this._linkifier2=z,this._charSizeService=H,this._optionsService=G,this._bufferService=N,this._coreBrowserService=Z,this._themeService=he,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new g.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(D),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(B),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,E.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((_e=>this._injectCss(_e)))),this._injectCss(this._themeService.colors),this._rowFactory=j.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(M+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((_e=>this._handleLinkHover(_e)))),this.register(this._linkifier2.onHideLinkUnderline((_e=>this._handleLinkLeave(_e)))),this.register((0,S.toDisposable)((()=>{this._element.classList.remove(M+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new b.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const F=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*F,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*F),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/F),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/F),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const K of this._rowElements)K.style.width=`${this.dimensions.css.canvas.width}px`,K.style.height=`${this.dimensions.css.cell.height}px`,K.style.lineHeight=`${this.dimensions.css.cell.height}px`,K.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const $=`${this._terminalSelector} .${D} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=$,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(F){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let $=`${this._terminalSelector} .${D} { color: ${F.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;$+=`${this._terminalSelector} .${D} .xterm-dim { color: ${_.color.multiplyOpacity(F.foreground,.5).css};}`,$+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const K=`blink_underline_${this._terminalClass}`,V=`blink_bar_${this._terminalClass}`,W=`blink_block_${this._terminalClass}`;$+=`@keyframes ${K} { 50% { border-bottom-style: hidden; }}`,$+=`@keyframes ${V} { 50% { box-shadow: none; }}`,$+=`@keyframes ${W} { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,$+=`${this._terminalSelector} .${D}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${D}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${D}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css};}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${F.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,$+=`${this._terminalSelector} .${B} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${B} div { position: absolute; background-color: ${F.selectionBackgroundOpaque.css};}${this._terminalSelector} .${B} div { position: absolute; background-color: ${F.selectionInactiveBackgroundOpaque.css};}`;for(const[J,z]of F.ansi.entries())$+=`${this._terminalSelector} .${R}${J} { color: ${z.css}; }${this._terminalSelector} .${R}${J}.xterm-dim { color: ${_.color.multiplyOpacity(z,.5).css}; }${this._terminalSelector} .${A}${J} { background-color: ${z.css}; }`;$+=`${this._terminalSelector} .${R}${C.INVERTED_DEFAULT_COLOR} { color: ${_.color.opaque(F.background).css}; }${this._terminalSelector} .${R}${C.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${_.color.multiplyOpacity(_.color.opaque(F.background),.5).css}; }${this._terminalSelector} .${A}${C.INVERTED_DEFAULT_COLOR} { background-color: ${F.foreground.css}; }`,this._themeStyleElement.textContent=$}_setDefaultSpacing(){const F=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${F}px`,this._rowFactory.defaultSpacing=F}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(F,$){for(let K=this._rowElements.length;K<=$;K++){const V=this._document.createElement("div");this._rowContainer.appendChild(V),this._rowElements.push(V)}for(;this._rowElements.length>$;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,$){this._refreshRowElements(F,$),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(L),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(L),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(F,$,K){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,$,K),this.renderRows(0,this._bufferService.rows-1),!F||!$)return;this._selectionRenderModel.update(this._terminal,F,$,K);const V=this._selectionRenderModel.viewportStartRow,W=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,z=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||z<0)return;const j=this._document.createDocumentFragment();if(K){const H=F[0]>$[0];j.appendChild(this._createSelectionElement(J,H?$[0]:F[0],H?F[0]:$[0],z-J+1))}else{const H=V===J?F[0]:0,G=J===W?$[0]:this._bufferService.cols;j.appendChild(this._createSelectionElement(J,H,G));const N=z-J-1;if(j.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,N)),J!==z){const Z=W===z?$[0]:this._bufferService.cols;j.appendChild(this._createSelectionElement(z,0,Z))}}this._selectionContainer.appendChild(j)}_createSelectionElement(F,$,K,V=1){const W=this._document.createElement("div"),J=$*this.dimensions.css.cell.width;let z=this.dimensions.css.cell.width*(K-$);return J+z>this.dimensions.css.canvas.width&&(z=this.dimensions.css.canvas.width-J),W.style.height=V*this.dimensions.css.cell.height+"px",W.style.top=F*this.dimensions.css.cell.height+"px",W.style.left=`${J}px`,W.style.width=`${z}px`,W}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const F of this._rowElements)F.replaceChildren()}renderRows(F,$){const K=this._bufferService.buffer,V=K.ybase+K.y,W=Math.min(K.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,z=this._optionsService.rawOptions.cursorStyle,j=this._optionsService.rawOptions.cursorInactiveStyle;for(let H=F;H<=$;H++){const G=H+K.ydisp,N=this._rowElements[H],Z=K.lines.get(G);if(!N||!Z)break;N.replaceChildren(...this._rowFactory.createRow(Z,G,G===V,z,j,W,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${M}${this._terminalClass}`}_handleLinkHover(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!0)}_handleLinkLeave(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!1)}_setCellUnderline(F,$,K,V,W,J){K<0&&(F=0),V<0&&($=0);const z=this._bufferService.rows-1;K=Math.max(Math.min(K,z),0),V=Math.max(Math.min(V,z),0),W=Math.min(W,this._bufferService.cols);const j=this._bufferService.buffer,H=j.ybase+j.y,G=Math.min(j.x,W-1),N=this._optionsService.rawOptions.cursorBlink,Z=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let _e=K;_e<=V;++_e){const X=_e+j.ydisp,q=this._rowElements[_e],ce=j.lines.get(X);if(!q||!ce)break;q.replaceChildren(...this._rowFactory.createRow(ce,X,X===H,Z,he,G,N,this.dimensions.css.cell.width,this._widthCache,J?_e===K?F:0:-1,J?(_e===V?$:W)-1:-1))}}};a.DomRenderer=U=h([m(7,k.IInstantiationService),m(8,y.ICharSizeService),m(9,k.IOptionsService),m(10,k.IBufferService),m(11,y.ICoreBrowserService),m(12,y.IThemeService)],U)},3787:function(f,a,c){var h=this&&this.__decorate||function(D,R,A,L){var B,I=arguments.length,U=I<3?R:L===null?L=Object.getOwnPropertyDescriptor(R,A):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(D,R,A,L);else for(var F=D.length-1;F>=0;F--)(B=D[F])&&(U=(I<3?B(U):I>3?B(R,A,U):B(R,A))||U);return I>3&&U&&Object.defineProperty(R,A,U),U},m=this&&this.__param||function(D,R){return function(A,L){R(A,L,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const u=c(2223),b=c(643),C=c(511),E=c(2585),x=c(8055),y=c(4725),_=c(4269),g=c(6171),S=c(3734);let k=a.DomRendererRowFactory=class{constructor(D,R,A,L,B,I,U){this._document=D,this._characterJoinerService=R,this._optionsService=A,this._coreBrowserService=L,this._coreService=B,this._decorationService=I,this._themeService=U,this._workCell=new C.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(D,R,A){this._selectionStart=D,this._selectionEnd=R,this._columnSelectMode=A}createRow(D,R,A,L,B,I,U,F,$,K,V){const W=[],J=this._characterJoinerService.getJoinedCharacters(R),z=this._themeService.colors;let j,H=D.getNoBgTrimmedLength();A&&H<I+1&&(H=I+1);let G=0,N="",Z=0,he=0,_e=0,X=!1,q=0,ce=!1,te=0;const se=[],de=K!==-1&&V!==-1;for(let Ce=0;Ce<H;Ce++){D.loadCell(Ce,this._workCell);let xe=this._workCell.getWidth();if(xe===0)continue;let We=!1,dt=Ce,De=this._workCell;if(J.length>0&&Ce===J[0][0]){We=!0;const Ee=J.shift();De=new _.JoinedCellData(this._workCell,D.translateToString(!0,Ee[0],Ee[1]),Ee[1]-Ee[0]),dt=Ee[1]-1,xe=De.getWidth()}const Wt=this._isCellInSelection(Ce,R),Pt=A&&Ce===I,Xt=de&&Ce>=K&&Ce<=V;let Qt=!1;this._decorationService.forEachDecorationAtCell(Ce,R,void 0,(Ee=>{Qt=!0}));let vn=De.getChars()||b.WHITESPACE_CELL_CHAR;if(vn===" "&&(De.isUnderline()||De.isOverline())&&(vn=" "),te=xe*F-$.get(vn,De.isBold(),De.isItalic()),j){if(G&&(Wt&&ce||!Wt&&!ce&&De.bg===Z)&&(Wt&&ce&&z.selectionForeground||De.fg===he)&&De.extended.ext===_e&&Xt===X&&te===q&&!Pt&&!We&&!Qt){De.isInvisible()?N+=b.WHITESPACE_CELL_CHAR:N+=vn,G++;continue}G&&(j.textContent=N),j=this._document.createElement("span"),G=0,N=""}else j=this._document.createElement("span");if(Z=De.bg,he=De.fg,_e=De.extended.ext,X=Xt,q=te,ce=Wt,We&&I>=Ce&&I<=dt&&(I=Ce),!this._coreService.isCursorHidden&&Pt&&this._coreService.isCursorInitialized){if(se.push("xterm-cursor"),this._coreBrowserService.isFocused)U&&se.push("xterm-cursor-blink"),se.push(L==="bar"?"xterm-cursor-bar":L==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(B)switch(B){case"outline":se.push("xterm-cursor-outline");break;case"block":se.push("xterm-cursor-block");break;case"bar":se.push("xterm-cursor-bar");break;case"underline":se.push("xterm-cursor-underline")}}if(De.isBold()&&se.push("xterm-bold"),De.isItalic()&&se.push("xterm-italic"),De.isDim()&&se.push("xterm-dim"),N=De.isInvisible()?b.WHITESPACE_CELL_CHAR:De.getChars()||b.WHITESPACE_CELL_CHAR,De.isUnderline()&&(se.push(`xterm-underline-${De.extended.underlineStyle}`),N===" "&&(N=" "),!De.isUnderlineColorDefault()))if(De.isUnderlineColorRGB())j.style.textDecorationColor=`rgb(${S.AttributeData.toColorRGB(De.getUnderlineColor()).join(",")})`;else{let Ee=De.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&De.isBold()&&Ee<8&&(Ee+=8),j.style.textDecorationColor=z.ansi[Ee].css}De.isOverline()&&(se.push("xterm-overline"),N===" "&&(N=" ")),De.isStrikethrough()&&se.push("xterm-strikethrough"),Xt&&(j.style.textDecoration="underline");let St=De.getFgColor(),Xe=De.getFgColorMode(),pt=De.getBgColor(),fe=De.getBgColorMode();const Se=!!De.isInverse();if(Se){const Ee=St;St=pt,pt=Ee;const et=Xe;Xe=fe,fe=et}let Ae,Be,je,ct=!1;switch(this._decorationService.forEachDecorationAtCell(Ce,R,void 0,(Ee=>{Ee.options.layer!=="top"&&ct||(Ee.backgroundColorRGB&&(fe=50331648,pt=Ee.backgroundColorRGB.rgba>>8&16777215,Ae=Ee.backgroundColorRGB),Ee.foregroundColorRGB&&(Xe=50331648,St=Ee.foregroundColorRGB.rgba>>8&16777215,Be=Ee.foregroundColorRGB),ct=Ee.options.layer==="top")})),!ct&&Wt&&(Ae=this._coreBrowserService.isFocused?z.selectionBackgroundOpaque:z.selectionInactiveBackgroundOpaque,pt=Ae.rgba>>8&16777215,fe=50331648,ct=!0,z.selectionForeground&&(Xe=50331648,St=z.selectionForeground.rgba>>8&16777215,Be=z.selectionForeground)),ct&&se.push("xterm-decoration-top"),fe){case 16777216:case 33554432:je=z.ansi[pt],se.push(`xterm-bg-${pt}`);break;case 50331648:je=x.channels.toColor(pt>>16,pt>>8&255,255&pt),this._addStyle(j,`background-color:#${M((pt>>>0).toString(16),"0",6)}`);break;default:Se?(je=z.foreground,se.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):je=z.background}switch(Ae||De.isDim()&&(Ae=x.color.multiplyOpacity(je,.5)),Xe){case 16777216:case 33554432:De.isBold()&&St<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(St+=8),this._applyMinimumContrast(j,je,z.ansi[St],De,Ae,void 0)||se.push(`xterm-fg-${St}`);break;case 50331648:const Ee=x.channels.toColor(St>>16&255,St>>8&255,255&St);this._applyMinimumContrast(j,je,Ee,De,Ae,Be)||this._addStyle(j,`color:#${M(St.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(j,je,z.foreground,De,Ae,Be)||Se&&se.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}se.length&&(j.className=se.join(" "),se.length=0),Pt||We||Qt?j.textContent=N:G++,te!==this.defaultSpacing&&(j.style.letterSpacing=`${te}px`),W.push(j),Ce=dt}return j&&G&&(j.textContent=N),W}_applyMinimumContrast(D,R,A,L,B,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,g.treatGlyphAsBackgroundColor)(L.getCode()))return!1;const U=this._getContrastCache(L);let F;if(B||I||(F=U.getColor(R.rgba,A.rgba)),F===void 0){const $=this._optionsService.rawOptions.minimumContrastRatio/(L.isDim()?2:1);F=x.color.ensureContrastRatio(B||R,I||A,$),U.setColor((B||R).rgba,(I||A).rgba,F??null)}return!!F&&(this._addStyle(D,`color:${F.css}`),!0)}_getContrastCache(D){return D.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(D,R){D.setAttribute("style",`${D.getAttribute("style")||""}${R};`)}_isCellInSelection(D,R){const A=this._selectionStart,L=this._selectionEnd;return!(!A||!L)&&(this._columnSelectMode?A[0]<=L[0]?D>=A[0]&&R>=A[1]&&D<L[0]&&R<=L[1]:D<A[0]&&R>=A[1]&&D>=L[0]&&R<=L[1]:R>A[1]&&R<L[1]||A[1]===L[1]&&R===A[1]&&D>=A[0]&&D<L[0]||A[1]<L[1]&&R===L[1]&&D<L[0]||A[1]<L[1]&&R===A[1]&&D>=A[0])}};function M(D,R,A){for(;D.length<A;)D=R+D;return D}a.DomRendererRowFactory=k=h([m(1,y.ICharacterJoinerService),m(2,E.IOptionsService),m(3,y.ICoreBrowserService),m(4,E.ICoreService),m(5,E.IDecorationService),m(6,y.IThemeService)],k)},2550:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(c,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const m=c.createElement("span");m.classList.add("xterm-char-measure-element");const u=c.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const b=c.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontStyle="italic";const C=c.createElement("span");C.classList.add("xterm-char-measure-element"),C.style.fontWeight="bold",C.style.fontStyle="italic",this._measureElements=[m,u,b,C],this._container.appendChild(m),this._container.appendChild(u),this._container.appendChild(b),this._container.appendChild(C),h.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,h,m,u){c===this._font&&h===this._fontSize&&m===this._weight&&u===this._weightBold||(this._font=c,this._fontSize=h,this._weight=m,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(c,h,m){let u=0;if(!h&&!m&&c.length===1&&(u=c.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const E=this._measure(c,0);return E>0&&(this._flat[u]=E),E}let b=c;h&&(b+="B"),m&&(b+="I");let C=this._holey.get(b);if(C===void 0){let E=0;h&&(E|=1),m&&(E|=2),C=this._measure(c,E),C>0&&this._holey.set(b,C)}return C}_measure(c,h){const m=this._measureElements[h];return m.textContent=c.repeat(32),m.offsetWidth/32}}},2223:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const h=c(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(f,a)=>{function c(m){return 57508<=m&&m<=57558}function h(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},a.isPowerlineGlyph=c,a.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},a.isEmoji=h,a.allowRescaling=function(m,u,b,C){return u===1&&b>Math.ceil(1.5*C)&&m!==void 0&&m>255&&!h(m)&&!c(m)&&!(function(E){return 57344<=E&&E<=63743})(m)},a.treatGlyphAsBackgroundColor=function(m){return c(m)||(function(u){return 9472<=u&&u<=9631})(m)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(m,u,b=0){return(m-(2*Math.round(u)-b))%(2*Math.round(u))}},6052:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class c{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(m,u,b,C=!1){if(this.selectionStart=u,this.selectionEnd=b,!u||!b||u[0]===b[0]&&u[1]===b[1])return void this.clear();const E=m.buffers.active.ydisp,x=u[1]-E,y=b[1]-E,_=Math.max(x,0),g=Math.min(y,m.rows-1);_>=m.rows||g<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=C,this.viewportStartRow=x,this.viewportEndRow=y,this.viewportCappedStartRow=_,this.viewportCappedEndRow=g,this.startCol=u[0],this.endCol=b[0])}isCellSelected(m,u,b){return!!this.hasSelection&&(b-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&b>=this.viewportCappedStartRow&&u<this.endCol&&b<=this.viewportCappedEndRow:u<this.startCol&&b>=this.viewportCappedStartRow&&u>=this.endCol&&b<=this.viewportCappedEndRow:b>this.viewportStartRow&&b<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&b===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportStartRow&&u>=this.startCol)}}a.createSelectionRenderModel=function(){return new c}},456:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(c){this._bufferService=c,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,h=this.selectionEnd;return!(!c||!h)&&(c[1]>h[1]||c[1]===h[1]&&c[0]>h[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(f,a,c){var h=this&&this.__decorate||function(g,S,k,M){var D,R=arguments.length,A=R<3?S:M===null?M=Object.getOwnPropertyDescriptor(S,k):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(g,S,k,M);else for(var L=g.length-1;L>=0;L--)(D=g[L])&&(A=(R<3?D(A):R>3?D(S,k,A):D(S,k))||A);return R>3&&A&&Object.defineProperty(S,k,A),A},m=this&&this.__param||function(g,S){return function(k,M){S(k,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const u=c(2585),b=c(8460),C=c(844);let E=a.CharSizeService=class extends C.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(g,S,k){super(),this._optionsService=k,this.width=0,this.height=0,this._onCharSizeChange=this.register(new b.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new _(this._optionsService))}catch{this._measureStrategy=this.register(new y(g,S,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const g=this._measureStrategy.measure();g.width===this.width&&g.height===this.height||(this.width=g.width,this.height=g.height,this._onCharSizeChange.fire())}};a.CharSizeService=E=h([m(2,u.IOptionsService)],E);class x extends C.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(S,k){S!==void 0&&S>0&&k!==void 0&&k>0&&(this._result.width=S,this._result.height=k)}}class y extends x{constructor(S,k,M){super(),this._document=S,this._parentElement=k,this._optionsService=M,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class _ extends x{constructor(S){super(),this._optionsService=S,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const k=this._ctx.measureText("W");if(!("width"in k&&"fontBoundingBoxAscent"in k&&"fontBoundingBoxDescent"in k))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const S=this._ctx.measureText("W");return this._validateAndSet(S.width,S.fontBoundingBoxAscent+S.fontBoundingBoxDescent),this._result}}},4269:function(f,a,c){var h=this&&this.__decorate||function(_,g,S,k){var M,D=arguments.length,R=D<3?g:k===null?k=Object.getOwnPropertyDescriptor(g,S):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,g,S,k);else for(var A=_.length-1;A>=0;A--)(M=_[A])&&(R=(D<3?M(R):D>3?M(g,S,R):M(g,S))||R);return D>3&&R&&Object.defineProperty(g,S,R),R},m=this&&this.__param||function(_,g){return function(S,k){g(S,k,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const u=c(3734),b=c(643),C=c(511),E=c(2585);class x extends u.AttributeData{constructor(g,S,k){super(),this.content=0,this.combinedData="",this.fg=g.fg,this.bg=g.bg,this.combinedData=S,this._width=k}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(g){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=x;let y=a.CharacterJoinerService=class Bg{constructor(g){this._bufferService=g,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(g){const S={id:this._nextCharacterJoinerId++,handler:g};return this._characterJoiners.push(S),S.id}deregister(g){for(let S=0;S<this._characterJoiners.length;S++)if(this._characterJoiners[S].id===g)return this._characterJoiners.splice(S,1),!0;return!1}getJoinedCharacters(g){if(this._characterJoiners.length===0)return[];const S=this._bufferService.buffer.lines.get(g);if(!S||S.length===0)return[];const k=[],M=S.translateToString(!0);let D=0,R=0,A=0,L=S.getFg(0),B=S.getBg(0);for(let I=0;I<S.getTrimmedLength();I++)if(S.loadCell(I,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==L||this._workCell.bg!==B){if(I-D>1){const U=this._getJoinedRanges(M,A,R,S,D);for(let F=0;F<U.length;F++)k.push(U[F])}D=I,A=R,L=this._workCell.fg,B=this._workCell.bg}R+=this._workCell.getChars().length||b.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-D>1){const I=this._getJoinedRanges(M,A,R,S,D);for(let U=0;U<I.length;U++)k.push(I[U])}return k}_getJoinedRanges(g,S,k,M,D){const R=g.substring(S,k);let A=[];try{A=this._characterJoiners[0].handler(R)}catch(L){console.error(L)}for(let L=1;L<this._characterJoiners.length;L++)try{const B=this._characterJoiners[L].handler(R);for(let I=0;I<B.length;I++)Bg._mergeRanges(A,B[I])}catch(B){console.error(B)}return this._stringRangesToCellRanges(A,M,D),A}_stringRangesToCellRanges(g,S,k){let M=0,D=!1,R=0,A=g[M];if(A){for(let L=k;L<this._bufferService.cols;L++){const B=S.getWidth(L),I=S.getString(L).length||b.WHITESPACE_CELL_CHAR.length;if(B!==0){if(!D&&A[0]<=R&&(A[0]=L,D=!0),A[1]<=R){if(A[1]=L,A=g[++M],!A)break;A[0]<=R?(A[0]=L,D=!0):D=!1}R+=I}}A&&(A[1]=this._bufferService.cols)}}static _mergeRanges(g,S){let k=!1;for(let M=0;M<g.length;M++){const D=g[M];if(k){if(S[1]<=D[0])return g[M-1][1]=S[1],g;if(S[1]<=D[1])return g[M-1][1]=Math.max(S[1],D[1]),g.splice(M,1),g;g.splice(M,1),M--}else{if(S[1]<=D[0])return g.splice(M,0,S),g;if(S[1]<=D[1])return D[0]=Math.min(S[0],D[0]),g;S[0]<D[1]&&(D[0]=Math.min(S[0],D[0]),k=!0)}}return k?g[g.length-1][1]=S[1]:g.push(S),g}};a.CharacterJoinerService=y=h([m(0,E.IBufferService)],y)},5114:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=c(844),m=c(8460),u=c(3656);class b extends h.Disposable{constructor(x,y,_){super(),this._textarea=x,this._window=y,this.mainDocument=_,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new C(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((g=>this._screenDprMonitor.setWindow(g)))),this.register((0,m.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(x){this._window!==x&&(this._window=x,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=b;class C extends h.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new h.MutableDisposable),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,h.toDisposable)((()=>this.clearListener())))}setWindow(x){this._parentWindow=x,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var x;this._outerListener&&((x=this._resolutionMediaMatchList)==null||x.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const h=c(844);class m extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(b){return this.linkProviders.push(b),{dispose:()=>{const C=this.linkProviders.indexOf(b);C!==-1&&this.linkProviders.splice(C,1)}}}}a.LinkProviderService=m},8934:function(f,a,c){var h=this&&this.__decorate||function(E,x,y,_){var g,S=arguments.length,k=S<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,y):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(E,x,y,_);else for(var M=E.length-1;M>=0;M--)(g=E[M])&&(k=(S<3?g(k):S>3?g(x,y,k):g(x,y))||k);return S>3&&k&&Object.defineProperty(x,y,k),k},m=this&&this.__param||function(E,x){return function(y,_){x(y,_,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const u=c(4725),b=c(9806);let C=a.MouseService=class{constructor(E,x){this._renderService=E,this._charSizeService=x}getCoords(E,x,y,_,g){return(0,b.getCoords)(window,E,x,y,_,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,g)}getMouseReportCoords(E,x){const y=(0,b.getCoordsRelativeToElement)(window,E,x);if(this._charSizeService.hasValidSize)return y[0]=Math.min(Math.max(y[0],0),this._renderService.dimensions.css.canvas.width-1),y[1]=Math.min(Math.max(y[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(y[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(y[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(y[0]),y:Math.floor(y[1])}}};a.MouseService=C=h([m(0,u.IRenderService),m(1,u.ICharSizeService)],C)},3230:function(f,a,c){var h=this&&this.__decorate||function(g,S,k,M){var D,R=arguments.length,A=R<3?S:M===null?M=Object.getOwnPropertyDescriptor(S,k):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(g,S,k,M);else for(var L=g.length-1;L>=0;L--)(D=g[L])&&(A=(R<3?D(A):R>3?D(S,k,A):D(S,k))||A);return R>3&&A&&Object.defineProperty(S,k,A),A},m=this&&this.__param||function(g,S){return function(k,M){S(k,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const u=c(6193),b=c(4725),C=c(8460),E=c(844),x=c(7226),y=c(2585);let _=a.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(g,S,k,M,D,R,A,L){super(),this._rowCount=g,this._charSizeService=M,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new E.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new C.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new C.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new C.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new C.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer(((B,I)=>this._renderRows(B,I)),A),this.register(this._renderDebouncer),this.register(A.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(R.onResize((()=>this._fullRefresh()))),this.register(R.buffers.onBufferActivate((()=>{var B;return(B=this._renderer.value)==null?void 0:B.clear()}))),this.register(k.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(D.onDecorationRegistered((()=>this._fullRefresh()))),this.register(D.onDecorationRemoved((()=>this._fullRefresh()))),this.register(k.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(R.cols,R.rows),this._fullRefresh()}))),this.register(k.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(R.buffer.y,R.buffer.y,!0)))),this.register(L.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(A.window,S),this.register(A.onWindowChange((B=>this._registerIntersectionObserver(B,S))))}_registerIntersectionObserver(g,S){if("IntersectionObserver"in g){const k=new g.IntersectionObserver((M=>this._handleIntersectionChange(M[M.length-1])),{threshold:0});k.observe(S),this._observerDisposable.value=(0,E.toDisposable)((()=>k.disconnect()))}}_handleIntersectionChange(g){this._isPaused=g.isIntersecting===void 0?g.intersectionRatio===0:!g.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(g,S,k=!1){this._isPaused?this._needsFullRefresh=!0:(k||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(g,S,this._rowCount))}_renderRows(g,S){this._renderer.value&&(g=Math.min(g,this._rowCount-1),S=Math.min(S,this._rowCount-1),this._renderer.value.renderRows(g,S),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:g,end:S}),this._onRender.fire({start:g,end:S}),this._isNextRenderRedrawOnly=!0)}resize(g,S){this._rowCount=S,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(g){this._renderer.value=g,this._renderer.value&&(this._renderer.value.onRequestRedraw((S=>this.refreshRows(S.start,S.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(g){return this._renderDebouncer.addRefreshCallback(g)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var g,S;this._renderer.value&&((S=(g=this._renderer.value).clearTextureAtlas)==null||S.call(g),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(g,S){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var k;return(k=this._renderer.value)==null?void 0:k.handleResize(g,S)})):this._renderer.value.handleResize(g,S),this._fullRefresh())}handleCharSizeChanged(){var g;(g=this._renderer.value)==null||g.handleCharSizeChanged()}handleBlur(){var g;(g=this._renderer.value)==null||g.handleBlur()}handleFocus(){var g;(g=this._renderer.value)==null||g.handleFocus()}handleSelectionChanged(g,S,k){var M;this._selectionState.start=g,this._selectionState.end=S,this._selectionState.columnSelectMode=k,(M=this._renderer.value)==null||M.handleSelectionChanged(g,S,k)}handleCursorMove(){var g;(g=this._renderer.value)==null||g.handleCursorMove()}clear(){var g;(g=this._renderer.value)==null||g.clear()}};a.RenderService=_=h([m(2,y.IOptionsService),m(3,b.ICharSizeService),m(4,y.IDecorationService),m(5,y.IBufferService),m(6,b.ICoreBrowserService),m(7,b.IThemeService)],_)},9312:function(f,a,c){var h=this&&this.__decorate||function(A,L,B,I){var U,F=arguments.length,$=F<3?L:I===null?I=Object.getOwnPropertyDescriptor(L,B):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(A,L,B,I);else for(var K=A.length-1;K>=0;K--)(U=A[K])&&($=(F<3?U($):F>3?U(L,B,$):U(L,B))||$);return F>3&&$&&Object.defineProperty(L,B,$),$},m=this&&this.__param||function(A,L){return function(B,I){L(B,I,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const u=c(9806),b=c(9504),C=c(456),E=c(4725),x=c(8460),y=c(844),_=c(6114),g=c(4841),S=c(511),k=c(2585),M=" ",D=new RegExp(M,"g");let R=a.SelectionService=class extends y.Disposable{constructor(A,L,B,I,U,F,$,K,V){super(),this._element=A,this._screenElement=L,this._linkifier=B,this._bufferService=I,this._coreService=U,this._mouseService=F,this._optionsService=$,this._renderService=K,this._coreBrowserService=V,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new S.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new x.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new x.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new x.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=W=>this._handleMouseMove(W),this._mouseUpListener=W=>this._handleMouseUp(W),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((W=>this._handleTrim(W))),this.register(this._bufferService.buffers.onBufferActivate((W=>this._handleBufferActivate(W)))),this.enable(),this._model=new C.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,y.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const A=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!A||!L||A[0]===L[0]&&A[1]===L[1])}get selectionText(){const A=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;if(!A||!L)return"";const B=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(A[0]===L[0])return"";const U=A[0]<L[0]?A[0]:L[0],F=A[0]<L[0]?L[0]:A[0];for(let $=A[1];$<=L[1];$++){const K=B.translateBufferLineToString($,!0,U,F);I.push(K)}}else{const U=A[1]===L[1]?L[0]:void 0;I.push(B.translateBufferLineToString(A[1],!0,A[0],U));for(let F=A[1]+1;F<=L[1]-1;F++){const $=B.lines.get(F),K=B.translateBufferLineToString(F,!0);$!=null&&$.isWrapped?I[I.length-1]+=K:I.push(K)}if(A[1]!==L[1]){const F=B.lines.get(L[1]),$=B.translateBufferLineToString(L[1],!0,0,L[0]);F&&F.isWrapped?I[I.length-1]+=$:I.push($)}}return I.map((U=>U.replace(D," "))).join(_.isWindows?`\r
56
+ `:`
57
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(A){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),_.isLinux&&A&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(A){const L=this._getMouseBufferCoords(A),B=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(B&&I&&L)&&this._areCoordsInSelection(L,B,I)}isCellInSelection(A,L){const B=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!B||!I)&&this._areCoordsInSelection([A,L],B,I)}_areCoordsInSelection(A,L,B){return A[1]>L[1]&&A[1]<B[1]||L[1]===B[1]&&A[1]===L[1]&&A[0]>=L[0]&&A[0]<B[0]||L[1]<B[1]&&A[1]===B[1]&&A[0]<B[0]||L[1]<B[1]&&A[1]===L[1]&&A[0]>=L[0]}_selectWordAtCursor(A,L){var U,F;const B=(F=(U=this._linkifier.currentLink)==null?void 0:U.link)==null?void 0:F.range;if(B)return this._model.selectionStart=[B.start.x-1,B.start.y-1],this._model.selectionStartLength=(0,g.getRangeLength)(B,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(A);return!!I&&(this._selectWordAt(I,L),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(A,L){this._model.clearSelection(),A=Math.max(A,0),L=Math.min(L,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,A],this._model.selectionEnd=[this._bufferService.cols,L],this.refresh(),this._onSelectionChange.fire()}_handleTrim(A){this._model.handleTrim(A)&&this.refresh()}_getMouseBufferCoords(A){const L=this._mouseService.getCoords(A,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(L)return L[0]--,L[1]--,L[1]+=this._bufferService.buffer.ydisp,L}_getMouseEventScrollAmount(A){let L=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,A,this._screenElement)[1];const B=this._renderService.dimensions.css.canvas.height;return L>=0&&L<=B?0:(L>B&&(L-=B),L=Math.min(Math.max(L,-50),50),L/=50,L/Math.abs(L)+Math.round(14*L))}shouldForceSelection(A){return _.isMac?A.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:A.shiftKey}handleMouseDown(A){if(this._mouseDownTimeStamp=A.timeStamp,(A.button!==2||!this.hasSelection)&&A.button===0){if(!this._enabled){if(!this.shouldForceSelection(A))return;A.stopPropagation()}A.preventDefault(),this._dragScrollAmount=0,this._enabled&&A.shiftKey?this._handleIncrementalClick(A):A.detail===1?this._handleSingleClick(A):A.detail===2?this._handleDoubleClick(A):A.detail===3&&this._handleTripleClick(A),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(A){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(A))}_handleSingleClick(A){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(A)?3:0,this._model.selectionStart=this._getMouseBufferCoords(A),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const L=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);L&&L.length!==this._model.selectionStart[0]&&L.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(A){this._selectWordAtCursor(A,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(A){const L=this._getMouseBufferCoords(A);L&&(this._activeSelectionMode=2,this._selectLineAt(L[1]))}shouldColumnSelect(A){return A.altKey&&!(_.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(A){if(A.stopImmediatePropagation(),!this._model.selectionStart)return;const L=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(A),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(A),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const B=this._bufferService.buffer;if(this._model.selectionEnd[1]<B.lines.length){const I=B.lines.get(this._model.selectionEnd[1]);I&&I.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}L&&L[0]===this._model.selectionEnd[0]&&L[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const A=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(A.ydisp+this._bufferService.rows,A.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=A.ydisp),this.refresh()}}_handleMouseUp(A){const L=A.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&L<500&&A.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const B=this._mouseService.getCoords(A,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(B&&B[0]!==void 0&&B[1]!==void 0){const I=(0,b.moveToCellSequence)(B[0]-1,B[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const A=this._model.finalSelectionStart,L=this._model.finalSelectionEnd,B=!(!A||!L||A[0]===L[0]&&A[1]===L[1]);B?A&&L&&(this._oldSelectionStart&&this._oldSelectionEnd&&A[0]===this._oldSelectionStart[0]&&A[1]===this._oldSelectionStart[1]&&L[0]===this._oldSelectionEnd[0]&&L[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(A,L,B)):this._oldHasSelection&&this._fireOnSelectionChange(A,L,B)}_fireOnSelectionChange(A,L,B){this._oldSelectionStart=A,this._oldSelectionEnd=L,this._oldHasSelection=B,this._onSelectionChange.fire()}_handleBufferActivate(A){this.clearSelection(),this._trimListener.dispose(),this._trimListener=A.activeBuffer.lines.onTrim((L=>this._handleTrim(L)))}_convertViewportColToCharacterIndex(A,L){let B=L;for(let I=0;L>=I;I++){const U=A.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?B--:U>1&&L!==I&&(B+=U-1)}return B}setSelection(A,L,B){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[A,L],this._model.selectionStartLength=B,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(A){this._isClickInSelection(A)||(this._selectWordAtCursor(A,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(A,L,B=!0,I=!0){if(A[0]>=this._bufferService.cols)return;const U=this._bufferService.buffer,F=U.lines.get(A[1]);if(!F)return;const $=U.translateBufferLineToString(A[1],!1);let K=this._convertViewportColToCharacterIndex(F,A[0]),V=K;const W=A[0]-K;let J=0,z=0,j=0,H=0;if($.charAt(K)===" "){for(;K>0&&$.charAt(K-1)===" ";)K--;for(;V<$.length&&$.charAt(V+1)===" ";)V++}else{let Z=A[0],he=A[0];F.getWidth(Z)===0&&(J++,Z--),F.getWidth(he)===2&&(z++,he++);const _e=F.getString(he).length;for(_e>1&&(H+=_e-1,V+=_e-1);Z>0&&K>0&&!this._isCharWordSeparator(F.loadCell(Z-1,this._workCell));){F.loadCell(Z-1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,Z--):X>1&&(j+=X-1,K-=X-1),K--,Z--}for(;he<F.length&&V+1<$.length&&!this._isCharWordSeparator(F.loadCell(he+1,this._workCell));){F.loadCell(he+1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===2?(z++,he++):X>1&&(H+=X-1,V+=X-1),V++,he++}}V++;let G=K+W-J+j,N=Math.min(this._bufferService.cols,V-K+J+z-j-H);if(L||$.slice(K,V).trim()!==""){if(B&&G===0&&F.getCodePoint(0)!==32){const Z=U.lines.get(A[1]-1);if(Z&&F.isWrapped&&Z.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,A[1]-1],!1,!0,!1);if(he){const _e=this._bufferService.cols-he.start;G-=_e,N+=_e}}}if(I&&G+N===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const Z=U.lines.get(A[1]+1);if(Z!=null&&Z.isWrapped&&Z.getCodePoint(0)!==32){const he=this._getWordAt([0,A[1]+1],!1,!1,!0);he&&(N+=he.length)}}return{start:G,length:N}}}_selectWordAt(A,L){const B=this._getWordAt(A,L);if(B){for(;B.start<0;)B.start+=this._bufferService.cols,A[1]--;this._model.selectionStart=[B.start,A[1]],this._model.selectionStartLength=B.length}}_selectToWordAt(A){const L=this._getWordAt(A,!0);if(L){let B=A[1];for(;L.start<0;)L.start+=this._bufferService.cols,B--;if(!this._model.areSelectionValuesReversed())for(;L.start+L.length>this._bufferService.cols;)L.length-=this._bufferService.cols,B++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?L.start:L.start+L.length,B]}}_isCharWordSeparator(A){return A.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(A.getChars())>=0}_selectLineAt(A){const L=this._bufferService.buffer.getWrappedRangeForLine(A),B={start:{x:0,y:L.first},end:{x:this._bufferService.cols-1,y:L.last}};this._model.selectionStart=[0,L.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,g.getRangeLength)(B,this._bufferService.cols)}};a.SelectionService=R=h([m(3,k.IBufferService),m(4,k.ICoreService),m(5,E.IMouseService),m(6,k.IOptionsService),m(7,E.IRenderService),m(8,E.ICoreBrowserService)],R)},4725:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const h=c(8343);a.ICharSizeService=(0,h.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),a.IMouseService=(0,h.createDecorator)("MouseService"),a.IRenderService=(0,h.createDecorator)("RenderService"),a.ISelectionService=(0,h.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,h.createDecorator)("ThemeService"),a.ILinkProviderService=(0,h.createDecorator)("LinkProviderService")},6731:function(f,a,c){var h=this&&this.__decorate||function(R,A,L,B){var I,U=arguments.length,F=U<3?A:B===null?B=Object.getOwnPropertyDescriptor(A,L):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(R,A,L,B);else for(var $=R.length-1;$>=0;$--)(I=R[$])&&(F=(U<3?I(F):U>3?I(A,L,F):I(A,L))||F);return U>3&&F&&Object.defineProperty(A,L,F),F},m=this&&this.__param||function(R,A){return function(L,B){A(L,B,R)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const u=c(7239),b=c(8055),C=c(8460),E=c(844),x=c(2585),y=b.css.toColor("#ffffff"),_=b.css.toColor("#000000"),g=b.css.toColor("#ffffff"),S=b.css.toColor("#000000"),k={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const R=[b.css.toColor("#2e3436"),b.css.toColor("#cc0000"),b.css.toColor("#4e9a06"),b.css.toColor("#c4a000"),b.css.toColor("#3465a4"),b.css.toColor("#75507b"),b.css.toColor("#06989a"),b.css.toColor("#d3d7cf"),b.css.toColor("#555753"),b.css.toColor("#ef2929"),b.css.toColor("#8ae234"),b.css.toColor("#fce94f"),b.css.toColor("#729fcf"),b.css.toColor("#ad7fa8"),b.css.toColor("#34e2e2"),b.css.toColor("#eeeeec")],A=[0,95,135,175,215,255];for(let L=0;L<216;L++){const B=A[L/36%6|0],I=A[L/6%6|0],U=A[L%6];R.push({css:b.channels.toCss(B,I,U),rgba:b.channels.toRgba(B,I,U)})}for(let L=0;L<24;L++){const B=8+10*L;R.push({css:b.channels.toCss(B,B,B),rgba:b.channels.toRgba(B,B,B)})}return R})());let M=a.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(R){super(),this._optionsService=R,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new C.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:y,background:_,cursor:g,cursorAccent:S,selectionForeground:void 0,selectionBackgroundTransparent:k,selectionBackgroundOpaque:b.color.blend(_,k),selectionInactiveBackgroundTransparent:k,selectionInactiveBackgroundOpaque:b.color.blend(_,k),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(R={}){const A=this._colors;if(A.foreground=D(R.foreground,y),A.background=D(R.background,_),A.cursor=D(R.cursor,g),A.cursorAccent=D(R.cursorAccent,S),A.selectionBackgroundTransparent=D(R.selectionBackground,k),A.selectionBackgroundOpaque=b.color.blend(A.background,A.selectionBackgroundTransparent),A.selectionInactiveBackgroundTransparent=D(R.selectionInactiveBackground,A.selectionBackgroundTransparent),A.selectionInactiveBackgroundOpaque=b.color.blend(A.background,A.selectionInactiveBackgroundTransparent),A.selectionForeground=R.selectionForeground?D(R.selectionForeground,b.NULL_COLOR):void 0,A.selectionForeground===b.NULL_COLOR&&(A.selectionForeground=void 0),b.color.isOpaque(A.selectionBackgroundTransparent)&&(A.selectionBackgroundTransparent=b.color.opacity(A.selectionBackgroundTransparent,.3)),b.color.isOpaque(A.selectionInactiveBackgroundTransparent)&&(A.selectionInactiveBackgroundTransparent=b.color.opacity(A.selectionInactiveBackgroundTransparent,.3)),A.ansi=a.DEFAULT_ANSI_COLORS.slice(),A.ansi[0]=D(R.black,a.DEFAULT_ANSI_COLORS[0]),A.ansi[1]=D(R.red,a.DEFAULT_ANSI_COLORS[1]),A.ansi[2]=D(R.green,a.DEFAULT_ANSI_COLORS[2]),A.ansi[3]=D(R.yellow,a.DEFAULT_ANSI_COLORS[3]),A.ansi[4]=D(R.blue,a.DEFAULT_ANSI_COLORS[4]),A.ansi[5]=D(R.magenta,a.DEFAULT_ANSI_COLORS[5]),A.ansi[6]=D(R.cyan,a.DEFAULT_ANSI_COLORS[6]),A.ansi[7]=D(R.white,a.DEFAULT_ANSI_COLORS[7]),A.ansi[8]=D(R.brightBlack,a.DEFAULT_ANSI_COLORS[8]),A.ansi[9]=D(R.brightRed,a.DEFAULT_ANSI_COLORS[9]),A.ansi[10]=D(R.brightGreen,a.DEFAULT_ANSI_COLORS[10]),A.ansi[11]=D(R.brightYellow,a.DEFAULT_ANSI_COLORS[11]),A.ansi[12]=D(R.brightBlue,a.DEFAULT_ANSI_COLORS[12]),A.ansi[13]=D(R.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),A.ansi[14]=D(R.brightCyan,a.DEFAULT_ANSI_COLORS[14]),A.ansi[15]=D(R.brightWhite,a.DEFAULT_ANSI_COLORS[15]),R.extendedAnsi){const L=Math.min(A.ansi.length-16,R.extendedAnsi.length);for(let B=0;B<L;B++)A.ansi[B+16]=D(R.extendedAnsi[B],a.DEFAULT_ANSI_COLORS[B+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(R){this._restoreColor(R),this._onChangeColors.fire(this.colors)}_restoreColor(R){if(R!==void 0)switch(R){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[R]=this._restoreColors.ansi[R]}else for(let A=0;A<this._restoreColors.ansi.length;++A)this._colors.ansi[A]=this._restoreColors.ansi[A]}modifyColors(R){R(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function D(R,A){if(R!==void 0)try{return b.css.toColor(R)}catch{}return A}a.ThemeService=M=h([m(0,x.IOptionsService)],M)},6349:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=c(8460),m=c(844);class u extends m.Disposable{constructor(C){super(),this._maxLength=C,this.onDeleteEmitter=this.register(new h.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new h.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new h.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(C){if(this._maxLength===C)return;const E=new Array(C);for(let x=0;x<Math.min(C,this.length);x++)E[x]=this._array[this._getCyclicIndex(x)];this._array=E,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let E=this._length;E<C;E++)this._array[E]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,E){this._array[this._getCyclicIndex(C)]=E}push(C){this._array[this._getCyclicIndex(this._length)]=C,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(C,E,...x){if(E){for(let y=C;y<this._length-E;y++)this._array[this._getCyclicIndex(y)]=this._array[this._getCyclicIndex(y+E)];this._length-=E,this.onDeleteEmitter.fire({index:C,amount:E})}for(let y=this._length-1;y>=C;y--)this._array[this._getCyclicIndex(y+x.length)]=this._array[this._getCyclicIndex(y)];for(let y=0;y<x.length;y++)this._array[this._getCyclicIndex(C+y)]=x[y];if(x.length&&this.onInsertEmitter.fire({index:C,amount:x.length}),this._length+x.length>this._maxLength){const y=this._length+x.length-this._maxLength;this._startIndex+=y,this._length=this._maxLength,this.onTrimEmitter.fire(y)}else this._length+=x.length}trimStart(C){C>this._length&&(C=this._length),this._startIndex+=C,this._length-=C,this.onTrimEmitter.fire(C)}shiftElements(C,E,x){if(!(E<=0)){if(C<0||C>=this._length)throw new Error("start argument out of range");if(C+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let _=E-1;_>=0;_--)this.set(C+_+x,this.get(C+_));const y=C+E+x-this._length;if(y>0)for(this._length+=y;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let y=0;y<E;y++)this.set(C+y+x,this.get(C+y))}}_getCyclicIndex(C){return(this._startIndex+C)%this._maxLength}}a.CircularList=u},1439:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function c(h,m=5){if(typeof h!="object")return h;const u=Array.isArray(h)?[]:{};for(const b in h)u[b]=m<=1?h[b]:h[b]&&c(h[b],m-1);return u}},8055:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let c=0,h=0,m=0,u=0;var b,C,E,x,y;function _(S){const k=S.toString(16);return k.length<2?"0"+k:k}function g(S,k){return S<k?(k+.05)/(S+.05):(S+.05)/(k+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(S){S.toCss=function(k,M,D,R){return R!==void 0?`#${_(k)}${_(M)}${_(D)}${_(R)}`:`#${_(k)}${_(M)}${_(D)}`},S.toRgba=function(k,M,D,R=255){return(k<<24|M<<16|D<<8|R)>>>0},S.toColor=function(k,M,D,R){return{css:S.toCss(k,M,D,R),rgba:S.toRgba(k,M,D,R)}}})(b||(a.channels=b={})),(function(S){function k(M,D){return u=Math.round(255*D),[c,h,m]=y.toChannels(M.rgba),{css:b.toCss(c,h,m,u),rgba:b.toRgba(c,h,m,u)}}S.blend=function(M,D){if(u=(255&D.rgba)/255,u===1)return{css:D.css,rgba:D.rgba};const R=D.rgba>>24&255,A=D.rgba>>16&255,L=D.rgba>>8&255,B=M.rgba>>24&255,I=M.rgba>>16&255,U=M.rgba>>8&255;return c=B+Math.round((R-B)*u),h=I+Math.round((A-I)*u),m=U+Math.round((L-U)*u),{css:b.toCss(c,h,m),rgba:b.toRgba(c,h,m)}},S.isOpaque=function(M){return(255&M.rgba)==255},S.ensureContrastRatio=function(M,D,R){const A=y.ensureContrastRatio(M.rgba,D.rgba,R);if(A)return b.toColor(A>>24&255,A>>16&255,A>>8&255)},S.opaque=function(M){const D=(255|M.rgba)>>>0;return[c,h,m]=y.toChannels(D),{css:b.toCss(c,h,m),rgba:D}},S.opacity=k,S.multiplyOpacity=function(M,D){return u=255&M.rgba,k(M,u*D/255)},S.toColorRGB=function(M){return[M.rgba>>24&255,M.rgba>>16&255,M.rgba>>8&255]}})(C||(a.color=C={})),(function(S){let k,M;try{const D=document.createElement("canvas");D.width=1,D.height=1;const R=D.getContext("2d",{willReadFrequently:!0});R&&(k=R,k.globalCompositeOperation="copy",M=k.createLinearGradient(0,0,1,1))}catch{}S.toColor=function(D){if(D.match(/#[\da-f]{3,8}/i))switch(D.length){case 4:return c=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),m=parseInt(D.slice(3,4).repeat(2),16),b.toColor(c,h,m);case 5:return c=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),m=parseInt(D.slice(3,4).repeat(2),16),u=parseInt(D.slice(4,5).repeat(2),16),b.toColor(c,h,m,u);case 7:return{css:D,rgba:(parseInt(D.slice(1),16)<<8|255)>>>0};case 9:return{css:D,rgba:parseInt(D.slice(1),16)>>>0}}const R=D.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(R)return c=parseInt(R[1]),h=parseInt(R[2]),m=parseInt(R[3]),u=Math.round(255*(R[5]===void 0?1:parseFloat(R[5]))),b.toColor(c,h,m,u);if(!k||!M)throw new Error("css.toColor: Unsupported css format");if(k.fillStyle=M,k.fillStyle=D,typeof k.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(k.fillRect(0,0,1,1),[c,h,m,u]=k.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:b.toRgba(c,h,m,u),css:D}}})(E||(a.css=E={})),(function(S){function k(M,D,R){const A=M/255,L=D/255,B=R/255;return .2126*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(B<=.03928?B/12.92:Math.pow((B+.055)/1.055,2.4))}S.relativeLuminance=function(M){return k(M>>16&255,M>>8&255,255&M)},S.relativeLuminance2=k})(x||(a.rgb=x={})),(function(S){function k(D,R,A){const L=D>>24&255,B=D>>16&255,I=D>>8&255;let U=R>>24&255,F=R>>16&255,$=R>>8&255,K=g(x.relativeLuminance2(U,F,$),x.relativeLuminance2(L,B,I));for(;K<A&&(U>0||F>0||$>0);)U-=Math.max(0,Math.ceil(.1*U)),F-=Math.max(0,Math.ceil(.1*F)),$-=Math.max(0,Math.ceil(.1*$)),K=g(x.relativeLuminance2(U,F,$),x.relativeLuminance2(L,B,I));return(U<<24|F<<16|$<<8|255)>>>0}function M(D,R,A){const L=D>>24&255,B=D>>16&255,I=D>>8&255;let U=R>>24&255,F=R>>16&255,$=R>>8&255,K=g(x.relativeLuminance2(U,F,$),x.relativeLuminance2(L,B,I));for(;K<A&&(U<255||F<255||$<255);)U=Math.min(255,U+Math.ceil(.1*(255-U))),F=Math.min(255,F+Math.ceil(.1*(255-F))),$=Math.min(255,$+Math.ceil(.1*(255-$))),K=g(x.relativeLuminance2(U,F,$),x.relativeLuminance2(L,B,I));return(U<<24|F<<16|$<<8|255)>>>0}S.blend=function(D,R){if(u=(255&R)/255,u===1)return R;const A=R>>24&255,L=R>>16&255,B=R>>8&255,I=D>>24&255,U=D>>16&255,F=D>>8&255;return c=I+Math.round((A-I)*u),h=U+Math.round((L-U)*u),m=F+Math.round((B-F)*u),b.toRgba(c,h,m)},S.ensureContrastRatio=function(D,R,A){const L=x.relativeLuminance(D>>8),B=x.relativeLuminance(R>>8);if(g(L,B)<A){if(B<L){const F=k(D,R,A),$=g(L,x.relativeLuminance(F>>8));if($<A){const K=M(D,R,A);return $>g(L,x.relativeLuminance(K>>8))?F:K}return F}const I=M(D,R,A),U=g(L,x.relativeLuminance(I>>8));if(U<A){const F=k(D,R,A);return U>g(L,x.relativeLuminance(F>>8))?I:F}return I}},S.reduceLuminance=k,S.increaseLuminance=M,S.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(y||(a.rgba=y={})),a.toPaddedHex=_,a.contrastRatio=g},8969:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=c(844),m=c(2585),u=c(4348),b=c(7866),C=c(744),E=c(7302),x=c(6975),y=c(8460),_=c(1753),g=c(1480),S=c(7994),k=c(9282),M=c(5435),D=c(5981),R=c(2660);let A=!1;class L extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new y.EventEmitter),this._onScroll.event((I=>{var U;(U=this._onScrollApi)==null||U.fire(I.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(I){for(const U in I)this.optionsService.options[U]=I[U]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new h.MutableDisposable),this._onBinary=this.register(new y.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new y.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new y.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new y.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new y.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new y.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new E.OptionsService(I)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(b.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(_.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(g.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(S.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(R.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new M.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,y.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,y.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,y.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,y.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((U=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((U=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new D.WriteBuffer(((U,F)=>this._inputHandler.parse(U,F)))),this.register((0,y.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,U){this._writeBuffer.write(I,U)}writeSync(I,U){this._logService.logLevel<=m.LogLevelEnum.WARN&&!A&&(this._logService.warn("writeSync is unreliable and will be removed soon."),A=!0),this._writeBuffer.writeSync(I,U)}input(I,U=!0){this.coreService.triggerDataEvent(I,U)}resize(I,U){isNaN(I)||isNaN(U)||(I=Math.max(I,C.MINIMUM_COLS),U=Math.max(U,C.MINIMUM_ROWS),this._bufferService.resize(I,U))}scroll(I,U=!1){this._bufferService.scroll(I,U)}scrollLines(I,U,F){this._bufferService.scrollLines(I,U,F)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const U=I-this._bufferService.buffer.ydisp;U!==0&&this.scrollLines(U)}registerEscHandler(I,U){return this._inputHandler.registerEscHandler(I,U)}registerDcsHandler(I,U){return this._inputHandler.registerDcsHandler(I,U)}registerCsiHandler(I,U){return this._inputHandler.registerCsiHandler(I,U)}registerOscHandler(I,U){return this._inputHandler.registerOscHandler(I,U)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const U=this.optionsService.rawOptions.windowsPty;U&&U.buildNumber!==void 0&&U.buildNumber!==void 0?I=U.backend==="conpty"&&U.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(k.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,k.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const U of I)U.dispose()}))}}}a.CoreTerminal=L},8460:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===c)return void this._listeners.splice(h,1)}}})),this._event}fire(c,h){const m=[];for(let u=0;u<this._listeners.length;u++)m.push(this._listeners[u]);for(let u=0;u<m.length;u++)m[u].call(void 0,c,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(c,h){return c((m=>h.fire(m)))},a.runAndSubscribe=function(c,h){return h(void 0),c((m=>h(m)))}},5435:function(f,a,c){var h=this&&this.__decorate||function(J,z,j,H){var G,N=arguments.length,Z=N<3?z:H===null?H=Object.getOwnPropertyDescriptor(z,j):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(J,z,j,H);else for(var he=J.length-1;he>=0;he--)(G=J[he])&&(Z=(N<3?G(Z):N>3?G(z,j,Z):G(z,j))||Z);return N>3&&Z&&Object.defineProperty(z,j,Z),Z},m=this&&this.__param||function(J,z){return function(j,H){z(j,H,J)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const u=c(2584),b=c(7116),C=c(2015),E=c(844),x=c(482),y=c(8437),_=c(8460),g=c(643),S=c(511),k=c(3734),M=c(2585),D=c(1480),R=c(6242),A=c(6351),L=c(5941),B={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function U(J,z){if(J>24)return z.setWinLines||!1;switch(J){case 1:return!!z.restoreWin;case 2:return!!z.minimizeWin;case 3:return!!z.setWinPosition;case 4:return!!z.setWinSizePixels;case 5:return!!z.raiseWin;case 6:return!!z.lowerWin;case 7:return!!z.refreshWin;case 8:return!!z.setWinSizeChars;case 9:return!!z.maximizeWin;case 10:return!!z.fullscreenWin;case 11:return!!z.getWinState;case 13:return!!z.getWinPosition;case 14:return!!z.getWinSizePixels;case 15:return!!z.getScreenSizePixels;case 16:return!!z.getCellSizePixels;case 18:return!!z.getWinSizeChars;case 19:return!!z.getScreenSizeChars;case 20:return!!z.getIconTitle;case 21:return!!z.getWinTitle;case 22:return!!z.pushTitle;case 23:return!!z.popTitle;case 24:return!!z.setWinLines}return!1}var F;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(a.WindowsOptionsReportType=F={}));let $=0;class K extends E.Disposable{getAttrData(){return this._curAttrData}constructor(z,j,H,G,N,Z,he,_e,X=new C.EscapeSequenceParser){super(),this._bufferService=z,this._charsetService=j,this._coreService=H,this._logService=G,this._optionsService=N,this._oscLinkService=Z,this._coreMouseService=he,this._unicodeService=_e,this._parser=X,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new S.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=y.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=y.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new _.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new _.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new _.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new _.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new _.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new _.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new _.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new _.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new _.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new _.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new _.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new _.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new V(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,ce)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:ce.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,ce,te)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:ce,data:te})})),this._parser.setDcsHandlerFallback(((q,ce,te)=>{ce==="HOOK"&&(te=te.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:ce,payload:te})})),this._parser.setPrintHandler(((q,ce,te)=>this.print(q,ce,te))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!1))),this._parser.setExecuteHandler(u.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(u.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(u.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(u.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(u.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(u.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(u.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(u.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(u.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new R.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new R.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new R.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new R.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new R.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new R.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new R.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new R.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new R.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new R.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new R.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new R.OscHandler((q=>this.restoreCursorColor(q)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const q in b.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new A.DcsHandler(((q,ce)=>this.requestStatusString(q,ce))))}_preserveStack(z,j,H,G){this._parseStack.paused=!0,this._parseStack.cursorStartX=z,this._parseStack.cursorStartY=j,this._parseStack.decodedLength=H,this._parseStack.position=G}_logSlowResolvingAsync(z){this._logService.logLevel<=M.LogLevelEnum.WARN&&Promise.race([z,new Promise(((j,H)=>setTimeout((()=>H("#SLOW_TIMEOUT")),5e3)))]).catch((j=>{if(j!=="#SLOW_TIMEOUT")throw j;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(z,j){let H,G=this._activeBuffer.x,N=this._activeBuffer.y,Z=0;const he=this._parseStack.paused;if(he){if(H=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,j))return this._logSlowResolvingAsync(H),H;G=this._parseStack.cursorStartX,N=this._parseStack.cursorStartY,this._parseStack.paused=!1,z.length>I&&(Z=this._parseStack.position+I)}if(this._logService.logLevel<=M.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof z=="string"?` "${z}"`:` "${Array.prototype.map.call(z,(q=>String.fromCharCode(q))).join("")}"`),typeof z=="string"?z.split("").map((q=>q.charCodeAt(0))):z),this._parseBuffer.length<z.length&&this._parseBuffer.length<I&&(this._parseBuffer=new Uint32Array(Math.min(z.length,I))),he||this._dirtyRowTracker.clearRange(),z.length>I)for(let q=Z;q<z.length;q+=I){const ce=q+I<z.length?q+I:z.length,te=typeof z=="string"?this._stringDecoder.decode(z.substring(q,ce),this._parseBuffer):this._utf8Decoder.decode(z.subarray(q,ce),this._parseBuffer);if(H=this._parser.parse(this._parseBuffer,te))return this._preserveStack(G,N,te,q),this._logSlowResolvingAsync(H),H}else if(!he){const q=typeof z=="string"?this._stringDecoder.decode(z,this._parseBuffer):this._utf8Decoder.decode(z,this._parseBuffer);if(H=this._parser.parse(this._parseBuffer,q))return this._preserveStack(G,N,q,0),this._logSlowResolvingAsync(H),H}this._activeBuffer.x===G&&this._activeBuffer.y===N||this._onCursorMove.fire();const _e=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),X=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);X<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(X,this._bufferService.rows-1),Math.min(_e,this._bufferService.rows-1))}print(z,j,H){let G,N;const Z=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,_e=this._bufferService.cols,X=this._coreService.decPrivateModes.wraparound,q=this._coreService.modes.insertMode,ce=this._curAttrData;let te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&H-j>0&&te.getWidth(this._activeBuffer.x-1)===2&&te.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ce);let se=this._parser.precedingJoinState;for(let de=j;de<H;++de){if(G=z[de],G<127&&Z){const dt=Z[String.fromCharCode(G)];dt&&(G=dt.charCodeAt(0))}const Ce=this._unicodeService.charProperties(G,se);N=D.UnicodeService.extractWidth(Ce);const xe=D.UnicodeService.extractShouldJoin(Ce),We=xe?D.UnicodeService.extractWidth(se):0;if(se=Ce,he&&this._onA11yChar.fire((0,x.stringFromCodePoint)(G)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+N-We>_e){if(X){const dt=te;let De=this._activeBuffer.x-We;for(this._activeBuffer.x=We,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),We>0&&te instanceof y.BufferLine&&te.copyCellsFrom(dt,De,0,We,!1);De<_e;)dt.setCellFromCodepoint(De++,0,1,ce)}else if(this._activeBuffer.x=_e-1,N===2)continue}if(xe&&this._activeBuffer.x){const dt=te.getWidth(this._activeBuffer.x-1)?1:2;te.addCodepointToCell(this._activeBuffer.x-dt,G,N);for(let De=N-We;--De>=0;)te.setCellFromCodepoint(this._activeBuffer.x++,0,0,ce)}else if(q&&(te.insertCells(this._activeBuffer.x,N-We,this._activeBuffer.getNullCell(ce)),te.getWidth(_e-1)===2&&te.setCellFromCodepoint(_e-1,g.NULL_CELL_CODE,g.NULL_CELL_WIDTH,ce)),te.setCellFromCodepoint(this._activeBuffer.x++,G,N,ce),N>0)for(;--N;)te.setCellFromCodepoint(this._activeBuffer.x++,0,0,ce)}this._parser.precedingJoinState=se,this._activeBuffer.x<_e&&H-j>0&&te.getWidth(this._activeBuffer.x)===0&&!te.hasContent(this._activeBuffer.x)&&te.setCellFromCodepoint(this._activeBuffer.x,0,1,ce),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(z,j){return z.final!=="t"||z.prefix||z.intermediates?this._parser.registerCsiHandler(z,j):this._parser.registerCsiHandler(z,(H=>!U(H.params[0],this._optionsService.rawOptions.windowOptions)||j(H)))}registerDcsHandler(z,j){return this._parser.registerDcsHandler(z,new A.DcsHandler(j))}registerEscHandler(z,j){return this._parser.registerEscHandler(z,j)}registerOscHandler(z,j){return this._parser.registerOscHandler(z,new R.OscHandler(j))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var z;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&z.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);j.hasWidth(this._activeBuffer.x)&&!j.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const z=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-z),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(z=this._bufferService.cols-1){this._activeBuffer.x=Math.min(z,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(z,j){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=z,this._activeBuffer.y=this._activeBuffer.scrollTop+j):(this._activeBuffer.x=z,this._activeBuffer.y=j),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(z,j){this._restrictCursor(),this._setCursor(this._activeBuffer.x+z,this._activeBuffer.y+j)}cursorUp(z){const j=this._activeBuffer.y-this._activeBuffer.scrollTop;return j>=0?this._moveCursor(0,-Math.min(j,z.params[0]||1)):this._moveCursor(0,-(z.params[0]||1)),!0}cursorDown(z){const j=this._activeBuffer.scrollBottom-this._activeBuffer.y;return j>=0?this._moveCursor(0,Math.min(j,z.params[0]||1)):this._moveCursor(0,z.params[0]||1),!0}cursorForward(z){return this._moveCursor(z.params[0]||1,0),!0}cursorBackward(z){return this._moveCursor(-(z.params[0]||1),0),!0}cursorNextLine(z){return this.cursorDown(z),this._activeBuffer.x=0,!0}cursorPrecedingLine(z){return this.cursorUp(z),this._activeBuffer.x=0,!0}cursorCharAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(z){return this._setCursor(z.length>=2?(z.params[1]||1)-1:0,(z.params[0]||1)-1),!0}charPosAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(z){return this._moveCursor(z.params[0]||1,0),!0}linePosAbsolute(z){return this._setCursor(this._activeBuffer.x,(z.params[0]||1)-1),!0}vPositionRelative(z){return this._moveCursor(0,z.params[0]||1),!0}hVPosition(z){return this.cursorPosition(z),!0}tabClear(z){const j=z.params[0];return j===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:j===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let j=z.params[0]||1;for(;j--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let j=z.params[0]||1;for(;j--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(z){const j=z.params[0];return j===1&&(this._curAttrData.bg|=536870912),j!==2&&j!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(z,j,H,G=!1,N=!1){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);Z.replaceCells(j,H,this._activeBuffer.getNullCell(this._eraseAttrData()),N),G&&(Z.isWrapped=!1)}_resetBufferLine(z,j=!1){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);H&&(H.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),j),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+z),H.isWrapped=!1)}eraseInDisplay(z,j=!1){let H;switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:for(H=this._activeBuffer.y,this._dirtyRowTracker.markDirty(H),this._eraseInBufferLine(H++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,j);H<this._bufferService.rows;H++)this._resetBufferLine(H,j);this._dirtyRowTracker.markDirty(H);break;case 1:for(H=this._activeBuffer.y,this._dirtyRowTracker.markDirty(H),this._eraseInBufferLine(H,0,this._activeBuffer.x+1,!0,j),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(H+1).isWrapped=!1);H--;)this._resetBufferLine(H,j);this._dirtyRowTracker.markDirty(0);break;case 2:for(H=this._bufferService.rows,this._dirtyRowTracker.markDirty(H-1);H--;)this._resetBufferLine(H,j);this._dirtyRowTracker.markDirty(0);break;case 3:const G=this._activeBuffer.lines.length-this._bufferService.rows;G>0&&(this._activeBuffer.lines.trimStart(G),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-G,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-G,0),this._onScroll.fire(0))}return!0}eraseInLine(z,j=!1){switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,j);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,j);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,j)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(z){this._restrictCursor();let j=z.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=this._activeBuffer.ybase+this._activeBuffer.y,G=this._bufferService.rows-1-this._activeBuffer.scrollBottom,N=this._bufferService.rows-1+this._activeBuffer.ybase-G+1;for(;j--;)this._activeBuffer.lines.splice(N-1,1),this._activeBuffer.lines.splice(H,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(z){this._restrictCursor();let j=z.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=this._activeBuffer.ybase+this._activeBuffer.y;let G;for(G=this._bufferService.rows-1-this._activeBuffer.scrollBottom,G=this._bufferService.rows-1+this._activeBuffer.ybase-G;j--;)this._activeBuffer.lines.splice(H,1),this._activeBuffer.lines.splice(G,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(z){this._restrictCursor();const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return j&&(j.insertCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(z){this._restrictCursor();const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return j&&(j.deleteCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(z){let j=z.params[0]||1;for(;j--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(z){let j=z.params[0]||1;for(;j--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(y.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=z.params[0]||1;for(let H=this._activeBuffer.scrollTop;H<=this._activeBuffer.scrollBottom;++H){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);G.deleteCells(0,j,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=z.params[0]||1;for(let H=this._activeBuffer.scrollTop;H<=this._activeBuffer.scrollBottom;++H){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);G.insertCells(0,j,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=z.params[0]||1;for(let H=this._activeBuffer.scrollTop;H<=this._activeBuffer.scrollBottom;++H){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);G.insertCells(this._activeBuffer.x,j,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=z.params[0]||1;for(let H=this._activeBuffer.scrollTop;H<=this._activeBuffer.scrollBottom;++H){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);G.deleteCells(this._activeBuffer.x,j,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(z){this._restrictCursor();const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return j&&(j.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(z.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(z){const j=this._parser.precedingJoinState;if(!j)return!0;const H=z.params[0]||1,G=D.UnicodeService.extractWidth(j),N=this._activeBuffer.x-G,Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(N),he=new Uint32Array(Z.length*H);let _e=0;for(let q=0;q<Z.length;){const ce=Z.codePointAt(q)||0;he[_e++]=ce,q+=ce>65535?2:1}let X=_e;for(let q=1;q<H;++q)he.copyWithin(X,0,_e),X+=_e;return this.print(he,0,X),!0}sendDeviceAttributesPrimary(z){return z.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(z){return z.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(z.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(z){return(this._optionsService.rawOptions.termName+"").indexOf(z)===0}setMode(z){for(let j=0;j<z.length;j++)switch(z.params[j]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(z){for(let j=0;j<z.length;j++)switch(z.params[j]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),this._charsetService.setgCharset(1,b.DEFAULT_CHARSET),this._charsetService.setgCharset(2,b.DEFAULT_CHARSET),this._charsetService.setgCharset(3,b.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(z){for(let j=0;j<z.length;j++)switch(z.params[j]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(z){for(let j=0;j<z.length;j++)switch(z.params[j]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),z.params[j]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(z,j){const H=this._coreService.decPrivateModes,{activeProtocol:G,activeEncoding:N}=this._coreMouseService,Z=this._coreService,{buffers:he,cols:_e}=this._bufferService,{active:X,alt:q}=he,ce=this._optionsService.rawOptions,te=xe=>xe?1:2,se=z.params[0];return de=se,Ce=j?se===2?4:se===4?te(Z.modes.insertMode):se===12?3:se===20?te(ce.convertEol):0:se===1?te(H.applicationCursorKeys):se===3?ce.windowOptions.setWinLines?_e===80?2:_e===132?1:0:0:se===6?te(H.origin):se===7?te(H.wraparound):se===8?3:se===9?te(G==="X10"):se===12?te(ce.cursorBlink):se===25?te(!Z.isCursorHidden):se===45?te(H.reverseWraparound):se===66?te(H.applicationKeypad):se===67?4:se===1e3?te(G==="VT200"):se===1002?te(G==="DRAG"):se===1003?te(G==="ANY"):se===1004?te(H.sendFocus):se===1005?4:se===1006?te(N==="SGR"):se===1015?4:se===1016?te(N==="SGR_PIXELS"):se===1048?1:se===47||se===1047||se===1049?te(X===q):se===2004?te(H.bracketedPasteMode):0,Z.triggerDataEvent(`${u.C0.ESC}[${j?"":"?"}${de};${Ce}$y`),!0;var de,Ce}_updateAttrColor(z,j,H,G,N){return j===2?(z|=50331648,z&=-16777216,z|=k.AttributeData.fromColorRGB([H,G,N])):j===5&&(z&=-50331904,z|=33554432|255&H),z}_extractColor(z,j,H){const G=[0,0,-1,0,0,0];let N=0,Z=0;do{if(G[Z+N]=z.params[j+Z],z.hasSubParams(j+Z)){const he=z.getSubParams(j+Z);let _e=0;do G[1]===5&&(N=1),G[Z+_e+1+N]=he[_e];while(++_e<he.length&&_e+Z+1+N<G.length);break}if(G[1]===5&&Z+N>=2||G[1]===2&&Z+N>=5)break;G[1]&&(N=1)}while(++Z+j<z.length&&Z+N<G.length);for(let he=2;he<G.length;++he)G[he]===-1&&(G[he]=0);switch(G[0]){case 38:H.fg=this._updateAttrColor(H.fg,G[1],G[3],G[4],G[5]);break;case 48:H.bg=this._updateAttrColor(H.bg,G[1],G[3],G[4],G[5]);break;case 58:H.extended=H.extended.clone(),H.extended.underlineColor=this._updateAttrColor(H.extended.underlineColor,G[1],G[3],G[4],G[5])}return Z}_processUnderline(z,j){j.extended=j.extended.clone(),(!~z||z>5)&&(z=1),j.extended.underlineStyle=z,j.fg|=268435456,z===0&&(j.fg&=-268435457),j.updateExtended()}_processSGR0(z){z.fg=y.DEFAULT_ATTR_DATA.fg,z.bg=y.DEFAULT_ATTR_DATA.bg,z.extended=z.extended.clone(),z.extended.underlineStyle=0,z.extended.underlineColor&=-67108864,z.updateExtended()}charAttributes(z){if(z.length===1&&z.params[0]===0)return this._processSGR0(this._curAttrData),!0;const j=z.length;let H;const G=this._curAttrData;for(let N=0;N<j;N++)H=z.params[N],H>=30&&H<=37?(G.fg&=-50331904,G.fg|=16777216|H-30):H>=40&&H<=47?(G.bg&=-50331904,G.bg|=16777216|H-40):H>=90&&H<=97?(G.fg&=-50331904,G.fg|=16777224|H-90):H>=100&&H<=107?(G.bg&=-50331904,G.bg|=16777224|H-100):H===0?this._processSGR0(G):H===1?G.fg|=134217728:H===3?G.bg|=67108864:H===4?(G.fg|=268435456,this._processUnderline(z.hasSubParams(N)?z.getSubParams(N)[0]:1,G)):H===5?G.fg|=536870912:H===7?G.fg|=67108864:H===8?G.fg|=1073741824:H===9?G.fg|=2147483648:H===2?G.bg|=134217728:H===21?this._processUnderline(2,G):H===22?(G.fg&=-134217729,G.bg&=-134217729):H===23?G.bg&=-67108865:H===24?(G.fg&=-268435457,this._processUnderline(0,G)):H===25?G.fg&=-536870913:H===27?G.fg&=-67108865:H===28?G.fg&=-1073741825:H===29?G.fg&=2147483647:H===39?(G.fg&=-67108864,G.fg|=16777215&y.DEFAULT_ATTR_DATA.fg):H===49?(G.bg&=-67108864,G.bg|=16777215&y.DEFAULT_ATTR_DATA.bg):H===38||H===48||H===58?N+=this._extractColor(z,N,G):H===53?G.bg|=1073741824:H===55?G.bg&=-1073741825:H===59?(G.extended=G.extended.clone(),G.extended.underlineColor=-1,G.updateExtended()):H===100?(G.fg&=-67108864,G.fg|=16777215&y.DEFAULT_ATTR_DATA.fg,G.bg&=-67108864,G.bg|=16777215&y.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",H);return!0}deviceStatus(z){switch(z.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const j=this._activeBuffer.y+1,H=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${j};${H}R`)}return!0}deviceStatusPrivate(z){if(z.params[0]===6){const j=this._activeBuffer.y+1,H=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${j};${H}R`)}return!0}softReset(z){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=y.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(z){const j=z.params[0]||1;switch(j){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const H=j%2==1;return this._optionsService.options.cursorBlink=H,!0}setScrollRegion(z){const j=z.params[0]||1;let H;return(z.length<2||(H=z.params[1])>this._bufferService.rows||H===0)&&(H=this._bufferService.rows),H>j&&(this._activeBuffer.scrollTop=j-1,this._activeBuffer.scrollBottom=H-1,this._setCursor(0,0)),!0}windowOptions(z){if(!U(z.params[0],this._optionsService.rawOptions.windowOptions))return!0;const j=z.length>1?z.params[1]:0;switch(z.params[0]){case 14:j!==2&&this._onRequestWindowsOptionsReport.fire(F.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(F.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:j!==0&&j!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),j!==0&&j!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:j!==0&&j!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),j!==0&&j!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(z){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(z){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(z){return this._windowTitle=z,this._onTitleChange.fire(z),!0}setIconName(z){return this._iconName=z,!0}setOrReportIndexedColor(z){const j=[],H=z.split(";");for(;H.length>1;){const G=H.shift(),N=H.shift();if(/^\d+$/.exec(G)){const Z=parseInt(G);if(W(Z))if(N==="?")j.push({type:0,index:Z});else{const he=(0,L.parseColor)(N);he&&j.push({type:1,index:Z,color:he})}}}return j.length&&this._onColor.fire(j),!0}setHyperlink(z){const j=z.split(";");return!(j.length<2)&&(j[1]?this._createHyperlink(j[0],j[1]):!j[0]&&this._finishHyperlink())}_createHyperlink(z,j){this._getCurrentLinkId()&&this._finishHyperlink();const H=z.split(":");let G;const N=H.findIndex((Z=>Z.startsWith("id=")));return N!==-1&&(G=H[N].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:G,uri:j}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(z,j){const H=z.split(";");for(let G=0;G<H.length&&!(j>=this._specialColors.length);++G,++j)if(H[G]==="?")this._onColor.fire([{type:0,index:this._specialColors[j]}]);else{const N=(0,L.parseColor)(H[G]);N&&this._onColor.fire([{type:1,index:this._specialColors[j],color:N}])}return!0}setOrReportFgColor(z){return this._setOrReportSpecialColor(z,0)}setOrReportBgColor(z){return this._setOrReportSpecialColor(z,1)}setOrReportCursorColor(z){return this._setOrReportSpecialColor(z,2)}restoreIndexedColor(z){if(!z)return this._onColor.fire([{type:2}]),!0;const j=[],H=z.split(";");for(let G=0;G<H.length;++G)if(/^\d+$/.exec(H[G])){const N=parseInt(H[G]);W(N)&&j.push({type:2,index:N})}return j.length&&this._onColor.fire(j),!0}restoreFgColor(z){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(z){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(z){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),!0}selectCharset(z){return z.length!==2?(this.selectDefaultCharset(),!0):(z[0]==="/"||this._charsetService.setgCharset(B[z[0]],b.CHARSETS[z[1]]||b.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const z=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,z,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=y.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=y.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(z){return this._charsetService.setgLevel(z),!0}screenAlignmentPattern(){const z=new S.CellData;z.content=4194373,z.fg=this._curAttrData.fg,z.bg=this._curAttrData.bg,this._setCursor(0,0);for(let j=0;j<this._bufferService.rows;++j){const H=this._activeBuffer.ybase+this._activeBuffer.y+j,G=this._activeBuffer.lines.get(H);G&&(G.fill(z),G.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(z,j){const H=this._bufferService.buffer,G=this._optionsService.rawOptions;return(N=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${N}${u.C0.ESC}\\`),!0))(z==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:z==='"p'?'P1$r61;1"p':z==="r"?`P1$r${H.scrollTop+1};${H.scrollBottom+1}r`:z==="m"?"P1$r0m":z===" q"?`P1$r${{block:2,underline:4,bar:6}[G.cursorStyle]-(G.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(z,j){this._dirtyRowTracker.markRangeDirty(z,j)}}a.InputHandler=K;let V=class{constructor(J){this._bufferService=J,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(J){J<this.start?this.start=J:J>this.end&&(this.end=J)}markRangeDirty(J,z){J>z&&($=J,J=z,z=$),J<this.start&&(this.start=J),z>this.end&&(this.end=z)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function W(J){return 0<=J&&J<256}V=h([m(0,M.IBufferService)],V)},844:(f,a)=>{function c(h){for(const m of h)m.dispose();h.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const m=this._disposables.indexOf(h);m!==-1&&this._disposables.splice(m,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var m;this._isDisposed||h===this._value||((m=this._value)==null||m.dispose(),this._value=h)}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,(h=this._value)==null||h.dispose(),this._value=void 0}},a.toDisposable=function(h){return{dispose:h}},a.disposeArray=c,a.getDisposeArrayDisposable=function(h){return{dispose:()=>c(h)}}},1505:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(m,u,b){this._data[m]||(this._data[m]={}),this._data[m][u]=b}get(m,u){return this._data[m]?this._data[m][u]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(h,m,u,b,C){this._data.get(h,m)||this._data.set(h,m,new c),this._data.get(h,m).set(u,b,C)}get(h,m,u,b){var C;return(C=this._data.get(h,m))==null?void 0:C.get(u,b)}clear(){this._data.clear()}}},6114:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const c=a.isNode?"node":navigator.userAgent,h=a.isNode?"node":navigator.platform;a.isFirefox=c.includes("Firefox"),a.isLegacyEdge=c.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(c),a.getSafariVersion=function(){if(!a.isSafari)return 0;const m=c.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),a.isIpad=h==="iPad",a.isIphone=h==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),a.isLinux=h.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(c)},6106:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let c=0;a.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(c=this._search(this._getKey(h)),this._array.splice(c,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const m=this._getKey(h);if(m===void 0||(c=this._search(m),c===-1)||this._getKey(this._array[c])!==m)return!1;do if(this._array[c]===h)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===m);return!1}*getKeyIterator(h){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===h)}forEachByKey(h,m){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do m(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===h)}values(){return[...this._array].values()}_search(h){let m=0,u=this._array.length-1;for(;u>=m;){let b=m+u>>1;const C=this._getKey(this._array[b]);if(C>h)u=b-1;else{if(!(C<h)){for(;b>0&&this._getKey(this._array[b-1])===h;)b--;return b}m=b+1}}return m}}},7226:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=c(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(C){this._tasks.push(C),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(C){this._idleCallback=void 0;let E=0,x=0,y=C.timeRemaining(),_=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),x=Math.max(E,x),_=C.timeRemaining(),1.5*x>_)return y-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(y-E))}ms`),void this._start();y=_}this.clear()}}class u extends m{_requestCallback(C){return setTimeout((()=>C(this._createDeadline(16))))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const E=Date.now()+C;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}a.PriorityTaskQueue=u,a.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(b){return requestIdleCallback(b)}_cancelCallback(b){cancelIdleCallback(b)}}:u,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(b){this._queue.clear(),this._queue.enqueue(b)}flush(){this._queue.flush()}}},9282:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const h=c(643);a.updateWindowsModeWrappedState=function(m){const u=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),b=u==null?void 0:u.get(m.cols-1),C=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);C&&b&&(C.isWrapped=b[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&b[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new c;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=c;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,b=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=b}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=h},9092:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const h=c(6349),m=c(7226),u=c(3734),b=c(8437),C=c(4634),E=c(511),x=c(643),y=c(4863),_=c(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(g,S,k){this._hasScrollback=g,this._optionsService=S,this._bufferService=k,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=b.DEFAULT_ATTR_DATA.clone(),this.savedCharset=_.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=E.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new m.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(g){return g?(this._nullCell.fg=g.fg,this._nullCell.bg=g.bg,this._nullCell.extended=g.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(g){return g?(this._whitespaceCell.fg=g.fg,this._whitespaceCell.bg=g.bg,this._whitespaceCell.extended=g.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(g,S){return new b.BufferLine(this._bufferService.cols,this.getNullCell(g),S)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const g=this.ybase+this.y-this.ydisp;return g>=0&&g<this._rows}_getCorrectBufferLength(g){if(!this._hasScrollback)return g;const S=g+this._optionsService.rawOptions.scrollback;return S>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:S}fillViewportRows(g){if(this.lines.length===0){g===void 0&&(g=b.DEFAULT_ATTR_DATA);let S=this._rows;for(;S--;)this.lines.push(this.getBlankLine(g))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(g,S){const k=this.getNullCell(b.DEFAULT_ATTR_DATA);let M=0;const D=this._getCorrectBufferLength(S);if(D>this.lines.maxLength&&(this.lines.maxLength=D),this.lines.length>0){if(this._cols<g)for(let A=0;A<this.lines.length;A++)M+=+this.lines.get(A).resize(g,k);let R=0;if(this._rows<S)for(let A=this._rows;A<S;A++)this.lines.length<S+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new b.BufferLine(g,k)):this.ybase>0&&this.lines.length<=this.ybase+this.y+R+1?(this.ybase--,R++,this.ydisp>0&&this.ydisp--):this.lines.push(new b.BufferLine(g,k)));else for(let A=this._rows;A>S;A--)this.lines.length>S+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(D<this.lines.maxLength){const A=this.lines.length-D;A>0&&(this.lines.trimStart(A),this.ybase=Math.max(this.ybase-A,0),this.ydisp=Math.max(this.ydisp-A,0),this.savedY=Math.max(this.savedY-A,0)),this.lines.maxLength=D}this.x=Math.min(this.x,g-1),this.y=Math.min(this.y,S-1),R&&(this.y+=R),this.savedX=Math.min(this.savedX,g-1),this.scrollTop=0}if(this.scrollBottom=S-1,this._isReflowEnabled&&(this._reflow(g,S),this._cols>g))for(let R=0;R<this.lines.length;R++)M+=+this.lines.get(R).resize(g,k);this._cols=g,this._rows=S,this._memoryCleanupQueue.clear(),M>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let g=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,g=!1);let S=0;for(;this._memoryCleanupPosition<this.lines.length;)if(S+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),S>100)return!0;return g}get _isReflowEnabled(){const g=this._optionsService.rawOptions.windowsPty;return g&&g.buildNumber?this._hasScrollback&&g.backend==="conpty"&&g.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(g,S){this._cols!==g&&(g>this._cols?this._reflowLarger(g,S):this._reflowSmaller(g,S))}_reflowLarger(g,S){const k=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,g,this.ybase+this.y,this.getNullCell(b.DEFAULT_ATTR_DATA));if(k.length>0){const M=(0,C.reflowLargerCreateNewLayout)(this.lines,k);(0,C.reflowLargerApplyNewLayout)(this.lines,M.layout),this._reflowLargerAdjustViewport(g,S,M.countRemoved)}}_reflowLargerAdjustViewport(g,S,k){const M=this.getNullCell(b.DEFAULT_ATTR_DATA);let D=k;for(;D-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<S&&this.lines.push(new b.BufferLine(g,M))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-k,0)}_reflowSmaller(g,S){const k=this.getNullCell(b.DEFAULT_ATTR_DATA),M=[];let D=0;for(let R=this.lines.length-1;R>=0;R--){let A=this.lines.get(R);if(!A||!A.isWrapped&&A.getTrimmedLength()<=g)continue;const L=[A];for(;A.isWrapped&&R>0;)A=this.lines.get(--R),L.unshift(A);const B=this.ybase+this.y;if(B>=R&&B<R+L.length)continue;const I=L[L.length-1].getTrimmedLength(),U=(0,C.reflowSmallerGetNewLineLengths)(L,this._cols,g),F=U.length-L.length;let $;$=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+F):Math.max(0,this.lines.length-this.lines.maxLength+F);const K=[];for(let H=0;H<F;H++){const G=this.getBlankLine(b.DEFAULT_ATTR_DATA,!0);K.push(G)}K.length>0&&(M.push({start:R+L.length+D,newLines:K}),D+=K.length),L.push(...K);let V=U.length-1,W=U[V];W===0&&(V--,W=U[V]);let J=L.length-F-1,z=I;for(;J>=0;){const H=Math.min(z,W);if(L[V]===void 0)break;if(L[V].copyCellsFrom(L[J],z-H,W-H,H,!0),W-=H,W===0&&(V--,W=U[V]),z-=H,z===0){J--;const G=Math.max(J,0);z=(0,C.getWrappedLineTrimmedLength)(L,G,this._cols)}}for(let H=0;H<L.length;H++)U[H]<g&&L[H].setCell(U[H],k);let j=F-$;for(;j-- >0;)this.ybase===0?this.y<S-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+D)-S&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+F,this.ybase+S-1)}if(M.length>0){const R=[],A=[];for(let V=0;V<this.lines.length;V++)A.push(this.lines.get(V));const L=this.lines.length;let B=L-1,I=0,U=M[I];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+D);let F=0;for(let V=Math.min(this.lines.maxLength-1,L+D-1);V>=0;V--)if(U&&U.start>B+F){for(let W=U.newLines.length-1;W>=0;W--)this.lines.set(V--,U.newLines[W]);V++,R.push({index:B+1,amount:U.newLines.length}),F+=U.newLines.length,U=M[++I]}else this.lines.set(V,A[B--]);let $=0;for(let V=R.length-1;V>=0;V--)R[V].index+=$,this.lines.onInsertEmitter.fire(R[V]),$+=R[V].amount;const K=Math.max(0,L+D-this.lines.maxLength);K>0&&this.lines.onTrimEmitter.fire(K)}}translateBufferLineToString(g,S,k=0,M){const D=this.lines.get(g);return D?D.translateToString(S,k,M):""}getWrappedRangeForLine(g){let S=g,k=g;for(;S>0&&this.lines.get(S).isWrapped;)S--;for(;k+1<this.lines.length&&this.lines.get(k+1).isWrapped;)k++;return{first:S,last:k}}setupTabStops(g){for(g!=null?this.tabs[g]||(g=this.prevStop(g)):(this.tabs={},g=0);g<this._cols;g+=this._optionsService.rawOptions.tabStopWidth)this.tabs[g]=!0}prevStop(g){for(g==null&&(g=this.x);!this.tabs[--g]&&g>0;);return g>=this._cols?this._cols-1:g<0?0:g}nextStop(g){for(g==null&&(g=this.x);!this.tabs[++g]&&g<this._cols;);return g>=this._cols?this._cols-1:g<0?0:g}clearMarkers(g){this._isClearing=!0;for(let S=0;S<this.markers.length;S++)this.markers[S].line===g&&(this.markers[S].dispose(),this.markers.splice(S--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].dispose(),this.markers.splice(g--,1);this._isClearing=!1}addMarker(g){const S=new y.Marker(g);return this.markers.push(S),S.register(this.lines.onTrim((k=>{S.line-=k,S.line<0&&S.dispose()}))),S.register(this.lines.onInsert((k=>{S.line>=k.index&&(S.line+=k.amount)}))),S.register(this.lines.onDelete((k=>{S.line>=k.index&&S.line<k.index+k.amount&&S.dispose(),S.line>k.index&&(S.line-=k.amount)}))),S.register(S.onDispose((()=>this._removeMarker(S)))),S}_removeMarker(g){this._isClearing||this.markers.splice(this.markers.indexOf(g),1)}}},8437:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const h=c(3734),m=c(511),u=c(643),b=c(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let C=0;class E{constructor(y,_,g=!1){this.isWrapped=g,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*y);const S=_||m.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let k=0;k<y;++k)this.setCell(k,S);this.length=y}get(y){const _=this._data[3*y+0],g=2097151&_;return[this._data[3*y+1],2097152&_?this._combined[y]:g?(0,b.stringFromCodePoint)(g):"",_>>22,2097152&_?this._combined[y].charCodeAt(this._combined[y].length-1):g]}set(y,_){this._data[3*y+1]=_[u.CHAR_DATA_ATTR_INDEX],_[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[y]=_[1],this._data[3*y+0]=2097152|y|_[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*y+0]=_[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|_[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(y){return this._data[3*y+0]>>22}hasWidth(y){return 12582912&this._data[3*y+0]}getFg(y){return this._data[3*y+1]}getBg(y){return this._data[3*y+2]}hasContent(y){return 4194303&this._data[3*y+0]}getCodePoint(y){const _=this._data[3*y+0];return 2097152&_?this._combined[y].charCodeAt(this._combined[y].length-1):2097151&_}isCombined(y){return 2097152&this._data[3*y+0]}getString(y){const _=this._data[3*y+0];return 2097152&_?this._combined[y]:2097151&_?(0,b.stringFromCodePoint)(2097151&_):""}isProtected(y){return 536870912&this._data[3*y+2]}loadCell(y,_){return C=3*y,_.content=this._data[C+0],_.fg=this._data[C+1],_.bg=this._data[C+2],2097152&_.content&&(_.combinedData=this._combined[y]),268435456&_.bg&&(_.extended=this._extendedAttrs[y]),_}setCell(y,_){2097152&_.content&&(this._combined[y]=_.combinedData),268435456&_.bg&&(this._extendedAttrs[y]=_.extended),this._data[3*y+0]=_.content,this._data[3*y+1]=_.fg,this._data[3*y+2]=_.bg}setCellFromCodepoint(y,_,g,S){268435456&S.bg&&(this._extendedAttrs[y]=S.extended),this._data[3*y+0]=_|g<<22,this._data[3*y+1]=S.fg,this._data[3*y+2]=S.bg}addCodepointToCell(y,_,g){let S=this._data[3*y+0];2097152&S?this._combined[y]+=(0,b.stringFromCodePoint)(_):2097151&S?(this._combined[y]=(0,b.stringFromCodePoint)(2097151&S)+(0,b.stringFromCodePoint)(_),S&=-2097152,S|=2097152):S=_|4194304,g&&(S&=-12582913,S|=g<<22),this._data[3*y+0]=S}insertCells(y,_,g){if((y%=this.length)&&this.getWidth(y-1)===2&&this.setCellFromCodepoint(y-1,0,1,g),_<this.length-y){const S=new m.CellData;for(let k=this.length-y-_-1;k>=0;--k)this.setCell(y+_+k,this.loadCell(y+k,S));for(let k=0;k<_;++k)this.setCell(y+k,g)}else for(let S=y;S<this.length;++S)this.setCell(S,g);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,g)}deleteCells(y,_,g){if(y%=this.length,_<this.length-y){const S=new m.CellData;for(let k=0;k<this.length-y-_;++k)this.setCell(y+k,this.loadCell(y+_+k,S));for(let k=this.length-_;k<this.length;++k)this.setCell(k,g)}else for(let S=y;S<this.length;++S)this.setCell(S,g);y&&this.getWidth(y-1)===2&&this.setCellFromCodepoint(y-1,0,1,g),this.getWidth(y)!==0||this.hasContent(y)||this.setCellFromCodepoint(y,0,1,g)}replaceCells(y,_,g,S=!1){if(S)for(y&&this.getWidth(y-1)===2&&!this.isProtected(y-1)&&this.setCellFromCodepoint(y-1,0,1,g),_<this.length&&this.getWidth(_-1)===2&&!this.isProtected(_)&&this.setCellFromCodepoint(_,0,1,g);y<_&&y<this.length;)this.isProtected(y)||this.setCell(y,g),y++;else for(y&&this.getWidth(y-1)===2&&this.setCellFromCodepoint(y-1,0,1,g),_<this.length&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_,0,1,g);y<_&&y<this.length;)this.setCell(y++,g)}resize(y,_){if(y===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const g=3*y;if(y>this.length){if(this._data.buffer.byteLength>=4*g)this._data=new Uint32Array(this._data.buffer,0,g);else{const S=new Uint32Array(g);S.set(this._data),this._data=S}for(let S=this.length;S<y;++S)this.setCell(S,_)}else{this._data=this._data.subarray(0,g);const S=Object.keys(this._combined);for(let M=0;M<S.length;M++){const D=parseInt(S[M],10);D>=y&&delete this._combined[D]}const k=Object.keys(this._extendedAttrs);for(let M=0;M<k.length;M++){const D=parseInt(k[M],10);D>=y&&delete this._extendedAttrs[D]}}return this.length=y,4*g*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const y=new Uint32Array(this._data.length);return y.set(this._data),this._data=y,1}return 0}fill(y,_=!1){if(_)for(let g=0;g<this.length;++g)this.isProtected(g)||this.setCell(g,y);else{this._combined={},this._extendedAttrs={};for(let g=0;g<this.length;++g)this.setCell(g,y)}}copyFrom(y){this.length!==y.length?this._data=new Uint32Array(y._data):this._data.set(y._data),this.length=y.length,this._combined={};for(const _ in y._combined)this._combined[_]=y._combined[_];this._extendedAttrs={};for(const _ in y._extendedAttrs)this._extendedAttrs[_]=y._extendedAttrs[_];this.isWrapped=y.isWrapped}clone(){const y=new E(0);y._data=new Uint32Array(this._data),y.length=this.length;for(const _ in this._combined)y._combined[_]=this._combined[_];for(const _ in this._extendedAttrs)y._extendedAttrs[_]=this._extendedAttrs[_];return y.isWrapped=this.isWrapped,y}getTrimmedLength(){for(let y=this.length-1;y>=0;--y)if(4194303&this._data[3*y+0])return y+(this._data[3*y+0]>>22);return 0}getNoBgTrimmedLength(){for(let y=this.length-1;y>=0;--y)if(4194303&this._data[3*y+0]||50331648&this._data[3*y+2])return y+(this._data[3*y+0]>>22);return 0}copyCellsFrom(y,_,g,S,k){const M=y._data;if(k)for(let R=S-1;R>=0;R--){for(let A=0;A<3;A++)this._data[3*(g+R)+A]=M[3*(_+R)+A];268435456&M[3*(_+R)+2]&&(this._extendedAttrs[g+R]=y._extendedAttrs[_+R])}else for(let R=0;R<S;R++){for(let A=0;A<3;A++)this._data[3*(g+R)+A]=M[3*(_+R)+A];268435456&M[3*(_+R)+2]&&(this._extendedAttrs[g+R]=y._extendedAttrs[_+R])}const D=Object.keys(y._combined);for(let R=0;R<D.length;R++){const A=parseInt(D[R],10);A>=_&&(this._combined[A-_+g]=y._combined[A])}}translateToString(y,_,g,S){_=_??0,g=g??this.length,y&&(g=Math.min(g,this.getTrimmedLength())),S&&(S.length=0);let k="";for(;_<g;){const M=this._data[3*_+0],D=2097151&M,R=2097152&M?this._combined[_]:D?(0,b.stringFromCodePoint)(D):u.WHITESPACE_CELL_CHAR;if(k+=R,S)for(let A=0;A<R.length;++A)S.push(_);_+=M>>22||1}return S&&S.push(_),k}}a.BufferLine=E},4841:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(c,h){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return h*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(f,a)=>{function c(h,m,u){if(m===h.length-1)return h[m].getTrimmedLength();const b=!h[m].hasContent(u-1)&&h[m].getWidth(u-1)===1,C=h[m+1].getWidth(0)===2;return b&&C?u-1:u}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(h,m,u,b,C){const E=[];for(let x=0;x<h.length-1;x++){let y=x,_=h.get(++y);if(!_.isWrapped)continue;const g=[h.get(x)];for(;y<h.length&&_.isWrapped;)g.push(_),_=h.get(++y);if(b>=x&&b<y){x+=g.length-1;continue}let S=0,k=c(g,S,m),M=1,D=0;for(;M<g.length;){const A=c(g,M,m),L=A-D,B=u-k,I=Math.min(L,B);g[S].copyCellsFrom(g[M],D,k,I,!1),k+=I,k===u&&(S++,k=0),D+=I,D===A&&(M++,D=0),k===0&&S!==0&&g[S-1].getWidth(u-1)===2&&(g[S].copyCellsFrom(g[S-1],u-1,k++,1,!1),g[S-1].setCell(u-1,C))}g[S].replaceCells(k,u,C);let R=0;for(let A=g.length-1;A>0&&(A>S||g[A].getTrimmedLength()===0);A--)R++;R>0&&(E.push(x+g.length-R),E.push(R)),x+=g.length-1}return E},a.reflowLargerCreateNewLayout=function(h,m){const u=[];let b=0,C=m[b],E=0;for(let x=0;x<h.length;x++)if(C===x){const y=m[++b];h.onDeleteEmitter.fire({index:x-E,amount:y}),x+=y-1,E+=y,C=m[++b]}else u.push(x);return{layout:u,countRemoved:E}},a.reflowLargerApplyNewLayout=function(h,m){const u=[];for(let b=0;b<m.length;b++)u.push(h.get(m[b]));for(let b=0;b<u.length;b++)h.set(b,u[b]);h.length=m.length},a.reflowSmallerGetNewLineLengths=function(h,m,u){const b=[],C=h.map(((_,g)=>c(h,g,m))).reduce(((_,g)=>_+g));let E=0,x=0,y=0;for(;y<C;){if(C-y<u){b.push(C-y);break}E+=u;const _=c(h,x,m);E>_&&(E-=_,x++);const g=h[x].getWidth(E-1)===2;g&&E--;const S=g?u-1:u;b.push(S),y+=S}return b},a.getWrappedLineTrimmedLength=c},5295:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const h=c(8460),m=c(844),u=c(9092);class b extends m.Disposable{constructor(E,x){super(),this._optionsService=E,this._bufferService=x,this._onBufferActivate=this.register(new h.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(E,x){this._normal.resize(E,x),this._alt.resize(E,x),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}a.BufferSet=b},511:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=c(482),m=c(643),u=c(3734);class b extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const x=new b;return x.setFromCharData(E),x}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(E){this.fg=E[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(E[m.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(E[m.CHAR_DATA_CHAR_INDEX].length===2){const y=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=y&&y<=56319){const _=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=_&&_<=57343?this.content=1024*(y-55296)+_-56320+65536|E[m.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[m.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=E[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=b},643:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const h=c(8460),m=c(844);class u{get id(){return this._id}constructor(C){this.line=C,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new h.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,m.disposeArray)(this._disposables),this._disposables.length=0)}register(C){return this._disposables.push(C),C}}a.Marker=u,u._nextId=1},7116:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(f,a)=>{var c,h,m;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
58
+ `,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""})(c||(a.C0=c={})),(function(u){u.PAD="€",u.HOP="",u.BPH="‚",u.NBH="ƒ",u.IND="„",u.NEL="…",u.SSA="†",u.ESA="‡",u.HTS="ˆ",u.HTJ="‰",u.VTS="Š",u.PLD="‹",u.PLU="Œ",u.RI="",u.SS2="Ž",u.SS3="",u.DCS="",u.PU1="‘",u.PU2="’",u.STS="“",u.CCH="”",u.MW="•",u.SPA="–",u.EPA="—",u.SOS="˜",u.SGCI="™",u.SCI="š",u.CSI="›",u.ST="œ",u.OSC="",u.PM="ž",u.APC="Ÿ"})(h||(a.C1=h={})),(function(u){u.ST=`${c.ESC}\\`})(m||(a.C1_ESCAPED=m={}))},7399:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=c(2584),m={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(u,b,C,E){const x={type:0,cancel:!1,key:void 0},y=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?x.key=b?h.C0.ESC+"OA":h.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?x.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?x.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(x.key=b?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:x.key=u.ctrlKey?"\b":h.C0.DEL,u.altKey&&(x.key=h.C0.ESC+x.key);break;case 9:if(u.shiftKey){x.key=h.C0.ESC+"[Z";break}x.key=h.C0.HT,x.cancel=!0;break;case 13:x.key=u.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,x.cancel=!0;break;case 27:x.key=h.C0.ESC,u.altKey&&(x.key=h.C0.ESC+h.C0.ESC),x.cancel=!0;break;case 37:if(u.metaKey)break;y?(x.key=h.C0.ESC+"[1;"+(y+1)+"D",x.key===h.C0.ESC+"[1;3D"&&(x.key=h.C0.ESC+(C?"b":"[1;5D"))):x.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(u.metaKey)break;y?(x.key=h.C0.ESC+"[1;"+(y+1)+"C",x.key===h.C0.ESC+"[1;3C"&&(x.key=h.C0.ESC+(C?"f":"[1;5C"))):x.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(u.metaKey)break;y?(x.key=h.C0.ESC+"[1;"+(y+1)+"A",C||x.key!==h.C0.ESC+"[1;3A"||(x.key=h.C0.ESC+"[1;5A")):x.key=b?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(u.metaKey)break;y?(x.key=h.C0.ESC+"[1;"+(y+1)+"B",C||x.key!==h.C0.ESC+"[1;3B"||(x.key=h.C0.ESC+"[1;5B")):x.key=b?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(x.key=h.C0.ESC+"[2~");break;case 46:x.key=y?h.C0.ESC+"[3;"+(y+1)+"~":h.C0.ESC+"[3~";break;case 36:x.key=y?h.C0.ESC+"[1;"+(y+1)+"H":b?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:x.key=y?h.C0.ESC+"[1;"+(y+1)+"F":b?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:u.shiftKey?x.type=2:u.ctrlKey?x.key=h.C0.ESC+"[5;"+(y+1)+"~":x.key=h.C0.ESC+"[5~";break;case 34:u.shiftKey?x.type=3:u.ctrlKey?x.key=h.C0.ESC+"[6;"+(y+1)+"~":x.key=h.C0.ESC+"[6~";break;case 112:x.key=y?h.C0.ESC+"[1;"+(y+1)+"P":h.C0.ESC+"OP";break;case 113:x.key=y?h.C0.ESC+"[1;"+(y+1)+"Q":h.C0.ESC+"OQ";break;case 114:x.key=y?h.C0.ESC+"[1;"+(y+1)+"R":h.C0.ESC+"OR";break;case 115:x.key=y?h.C0.ESC+"[1;"+(y+1)+"S":h.C0.ESC+"OS";break;case 116:x.key=y?h.C0.ESC+"[15;"+(y+1)+"~":h.C0.ESC+"[15~";break;case 117:x.key=y?h.C0.ESC+"[17;"+(y+1)+"~":h.C0.ESC+"[17~";break;case 118:x.key=y?h.C0.ESC+"[18;"+(y+1)+"~":h.C0.ESC+"[18~";break;case 119:x.key=y?h.C0.ESC+"[19;"+(y+1)+"~":h.C0.ESC+"[19~";break;case 120:x.key=y?h.C0.ESC+"[20;"+(y+1)+"~":h.C0.ESC+"[20~";break;case 121:x.key=y?h.C0.ESC+"[21;"+(y+1)+"~":h.C0.ESC+"[21~";break;case 122:x.key=y?h.C0.ESC+"[23;"+(y+1)+"~":h.C0.ESC+"[23~";break;case 123:x.key=y?h.C0.ESC+"[24;"+(y+1)+"~":h.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(C&&!E||!u.altKey||u.metaKey)!C||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?x.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(x.key=h.C0.US),u.key==="@"&&(x.key=h.C0.NUL)):u.keyCode===65&&(x.type=1);else{const _=m[u.keyCode],g=_==null?void 0:_[u.shiftKey?1:0];if(g)x.key=h.C0.ESC+g;else if(u.keyCode>=65&&u.keyCode<=90){const S=u.ctrlKey?u.keyCode-64:u.keyCode+32;let k=String.fromCharCode(S);u.shiftKey&&(k=k.toUpperCase()),x.key=h.C0.ESC+k}else if(u.keyCode===32)x.key=h.C0.ESC+(u.ctrlKey?h.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let S=u.code.slice(3,4);u.shiftKey||(S=S.toLowerCase()),x.key=h.C0.ESC+S,x.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?x.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?x.key=h.C0.NUL:u.keyCode>=51&&u.keyCode<=55?x.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?x.key=h.C0.DEL:u.keyCode===219?x.key=h.C0.ESC:u.keyCode===220?x.key=h.C0.FS:u.keyCode===221&&(x.key=h.C0.GS)}return x}},482:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},a.utf32ToString=function(c,h=0,m=c.length){let u="";for(let b=h;b<m;++b){let C=c[b];C>65535?(C-=65536,u+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):u+=String.fromCharCode(C)}return u},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,h){const m=c.length;if(!m)return 0;let u=0,b=0;if(this._interim){const C=c.charCodeAt(b++);56320<=C&&C<=57343?h[u++]=1024*(this._interim-55296)+C-56320+65536:(h[u++]=this._interim,h[u++]=C),this._interim=0}for(let C=b;C<m;++C){const E=c.charCodeAt(C);if(55296<=E&&E<=56319){if(++C>=m)return this._interim=E,u;const x=c.charCodeAt(C);56320<=x&&x<=57343?h[u++]=1024*(E-55296)+x-56320+65536:(h[u++]=E,h[u++]=x)}else E!==65279&&(h[u++]=E)}return u}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,h){const m=c.length;if(!m)return 0;let u,b,C,E,x=0,y=0,_=0;if(this.interim[0]){let k=!1,M=this.interim[0];M&=(224&M)==192?31:(240&M)==224?15:7;let D,R=0;for(;(D=63&this.interim[++R])&&R<4;)M<<=6,M|=D;const A=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=A-R;for(;_<L;){if(_>=m)return 0;if(D=c[_++],(192&D)!=128){_--,k=!0;break}this.interim[R++]=D,M<<=6,M|=63&D}k||(A===2?M<128?_--:h[x++]=M:A===3?M<2048||M>=55296&&M<=57343||M===65279||(h[x++]=M):M<65536||M>1114111||(h[x++]=M)),this.interim.fill(0)}const g=m-4;let S=_;for(;S<m;){for(;!(!(S<g)||128&(u=c[S])||128&(b=c[S+1])||128&(C=c[S+2])||128&(E=c[S+3]));)h[x++]=u,h[x++]=b,h[x++]=C,h[x++]=E,S+=4;if(u=c[S++],u<128)h[x++]=u;else if((224&u)==192){if(S>=m)return this.interim[0]=u,x;if(b=c[S++],(192&b)!=128){S--;continue}if(y=(31&u)<<6|63&b,y<128){S--;continue}h[x++]=y}else if((240&u)==224){if(S>=m)return this.interim[0]=u,x;if(b=c[S++],(192&b)!=128){S--;continue}if(S>=m)return this.interim[0]=u,this.interim[1]=b,x;if(C=c[S++],(192&C)!=128){S--;continue}if(y=(15&u)<<12|(63&b)<<6|63&C,y<2048||y>=55296&&y<=57343||y===65279)continue;h[x++]=y}else if((248&u)==240){if(S>=m)return this.interim[0]=u,x;if(b=c[S++],(192&b)!=128){S--;continue}if(S>=m)return this.interim[0]=u,this.interim[1]=b,x;if(C=c[S++],(192&C)!=128){S--;continue}if(S>=m)return this.interim[0]=u,this.interim[1]=b,this.interim[2]=C,x;if(E=c[S++],(192&E)!=128){S--;continue}if(y=(7&u)<<18|(63&b)<<12|(63&C)<<6|63&E,y<65536||y>1114111)continue;h[x++]=y}}return x}}},225:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const h=c(1480),m=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let b;a.UnicodeV6=class{constructor(){if(this.version="6",!b){b=new Uint8Array(65536),b.fill(1),b[0]=0,b.fill(0,1,32),b.fill(0,127,160),b.fill(2,4352,4448),b[9001]=2,b[9002]=2,b.fill(2,11904,42192),b[12351]=1,b.fill(2,44032,55204),b.fill(2,63744,64256),b.fill(2,65040,65050),b.fill(2,65072,65136),b.fill(2,65280,65377),b.fill(2,65504,65511);for(let C=0;C<m.length;++C)b.fill(0,m[C][0],m[C][1]+1)}}wcwidth(C){return C<32?0:C<127?1:C<65536?b[C]:(function(E,x){let y,_=0,g=x.length-1;if(E<x[0][0]||E>x[g][1])return!1;for(;g>=_;)if(y=_+g>>1,E>x[y][1])_=y+1;else{if(!(E<x[y][0]))return!0;g=y-1}return!1})(C,u)?0:C>=131072&&C<=196605||C>=196608&&C<=262141?2:1}charProperties(C,E){let x=this.wcwidth(C),y=x===0&&E!==0;if(y){const _=h.UnicodeService.extractWidth(E);_===0?y=!1:_>x&&(x=_)}return h.UnicodeService.createPropertyValue(0,x,y)}}},5981:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const h=c(8460),m=c(844);class u extends m.Disposable{constructor(C){super(),this._action=C,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(C,E){if(E!==void 0&&this._syncCalls>E)return void(this._syncCalls=0);if(this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);const y=this._callbacks.shift();y&&y()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(C,E){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(E),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(E)}_innerWrite(C=0,E=!0){const x=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const y=this._writeBuffer[this._bufferOffset],_=this._action(y,E);if(_){const S=k=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,k))):this._innerWrite(x,k);return void _.catch((k=>(queueMicrotask((()=>{throw k})),Promise.resolve(!1)))).then(S)}const g=this._callbacks[this._bufferOffset];if(g&&g(),this._bufferOffset++,this._pendingData-=y.length,Date.now()-x>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=u},5941:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const c=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,h=/^[\da-f]+$/;function m(u,b){const C=u.toString(16),E=C.length<2?"0"+C:C;switch(b){case 4:return C[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}a.parseColor=function(u){if(!u)return;let b=u.toLowerCase();if(b.indexOf("rgb:")===0){b=b.slice(4);const C=c.exec(b);if(C){const E=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/E*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/E*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/E*255)]}}else if(b.indexOf("#")===0&&(b=b.slice(1),h.exec(b)&&[3,6,9,12].includes(b.length))){const C=b.length/3,E=[0,0,0];for(let x=0;x<3;++x){const y=parseInt(b.slice(C*x,C*x+C),16);E[x]=C===1?y<<4:C===2?y:C===3?y>>4:y>>8}return E}},a.toRgbString=function(u,b=16){const[C,E,x]=u;return`rgb:${m(C,b)}/${m(E,b)}/${m(x,b)}`}},5770:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const h=c(482),m=c(8742),u=c(5770),b=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=b,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=b}registerHandler(E,x){this._handlers[E]===void 0&&(this._handlers[E]=[]);const y=this._handlers[E];return y.push(x),{dispose:()=>{const _=y.indexOf(x);_!==-1&&y.splice(_,1)}}}clearHandler(E){this._handlers[E]&&delete this._handlers[E]}setHandlerFallback(E){this._handlerFb=E}reset(){if(this._active.length)for(let E=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;E>=0;--E)this._active[E].unhook(!1);this._stack.paused=!1,this._active=b,this._ident=0}hook(E,x){if(this.reset(),this._ident=E,this._active=this._handlers[E]||b,this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(E,x,y){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(E,x,y);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(E,x,y))}unhook(E,x=!0){if(this._active.length){let y=!1,_=this._active.length-1,g=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,y=x,g=this._stack.fallThrough,this._stack.paused=!1),!g&&y===!1){for(;_>=0&&(y=this._active[_].unhook(E),y!==!0);_--)if(y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,y;_--}for(;_>=0;_--)if(y=this._active[_].unhook(!1),y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,y}else this._handlerFb(this._ident,"UNHOOK",E);this._active=b,this._ident=0}};const C=new m.Params;C.addParam(0),a.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=C,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():C,this._data="",this._hitLimit=!1}put(E,x,y){this._hitLimit||(this._data+=(0,h.utf32ToString)(E,x,y),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let x=!1;if(this._hitLimit)x=!1;else if(E&&(x=this._handler(this._data,this._params),x instanceof Promise))return x.then((y=>(this._params=C,this._data="",this._hitLimit=!1,y)));return this._params=C,this._data="",this._hitLimit=!1,x}}},2015:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const h=c(844),m=c(8742),u=c(6242),b=c(6351);class C{constructor(_){this.table=new Uint8Array(_)}setDefault(_,g){this.table.fill(_<<4|g)}add(_,g,S,k){this.table[g<<8|_]=S<<4|k}addMany(_,g,S,k){for(let M=0;M<_.length;M++)this.table[g<<8|_[M]]=S<<4|k}}a.TransitionTable=C;const E=160;a.VT500_TRANSITION_TABLE=(function(){const y=new C(4095),_=Array.apply(null,Array(256)).map(((R,A)=>A)),g=(R,A)=>_.slice(R,A),S=g(32,127),k=g(0,24);k.push(25),k.push.apply(k,g(28,32));const M=g(0,14);let D;for(D in y.setDefault(1,0),y.addMany(S,0,2,0),M)y.addMany([24,26,153,154],D,3,0),y.addMany(g(128,144),D,3,0),y.addMany(g(144,152),D,3,0),y.add(156,D,0,0),y.add(27,D,11,1),y.add(157,D,4,8),y.addMany([152,158,159],D,0,7),y.add(155,D,11,3),y.add(144,D,11,9);return y.addMany(k,0,3,0),y.addMany(k,1,3,1),y.add(127,1,0,1),y.addMany(k,8,0,8),y.addMany(k,3,3,3),y.add(127,3,0,3),y.addMany(k,4,3,4),y.add(127,4,0,4),y.addMany(k,6,3,6),y.addMany(k,5,3,5),y.add(127,5,0,5),y.addMany(k,2,3,2),y.add(127,2,0,2),y.add(93,1,4,8),y.addMany(S,8,5,8),y.add(127,8,5,8),y.addMany([156,27,24,26,7],8,6,0),y.addMany(g(28,32),8,0,8),y.addMany([88,94,95],1,0,7),y.addMany(S,7,0,7),y.addMany(k,7,0,7),y.add(156,7,0,0),y.add(127,7,0,7),y.add(91,1,11,3),y.addMany(g(64,127),3,7,0),y.addMany(g(48,60),3,8,4),y.addMany([60,61,62,63],3,9,4),y.addMany(g(48,60),4,8,4),y.addMany(g(64,127),4,7,0),y.addMany([60,61,62,63],4,0,6),y.addMany(g(32,64),6,0,6),y.add(127,6,0,6),y.addMany(g(64,127),6,0,0),y.addMany(g(32,48),3,9,5),y.addMany(g(32,48),5,9,5),y.addMany(g(48,64),5,0,6),y.addMany(g(64,127),5,7,0),y.addMany(g(32,48),4,9,5),y.addMany(g(32,48),1,9,2),y.addMany(g(32,48),2,9,2),y.addMany(g(48,127),2,10,0),y.addMany(g(48,80),1,10,0),y.addMany(g(81,88),1,10,0),y.addMany([89,90,92],1,10,0),y.addMany(g(96,127),1,10,0),y.add(80,1,11,9),y.addMany(k,9,0,9),y.add(127,9,0,9),y.addMany(g(28,32),9,0,9),y.addMany(g(32,48),9,9,12),y.addMany(g(48,60),9,8,10),y.addMany([60,61,62,63],9,9,10),y.addMany(k,11,0,11),y.addMany(g(32,128),11,0,11),y.addMany(g(28,32),11,0,11),y.addMany(k,10,0,10),y.add(127,10,0,10),y.addMany(g(28,32),10,0,10),y.addMany(g(48,60),10,8,10),y.addMany([60,61,62,63],10,0,11),y.addMany(g(32,48),10,9,12),y.addMany(k,12,0,12),y.add(127,12,0,12),y.addMany(g(28,32),12,0,12),y.addMany(g(32,48),12,9,12),y.addMany(g(48,64),12,0,11),y.addMany(g(64,127),12,12,13),y.addMany(g(64,127),10,12,13),y.addMany(g(64,127),9,12,13),y.addMany(k,13,13,13),y.addMany(S,13,13,13),y.add(127,13,0,13),y.addMany([27,156,24,26],13,14,0),y.add(E,0,2,0),y.add(E,8,5,8),y.add(E,6,0,6),y.add(E,11,0,11),y.add(E,13,13,13),y})();class x extends h.Disposable{constructor(_=a.VT500_TRANSITION_TABLE){super(),this._transitions=_,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(g,S,k)=>{},this._executeHandlerFb=g=>{},this._csiHandlerFb=(g,S)=>{},this._escHandlerFb=g=>{},this._errorHandlerFb=g=>g,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,h.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new b.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(_,g=[64,126]){let S=0;if(_.prefix){if(_.prefix.length>1)throw new Error("only one byte as prefix supported");if(S=_.prefix.charCodeAt(0),S&&60>S||S>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(_.intermediates){if(_.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let M=0;M<_.intermediates.length;++M){const D=_.intermediates.charCodeAt(M);if(32>D||D>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");S<<=8,S|=D}}if(_.final.length!==1)throw new Error("final must be a single byte");const k=_.final.charCodeAt(0);if(g[0]>k||k>g[1])throw new Error(`final must be in range ${g[0]} .. ${g[1]}`);return S<<=8,S|=k,S}identToString(_){const g=[];for(;_;)g.push(String.fromCharCode(255&_)),_>>=8;return g.reverse().join("")}setPrintHandler(_){this._printHandler=_}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(_,g){const S=this._identifier(_,[48,126]);this._escHandlers[S]===void 0&&(this._escHandlers[S]=[]);const k=this._escHandlers[S];return k.push(g),{dispose:()=>{const M=k.indexOf(g);M!==-1&&k.splice(M,1)}}}clearEscHandler(_){this._escHandlers[this._identifier(_,[48,126])]&&delete this._escHandlers[this._identifier(_,[48,126])]}setEscHandlerFallback(_){this._escHandlerFb=_}setExecuteHandler(_,g){this._executeHandlers[_.charCodeAt(0)]=g}clearExecuteHandler(_){this._executeHandlers[_.charCodeAt(0)]&&delete this._executeHandlers[_.charCodeAt(0)]}setExecuteHandlerFallback(_){this._executeHandlerFb=_}registerCsiHandler(_,g){const S=this._identifier(_);this._csiHandlers[S]===void 0&&(this._csiHandlers[S]=[]);const k=this._csiHandlers[S];return k.push(g),{dispose:()=>{const M=k.indexOf(g);M!==-1&&k.splice(M,1)}}}clearCsiHandler(_){this._csiHandlers[this._identifier(_)]&&delete this._csiHandlers[this._identifier(_)]}setCsiHandlerFallback(_){this._csiHandlerFb=_}registerDcsHandler(_,g){return this._dcsParser.registerHandler(this._identifier(_),g)}clearDcsHandler(_){this._dcsParser.clearHandler(this._identifier(_))}setDcsHandlerFallback(_){this._dcsParser.setHandlerFallback(_)}registerOscHandler(_,g){return this._oscParser.registerHandler(_,g)}clearOscHandler(_){this._oscParser.clearHandler(_)}setOscHandlerFallback(_){this._oscParser.setHandlerFallback(_)}setErrorHandler(_){this._errorHandler=_}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(_,g,S,k,M){this._parseStack.state=_,this._parseStack.handlers=g,this._parseStack.handlerPos=S,this._parseStack.transition=k,this._parseStack.chunkPos=M}parse(_,g,S){let k,M=0,D=0,R=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,R=this._parseStack.chunkPos+1;else{if(S===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const A=this._parseStack.handlers;let L=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(S===!1&&L>-1){for(;L>=0&&(k=A[L](this._params),k!==!0);L--)if(k instanceof Promise)return this._parseStack.handlerPos=L,k}this._parseStack.handlers=[];break;case 4:if(S===!1&&L>-1){for(;L>=0&&(k=A[L](),k!==!0);L--)if(k instanceof Promise)return this._parseStack.handlerPos=L,k}this._parseStack.handlers=[];break;case 6:if(M=_[this._parseStack.chunkPos],k=this._dcsParser.unhook(M!==24&&M!==26,S),k)return k;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(M=_[this._parseStack.chunkPos],k=this._oscParser.end(M!==24&&M!==26,S),k)return k;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,R=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let A=R;A<g;++A){switch(M=_[A],D=this._transitions.table[this.currentState<<8|(M<160?M:E)],D>>4){case 2:for(let F=A+1;;++F){if(F>=g||(M=_[F])<32||M>126&&M<E){this._printHandler(_,A,F),A=F-1;break}if(++F>=g||(M=_[F])<32||M>126&&M<E){this._printHandler(_,A,F),A=F-1;break}if(++F>=g||(M=_[F])<32||M>126&&M<E){this._printHandler(_,A,F),A=F-1;break}if(++F>=g||(M=_[F])<32||M>126&&M<E){this._printHandler(_,A,F),A=F-1;break}}break;case 3:this._executeHandlers[M]?this._executeHandlers[M]():this._executeHandlerFb(M),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:A,code:M,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const L=this._csiHandlers[this._collect<<8|M];let B=L?L.length-1:-1;for(;B>=0&&(k=L[B](this._params),k!==!0);B--)if(k instanceof Promise)return this._preserveStack(3,L,B,D,A),k;B<0&&this._csiHandlerFb(this._collect<<8|M,this._params),this.precedingJoinState=0;break;case 8:do switch(M){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(M-48)}while(++A<g&&(M=_[A])>47&&M<60);A--;break;case 9:this._collect<<=8,this._collect|=M;break;case 10:const I=this._escHandlers[this._collect<<8|M];let U=I?I.length-1:-1;for(;U>=0&&(k=I[U](),k!==!0);U--)if(k instanceof Promise)return this._preserveStack(4,I,U,D,A),k;U<0&&this._escHandlerFb(this._collect<<8|M),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|M,this._params);break;case 13:for(let F=A+1;;++F)if(F>=g||(M=_[F])===24||M===26||M===27||M>127&&M<E){this._dcsParser.put(_,A,F),A=F-1;break}break;case 14:if(k=this._dcsParser.unhook(M!==24&&M!==26),k)return this._preserveStack(6,[],0,D,A),k;M===27&&(D|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let F=A+1;;F++)if(F>=g||(M=_[F])<32||M>127&&M<E){this._oscParser.put(_,A,F),A=F-1;break}break;case 6:if(k=this._oscParser.end(M!==24&&M!==26),k)return this._preserveStack(5,[],0,D,A),k;M===27&&(D|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&D}}}a.EscapeSequenceParser=x},6242:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const h=c(5770),m=c(482),u=[];a.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(b,C){this._handlers[b]===void 0&&(this._handlers[b]=[]);const E=this._handlers[b];return E.push(C),{dispose:()=>{const x=E.indexOf(C);x!==-1&&E.splice(x,1)}}}clearHandler(b){this._handlers[b]&&delete this._handlers[b]}setHandlerFallback(b){this._handlerFb=b}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].start();else this._handlerFb(this._id,"START")}_put(b,C,E){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(b,C,E);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(b,C,E))}start(){this.reset(),this._state=1}put(b,C,E){if(this._state!==3){if(this._state===1)for(;C<E;){const x=b[C++];if(x===59){this._state=2,this._start();break}if(x<48||57<x)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+x-48}this._state===2&&E-C>0&&this._put(b,C,E)}}end(b,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,x=this._active.length-1,y=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,E=C,y=this._stack.fallThrough,this._stack.paused=!1),!y&&E===!1){for(;x>=0&&(E=this._active[x].end(b),E!==!0);x--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,E;x--}for(;x>=0;x--)if(E=this._active[x].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",b);this._active=u,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(b){this._handler=b,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(b,C,E){this._hitLimit||(this._data+=(0,m.utf32ToString)(b,C,E),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(b){let C=!1;if(this._hitLimit)C=!1;else if(b&&(C=this._handler(this._data),C instanceof Promise))return C.then((E=>(this._data="",this._hitLimit=!1,E)));return this._data="",this._hitLimit=!1,C}}},8742:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const c=2147483647;class h{static fromArray(u){const b=new h;if(!u.length)return b;for(let C=Array.isArray(u[0])?1:0;C<u.length;++C){const E=u[C];if(Array.isArray(E))for(let x=0;x<E.length;++x)b.addSubParam(E[x]);else b.addParam(E)}return b}constructor(u=32,b=32){if(this.maxLength=u,this.maxSubParamsLength=b,b>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(b),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new h(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let b=0;b<this.length;++b){u.push(this.params[b]);const C=this._subParamsIdx[b]>>8,E=255&this._subParamsIdx[b];E-C>0&&u.push(Array.prototype.slice.call(this._subParams,C,E))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>c?c:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>c?c:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const b=this._subParamsIdx[u]>>8,C=255&this._subParamsIdx[u];return C-b>0?this._subParams.subarray(b,C):null}getSubParamsAll(){const u={};for(let b=0;b<this.length;++b){const C=this._subParamsIdx[b]>>8,E=255&this._subParamsIdx[b];E-C>0&&(u[b]=this._subParams.slice(C,E))}return u}addDigit(u){let b;if(this._rejectDigits||!(b=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const C=this._digitIsSub?this._subParams:this.params,E=C[b-1];C[b-1]=~E?Math.min(10*E+u,c):u}}a.Params=h},5741:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,h){const m={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(m),h.dispose=()=>this._wrappedAddonDispose(m),h.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let h=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===c){h=m;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(h,1)}}},8771:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const h=c(3785),m=c(511);a.BufferApiView=class{constructor(u,b){this._buffer=u,this.type=b}init(u){return this._buffer=u,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(u){const b=this._buffer.lines.get(u);if(b)return new h.BufferLineApiView(b)}getNullCell(){return new m.CellData}}},3785:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=c(511);a.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,u){if(!(m<0||m>=this._line.length))return u?(this._line.loadCell(m,u),u):this._line.loadCell(m,new h.CellData)}translateToString(m,u,b){return this._line.translateToString(m,u,b)}}},8285:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=c(8771),m=c(8460),u=c(844);class b extends u.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=b},7975:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,h){return this._core.registerCsiHandler(c,(m=>h(m.toArray())))}addCsiHandler(c,h){return this.registerCsiHandler(c,h)}registerDcsHandler(c,h){return this._core.registerDcsHandler(c,((m,u)=>h(m,u.toArray())))}addDcsHandler(c,h){return this.registerDcsHandler(c,h)}registerEscHandler(c,h){return this._core.registerEscHandler(c,h)}addEscHandler(c,h){return this.registerEscHandler(c,h)}registerOscHandler(c,h){return this._core.registerOscHandler(c,h)}addOscHandler(c,h){return this.registerOscHandler(c,h)}}},7090:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(f,a,c){var h=this&&this.__decorate||function(y,_,g,S){var k,M=arguments.length,D=M<3?_:S===null?S=Object.getOwnPropertyDescriptor(_,g):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,_,g,S);else for(var R=y.length-1;R>=0;R--)(k=y[R])&&(D=(M<3?k(D):M>3?k(_,g,D):k(_,g))||D);return M>3&&D&&Object.defineProperty(_,g,D),D},m=this&&this.__param||function(y,_){return function(g,S){_(g,S,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const u=c(8460),b=c(844),C=c(5295),E=c(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends b.Disposable{get buffer(){return this.buffers.active}constructor(y){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(y.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(y.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new C.BufferSet(y,this))}resize(y,_){this.cols=y,this.rows=_,this.buffers.resize(y,_),this._onResize.fire({cols:y,rows:_})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(y,_=!1){const g=this.buffer;let S;S=this._cachedBlankLine,S&&S.length===this.cols&&S.getFg(0)===y.fg&&S.getBg(0)===y.bg||(S=g.getBlankLine(y,_),this._cachedBlankLine=S),S.isWrapped=_;const k=g.ybase+g.scrollTop,M=g.ybase+g.scrollBottom;if(g.scrollTop===0){const D=g.lines.isFull;M===g.lines.length-1?D?g.lines.recycle().copyFrom(S):g.lines.push(S.clone()):g.lines.splice(M+1,0,S.clone()),D?this.isUserScrolling&&(g.ydisp=Math.max(g.ydisp-1,0)):(g.ybase++,this.isUserScrolling||g.ydisp++)}else{const D=M-k+1;g.lines.shiftElements(k+1,D-1,-1),g.lines.set(M,S.clone())}this.isUserScrolling||(g.ydisp=g.ybase),this._onScroll.fire(g.ydisp)}scrollLines(y,_,g){const S=this.buffer;if(y<0){if(S.ydisp===0)return;this.isUserScrolling=!0}else y+S.ydisp>=S.ybase&&(this.isUserScrolling=!1);const k=S.ydisp;S.ydisp=Math.max(Math.min(S.ydisp+y,S.ybase),0),k!==S.ydisp&&(_||this._onScroll.fire(S.ydisp))}};a.BufferService=x=h([m(0,E.IOptionsService)],x)},7994:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,h){this._charsets[c]=h,this.glevel===c&&(this.charset=h)}}},1753:function(f,a,c){var h=this&&this.__decorate||function(S,k,M,D){var R,A=arguments.length,L=A<3?k:D===null?D=Object.getOwnPropertyDescriptor(k,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(S,k,M,D);else for(var B=S.length-1;B>=0;B--)(R=S[B])&&(L=(A<3?R(L):A>3?R(k,M,L):R(k,M))||L);return A>3&&L&&Object.defineProperty(k,M,L),L},m=this&&this.__param||function(S,k){return function(M,D){k(M,D,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const u=c(2585),b=c(8460),C=c(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:S=>S.button!==4&&S.action===1&&(S.ctrl=!1,S.alt=!1,S.shift=!1,!0)},VT200:{events:19,restrict:S=>S.action!==32},DRAG:{events:23,restrict:S=>S.action!==32||S.button!==3},ANY:{events:31,restrict:S=>!0}};function x(S,k){let M=(S.ctrl?16:0)|(S.shift?4:0)|(S.alt?8:0);return S.button===4?(M|=64,M|=S.action):(M|=3&S.button,4&S.button&&(M|=64),8&S.button&&(M|=128),S.action===32?M|=32:S.action!==0||k||(M|=3)),M}const y=String.fromCharCode,_={DEFAULT:S=>{const k=[x(S,!1)+32,S.col+32,S.row+32];return k[0]>255||k[1]>255||k[2]>255?"":`\x1B[M${y(k[0])}${y(k[1])}${y(k[2])}`},SGR:S=>{const k=S.action===0&&S.button!==4?"m":"M";return`\x1B[<${x(S,!0)};${S.col};${S.row}${k}`},SGR_PIXELS:S=>{const k=S.action===0&&S.button!==4?"m":"M";return`\x1B[<${x(S,!0)};${S.x};${S.y}${k}`}};let g=a.CoreMouseService=class extends C.Disposable{constructor(S,k){super(),this._bufferService=S,this._coreService=k,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new b.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const M of Object.keys(E))this.addProtocol(M,E[M]);for(const M of Object.keys(_))this.addEncoding(M,_[M]);this.reset()}addProtocol(S,k){this._protocols[S]=k}addEncoding(S,k){this._encodings[S]=k}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(S){if(!this._protocols[S])throw new Error(`unknown protocol "${S}"`);this._activeProtocol=S,this._onProtocolChange.fire(this._protocols[S].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(S){if(!this._encodings[S])throw new Error(`unknown encoding "${S}"`);this._activeEncoding=S}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(S){if(S.col<0||S.col>=this._bufferService.cols||S.row<0||S.row>=this._bufferService.rows||S.button===4&&S.action===32||S.button===3&&S.action!==32||S.button!==4&&(S.action===2||S.action===3)||(S.col++,S.row++,S.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,S,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(S))return!1;const k=this._encodings[this._activeEncoding](S);return k&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(k):this._coreService.triggerDataEvent(k,!0)),this._lastEvent=S,!0}explainEvents(S){return{down:!!(1&S),up:!!(2&S),drag:!!(4&S),move:!!(8&S),wheel:!!(16&S)}}_equalEvents(S,k,M){if(M){if(S.x!==k.x||S.y!==k.y)return!1}else if(S.col!==k.col||S.row!==k.row)return!1;return S.button===k.button&&S.action===k.action&&S.ctrl===k.ctrl&&S.alt===k.alt&&S.shift===k.shift}};a.CoreMouseService=g=h([m(0,u.IBufferService),m(1,u.ICoreService)],g)},6975:function(f,a,c){var h=this&&this.__decorate||function(g,S,k,M){var D,R=arguments.length,A=R<3?S:M===null?M=Object.getOwnPropertyDescriptor(S,k):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(g,S,k,M);else for(var L=g.length-1;L>=0;L--)(D=g[L])&&(A=(R<3?D(A):R>3?D(S,k,A):D(S,k))||A);return R>3&&A&&Object.defineProperty(S,k,A),A},m=this&&this.__param||function(g,S){return function(k,M){S(k,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const u=c(1439),b=c(8460),C=c(844),E=c(2585),x=Object.freeze({insertMode:!1}),y=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let _=a.CoreService=class extends C.Disposable{constructor(g,S,k){super(),this._bufferService=g,this._logService=S,this._optionsService=k,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new b.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new b.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(y)}reset(){this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(y)}triggerDataEvent(g,S=!1){if(this._optionsService.rawOptions.disableStdin)return;const k=this._bufferService.buffer;S&&this._optionsService.rawOptions.scrollOnUserInput&&k.ybase!==k.ydisp&&this._onRequestScrollToBottom.fire(),S&&this._onUserInput.fire(),this._logService.debug(`sending data "${g}"`,(()=>g.split("").map((M=>M.charCodeAt(0))))),this._onData.fire(g)}triggerBinaryEvent(g){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${g}"`,(()=>g.split("").map((S=>S.charCodeAt(0))))),this._onBinary.fire(g))}};a.CoreService=_=h([m(0,E.IBufferService),m(1,E.ILogService),m(2,E.IOptionsService)],_)},9074:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=c(8055),m=c(8460),u=c(844),b=c(6106);let C=0,E=0;class x extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new b.SortedList((g=>g==null?void 0:g.marker.line)),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)((()=>this.reset())))}registerDecoration(g){if(g.marker.isDisposed)return;const S=new y(g);if(S){const k=S.marker.onDispose((()=>S.dispose()));S.onDispose((()=>{S&&(this._decorations.delete(S)&&this._onDecorationRemoved.fire(S),k.dispose())})),this._decorations.insert(S),this._onDecorationRegistered.fire(S)}return S}reset(){for(const g of this._decorations.values())g.dispose();this._decorations.clear()}*getDecorationsAtCell(g,S,k){let M=0,D=0;for(const R of this._decorations.getKeyIterator(S))M=R.options.x??0,D=M+(R.options.width??1),g>=M&&g<D&&(!k||(R.options.layer??"bottom")===k)&&(yield R)}forEachDecorationAtCell(g,S,k,M){this._decorations.forEachByKey(S,(D=>{C=D.options.x??0,E=C+(D.options.width??1),g>=C&&g<E&&(!k||(D.options.layer??"bottom")===k)&&M(D)}))}}a.DecorationService=x;class y extends u.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=h.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=h.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(g){super(),this.options=g,this.onRenderEmitter=this.register(new m.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new m.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=g.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const h=c(2585),m=c(8343);class u{constructor(...C){this._entries=new Map;for(const[E,x]of C)this.set(E,x)}set(C,E){const x=this._entries.get(C);return this._entries.set(C,E),x}forEach(C){for(const[E,x]of this._entries.entries())C(E,x)}has(C){return this._entries.has(C)}get(C){return this._entries.get(C)}}a.ServiceCollection=u,a.InstantiationService=class{constructor(){this._services=new u,this._services.set(h.IInstantiationService,this)}setService(b,C){this._services.set(b,C)}getService(b){return this._services.get(b)}createInstance(b,...C){const E=(0,m.getServiceDependencies)(b).sort(((_,g)=>_.index-g.index)),x=[];for(const _ of E){const g=this._services.get(_.id);if(!g)throw new Error(`[createInstance] ${b.name} depends on UNKNOWN service ${_.id}.`);x.push(g)}const y=E.length>0?E[0].index:C.length;if(C.length!==y)throw new Error(`[createInstance] First service dependency of ${b.name} at position ${y+1} conflicts with ${C.length} static arguments`);return new b(...C,...x)}}},7866:function(f,a,c){var h=this&&this.__decorate||function(y,_,g,S){var k,M=arguments.length,D=M<3?_:S===null?S=Object.getOwnPropertyDescriptor(_,g):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,_,g,S);else for(var R=y.length-1;R>=0;R--)(k=y[R])&&(D=(M<3?k(D):M>3?k(_,g,D):k(_,g))||D);return M>3&&D&&Object.defineProperty(_,g,D),D},m=this&&this.__param||function(y,_){return function(g,S){_(g,S,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const u=c(844),b=c(2585),C={trace:b.LogLevelEnum.TRACE,debug:b.LogLevelEnum.DEBUG,info:b.LogLevelEnum.INFO,warn:b.LogLevelEnum.WARN,error:b.LogLevelEnum.ERROR,off:b.LogLevelEnum.OFF};let E,x=a.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(y){super(),this._optionsService=y,this._logLevel=b.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(y){for(let _=0;_<y.length;_++)typeof y[_]=="function"&&(y[_]=y[_]())}_log(y,_,g){this._evalLazyOptionalParams(g),y.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+_,...g)}trace(y,..._){var g;this._logLevel<=b.LogLevelEnum.TRACE&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.trace.bind(this._optionsService.options.logger))??console.log,y,_)}debug(y,..._){var g;this._logLevel<=b.LogLevelEnum.DEBUG&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.debug.bind(this._optionsService.options.logger))??console.log,y,_)}info(y,..._){var g;this._logLevel<=b.LogLevelEnum.INFO&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.info.bind(this._optionsService.options.logger))??console.info,y,_)}warn(y,..._){var g;this._logLevel<=b.LogLevelEnum.WARN&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.warn.bind(this._optionsService.options.logger))??console.warn,y,_)}error(y,..._){var g;this._logLevel<=b.LogLevelEnum.ERROR&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.error.bind(this._optionsService.options.logger))??console.error,y,_)}};a.LogService=x=h([m(0,b.IOptionsService)],x),a.setTraceLogger=function(y){E=y},a.traceCall=function(y,_,g){if(typeof g.value!="function")throw new Error("not supported");const S=g.value;g.value=function(...k){if(E.logLevel!==b.LogLevelEnum.TRACE)return S.apply(this,k);E.trace(`GlyphRenderer#${S.name}(${k.map((D=>JSON.stringify(D))).join(", ")})`);const M=S.apply(this,k);return E.trace(`GlyphRenderer#${S.name} return`,M),M}}},7302:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const h=c(8460),m=c(844),u=c(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const b=["normal","bold","100","200","300","400","500","600","700","800","900"];class C extends m.Disposable{constructor(x){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const y={...a.DEFAULT_OPTIONS};for(const _ in x)if(_ in y)try{const g=x[_];y[_]=this._sanitizeAndValidateOption(_,g)}catch(g){console.error(g)}this.rawOptions=y,this.options={...y},this._setupOptions(),this.register((0,m.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,y){return this.onOptionChange((_=>{_===x&&y(this.rawOptions[x])}))}onMultipleOptionChange(x,y){return this.onOptionChange((_=>{x.indexOf(_)!==-1&&y()}))}_setupOptions(){const x=_=>{if(!(_ in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);return this.rawOptions[_]},y=(_,g)=>{if(!(_ in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);g=this._sanitizeAndValidateOption(_,g),this.rawOptions[_]!==g&&(this.rawOptions[_]=g,this._onOptionChange.fire(_))};for(const _ in this.rawOptions){const g={get:x.bind(this,_),set:y.bind(this,_)};Object.defineProperty(this.options,_,g)}}_sanitizeAndValidateOption(x,y){switch(x){case"cursorStyle":if(y||(y=a.DEFAULT_OPTIONS[x]),!(function(_){return _==="block"||_==="underline"||_==="bar"})(y))throw new Error(`"${y}" is not a valid value for ${x}`);break;case"wordSeparator":y||(y=a.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof y=="number"&&1<=y&&y<=1e3)break;y=b.includes(y)?y:a.DEFAULT_OPTIONS[x];break;case"cursorWidth":y=Math.floor(y);case"lineHeight":case"tabStopWidth":if(y<1)throw new Error(`${x} cannot be less than 1, value: ${y}`);break;case"minimumContrastRatio":y=Math.max(1,Math.min(21,Math.round(10*y)/10));break;case"scrollback":if((y=Math.min(y,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${y}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(y<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${y}`);break;case"rows":case"cols":if(!y&&y!==0)throw new Error(`${x} must be numeric, value: ${y}`);break;case"windowsPty":y=y??{}}return y}}a.OptionsService=C},2660:function(f,a,c){var h=this&&this.__decorate||function(C,E,x,y){var _,g=arguments.length,S=g<3?E:y===null?y=Object.getOwnPropertyDescriptor(E,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(C,E,x,y);else for(var k=C.length-1;k>=0;k--)(_=C[k])&&(S=(g<3?_(S):g>3?_(E,x,S):_(E,x))||S);return g>3&&S&&Object.defineProperty(E,x,S),S},m=this&&this.__param||function(C,E){return function(x,y){E(x,y,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const u=c(2585);let b=a.OscLinkService=class{constructor(C){this._bufferService=C,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(C){const E=this._bufferService.buffer;if(C.id===void 0){const k=E.addMarker(E.ybase+E.y),M={data:C,id:this._nextId++,lines:[k]};return k.onDispose((()=>this._removeMarkerFromLink(M,k))),this._dataByLinkId.set(M.id,M),M.id}const x=C,y=this._getEntryIdKey(x),_=this._entriesWithId.get(y);if(_)return this.addLineToLink(_.id,E.ybase+E.y),_.id;const g=E.addMarker(E.ybase+E.y),S={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[g]};return g.onDispose((()=>this._removeMarkerFromLink(S,g))),this._entriesWithId.set(S.key,S),this._dataByLinkId.set(S.id,S),S.id}addLineToLink(C,E){const x=this._dataByLinkId.get(C);if(x&&x.lines.every((y=>y.line!==E))){const y=this._bufferService.buffer.addMarker(E);x.lines.push(y),y.onDispose((()=>this._removeMarkerFromLink(x,y)))}}getLinkData(C){var E;return(E=this._dataByLinkId.get(C))==null?void 0:E.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,E){const x=C.lines.indexOf(E);x!==-1&&(C.lines.splice(x,1),C.lines.length===0&&(C.data.id!==void 0&&this._entriesWithId.delete(C.key),this._dataByLinkId.delete(C.id)))}};a.OscLinkService=b=h([m(0,u.IBufferService)],b)},8343:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const c="di$target",h="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(m){return m[h]||[]},a.createDecorator=function(m){if(a.serviceRegistry.has(m))return a.serviceRegistry.get(m);const u=function(b,C,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,y,_){y[c]===y?y[h].push({id:x,index:_}):(y[h]=[{id:x,index:_}],y[c]=y)})(u,b,E)};return u.toString=()=>m,a.serviceRegistry.set(m,u),u}},2585:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const h=c(8343);var m;a.IBufferService=(0,h.createDecorator)("BufferService"),a.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),a.ICoreService=(0,h.createDecorator)("CoreService"),a.ICharsetService=(0,h.createDecorator)("CharsetService"),a.IInstantiationService=(0,h.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(m||(a.LogLevelEnum=m={})),a.ILogService=(0,h.createDecorator)("LogService"),a.IOptionsService=(0,h.createDecorator)("OptionsService"),a.IOscLinkService=(0,h.createDecorator)("OscLinkService"),a.IUnicodeService=(0,h.createDecorator)("UnicodeService"),a.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const h=c(8460),m=c(225);class u{static extractShouldJoin(C){return(1&C)!=0}static extractWidth(C){return C>>1&3}static extractCharKind(C){return C>>3}static createPropertyValue(C,E,x=!1){return(16777215&C)<<3|(3&E)<<1|(x?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter,this.onChange=this._onChange.event;const C=new m.UnicodeV6;this.register(C),this._active=C.version,this._activeProvider=C}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(C){if(!this._providers[C])throw new Error(`unknown Unicode version "${C}"`);this._active=C,this._activeProvider=this._providers[C],this._onChange.fire(C)}register(C){this._providers[C.version]=C}wcwidth(C){return this._activeProvider.wcwidth(C)}getStringCellWidth(C){let E=0,x=0;const y=C.length;for(let _=0;_<y;++_){let g=C.charCodeAt(_);if(55296<=g&&g<=56319){if(++_>=y)return E+this.wcwidth(g);const M=C.charCodeAt(_);56320<=M&&M<=57343?g=1024*(g-55296)+M-56320+65536:E+=this.wcwidth(M)}const S=this.charProperties(g,x);let k=u.extractWidth(S);u.extractShouldJoin(S)&&(k-=u.extractWidth(x)),E+=k,x=S}return E}charProperties(C,E){return this._activeProvider.charProperties(C,E)}}a.UnicodeService=u}},o={};function d(f){var a=o[f];if(a!==void 0)return a.exports;var c=o[f]={exports:{}};return s[f].call(c.exports,c,c.exports,d),c.exports}var v={};return(()=>{var f=v;Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;const a=d(9042),c=d(3236),h=d(844),m=d(5741),u=d(8285),b=d(7975),C=d(7090),E=["cols","rows"];class x extends h.Disposable{constructor(_){super(),this._core=this.register(new c.Terminal(_)),this._addonManager=this.register(new m.AddonManager),this._publicOptions={...this._core.options};const g=k=>this._core.options[k],S=(k,M)=>{this._checkReadonlyOptions(k),this._core.options[k]=M};for(const k in this._core.options){const M={get:g.bind(this,k),set:S.bind(this,k)};Object.defineProperty(this._publicOptions,k,M)}}_checkReadonlyOptions(_){if(E.includes(_))throw new Error(`Option "${_}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new b.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new C.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const _=this._core.coreService.decPrivateModes;let g="none";switch(this._core.coreMouseService.activeProtocol){case"X10":g="x10";break;case"VT200":g="vt200";break;case"DRAG":g="drag";break;case"ANY":g="any"}return{applicationCursorKeysMode:_.applicationCursorKeys,applicationKeypadMode:_.applicationKeypad,bracketedPasteMode:_.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:g,originMode:_.origin,reverseWraparoundMode:_.reverseWraparound,sendFocusMode:_.sendFocus,wraparoundMode:_.wraparound}}get options(){return this._publicOptions}set options(_){for(const g in _)this._publicOptions[g]=_[g]}blur(){this._core.blur()}focus(){this._core.focus()}input(_,g=!0){this._core.input(_,g)}resize(_,g){this._verifyIntegers(_,g),this._core.resize(_,g)}open(_){this._core.open(_)}attachCustomKeyEventHandler(_){this._core.attachCustomKeyEventHandler(_)}attachCustomWheelEventHandler(_){this._core.attachCustomWheelEventHandler(_)}registerLinkProvider(_){return this._core.registerLinkProvider(_)}registerCharacterJoiner(_){return this._checkProposedApi(),this._core.registerCharacterJoiner(_)}deregisterCharacterJoiner(_){this._checkProposedApi(),this._core.deregisterCharacterJoiner(_)}registerMarker(_=0){return this._verifyIntegers(_),this._core.registerMarker(_)}registerDecoration(_){return this._checkProposedApi(),this._verifyPositiveIntegers(_.x??0,_.width??0,_.height??0),this._core.registerDecoration(_)}hasSelection(){return this._core.hasSelection()}select(_,g,S){this._verifyIntegers(_,g,S),this._core.select(_,g,S)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(_,g){this._verifyIntegers(_,g),this._core.selectLines(_,g)}dispose(){super.dispose()}scrollLines(_){this._verifyIntegers(_),this._core.scrollLines(_)}scrollPages(_){this._verifyIntegers(_),this._core.scrollPages(_)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(_){this._verifyIntegers(_),this._core.scrollToLine(_)}clear(){this._core.clear()}write(_,g){this._core.write(_,g)}writeln(_,g){this._core.write(_),this._core.write(`\r
59
+ `,g)}paste(_){this._core.paste(_)}refresh(_,g){this._verifyIntegers(_,g),this._core.refresh(_,g)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(_){this._addonManager.loadAddon(this,_)}static get strings(){return a}_verifyIntegers(..._){for(const g of _)if(g===1/0||isNaN(g)||g%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(..._){for(const g of _)if(g&&(g===1/0||isNaN(g)||g%1!=0||g<0))throw new Error("This API only accepts positive integers")}}f.Terminal=x})(),v})()))})(Au)),Au.exports}var L1=M1();class O1{constructor(r,s){am(this,"socket");const o=window.location.protocol==="https:"?"wss:":"ws:";this.socket=new WebSocket(`${o}//${window.location.host}/ws/terminal/${encodeURIComponent(r)}`),this.socket.addEventListener("message",d=>{var f,a;const v=JSON.parse(d.data);v.type==="output"?s.onOutput(v.data):v.type==="error"?(f=s.onError)==null||f.call(s,v.message):(a=s.onStatus)==null||a.call(s,v)}),this.socket.addEventListener("error",()=>{var d;(d=s.onError)==null||d.call(s,"Terminal connection failed.")})}sendInput(r){this.send({type:"input",data:r})}resize(r,s){this.send({type:"resize",cols:r,rows:s})}close(){this.socket.close()}send(r){const s=JSON.stringify(r);if(this.socket.readyState===WebSocket.OPEN){this.socket.send(s);return}this.socket.addEventListener("open",()=>this.socket.send(s),{once:!0})}}function ao({sessionId:n,active:r=!0,onEvent:s}){const o=re.useRef(null),d=re.useRef(null),v=re.useRef(null),f=re.useRef(null),a=re.useRef(r),c=re.useRef(s);function h(m={}){const u=o.current,b=d.current,C=v.current,E=f.current;if(!u||!b||!C||!E)return!1;const x=u.getBoundingClientRect();return x.width<wm||x.height<xm||(C.fit(),E.cols<Em||E.rows<km)?!1:(b.resize(E.cols,E.rows),m.focus&&E.focus(),!0)}return re.useEffect(()=>{c.current=s},[s]),re.useEffect(()=>{a.current=r},[r]),re.useEffect(()=>{if(!o.current)return;const m=new L1.Terminal({cursorBlink:!0,convertEol:!0,drawBoldTextInBrightColors:!0,fontFamily:"Menlo, Monaco, Consolas, monospace",fontSize:13,fontWeight:"400",fontWeightBold:"700",lineHeight:1.35,macOptionIsMeta:!0,scrollback:1e4,theme:B1}),u=new T1.FitAddon;m.loadAddon(u),m.loadAddon(new D1.WebLinksAddon),m.open(o.current),f.current=m,v.current=u;const b=o.current.getBoundingClientRect();b.width>=wm&&b.height>=xm&&u.fit();const C=new O1(n,{onOutput(k){m.write(k)},onStatus(k){var M;(M=c.current)==null||M.call(c,k.type)},onError(k){var M;m.writeln(`\r
60
+ [VCM] ${k}`),(M=c.current)==null||M.call(c,k)}});d.current=C,m.cols>=Em&&m.rows>=km&&C.resize(m.cols,m.rows);const E=m.onData(k=>{C.sendInput(k)});let x=0,y=0,_=0;const g=()=>{x&&window.cancelAnimationFrame(x),x=window.requestAnimationFrame(()=>{x=0,h({focus:a.current})})},S=new ResizeObserver(()=>{g()});return S.observe(o.current),y=window.requestAnimationFrame(g),_=window.setTimeout(g,120),()=>{x&&window.cancelAnimationFrame(x),y&&window.cancelAnimationFrame(y),_&&window.clearTimeout(_),S.disconnect(),E.dispose(),C.close(),m.dispose(),d.current=null,f.current=null,v.current=null}},[n]),re.useEffect(()=>{if(!r)return;const m=[],u=[];return m.push(window.requestAnimationFrame(()=>{h({focus:!0}),m.push(window.requestAnimationFrame(()=>h({focus:!0})))})),u.push(window.setTimeout(()=>h({focus:!0}),160)),u.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const b of m)window.cancelAnimationFrame(b);for(const b of u)window.clearTimeout(b)}},[r]),re.useEffect(()=>{const m=()=>{a.current&&h()};return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]),T.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var m;return(m=f.current)==null?void 0:m.focus()}})}const wm=160,xm=80,Em=20,km=5,B1={background:"#0d1117",foreground:"#d6deeb",cursor:"#ffd866",cursorAccent:"#0d1117",selectionBackground:"#264f78",selectionForeground:"#ffffff",black:"#1f2430",red:"#ff5c57",green:"#5af78e",yellow:"#f3f99d",blue:"#57c7ff",magenta:"#ff6ac1",cyan:"#9aedfe",white:"#f1f1f0",brightBlack:"#686868",brightRed:"#ff5c57",brightGreen:"#5af78e",brightYellow:"#f3f99d",brightBlue:"#57c7ff",brightMagenta:"#ff6ac1",brightCyan:"#9aedfe",brightWhite:"#ffffff"},jg=[{value:"default",label:"Default",description:"Account default"},{value:"best",label:"Best",description:"Fable 5 or latest Opus"},{value:"fable",label:"Fable 5",description:"1M context, v2.1.170+"},{value:"opus",label:"Opus",description:"latest Opus"},{value:"opus[1m]",label:"Opus 1M",description:"Force 1M context"},{value:"claude-opus-4-8",label:"Opus 4.8",description:"Current Opus"},{value:"claude-opus-4-8[1m]",label:"Opus 4.8 1M",description:"Opus 4.8 + 1M context"}],j1=[{value:"default",label:"Default",description:"CLI or project default"},{value:"low",label:"Low",description:"Fastest reasoning"},{value:"medium",label:"Medium",description:"Balanced reasoning"},{value:"high",label:"High",description:"Deeper reasoning"},{value:"xhigh",label:"XHigh",description:"Extra high reasoning"}],Ng=[...j1,{value:"max",label:"Max",description:"Maximum reasoning"},{value:"ultracode",label:"Ultracode",description:"Claude Code dynamic workflows with xhigh reasoning"}];function mi({status:n}){return T.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function ah({role:n,session:r,permissionMode:s,model:o,effort:d,busy:v=!1,onPermissionModeChange:f,onModelChange:a,onEffortChange:c,onStart:h,onResume:m,onStop:u,onRestart:b,onNotifyHarnessUpdated:C}){const E=(r==null?void 0:r.status)==="running",x=!!(r!=null&&r.claudeSessionId&&!E),y=!E&&!(r!=null&&r.claudeSessionId),_=!!(r!=null&&r.harnessOutdated);return T.jsxs("div",{className:"session-controls",children:[T.jsxs("label",{className:"session-option-field permission-mode-field",children:[T.jsx("span",{children:"Permission"}),T.jsxs("select",{value:s,onChange:g=>f(g.target.value),children:[T.jsx("option",{value:"default",children:"默认"}),T.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"})]})]}),T.jsxs("label",{className:"session-option-field model-field",children:[T.jsx("span",{children:"Model"}),T.jsx("select",{value:o,onChange:g=>a(g.target.value),children:jg.map(g=>T.jsx("option",{value:g.value,children:g.label},g.value))})]}),T.jsxs("label",{className:"session-option-field effort-field",children:[T.jsx("span",{children:"Effort"}),T.jsx("select",{value:d,onChange:g=>c(g.target.value),children:Ng.map(g=>T.jsx("option",{value:g.value,children:g.label},g.value))})]}),T.jsxs("div",{className:"session-toolbar",children:[T.jsx("button",{type:"button",disabled:v||!y,onClick:h,children:"Start"}),T.jsx("button",{type:"button",disabled:v||!x,onClick:m,children:"Resume"}),T.jsx("button",{type:"button",disabled:v||!r,onClick:b,children:"Restart"}),T.jsx("button",{type:"button",disabled:v||!r,onClick:u,children:"Stop"})]}),_?T.jsxs("div",{className:"session-harness-notice",children:[T.jsx(mi,{status:"outdated"}),T.jsxs("span",{children:["Harness updated",(r==null?void 0:r.harnessRevision)!==void 0&&r.harnessCurrentRevision!==void 0?` (${r.harnessRevision} -> ${r.harnessCurrentRevision})`:""]}),T.jsx("button",{type:"button",disabled:v||!E||!C,onClick:C,children:"Notify role"})]}):null]})}function N1({busy:n,effort:r,model:s,open:o,permissionMode:d,taskSlug:v,bootstrapStatus:f,engineerSession:a,status:c,onClose:h,onEffortChange:m,onModelChange:u,onPermissionModeChange:b,onEngineerResume:C,onEngineerRestart:E,onEngineerStart:x,onEngineerStop:y,onEngineerNotifyHarnessUpdated:_,onOpenRepositoryDiff:g,onRefresh:S}){const[k,M]=re.useState(null),[D,R]=re.useState(null),[A,L]=re.useState(""),[B,I]=re.useState(!1),[U,F]=re.useState(!1),[$,K]=re.useState(null),V=(c==null?void 0:c.files)??[],W=V.filter(Z=>Z.kind.startsWith("agent-")),J=V.filter(Z=>Z.kind.startsWith("skill-")),z=V.filter(Z=>Z.kind.startsWith("tool-")),j=V.filter(Z=>Z.kind==="root-claude"||Z.kind==="gitignore"||Z.kind==="pull-request-template"),H=!!(D&&A!==D.content);re.useEffect(()=>{o||(M(null),R(null),L(""),I(!1),K(null))},[V,o,k]),re.useEffect(()=>{if(!o||!k||!v)return;let Z=!1;return F(!0),K(null),I(!1),ye.getHarnessFileContent(v,k).then(he=>{Z||(R(he),L(he.content))}).catch(he=>{Z||K(he.message)}).finally(()=>{Z||F(!1)}),()=>{Z=!0}},[o,k,v]);async function G(){if(!(!D||!D.editable||!H||!v)){F(!0),K(null);try{const Z=await ye.updateHarnessFileContent(v,D.path,{content:A});R(Z.file),L(Z.file.content),I(!1),S()}catch(Z){K(Z instanceof Error?Z.message:String(Z))}finally{F(!1)}}}function N(){M(null),R(null),L(""),I(!1),K(null)}return o?T.jsx(T.Fragment,{children:T.jsx("div",{className:"modal-backdrop harness-studio-backdrop",children:T.jsxs("section",{className:"harness-studio-modal",role:"dialog","aria-modal":"true","aria-label":"Harness Studio",children:[T.jsxs("header",{className:"harness-studio-header",children:[T.jsxs("div",{children:[T.jsx("h2",{children:"Harness Studio"}),v?null:T.jsx("p",{className:"muted",children:"Create or select a task before editing harness files."})]}),T.jsxs("div",{className:"harness-studio-header-actions",children:[T.jsx("button",{type:"button",disabled:n,onClick:g,children:"Review Diff"}),T.jsx("button",{type:"button",disabled:n,onClick:S,children:"Refresh"}),T.jsx("button",{type:"button",onClick:h,children:"Close"})]})]}),T.jsxs("div",{className:"harness-studio-layout",children:[T.jsx("aside",{className:k?"harness-studio-left harness-studio-left-preview":"harness-studio-left",children:k?T.jsxs("section",{className:"harness-studio-section harness-studio-file-preview",children:[T.jsxs("header",{className:"harness-studio-file-editor-header",children:[T.jsxs("div",{children:[T.jsx("h3",{children:(D==null?void 0:D.title)??"Harness File"}),T.jsx("p",{className:"muted",children:(D==null?void 0:D.path)??k})]}),T.jsxs("div",{className:"harness-studio-file-editor-actions",children:[D?T.jsx(mi,{status:D.editable?"ok":"unknown"}):null,B?T.jsxs(T.Fragment,{children:[T.jsx("button",{type:"button",disabled:U||!v||!(D!=null&&D.editable)||!H,onClick:()=>void G(),children:"Save"}),T.jsx("button",{type:"button",disabled:U,onClick:()=>{L((D==null?void 0:D.content)??""),I(!1)},children:"Cancel"})]}):T.jsx("button",{type:"button",disabled:U||!v||!(D!=null&&D.editable),onClick:()=>I(!0),children:"Edit"}),T.jsx("button",{type:"button",onClick:N,children:"Return"})]})]}),D!=null&&D.readonlyReason?T.jsx("p",{className:"muted",children:D.readonlyReason}):null,$?T.jsx("p",{className:"error-banner",children:$}):null,T.jsx("textarea",{className:B?"harness-studio-file-textarea is-editing":"harness-studio-file-textarea",value:A,spellCheck:!1,readOnly:!B,disabled:U,onChange:Z=>L(Z.target.value)})]}):T.jsxs(T.Fragment,{children:[T.jsxs("section",{className:"harness-studio-section harness-studio-overview",children:[T.jsx("h3",{children:"Overview"}),T.jsxs("div",{className:"harness-studio-metrics",children:[T.jsx(us,{label:"Fixed install",value:c?c.initialized?c.needsApply?"updates":"current":"new":"unknown"}),T.jsx(us,{label:"Revision",value:String((c==null?void 0:c.harnessRevision)??0)}),T.jsx(us,{label:"Managed files",value:String(V.length)}),T.jsx(us,{label:"Pending updates",value:String((c==null?void 0:c.plannedChanges.length)??0)}),T.jsx(us,{label:"Bootstrap",value:(f==null?void 0:f.status.replaceAll("_"," "))??"unknown"}),T.jsx(us,{label:"Engineer",value:Am(a)})]}),c!=null&&c.warnings.length?T.jsx("ul",{className:"warnings",children:c.warnings.map(Z=>T.jsx("li",{children:Z},Z))}):null]}),T.jsx(Wa,{title:"Agents",files:W,selectedPath:k,onSelect:M}),T.jsx(Wa,{title:"Skills",files:J,selectedPath:k,onSelect:M}),T.jsx(Wa,{title:"Root Context",files:j,selectedPath:k,onSelect:M}),T.jsx(Wa,{title:"Tools",files:z,selectedPath:k,onSelect:M}),T.jsxs("section",{className:"harness-studio-section",children:[T.jsx("h3",{children:"Project Docs"}),T.jsx("ul",{className:"harness-studio-doc-list",children:(f==null?void 0:f.checks.map(Z=>T.jsxs("li",{children:[T.jsx("span",{children:Z.path??Z.label}),T.jsx(mi,{status:Z.status})]},Z.key)))??T.jsx("li",{children:T.jsx("span",{children:"No bootstrap status loaded."})})})]})]})}),T.jsxs("section",{className:"harness-studio-section harness-studio-engineer",children:[T.jsxs("div",{className:"harness-studio-engineer-header",children:[T.jsxs("div",{children:[T.jsx("h3",{children:"Harness Engineer"}),T.jsx("p",{className:"muted",children:Am(a)})]}),T.jsx(mi,{status:(a==null?void 0:a.status)??"unknown"})]}),T.jsx(ah,{role:"harness-engineer",session:a??void 0,permissionMode:d,model:s,effort:r,busy:n,onPermissionModeChange:b,onModelChange:u,onEffortChange:m,onStart:x,onResume:C,onRestart:E,onStop:y,onNotifyHarnessUpdated:_}),T.jsx("div",{className:"harness-engineer-terminal",children:(a==null?void 0:a.status)==="running"?T.jsx(ao,{sessionId:a.id,active:o},a.id):T.jsxs("div",{className:"terminal-empty",children:[T.jsx("strong",{children:"harness-engineer"}),T.jsx("span",{children:a!=null&&a.claudeSessionId?"Resume this project Harness Engineer session.":"Start this project Harness Engineer session."})]})})]})]})]})})}):null}function us({label:n,value:r}){return T.jsxs("div",{className:"harness-studio-metric",children:[T.jsx("span",{children:n}),T.jsx("strong",{children:r})]})}function Wa({title:n,files:r,selectedPath:s,onSelect:o}){return T.jsxs("section",{className:"harness-studio-section",children:[T.jsx("h3",{children:n}),T.jsx("ol",{className:"harness-studio-file-list",children:r.length?r.map(d=>T.jsxs("li",{className:d.path===s?"selected":void 0,children:[T.jsx("button",{type:"button",title:d.path,onClick:()=>o(d.path),children:d.path}),T.jsx(mi,{status:d.action})]},d.path)):T.jsx("li",{children:T.jsx("span",{children:"No files."})})})]})}function Am(n){return n?n.status==="running"?`${n.status} / ${n.activityStatus??"idle"}`:n.status:"not started"}function H1({open:n,taskSlug:r,onClose:s}){var x;const[o,d]=re.useState(null),[v,f]=re.useState(null),[a,c]=re.useState(null),[h,m]=re.useState(!1),[u,b]=re.useState(null),C=re.useMemo(()=>(o==null?void 0:o.files.find(y=>y.path===a))??(o==null?void 0:o.files[0])??null,[o,a]);async function E(y=v){var _;m(!0),b(null);try{if(!r)throw new Error("Create or select a task before reviewing harness commits.");const g=await ye.getRepositoryDiff(r,y);d(g),f(((_=g.commit)==null?void 0:_.sha)??null),c(S=>{var k;return S&&g.files.some(M=>M.path===S)?S:((k=g.files[0])==null?void 0:k.path)??null})}catch(g){b(g instanceof Error?g.message:String(g))}finally{m(!1)}}return re.useEffect(()=>{n&&(f(null),E(null))},[n,r]),n?T.jsx("div",{className:"modal-backdrop repository-diff-backdrop",children:T.jsxs("section",{className:"repository-diff-modal",role:"dialog","aria-modal":"true","aria-label":"Commit Diff",children:[T.jsxs("header",{className:"repository-diff-header",children:[T.jsxs("div",{children:[T.jsx("h2",{children:"Commit Diff"}),T.jsx("p",{children:o?`${((x=o.commit)==null?void 0:x.shortSha)??"HEAD"} · ${o.summary.totalFiles} files · +${o.summary.additions} / -${o.summary.deletions}`:"Review a new commit on the active task worktree branch."})]}),T.jsxs("div",{className:"repository-diff-header-actions",children:[T.jsxs("label",{className:"repository-diff-commit-picker",children:[T.jsx("span",{children:"Commit"}),T.jsx("select",{value:v??"",disabled:h||!(o!=null&&o.commits.length),onChange:y=>{const _=y.target.value||null;f(_),E(_)},children:o==null?void 0:o.commits.map(y=>T.jsxs("option",{value:y.sha,children:[y.shortSha," · ",y.subject]},y.sha))})]}),T.jsx("button",{type:"button",disabled:h,onClick:()=>void E(),children:"Refresh"}),T.jsx("button",{type:"button",onClick:s,children:"Close"})]})]}),u?T.jsx("p",{className:"error-banner",children:u}):null,o!=null&&o.warnings.length?T.jsx("ul",{className:"warnings repository-diff-warnings",children:o.warnings.map(y=>T.jsx("li",{children:y},y))}):null,T.jsxs("div",{className:"repository-diff-body",children:[T.jsxs("aside",{className:"repository-diff-sidebar",children:[T.jsx(z1,{report:o,busy:h}),T.jsxs("ol",{className:"repository-diff-file-list",children:[o==null?void 0:o.files.map(y=>T.jsx("li",{className:(C==null?void 0:C.path)===y.path?"selected":"",children:T.jsxs("button",{type:"button",onClick:()=>c(y.path),children:[T.jsx("span",{children:y.path}),T.jsxs("small",{children:[Dm(y.status)," · ",Rm(y.stage)," · ",Tm(y.category)]})]})},y.path)),o&&o.files.length===0?T.jsx("li",{className:"repository-diff-empty",children:o.commits.length===0?"No new commits on this task branch.":"No files in this commit."}):null]})]}),T.jsx("main",{className:"repository-diff-main",children:C?T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"repository-diff-file-header",children:[T.jsxs("div",{children:[T.jsx("h3",{children:C.path}),T.jsxs("p",{children:[Tm(C.category)," · ",Dm(C.status)," · ",Rm(C.stage)]})]}),T.jsxs("span",{className:"repository-diff-stats",children:["+",C.additions," / -",C.deletions]})]}),C.binary?T.jsx("p",{className:"muted",children:"Binary or non-regular file. Text diff is not available."}):null,C.truncated?T.jsx("p",{className:"muted",children:"Diff was truncated for display."}):null,T.jsx("pre",{className:"repository-diff-code","aria-label":`${C.path} diff`,children:I1(C.diff)})]}):T.jsx("div",{className:"repository-diff-placeholder",children:h?"Loading commit diff...":"No diff selected."})})]})]})}):null}function z1({report:n,busy:r}){var o;const s=n==null?void 0:n.summary;return T.jsxs("div",{className:"repository-diff-summary",children:[T.jsx("strong",{children:r?"Loading":n?"Commit changes":"Not loaded"}),s?T.jsxs(T.Fragment,{children:[T.jsxs("span",{children:[s.harnessFiles," harness files"]}),T.jsxs("span",{children:[s.productCodeFiles," product code files"]}),T.jsxs("span",{children:[s.committedFiles," committed files"]}),T.jsxs("span",{children:[(n==null?void 0:n.commits.length)??0," branch commits"]}),T.jsx("span",{children:((o=n==null?void 0:n.commit)==null?void 0:o.subject)??"HEAD"})]}):null]})}function Tm(n){switch(n){case"fixed_harness":return"fixed harness";case"tools_hooks":return"tools/hooks";case"generated_context":return"generated context";case"project_docs":return"project docs";case"product_code":return"product code"}}function Rm(n){return n.replaceAll("_"," ")}function Dm(n){return n.replaceAll("_"," ")}function I1(n){return n.split(`
61
+ `).filter(r=>!P1(r)).map((r,s)=>T.jsx("span",{className:`repository-diff-line ${U1(r)}`,children:r||" "},`${s}:${r}`))}function U1(n){return n.startsWith("+")&&!n.startsWith("+++")?"repository-diff-line-added":n.startsWith("-")&&!n.startsWith("---")?"repository-diff-line-deleted":n.startsWith("@@")?"repository-diff-line-hunk":"repository-diff-line-context"}function P1(n){return n.startsWith("diff --git")||n.startsWith("index ")||n.startsWith("new file mode ")||n.startsWith("deleted file mode ")||n.startsWith("similarity index ")||n.startsWith("rename from ")||n.startsWith("rename to ")||n.startsWith("--- ")||n.startsWith("+++ ")}function F1({busy:n,effort:r,model:s,open:o,permissionMode:d,session:v,onClose:f,onEffortChange:a,onModelChange:c,onPermissionModeChange:h,onResume:m,onRestart:u,onStart:b,onStop:C,onNotifyHarnessUpdated:E}){return o?T.jsx("div",{className:"modal-backdrop translator-session-backdrop",children:T.jsxs("section",{className:"translator-session-modal",role:"dialog","aria-modal":"true","aria-label":"Translator Session",children:[T.jsxs("header",{className:"translator-session-header",children:[T.jsxs("div",{children:[T.jsx("h2",{children:"Translator Session"}),T.jsx("p",{children:q1(v)})]}),T.jsx("button",{type:"button",onClick:f,children:"Close"})]}),T.jsx(ah,{role:"translator",session:v??void 0,permissionMode:d,model:s,effort:r,busy:n,onPermissionModeChange:h,onModelChange:c,onEffortChange:a,onStart:b,onResume:m,onRestart:u,onStop:C,onNotifyHarnessUpdated:E}),T.jsx("div",{className:"translator-session-terminal",children:(v==null?void 0:v.status)==="running"?T.jsx(ao,{sessionId:v.id,active:o},v.id):T.jsxs("div",{className:"terminal-empty",children:[T.jsx("strong",{children:"translator"}),T.jsx("span",{children:v!=null&&v.claudeSessionId?"Resume this project translator session.":"Start the project translator session."})]})})]})}):null}function q1(n){if(!n)return"not started";const r=n.status==="running"?` · ${n.activityStatus??"idle"}`:"";return`${n.status}${r}`}function G1(n,r){const s={};return(n[n.length-1]===""?[...n,""]:n).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const V1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,W1={};function Mm(n,r){return(W1.jsx?$1:V1).test(n)}const K1=/[ \t\n\f\r]/g;function Y1(n){return typeof n=="object"?n.type==="text"?Lm(n.value):!1:Lm(n)}function Lm(n){return n.replace(K1,"")===""}class Dl{constructor(r,s,o){this.normal=s,this.property=r,o&&(this.space=o)}}Dl.prototype.normal={};Dl.prototype.property={};Dl.prototype.space=void 0;function Hg(n,r){const s={},o={};for(const d of n)Object.assign(s,d.property),Object.assign(o,d.normal);return new Dl(s,o,r)}function Vu(n){return n.toLowerCase()}class an{constructor(r,s){this.attribute=s,this.property=r}}an.prototype.attribute="";an.prototype.booleanish=!1;an.prototype.boolean=!1;an.prototype.commaOrSpaceSeparated=!1;an.prototype.commaSeparated=!1;an.prototype.defined=!1;an.prototype.mustUseProperty=!1;an.prototype.number=!1;an.prototype.overloadedBoolean=!1;an.prototype.property="";an.prototype.spaceSeparated=!1;an.prototype.space=void 0;let X1=0;const Ue=Er(),Lt=Er(),$u=Er(),be=Er(),ft=Er(),ps=Er(),gn=Er();function Er(){return 2**++X1}const Wu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:Lt,commaOrSpaceSeparated:gn,commaSeparated:ps,number:be,overloadedBoolean:$u,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),Tu=Object.keys(Wu);class oh extends an{constructor(r,s,o,d){let v=-1;if(super(r,s),Om(this,"space",d),typeof o=="number")for(;++v<Tu.length;){const f=Tu[v];Om(this,Tu[v],(o&Wu[f])===Wu[f])}}}oh.prototype.defined=!0;function Om(n,r,s){s&&(n[r]=s)}function vs(n){const r={},s={};for(const[o,d]of Object.entries(n.properties)){const v=new oh(o,n.transform(n.attributes||{},o),d,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(v.mustUseProperty=!0),r[o]=v,s[Vu(o)]=o,s[Vu(v.attribute)]=o}return new Dl(r,s,n.space)}const zg=vs({properties:{ariaActiveDescendant:null,ariaAtomic:Lt,ariaAutoComplete:null,ariaBusy:Lt,ariaChecked:Lt,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:Lt,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:Lt,ariaFlowTo:ft,ariaGrabbed:Lt,ariaHasPopup:null,ariaHidden:Lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:be,ariaLive:null,ariaModal:Lt,ariaMultiLine:Lt,ariaMultiSelectable:Lt,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:Lt,ariaReadOnly:Lt,ariaRelevant:null,ariaRequired:Lt,ariaRoleDescription:ft,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:Lt,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(n,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function Ig(n,r){return r in n?n[r]:r}function Ug(n,r){return Ig(n,r.toLowerCase())}const Q1=vs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ps,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:ft,autoFocus:Ue,autoPlay:Ue,blocking:ft,capture:null,charSet:null,checked:Ue,cite:null,className:ft,cols:be,colSpan:null,content:null,contentEditable:Lt,controls:Ue,controlsList:ft,coords:be|ps,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:$u,draggable:Lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:ft,height:be,hidden:$u,high:be,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:ft,itemRef:ft,itemScope:Ue,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,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:Ue,optimum:be,pattern:null,ping:ft,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:ft,required:Ue,reversed:Ue,rows:be,rowSpan:be,sandbox:ft,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:Lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Lt,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:Lt,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:Ug}),Z1=vs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:gn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:ft,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:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,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:ps,g2:ps,glyphName:ps,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,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:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gn,rev:gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gn,requiredFeatures:gn,requiredFonts:gn,requiredFormats:gn,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:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ig}),Pg=vs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,r){return"xlink:"+r.slice(5).toLowerCase()}}),Fg=vs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ug}),qg=vs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,r){return"xml:"+r.slice(3).toLowerCase()}}),J1={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"},ey=/[A-Z]/g,Bm=/-[a-z]/g,ty=/^data[-\w.:]+$/i;function ny(n,r){const s=Vu(r);let o=r,d=an;if(s in n.normal)return n.property[n.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&ty.test(r)){if(r.charAt(4)==="-"){const v=r.slice(5).replace(Bm,ry);o="data"+v.charAt(0).toUpperCase()+v.slice(1)}else{const v=r.slice(4);if(!Bm.test(v)){let f=v.replace(ey,iy);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}d=oh}return new d(o,r)}function iy(n){return"-"+n.toLowerCase()}function ry(n){return n.charAt(1).toUpperCase()}const sy=Hg([zg,Q1,Pg,Fg,qg],"html"),ch=Hg([zg,Z1,Pg,Fg,qg],"svg");function ly(n){return n.join(" ").trim()}var hs={},Ru,jm;function ay(){if(jm)return Ru;jm=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,s=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,d=/^:\s*/,v=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
62
+ `,h="/",m="*",u="",b="comment",C="declaration";function E(y,_){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];_=_||{};var g=1,S=1;function k($){var K=$.match(r);K&&(g+=K.length);var V=$.lastIndexOf(c);S=~V?$.length-V:S+$.length}function M(){var $={line:g,column:S};return function(K){return K.position=new D($),L(),K}}function D($){this.start=$,this.end={line:g,column:S},this.source=_.source}D.prototype.content=y;function R($){var K=new Error(_.source+":"+g+":"+S+": "+$);if(K.reason=$,K.filename=_.source,K.line=g,K.column=S,K.source=y,!_.silent)throw K}function A($){var K=$.exec(y);if(K){var V=K[0];return k(V),y=y.slice(V.length),K}}function L(){A(s)}function B($){var K;for($=$||[];K=I();)K!==!1&&$.push(K);return $}function I(){var $=M();if(!(h!=y.charAt(0)||m!=y.charAt(1))){for(var K=2;u!=y.charAt(K)&&(m!=y.charAt(K)||h!=y.charAt(K+1));)++K;if(K+=2,u===y.charAt(K-1))return R("End of comment missing");var V=y.slice(2,K-2);return S+=2,k(V),y=y.slice(K),S+=2,$({type:b,comment:V})}}function U(){var $=M(),K=A(o);if(K){if(I(),!A(d))return R("property missing ':'");var V=A(v),W=$({type:C,property:x(K[0].replace(n,u)),value:V?x(V[0].replace(n,u)):u});return A(f),W}}function F(){var $=[];B($);for(var K;K=U();)K!==!1&&($.push(K),B($));return $}return L(),F()}function x(y){return y?y.replace(a,u):u}return Ru=E,Ru}var Nm;function oy(){if(Nm)return hs;Nm=1;var n=hs&&hs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(hs,"__esModule",{value:!0}),hs.default=s;const r=n(ay());function s(o,d){let v=null;if(!o||typeof o!="string")return v;const f=(0,r.default)(o),a=typeof d=="function";return f.forEach(c=>{if(c.type!=="declaration")return;const{property:h,value:m}=c;a?d(h,m,c):m&&(v=v||{},v[h]=m)}),v}return hs}var yl={},Hm;function cy(){if(Hm)return yl;Hm=1,Object.defineProperty(yl,"__esModule",{value:!0}),yl.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,s=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,d=/^-(ms)-/,v=function(h){return!h||s.test(h)||n.test(h)},f=function(h,m){return m.toUpperCase()},a=function(h,m){return"".concat(m,"-")},c=function(h,m){return m===void 0&&(m={}),v(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(d,a):h=h.replace(o,a),h.replace(r,f))};return yl.camelCase=c,yl}var Sl,zm;function uy(){if(zm)return Sl;zm=1;var n=Sl&&Sl.__importDefault||function(d){return d&&d.__esModule?d:{default:d}},r=n(oy()),s=cy();function o(d,v){var f={};return!d||typeof d!="string"||(0,r.default)(d,function(a,c){a&&c&&(f[(0,s.camelCase)(a,v)]=c)}),f}return o.default=o,Sl=o,Sl}var hy=uy();const fy=Tg(hy),Gg=Vg("end"),uh=Vg("start");function Vg(n){return r;function r(s){const o=s&&s.position&&s.position[n]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function dy(n){const r=uh(n),s=Gg(n);if(r&&s)return{start:r,end:s}}function xl(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Im(n.position):"start"in n||"end"in n?Im(n):"line"in n||"column"in n?Ku(n):""}function Ku(n){return Um(n&&n.line)+":"+Um(n&&n.column)}function Im(n){return Ku(n&&n.start)+"-"+Ku(n&&n.end)}function Um(n){return n&&typeof n=="number"?n:1}class $t extends Error{constructor(r,s,o){super(),typeof s=="string"&&(o=s,s=void 0);let d="",v={},f=!1;if(s&&("line"in s&&"column"in s?v={place:s}:"start"in s&&"end"in s?v={place:s}:"type"in s?v={ancestors:[s],place:s.position}:v={...s}),typeof r=="string"?d=r:!v.cause&&r&&(f=!0,d=r.message,v.cause=r),!v.ruleId&&!v.source&&typeof o=="string"){const c=o.indexOf(":");c===-1?v.ruleId=o:(v.source=o.slice(0,c),v.ruleId=o.slice(c+1))}if(!v.place&&v.ancestors&&v.ancestors){const c=v.ancestors[v.ancestors.length-1];c&&(v.place=c.position)}const a=v.place&&"start"in v.place?v.place.start:v.place;this.ancestors=v.ancestors||void 0,this.cause=v.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=d,this.line=a?a.line:void 0,this.name=xl(v.place)||"1:1",this.place=v.place||void 0,this.reason=this.message,this.ruleId=v.ruleId||void 0,this.source=v.source||void 0,this.stack=f&&v.cause&&typeof v.cause.stack=="string"?v.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}$t.prototype.file="";$t.prototype.name="";$t.prototype.reason="";$t.prototype.message="";$t.prototype.stack="";$t.prototype.column=void 0;$t.prototype.line=void 0;$t.prototype.ancestors=void 0;$t.prototype.cause=void 0;$t.prototype.fatal=void 0;$t.prototype.place=void 0;$t.prototype.ruleId=void 0;$t.prototype.source=void 0;const hh={}.hasOwnProperty,py=new Map,my=/[A-Z]/g,gy=new Set(["table","tbody","thead","tfoot","tr"]),_y=new Set(["td","th"]),$g="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vy(n,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const s=r.filePath||void 0;let o;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=ky(s,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=Ey(s,r.jsx,r.jsxs)}const d={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:o,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?ch:sy,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},v=Wg(d,n,void 0);return v&&typeof v!="string"?v:d.create(n,d.Fragment,{children:v||void 0},void 0)}function Wg(n,r,s){if(r.type==="element")return yy(n,r,s);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return Sy(n,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return Cy(n,r,s);if(r.type==="mdxjsEsm")return by(n,r);if(r.type==="root")return wy(n,r,s);if(r.type==="text")return xy(n,r)}function yy(n,r,s){const o=n.schema;let d=o;r.tagName.toLowerCase()==="svg"&&o.space==="html"&&(d=ch,n.schema=d),n.ancestors.push(r);const v=Yg(n,r.tagName,!1),f=Ay(n,r);let a=dh(n,r);return gy.has(r.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!Y1(c):!0})),Kg(n,f,v,r),fh(f,a),n.ancestors.pop(),n.schema=o,n.create(r,v,f,s)}function Sy(n,r){if(r.data&&r.data.estree&&n.evaluater){const o=r.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}Tl(n,r.position)}function by(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);Tl(n,r.position)}function Cy(n,r,s){const o=n.schema;let d=o;r.name==="svg"&&o.space==="html"&&(d=ch,n.schema=d),n.ancestors.push(r);const v=r.name===null?n.Fragment:Yg(n,r.name,!0),f=Ty(n,r),a=dh(n,r);return Kg(n,f,v,r),fh(f,a),n.ancestors.pop(),n.schema=o,n.create(r,v,f,s)}function wy(n,r,s){const o={};return fh(o,dh(n,r)),n.create(r,n.Fragment,o,s)}function xy(n,r){return r.value}function Kg(n,r,s,o){typeof s!="string"&&s!==n.Fragment&&n.passNode&&(r.node=o)}function fh(n,r){if(r.length>0){const s=r.length>1?r:r[0];s&&(n.children=s)}}function Ey(n,r,s){return o;function o(d,v,f,a){const h=Array.isArray(f.children)?s:r;return a?h(v,f,a):h(v,f)}}function ky(n,r){return s;function s(o,d,v,f){const a=Array.isArray(v.children),c=uh(o);return r(d,v,f,a,{columnNumber:c?c.column-1:void 0,fileName:n,lineNumber:c?c.line:void 0},void 0)}}function Ay(n,r){const s={};let o,d;for(d in r.properties)if(d!=="children"&&hh.call(r.properties,d)){const v=Ry(n,d,r.properties[d]);if(v){const[f,a]=v;n.tableCellAlignToStyle&&f==="align"&&typeof a=="string"&&_y.has(r.tagName)?o=a:s[f]=a}}if(o){const v=s.style||(s.style={});v[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return s}function Ty(n,r){const s={};for(const o of r.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const v=o.data.estree.body[0];v.type;const f=v.expression;f.type;const a=f.properties[0];a.type,Object.assign(s,n.evaluater.evaluateExpression(a.argument))}else Tl(n,r.position);else{const d=o.name;let v;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&n.evaluater){const a=o.value.data.estree.body[0];a.type,v=n.evaluater.evaluateExpression(a.expression)}else Tl(n,r.position);else v=o.value===null?!0:o.value;s[d]=v}return s}function dh(n,r){const s=[];let o=-1;const d=n.passKeys?new Map:py;for(;++o<r.children.length;){const v=r.children[o];let f;if(n.passKeys){const c=v.type==="element"?v.tagName:v.type==="mdxJsxFlowElement"||v.type==="mdxJsxTextElement"?v.name:void 0;if(c){const h=d.get(c)||0;f=c+"-"+h,d.set(c,h+1)}}const a=Wg(n,v,f);a!==void 0&&s.push(a)}return s}function Ry(n,r,s){const o=ny(n.schema,r);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=o.commaSeparated?G1(s):ly(s)),o.property==="style"){let d=typeof s=="object"?s:Dy(n,String(s));return n.stylePropertyNameCase==="css"&&(d=My(d)),["style",d]}return[n.elementAttributeNameCase==="react"&&o.space?J1[o.property]||o.property:o.attribute,s]}}function Dy(n,r){try{return fy(r,{reactCompat:!0})}catch(s){if(n.ignoreInvalidStyle)return{};const o=s,d=new $t("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw d.file=n.filePath||void 0,d.url=$g+"#cannot-parse-style-attribute",d}}function Yg(n,r,s){let o;if(!s)o={type:"Literal",value:r};else if(r.includes(".")){const d=r.split(".");let v=-1,f;for(;++v<d.length;){const a=Mm(d[v])?{type:"Identifier",name:d[v]}:{type:"Literal",value:d[v]};f=f?{type:"MemberExpression",object:f,property:a,computed:!!(v&&a.type==="Literal"),optional:!1}:a}o=f}else o=Mm(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(o.type==="Literal"){const d=o.value;return hh.call(n.components,d)?n.components[d]:d}if(n.evaluater)return n.evaluater.evaluateExpression(o);Tl(n)}function Tl(n,r){const s=new $t("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw s.file=n.filePath||void 0,s.url=$g+"#cannot-handle-mdx-estrees-without-createevaluater",s}function My(n){const r={};let s;for(s in n)hh.call(n,s)&&(r[Ly(s)]=n[s]);return r}function Ly(n){let r=n.replace(my,Oy);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function Oy(n){return"-"+n.toLowerCase()}const Du={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"]},By={};function ph(n,r){const s=By,o=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,d=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return Xg(n,o,d)}function Xg(n,r,s){if(jy(n)){if("value"in n)return n.type==="html"&&!s?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Pm(n.children,r,s)}return Array.isArray(n)?Pm(n,r,s):""}function Pm(n,r,s){const o=[];let d=-1;for(;++d<n.length;)o[d]=Xg(n[d],r,s);return o.join("")}function jy(n){return!!(n&&typeof n=="object")}const Fm=document.createElement("i");function mh(n){const r="&"+n+";";Fm.innerHTML=r;const s=Fm.textContent;return s.charCodeAt(s.length-1)===59&&n!=="semi"||s===r?!1:s}function _n(n,r,s,o){const d=n.length;let v=0,f;if(r<0?r=-r>d?0:d+r:r=r>d?d:r,s=s>0?s:0,o.length<1e4)f=Array.from(o),f.unshift(r,s),n.splice(...f);else for(s&&n.splice(r,s);v<o.length;)f=o.slice(v,v+1e4),f.unshift(r,0),n.splice(...f),v+=1e4,r+=1e4}function Rn(n,r){return n.length>0?(_n(n,n.length,0,r),n):r}const qm={}.hasOwnProperty;function Qg(n){const r={};let s=-1;for(;++s<n.length;)Ny(r,n[s]);return r}function Ny(n,r){let s;for(s in r){const d=(qm.call(n,s)?n[s]:void 0)||(n[s]={}),v=r[s];let f;if(v)for(f in v){qm.call(d,f)||(d[f]=[]);const a=v[f];Hy(d[f],Array.isArray(a)?a:a?[a]:[])}}}function Hy(n,r){let s=-1;const o=[];for(;++s<r.length;)(r[s].add==="after"?n:o).push(r[s]);_n(n,0,0,o)}function Zg(n,r){const s=Number.parseInt(n,r);return s<9||s===11||s>13&&s<32||s>126&&s<160||s>55295&&s<57344||s>64975&&s<65008||(s&65535)===65535||(s&65535)===65534||s>1114111?"�":String.fromCodePoint(s)}function Bn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Yt=Zi(/[A-Za-z]/),Vt=Zi(/[\dA-Za-z]/),zy=Zi(/[#-'*+\--9=?A-Z^-~]/);function to(n){return n!==null&&(n<32||n===127)}const Yu=Zi(/\d/),Iy=Zi(/[\dA-Fa-f]/),Uy=Zi(/[!-/:-@[-`{-~]/);function Le(n){return n!==null&&n<-2}function ot(n){return n!==null&&(n<0||n===32)}function qe(n){return n===-2||n===-1||n===32}const oo=Zi(new RegExp("\\p{P}|\\p{S}","u")),xr=Zi(/\s/);function Zi(n){return r;function r(s){return s!==null&&s>-1&&n.test(String.fromCharCode(s))}}function ys(n){const r=[];let s=-1,o=0,d=0;for(;++s<n.length;){const v=n.charCodeAt(s);let f="";if(v===37&&Vt(n.charCodeAt(s+1))&&Vt(n.charCodeAt(s+2)))d=2;else if(v<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(v))||(f=String.fromCharCode(v));else if(v>55295&&v<57344){const a=n.charCodeAt(s+1);v<56320&&a>56319&&a<57344?(f=String.fromCharCode(v,a),d=1):f="�"}else f=String.fromCharCode(v);f&&(r.push(n.slice(o,s),encodeURIComponent(f)),o=s+d+1,f=""),d&&(s+=d,d=0)}return r.join("")+n.slice(o)}function Ye(n,r,s,o){const d=o?o-1:Number.POSITIVE_INFINITY;let v=0;return f;function f(c){return qe(c)?(n.enter(s),a(c)):r(c)}function a(c){return qe(c)&&v++<d?(n.consume(c),a):(n.exit(s),r(c))}}const Py={tokenize:Fy};function Fy(n){const r=n.attempt(this.parser.constructs.contentInitial,o,d);let s;return r;function o(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),Ye(n,r,"linePrefix")}function d(a){return n.enter("paragraph"),v(a)}function v(a){const c=n.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=c),s=c,f(a)}function f(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return Le(a)?(n.consume(a),n.exit("chunkText"),v):(n.consume(a),f)}}const qy={tokenize:Gy},Gm={tokenize:Vy};function Gy(n){const r=this,s=[];let o=0,d,v,f;return a;function a(S){if(o<s.length){const k=s[o];return r.containerState=k[1],n.attempt(k[0].continuation,c,h)(S)}return h(S)}function c(S){if(o++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,d&&g();const k=r.events.length;let M=k,D;for(;M--;)if(r.events[M][0]==="exit"&&r.events[M][1].type==="chunkFlow"){D=r.events[M][1].end;break}_(o);let R=k;for(;R<r.events.length;)r.events[R][1].end={...D},R++;return _n(r.events,M+1,0,r.events.slice(k)),r.events.length=R,h(S)}return a(S)}function h(S){if(o===s.length){if(!d)return b(S);if(d.currentConstruct&&d.currentConstruct.concrete)return E(S);r.interrupt=!!(d.currentConstruct&&!d._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(Gm,m,u)(S)}function m(S){return d&&g(),_(o),b(S)}function u(S){return r.parser.lazy[r.now().line]=o!==s.length,f=r.now().offset,E(S)}function b(S){return r.containerState={},n.attempt(Gm,C,E)(S)}function C(S){return o++,s.push([r.currentConstruct,r.containerState]),b(S)}function E(S){if(S===null){d&&g(),_(0),n.consume(S);return}return d=d||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:d,contentType:"flow",previous:v}),x(S)}function x(S){if(S===null){y(n.exit("chunkFlow"),!0),_(0),n.consume(S);return}return Le(S)?(n.consume(S),y(n.exit("chunkFlow")),o=0,r.interrupt=void 0,a):(n.consume(S),x)}function y(S,k){const M=r.sliceStream(S);if(k&&M.push(null),S.previous=v,v&&(v.next=S),v=S,d.defineSkip(S.start),d.write(M),r.parser.lazy[S.start.line]){let D=d.events.length;for(;D--;)if(d.events[D][1].start.offset<f&&(!d.events[D][1].end||d.events[D][1].end.offset>f))return;const R=r.events.length;let A=R,L,B;for(;A--;)if(r.events[A][0]==="exit"&&r.events[A][1].type==="chunkFlow"){if(L){B=r.events[A][1].end;break}L=!0}for(_(o),D=R;D<r.events.length;)r.events[D][1].end={...B},D++;_n(r.events,A+1,0,r.events.slice(R)),r.events.length=D}}function _(S){let k=s.length;for(;k-- >S;){const M=s[k];r.containerState=M[1],M[0].exit.call(r,n)}s.length=S}function g(){d.write([null]),v=void 0,d=void 0,r.containerState._closeFlow=void 0}}function Vy(n,r,s){return Ye(n,n.attempt(this.parser.constructs.document,r,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gs(n){if(n===null||ot(n)||xr(n))return 1;if(oo(n))return 2}function co(n,r,s){const o=[];let d=-1;for(;++d<n.length;){const v=n[d].resolveAll;v&&!o.includes(v)&&(r=v(r,s),o.push(v))}return r}const Xu={name:"attention",resolveAll:$y,tokenize:Wy};function $y(n,r){let s=-1,o,d,v,f,a,c,h,m;for(;++s<n.length;)if(n[s][0]==="enter"&&n[s][1].type==="attentionSequence"&&n[s][1]._close){for(o=s;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&r.sliceSerialize(n[o][1]).charCodeAt(0)===r.sliceSerialize(n[s][1]).charCodeAt(0)){if((n[o][1]._close||n[s][1]._open)&&(n[s][1].end.offset-n[s][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[s][1].end.offset-n[s][1].start.offset)%3))continue;c=n[o][1].end.offset-n[o][1].start.offset>1&&n[s][1].end.offset-n[s][1].start.offset>1?2:1;const u={...n[o][1].end},b={...n[s][1].start};Vm(u,-c),Vm(b,c),f={type:c>1?"strongSequence":"emphasisSequence",start:u,end:{...n[o][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...n[s][1].start},end:b},v={type:c>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[s][1].start}},d={type:c>1?"strong":"emphasis",start:{...f.start},end:{...a.end}},n[o][1].end={...f.start},n[s][1].start={...a.end},h=[],n[o][1].end.offset-n[o][1].start.offset&&(h=Rn(h,[["enter",n[o][1],r],["exit",n[o][1],r]])),h=Rn(h,[["enter",d,r],["enter",f,r],["exit",f,r],["enter",v,r]]),h=Rn(h,co(r.parser.constructs.insideSpan.null,n.slice(o+1,s),r)),h=Rn(h,[["exit",v,r],["enter",a,r],["exit",a,r],["exit",d,r]]),n[s][1].end.offset-n[s][1].start.offset?(m=2,h=Rn(h,[["enter",n[s][1],r],["exit",n[s][1],r]])):m=0,_n(n,o-1,s-o+3,h),s=o+h.length-m-2;break}}for(s=-1;++s<n.length;)n[s][1].type==="attentionSequence"&&(n[s][1].type="data");return n}function Wy(n,r){const s=this.parser.constructs.attentionMarkers.null,o=this.previous,d=gs(o);let v;return f;function f(c){return v=c,n.enter("attentionSequence"),a(c)}function a(c){if(c===v)return n.consume(c),a;const h=n.exit("attentionSequence"),m=gs(c),u=!m||m===2&&d||s.includes(c),b=!d||d===2&&m||s.includes(o);return h._open=!!(v===42?u:u&&(d||!b)),h._close=!!(v===42?b:b&&(m||!u)),r(c)}}function Vm(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const Ky={name:"autolink",tokenize:Yy};function Yy(n,r,s){let o=0;return d;function d(C){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(C),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),v}function v(C){return Yt(C)?(n.consume(C),f):C===64?s(C):h(C)}function f(C){return C===43||C===45||C===46||Vt(C)?(o=1,a(C)):h(C)}function a(C){return C===58?(n.consume(C),o=0,c):(C===43||C===45||C===46||Vt(C))&&o++<32?(n.consume(C),a):(o=0,h(C))}function c(C){return C===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(C),n.exit("autolinkMarker"),n.exit("autolink"),r):C===null||C===32||C===60||to(C)?s(C):(n.consume(C),c)}function h(C){return C===64?(n.consume(C),m):zy(C)?(n.consume(C),h):s(C)}function m(C){return Vt(C)?u(C):s(C)}function u(C){return C===46?(n.consume(C),o=0,m):C===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(C),n.exit("autolinkMarker"),n.exit("autolink"),r):b(C)}function b(C){if((C===45||Vt(C))&&o++<63){const E=C===45?b:u;return n.consume(C),E}return s(C)}}const Ml={partial:!0,tokenize:Xy};function Xy(n,r,s){return o;function o(v){return qe(v)?Ye(n,d,"linePrefix")(v):d(v)}function d(v){return v===null||Le(v)?r(v):s(v)}}const Jg={continuation:{tokenize:Zy},exit:Jy,name:"blockQuote",tokenize:Qy};function Qy(n,r,s){const o=this;return d;function d(f){if(f===62){const a=o.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(f),n.exit("blockQuoteMarker"),v}return s(f)}function v(f){return qe(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(f))}}function Zy(n,r,s){const o=this;return d;function d(f){return qe(f)?Ye(n,v,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):v(f)}function v(f){return n.attempt(Jg,r,s)(f)}}function Jy(n){n.exit("blockQuote")}const e_={name:"characterEscape",tokenize:eS};function eS(n,r,s){return o;function o(v){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(v),n.exit("escapeMarker"),d}function d(v){return Uy(v)?(n.enter("characterEscapeValue"),n.consume(v),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):s(v)}}const t_={name:"characterReference",tokenize:tS};function tS(n,r,s){const o=this;let d=0,v,f;return a;function a(u){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),c}function c(u){return u===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(u),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),v=31,f=Vt,m(u))}function h(u){return u===88||u===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(u),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),v=6,f=Iy,m):(n.enter("characterReferenceValue"),v=7,f=Yu,m(u))}function m(u){if(u===59&&d){const b=n.exit("characterReferenceValue");return f===Vt&&!mh(o.sliceSerialize(b))?s(u):(n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return f(u)&&d++<v?(n.consume(u),m):s(u)}}const $m={partial:!0,tokenize:iS},Wm={concrete:!0,name:"codeFenced",tokenize:nS};function nS(n,r,s){const o=this,d={partial:!0,tokenize:M};let v=0,f=0,a;return c;function c(D){return h(D)}function h(D){const R=o.events[o.events.length-1];return v=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,a=D,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),m(D)}function m(D){return D===a?(f++,n.consume(D),m):f<3?s(D):(n.exit("codeFencedFenceSequence"),qe(D)?Ye(n,u,"whitespace")(D):u(D))}function u(D){return D===null||Le(D)?(n.exit("codeFencedFence"),o.interrupt?r(D):n.check($m,x,k)(D)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Le(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),u(D)):qe(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Ye(n,C,"whitespace")(D)):D===96&&D===a?s(D):(n.consume(D),b)}function C(D){return D===null||Le(D)?u(D):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),E(D))}function E(D){return D===null||Le(D)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),u(D)):D===96&&D===a?s(D):(n.consume(D),E)}function x(D){return n.attempt(d,k,y)(D)}function y(D){return n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),_}function _(D){return v>0&&qe(D)?Ye(n,g,"linePrefix",v+1)(D):g(D)}function g(D){return D===null||Le(D)?n.check($m,x,k)(D):(n.enter("codeFlowValue"),S(D))}function S(D){return D===null||Le(D)?(n.exit("codeFlowValue"),g(D)):(n.consume(D),S)}function k(D){return n.exit("codeFenced"),r(D)}function M(D,R,A){let L=0;return B;function B(K){return D.enter("lineEnding"),D.consume(K),D.exit("lineEnding"),I}function I(K){return D.enter("codeFencedFence"),qe(K)?Ye(D,U,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):U(K)}function U(K){return K===a?(D.enter("codeFencedFenceSequence"),F(K)):A(K)}function F(K){return K===a?(L++,D.consume(K),F):L>=f?(D.exit("codeFencedFenceSequence"),qe(K)?Ye(D,$,"whitespace")(K):$(K)):A(K)}function $(K){return K===null||Le(K)?(D.exit("codeFencedFence"),R(K)):A(K)}}}function iS(n,r,s){const o=this;return d;function d(f){return f===null?s(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),v)}function v(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}const Mu={name:"codeIndented",tokenize:sS},rS={partial:!0,tokenize:lS};function sS(n,r,s){const o=this;return d;function d(h){return n.enter("codeIndented"),Ye(n,v,"linePrefix",5)(h)}function v(h){const m=o.events[o.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?f(h):s(h)}function f(h){return h===null?c(h):Le(h)?n.attempt(rS,f,c)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||Le(h)?(n.exit("codeFlowValue"),f(h)):(n.consume(h),a)}function c(h){return n.exit("codeIndented"),r(h)}}function lS(n,r,s){const o=this;return d;function d(f){return o.parser.lazy[o.now().line]?s(f):Le(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),d):Ye(n,v,"linePrefix",5)(f)}function v(f){const a=o.events[o.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(f):Le(f)?d(f):s(f)}}const aS={name:"codeText",previous:cS,resolve:oS,tokenize:uS};function oS(n){let r=n.length-4,s=3,o,d;if((n[s][1].type==="lineEnding"||n[s][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(o=s;++o<r;)if(n[o][1].type==="codeTextData"){n[s][1].type="codeTextPadding",n[r][1].type="codeTextPadding",s+=2,r-=2;break}}for(o=s-1,r++;++o<=r;)d===void 0?o!==r&&n[o][1].type!=="lineEnding"&&(d=o):(o===r||n[o][1].type==="lineEnding")&&(n[d][1].type="codeTextData",o!==d+2&&(n[d][1].end=n[o-1][1].end,n.splice(d+2,o-d-2),r-=o-d-2,o=d+2),d=void 0);return n}function cS(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uS(n,r,s){let o=0,d,v;return f;function f(u){return n.enter("codeText"),n.enter("codeTextSequence"),a(u)}function a(u){return u===96?(n.consume(u),o++,a):(n.exit("codeTextSequence"),c(u))}function c(u){return u===null?s(u):u===32?(n.enter("space"),n.consume(u),n.exit("space"),c):u===96?(v=n.enter("codeTextSequence"),d=0,m(u)):Le(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),c):(n.enter("codeTextData"),h(u))}function h(u){return u===null||u===32||u===96||Le(u)?(n.exit("codeTextData"),c(u)):(n.consume(u),h)}function m(u){return u===96?(n.consume(u),d++,m):d===o?(n.exit("codeTextSequence"),n.exit("codeText"),r(u)):(v.type="codeTextData",h(u))}}class hS{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,s){const o=s??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(r,o):r>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(r,s,o){const d=s||0;this.setCursor(Math.trunc(r));const v=this.right.splice(this.right.length-d,Number.POSITIVE_INFINITY);return o&&bl(this.left,o),v.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),bl(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),bl(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const s=this.left.splice(r,Number.POSITIVE_INFINITY);bl(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);bl(this.left,s.reverse())}}}function bl(n,r){let s=0;if(r.length<1e4)n.push(...r);else for(;s<r.length;)n.push(...r.slice(s,s+1e4)),s+=1e4}function n_(n){const r={};let s=-1,o,d,v,f,a,c,h;const m=new hS(n);for(;++s<m.length;){for(;s in r;)s=r[s];if(o=m.get(s),s&&o[1].type==="chunkFlow"&&m.get(s-1)[1].type==="listItemPrefix"&&(c=o[1]._tokenizer.events,v=0,v<c.length&&c[v][1].type==="lineEndingBlank"&&(v+=2),v<c.length&&c[v][1].type==="content"))for(;++v<c.length&&c[v][1].type!=="content";)c[v][1].type==="chunkText"&&(c[v][1]._isInFirstContentOfListItem=!0,v++);if(o[0]==="enter")o[1].contentType&&(Object.assign(r,fS(m,s)),s=r[s],h=!0);else if(o[1]._container){for(v=s,d=void 0;v--;)if(f=m.get(v),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(d&&(m.get(d)[1].type="lineEndingBlank"),f[1].type="lineEnding",d=v);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;d&&(o[1].end={...m.get(d)[1].start},a=m.slice(d,s),a.unshift(o),m.splice(d,s-d+1,a))}}return _n(n,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function fS(n,r){const s=n.get(r)[1],o=n.get(r)[2];let d=r-1;const v=[];let f=s._tokenizer;f||(f=o.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const a=f.events,c=[],h={};let m,u,b=-1,C=s,E=0,x=0;const y=[x];for(;C;){for(;n.get(++d)[1]!==C;);v.push(d),C._tokenizer||(m=o.sliceStream(C),C.next||m.push(null),u&&f.defineSkip(C.start),C._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(m),C._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),u=C,C=C.next}for(C=s;++b<a.length;)a[b][0]==="exit"&&a[b-1][0]==="enter"&&a[b][1].type===a[b-1][1].type&&a[b][1].start.line!==a[b][1].end.line&&(x=b+1,y.push(x),C._tokenizer=void 0,C.previous=void 0,C=C.next);for(f.events=[],C?(C._tokenizer=void 0,C.previous=void 0):y.pop(),b=y.length;b--;){const _=a.slice(y[b],y[b+1]),g=v.pop();c.push([g,g+_.length-1]),n.splice(g,2,_)}for(c.reverse(),b=-1;++b<c.length;)h[E+c[b][0]]=E+c[b][1],E+=c[b][1]-c[b][0]-1;return h}const dS={resolve:mS,tokenize:gS},pS={partial:!0,tokenize:_S};function mS(n){return n_(n),n}function gS(n,r){let s;return o;function o(a){return n.enter("content"),s=n.enter("chunkContent",{contentType:"content"}),d(a)}function d(a){return a===null?v(a):Le(a)?n.check(pS,f,v)(a):(n.consume(a),d)}function v(a){return n.exit("chunkContent"),n.exit("content"),r(a)}function f(a){return n.consume(a),n.exit("chunkContent"),s.next=n.enter("chunkContent",{contentType:"content",previous:s}),s=s.next,d}}function _S(n,r,s){const o=this;return d;function d(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),Ye(n,v,"linePrefix")}function v(f){if(f===null||Le(f))return s(f);const a=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(f):n.interrupt(o.parser.constructs.flow,s,r)(f)}}function i_(n,r,s,o,d,v,f,a,c){const h=c||Number.POSITIVE_INFINITY;let m=0;return u;function u(_){return _===60?(n.enter(o),n.enter(d),n.enter(v),n.consume(_),n.exit(v),b):_===null||_===32||_===41||to(_)?s(_):(n.enter(o),n.enter(f),n.enter(a),n.enter("chunkString",{contentType:"string"}),x(_))}function b(_){return _===62?(n.enter(v),n.consume(_),n.exit(v),n.exit(d),n.exit(o),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),C(_))}function C(_){return _===62?(n.exit("chunkString"),n.exit(a),b(_)):_===null||_===60||Le(_)?s(_):(n.consume(_),_===92?E:C)}function E(_){return _===60||_===62||_===92?(n.consume(_),C):C(_)}function x(_){return!m&&(_===null||_===41||ot(_))?(n.exit("chunkString"),n.exit(a),n.exit(f),n.exit(o),r(_)):m<h&&_===40?(n.consume(_),m++,x):_===41?(n.consume(_),m--,x):_===null||_===32||_===40||to(_)?s(_):(n.consume(_),_===92?y:x)}function y(_){return _===40||_===41||_===92?(n.consume(_),x):x(_)}}function r_(n,r,s,o,d,v){const f=this;let a=0,c;return h;function h(C){return n.enter(o),n.enter(d),n.consume(C),n.exit(d),n.enter(v),m}function m(C){return a>999||C===null||C===91||C===93&&!c||C===94&&!a&&"_hiddenFootnoteSupport"in f.parser.constructs?s(C):C===93?(n.exit(v),n.enter(d),n.consume(C),n.exit(d),n.exit(o),r):Le(C)?(n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),m):(n.enter("chunkString",{contentType:"string"}),u(C))}function u(C){return C===null||C===91||C===93||Le(C)||a++>999?(n.exit("chunkString"),m(C)):(n.consume(C),c||(c=!qe(C)),C===92?b:u)}function b(C){return C===91||C===92||C===93?(n.consume(C),a++,u):u(C)}}function s_(n,r,s,o,d,v){let f;return a;function a(b){return b===34||b===39||b===40?(n.enter(o),n.enter(d),n.consume(b),n.exit(d),f=b===40?41:b,c):s(b)}function c(b){return b===f?(n.enter(d),n.consume(b),n.exit(d),n.exit(o),r):(n.enter(v),h(b))}function h(b){return b===f?(n.exit(v),c(f)):b===null?s(b):Le(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),Ye(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===f||b===null||Le(b)?(n.exit("chunkString"),h(b)):(n.consume(b),b===92?u:m)}function u(b){return b===f||b===92?(n.consume(b),m):m(b)}}function El(n,r){let s;return o;function o(d){return Le(d)?(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),s=!0,o):qe(d)?Ye(n,o,s?"linePrefix":"lineSuffix")(d):r(d)}}const vS={name:"definition",tokenize:SS},yS={partial:!0,tokenize:bS};function SS(n,r,s){const o=this;let d;return v;function v(C){return n.enter("definition"),f(C)}function f(C){return r_.call(o,n,a,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(C)}function a(C){return d=Bn(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),C===58?(n.enter("definitionMarker"),n.consume(C),n.exit("definitionMarker"),c):s(C)}function c(C){return ot(C)?El(n,h)(C):h(C)}function h(C){return i_(n,m,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(C)}function m(C){return n.attempt(yS,u,u)(C)}function u(C){return qe(C)?Ye(n,b,"whitespace")(C):b(C)}function b(C){return C===null||Le(C)?(n.exit("definition"),o.parser.defined.push(d),r(C)):s(C)}}function bS(n,r,s){return o;function o(a){return ot(a)?El(n,d)(a):s(a)}function d(a){return s_(n,v,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function v(a){return qe(a)?Ye(n,f,"whitespace")(a):f(a)}function f(a){return a===null||Le(a)?r(a):s(a)}}const CS={name:"hardBreakEscape",tokenize:wS};function wS(n,r,s){return o;function o(v){return n.enter("hardBreakEscape"),n.consume(v),d}function d(v){return Le(v)?(n.exit("hardBreakEscape"),r(v)):s(v)}}const xS={name:"headingAtx",resolve:ES,tokenize:kS};function ES(n,r){let s=n.length-2,o=3,d,v;return n[o][1].type==="whitespace"&&(o+=2),s-2>o&&n[s][1].type==="whitespace"&&(s-=2),n[s][1].type==="atxHeadingSequence"&&(o===s-1||s-4>o&&n[s-2][1].type==="whitespace")&&(s-=o+1===s?2:4),s>o&&(d={type:"atxHeadingText",start:n[o][1].start,end:n[s][1].end},v={type:"chunkText",start:n[o][1].start,end:n[s][1].end,contentType:"text"},_n(n,o,s-o+1,[["enter",d,r],["enter",v,r],["exit",v,r],["exit",d,r]])),n}function kS(n,r,s){let o=0;return d;function d(m){return n.enter("atxHeading"),v(m)}function v(m){return n.enter("atxHeadingSequence"),f(m)}function f(m){return m===35&&o++<6?(n.consume(m),f):m===null||ot(m)?(n.exit("atxHeadingSequence"),a(m)):s(m)}function a(m){return m===35?(n.enter("atxHeadingSequence"),c(m)):m===null||Le(m)?(n.exit("atxHeading"),r(m)):qe(m)?Ye(n,a,"whitespace")(m):(n.enter("atxHeadingText"),h(m))}function c(m){return m===35?(n.consume(m),c):(n.exit("atxHeadingSequence"),a(m))}function h(m){return m===null||m===35||ot(m)?(n.exit("atxHeadingText"),a(m)):(n.consume(m),h)}}const AS=["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"],Km=["pre","script","style","textarea"],TS={concrete:!0,name:"htmlFlow",resolveTo:MS,tokenize:LS},RS={partial:!0,tokenize:BS},DS={partial:!0,tokenize:OS};function MS(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function LS(n,r,s){const o=this;let d,v,f,a,c;return h;function h(N){return m(N)}function m(N){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(N),u}function u(N){return N===33?(n.consume(N),b):N===47?(n.consume(N),v=!0,x):N===63?(n.consume(N),d=3,o.interrupt?r:j):Yt(N)?(n.consume(N),f=String.fromCharCode(N),y):s(N)}function b(N){return N===45?(n.consume(N),d=2,C):N===91?(n.consume(N),d=5,a=0,E):Yt(N)?(n.consume(N),d=4,o.interrupt?r:j):s(N)}function C(N){return N===45?(n.consume(N),o.interrupt?r:j):s(N)}function E(N){const Z="CDATA[";return N===Z.charCodeAt(a++)?(n.consume(N),a===Z.length?o.interrupt?r:U:E):s(N)}function x(N){return Yt(N)?(n.consume(N),f=String.fromCharCode(N),y):s(N)}function y(N){if(N===null||N===47||N===62||ot(N)){const Z=N===47,he=f.toLowerCase();return!Z&&!v&&Km.includes(he)?(d=1,o.interrupt?r(N):U(N)):AS.includes(f.toLowerCase())?(d=6,Z?(n.consume(N),_):o.interrupt?r(N):U(N)):(d=7,o.interrupt&&!o.parser.lazy[o.now().line]?s(N):v?g(N):S(N))}return N===45||Vt(N)?(n.consume(N),f+=String.fromCharCode(N),y):s(N)}function _(N){return N===62?(n.consume(N),o.interrupt?r:U):s(N)}function g(N){return qe(N)?(n.consume(N),g):B(N)}function S(N){return N===47?(n.consume(N),B):N===58||N===95||Yt(N)?(n.consume(N),k):qe(N)?(n.consume(N),S):B(N)}function k(N){return N===45||N===46||N===58||N===95||Vt(N)?(n.consume(N),k):M(N)}function M(N){return N===61?(n.consume(N),D):qe(N)?(n.consume(N),M):S(N)}function D(N){return N===null||N===60||N===61||N===62||N===96?s(N):N===34||N===39?(n.consume(N),c=N,R):qe(N)?(n.consume(N),D):A(N)}function R(N){return N===c?(n.consume(N),c=null,L):N===null||Le(N)?s(N):(n.consume(N),R)}function A(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||ot(N)?M(N):(n.consume(N),A)}function L(N){return N===47||N===62||qe(N)?S(N):s(N)}function B(N){return N===62?(n.consume(N),I):s(N)}function I(N){return N===null||Le(N)?U(N):qe(N)?(n.consume(N),I):s(N)}function U(N){return N===45&&d===2?(n.consume(N),V):N===60&&d===1?(n.consume(N),W):N===62&&d===4?(n.consume(N),H):N===63&&d===3?(n.consume(N),j):N===93&&d===5?(n.consume(N),z):Le(N)&&(d===6||d===7)?(n.exit("htmlFlowData"),n.check(RS,G,F)(N)):N===null||Le(N)?(n.exit("htmlFlowData"),F(N)):(n.consume(N),U)}function F(N){return n.check(DS,$,G)(N)}function $(N){return n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),K}function K(N){return N===null||Le(N)?F(N):(n.enter("htmlFlowData"),U(N))}function V(N){return N===45?(n.consume(N),j):U(N)}function W(N){return N===47?(n.consume(N),f="",J):U(N)}function J(N){if(N===62){const Z=f.toLowerCase();return Km.includes(Z)?(n.consume(N),H):U(N)}return Yt(N)&&f.length<8?(n.consume(N),f+=String.fromCharCode(N),J):U(N)}function z(N){return N===93?(n.consume(N),j):U(N)}function j(N){return N===62?(n.consume(N),H):N===45&&d===2?(n.consume(N),j):U(N)}function H(N){return N===null||Le(N)?(n.exit("htmlFlowData"),G(N)):(n.consume(N),H)}function G(N){return n.exit("htmlFlow"),r(N)}}function OS(n,r,s){const o=this;return d;function d(f){return Le(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),v):s(f)}function v(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}function BS(n,r,s){return o;function o(d){return n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),n.attempt(Ml,r,s)}}const jS={name:"htmlText",tokenize:NS};function NS(n,r,s){const o=this;let d,v,f;return a;function a(j){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(j),c}function c(j){return j===33?(n.consume(j),h):j===47?(n.consume(j),M):j===63?(n.consume(j),S):Yt(j)?(n.consume(j),A):s(j)}function h(j){return j===45?(n.consume(j),m):j===91?(n.consume(j),v=0,E):Yt(j)?(n.consume(j),g):s(j)}function m(j){return j===45?(n.consume(j),C):s(j)}function u(j){return j===null?s(j):j===45?(n.consume(j),b):Le(j)?(f=u,W(j)):(n.consume(j),u)}function b(j){return j===45?(n.consume(j),C):u(j)}function C(j){return j===62?V(j):j===45?b(j):u(j)}function E(j){const H="CDATA[";return j===H.charCodeAt(v++)?(n.consume(j),v===H.length?x:E):s(j)}function x(j){return j===null?s(j):j===93?(n.consume(j),y):Le(j)?(f=x,W(j)):(n.consume(j),x)}function y(j){return j===93?(n.consume(j),_):x(j)}function _(j){return j===62?V(j):j===93?(n.consume(j),_):x(j)}function g(j){return j===null||j===62?V(j):Le(j)?(f=g,W(j)):(n.consume(j),g)}function S(j){return j===null?s(j):j===63?(n.consume(j),k):Le(j)?(f=S,W(j)):(n.consume(j),S)}function k(j){return j===62?V(j):S(j)}function M(j){return Yt(j)?(n.consume(j),D):s(j)}function D(j){return j===45||Vt(j)?(n.consume(j),D):R(j)}function R(j){return Le(j)?(f=R,W(j)):qe(j)?(n.consume(j),R):V(j)}function A(j){return j===45||Vt(j)?(n.consume(j),A):j===47||j===62||ot(j)?L(j):s(j)}function L(j){return j===47?(n.consume(j),V):j===58||j===95||Yt(j)?(n.consume(j),B):Le(j)?(f=L,W(j)):qe(j)?(n.consume(j),L):V(j)}function B(j){return j===45||j===46||j===58||j===95||Vt(j)?(n.consume(j),B):I(j)}function I(j){return j===61?(n.consume(j),U):Le(j)?(f=I,W(j)):qe(j)?(n.consume(j),I):L(j)}function U(j){return j===null||j===60||j===61||j===62||j===96?s(j):j===34||j===39?(n.consume(j),d=j,F):Le(j)?(f=U,W(j)):qe(j)?(n.consume(j),U):(n.consume(j),$)}function F(j){return j===d?(n.consume(j),d=void 0,K):j===null?s(j):Le(j)?(f=F,W(j)):(n.consume(j),F)}function $(j){return j===null||j===34||j===39||j===60||j===61||j===96?s(j):j===47||j===62||ot(j)?L(j):(n.consume(j),$)}function K(j){return j===47||j===62||ot(j)?L(j):s(j)}function V(j){return j===62?(n.consume(j),n.exit("htmlTextData"),n.exit("htmlText"),r):s(j)}function W(j){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),J}function J(j){return qe(j)?Ye(n,z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):z(j)}function z(j){return n.enter("htmlTextData"),f(j)}}const gh={name:"labelEnd",resolveAll:US,resolveTo:PS,tokenize:FS},HS={tokenize:qS},zS={tokenize:GS},IS={tokenize:VS};function US(n){let r=-1;const s=[];for(;++r<n.length;){const o=n[r][1];if(s.push(n[r]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const d=o.type==="labelImage"?4:2;o.type="data",r+=d}}return n.length!==s.length&&_n(n,0,n.length,s),n}function PS(n,r){let s=n.length,o=0,d,v,f,a;for(;s--;)if(d=n[s][1],v){if(d.type==="link"||d.type==="labelLink"&&d._inactive)break;n[s][0]==="enter"&&d.type==="labelLink"&&(d._inactive=!0)}else if(f){if(n[s][0]==="enter"&&(d.type==="labelImage"||d.type==="labelLink")&&!d._balanced&&(v=s,d.type!=="labelLink")){o=2;break}}else d.type==="labelEnd"&&(f=s);const c={type:n[v][1].type==="labelLink"?"link":"image",start:{...n[v][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[v][1].start},end:{...n[f][1].end}},m={type:"labelText",start:{...n[v+o+2][1].end},end:{...n[f-2][1].start}};return a=[["enter",c,r],["enter",h,r]],a=Rn(a,n.slice(v+1,v+o+3)),a=Rn(a,[["enter",m,r]]),a=Rn(a,co(r.parser.constructs.insideSpan.null,n.slice(v+o+4,f-3),r)),a=Rn(a,[["exit",m,r],n[f-2],n[f-1],["exit",h,r]]),a=Rn(a,n.slice(f+1)),a=Rn(a,[["exit",c,r]]),_n(n,v,n.length,a),n}function FS(n,r,s){const o=this;let d=o.events.length,v,f;for(;d--;)if((o.events[d][1].type==="labelImage"||o.events[d][1].type==="labelLink")&&!o.events[d][1]._balanced){v=o.events[d][1];break}return a;function a(b){return v?v._inactive?u(b):(f=o.parser.defined.includes(Bn(o.sliceSerialize({start:v.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(b),n.exit("labelMarker"),n.exit("labelEnd"),c):s(b)}function c(b){return b===40?n.attempt(HS,m,f?m:u)(b):b===91?n.attempt(zS,m,f?h:u)(b):f?m(b):u(b)}function h(b){return n.attempt(IS,m,u)(b)}function m(b){return r(b)}function u(b){return v._balanced=!0,s(b)}}function qS(n,r,s){return o;function o(u){return n.enter("resource"),n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),d}function d(u){return ot(u)?El(n,v)(u):v(u)}function v(u){return u===41?m(u):i_(n,f,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function f(u){return ot(u)?El(n,c)(u):m(u)}function a(u){return s(u)}function c(u){return u===34||u===39||u===40?s_(n,h,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):m(u)}function h(u){return ot(u)?El(n,m)(u):m(u)}function m(u){return u===41?(n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),n.exit("resource"),r):s(u)}}function GS(n,r,s){const o=this;return d;function d(a){return r_.call(o,n,v,f,"reference","referenceMarker","referenceString")(a)}function v(a){return o.parser.defined.includes(Bn(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?r(a):s(a)}function f(a){return s(a)}}function VS(n,r,s){return o;function o(v){return n.enter("reference"),n.enter("referenceMarker"),n.consume(v),n.exit("referenceMarker"),d}function d(v){return v===93?(n.enter("referenceMarker"),n.consume(v),n.exit("referenceMarker"),n.exit("reference"),r):s(v)}}const $S={name:"labelStartImage",resolveAll:gh.resolveAll,tokenize:WS};function WS(n,r,s){const o=this;return d;function d(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),v}function v(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),f):s(a)}function f(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?s(a):r(a)}}const KS={name:"labelStartLink",resolveAll:gh.resolveAll,tokenize:YS};function YS(n,r,s){const o=this;return d;function d(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),v}function v(f){return f===94&&"_hiddenFootnoteSupport"in o.parser.constructs?s(f):r(f)}}const Lu={name:"lineEnding",tokenize:XS};function XS(n,r){return s;function s(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Ye(n,r,"linePrefix")}}const eo={name:"thematicBreak",tokenize:QS};function QS(n,r,s){let o=0,d;return v;function v(h){return n.enter("thematicBreak"),f(h)}function f(h){return d=h,a(h)}function a(h){return h===d?(n.enter("thematicBreakSequence"),c(h)):o>=3&&(h===null||Le(h))?(n.exit("thematicBreak"),r(h)):s(h)}function c(h){return h===d?(n.consume(h),o++,c):(n.exit("thematicBreakSequence"),qe(h)?Ye(n,a,"whitespace")(h):a(h))}}const ln={continuation:{tokenize:tb},exit:ib,name:"list",tokenize:eb},ZS={partial:!0,tokenize:rb},JS={partial:!0,tokenize:nb};function eb(n,r,s){const o=this,d=o.events[o.events.length-1];let v=d&&d[1].type==="linePrefix"?d[2].sliceSerialize(d[1],!0).length:0,f=0;return a;function a(C){const E=o.containerState.type||(C===42||C===43||C===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!o.containerState.marker||C===o.containerState.marker:Yu(C)){if(o.containerState.type||(o.containerState.type=E,n.enter(E,{_container:!0})),E==="listUnordered")return n.enter("listItemPrefix"),C===42||C===45?n.check(eo,s,h)(C):h(C);if(!o.interrupt||C===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),c(C)}return s(C)}function c(C){return Yu(C)&&++f<10?(n.consume(C),c):(!o.interrupt||f<2)&&(o.containerState.marker?C===o.containerState.marker:C===41||C===46)?(n.exit("listItemValue"),h(C)):s(C)}function h(C){return n.enter("listItemMarker"),n.consume(C),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||C,n.check(Ml,o.interrupt?s:m,n.attempt(ZS,b,u))}function m(C){return o.containerState.initialBlankLine=!0,v++,b(C)}function u(C){return qe(C)?(n.enter("listItemPrefixWhitespace"),n.consume(C),n.exit("listItemPrefixWhitespace"),b):s(C)}function b(C){return o.containerState.size=v+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(C)}}function tb(n,r,s){const o=this;return o.containerState._closeFlow=void 0,n.check(Ml,d,v);function d(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ye(n,r,"listItemIndent",o.containerState.size+1)(a)}function v(a){return o.containerState.furtherBlankLines||!qe(a)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,f(a)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(JS,r,f)(a))}function f(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ye(n,n.attempt(ln,r,s),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function nb(n,r,s){const o=this;return Ye(n,d,"listItemIndent",o.containerState.size+1);function d(v){const f=o.events[o.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===o.containerState.size?r(v):s(v)}}function ib(n){n.exit(this.containerState.type)}function rb(n,r,s){const o=this;return Ye(n,d,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function d(v){const f=o.events[o.events.length-1];return!qe(v)&&f&&f[1].type==="listItemPrefixWhitespace"?r(v):s(v)}}const Ym={name:"setextUnderline",resolveTo:sb,tokenize:lb};function sb(n,r){let s=n.length,o,d,v;for(;s--;)if(n[s][0]==="enter"){if(n[s][1].type==="content"){o=s;break}n[s][1].type==="paragraph"&&(d=s)}else n[s][1].type==="content"&&n.splice(s,1),!v&&n[s][1].type==="definition"&&(v=s);const f={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[d][1].type="setextHeadingText",v?(n.splice(d,0,["enter",f,r]),n.splice(v+1,0,["exit",n[o][1],r]),n[o][1].end={...n[v][1].end}):n[o][1]=f,n.push(["exit",f,r]),n}function lb(n,r,s){const o=this;let d;return v;function v(h){let m=o.events.length,u;for(;m--;)if(o.events[m][1].type!=="lineEnding"&&o.events[m][1].type!=="linePrefix"&&o.events[m][1].type!=="content"){u=o.events[m][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(n.enter("setextHeadingLine"),d=h,f(h)):s(h)}function f(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===d?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),qe(h)?Ye(n,c,"lineSuffix")(h):c(h))}function c(h){return h===null||Le(h)?(n.exit("setextHeadingLine"),r(h)):s(h)}}const ab={tokenize:ob};function ob(n){const r=this,s=n.attempt(Ml,o,n.attempt(this.parser.constructs.flowInitial,d,Ye(n,n.attempt(this.parser.constructs.flow,d,n.attempt(dS,d)),"linePrefix")));return s;function o(v){if(v===null){n.consume(v);return}return n.enter("lineEndingBlank"),n.consume(v),n.exit("lineEndingBlank"),r.currentConstruct=void 0,s}function d(v){if(v===null){n.consume(v);return}return n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),r.currentConstruct=void 0,s}}const cb={resolveAll:a_()},ub=l_("string"),hb=l_("text");function l_(n){return{resolveAll:a_(n==="text"?fb:void 0),tokenize:r};function r(s){const o=this,d=this.parser.constructs[n],v=s.attempt(d,f,a);return f;function f(m){return h(m)?v(m):a(m)}function a(m){if(m===null){s.consume(m);return}return s.enter("data"),s.consume(m),c}function c(m){return h(m)?(s.exit("data"),v(m)):(s.consume(m),c)}function h(m){if(m===null)return!0;const u=d[m];let b=-1;if(u)for(;++b<u.length;){const C=u[b];if(!C.previous||C.previous.call(o,o.previous))return!0}return!1}}}function a_(n){return r;function r(s,o){let d=-1,v;for(;++d<=s.length;)v===void 0?s[d]&&s[d][1].type==="data"&&(v=d,d++):(!s[d]||s[d][1].type!=="data")&&(d!==v+2&&(s[v][1].end=s[d-1][1].end,s.splice(v+2,d-v-2),d=v+2),v=void 0);return n?n(s,o):s}}function fb(n,r){let s=0;for(;++s<=n.length;)if((s===n.length||n[s][1].type==="lineEnding")&&n[s-1][1].type==="data"){const o=n[s-1][1],d=r.sliceStream(o);let v=d.length,f=-1,a=0,c;for(;v--;){const h=d[v];if(typeof h=="string"){for(f=h.length;h.charCodeAt(f-1)===32;)a++,f--;if(f)break;f=-1}else if(h===-2)c=!0,a++;else if(h!==-1){v++;break}}if(r._contentTypeTextTrailing&&s===n.length&&(a=0),a){const h={type:s===n.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:v?f:o.start._bufferIndex+f,_index:o.start._index+v,line:o.end.line,column:o.end.column-a,offset:o.end.offset-a},end:{...o.end}};o.end={...h.start},o.start.offset===o.end.offset?Object.assign(o,h):(n.splice(s,0,["enter",h,r],["exit",h,r]),s+=2)}s++}return n}const db={42:ln,43:ln,45:ln,48:ln,49:ln,50:ln,51:ln,52:ln,53:ln,54:ln,55:ln,56:ln,57:ln,62:Jg},pb={91:vS},mb={[-2]:Mu,[-1]:Mu,32:Mu},gb={35:xS,42:eo,45:[Ym,eo],60:TS,61:Ym,95:eo,96:Wm,126:Wm},_b={38:t_,92:e_},vb={[-5]:Lu,[-4]:Lu,[-3]:Lu,33:$S,38:t_,42:Xu,60:[Ky,jS],91:KS,92:[CS,e_],93:gh,95:Xu,96:aS},yb={null:[Xu,cb]},Sb={null:[42,95]},bb={null:[]},Cb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Sb,contentInitial:pb,disable:bb,document:db,flow:gb,flowInitial:mb,insideSpan:yb,string:_b,text:vb},Symbol.toStringTag,{value:"Module"}));function wb(n,r,s){let o={_bufferIndex:-1,_index:0,line:s&&s.line||1,column:s&&s.column||1,offset:s&&s.offset||0};const d={},v=[];let f=[],a=[];const c={attempt:R(M),check:R(D),consume:g,enter:S,exit:k,interrupt:R(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:E,parser:n,previous:null,sliceSerialize:b,sliceStream:C,write:u};let m=r.tokenize.call(h,c);return r.resolveAll&&v.push(r),h;function u(I){return f=Rn(f,I),y(),f[f.length-1]!==null?[]:(A(r,0),h.events=co(v,h.events,h),h.events)}function b(I,U){return Eb(C(I),U)}function C(I){return xb(f,I)}function E(){const{_bufferIndex:I,_index:U,line:F,column:$,offset:K}=o;return{_bufferIndex:I,_index:U,line:F,column:$,offset:K}}function x(I){d[I.line]=I.column,B()}function y(){let I;for(;o._index<f.length;){const U=f[o._index];if(typeof U=="string")for(I=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===I&&o._bufferIndex<U.length;)_(U.charCodeAt(o._bufferIndex));else _(U)}}function _(I){m=m(I)}function g(I){Le(I)?(o.line++,o.column=1,o.offset+=I===-3?2:1,B()):I!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===f[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=I}function S(I,U){const F=U||{};return F.type=I,F.start=E(),h.events.push(["enter",F,h]),a.push(F),F}function k(I){const U=a.pop();return U.end=E(),h.events.push(["exit",U,h]),U}function M(I,U){A(I,U.from)}function D(I,U){U.restore()}function R(I,U){return F;function F($,K,V){let W,J,z,j;return Array.isArray($)?G($):"tokenize"in $?G([$]):H($);function H(_e){return X;function X(q){const ce=q!==null&&_e[q],te=q!==null&&_e.null,se=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(te)?te:te?[te]:[]];return G(se)(q)}}function G(_e){return W=_e,J=0,_e.length===0?V:N(_e[J])}function N(_e){return X;function X(q){return j=L(),z=_e,_e.partial||(h.currentConstruct=_e),_e.name&&h.parser.constructs.disable.null.includes(_e.name)?he():_e.tokenize.call(U?Object.assign(Object.create(h),U):h,c,Z,he)(q)}}function Z(_e){return I(z,j),K}function he(_e){return j.restore(),++J<W.length?N(W[J]):V}}}function A(I,U){I.resolveAll&&!v.includes(I)&&v.push(I),I.resolve&&_n(h.events,U,h.events.length-U,I.resolve(h.events.slice(U),h)),I.resolveTo&&(h.events=I.resolveTo(h.events,h))}function L(){const I=E(),U=h.previous,F=h.currentConstruct,$=h.events.length,K=Array.from(a);return{from:$,restore:V};function V(){o=I,h.previous=U,h.currentConstruct=F,h.events.length=$,a=K,B()}}function B(){o.line in d&&o.column<2&&(o.column=d[o.line],o.offset+=d[o.line]-1)}}function xb(n,r){const s=r.start._index,o=r.start._bufferIndex,d=r.end._index,v=r.end._bufferIndex;let f;if(s===d)f=[n[s].slice(o,v)];else{if(f=n.slice(s,d),o>-1){const a=f[0];typeof a=="string"?f[0]=a.slice(o):f.shift()}v>0&&f.push(n[d].slice(0,v))}return f}function Eb(n,r){let s=-1;const o=[];let d;for(;++s<n.length;){const v=n[s];let f;if(typeof v=="string")f=v;else switch(v){case-5:{f="\r";break}case-4:{f=`
63
+ `;break}case-3:{f=`\r
64
+ `;break}case-2:{f=r?" ":" ";break}case-1:{if(!r&&d)continue;f=" ";break}default:f=String.fromCharCode(v)}d=v===-2,o.push(f)}return o.join("")}function kb(n){const o={constructs:Qg([Cb,...(n||{}).extensions||[]]),content:d(Py),defined:[],document:d(qy),flow:d(ab),lazy:{},string:d(ub),text:d(hb)};return o;function d(v){return f;function f(a){return wb(o,v,a)}}}function Ab(n){for(;!n_(n););return n}const Xm=/[\0\t\n\r]/g;function Tb(){let n=1,r="",s=!0,o;return d;function d(v,f,a){const c=[];let h,m,u,b,C;for(v=r+(typeof v=="string"?v.toString():new TextDecoder(f||void 0).decode(v)),u=0,r="",s&&(v.charCodeAt(0)===65279&&u++,s=void 0);u<v.length;){if(Xm.lastIndex=u,h=Xm.exec(v),b=h&&h.index!==void 0?h.index:v.length,C=v.charCodeAt(b),!h){r=v.slice(u);break}if(C===10&&u===b&&o)c.push(-3),o=void 0;else switch(o&&(c.push(-5),o=void 0),u<b&&(c.push(v.slice(u,b)),n+=b-u),C){case 0:{c.push(65533),n++;break}case 9:{for(m=Math.ceil(n/4)*4,c.push(-2);n++<m;)c.push(-1);break}case 10:{c.push(-4),n=1;break}default:o=!0,n=1}u=b+1}return a&&(o&&c.push(-5),r&&c.push(r),c.push(null)),c}}const Rb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Db(n){return n.replace(Rb,Mb)}function Mb(n,r,s){if(r)return r;if(s.charCodeAt(0)===35){const d=s.charCodeAt(1),v=d===120||d===88;return Zg(s.slice(v?2:1),v?16:10)}return mh(s)||n}const o_={}.hasOwnProperty;function Lb(n,r,s){return r&&typeof r=="object"&&(s=r,r=void 0),Ob(s)(Ab(kb(s).document().write(Tb()(n,r,!0))))}function Ob(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:v(Pt),autolinkProtocol:L,autolinkEmail:L,atxHeading:v(We),blockQuote:v(te),characterEscape:L,characterReference:L,codeFenced:v(se),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:v(se,f),codeText:v(de,f),codeTextData:L,data:L,codeFlowValue:L,definition:v(Ce),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:v(xe),hardBreakEscape:v(dt),hardBreakTrailing:v(dt),htmlFlow:v(De,f),htmlFlowData:L,htmlText:v(De,f),htmlTextData:L,image:v(Wt),label:f,link:v(Pt),listItem:v(Qt),listItemValue:b,listOrdered:v(Xt,u),listUnordered:v(Xt),paragraph:v(vn),reference:N,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:v(We),strong:v(St),thematicBreak:v(pt)},exit:{atxHeading:c(),atxHeadingSequence:M,autolink:c(),autolinkEmail:ce,autolinkProtocol:q,blockQuote:c(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:_e,characterReference:X,codeFenced:c(y),codeFencedFence:x,codeFencedFenceInfo:C,codeFencedFenceMeta:E,codeFlowValue:B,codeIndented:c(_),codeText:c(K),codeTextData:B,data:B,definition:c(),definitionDestinationString:k,definitionLabelString:g,definitionTitleString:S,emphasis:c(),hardBreakEscape:c(U),hardBreakTrailing:c(U),htmlFlow:c(F),htmlFlowData:B,htmlText:c($),htmlTextData:B,image:c(W),label:z,labelText:J,lineEnding:I,link:c(V),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Z,resourceDestinationString:j,resourceTitleString:H,resource:G,setextHeading:c(A),setextHeadingLineSequence:R,setextHeadingText:D,strong:c(),thematicBreak:c()}};c_(r,(n||{}).mdastExtensions||[]);const s={};return o;function o(fe){let Se={type:"root",children:[]};const Ae={stack:[Se],tokenStack:[],config:r,enter:a,exit:h,buffer:f,resume:m,data:s},Be=[];let je=-1;for(;++je<fe.length;)if(fe[je][1].type==="listOrdered"||fe[je][1].type==="listUnordered")if(fe[je][0]==="enter")Be.push(je);else{const ct=Be.pop();je=d(fe,ct,je)}for(je=-1;++je<fe.length;){const ct=r[fe[je][0]];o_.call(ct,fe[je][1].type)&&ct[fe[je][1].type].call(Object.assign({sliceSerialize:fe[je][2].sliceSerialize},Ae),fe[je][1])}if(Ae.tokenStack.length>0){const ct=Ae.tokenStack[Ae.tokenStack.length-1];(ct[1]||Qm).call(Ae,void 0,ct[0])}for(Se.position={start:Yi(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:Yi(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},je=-1;++je<r.transforms.length;)Se=r.transforms[je](Se)||Se;return Se}function d(fe,Se,Ae){let Be=Se-1,je=-1,ct=!1,Ee,et,ut,mt;for(;++Be<=Ae;){const Ke=fe[Be];switch(Ke[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ke[0]==="enter"?je++:je--,mt=void 0;break}case"lineEndingBlank":{Ke[0]==="enter"&&(Ee&&!mt&&!je&&!ut&&(ut=Be),mt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mt=void 0}if(!je&&Ke[0]==="enter"&&Ke[1].type==="listItemPrefix"||je===-1&&Ke[0]==="exit"&&(Ke[1].type==="listUnordered"||Ke[1].type==="listOrdered")){if(Ee){let Ft=Be;for(et=void 0;Ft--;){const ht=fe[Ft];if(ht[1].type==="lineEnding"||ht[1].type==="lineEndingBlank"){if(ht[0]==="exit")continue;et&&(fe[et][1].type="lineEndingBlank",ct=!0),ht[1].type="lineEnding",et=Ft}else if(!(ht[1].type==="linePrefix"||ht[1].type==="blockQuotePrefix"||ht[1].type==="blockQuotePrefixWhitespace"||ht[1].type==="blockQuoteMarker"||ht[1].type==="listItemIndent"))break}ut&&(!et||ut<et)&&(Ee._spread=!0),Ee.end=Object.assign({},et?fe[et][1].start:Ke[1].end),fe.splice(et||Be,0,["exit",Ee,Ke[2]]),Be++,Ae++}if(Ke[1].type==="listItemPrefix"){const Ft={type:"listItem",_spread:!1,start:Object.assign({},Ke[1].start),end:void 0};Ee=Ft,fe.splice(Be,0,["enter",Ft,Ke[2]]),Be++,Ae++,ut=void 0,mt=!0}}}return fe[Se][1]._spread=ct,Ae}function v(fe,Se){return Ae;function Ae(Be){a.call(this,fe(Be),Be),Se&&Se.call(this,Be)}}function f(){this.stack.push({type:"fragment",children:[]})}function a(fe,Se,Ae){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([Se,Ae||void 0]),fe.position={start:Yi(Se.start),end:void 0}}function c(fe){return Se;function Se(Ae){fe&&fe.call(this,Ae),h.call(this,Ae)}}function h(fe,Se){const Ae=this.stack.pop(),Be=this.tokenStack.pop();if(Be)Be[0].type!==fe.type&&(Se?Se.call(this,fe,Be[0]):(Be[1]||Qm).call(this,fe,Be[0]));else throw new Error("Cannot close `"+fe.type+"` ("+xl({start:fe.start,end:fe.end})+"): it’s not open");Ae.position.end=Yi(fe.end)}function m(){return ph(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function b(fe){if(this.data.expectingFirstListItemValue){const Se=this.stack[this.stack.length-2];Se.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function C(){const fe=this.resume(),Se=this.stack[this.stack.length-1];Se.lang=fe}function E(){const fe=this.resume(),Se=this.stack[this.stack.length-1];Se.meta=fe}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const fe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const fe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=fe.replace(/(\r?\n|\r)$/g,"")}function g(fe){const Se=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=Se,Ae.identifier=Bn(this.sliceSerialize(fe)).toLowerCase()}function S(){const fe=this.resume(),Se=this.stack[this.stack.length-1];Se.title=fe}function k(){const fe=this.resume(),Se=this.stack[this.stack.length-1];Se.url=fe}function M(fe){const Se=this.stack[this.stack.length-1];if(!Se.depth){const Ae=this.sliceSerialize(fe).length;Se.depth=Ae}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function R(fe){const Se=this.stack[this.stack.length-1];Se.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function L(fe){const Ae=this.stack[this.stack.length-1].children;let Be=Ae[Ae.length-1];(!Be||Be.type!=="text")&&(Be=Xe(),Be.position={start:Yi(fe.start),end:void 0},Ae.push(Be)),this.stack.push(Be)}function B(fe){const Se=this.stack.pop();Se.value+=this.sliceSerialize(fe),Se.position.end=Yi(fe.end)}function I(fe){const Se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=Se.children[Se.children.length-1];Ae.position.end=Yi(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(Se.type)&&(L.call(this,fe),B.call(this,fe))}function U(){this.data.atHardBreak=!0}function F(){const fe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=fe}function $(){const fe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=fe}function K(){const fe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=fe}function V(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=Se,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function W(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=Se,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function J(fe){const Se=this.sliceSerialize(fe),Ae=this.stack[this.stack.length-2];Ae.label=Db(Se),Ae.identifier=Bn(Se).toLowerCase()}function z(){const fe=this.stack[this.stack.length-1],Se=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const Be=fe.children;Ae.children=Be}else Ae.alt=Se}function j(){const fe=this.resume(),Se=this.stack[this.stack.length-1];Se.url=fe}function H(){const fe=this.resume(),Se=this.stack[this.stack.length-1];Se.title=fe}function G(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function Z(fe){const Se=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=Se,Ae.identifier=Bn(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function he(fe){this.data.characterReferenceType=fe.type}function _e(fe){const Se=this.sliceSerialize(fe),Ae=this.data.characterReferenceType;let Be;Ae?(Be=Zg(Se,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Be=mh(Se);const je=this.stack[this.stack.length-1];je.value+=Be}function X(fe){const Se=this.stack.pop();Se.position.end=Yi(fe.end)}function q(fe){B.call(this,fe);const Se=this.stack[this.stack.length-1];Se.url=this.sliceSerialize(fe)}function ce(fe){B.call(this,fe);const Se=this.stack[this.stack.length-1];Se.url="mailto:"+this.sliceSerialize(fe)}function te(){return{type:"blockquote",children:[]}}function se(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function Ce(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xe(){return{type:"emphasis",children:[]}}function We(){return{type:"heading",depth:0,children:[]}}function dt(){return{type:"break"}}function De(){return{type:"html",value:""}}function Wt(){return{type:"image",title:null,url:"",alt:null}}function Pt(){return{type:"link",title:null,url:"",children:[]}}function Xt(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function Qt(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function vn(){return{type:"paragraph",children:[]}}function St(){return{type:"strong",children:[]}}function Xe(){return{type:"text",value:""}}function pt(){return{type:"thematicBreak"}}}function Yi(n){return{line:n.line,column:n.column,offset:n.offset}}function c_(n,r){let s=-1;for(;++s<r.length;){const o=r[s];Array.isArray(o)?c_(n,o):Bb(n,o)}}function Bb(n,r){let s;for(s in r)if(o_.call(r,s))switch(s){case"canContainEols":{const o=r[s];o&&n[s].push(...o);break}case"transforms":{const o=r[s];o&&n[s].push(...o);break}case"enter":case"exit":{const o=r[s];o&&Object.assign(n[s],o);break}}}function Qm(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+xl({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+xl({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+xl({start:r.start,end:r.end})+") is still open")}function jb(n){const r=this;r.parser=s;function s(o){return Lb(o,{...r.data("settings"),...n,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function Nb(n,r){const s={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(r),!0)};return n.patch(r,s),n.applyData(r,s)}function Hb(n,r){const s={type:"element",tagName:"br",properties:{},children:[]};return n.patch(r,s),[n.applyData(r,s),{type:"text",value:`
65
+ `}]}function zb(n,r){const s=r.value?r.value+`
66
+ `:"",o={},d=r.lang?r.lang.split(/\s+/):[];d.length>0&&(o.className=["language-"+d[0]]);let v={type:"element",tagName:"code",properties:o,children:[{type:"text",value:s}]};return r.meta&&(v.data={meta:r.meta}),n.patch(r,v),v=n.applyData(r,v),v={type:"element",tagName:"pre",properties:{},children:[v]},n.patch(r,v),v}function Ib(n,r){const s={type:"element",tagName:"del",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Ub(n,r){const s={type:"element",tagName:"em",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Pb(n,r){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(r.identifier).toUpperCase(),d=ys(o.toLowerCase()),v=n.footnoteOrder.indexOf(o);let f,a=n.footnoteCounts.get(o);a===void 0?(a=0,n.footnoteOrder.push(o),f=n.footnoteOrder.length):f=v+1,a+=1,n.footnoteCounts.set(o,a);const c={type:"element",tagName:"a",properties:{href:"#"+s+"fn-"+d,id:s+"fnref-"+d+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(r,c);const h={type:"element",tagName:"sup",properties:{},children:[c]};return n.patch(r,h),n.applyData(r,h)}function Fb(n,r){const s={type:"element",tagName:"h"+r.depth,properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function qb(n,r){if(n.options.allowDangerousHtml){const s={type:"raw",value:r.value};return n.patch(r,s),n.applyData(r,s)}}function u_(n,r){const s=r.referenceType;let o="]";if(s==="collapsed"?o+="[]":s==="full"&&(o+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+o}];const d=n.all(r),v=d[0];v&&v.type==="text"?v.value="["+v.value:d.unshift({type:"text",value:"["});const f=d[d.length-1];return f&&f.type==="text"?f.value+=o:d.push({type:"text",value:o}),d}function Gb(n,r){const s=String(r.identifier).toUpperCase(),o=n.definitionById.get(s);if(!o)return u_(n,r);const d={src:ys(o.url||""),alt:r.alt};o.title!==null&&o.title!==void 0&&(d.title=o.title);const v={type:"element",tagName:"img",properties:d,children:[]};return n.patch(r,v),n.applyData(r,v)}function Vb(n,r){const s={src:ys(r.url)};r.alt!==null&&r.alt!==void 0&&(s.alt=r.alt),r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"img",properties:s,children:[]};return n.patch(r,o),n.applyData(r,o)}function $b(n,r){const s={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};n.patch(r,s);const o={type:"element",tagName:"code",properties:{},children:[s]};return n.patch(r,o),n.applyData(r,o)}function Wb(n,r){const s=String(r.identifier).toUpperCase(),o=n.definitionById.get(s);if(!o)return u_(n,r);const d={href:ys(o.url||"")};o.title!==null&&o.title!==void 0&&(d.title=o.title);const v={type:"element",tagName:"a",properties:d,children:n.all(r)};return n.patch(r,v),n.applyData(r,v)}function Kb(n,r){const s={href:ys(r.url)};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"a",properties:s,children:n.all(r)};return n.patch(r,o),n.applyData(r,o)}function Yb(n,r,s){const o=n.all(r),d=s?Xb(s):h_(r),v={},f=[];if(typeof r.checked=="boolean"){const m=o[0];let u;m&&m.type==="element"&&m.tagName==="p"?u=m:(u={type:"element",tagName:"p",properties:{},children:[]},o.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),v.className=["task-list-item"]}let a=-1;for(;++a<o.length;){const m=o[a];(d||a!==0||m.type!=="element"||m.tagName!=="p")&&f.push({type:"text",value:`
67
+ `}),m.type==="element"&&m.tagName==="p"&&!d?f.push(...m.children):f.push(m)}const c=o[o.length-1];c&&(d||c.type!=="element"||c.tagName!=="p")&&f.push({type:"text",value:`
68
+ `});const h={type:"element",tagName:"li",properties:v,children:f};return n.patch(r,h),n.applyData(r,h)}function Xb(n){let r=!1;if(n.type==="list"){r=n.spread||!1;const s=n.children;let o=-1;for(;!r&&++o<s.length;)r=h_(s[o])}return r}function h_(n){const r=n.spread;return r??n.children.length>1}function Qb(n,r){const s={},o=n.all(r);let d=-1;for(typeof r.start=="number"&&r.start!==1&&(s.start=r.start);++d<o.length;){const f=o[d];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){s.className=["contains-task-list"];break}}const v={type:"element",tagName:r.ordered?"ol":"ul",properties:s,children:n.wrap(o,!0)};return n.patch(r,v),n.applyData(r,v)}function Zb(n,r){const s={type:"element",tagName:"p",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Jb(n,r){const s={type:"root",children:n.wrap(n.all(r))};return n.patch(r,s),n.applyData(r,s)}function eC(n,r){const s={type:"element",tagName:"strong",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function tC(n,r){const s=n.all(r),o=s.shift(),d=[];if(o){const f={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(r.children[0],f),d.push(f)}if(s.length>0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(s,!0)},a=uh(r.children[1]),c=Gg(r.children[r.children.length-1]);a&&c&&(f.position={start:a,end:c}),d.push(f)}const v={type:"element",tagName:"table",properties:{},children:n.wrap(d,!0)};return n.patch(r,v),n.applyData(r,v)}function nC(n,r,s){const o=s?s.children:void 0,v=(o?o.indexOf(r):1)===0?"th":"td",f=s&&s.type==="table"?s.align:void 0,a=f?f.length:r.children.length;let c=-1;const h=[];for(;++c<a;){const u=r.children[c],b={},C=f?f[c]:void 0;C&&(b.align=C);let E={type:"element",tagName:v,properties:b,children:[]};u&&(E.children=n.all(u),n.patch(u,E),E=n.applyData(u,E)),h.push(E)}const m={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(r,m),n.applyData(r,m)}function iC(n,r){const s={type:"element",tagName:"td",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}const Zm=9,Jm=32;function rC(n){const r=String(n),s=/\r?\n|\r/g;let o=s.exec(r),d=0;const v=[];for(;o;)v.push(eg(r.slice(d,o.index),d>0,!0),o[0]),d=o.index+o[0].length,o=s.exec(r);return v.push(eg(r.slice(d),d>0,!1)),v.join("")}function eg(n,r,s){let o=0,d=n.length;if(r){let v=n.codePointAt(o);for(;v===Zm||v===Jm;)o++,v=n.codePointAt(o)}if(s){let v=n.codePointAt(d-1);for(;v===Zm||v===Jm;)d--,v=n.codePointAt(d-1)}return d>o?n.slice(o,d):""}function sC(n,r){const s={type:"text",value:rC(String(r.value))};return n.patch(r,s),n.applyData(r,s)}function lC(n,r){const s={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(r,s),n.applyData(r,s)}const aC={blockquote:Nb,break:Hb,code:zb,delete:Ib,emphasis:Ub,footnoteReference:Pb,heading:Fb,html:qb,imageReference:Gb,image:Vb,inlineCode:$b,linkReference:Wb,link:Kb,listItem:Yb,list:Qb,paragraph:Zb,root:Jb,strong:eC,table:tC,tableCell:iC,tableRow:nC,text:sC,thematicBreak:lC,toml:Ka,yaml:Ka,definition:Ka,footnoteDefinition:Ka};function Ka(){}const f_=-1,uo=0,kl=1,no=2,_h=3,vh=4,yh=5,Sh=6,d_=7,p_=8,oC=typeof self=="object"?self:globalThis,tg=(n,r)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new oC[n](r)},cC=(n,r)=>{const s=(d,v)=>(n.set(v,d),d),o=d=>{if(n.has(d))return n.get(d);const[v,f]=r[d];switch(v){case uo:case f_:return s(f,d);case kl:{const a=s([],d);for(const c of f)a.push(o(c));return a}case no:{const a=s({},d);for(const[c,h]of f)a[o(c)]=o(h);return a}case _h:return s(new Date(f),d);case vh:{const{source:a,flags:c}=f;return s(new RegExp(a,c),d)}case yh:{const a=s(new Map,d);for(const[c,h]of f)a.set(o(c),o(h));return a}case Sh:{const a=s(new Set,d);for(const c of f)a.add(o(c));return a}case d_:{const{name:a,message:c}=f;return s(tg(a,c),d)}case p_:return s(BigInt(f),d);case"BigInt":return s(Object(BigInt(f)),d);case"ArrayBuffer":return s(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:a}=new Uint8Array(f);return s(new DataView(a),f)}}return s(tg(v,f),d)};return o},ng=n=>cC(new Map,n)(0),fs="",{toString:uC}={},{keys:hC}=Object,Cl=n=>{const r=typeof n;if(r!=="object"||!n)return[uo,r];const s=uC.call(n).slice(8,-1);switch(s){case"Array":return[kl,fs];case"Object":return[no,fs];case"Date":return[_h,fs];case"RegExp":return[vh,fs];case"Map":return[yh,fs];case"Set":return[Sh,fs];case"DataView":return[kl,s]}return s.includes("Array")?[kl,s]:s.includes("Error")?[d_,s]:[no,s]},Ya=([n,r])=>n===uo&&(r==="function"||r==="symbol"),fC=(n,r,s,o)=>{const d=(f,a)=>{const c=o.push(f)-1;return s.set(a,c),c},v=f=>{if(s.has(f))return s.get(f);let[a,c]=Cl(f);switch(a){case uo:{let m=f;switch(c){case"bigint":a=p_,m=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+c);m=null;break;case"undefined":return d([f_],f)}return d([a,m],f)}case kl:{if(c){let b=f;return c==="DataView"?b=new Uint8Array(f.buffer):c==="ArrayBuffer"&&(b=new Uint8Array(f)),d([c,[...b]],f)}const m=[],u=d([a,m],f);for(const b of f)m.push(v(b));return u}case no:{if(c)switch(c){case"BigInt":return d([c,f.toString()],f);case"Boolean":case"Number":case"String":return d([c,f.valueOf()],f)}if(r&&"toJSON"in f)return v(f.toJSON());const m=[],u=d([a,m],f);for(const b of hC(f))(n||!Ya(Cl(f[b])))&&m.push([v(b),v(f[b])]);return u}case _h:return d([a,f.toISOString()],f);case vh:{const{source:m,flags:u}=f;return d([a,{source:m,flags:u}],f)}case yh:{const m=[],u=d([a,m],f);for(const[b,C]of f)(n||!(Ya(Cl(b))||Ya(Cl(C))))&&m.push([v(b),v(C)]);return u}case Sh:{const m=[],u=d([a,m],f);for(const b of f)(n||!Ya(Cl(b)))&&m.push(v(b));return u}}const{message:h}=f;return d([a,{name:c,message:h}],f)};return v},ig=(n,{json:r,lossy:s}={})=>{const o=[];return fC(!(r||s),!!r,new Map,o)(n),o},io=typeof structuredClone=="function"?(n,r)=>r&&("json"in r||"lossy"in r)?ng(ig(n,r)):structuredClone(n):(n,r)=>ng(ig(n,r));function dC(n,r){const s=[{type:"text",value:"↩"}];return r>1&&s.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),s}function pC(n,r){return"Back to reference "+(n+1)+(r>1?"-"+r:"")}function mC(n){const r=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",s=n.options.footnoteBackContent||dC,o=n.options.footnoteBackLabel||pC,d=n.options.footnoteLabel||"Footnotes",v=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[c]);if(!h)continue;const m=n.all(h),u=String(h.identifier).toUpperCase(),b=ys(u.toLowerCase());let C=0;const E=[],x=n.footnoteCounts.get(u);for(;x!==void 0&&++C<=x;){E.length>0&&E.push({type:"text",value:" "});let g=typeof s=="string"?s:s(c,C);typeof g=="string"&&(g={type:"text",value:g}),E.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+b+(C>1?"-"+C:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(c,C),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const y=m[m.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const g=y.children[y.children.length-1];g&&g.type==="text"?g.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...E)}else m.push(...E);const _={type:"element",tagName:"li",properties:{id:r+"fn-"+b},children:n.wrap(m,!0)};n.patch(h,_),a.push(_)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:v,properties:{...io(f),id:"footnote-label"},children:[{type:"text",value:d}]},{type:"text",value:`
69
+ `},{type:"element",tagName:"ol",properties:{},children:n.wrap(a,!0)},{type:"text",value:`
70
+ `}]}}const ho=(function(n){if(n==null)return yC;if(typeof n=="function")return fo(n);if(typeof n=="object")return Array.isArray(n)?gC(n):_C(n);if(typeof n=="string")return vC(n);throw new Error("Expected function, string, or object as test")});function gC(n){const r=[];let s=-1;for(;++s<n.length;)r[s]=ho(n[s]);return fo(o);function o(...d){let v=-1;for(;++v<r.length;)if(r[v].apply(this,d))return!0;return!1}}function _C(n){const r=n;return fo(s);function s(o){const d=o;let v;for(v in n)if(d[v]!==r[v])return!1;return!0}}function vC(n){return fo(r);function r(s){return s&&s.type===n}}function fo(n){return r;function r(s,o,d){return!!(SC(s)&&n.call(this,s,typeof o=="number"?o:void 0,d||void 0))}}function yC(){return!0}function SC(n){return n!==null&&typeof n=="object"&&"type"in n}const m_=[],bC=!0,Qu=!1,CC="skip";function g_(n,r,s,o){let d;typeof r=="function"&&typeof s!="function"?(o=s,s=r):d=r;const v=ho(d),f=o?-1:1;a(n,void 0,[])();function a(c,h,m){const u=c&&typeof c=="object"?c:{};if(typeof u.type=="string"){const C=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(c.type+(C?"<"+C+">":""))+")"})}return b;function b(){let C=m_,E,x,y;if((!r||v(c,h,m[m.length-1]||void 0))&&(C=wC(s(c,m)),C[0]===Qu))return C;if("children"in c&&c.children){const _=c;if(_.children&&C[0]!==CC)for(x=(o?_.children.length:-1)+f,y=m.concat(_);x>-1&&x<_.children.length;){const g=_.children[x];if(E=a(g,x,y)(),E[0]===Qu)return E;x=typeof E[1]=="number"?E[1]:x+f}}return C}}}function wC(n){return Array.isArray(n)?n:typeof n=="number"?[bC,n]:n==null?m_:[n]}function bh(n,r,s,o){let d,v,f;typeof r=="function"&&typeof s!="function"?(v=void 0,f=r,d=s):(v=r,f=s,d=o),g_(n,v,a,d);function a(c,h){const m=h[h.length-1],u=m?m.children.indexOf(c):void 0;return f(c,u,m)}}const Zu={}.hasOwnProperty,xC={};function EC(n,r){const s=r||xC,o=new Map,d=new Map,v=new Map,f={...aC,...s.handlers},a={all:h,applyData:AC,definitionById:o,footnoteById:d,footnoteCounts:v,footnoteOrder:[],handlers:f,one:c,options:s,patch:kC,wrap:RC};return bh(n,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const u=m.type==="definition"?o:d,b=String(m.identifier).toUpperCase();u.has(b)||u.set(b,m)}}),a;function c(m,u){const b=m.type,C=a.handlers[b];if(Zu.call(a.handlers,b)&&C)return C(a,m,u);if(a.options.passThrough&&a.options.passThrough.includes(b)){if("children"in m){const{children:x,...y}=m,_=io(y);return _.children=a.all(m),_}return io(m)}return(a.options.unknownHandler||TC)(a,m,u)}function h(m){const u=[];if("children"in m){const b=m.children;let C=-1;for(;++C<b.length;){const E=a.one(b[C],m);if(E){if(C&&b[C-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=rg(E.value)),!Array.isArray(E)&&E.type==="element")){const x=E.children[0];x&&x.type==="text"&&(x.value=rg(x.value))}Array.isArray(E)?u.push(...E):u.push(E)}}}return u}}function kC(n,r){n.position&&(r.position=dy(n))}function AC(n,r){let s=r;if(n&&n.data){const o=n.data.hName,d=n.data.hChildren,v=n.data.hProperties;if(typeof o=="string")if(s.type==="element")s.tagName=o;else{const f="children"in s?s.children:[s];s={type:"element",tagName:o,properties:{},children:f}}s.type==="element"&&v&&Object.assign(s.properties,io(v)),"children"in s&&s.children&&d!==null&&d!==void 0&&(s.children=d)}return s}function TC(n,r){const s=r.data||{},o="value"in r&&!(Zu.call(s,"hProperties")||Zu.call(s,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:n.all(r)};return n.patch(r,o),n.applyData(r,o)}function RC(n,r){const s=[];let o=-1;for(r&&s.push({type:"text",value:`
71
+ `});++o<n.length;)o&&s.push({type:"text",value:`
72
+ `}),s.push(n[o]);return r&&n.length>0&&s.push({type:"text",value:`
73
+ `}),s}function rg(n){let r=0,s=n.charCodeAt(r);for(;s===9||s===32;)r++,s=n.charCodeAt(r);return n.slice(r)}function sg(n,r){const s=EC(n,r),o=s.one(n,void 0),d=mC(s),v=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return d&&v.children.push({type:"text",value:`
74
+ `},d),v}function DC(n,r){return n&&"run"in n?async function(s,o){const d=sg(s,{file:o,...r});await n.run(d,o)}:function(s,o){return sg(s,{file:o,...n||r})}}function lg(n){if(n)throw n}var Ou,ag;function MC(){if(ag)return Ou;ag=1;var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,d=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},v=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var m=n.call(h,"constructor"),u=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!u)return!1;var b;for(b in h);return typeof b>"u"||n.call(h,b)},f=function(h,m){s&&m.name==="__proto__"?s(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},a=function(h,m){if(m==="__proto__")if(n.call(h,m)){if(o)return o(h,m).value}else return;return h[m]};return Ou=function c(){var h,m,u,b,C,E,x=arguments[0],y=1,_=arguments.length,g=!1;for(typeof x=="boolean"&&(g=x,x=arguments[1]||{},y=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});y<_;++y)if(h=arguments[y],h!=null)for(m in h)u=a(x,m),b=a(h,m),x!==b&&(g&&b&&(v(b)||(C=d(b)))?(C?(C=!1,E=u&&d(u)?u:[]):E=u&&v(u)?u:{},f(x,{name:m,newValue:c(g,E,b)})):typeof b<"u"&&f(x,{name:m,newValue:b}));return x},Ou}var LC=MC();const Bu=Tg(LC);function Ju(n){if(typeof n!="object"||n===null)return!1;const r=Object.getPrototypeOf(n);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function OC(){const n=[],r={run:s,use:o};return r;function s(...d){let v=-1;const f=d.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);a(null,...d);function a(c,...h){const m=n[++v];let u=-1;if(c){f(c);return}for(;++u<d.length;)(h[u]===null||h[u]===void 0)&&(h[u]=d[u]);d=h,m?BC(m,a)(...h):f(null,...h)}}function o(d){if(typeof d!="function")throw new TypeError("Expected `middelware` to be a function, not "+d);return n.push(d),r}}function BC(n,r){let s;return o;function o(...f){const a=n.length>f.length;let c;a&&f.push(d);try{c=n.apply(this,f)}catch(h){const m=h;if(a&&s)throw m;return d(m)}a||(c&&c.then&&typeof c.then=="function"?c.then(v,d):c instanceof Error?d(c):v(c))}function d(f,...a){s||(s=!0,r(f,...a))}function v(f){d(null,f)}}const qn={basename:jC,dirname:NC,extname:HC,join:zC,sep:"/"};function jC(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');Ll(n);let s=0,o=-1,d=n.length,v;if(r===void 0||r.length===0||r.length>n.length){for(;d--;)if(n.codePointAt(d)===47){if(v){s=d+1;break}}else o<0&&(v=!0,o=d+1);return o<0?"":n.slice(s,o)}if(r===n)return"";let f=-1,a=r.length-1;for(;d--;)if(n.codePointAt(d)===47){if(v){s=d+1;break}}else f<0&&(v=!0,f=d+1),a>-1&&(n.codePointAt(d)===r.codePointAt(a--)?a<0&&(o=d):(a=-1,o=f));return s===o?o=f:o<0&&(o=n.length),n.slice(s,o)}function NC(n){if(Ll(n),n.length===0)return".";let r=-1,s=n.length,o;for(;--s;)if(n.codePointAt(s)===47){if(o){r=s;break}}else o||(o=!0);return r<0?n.codePointAt(0)===47?"/":".":r===1&&n.codePointAt(0)===47?"//":n.slice(0,r)}function HC(n){Ll(n);let r=n.length,s=-1,o=0,d=-1,v=0,f;for(;r--;){const a=n.codePointAt(r);if(a===47){if(f){o=r+1;break}continue}s<0&&(f=!0,s=r+1),a===46?d<0?d=r:v!==1&&(v=1):d>-1&&(v=-1)}return d<0||s<0||v===0||v===1&&d===s-1&&d===o+1?"":n.slice(d,s)}function zC(...n){let r=-1,s;for(;++r<n.length;)Ll(n[r]),n[r]&&(s=s===void 0?n[r]:s+"/"+n[r]);return s===void 0?".":IC(s)}function IC(n){Ll(n);const r=n.codePointAt(0)===47;let s=UC(n,!r);return s.length===0&&!r&&(s="."),s.length>0&&n.codePointAt(n.length-1)===47&&(s+="/"),r?"/"+s:s}function UC(n,r){let s="",o=0,d=-1,v=0,f=-1,a,c;for(;++f<=n.length;){if(f<n.length)a=n.codePointAt(f);else{if(a===47)break;a=47}if(a===47){if(!(d===f-1||v===1))if(d!==f-1&&v===2){if(s.length<2||o!==2||s.codePointAt(s.length-1)!==46||s.codePointAt(s.length-2)!==46){if(s.length>2){if(c=s.lastIndexOf("/"),c!==s.length-1){c<0?(s="",o=0):(s=s.slice(0,c),o=s.length-1-s.lastIndexOf("/")),d=f,v=0;continue}}else if(s.length>0){s="",o=0,d=f,v=0;continue}}r&&(s=s.length>0?s+"/..":"..",o=2)}else s.length>0?s+="/"+n.slice(d+1,f):s=n.slice(d+1,f),o=f-d-1;d=f,v=0}else a===46&&v>-1?v++:v=-1}return s}function Ll(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const PC={cwd:FC};function FC(){return"/"}function eh(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function qC(n){if(typeof n=="string")n=new URL(n);else if(!eh(n)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(n.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return GC(n)}function GC(n){if(n.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const r=n.pathname;let s=-1;for(;++s<r.length;)if(r.codePointAt(s)===37&&r.codePointAt(s+1)===50){const o=r.codePointAt(s+2);if(o===70||o===102){const d=new TypeError("File URL path must not include encoded / characters");throw d.code="ERR_INVALID_FILE_URL_PATH",d}}return decodeURIComponent(r)}const ju=["history","path","basename","stem","extname","dirname"];class __{constructor(r){let s;r?eh(r)?s={path:r}:typeof r=="string"||VC(r)?s={value:r}:s=r:s={},this.cwd="cwd"in s?"":PC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<ju.length;){const v=ju[o];v in s&&s[v]!==void 0&&s[v]!==null&&(this[v]=v==="history"?[...s[v]]:s[v])}let d;for(d in s)ju.includes(d)||(this[d]=s[d])}get basename(){return typeof this.path=="string"?qn.basename(this.path):void 0}set basename(r){Hu(r,"basename"),Nu(r,"basename"),this.path=qn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?qn.dirname(this.path):void 0}set dirname(r){og(this.basename,"dirname"),this.path=qn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?qn.extname(this.path):void 0}set extname(r){if(Nu(r,"extname"),og(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=qn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){eh(r)&&(r=qC(r)),Hu(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?qn.basename(this.path,this.extname):void 0}set stem(r){Hu(r,"stem"),Nu(r,"stem"),this.path=qn.join(this.dirname||"",r+(this.extname||""))}fail(r,s,o){const d=this.message(r,s,o);throw d.fatal=!0,d}info(r,s,o){const d=this.message(r,s,o);return d.fatal=void 0,d}message(r,s,o){const d=new $t(r,s,o);return this.path&&(d.name=this.path+":"+d.name,d.file=this.path),d.fatal=!1,this.messages.push(d),d}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function Nu(n,r){if(n&&n.includes(qn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+qn.sep+"`")}function Hu(n,r){if(!n)throw new Error("`"+r+"` cannot be empty")}function og(n,r){if(!n)throw new Error("Setting `"+r+"` requires `path` to be set too")}function VC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const $C=(function(n){const o=this.constructor.prototype,d=o[n],v=function(){return d.apply(v,arguments)};return Object.setPrototypeOf(v,o),v}),WC={}.hasOwnProperty;class Ch extends $C{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=OC()}copy(){const r=new Ch;let s=-1;for(;++s<this.attachers.length;){const o=this.attachers[s];r.use(...o)}return r.data(Bu(!0,{},this.namespace)),r}data(r,s){return typeof r=="string"?arguments.length===2?(Uu("data",this.frozen),this.namespace[r]=s,this):WC.call(this.namespace,r)&&this.namespace[r]||void 0:r?(Uu("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[s,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const d=s.call(r,...o);typeof d=="function"&&this.transformers.use(d)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const s=Xa(r),o=this.parser||this.Parser;return zu("parse",o),o(String(s),s)}process(r,s){const o=this;return this.freeze(),zu("process",this.parser||this.Parser),Iu("process",this.compiler||this.Compiler),s?d(void 0,s):new Promise(d);function d(v,f){const a=Xa(r),c=o.parse(a);o.run(c,a,function(m,u,b){if(m||!u||!b)return h(m);const C=u,E=o.stringify(C,b);XC(E)?b.value=E:b.result=E,h(m,b)});function h(m,u){m||!u?f(m):v?v(u):s(void 0,u)}}}processSync(r){let s=!1,o;return this.freeze(),zu("processSync",this.parser||this.Parser),Iu("processSync",this.compiler||this.Compiler),this.process(r,d),ug("processSync","process",s),o;function d(v,f){s=!0,lg(v),o=f}}run(r,s,o){cg(r),this.freeze();const d=this.transformers;return!o&&typeof s=="function"&&(o=s,s=void 0),o?v(void 0,o):new Promise(v);function v(f,a){const c=Xa(s);d.run(r,c,h);function h(m,u,b){const C=u||r;m?a(m):f?f(C):o(void 0,C,b)}}}runSync(r,s){let o=!1,d;return this.run(r,s,v),ug("runSync","run",o),d;function v(f,a){lg(f),d=a,o=!0}}stringify(r,s){this.freeze();const o=Xa(s),d=this.compiler||this.Compiler;return Iu("stringify",d),cg(r),d(r,o)}use(r,...s){const o=this.attachers,d=this.namespace;if(Uu("use",this.frozen),r!=null)if(typeof r=="function")c(r,s);else if(typeof r=="object")Array.isArray(r)?a(r):f(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function v(h){if(typeof h=="function")c(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...u]=h;c(m,u)}else f(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function f(h){if(!("plugins"in h)&&!("settings"in h))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");a(h.plugins),h.settings&&(d.settings=Bu(!0,d.settings,h.settings))}function a(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const u=h[m];v(u)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function c(h,m){let u=-1,b=-1;for(;++u<o.length;)if(o[u][0]===h){b=u;break}if(b===-1)o.push([h,...m]);else if(m.length>0){let[C,...E]=m;const x=o[b][1];Ju(x)&&Ju(C)&&(C=Bu(!0,x,C)),o[b]=[h,C,...E]}}}}const KC=new Ch().freeze();function zu(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Iu(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function Uu(n,r){if(r)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function cg(n){if(!Ju(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function ug(n,r,s){if(!s)throw new Error("`"+n+"` finished async. Use `"+r+"` instead")}function Xa(n){return YC(n)?n:new __(n)}function YC(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function XC(n){return typeof n=="string"||QC(n)}function QC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const ZC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hg=[],fg={allowDangerousHtml:!0},JC=/^(https?|ircs?|mailto|xmpp)$/i,ew=[{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 v_(n){const r=tw(n),s=nw(n);return iw(r.runSync(r.parse(s),s),n)}function tw(n){const r=n.rehypePlugins||hg,s=n.remarkPlugins||hg,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...fg}:fg;return KC().use(jb).use(s).use(DC,o).use(r)}function nw(n){const r=n.children||"",s=new __;return typeof r=="string"&&(s.value=r),s}function iw(n,r){const s=r.allowedElements,o=r.allowElement,d=r.components,v=r.disallowedElements,f=r.skipHtml,a=r.unwrapDisallowed,c=r.urlTransform||rw;for(const m of ew)Object.hasOwn(r,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+ZC+m.id,void 0);return bh(n,h),vy(n,{Fragment:T.Fragment,components:d,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function h(m,u,b){if(m.type==="raw"&&b&&typeof u=="number")return f?b.children.splice(u,1):b.children[u]={type:"text",value:m.value},u;if(m.type==="element"){let C;for(C in Du)if(Object.hasOwn(Du,C)&&Object.hasOwn(m.properties,C)){const E=m.properties[C],x=Du[C];(x===null||x.includes(m.tagName))&&(m.properties[C]=c(String(E||""),C,m))}}if(m.type==="element"){let C=s?!s.includes(m.tagName):v?v.includes(m.tagName):!1;if(!C&&o&&typeof u=="number"&&(C=!o(m,u,b)),C&&b&&typeof u=="number")return a&&m.children?b.children.splice(u,1,...m.children):b.children.splice(u,1),u}}}function rw(n){const r=n.indexOf(":"),s=n.indexOf("?"),o=n.indexOf("#"),d=n.indexOf("/");return r===-1||d!==-1&&r>d||s!==-1&&r>s||o!==-1&&r>o||JC.test(n.slice(0,r))?n:""}function dg(n,r){const s=String(n);if(typeof r!="string")throw new TypeError("Expected character");let o=0,d=s.indexOf(r);for(;d!==-1;)o++,d=s.indexOf(r,d+r.length);return o}function sw(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function lw(n,r,s){const d=ho((s||{}).ignore||[]),v=aw(r);let f=-1;for(;++f<v.length;)g_(n,"text",a);function a(h,m){let u=-1,b;for(;++u<m.length;){const C=m[u],E=b?b.children:void 0;if(d(C,E?E.indexOf(C):void 0,b))return;b=C}if(b)return c(h,m)}function c(h,m){const u=m[m.length-1],b=v[f][0],C=v[f][1];let E=0;const y=u.children.indexOf(h);let _=!1,g=[];b.lastIndex=0;let S=b.exec(h.value);for(;S;){const k=S.index,M={index:S.index,input:S.input,stack:[...m,h]};let D=C(...S,M);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=k+1:(E!==k&&g.push({type:"text",value:h.value.slice(E,k)}),Array.isArray(D)?g.push(...D):D&&g.push(D),E=k+S[0].length,_=!0),!b.global)break;S=b.exec(h.value)}return _?(E<h.value.length&&g.push({type:"text",value:h.value.slice(E)}),u.children.splice(y,1,...g)):g=[h],y+g.length}}function aw(n){const r=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const s=!n[0]||Array.isArray(n[0])?n:[n];let o=-1;for(;++o<s.length;){const d=s[o];r.push([ow(d[0]),cw(d[1])])}return r}function ow(n){return typeof n=="string"?new RegExp(sw(n),"g"):n}function cw(n){return typeof n=="function"?n:function(){return n}}const Pu="phrasing",Fu=["autolink","link","image","label"];function uw(){return{transforms:[_w],enter:{literalAutolink:fw,literalAutolinkEmail:qu,literalAutolinkHttp:qu,literalAutolinkWww:qu},exit:{literalAutolink:gw,literalAutolinkEmail:mw,literalAutolinkHttp:dw,literalAutolinkWww:pw}}}function hw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Pu,notInConstruct:Fu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Pu,notInConstruct:Fu},{character:":",before:"[ps]",after:"\\/",inConstruct:Pu,notInConstruct:Fu}]}}function fw(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function qu(n){this.config.enter.autolinkProtocol.call(this,n)}function dw(n){this.config.exit.autolinkProtocol.call(this,n)}function pw(n){this.config.exit.data.call(this,n);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(n)}function mw(n){this.config.exit.autolinkEmail.call(this,n)}function gw(n){this.exit(n)}function _w(n){lw(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vw],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),yw]],{ignore:["link","linkReference"]})}function vw(n,r,s,o,d){let v="";if(!y_(d)||(/^w/i.test(r)&&(s=r+s,r="",v="http://"),!Sw(s)))return!1;const f=bw(s+o);if(!f[0])return!1;const a={type:"link",title:null,url:v+r+f[0],children:[{type:"text",value:r+f[0]}]};return f[1]?[a,{type:"text",value:f[1]}]:a}function yw(n,r,s,o){return!y_(o,!0)||/[-\d_]$/.test(s)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+s,children:[{type:"text",value:r+"@"+s}]}}function Sw(n){const r=n.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function bw(n){const r=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!r)return[n,void 0];n=n.slice(0,r.index);let s=r[0],o=s.indexOf(")");const d=dg(n,"(");let v=dg(n,")");for(;o!==-1&&d>v;)n+=s.slice(0,o+1),s=s.slice(o+1),o=s.indexOf(")"),v++;return[n,s]}function y_(n,r){const s=n.input.charCodeAt(n.index-1);return(n.index===0||xr(s)||oo(s))&&(!r||s!==47)}S_.peek=Dw;function Cw(){this.buffer()}function ww(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function xw(){this.buffer()}function Ew(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function kw(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=Bn(this.sliceSerialize(n)).toLowerCase(),s.label=r}function Aw(n){this.exit(n)}function Tw(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=Bn(this.sliceSerialize(n)).toLowerCase(),s.label=r}function Rw(n){this.exit(n)}function Dw(){return"["}function S_(n,r,s,o){const d=s.createTracker(o);let v=d.move("[^");const f=s.enter("footnoteReference"),a=s.enter("reference");return v+=d.move(s.safe(s.associationId(n),{after:"]",before:v})),a(),f(),v+=d.move("]"),v}function Mw(){return{enter:{gfmFootnoteCallString:Cw,gfmFootnoteCall:ww,gfmFootnoteDefinitionLabelString:xw,gfmFootnoteDefinition:Ew},exit:{gfmFootnoteCallString:kw,gfmFootnoteCall:Aw,gfmFootnoteDefinitionLabelString:Tw,gfmFootnoteDefinition:Rw}}}function Lw(n){let r=!1;return n&&n.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:s,footnoteReference:S_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function s(o,d,v,f){const a=v.createTracker(f);let c=a.move("[^");const h=v.enter("footnoteDefinition"),m=v.enter("label");return c+=a.move(v.safe(v.associationId(o),{before:c,after:"]"})),m(),c+=a.move("]:"),o.children&&o.children.length>0&&(a.shift(4),c+=a.move((r?`
75
+ `:" ")+v.indentLines(v.containerFlow(o,a.current()),r?b_:Ow))),h(),c}}function Ow(n,r,s){return r===0?n:b_(n,r,s)}function b_(n,r,s){return(s?"":" ")+n}const Bw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];C_.peek=Iw;function jw(){return{canContainEols:["delete"],enter:{strikethrough:Hw},exit:{strikethrough:zw}}}function Nw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Bw}],handlers:{delete:C_}}}function Hw(n){this.enter({type:"delete",children:[]},n)}function zw(n){this.exit(n)}function C_(n,r,s,o){const d=s.createTracker(o),v=s.enter("strikethrough");let f=d.move("~~");return f+=s.containerPhrasing(n,{...d.current(),before:f,after:"~"}),f+=d.move("~~"),v(),f}function Iw(){return"~"}function Uw(n){return n.length}function Pw(n,r){const s=r||{},o=(s.align||[]).concat(),d=s.stringLength||Uw,v=[],f=[],a=[],c=[];let h=0,m=-1;for(;++m<n.length;){const x=[],y=[];let _=-1;for(n[m].length>h&&(h=n[m].length);++_<n[m].length;){const g=Fw(n[m][_]);if(s.alignDelimiters!==!1){const S=d(g);y[_]=S,(c[_]===void 0||S>c[_])&&(c[_]=S)}x.push(g)}f[m]=x,a[m]=y}let u=-1;if(typeof o=="object"&&"length"in o)for(;++u<h;)v[u]=pg(o[u]);else{const x=pg(o);for(;++u<h;)v[u]=x}u=-1;const b=[],C=[];for(;++u<h;){const x=v[u];let y="",_="";x===99?(y=":",_=":"):x===108?y=":":x===114&&(_=":");let g=s.alignDelimiters===!1?1:Math.max(1,c[u]-y.length-_.length);const S=y+"-".repeat(g)+_;s.alignDelimiters!==!1&&(g=y.length+g+_.length,g>c[u]&&(c[u]=g),C[u]=g),b[u]=S}f.splice(1,0,b),a.splice(1,0,C),m=-1;const E=[];for(;++m<f.length;){const x=f[m],y=a[m];u=-1;const _=[];for(;++u<h;){const g=x[u]||"";let S="",k="";if(s.alignDelimiters!==!1){const M=c[u]-(y[u]||0),D=v[u];D===114?S=" ".repeat(M):D===99?M%2?(S=" ".repeat(M/2+.5),k=" ".repeat(M/2-.5)):(S=" ".repeat(M/2),k=S):k=" ".repeat(M)}s.delimiterStart!==!1&&!u&&_.push("|"),s.padding!==!1&&!(s.alignDelimiters===!1&&g==="")&&(s.delimiterStart!==!1||u)&&_.push(" "),s.alignDelimiters!==!1&&_.push(S),_.push(g),s.alignDelimiters!==!1&&_.push(k),s.padding!==!1&&_.push(" "),(s.delimiterEnd!==!1||u!==h-1)&&_.push("|")}E.push(s.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return E.join(`
76
+ `)}function Fw(n){return n==null?"":String(n)}function pg(n){const r=typeof n=="string"?n.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function qw(n,r,s,o){const d=s.enter("blockquote"),v=s.createTracker(o);v.move("> "),v.shift(2);const f=s.indentLines(s.containerFlow(n,v.current()),Gw);return d(),f}function Gw(n,r,s){return">"+(s?"":" ")+n}function Vw(n,r){return mg(n,r.inConstruct,!0)&&!mg(n,r.notInConstruct,!1)}function mg(n,r,s){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return s;let o=-1;for(;++o<r.length;)if(n.includes(r[o]))return!0;return!1}function gg(n,r,s,o){let d=-1;for(;++d<s.unsafe.length;)if(s.unsafe[d].character===`
77
+ `&&Vw(s.stack,s.unsafe[d]))return/[ \t]/.test(o.before)?"":" ";return`\\
78
+ `}function $w(n,r){const s=String(n);let o=s.indexOf(r),d=o,v=0,f=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===d?++v>f&&(f=v):v=1,d=o+r.length,o=s.indexOf(r,d);return f}function Ww(n,r){return!!(r.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function Kw(n){const r=n.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function Yw(n,r,s,o){const d=Kw(s),v=n.value||"",f=d==="`"?"GraveAccent":"Tilde";if(Ww(n,s)){const u=s.enter("codeIndented"),b=s.indentLines(v,Xw);return u(),b}const a=s.createTracker(o),c=d.repeat(Math.max($w(v,d)+1,3)),h=s.enter("codeFenced");let m=a.move(c);if(n.lang){const u=s.enter(`codeFencedLang${f}`);m+=a.move(s.safe(n.lang,{before:m,after:" ",encode:["`"],...a.current()})),u()}if(n.lang&&n.meta){const u=s.enter(`codeFencedMeta${f}`);m+=a.move(" "),m+=a.move(s.safe(n.meta,{before:m,after:`
79
+ `,encode:["`"],...a.current()})),u()}return m+=a.move(`
80
+ `),v&&(m+=a.move(v+`
81
+ `)),m+=a.move(c),h(),m}function Xw(n,r,s){return(s?"":" ")+n}function wh(n){const r=n.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function Qw(n,r,s,o){const d=wh(s),v=d==='"'?"Quote":"Apostrophe",f=s.enter("definition");let a=s.enter("label");const c=s.createTracker(o);let h=c.move("[");return h+=c.move(s.safe(s.associationId(n),{before:h,after:"]",...c.current()})),h+=c.move("]: "),a(),!n.url||/[\0- \u007F]/.test(n.url)?(a=s.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(s.safe(n.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(a=s.enter("destinationRaw"),h+=c.move(s.safe(n.url,{before:h,after:n.title?" ":`
82
+ `,...c.current()}))),a(),n.title&&(a=s.enter(`title${v}`),h+=c.move(" "+d),h+=c.move(s.safe(n.title,{before:h,after:d,...c.current()})),h+=c.move(d),a()),f(),h}function Zw(n){const r=n.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function Rl(n){return"&#x"+n.toString(16).toUpperCase()+";"}function ro(n,r,s){const o=gs(n),d=gs(r);return o===void 0?d===void 0?s==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:d===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?d===void 0?{inside:!1,outside:!1}:d===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:d===void 0?{inside:!1,outside:!1}:d===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}w_.peek=Jw;function w_(n,r,s,o){const d=Zw(s),v=s.enter("emphasis"),f=s.createTracker(o),a=f.move(d);let c=f.move(s.containerPhrasing(n,{after:d,before:a,...f.current()}));const h=c.charCodeAt(0),m=ro(o.before.charCodeAt(o.before.length-1),h,d);m.inside&&(c=Rl(h)+c.slice(1));const u=c.charCodeAt(c.length-1),b=ro(o.after.charCodeAt(0),u,d);b.inside&&(c=c.slice(0,-1)+Rl(u));const C=f.move(d);return v(),s.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},a+c+C}function Jw(n,r,s){return s.options.emphasis||"*"}function ex(n,r){let s=!1;return bh(n,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return s=!0,Qu}),!!((!n.depth||n.depth<3)&&ph(n)&&(r.options.setext||s))}function tx(n,r,s,o){const d=Math.max(Math.min(6,n.depth||1),1),v=s.createTracker(o);if(ex(n,s)){const m=s.enter("headingSetext"),u=s.enter("phrasing"),b=s.containerPhrasing(n,{...v.current(),before:`
83
+ `,after:`
84
+ `});return u(),m(),b+`
85
+ `+(d===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
86
+ `))+1))}const f="#".repeat(d),a=s.enter("headingAtx"),c=s.enter("phrasing");v.move(f+" ");let h=s.containerPhrasing(n,{before:"# ",after:`
87
+ `,...v.current()});return/^[\t ]/.test(h)&&(h=Rl(h.charCodeAt(0))+h.slice(1)),h=h?f+" "+h:f,s.options.closeAtx&&(h+=" "+f),c(),a(),h}x_.peek=nx;function x_(n){return n.value||""}function nx(){return"<"}E_.peek=ix;function E_(n,r,s,o){const d=wh(s),v=d==='"'?"Quote":"Apostrophe",f=s.enter("image");let a=s.enter("label");const c=s.createTracker(o);let h=c.move("![");return h+=c.move(s.safe(n.alt,{before:h,after:"]",...c.current()})),h+=c.move("]("),a(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(a=s.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(s.safe(n.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(a=s.enter("destinationRaw"),h+=c.move(s.safe(n.url,{before:h,after:n.title?" ":")",...c.current()}))),a(),n.title&&(a=s.enter(`title${v}`),h+=c.move(" "+d),h+=c.move(s.safe(n.title,{before:h,after:d,...c.current()})),h+=c.move(d),a()),h+=c.move(")"),f(),h}function ix(){return"!"}k_.peek=rx;function k_(n,r,s,o){const d=n.referenceType,v=s.enter("imageReference");let f=s.enter("label");const a=s.createTracker(o);let c=a.move("![");const h=s.safe(n.alt,{before:c,after:"]",...a.current()});c+=a.move(h+"]["),f();const m=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...a.current()});return f(),s.stack=m,v(),d==="full"||!h||h!==u?c+=a.move(u+"]"):d==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function rx(){return"!"}A_.peek=sx;function A_(n,r,s){let o=n.value||"",d="`",v=-1;for(;new RegExp("(^|[^`])"+d+"([^`]|$)").test(o);)d+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++v<s.unsafe.length;){const f=s.unsafe[v],a=s.compilePattern(f);let c;if(f.atBreak)for(;c=a.exec(o);){let h=c.index;o.charCodeAt(h)===10&&o.charCodeAt(h-1)===13&&h--,o=o.slice(0,h)+" "+o.slice(c.index+1)}}return d+o+d}function sx(){return"`"}function T_(n,r){const s=ph(n);return!!(!r.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(s===n.url||"mailto:"+s===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}R_.peek=lx;function R_(n,r,s,o){const d=wh(s),v=d==='"'?"Quote":"Apostrophe",f=s.createTracker(o);let a,c;if(T_(n,s)){const m=s.stack;s.stack=[],a=s.enter("autolink");let u=f.move("<");return u+=f.move(s.containerPhrasing(n,{before:u,after:">",...f.current()})),u+=f.move(">"),a(),s.stack=m,u}a=s.enter("link"),c=s.enter("label");let h=f.move("[");return h+=f.move(s.containerPhrasing(n,{before:h,after:"](",...f.current()})),h+=f.move("]("),c(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(c=s.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(s.safe(n.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=s.enter("destinationRaw"),h+=f.move(s.safe(n.url,{before:h,after:n.title?" ":")",...f.current()}))),c(),n.title&&(c=s.enter(`title${v}`),h+=f.move(" "+d),h+=f.move(s.safe(n.title,{before:h,after:d,...f.current()})),h+=f.move(d),c()),h+=f.move(")"),a(),h}function lx(n,r,s){return T_(n,s)?"<":"["}D_.peek=ax;function D_(n,r,s,o){const d=n.referenceType,v=s.enter("linkReference");let f=s.enter("label");const a=s.createTracker(o);let c=a.move("[");const h=s.containerPhrasing(n,{before:c,after:"]",...a.current()});c+=a.move(h+"]["),f();const m=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...a.current()});return f(),s.stack=m,v(),d==="full"||!h||h!==u?c+=a.move(u+"]"):d==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function ax(){return"["}function xh(n){const r=n.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function ox(n){const r=xh(n),s=n.options.bulletOther;if(!s)return r==="*"?"-":"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(s===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+s+"`) to be different");return s}function cx(n){const r=n.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function M_(n){const r=n.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function ux(n,r,s,o){const d=s.enter("list"),v=s.bulletCurrent;let f=n.ordered?cx(s):xh(s);const a=n.ordered?f==="."?")":".":ox(s);let c=r&&s.bulletLastUsed?f===s.bulletLastUsed:!1;if(!n.ordered){const m=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&m&&(!m.children||!m.children[0])&&s.stack[s.stack.length-1]==="list"&&s.stack[s.stack.length-2]==="listItem"&&s.stack[s.stack.length-3]==="list"&&s.stack[s.stack.length-4]==="listItem"&&s.indexStack[s.indexStack.length-1]===0&&s.indexStack[s.indexStack.length-2]===0&&s.indexStack[s.indexStack.length-3]===0&&(c=!0),M_(s)===f&&m){let u=-1;for(;++u<n.children.length;){const b=n.children[u];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(f=a),s.bulletCurrent=f;const h=s.containerFlow(n,o);return s.bulletLastUsed=f,s.bulletCurrent=v,d(),h}function hx(n){const r=n.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function fx(n,r,s,o){const d=hx(s);let v=s.bulletCurrent||xh(s);r&&r.type==="list"&&r.ordered&&(v=(typeof r.start=="number"&&r.start>-1?r.start:1)+(s.options.incrementListMarker===!1?0:r.children.indexOf(n))+v);let f=v.length+1;(d==="tab"||d==="mixed"&&(r&&r.type==="list"&&r.spread||n.spread))&&(f=Math.ceil(f/4)*4);const a=s.createTracker(o);a.move(v+" ".repeat(f-v.length)),a.shift(f);const c=s.enter("listItem"),h=s.indentLines(s.containerFlow(n,a.current()),m);return c(),h;function m(u,b,C){return b?(C?"":" ".repeat(f))+u:(C?v:v+" ".repeat(f-v.length))+u}}function dx(n,r,s,o){const d=s.enter("paragraph"),v=s.enter("phrasing"),f=s.containerPhrasing(n,o);return v(),d(),f}const px=ho(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function mx(n,r,s,o){return(n.children.some(function(f){return px(f)})?s.containerPhrasing:s.containerFlow).call(s,n,o)}function gx(n){const r=n.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}L_.peek=_x;function L_(n,r,s,o){const d=gx(s),v=s.enter("strong"),f=s.createTracker(o),a=f.move(d+d);let c=f.move(s.containerPhrasing(n,{after:d,before:a,...f.current()}));const h=c.charCodeAt(0),m=ro(o.before.charCodeAt(o.before.length-1),h,d);m.inside&&(c=Rl(h)+c.slice(1));const u=c.charCodeAt(c.length-1),b=ro(o.after.charCodeAt(0),u,d);b.inside&&(c=c.slice(0,-1)+Rl(u));const C=f.move(d+d);return v(),s.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},a+c+C}function _x(n,r,s){return s.options.strong||"*"}function vx(n,r,s,o){return s.safe(n.value,o)}function yx(n){const r=n.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function Sx(n,r,s){const o=(M_(s)+(s.options.ruleSpaces?" ":"")).repeat(yx(s));return s.options.ruleSpaces?o.slice(0,-1):o}const O_={blockquote:qw,break:gg,code:Yw,definition:Qw,emphasis:w_,hardBreak:gg,heading:tx,html:x_,image:E_,imageReference:k_,inlineCode:A_,link:R_,linkReference:D_,list:ux,listItem:fx,paragraph:dx,root:mx,strong:L_,text:vx,thematicBreak:Sx};function bx(){return{enter:{table:Cx,tableData:_g,tableHeader:_g,tableRow:xx},exit:{codeText:Ex,table:wx,tableData:Gu,tableHeader:Gu,tableRow:Gu}}}function Cx(n){const r=n._align;this.enter({type:"table",align:r.map(function(s){return s==="none"?null:s}),children:[]},n),this.data.inTable=!0}function wx(n){this.exit(n),this.data.inTable=void 0}function xx(n){this.enter({type:"tableRow",children:[]},n)}function Gu(n){this.exit(n)}function _g(n){this.enter({type:"tableCell",children:[]},n)}function Ex(n){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,kx));const s=this.stack[this.stack.length-1];s.type,s.value=r,this.exit(n)}function kx(n,r){return r==="|"?r:n}function Ax(n){const r=n||{},s=r.tableCellPadding,o=r.tablePipeAlign,d=r.stringLength,v=s?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
88
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:f,tableCell:c,tableRow:a}};function f(C,E,x,y){return h(m(C,x,y),C.align)}function a(C,E,x,y){const _=u(C,x,y),g=h([_]);return g.slice(0,g.indexOf(`
89
+ `))}function c(C,E,x,y){const _=x.enter("tableCell"),g=x.enter("phrasing"),S=x.containerPhrasing(C,{...y,before:v,after:v});return g(),_(),S}function h(C,E){return Pw(C,{align:E,alignDelimiters:o,padding:s,stringLength:d})}function m(C,E,x){const y=C.children;let _=-1;const g=[],S=E.enter("table");for(;++_<y.length;)g[_]=u(y[_],E,x);return S(),g}function u(C,E,x){const y=C.children;let _=-1;const g=[],S=E.enter("tableRow");for(;++_<y.length;)g[_]=c(y[_],C,E,x);return S(),g}function b(C,E,x){let y=O_.inlineCode(C,E,x);return x.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function Tx(){return{exit:{taskListCheckValueChecked:vg,taskListCheckValueUnchecked:vg,paragraph:Dx}}}function Rx(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Mx}}}function vg(n){const r=this.stack[this.stack.length-2];r.type,r.checked=n.type==="taskListCheckValueChecked"}function Dx(n){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const s=this.stack[this.stack.length-1];s.type;const o=s.children[0];if(o&&o.type==="text"){const d=r.children;let v=-1,f;for(;++v<d.length;){const a=d[v];if(a.type==="paragraph"){f=a;break}}f===s&&(o.value=o.value.slice(1),o.value.length===0?s.children.shift():s.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,s.position.start=Object.assign({},o.position.start)))}}this.exit(n)}function Mx(n,r,s,o){const d=n.children[0],v=typeof n.checked=="boolean"&&d&&d.type==="paragraph",f="["+(n.checked?"x":" ")+"] ",a=s.createTracker(o);v&&a.move(f);let c=O_.listItem(n,r,s,{...o,...a.current()});return v&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),c;function h(m){return m+f}}function Lx(){return[uw(),Mw(),jw(),bx(),Tx()]}function Ox(n){return{extensions:[hw(),Lw(n),Nw(),Ax(n),Rx()]}}const Bx={tokenize:Ux,partial:!0},B_={tokenize:Px,partial:!0},j_={tokenize:Fx,partial:!0},N_={tokenize:qx,partial:!0},jx={tokenize:Gx,partial:!0},H_={name:"wwwAutolink",tokenize:zx,previous:I_},z_={name:"protocolAutolink",tokenize:Ix,previous:U_},gi={name:"emailAutolink",tokenize:Hx,previous:P_},Gn={};function Nx(){return{text:Gn}}let wr=48;for(;wr<123;)Gn[wr]=gi,wr++,wr===58?wr=65:wr===91&&(wr=97);Gn[43]=gi;Gn[45]=gi;Gn[46]=gi;Gn[95]=gi;Gn[72]=[gi,z_];Gn[104]=[gi,z_];Gn[87]=[gi,H_];Gn[119]=[gi,H_];function Hx(n,r,s){const o=this;let d,v;return f;function f(u){return!th(u)||!P_.call(o,o.previous)||Eh(o.events)?s(u):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(u))}function a(u){return th(u)?(n.consume(u),a):u===64?(n.consume(u),c):s(u)}function c(u){return u===46?n.check(jx,m,h)(u):u===45||u===95||Vt(u)?(v=!0,n.consume(u),c):m(u)}function h(u){return n.consume(u),d=!0,c}function m(u){return v&&d&&Yt(o.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),r(u)):s(u)}}function zx(n,r,s){const o=this;return d;function d(f){return f!==87&&f!==119||!I_.call(o,o.previous)||Eh(o.events)?s(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(Bx,n.attempt(B_,n.attempt(j_,v),s),s)(f))}function v(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),r(f)}}function Ix(n,r,s){const o=this;let d="",v=!1;return f;function f(u){return(u===72||u===104)&&U_.call(o,o.previous)&&!Eh(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),d+=String.fromCodePoint(u),n.consume(u),a):s(u)}function a(u){if(Yt(u)&&d.length<5)return d+=String.fromCodePoint(u),n.consume(u),a;if(u===58){const b=d.toLowerCase();if(b==="http"||b==="https")return n.consume(u),c}return s(u)}function c(u){return u===47?(n.consume(u),v?h:(v=!0,c)):s(u)}function h(u){return u===null||to(u)||ot(u)||xr(u)||oo(u)?s(u):n.attempt(B_,n.attempt(j_,m),s)(u)}function m(u){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),r(u)}}function Ux(n,r,s){let o=0;return d;function d(f){return(f===87||f===119)&&o<3?(o++,n.consume(f),d):f===46&&o===3?(n.consume(f),v):s(f)}function v(f){return f===null?s(f):r(f)}}function Px(n,r,s){let o,d,v;return f;function f(h){return h===46||h===95?n.check(N_,c,a)(h):h===null||ot(h)||xr(h)||h!==45&&oo(h)?c(h):(v=!0,n.consume(h),f)}function a(h){return h===95?o=!0:(d=o,o=void 0),n.consume(h),f}function c(h){return d||o||!v?s(h):r(h)}}function Fx(n,r){let s=0,o=0;return d;function d(f){return f===40?(s++,n.consume(f),d):f===41&&o<s?v(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?n.check(N_,r,v)(f):f===null||ot(f)||xr(f)?r(f):(n.consume(f),d)}function v(f){return f===41&&o++,n.consume(f),d}}function qx(n,r,s){return o;function o(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(n.consume(a),o):a===38?(n.consume(a),v):a===93?(n.consume(a),d):a===60||a===null||ot(a)||xr(a)?r(a):s(a)}function d(a){return a===null||a===40||a===91||ot(a)||xr(a)?r(a):o(a)}function v(a){return Yt(a)?f(a):s(a)}function f(a){return a===59?(n.consume(a),o):Yt(a)?(n.consume(a),f):s(a)}}function Gx(n,r,s){return o;function o(v){return n.consume(v),d}function d(v){return Vt(v)?s(v):r(v)}}function I_(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||ot(n)}function U_(n){return!Yt(n)}function P_(n){return!(n===47||th(n))}function th(n){return n===43||n===45||n===46||n===95||Vt(n)}function Eh(n){let r=n.length,s=!1;for(;r--;){const o=n[r][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){s=!0;break}if(o._gfmAutolinkLiteralWalkedInto){s=!1;break}}return n.length>0&&!s&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),s}const Vx={tokenize:Jx,partial:!0};function $x(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Xx,continuation:{tokenize:Qx},exit:Zx}},text:{91:{name:"gfmFootnoteCall",tokenize:Yx},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Wx,resolveTo:Kx}}}}function Wx(n,r,s){const o=this;let d=o.events.length;const v=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let f;for(;d--;){const c=o.events[d][1];if(c.type==="labelImage"){f=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return a;function a(c){if(!f||!f._balanced)return s(c);const h=Bn(o.sliceSerialize({start:f.end,end:o.now()}));return h.codePointAt(0)!==94||!v.includes(h.slice(1))?s(c):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),r(c))}}function Kx(n,r){let s=n.length;for(;s--;)if(n[s][1].type==="labelImage"&&n[s][0]==="enter"){n[s][1];break}n[s+1][1].type="data",n[s+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},n[s+3][1].start),end:Object.assign({},n[n.length-1][1].end)},d={type:"gfmFootnoteCallMarker",start:Object.assign({},n[s+3][1].end),end:Object.assign({},n[s+3][1].end)};d.end.column++,d.end.offset++,d.end._bufferIndex++;const v={type:"gfmFootnoteCallString",start:Object.assign({},d.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},v.start),end:Object.assign({},v.end)},a=[n[s+1],n[s+2],["enter",o,r],n[s+3],n[s+4],["enter",d,r],["exit",d,r],["enter",v,r],["enter",f,r],["exit",f,r],["exit",v,r],n[n.length-2],n[n.length-1],["exit",o,r]];return n.splice(s,n.length-s+1,...a),n}function Yx(n,r,s){const o=this,d=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let v=0,f;return a;function a(u){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?s(u):(n.enter("gfmFootnoteCallMarker"),n.consume(u),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(u){if(v>999||u===93&&!f||u===null||u===91||ot(u))return s(u);if(u===93){n.exit("chunkString");const b=n.exit("gfmFootnoteCallString");return d.includes(Bn(o.sliceSerialize(b)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),r):s(u)}return ot(u)||(f=!0),v++,n.consume(u),u===92?m:h}function m(u){return u===91||u===92||u===93?(n.consume(u),v++,h):h(u)}}function Xx(n,r,s){const o=this,d=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let v,f=0,a;return c;function c(E){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(E){return E===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",m):s(E)}function m(E){if(f>999||E===93&&!a||E===null||E===91||ot(E))return s(E);if(E===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return v=Bn(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),b}return ot(E)||(a=!0),f++,n.consume(E),E===92?u:m}function u(E){return E===91||E===92||E===93?(n.consume(E),f++,m):m(E)}function b(E){return E===58?(n.enter("definitionMarker"),n.consume(E),n.exit("definitionMarker"),d.includes(v)||d.push(v),Ye(n,C,"gfmFootnoteDefinitionWhitespace")):s(E)}function C(E){return r(E)}}function Qx(n,r,s){return n.check(Ml,r,n.attempt(Vx,r,s))}function Zx(n){n.exit("gfmFootnoteDefinition")}function Jx(n,r,s){const o=this;return Ye(n,d,"gfmFootnoteDefinitionIndent",5);function d(v){const f=o.events[o.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?r(v):s(v)}}function eE(n){let s=(n||{}).singleTilde;const o={name:"strikethrough",tokenize:v,resolveAll:d};return s==null&&(s=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function d(f,a){let c=-1;for(;++c<f.length;)if(f[c][0]==="enter"&&f[c][1].type==="strikethroughSequenceTemporary"&&f[c][1]._close){let h=c;for(;h--;)if(f[h][0]==="exit"&&f[h][1].type==="strikethroughSequenceTemporary"&&f[h][1]._open&&f[c][1].end.offset-f[c][1].start.offset===f[h][1].end.offset-f[h][1].start.offset){f[c][1].type="strikethroughSequence",f[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},f[h][1].start),end:Object.assign({},f[c][1].end)},u={type:"strikethroughText",start:Object.assign({},f[h][1].end),end:Object.assign({},f[c][1].start)},b=[["enter",m,a],["enter",f[h][1],a],["exit",f[h][1],a],["enter",u,a]],C=a.parser.constructs.insideSpan.null;C&&_n(b,b.length,0,co(C,f.slice(h+1,c),a)),_n(b,b.length,0,[["exit",u,a],["enter",f[c][1],a],["exit",f[c][1],a],["exit",m,a]]),_n(f,h-1,c-h+3,b),c=h+b.length-2;break}}for(c=-1;++c<f.length;)f[c][1].type==="strikethroughSequenceTemporary"&&(f[c][1].type="data");return f}function v(f,a,c){const h=this.previous,m=this.events;let u=0;return b;function b(E){return h===126&&m[m.length-1][1].type!=="characterEscape"?c(E):(f.enter("strikethroughSequenceTemporary"),C(E))}function C(E){const x=gs(h);if(E===126)return u>1?c(E):(f.consume(E),u++,C);if(u<2&&!s)return c(E);const y=f.exit("strikethroughSequenceTemporary"),_=gs(E);return y._open=!_||_===2&&!!x,y._close=!x||x===2&&!!_,a(E)}}}class tE{constructor(){this.map=[]}add(r,s,o){nE(this,r,s,o)}consume(r){if(this.map.sort(function(v,f){return v[0]-f[0]}),this.map.length===0)return;let s=this.map.length;const o=[];for(;s>0;)s-=1,o.push(r.slice(this.map[s][0]+this.map[s][1]),this.map[s][2]),r.length=this.map[s][0];o.push(r.slice()),r.length=0;let d=o.pop();for(;d;){for(const v of d)r.push(v);d=o.pop()}this.map.length=0}}function nE(n,r,s,o){let d=0;if(!(s===0&&o.length===0)){for(;d<n.map.length;){if(n.map[d][0]===r){n.map[d][1]+=s,n.map[d][2].push(...o);return}d+=1}n.map.push([r,s,o])}}function iE(n,r){let s=!1;const o=[];for(;r<n.length;){const d=n[r];if(s){if(d[0]==="enter")d[1].type==="tableContent"&&o.push(n[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(d[1].type==="tableContent"){if(n[r-1][1].type==="tableDelimiterMarker"){const v=o.length-1;o[v]=o[v]==="left"?"center":"right"}}else if(d[1].type==="tableDelimiterRow")break}else d[0]==="enter"&&d[1].type==="tableDelimiterRow"&&(s=!0);r+=1}return o}function rE(){return{flow:{null:{name:"table",tokenize:sE,resolveAll:lE}}}}function sE(n,r,s){const o=this;let d=0,v=0,f;return a;function a(B){let I=o.events.length-1;for(;I>-1;){const $=o.events[I][1].type;if($==="lineEnding"||$==="linePrefix")I--;else break}const U=I>-1?o.events[I][1].type:null,F=U==="tableHead"||U==="tableRow"?D:c;return F===D&&o.parser.lazy[o.now().line]?s(B):F(B)}function c(B){return n.enter("tableHead"),n.enter("tableRow"),h(B)}function h(B){return B===124||(f=!0,v+=1),m(B)}function m(B){return B===null?s(B):Le(B)?v>1?(v=0,o.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(B),n.exit("lineEnding"),C):s(B):qe(B)?Ye(n,m,"whitespace")(B):(v+=1,f&&(f=!1,d+=1),B===124?(n.enter("tableCellDivider"),n.consume(B),n.exit("tableCellDivider"),f=!0,m):(n.enter("data"),u(B)))}function u(B){return B===null||B===124||ot(B)?(n.exit("data"),m(B)):(n.consume(B),B===92?b:u)}function b(B){return B===92||B===124?(n.consume(B),u):u(B)}function C(B){return o.interrupt=!1,o.parser.lazy[o.now().line]?s(B):(n.enter("tableDelimiterRow"),f=!1,qe(B)?Ye(n,E,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):E(B))}function E(B){return B===45||B===58?y(B):B===124?(f=!0,n.enter("tableCellDivider"),n.consume(B),n.exit("tableCellDivider"),x):M(B)}function x(B){return qe(B)?Ye(n,y,"whitespace")(B):y(B)}function y(B){return B===58?(v+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(B),n.exit("tableDelimiterMarker"),_):B===45?(v+=1,_(B)):B===null||Le(B)?k(B):M(B)}function _(B){return B===45?(n.enter("tableDelimiterFiller"),g(B)):M(B)}function g(B){return B===45?(n.consume(B),g):B===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(B),n.exit("tableDelimiterMarker"),S):(n.exit("tableDelimiterFiller"),S(B))}function S(B){return qe(B)?Ye(n,k,"whitespace")(B):k(B)}function k(B){return B===124?E(B):B===null||Le(B)?!f||d!==v?M(B):(n.exit("tableDelimiterRow"),n.exit("tableHead"),r(B)):M(B)}function M(B){return s(B)}function D(B){return n.enter("tableRow"),R(B)}function R(B){return B===124?(n.enter("tableCellDivider"),n.consume(B),n.exit("tableCellDivider"),R):B===null||Le(B)?(n.exit("tableRow"),r(B)):qe(B)?Ye(n,R,"whitespace")(B):(n.enter("data"),A(B))}function A(B){return B===null||B===124||ot(B)?(n.exit("data"),R(B)):(n.consume(B),B===92?L:A)}function L(B){return B===92||B===124?(n.consume(B),A):A(B)}}function lE(n,r){let s=-1,o=!0,d=0,v=[0,0,0,0],f=[0,0,0,0],a=!1,c=0,h,m,u;const b=new tE;for(;++s<n.length;){const C=n[s],E=C[1];C[0]==="enter"?E.type==="tableHead"?(a=!1,c!==0&&(yg(b,r,c,h,m),m=void 0,c=0),h={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(s,0,[["enter",h,r]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(o=!0,u=void 0,v=[0,0,0,0],f=[0,s+1,0,0],a&&(a=!1,m={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(s,0,[["enter",m,r]])),d=E.type==="tableDelimiterRow"?2:m?3:1):d&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(o=!1,f[2]===0&&(v[1]!==0&&(f[0]=f[1],u=Qa(b,r,v,d,void 0,u),v=[0,0,0,0]),f[2]=s)):E.type==="tableCellDivider"&&(o?o=!1:(v[1]!==0&&(f[0]=f[1],u=Qa(b,r,v,d,void 0,u)),v=f,f=[v[1],s,0,0])):E.type==="tableHead"?(a=!0,c=s):E.type==="tableRow"||E.type==="tableDelimiterRow"?(c=s,v[1]!==0?(f[0]=f[1],u=Qa(b,r,v,d,s,u)):f[1]!==0&&(u=Qa(b,r,f,d,s,u)),d=0):d&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(f[3]=s)}for(c!==0&&yg(b,r,c,h,m),b.consume(r.events),s=-1;++s<r.events.length;){const C=r.events[s];C[0]==="enter"&&C[1].type==="table"&&(C[1]._align=iE(r.events,s))}return n}function Qa(n,r,s,o,d,v){const f=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",a="tableContent";s[0]!==0&&(v.end=Object.assign({},ds(r.events,s[0])),n.add(s[0],0,[["exit",v,r]]));const c=ds(r.events,s[1]);if(v={type:f,start:Object.assign({},c),end:Object.assign({},c)},n.add(s[1],0,[["enter",v,r]]),s[2]!==0){const h=ds(r.events,s[2]),m=ds(r.events,s[3]),u={type:a,start:Object.assign({},h),end:Object.assign({},m)};if(n.add(s[2],0,[["enter",u,r]]),o!==2){const b=r.events[s[2]],C=r.events[s[3]];if(b[1].end=Object.assign({},C[1].end),b[1].type="chunkText",b[1].contentType="text",s[3]>s[2]+1){const E=s[2]+1,x=s[3]-s[2]-1;n.add(E,x,[])}}n.add(s[3]+1,0,[["exit",u,r]])}return d!==void 0&&(v.end=Object.assign({},ds(r.events,d)),n.add(d,0,[["exit",v,r]]),v=void 0),v}function yg(n,r,s,o,d){const v=[],f=ds(r.events,s);d&&(d.end=Object.assign({},f),v.push(["exit",d,r])),o.end=Object.assign({},f),v.push(["exit",o,r]),n.add(s+1,0,v)}function ds(n,r){const s=n[r],o=s[0]==="enter"?"start":"end";return s[1][o]}const aE={name:"tasklistCheck",tokenize:cE};function oE(){return{text:{91:aE}}}function cE(n,r,s){const o=this;return d;function d(c){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?s(c):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),v)}function v(c){return ot(c)?(n.enter("taskListCheckValueUnchecked"),n.consume(c),n.exit("taskListCheckValueUnchecked"),f):c===88||c===120?(n.enter("taskListCheckValueChecked"),n.consume(c),n.exit("taskListCheckValueChecked"),f):s(c)}function f(c){return c===93?(n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),a):s(c)}function a(c){return Le(c)?r(c):qe(c)?n.check({tokenize:uE},r,s)(c):s(c)}}function uE(n,r,s){return Ye(n,o,"whitespace");function o(d){return d===null?s(d):r(d)}}function hE(n){return Qg([Nx(),$x(),eE(n),rE(),oE()])}const fE={};function F_(n){const r=this,s=n||fE,o=r.data(),d=o.micromarkExtensions||(o.micromarkExtensions=[]),v=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),f=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);d.push(hE(s)),v.push(Lx()),f.push(Ox(s))}const dE=500,so=`
90
+
91
+ --- Translation ---
92
+ `;function pE({active:n=!0,autoSendEnabled:r,targetLanguage:s,taskSlug:o,role:d,sessionId:v}){const[f,a]=re.useState([]),[c,h]=re.useState([]),[m,u]=re.useState(""),[b,C]=re.useState(!1),[E,x]=re.useState("ready"),[y,_]=re.useState(""),[g,S]=re.useState(Date.now()),[k,M]=re.useState(!1),[D,R]=re.useState(""),[A,L]=re.useState(0),B=re.useRef(n),I=re.useRef(1),U=re.useRef(null);re.useEffect(()=>{B.current=n},[n]),re.useEffect(()=>{a([]),h([]),R(""),x("ready"),_(""),I.current=1;let N=!1,Z;const he=()=>{N||(Z=window.setTimeout(_e,B.current?200:1e3))},_e=async()=>{if(!N)try{const X=await ye.pollTranslationSession(v,I.current);if(N)return;K(X.events),I.current=X.nextCursor,x(X.status),B.current&&_(RE(new Date().toISOString()))}catch(X){N||R(X instanceof Error?X.message:"Translation poll failed.")}finally{he()}};return ye.startTranslationSession(o,d).then(X=>{N||(x(X.status),I.current=X.nextCursor,_e())}).catch(X=>{N||R(X instanceof Error?X.message:"Translation start failed.")}),()=>{N=!0,Z!==void 0&&window.clearTimeout(Z),ye.stopTranslationSession(v).catch(()=>{})}},[v,o,d]),re.useEffect(()=>{if(!n)return;const N=U.current;if(!N)return;const Z=window.requestAnimationFrame(()=>{N.scrollTop=N.scrollHeight});return()=>window.cancelAnimationFrame(Z)},[n,A]);const F=bE(f);re.useEffect(()=>{if(!F)return;S(Date.now());const N=window.setInterval(()=>S(Date.now()),250);return()=>window.clearInterval(N)},[F]);async function $(N=!1){const Z=m;M(!0),R(""),C(!1);try{const he=await ye.translateUserInput(o,d,{text:Z,mode:N?"auto-send":"review-before-send",useContext:!1,send:N});he.sent?(u(""),C(!1)):(u(q_(Z,he.englishPreview)),C(!0))}catch(he){R(he instanceof Error?he.message:"Translation failed.")}finally{M(!1)}}function K(N){if(N.length===0)return;for(const he of N)he.type==="status"?x(he.status):he.type==="error"?R(he.message):he.type==="failures"&&h(he.failures);const Z=N.filter(he=>he.type==="entry");Z.length>0&&(a(he=>{const _e=Z.reduce((q,ce)=>AE(q,ce.entry),he),X=wE(_e);return X.removedIds.size>0&&h(q=>q.filter(ce=>!X.removedIds.has(ce.translationId))),X.entries}),L(he=>he+1))}async function V(){const N=b?bg(m):m;if(N.trim()){M(!0),R("");try{await ye.sendTranslatedInput(o,d,{englishText:N}),u(""),C(!1)}catch(Z){R(Z instanceof Error?Z.message:"Failed to send English input.")}finally{M(!1)}}}function W(N){N.key!=="Enter"||N.shiftKey||N.nativeEvent.isComposing||(N.preventDefault(),!k&&m.trim()&&(b?V():$(r)))}async function J(){a([]),h([]),I.current=1,await ye.clearTranslationSession(v).catch(N=>R(N.message))}async function z(){M(!0),R("");try{const N=await ye.ignoreTranslationFailures(v);h(N.failures)}catch(N){R(N instanceof Error?N.message:"Failed to ignore translation failures.")}finally{M(!1)}}async function j(){M(!0),R("");try{const N=await ye.retryTranslationFailures(v);h(N.failures)}catch(N){R(N instanceof Error?N.message:"Failed to retry translation failures.")}finally{M(!1)}}const H=CE(f,E,g),G=c.length;return T.jsxs("aside",{className:"translation-panel",children:[T.jsxs("header",{className:"translation-panel-header",children:[T.jsxs("div",{className:"translation-panel-titlebar",children:[T.jsx("h2",{children:"Translation"}),T.jsxs("div",{className:"translation-panel-actions",children:[G>0?T.jsxs(T.Fragment,{children:[T.jsxs("button",{type:"button",disabled:k,onClick:()=>void z(),children:["Ignore ",G]}),T.jsxs("button",{type:"button",disabled:k,onClick:()=>void j(),children:["Retry ",G]})]}):null,T.jsx("button",{type:"button",onClick:()=>void J(),children:"Clear"})]})]}),T.jsxs("div",{className:"translation-status-row",children:[T.jsxs("p",{children:["Claude Code · target ",mE(s)," · ",H]}),T.jsx("p",{children:y?`poll ${y}`:"poll -"})]})]}),D?T.jsx("div",{className:"error-banner",children:D}):null,T.jsxs("div",{className:"translation-entry-list",ref:U,children:[f.length===0?T.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,f.map(N=>T.jsx(yE,{entry:N},N.id))]}),T.jsx("div",{className:"translation-composer",children:T.jsxs("div",{className:"translation-composer-row",children:[T.jsx("textarea",{value:m,onChange:N=>{u(N.target.value),(!N.target.value.trim()||b&&!kE(N.target.value))&&C(!1)},onKeyDown:W,placeholder:"输入中文,先翻译成英文工程指令..."}),T.jsx("div",{className:"translation-composer-actions",children:T.jsx("button",{type:"button",disabled:k||!b||!bg(m).trim(),onClick:()=>void V(),children:"Send English"})})]})})]})}function mE(n){var r;return((r=Og.find(s=>s.value===n))==null?void 0:r.label)??n}function gE({open:n,taskSlug:r,targetLanguage:s,onClose:o}){const[d,v]=re.useState(!1),[f,a]=re.useState(""),[c,h]=re.useState(null),[m,u]=re.useState(""),[b,C]=re.useState(""),[E,x]=re.useState(""),[y,_]=re.useState(!1),[g,S]=re.useState(null),[k,M]=re.useState(""),[D,R]=re.useState(""),[A,L]=re.useState(""),[B,I]=re.useState(!1);re.useEffect(()=>{if(!n)return;let W=!1,J;const z=async()=>{W||(await U(!0),W||(J=window.setTimeout(z,2e3)))};return z(),()=>{W=!0,J!==void 0&&window.clearTimeout(J)}},[n,m]);async function U(W=!1){try{const J=await ye.getTranslationState();h(J);const z=m?J.fileIndex.jobs.some(j=>j.id===m):!1;if((!m||!z)&&J.fileIndex.jobs[0])F(J.fileIndex.jobs[0].id);else if(!J.fileIndex.jobs[0])u(""),C(""),x("");else if(W&&m){const j=await ye.readFileTranslation(m);C(j.output),x(j.report)}}catch(J){a(J instanceof Error?J.message:"Failed to load file translations.")}}async function F(W){u(W),C(""),x("");try{const J=await ye.readFileTranslation(W);C(J.output),x(J.report)}catch(J){a(J instanceof Error?J.message:"Failed to read translated file.")}}async function $(){_(!0),await K(k,D)}async function K(W="",J=""){I(!0),a("");try{const z=await ye.browseTranslationSourceFiles({path:W,query:J,limit:250});S(z),M(z.currentPath),R(J)}catch(z){a(z instanceof Error?z.message:"Failed to browse source files.")}finally{I(!1)}}async function V(W=A){const J=W.trim();if(J){v(!0),a("");try{if(!r)throw new Error("Create or select a task before translating files.");const z=await ye.createFileTranslation({taskSlug:r,sourcePath:J,targetLanguage:s});_(!1),await U(),await F(z.id)}catch(z){a(z instanceof Error?z.message:"Failed to create file translation.")}finally{v(!1)}}}return n?T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"modal-backdrop file-translation-backdrop",children:T.jsx(vE,{busy:d,error:f,state:c,selectedJobId:m,output:b,report:E,onClose:()=>{_(!1),o()},onRefresh:()=>void U(),onSelectJob:W=>void F(W),onTranslate:()=>void $()})}),y?T.jsx(_E,{busy:d||B,state:g,currentPath:k,query:D,selectedPath:A,onBrowse:(W,J)=>void K(W,J),onClose:()=>_(!1),onQueryChange:R,onSelectPath:L,onTranslate:()=>void V()}):null]}):null}function _E({busy:n,state:r,currentPath:s,query:o,selectedPath:d,onBrowse:v,onClose:f,onQueryChange:a,onSelectPath:c,onTranslate:h}){const m=(r==null?void 0:r.entries)??[],u=m.filter(C=>C.type==="directory"),b=m.filter(C=>C.type==="file");return T.jsx("div",{className:"modal-backdrop translation-file-browser-backdrop",children:T.jsxs("section",{className:"translation-file-browser-modal",role:"dialog","aria-modal":"true","aria-label":"Select Source File",children:[T.jsxs("header",{children:[T.jsxs("div",{children:[T.jsx("h2",{children:"Select Source File"}),T.jsx("p",{children:s||"."})]}),T.jsx("button",{type:"button",onClick:f,children:"Close"})]}),T.jsxs("div",{className:"translation-file-browser-controls",children:[T.jsxs("div",{className:"translation-file-browser-nav",children:[T.jsx("button",{type:"button",disabled:n||!s,onClick:()=>v((r==null?void 0:r.parentPath)??"",""),children:"Up"}),T.jsx("button",{type:"button",disabled:n||!s,onClick:()=>v("",""),children:"Root"})]}),T.jsxs("form",{className:"translation-file-browser-search",onSubmit:C=>{C.preventDefault(),v(s,o)},children:[T.jsx("input",{value:o,onChange:C=>a(C.target.value),placeholder:"Search files"}),T.jsx("button",{type:"submit",disabled:n,children:"Search"}),T.jsx("button",{type:"button",disabled:n||!o,onClick:()=>v(s,""),children:"Clear"})]})]}),T.jsxs("div",{className:"translation-file-browser-layout",children:[T.jsxs("div",{className:"translation-file-browser-list",children:[n&&!r?T.jsx("p",{className:"muted",children:"Loading files..."}):null,!n&&m.length===0?T.jsx("p",{className:"muted",children:"No source files found."}):null,u.length>0?T.jsxs("div",{className:"translation-file-browser-group",children:[T.jsx("h3",{children:"Folders"}),u.map(C=>T.jsx(Sg,{entry:C,selected:d===C.path,onBrowse:v,onSelectPath:c},C.path))]}):null,b.length>0?T.jsxs("div",{className:"translation-file-browser-group",children:[T.jsx("h3",{children:"Files"}),b.map(C=>T.jsx(Sg,{entry:C,selected:d===C.path,onBrowse:v,onSelectPath:c},C.path))]}):null,r!=null&&r.truncated?T.jsx("p",{className:"translation-entry-note",children:"Result limit reached."}):null]}),T.jsxs("aside",{className:"translation-file-browser-selection",children:[T.jsxs("label",{children:[T.jsx("span",{children:"Source path"}),T.jsx("input",{value:d,onChange:C=>c(C.target.value)})]}),T.jsx("button",{type:"button",disabled:n||!d.trim(),onClick:h,children:"Translate File"})]})]})]})})}function Sg({entry:n,selected:r,onBrowse:s,onSelectPath:o}){const d=n.type==="directory";return T.jsxs("button",{className:r?"translation-file-browser-entry is-selected":"translation-file-browser-entry",type:"button",onClick:()=>d?s(n.path,""):o(n.path),onDoubleClick:()=>d?s(n.path,""):void 0,children:[T.jsx("span",{children:d?"DIR":"FILE"}),T.jsx("strong",{children:n.name}),T.jsx("small",{children:n.path})]})}function vE({busy:n,error:r,state:s,selectedJobId:o,output:d,report:v,onClose:f,onRefresh:a,onSelectJob:c,onTranslate:h}){const m=(s==null?void 0:s.fileIndex.jobs)??[],u=m.find(b=>b.id===o);return T.jsxs("section",{className:"file-translation-modal",role:"dialog","aria-modal":"true","aria-label":"File Translation",children:[T.jsxs("header",{className:"file-translation-header",children:[T.jsxs("div",{children:[T.jsx("h2",{children:"File Translation"}),T.jsx("p",{children:"Claude Code · 中英互译"})]}),T.jsxs("div",{className:"file-translation-toolbar",children:[T.jsx("button",{type:"button",disabled:n,onClick:h,children:"Translate"}),T.jsx("button",{type:"button",disabled:n,onClick:a,children:"Refresh"}),T.jsx("button",{type:"button",onClick:f,children:"Close"})]})]}),r?T.jsx("div",{className:"error-banner",children:r}):null,s!=null&&s.memoryInitialized?null:T.jsx("p",{className:"translation-entry-note",children:"Translation memory is not initialized. Run Bootstrap from the sidebar before important file translations."}),T.jsxs("div",{className:"file-translation-layout",children:[T.jsxs("div",{className:"file-translation-list",children:[m.length===0?T.jsx("p",{className:"muted",children:"No translated files yet."}):null,m.map(b=>T.jsxs("button",{className:b.id===o?"file-translation-item is-active":"file-translation-item",type:"button",onClick:()=>c(b.id),children:[T.jsx("strong",{children:b.sourcePath}),T.jsxs("span",{children:[b.status," · ",b.targetLanguage]})]},b.id))]}),T.jsx("div",{className:"file-translation-preview",children:u?T.jsxs(T.Fragment,{children:[T.jsxs("header",{children:[T.jsx("strong",{children:u.sourcePath}),T.jsx("span",{children:u.status})]}),T.jsx("div",{className:"translation-markdown",children:T.jsx(v_,{remarkPlugins:[F_],children:d||v||"Translation output is not available yet."})})]}):T.jsx("p",{className:"muted",children:"Select a translated file to preview it."})})]})]})}function yE({entry:n}){if(n.sourceKind==="conversation-boundary")return T.jsx(SE,{entry:n});const r=EE(n),s=n.sourceKind==="tool-output",o=n.direction==="user-input-to-english",d=["translation-entry",`is-${n.sourceKind}`,o?"is-user-input":""].filter(Boolean).join(" ");return T.jsxs("article",{className:d,children:[s?T.jsx("pre",{children:r}):T.jsx("div",{className:"translation-markdown",children:T.jsx(v_,{remarkPlugins:[F_],children:r})}),n.warning?T.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?T.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function SE({entry:n}){const r=n.boundaryKind==="end"?"结束":"开始",s=n.conversationTurn??0,o=DE(n.occurredAt??n.createdAt);return T.jsxs("div",{className:"translation-conversation-boundary","aria-label":`${r} 第 ${s} 轮 ${o}`,children:[T.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"}),T.jsx("span",{children:r}),T.jsxs("span",{children:["第 ",s," 轮"]}),T.jsx("time",{children:o}),T.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"})]})}function bE(n){const r=n.find(kh);return(r==null?void 0:r.translationStartedAt)??(r==null?void 0:r.createdAt)}function CE(n,r,s){const o=n.find(kh);if(o)return`translating ${TE(Math.max(0,s-xE(o)))}`;const d=n.at(-1);return(d==null?void 0:d.status)==="failed"||r==="failed"?"error":r}function kh(n){return n.status==="queued"||n.status==="translating"}function wE(n){const r=n.length-dE;if(r<=0)return{entries:n,removedIds:new Set};const s=new Set;for(const o of n){if(s.size>=r)break;kh(o)||s.add(o.id)}return s.size===0?{entries:n,removedIds:s}:{entries:n.filter(o=>!s.has(o.id)),removedIds:s}}function xE(n){const r=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(r)?r:Date.now()}function EE(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.direction==="user-input-to-english"?q_(n.sourceText,n.translatedText):n.translatedText:n.translatedText||n.sourceText}function q_(n,r){return`${n.trimEnd()}${so}${r.trimStart()}`}function kE(n){return n.includes(so)}function bg(n){const r=n.indexOf(so);return r===-1?n:n.slice(r+so.length)}function AE(n,r){return n.findIndex(o=>o.id===r.id)===-1?[...n,r]:n.map(o=>o.id===r.id?r:o)}function TE(n){if(n<1e3)return`${Math.max(.1,n/1e3).toFixed(1)}s`;const r=n/1e3;if(r<60)return`${r.toFixed(1)}s`;const s=Math.floor(r/60),o=Math.floor(r%60).toString().padStart(2,"0");return`${s}:${o}`}function RE(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function DE(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function ME(n,r){return n.find(s=>s.taskSlug===r)??n[0]??null}function LE(n,r){const s=ms.map(o=>({role:o.name,permissionMode:n.roles[o.name].permissionMode,model:n.roles[o.name].model,effort:n.roles[o.name].effort}));if(r.gateReviewerEnabled){const o=n.roles["gate-reviewer"];s.push({role:"gate-reviewer",permissionMode:o.permissionMode,model:o.model,effort:o.effort})}return s}const OE=["architecture-plan","validation-adequacy","final-diff"];function BE({events:n,maxEvents:r=8,showHeader:s=!0}){const o=r===null?n:n.slice(-r);return T.jsxs("section",{className:"event-log",children:[s?T.jsx("h2",{children:"Events"}):null,n.length===0?T.jsx("p",{className:"muted",children:"No terminal events yet."}):T.jsx("ol",{children:o.map((d,v)=>T.jsx("li",{children:d},`${d}-${v}`))})]})}function jE({status:n,bootstrapStatus:r,applyResult:s,hasActiveTask:o=!1,busy:d=!1,onRefresh:v,onApply:f,onOpenStudio:a,onOpenRepositoryDiff:c,onStartBootstrap:h,onRestartBootstrap:m,onStopBootstrap:u,onRunBootstrap:b}){const[C,E]=re.useState(!1),[x,y]=re.useState("default"),[_,g]=re.useState("default"),[S,k]=re.useState("default"),M=r==null?void 0:r.session,D=(r==null?void 0:r.status)==="running",R=(M==null?void 0:M.status)==="running",A=(r==null?void 0:r.status)!=="complete";re.useEffect(()=>{M!=null&&M.permissionMode&&y(M.permissionMode),M!=null&&M.model&&g(M.model),M!=null&&M.effort&&k(M.effort)},[M]);const L={permissionMode:x,model:_,effort:S};return o?n?T.jsxs("section",{className:"harness-panel",children:[T.jsxs("div",{className:"harness-stage",children:[T.jsxs("div",{className:"harness-panel-header",children:[T.jsxs("div",{children:[T.jsx("strong",{children:"Fixed install"}),T.jsx("p",{className:"muted",children:n.initialized?n.needsApply?`${n.plannedChanges.length} pending updates`:"Up to date":"Not initialized"})]}),T.jsx("div",{className:"harness-actions",children:n.initialized?T.jsxs(T.Fragment,{children:[T.jsx("button",{type:"button",disabled:d,onClick:()=>void v(),children:"Refresh"}),n.needsApply?T.jsx("button",{type:"button",disabled:d,onClick:()=>void f(),children:"Update"}):null]}):T.jsx("button",{type:"button",disabled:d,onClick:()=>void f(),children:"Initialize"})})]}),n.initialized&&n.needsApply?T.jsxs(T.Fragment,{children:[T.jsx("h3",{className:"harness-file-list-title",children:"Files to update"}),T.jsx("ol",{className:"harness-file-list",children:n.plannedChanges.map(B=>T.jsxs("li",{children:[T.jsx("span",{children:B.path}),T.jsx(mi,{status:B.action})]},`${B.path}:${B.action}`))})]}):null]}),T.jsx("div",{className:"harness-stage",children:T.jsxs("div",{className:"harness-panel-header",children:[T.jsx("div",{children:T.jsx("strong",{children:"Harness Studio"})}),T.jsxs("div",{className:"harness-actions",children:[T.jsx("button",{type:"button",disabled:d,onClick:c,children:"Review Diff"}),T.jsx("button",{type:"button",disabled:d,onClick:a,children:"Open Studio"})]})]})}),A?T.jsx("div",{className:"harness-stage",children:T.jsxs("div",{className:"harness-panel-header",children:[T.jsxs("div",{children:[T.jsx("strong",{children:"Bootstrap"}),T.jsx("p",{className:"muted",children:r?NE(r.status):"not loaded"})]}),T.jsx("div",{className:"harness-actions",children:T.jsx("button",{type:"button",disabled:d||!(r!=null&&r.canStart),onClick:()=>{E(!0)},children:"Open Bootstrap"})})]})}):null,s!=null&&s.changedFiles.length?T.jsx("div",{className:"harness-result",children:T.jsx("p",{className:"muted",children:s.message})}):null,n.warnings.length>0?T.jsx("ul",{className:"warnings",children:n.warnings.map(B=>T.jsx("li",{children:B},B))}):null,r!=null&&r.warnings.length?T.jsx("ul",{className:"warnings",children:r.warnings.map(B=>T.jsx("li",{children:B},B))}):null,A&&C?T.jsx("div",{className:"harness-bootstrap-modal",role:"dialog","aria-modal":"true","aria-label":"Harness Engineer bootstrap session",children:T.jsxs("div",{className:"harness-bootstrap-modal-surface",children:[T.jsxs("header",{className:"harness-bootstrap-modal-header",children:[T.jsxs("div",{children:[T.jsx("strong",{children:"Harness Engineer Bootstrap"}),T.jsx("p",{className:"muted",children:(M==null?void 0:M.command)??"Start Harness Engineer, then run bootstrap when ready."})]}),T.jsxs("div",{className:"harness-bootstrap-modal-actions",children:[M?T.jsx(mi,{status:M.status}):null,T.jsx("button",{type:"button",onClick:()=>E(!1),children:"Close"})]})]}),T.jsxs("div",{className:"harness-bootstrap-controls",children:[T.jsxs("label",{children:[T.jsx("span",{children:"Permission"}),T.jsxs("select",{value:x,disabled:d||D||R,onChange:B=>y(B.target.value),children:[T.jsx("option",{value:"default",children:"默认"}),T.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"})]})]}),T.jsxs("label",{children:[T.jsx("span",{children:"Model"}),T.jsx("select",{value:_,disabled:d||D||R,onChange:B=>g(B.target.value),children:jg.map(B=>T.jsx("option",{value:B.value,children:B.label},B.value))})]}),T.jsxs("label",{children:[T.jsx("span",{children:"Effort"}),T.jsx("select",{value:S,disabled:d||D||R,onChange:B=>k(B.target.value),children:Ng.map(B=>T.jsx("option",{value:B.value,children:B.label},B.value))})]}),T.jsxs("div",{className:"harness-bootstrap-control-actions",children:[T.jsx("button",{type:"button",disabled:d||D||!(r!=null&&r.canStart),onClick:()=>void h(L),children:"Start"}),T.jsx("button",{type:"button",disabled:d||D||!(r!=null&&r.canStart),onClick:()=>void m(L),children:"Restart"}),T.jsx("button",{type:"button",disabled:d||!M,onClick:()=>void u(),children:"Stop"}),T.jsx("button",{type:"button",disabled:d||D||!R,onClick:()=>void b(),children:"Run bootstrap"})]})]}),T.jsx("div",{className:"harness-bootstrap-terminal",children:R?T.jsx(ao,{sessionId:M.id,active:C}):T.jsxs("div",{className:"terminal-empty",children:[T.jsx("strong",{children:"Harness Bootstrap"}),T.jsx("span",{children:"Start Harness Engineer first. When it is ready, click Run bootstrap to send the prompt."})]})})]})}):null]}):null:T.jsx("section",{className:"harness-panel",children:T.jsxs("div",{className:"harness-result",children:[T.jsx("strong",{children:"Task required"}),T.jsx("p",{className:"muted",children:"Create or select a task before changing VCM Harness. Harness changes are committed in the active task worktree."})]})})}function NE(n){return n.replaceAll("_"," ")}function Ah(n){return{total:n.length,accepted:n.filter(r=>r.acceptedAt).length,delivered:n.filter(r=>r.deliveredAt).length}}function HE(n,r=6){const s=[...n].sort(UE).map((d,v)=>({message:d,sequence:v+1}));return[...r===null?s:s.slice(-r)].sort((d,v)=>v.sequence-d.sequence)}function zE({messages:n,orchestration:r,busy:s,maxMessages:o=6,showControls:d=!0,showHeader:v=!0,onModeChange:f,onMarkAllDone:a}){const[c,h]=re.useState(null),m=Ah(n),u=(r==null?void 0:r.mode)??"auto",b=HE(n,o);async function C(E){await PE(E.body),h(E.id),window.setTimeout(()=>h(x=>x===E.id?null:x),1200)}return T.jsxs("section",{className:"message-panel",children:[v?T.jsxs("div",{className:"message-panel-header",children:[T.jsxs("div",{children:[T.jsx("h2",{children:"Messages"}),T.jsxs("p",{className:"muted",children:[m.total," total / ",m.accepted," accepted"]})]}),d&&f?T.jsx("div",{className:"message-controls",children:T.jsxs("label",{className:"message-mode-toggle",children:[T.jsx("input",{type:"checkbox",checked:u==="auto",disabled:s,onChange:E=>f(E.target.checked?"auto":"manual")}),T.jsx("span",{children:"Auto orchestration"})]})}):null,d&&a?T.jsx("button",{type:"button",disabled:s,onClick:a,children:"Mark All Done"}):null]}):null,n.length===0?T.jsx("p",{className:"muted",children:"No role messages yet."}):T.jsx("ol",{className:"message-list",children:b.map(({message:E,sequence:x})=>T.jsxs("li",{className:"message-item",children:[T.jsxs("div",{className:"message-item-main",children:[T.jsxs("div",{className:"message-meta",children:[T.jsxs("span",{className:"message-sequence",children:["#",x]}),T.jsx("time",{dateTime:lo(E),children:IE(lo(E))}),T.jsxs("strong",{children:[E.fromRole," ","->"," ",E.toRole]}),T.jsx("span",{children:E.type})]}),T.jsx("p",{children:E.body}),E.failureReason?T.jsx("span",{className:"message-reason",children:E.failureReason}):null,E.bodyPath?T.jsx("span",{className:"message-path",children:E.bodyPath}):null]}),T.jsx("div",{className:"message-actions",children:T.jsx("button",{type:"button",disabled:s,onClick:()=>void C(E),children:c===E.id?"Copied":"Copy"})})]},E.id))})]})}function IE(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function lo(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function UE(n,r){const s=lo(n).localeCompare(lo(r));if(s!==0)return s;const o=n.createdAt.localeCompare(r.createdAt);return o!==0?o:n.id.localeCompare(r.id)}async function PE(n){var s;if((s=navigator.clipboard)!=null&&s.writeText){await navigator.clipboard.writeText(n);return}const r=document.createElement("textarea");r.value=n,r.setAttribute("readonly","true"),r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove()}function FE({defaultPath:n="",recentPaths:r=[],busy:s=!1,onConnect:o}){const[d,v]=re.useState(n);re.useEffect(()=>{n&&v(n)},[n]);async function f(a){a.preventDefault(),await o(d)}return T.jsx("form",{className:"repo-connect",onSubmit:f,children:T.jsxs("div",{className:r.length>0?"inline-form has-recent-paths":"inline-form",children:[T.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:d,onChange:a=>v(a.target.value),placeholder:"/path/to/repo"}),r.length>0?T.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:a=>{a.target.value&&v(a.target.value)},children:[T.jsx("option",{value:"",children:"Recent"}),r.map(a=>T.jsx("option",{value:a,children:a},a))]}):null,T.jsx("button",{type:"submit",disabled:s||!d.trim(),children:"Connect"})]})})}function qE({tasks:n,activeTaskSlug:r,onSelect:s}){return T.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(o=>T.jsxs("button",{className:o.taskSlug===r?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>s(o.taskSlug),children:[T.jsx("span",{children:o.title||o.taskSlug}),T.jsx(mi,{status:o.status})]},o.taskSlug))})}function GE({project:n,recentRepositoryPaths:r,tasks:s,activeTaskSlug:o,messages:d,orchestration:v,events:f,roundState:a,gateReview:c,translationEnabled:h,translationAutoSendEnabled:m,translationTargetLanguage:u,translationOutputMode:b,translatorSession:C,harnessStatus:E,harnessBootstrapStatus:x,harnessApplyResult:y,gatewayStatus:_,gatewayQrLogin:g,gatewayQrCheck:S,busy:k,onConnect:M,onRefreshConnectedRepository:D,onPullConnectedRepository:R,onRefreshHarness:A,onApplyHarness:L,onStartHarnessBootstrap:B,onRestartHarnessBootstrap:I,onStopHarnessBootstrap:U,onRunHarnessBootstrap:F,onOpenHarnessStudio:$,onOpenRepositoryDiff:K,onRefreshGateway:V,onGatewayEnabledChange:W,onGatewayTranslationChange:J,onStartGatewayQrLogin:z,onResetGatewayBinding:j,onGateReviewGateEnabledChange:H,onTranslationEnabledChange:G,onTranslationAutoSendChange:N,onTranslationTargetLanguageChange:Z,onTranslationOutputModeChange:he,onOpenFileTranslation:_e,onOpenTranslatorSession:X,onCreateTranslationBootstrap:q,onUpdateTranslationMemory:ce,onCreateTask:te,onSelectTask:se,themeMode:de,onThemeModeChange:Ce,flowPauseAlerts:xe,onFlowPauseAlertsChange:We,permissionRequestMode:dt,onPermissionRequestModeChange:De,launchTemplate:Wt,canSaveLaunchTemplate:Pt,canOneClickStart:Xt,onSaveLaunchTemplate:Qt,onOneClickStart:vn,onTryFlowPauseAlert:St,onMarkAllMessagesDone:Xe,onDeleteMessageHistory:pt}){const[fe,Se]=re.useState(""),[Ae,Be]=re.useState(!1),[je,ct]=re.useState(!1),[Ee,et]=re.useState(()=>o?null:"repository-path"),ut=Ah(d),mt=fe.trim(),Ke=KE(n,o,E),Ft=s.find(He=>He.taskSlug===o)??null;re.useEffect(()=>{et(He=>o&&He==="repository-path"?null:!o&&He===null?"repository-path":He)},[o]);function ht(He,_i){et(_i?He:null)}async function Ji(He){He.preventDefault(),await te({taskSlug:mt}),Se("")}return T.jsxs("div",{className:"project-dashboard",children:[T.jsx("header",{className:"brand-header",children:T.jsx("strong",{children:"VibeCodingMaster"})}),T.jsx(pi,{title:"Repository Path",open:Ee==="repository-path",onOpenChange:He=>ht("repository-path",He),children:T.jsx(FE,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:r,busy:k,onConnect:M})}),n?T.jsx(pi,{title:"Connected Repository",open:Ee==="connected-repository",onOpenChange:He=>{ht("connected-repository",He),He&&D()},children:T.jsx(ZE,{busy:k,project:n,onPull:R})}):null,T.jsx(pi,{title:"Settings",open:Ee==="settings",onOpenChange:He=>ht("settings",He),children:T.jsxs("div",{className:"sidebar-settings",children:[T.jsxs("button",{"aria-label":`Theme mode: ${wg(de)}`,className:"settings-toggle theme-mode-toggle",disabled:k,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>Ce(i2(de)),children:[T.jsx("span",{children:"Theme"}),T.jsx("span",{children:wg(de)})]}),T.jsxs("button",{"aria-pressed":!(_!=null&&_.enabled)&&xe,className:!(_!=null&&_.enabled)&&xe?"settings-toggle is-active":"settings-toggle",disabled:k||(_==null?void 0:_.enabled),title:_!=null&&_.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:()=>We(!xe),children:[T.jsx("span",{children:"Flow pause alert"}),T.jsx("span",{children:_!=null&&_.enabled?"off":xe?"on":"off"})]}),T.jsxs("button",{className:"settings-toggle",disabled:k||(_==null?void 0:_.enabled),title:_!=null&&_.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:St,children:[T.jsx("span",{children:"Try alert"}),T.jsx("span",{children:"test"})]}),T.jsxs("label",{className:"settings-select-row",children:[T.jsx("span",{children:"Permission requests"}),T.jsxs("select",{value:dt,disabled:k,onChange:He=>De(He.target.value),children:[T.jsx("option",{value:"off",children:"off"}),T.jsx("option",{value:"allowAll",children:"allow all"})]})]}),T.jsxs("button",{className:"settings-toggle",disabled:k||!Pt,title:"Save the current core role launch settings and optional Gate Reviewer settings",type:"button",onClick:Qt,children:[T.jsx("span",{children:"Save launch template"}),T.jsx("span",{children:Pt?"ready":"needs core sessions"})]}),Xt?T.jsxs("button",{className:"settings-toggle is-active",disabled:k,title:VE(Wt),type:"button",onClick:vn,children:[T.jsx("span",{children:"One-click start"}),T.jsx("span",{children:G_(Wt)})]}):null,o?T.jsxs(T.Fragment,{children:[T.jsxs("button",{type:"button",onClick:()=>Be(!0),children:[T.jsx("span",{children:"Messages"}),T.jsxs("span",{className:"muted",children:[ut.total," total"]})]}),T.jsxs("button",{type:"button",onClick:()=>ct(!0),children:[T.jsx("span",{children:"Events"}),T.jsxs("span",{className:"muted",children:[f.length," total"]})]})]}):null]})}),T.jsx(pi,{title:"Translation",open:Ee==="translation",onOpenChange:He=>ht("translation",He),children:T.jsx($E,{busy:k,enabled:h,autoSendEnabled:m,targetLanguage:u,outputMode:b,baseUnavailableReason:Ke,translatorSession:C,onAutoSendChange:N,onCreateBootstrap:q,onEnabledChange:G,onUpdateMemory:ce,onTargetLanguageChange:Z,onOutputModeChange:he,onOpenFileTranslation:_e,onOpenTranslatorSession:X})}),n&&o?T.jsx(pi,{title:"Gate Review Gates",open:Ee==="gate-review-gates",onOpenChange:He=>ht("gate-review-gates",He),children:T.jsx(YE,{busy:k,state:c,onGateEnabledChange:H})}):null,T.jsx(pi,{title:"Gateway",open:Ee==="gateway",onOpenChange:He=>{ht("gateway",He),He&&V()},children:T.jsx(QE,{busy:k,qrCheck:S,qrLogin:g,status:_,onEnabledChange:W,onResetBinding:j,onStartQrLogin:z,onTranslationChange:J})}),n?T.jsx(pi,{title:"VCM Harness",open:Ee==="vcm-harness",onOpenChange:He=>ht("vcm-harness",He),children:T.jsx(jE,{status:E,bootstrapStatus:x,applyResult:y,hasActiveTask:!!Ft,busy:k,onRefresh:A,onApply:L,onOpenStudio:$,onOpenRepositoryDiff:K,onStartBootstrap:B,onRestartBootstrap:I,onStopBootstrap:U,onRunBootstrap:F})}):null,n?T.jsx(pi,{title:"New Task",open:Ee==="new-task",onOpenChange:He=>ht("new-task",He),children:T.jsx("div",{className:"task-create",children:T.jsxs("form",{onSubmit:Ji,children:[T.jsx("input",{value:fe,onChange:He=>Se(He.target.value),placeholder:"task name"}),T.jsxs("div",{className:"task-create-preview",children:[T.jsxs("small",{children:["branch: ",mt?`feature/${mt}`:"feature/<task>"]}),T.jsxs("small",{children:["worktree: ",mt?`.claude/worktrees/${mt}`:".claude/worktrees/<task>"]})]}),T.jsx("button",{type:"submit",disabled:k||!mt,children:"Create"})]})})}):null,s.length>0?T.jsx(pi,{title:"Tasks",open:Ee==="tasks",onOpenChange:He=>ht("tasks",He),children:T.jsx(qE,{tasks:s,activeTaskSlug:o,onSelect:se})}):null,n&&Ft?T.jsx(t2,{task:Ft,roundState:a}):null,Ae?T.jsx(s2,{busy:k,messages:d,orchestration:v,onClose:()=>Be(!1),onMarkAllDone:()=>{o&&Xe(o)},onDeleteMessageHistory:()=>{o&&pt(o)}}):null,je?T.jsx(r2,{events:f,onClose:()=>ct(!1)}):null]})}function G_(n){return[n.autoOrchestration?"auto":"manual"].join(" + ")}function VE(n){const r=Object.entries(n.roles).map(([s,o])=>`${s}: ${o.permissionMode} / ${o.model} / ${o.effort}`).join("; ");return`Launch template: ${G_(n)}; ${r}`}function $E({autoSendEnabled:n,baseUnavailableReason:r,busy:s,enabled:o,outputMode:d,targetLanguage:v,translatorSession:f,onAutoSendChange:a,onCreateBootstrap:c,onEnabledChange:h,onUpdateMemory:m,onOutputModeChange:u,onTargetLanguageChange:b,onOpenFileTranslation:C,onOpenTranslatorSession:E}){const x=!!(s||r),y=(f==null?void 0:f.status)==="running",_=!!(o&&!r&&y),g=r??(y?null:"Start Translator session first."),S=!!(s||g),M=r??"Open Translator session",D=g??"Translation tools are ready";return T.jsxs("div",{className:"sidebar-settings",children:[T.jsxs("button",{"aria-pressed":_,className:_?"settings-toggle is-active":"settings-toggle",disabled:x||!y,title:D,type:"button",onClick:()=>h(!_),children:[T.jsx("span",{children:"Conversation translation"}),T.jsx("span",{children:_?"on":"off"})]}),T.jsxs("button",{"aria-pressed":n,className:n?"settings-toggle is-active":"settings-toggle",disabled:x,type:"button",onClick:()=>a(!n),children:[T.jsx("span",{children:"Auto-send"}),T.jsx("span",{children:n?"on":"off"})]}),T.jsxs("label",{className:"settings-select-row",children:[T.jsx("span",{children:"Language"}),T.jsx("select",{value:v,disabled:x,onChange:R=>b(R.target.value),children:Og.map(R=>T.jsx("option",{value:R.value,children:R.label},R.value))})]}),T.jsxs("label",{className:"settings-select-row",children:[T.jsx("span",{children:"Reply scope"}),T.jsx("select",{value:d,disabled:x,onChange:R=>u(R.target.value),children:x1.map(R=>T.jsx("option",{value:R.value,children:R.label},R.value))})]}),T.jsxs("button",{className:"settings-toggle",disabled:S,title:D,type:"button",onClick:C,children:[T.jsx("span",{children:"File translation"}),T.jsx("span",{children:"open"})]}),T.jsxs("button",{className:"settings-toggle",disabled:S,title:D,type:"button",onClick:c,children:[T.jsx("span",{children:"Bootstrap"}),T.jsx("span",{children:"run"})]}),T.jsxs("button",{className:"settings-toggle",disabled:S,title:D,type:"button",onClick:m,children:[T.jsx("span",{children:"Update memory"}),T.jsx("span",{children:"run"})]}),g?T.jsx("p",{className:"settings-help-text",children:g}):null,T.jsxs("div",{className:"settings-status-row",children:[T.jsx("span",{children:"Session status"}),T.jsx("strong",{children:WE(f)})]}),T.jsxs("button",{className:"settings-toggle",disabled:x,title:M,type:"button",onClick:E,children:[T.jsx("span",{children:"Open Session"}),T.jsx("span",{children:"open"})]})]})}function WE(n){return n?n.status==="running"?n.activityStatus??"idle":n.status:"not started"}function KE(n,r,s){return n?r?s?s.initialized?null:"Initialize VCM Harness first.":"Load VCM Harness status first.":"Create or select a task first.":"Connect a repository first."}function YE({busy:n,onGateEnabledChange:r,state:s}){return T.jsx("div",{className:"sidebar-settings",children:OE.map(o=>{const d=s==null?void 0:s.gates[o],v=!!(d!=null&&d.required);return T.jsxs("button",{"aria-pressed":v,className:v?"settings-toggle is-active":"settings-toggle",disabled:n||!s,title:d!=null&&d.status?`status: ${d.status}`:void 0,type:"button",onClick:()=>r(o,!v),children:[T.jsx("span",{children:XE(o)}),T.jsx("span",{children:v?"on":"off"})]},o)})})}function XE(n){switch(n){case"architecture-plan":return"Architecture plan";case"validation-adequacy":return"Validation adequacy";case"final-diff":return"Final diff"}return n}function QE({busy:n,onEnabledChange:r,onResetBinding:s,onStartQrLogin:o,onTranslationChange:d,qrCheck:v,qrLogin:f,status:a}){const c=!!(a!=null&&a.binding.tokenConfigured),h=!!(a!=null&&a.binding.tokenConfigured);return T.jsxs("div",{className:"gateway-panel",children:[T.jsxs("div",{className:"gateway-actions",children:[T.jsxs("button",{"aria-pressed":!!(a!=null&&a.enabled),className:a!=null&&a.enabled?"settings-toggle is-active":"settings-toggle",disabled:n||!a||!a.enabled&&!c,title:c?"Enable or disable PM messages and task-changing Gateway commands":"Scan and confirm iLink login first",type:"button",onClick:()=>a?r(!a.enabled):void 0,children:[T.jsx("span",{children:"Gateway"}),T.jsx("span",{children:a!=null&&a.enabled?"on":"off"})]}),T.jsxs("button",{"aria-pressed":!!(a!=null&&a.translationEnabled),className:a!=null&&a.translationEnabled?"settings-toggle is-active":"settings-toggle",disabled:n||!a,type:"button",onClick:()=>a?d(!a.translationEnabled):void 0,children:[T.jsx("span",{children:"Translation"}),T.jsx("span",{children:a!=null&&a.translationEnabled?"on":"off"})]}),h?T.jsx("button",{className:"danger-button",type:"button",disabled:n,onClick:s,children:"Reset Binding"}):T.jsx("button",{type:"button",disabled:n,onClick:o,children:"Start QR Login"})]}),f?T.jsx("p",{className:"muted",children:"QR login started. Use the login dialog to confirm binding."}):null,v?T.jsxs("p",{className:"muted",children:["QR status: ",v.status,v.message?` · ${v.message}`:""]}):null]})}function ZE({busy:n,onPull:r,project:s}){const o=s.pullDisabledReason,d=!!s.canPull;return T.jsxs("div",{className:"project-summary",children:[T.jsxs("dl",{children:[T.jsxs("div",{children:[T.jsx("dt",{children:"Base path"}),T.jsx("dd",{children:s.repoRoot})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Branch"}),T.jsx("dd",{children:JE(s)})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Remote"}),T.jsx("dd",{children:s.upstreamBranch??"no upstream"})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Status"}),T.jsx("dd",{children:e2(s)})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Commit"}),T.jsx("dd",{children:s.shortHeadCommit??s.headCommit??"unknown"})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Working tree"}),T.jsx("dd",{children:s.isDirty?"uncommitted changes":"clean"})]})]}),T.jsxs("div",{className:"connected-repo-actions",children:[T.jsx("button",{type:"button",disabled:n||!d,title:o??"Pull latest changes with git pull --ff-only",onClick:()=>void r(),children:"Pull"}),T.jsx("span",{className:"muted",children:s.checkedAt?`checked ${nh(s.checkedAt)}`:"status not refreshed"})]}),o?T.jsx("p",{className:"muted",children:o}):null,s.warnings.length>0?T.jsx("ul",{className:"warnings",children:s.warnings.map(v=>T.jsx("li",{children:v},v))}):null]})}function JE(n){return n.branch||"unknown"}function e2(n){if(!n.upstreamBranch)return"no upstream";const r=n.ahead??0,s=n.behind??0;return r===0&&s===0?"up to date":r>0&&s>0?`ahead ${r}, behind ${s}`:r>0?`ahead ${r}`:`behind ${s}`}function t2({roundState:n,task:r}){var m;const[s,o]=re.useState(()=>Date.now()),d=!!(n!=null&&n.startedAt),v=V_(r.createdAt,s),f=Cg(n,(n==null?void 0:n.totalCcActiveMs)??0,s),a=d&&n?Cg(n,n.currentRoundCcActiveMs,s):0,c=d&&n?n2(n,s):0,h=((m=r.title)==null?void 0:m.trim())||r.taskSlug;return re.useEffect(()=>{const u=window.setInterval(()=>o(Date.now()),1e3);return()=>window.clearInterval(u)},[]),T.jsxs("section",{className:"task-status-dock","aria-label":"VCM Session status",children:[T.jsxs("div",{className:"task-status-dock-title",children:[T.jsx("strong",{title:h,children:h}),T.jsx("span",{className:`status-badge status-${r.status}`,children:r.status})]}),T.jsxs("dl",{className:"task-status-stats",children:[T.jsxs("div",{children:[T.jsx("dt",{children:"Session start"}),T.jsx("dd",{children:nh(r.createdAt)})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Session total"}),T.jsx("dd",{children:Za(v)})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Rounds"}),T.jsx("dd",{children:(n==null?void 0:n.totalRoundCount)??0})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Role runtime"}),T.jsx("dd",{children:Za(f)})]})]}),d&&n?T.jsxs("div",{className:"current-round-status",children:[T.jsxs("div",{className:"current-round-title",children:[T.jsx("span",{children:n.status==="running"?"Current Round":"Last Round"}),T.jsx("span",{className:`status-badge status-${n.status}`,children:n.status})]}),T.jsxs("dl",{className:"task-status-stats",children:[T.jsxs("div",{children:[T.jsx("dt",{children:"Started"}),T.jsx("dd",{children:nh(n.startedAt)})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Total"}),T.jsx("dd",{children:Za(c)})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Role runtime"}),T.jsx("dd",{children:Za(a)})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Turn count"}),T.jsx("dd",{children:n.turnCount})]})]})]}):null]})}function Cg(n,r,s){if(!(n!=null&&n.activeTurnStartedAt)||n.status!=="running")return r;const o=Date.parse(n.updatedAt);return Number.isFinite(o)?r+Math.max(0,s-o):r}function n2(n,r){const s=n.status==="running"?r:Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return V_(n.startedAt??"",Number.isFinite(s)?s:r)}function V_(n,r){const s=Date.parse(n);return Number.isFinite(s)?Math.max(0,r-s):0}function nh(n){if(!n)return"-";const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(r)}function Za(n){const r=Math.max(0,Math.floor(n/1e3)),s=Math.floor(r/3600),o=Math.floor(r%3600/60),d=r%60;return s>0?o>0?`${s}h ${o}m`:`${s}h`:o>0?d>0?`${o}m ${d}s`:`${o}m`:`${d}s`}function i2(n){return n==="system"?"light":n==="light"?"dark":"system"}function wg(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function r2({events:n,onClose:r}){return T.jsx("div",{className:"modal-backdrop",children:T.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[T.jsxs("header",{children:[T.jsxs("div",{children:[T.jsx("h2",{children:"Events"}),T.jsxs("p",{className:"muted",children:[n.length," total"]})]}),T.jsx("button",{type:"button",onClick:r,children:"Close"})]}),T.jsx(BE,{events:n,maxEvents:null,showHeader:!1})]})})}function s2({busy:n,messages:r,orchestration:s,onClose:o,onMarkAllDone:d,onDeleteMessageHistory:v}){const f=Ah(r);function a(){window.confirm(["Clear all pending route-file messages?","","Use this only after you manually copied or handled stuck route-file messages.","VCM will clear non-empty handoff message files so Stop-hook orchestration can continue."].join(`
93
+ `))&&d()}function c(){window.confirm([`Delete ${f.total} message histor${f.total===1?"y item":"y items"}?`,"","This removes message history from the Messages panel.","Pending route-file messages are not touched."].join(`
94
+ `))&&v()}return T.jsx("div",{className:"modal-backdrop",children:T.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[T.jsxs("header",{children:[T.jsxs("div",{children:[T.jsx("h2",{children:"Messages"}),T.jsxs("p",{className:"muted",children:[f.total," total / ",f.accepted," accepted",s?` · ${s.mode}`:""]})]}),T.jsxs("div",{className:"modal-actions",children:[T.jsx("button",{type:"button",disabled:n,onClick:a,children:"Mark All Done"}),T.jsx("button",{type:"button",disabled:n||f.total===0,onClick:c,children:"Delete All"}),T.jsx("button",{type:"button",onClick:o,children:"Close"})]})]}),T.jsx(zE,{busy:n,maxMessages:null,messages:r,orchestration:s,showControls:!1,showHeader:!1})]})})}function pi({children:n,onOpenChange:r,open:s,title:o}){return T.jsxs("section",{className:"sidebar-section",children:[T.jsxs("button",{"aria-expanded":s,className:"sidebar-section-toggle",type:"button",onClick:()=>{r==null||r(!s)},children:[T.jsx("span",{children:o}),T.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),s?T.jsx("div",{className:"sidebar-section-content",children:n}):null]})}function $_(n,r){return n.find(s=>s.role===r)}function l2({activeRole:n,roles:r=lh,sessions:s,onSelect:o}){return T.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:r.map(d=>{const v=$_(s,d.name),f=(v==null?void 0:v.status)==="running"?v.activityStatus??"idle":(v==null?void 0:v.status)??"not_started";return T.jsxs("button",{className:d.name===n?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":d.name===n,onClick:()=>o(d.name),children:[T.jsx("span",{children:d.label}),T.jsx(mi,{status:f})]},d.name)})})}function a2({role:n,session:r,permissionMode:s,model:o,effort:d,active:v=!0,busy:f,translationEnabled:a,translationAutoSendEnabled:c,translationTargetLanguage:h,onPermissionModeChange:m,onModelChange:u,onEffortChange:b,onStart:C,onResume:E,onStop:x,onRestart:y,onNotifyHarnessUpdated:_,onTerminalEvent:g}){const S=b1(n)&&a&&(r==null?void 0:r.status)==="running";return T.jsx("section",{className:"session-console",children:T.jsxs("div",{className:S?"session-console-body has-translation":"session-console-body",children:[T.jsxs("div",{className:"terminal-pane",children:[T.jsx(ah,{role:n,session:r,permissionMode:s,model:o,effort:d,busy:f,onPermissionModeChange:m,onModelChange:u,onEffortChange:b,onStart:C,onResume:E,onStop:x,onRestart:y,onNotifyHarnessUpdated:_}),(r==null?void 0:r.status)==="running"?T.jsx(ao,{sessionId:r.id,active:v,onEvent:g},r.id):T.jsxs("div",{className:"terminal-empty",children:[T.jsx("strong",{children:n}),T.jsx("span",{children:r!=null&&r.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]}),S?T.jsx("div",{className:"translation-pane",children:T.jsx(pE,{active:v,autoSendEnabled:c,targetLanguage:h,taskSlug:r.taskSlug,role:n,sessionId:r.id},r.id)}):null]})})}function o2(n,r,s){var v;if(!n||s.mode!=="auto")return null;const o=new Map(n.map(f=>[f.id,f])),d=r.filter(f=>{var a;return f.dispatchingAt?((a=o.get(f.id))==null?void 0:a.dispatchingAt)!==f.dispatchingAt:!1});return d.length===0?null:((v=d.sort(c2)[d.length-1])==null?void 0:v.toRole)??null}function c2(n,r){const s=n.dispatchingAt??n.deliveredAt??n.acceptedAt??"",o=r.dispatchingAt??r.deliveredAt??r.acceptedAt??"";return s!==o?s.localeCompare(o):n.createdAt.localeCompare(r.createdAt)}const u2=2e3;function h2({task:n,activeRole:r,gateReviewerEnabled:s,translationEnabled:o,translationAutoSendEnabled:d,translationTargetLanguage:v,refreshNonce:f=0,onTaskChanged:a,onActiveRoleChange:c,onMessagesChanged:h,onOrchestrationChanged:m,onRoundStateChanged:u,onEventsChanged:b,onLaunchStateChanged:C}){const[E,x]=re.useState(null),[y,_]=re.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","gate-reviewer":"default",translator:"default","harness-engineer":"default"}),[g,S]=re.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","gate-reviewer":"default",translator:"default","harness-engineer":"default"}),[k,M]=re.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","gate-reviewer":"default",translator:"medium","harness-engineer":"medium"}),[D,R]=re.useState(!1),[A,L]=re.useState(""),[B,I]=re.useState([]),[U,F]=re.useState(null),$=re.useRef(null),K=re.useRef(""),V=!!(E!=null&&E.sessions.some(te=>te.role==="gate-reviewer")),W=s||V,J=[...ms,...W?[Dg]:[]],z=re.useCallback((te,se)=>{var xe;const de=((xe=$.current)==null?void 0:xe.taskSlug)===n.taskSlug?$.current.messages:null,Ce=o2(de,te,se);$.current={taskSlug:n.taskSlug,messages:te},F(se),h==null||h(te),m==null||m(se),Ce&&(c(Ce),Z(`auto switched to ${Ce} before VCM dispatch`))},[c,h,m,n.taskSlug]),j=re.useCallback((te,se,de,Ce)=>{x(te),z(se,de),u==null||u(Ce)},[z,u]),H=re.useCallback(async()=>{const[te,se,de,Ce]=await Promise.all([ye.getTaskStatus(n.taskSlug),ye.listMessages(n.taskSlug),ye.getOrchestrationState(n.taskSlug),ye.getSessionRoundState(n.taskSlug)]);j(te,se,de,Ce)},[j,n.taskSlug]);re.useEffect(()=>{H().catch(te=>L(te.message))},[H,f]),re.useEffect(()=>{I([]),b==null||b([])},[b,n.taskSlug]),re.useEffect(()=>{E&&!W&&r==="gate-reviewer"&&c("project-manager"),E&&r==="translator"&&c("project-manager")},[r,W,c,E]),re.useEffect(()=>{const te=E==null?void 0:E.task;if(!te||te.taskSlug!==n.taskSlug)return;const se=xg(te);if(se===xg(n)){K.current="";return}K.current!==se&&(K.current=se,a().catch(de=>{K.current="",L(de.message)}))},[a,E==null?void 0:E.task,n]),re.useEffect(()=>{_(te=>{let se=!1;const de={...te};for(const Ce of(E==null?void 0:E.sessions)??[])de[Ce.role]!==Ce.permissionMode&&(de[Ce.role]=Ce.permissionMode,se=!0);return se?de:te})},[E==null?void 0:E.sessions]),re.useEffect(()=>{S(te=>{let se=!1;const de={...te};for(const Ce of(E==null?void 0:E.sessions)??[]){const xe=Ce.model??"default";de[Ce.role]!==xe&&(de[Ce.role]=xe,se=!0)}return se?de:te})},[E==null?void 0:E.sessions]),re.useEffect(()=>{M(te=>{let se=!1;const de={...te};for(const Ce of(E==null?void 0:E.sessions)??[]){const xe=Ce.effort??"default";de[Ce.role]!==xe&&(de[Ce.role]=xe,se=!0)}return se?de:te})},[E==null?void 0:E.sessions]),re.useEffect(()=>{const se=((E==null?void 0:E.sessions)??[]).filter(xe=>f2(xe.role)),de=new Set(se.map(xe=>xe.role)),Ce={};for(const xe of sh)Ce[xe.name]={permissionMode:y[xe.name],model:g[xe.name],effort:k[xe.name]};C==null||C({taskSlug:n.taskSlug,roles:Ce,autoOrchestration:((U==null?void 0:U.mode)??"auto")==="auto",statusLoaded:!!E,sessionCount:se.length,hasAnySession:se.length>0,allRolesHaveSession:ms.every(xe=>de.has(xe.name))})},[g,k,C,U==null?void 0:U.mode,y,E,n.taskSlug]),re.useEffect(()=>{const te=window.setInterval(()=>{Promise.all([ye.getTaskStatus(n.taskSlug),ye.listMessages(n.taskSlug),ye.getOrchestrationState(n.taskSlug),ye.getSessionRoundState(n.taskSlug)]).then(([se,de,Ce,xe])=>{j(se,de,Ce,xe)}).catch(se=>L(se.message))},3e3);return()=>window.clearInterval(te)},[j,n.taskSlug]),re.useEffect(()=>{let te=!1,se=!1;const de=window.setInterval(()=>{se||(se=!0,Promise.all([ye.listMessages(n.taskSlug),ye.getOrchestrationState(n.taskSlug)]).then(([Ce,xe])=>{te||z(Ce,xe)}).catch(Ce=>{te||L(Ce.message)}).finally(()=>{se=!1}))},u2);return()=>{te=!0,window.clearInterval(de)}},[z,n.taskSlug]);async function G(te){R(!0),L("");try{await te(),await H(),await a()}catch(se){L(se instanceof Error?se.message:"Action failed.")}finally{R(!1)}}async function N(){const te=[`Close task "${n.taskSlug}"?`,"","This is destructive:","- stops VCM-managed running role sessions for this task",`- deletes the task worktree: ${n.worktreePath}`,`- deletes the Git branch: ${n.branch}`,"- deletes VCM task/session/message/orchestration state","","VCM will not check running sessions or uncommitted changes before closing."].join(`
95
+ `);if(window.confirm(te)){R(!0),L("");try{await ye.cleanupTask(n.taskSlug,{force:!0,forceDeleteBranch:!0}),Z(`closed ${n.taskSlug}`),await a()}catch(de){L(de instanceof Error?de.message:"Close task failed.")}finally{R(!1)}}}function Z(te){I(se=>{const de=[...se,`${new Date().toLocaleTimeString()} ${te}`];return b==null||b(de),de})}function he(te,se){_(de=>({...de,[te]:se}))}function _e(te,se){S(de=>({...de,[te]:se}))}function X(te,se){M(de=>({...de,[te]:se}))}async function q(te){R(!0),L("");try{const se=await ye.updateOrchestrationState(n.taskSlug,{mode:te});F(se),m==null||m(se),Z(`auto orchestration ${te==="auto"?"enabled":"disabled"}`)}catch(se){L(se instanceof Error?se.message:"Failed to update orchestration mode.")}finally{R(!1)}}const ce=((U==null?void 0:U.mode)??"auto")==="auto";return T.jsxs("div",{className:"task-workspace",children:[T.jsxs("header",{className:"workspace-header",children:[T.jsx("div",{className:"workspace-title-line",children:T.jsx("h1",{children:n.title||n.taskSlug})}),T.jsx(l2,{activeRole:r,roles:J,sessions:(E==null?void 0:E.sessions)??[],onSelect:c}),T.jsxs("div",{className:"workspace-header-actions",children:[T.jsxs("button",{"aria-label":`Auto orchestration is ${ce?"on":"off"}`,"aria-pressed":ce,className:`orchestration-toggle${ce?" is-active":""}`,disabled:D,type:"button",onClick:()=>void q(ce?"manual":"auto"),children:[T.jsx("span",{children:"Auto orchestration"}),T.jsx("strong",{children:ce?"on":"off"})]}),T.jsx("button",{className:"danger-button",type:"button",disabled:D,onClick:()=>void N(),children:"Close Task"})]})]}),A?T.jsx("div",{className:"error-banner",children:A}):null,T.jsx("div",{className:"workspace-grid",children:T.jsx("div",{className:"workspace-main",children:T.jsx("div",{className:"role-console-stack",children:J.map(te=>{const se=te.name,de=se===r,Ce=$_((E==null?void 0:E.sessions)??[],se);return T.jsx("div",{className:de?"role-console-panel is-active":"role-console-panel","aria-hidden":!de,children:T.jsx(a2,{role:se,session:Ce,permissionMode:y[se],model:g[se],effort:k[se],active:de,busy:D,translationEnabled:o,translationAutoSendEnabled:d,translationTargetLanguage:v,onPermissionModeChange:xe=>he(se,xe),onModelChange:xe=>_e(se,xe),onEffortChange:xe=>X(se,xe),onStart:()=>void G(async()=>{await ye.startRoleSession(n.taskSlug,se,{cols:100,rows:28,permissionMode:y[se],model:g[se],effort:k[se]}),Z(`started ${se} with ${y[se]} / ${g[se]} / ${k[se]}`)}),onResume:()=>void G(async()=>{await ye.resumeRoleSession(n.taskSlug,se,{cols:100,rows:28,permissionMode:y[se],model:g[se],effort:k[se]}),Z(`resumed ${se} with ${y[se]} / ${g[se]} / ${k[se]}`)}),onStop:()=>void G(async()=>{await ye.stopRoleSession(n.taskSlug,se),Z(`stopped ${se}`)}),onRestart:()=>void G(async()=>{await ye.restartRoleSession(n.taskSlug,se,{cols:100,rows:28,permissionMode:y[se],model:g[se],effort:k[se]}),Z(`restarted ${se} with ${y[se]} / ${g[se]} / ${k[se]}`)}),onNotifyHarnessUpdated:()=>void G(async()=>{await ye.notifyRoleHarnessUpdated(n.taskSlug,se),Z(`notified ${se} to reload latest harness`)}),onTerminalEvent:xe=>Z(`${te.label}: ${xe}`)})},se)})})})})]})}function f2(n){return ms.some(r=>r.name===n)}function xg(n){return[n.status,n.updatedAt,n.cleanupStatus??"",n.cleanedAt??""].join(":")}const d2=120*1e3,Eg=1400,p2=3;function m2(n){return!!(n!=null&&n.initialized)}function g2(){const[n,r]=re.useState(null),[s,o]=re.useState([]),[d,v]=re.useState(null),[f,a]=re.useState(null),[c,h]=re.useState(null),[m,u]=re.useState(null),[b,C]=re.useState(null),[E,x]=re.useState(null),[y,_]=re.useState(null),[g,S]=re.useState(null),[k,M]=re.useState(!1),[D,R]=re.useState([]),[A,L]=re.useState(null),[B,I]=re.useState(null),[U,F]=re.useState(null),[$,K]=re.useState(null),[V,W]=re.useState(null),[J,z]=re.useState(null),[j,H]=re.useState("project-manager"),[G,N]=re.useState("system"),[Z,he]=re.useState(!0),[_e,X]=re.useState("off"),[q,ce]=re.useState(!1),[te,se]=re.useState(!1),[de,Ce]=re.useState(C1),[xe,We]=re.useState(w1),[dt,De]=re.useState(!1),[Wt,Pt]=re.useState(!1),[Xt,Qt]=re.useState(!1),[vn,St]=re.useState(!1),[Xe,pt]=re.useState(null),[fe,Se]=re.useState("default"),[Ae,Be]=re.useState("default"),[je,ct]=re.useState("medium"),[Ee,et]=re.useState(null),[ut,mt]=re.useState("default"),[Ke,Ft]=re.useState("default"),[ht,Ji]=re.useState("medium"),[He,_i]=re.useState(()=>E1()),[Vn,$n]=re.useState(null),[kr,er]=re.useState(0),[Ol,tr]=re.useState(null),[Ar,nr]=re.useState(!1),[Tr,Ss]=re.useState(!1),[bs,Bt]=re.useState(""),Rr=re.useRef({}),yn=re.useRef(null),vi=re.useRef(""),yi=re.useRef(""),Sn=re.useRef(""),ne=re.useMemo(()=>ME(D,A),[D,A]),it=(Vn==null?void 0:Vn.taskSlug)===(ne==null?void 0:ne.taskSlug)?Vn:null,jn=c===(ne==null?void 0:ne.taskSlug)?d:null,Dr=m===(ne==null?void 0:ne.taskSlug)?f:null,Cs=!!(n&&ne&&m2(jn)),ws=(Xe==null?void 0:Xe.status)==="running",xs=!!(q&&Cs&&ws),ir=!!(it!=null&&it.statusLoaded&&it.allRolesHaveSession),Es=!!(ne&&(it!=null&&it.statusLoaded)&&!it.hasAnySession),At=re.useCallback(Y=>{N(Y.themeMode),he(Y.flowPauseAlerts),X(Y.permissionRequestMode),ce(Y.translationEnabled),se(Y.translationAutoSendEnabled),Ce(Y.translationTargetLanguage),We(Y.translationOutputMode),_i(Y.launchTemplate)},[]),Nt=re.useCallback(()=>{yn.current!==null&&(window.clearInterval(yn.current),yn.current=null)},[]),Si=re.useCallback((Y={})=>{Nt(),Y.resetAudio&&C2(),Ja(),yn.current=window.setInterval(()=>{Ja()},Eg)},[Nt]),Wn=re.useCallback(()=>{Nt(),tr(null);let Y=1;Ja(),yn.current=window.setInterval(()=>{Y+=1,Ja(),Y>=p2&&yn.current!==null&&(window.clearInterval(yn.current),yn.current=null)},Eg)},[Nt]),bt=re.useCallback((Y,ve=`manual-${Date.now()}`,gt={})=>{tr({id:ve,text:Y}),Si(gt)},[Si]),Bl=re.useCallback(()=>{Nt(),tr(null)},[Nt]),rr=re.useCallback(()=>{Nt(),tr(null),he(!1)},[Nt]),Kn=re.useCallback(Y=>{ne!=null&&ne.taskSlug&&I({taskSlug:ne.taskSlug,messages:Y})},[ne==null?void 0:ne.taskSlug]),bi=re.useCallback(Y=>{ne!=null&&ne.taskSlug&&F({taskSlug:ne.taskSlug,orchestration:Y})},[ne==null?void 0:ne.taskSlug]),po=re.useCallback(Y=>{ne!=null&&ne.taskSlug&&K({taskSlug:ne.taskSlug,events:Y})},[ne==null?void 0:ne.taskSlug]),jl=re.useCallback(Y=>{if(!(ne!=null&&ne.taskSlug)||Y.taskSlug!==ne.taskSlug||(W({taskSlug:Y.taskSlug,roundState:Y}),Y.status!=="stopped"||!Y.roundId))return;const ve=S2(Y);if(Rr.current[Y.taskSlug]===ve||(Rr.current[Y.taskSlug]=ve,!Z))return;const xt=Y.activeRole??"role";y2(Y)>=d2?bt(`No new turn started after ${xt} stopped.`,ve):Wn()},[ne==null?void 0:ne.taskSlug,Z,Wn,bt]),Nl=re.useCallback(Y=>{$n(ve=>(ve==null?void 0:ve.taskSlug)===Y.taskSlug&&ve.statusLoaded===Y.statusLoaded&&ve.sessionCount===Y.sessionCount&&ve.hasAnySession===Y.hasAnySession&&ve.allRolesHaveSession===Y.allRolesHaveSession&&ve.autoOrchestration===Y.autoOrchestration&&JSON.stringify(ve.roles)===JSON.stringify(Y.roles)?ve:Y)},[]);async function sr(){const Y=await ye.listTasks();return R(Y),L(ve=>{var gt;return ve&&Y.some(xt=>xt.taskSlug===ve)?ve:((gt=Y[0])==null?void 0:gt.taskSlug)??null}),Y}async function Nn(Y=ne==null?void 0:ne.taskSlug){if(!Y)return v(null),h(null),null;const ve=await ye.getHarnessStatus(Y);return v(ve),h(Y),ve}async function Hn(Y=ne==null?void 0:ne.taskSlug){if(!Y)return a(null),u(null),null;const ve=await ye.getHarnessBootstrapStatus(Y);return a(ve),u(Y),ve}async function on(){const Y=await ye.getGatewayStatus();return x(Y),Y}async function Zt(){const Y=await ye.getRecentRepositoryPaths();return o(Y),Y}async function Mr(Y){const[ve,gt]=await Promise.all([ye.listMessages(Y),ye.getOrchestrationState(Y)]);I({taskSlug:Y,messages:ve}),F({taskSlug:Y,orchestration:gt})}async function ks(Y){const ve=await ye.getGateReviewState(Y);return z({taskSlug:Y,state:ve}),ve}function zn(Y){Y&&(Se(Y.permissionMode),Y.model&&Be(Y.model),Y.effort&&ct(Y.effort))}async function lr(Y={}){const ve=await ye.getTranslatorSession();return pt(ve),Y.syncLaunchOptions&&zn(ve),ve}function Dn(Y){Y&&(mt(Y.permissionMode),Y.model&&Ft(Y.model),Y.effort&&Ji(Y.effort))}async function Yn(Y={}){const ve=await ye.getHarnessEngineerSession();return et(ve),Y.syncLaunchOptions&&Dn(ve),ve}re.useEffect(()=>{Promise.all([ye.getCurrentProject(),ye.getRecentRepositoryPaths(),ye.getAppPreferences(),ye.getGatewayStatus()]).then(async([Y,ve,gt,xt])=>{r(Y),o(ve),x(xt),At(gt),Y&&await sr()}).catch(Y=>Bt(Y.message))},[At]),re.useEffect(()=>{const Y=window.matchMedia("(prefers-color-scheme: dark)"),ve=()=>nr(Y.matches);return ve(),Y.addEventListener("change",ve),()=>Y.removeEventListener("change",ve)},[]),re.useEffect(()=>()=>Nt(),[Nt]),re.useEffect(()=>{const Y=G==="system"?Ar?"dark":"light":G;document.documentElement.dataset.theme=Y,document.documentElement.dataset.themeMode=G},[Ar,G]),re.useEffect(()=>{!(E!=null&&E.enabled)||!Z||(rr(),ye.updateAppPreferences({flowPauseAlerts:!1}).then(Y=>At(Y)).catch(Y=>Bt(Y.message)))},[At,rr,Z,E==null?void 0:E.enabled]),re.useEffect(()=>{if(!(E!=null&&E.enabled)||!n||!ne)return;const Y=`${n.repoRoot}:${ne.taskSlug}`;if(E.currentProjectId===n.repoRoot&&E.currentTaskSlug===ne.taskSlug){vi.current=Y;return}vi.current!==Y&&(vi.current=Y,ye.updateGatewaySettings({currentProjectId:n.repoRoot,currentTaskSlug:ne.taskSlug}).then(ve=>x(ve)).catch(ve=>{vi.current===Y&&(vi.current=""),Bt(ve.message)}))},[ne==null?void 0:ne.taskSlug,E==null?void 0:E.currentProjectId,E==null?void 0:E.currentTaskSlug,E==null?void 0:E.enabled,n==null?void 0:n.repoRoot]),re.useEffect(()=>{if(!(ne!=null&&ne.taskSlug)){z(null);return}ks(ne.taskSlug).catch(Y=>Bt(Y.message))},[ne==null?void 0:ne.taskSlug]),re.useEffect(()=>{yi.current="",Sn.current="",pt(null),Se("default"),Be("default"),ct("medium"),et(null),mt("default"),Ft("default"),Ji("medium"),v(null),a(null),h(null),u(null)},[n==null?void 0:n.repoRoot]),re.useEffect(()=>{if(!n)return;lr({syncLaunchOptions:!0}).catch(ve=>Bt(ve.message));const Y=window.setInterval(()=>{lr().catch(ve=>Bt(ve.message))},3e3);return()=>window.clearInterval(Y)},[n==null?void 0:n.repoRoot]),re.useEffect(()=>{if(!n)return;Yn({syncLaunchOptions:!0}).catch(ve=>Bt(ve.message));const Y=window.setInterval(()=>{Yn().catch(ve=>Bt(ve.message))},3e3);return()=>window.clearInterval(Y)},[n==null?void 0:n.repoRoot]),re.useEffect(()=>{if(!n||!(ne!=null&&ne.taskSlug)||!(Ee!=null&&Ee.claudeSessionId)||Ee.status==="running"||Ee.status==="done")return;const Y=`${n.repoRoot}:${ne.taskSlug}:${Ee.claudeSessionId}`;Sn.current!==Y&&(Sn.current=Y,ye.resumeHarnessEngineerSession({taskSlug:ne.taskSlug,permissionMode:Ee.permissionMode,model:Ee.model,effort:Ee.effort}).then(ve=>{et(ve),Dn(ve)}).catch(ve=>Bt(ve.message)))},[ne==null?void 0:ne.taskSlug,Ee==null?void 0:Ee.claudeSessionId,Ee==null?void 0:Ee.effort,Ee==null?void 0:Ee.model,Ee==null?void 0:Ee.permissionMode,Ee==null?void 0:Ee.status,n==null?void 0:n.repoRoot]),re.useEffect(()=>{if(!n||!(ne!=null&&ne.taskSlug)){v(null),a(null),h(null),u(null);return}const Y=ne.taskSlug;Promise.all([Nn(Y),Hn(Y)]).catch(gt=>Bt(gt.message));const ve=window.setInterval(()=>{Promise.all([Nn(Y),Hn(Y)]).catch(gt=>Bt(gt.message))},3e3);return()=>window.clearInterval(ve)},[n==null?void 0:n.repoRoot,ne==null?void 0:ne.taskSlug]),re.useEffect(()=>{if(!n||!q||!(ne!=null&&ne.taskSlug)||!Cs||!ws){yi.current="";return}const Y=`${n.repoRoot}:${ne.taskSlug}`;yi.current===Y&&(Xe==null?void 0:Xe.status)==="running"||(yi.current=Y,ye.ensureTranslatorSession({taskSlug:ne.taskSlug}).then(ve=>{pt(ve),zn(ve)}).catch(ve=>{yi.current="",Bt(ve.message)}))},[n==null?void 0:n.repoRoot,ne==null?void 0:ne.taskSlug,q,Cs,ws]),re.useEffect(()=>{if(!(ne!=null&&ne.taskSlug))return;const Y=ne.taskSlug,ve=window.setInterval(()=>{ks(Y).catch(gt=>Bt(gt.message))},3e3);return()=>window.clearInterval(ve)},[ne==null?void 0:ne.taskSlug]);async function Me(Y){Ss(!0),Bt("");try{await Y()}catch(ve){Bt(ve instanceof Error?ve.message:"Action failed.")}finally{Ss(!1)}}const As=B&&B.taskSlug===(ne==null?void 0:ne.taskSlug)?B.messages:[],Hl=U&&U.taskSlug===(ne==null?void 0:ne.taskSlug)?U.orchestration:null,Ts=$&&$.taskSlug===(ne==null?void 0:ne.taskSlug)?$.events:[],Ci=V&&V.taskSlug===(ne==null?void 0:ne.taskSlug)?V.roundState:null,Lr=J&&J.taskSlug===(ne==null?void 0:ne.taskSlug)?J.state:null,Rs=!!(Lr&&Object.values(Lr.gates).some(Y=>Y.required));return T.jsxs(k1,{sidebar:T.jsx(GE,{project:n,recentRepositoryPaths:s,tasks:D,activeTaskSlug:(ne==null?void 0:ne.taskSlug)??null,messages:As,orchestration:Hl,events:Ts,roundState:Ci,gateReview:Lr,translationEnabled:xs,translationAutoSendEnabled:te,translationTargetLanguage:de,translationOutputMode:xe,translatorSession:Xe,harnessStatus:jn,harnessBootstrapStatus:Dr,harnessApplyResult:b,gatewayStatus:E,gatewayQrLogin:y,gatewayQrCheck:g,busy:Tr,onConnect:Y=>Me(async()=>{const ve=await ye.connectProject({repoPath:Y});r(ve),C(null),await Promise.all([sr(),Zt()])}),onRefreshConnectedRepository:()=>Me(async()=>{const Y=await ye.getCurrentProject();r(Y)}),onPullConnectedRepository:()=>Me(async()=>{const Y=await ye.pullCurrentProject();r(Y)}),onRefreshHarness:()=>Me(async()=>{if(!ne)throw new Error("Create or select a task before refreshing VCM Harness.");C(null),await Promise.all([Nn(ne.taskSlug),Hn(ne.taskSlug)])}),onApplyHarness:()=>Me(async()=>{if(!ne)throw new Error("Create or select a task before applying VCM Harness.");const Y=await ye.applyHarness({taskSlug:ne.taskSlug});C(Y),await Promise.all([Nn(ne.taskSlug),Hn(ne.taskSlug)])}),onStartHarnessBootstrap:Y=>Me(async()=>{if(!ne)throw new Error("Create or select a task before starting Harness Bootstrap.");const ve=await ye.startHarnessBootstrap({taskSlug:ne.taskSlug,cols:120,rows:32,...Y});a(ve.status),u(ne.taskSlug),await Yn({syncLaunchOptions:!0})}),onRestartHarnessBootstrap:Y=>Me(async()=>{if(!ne)throw new Error("Create or select a task before restarting Harness Bootstrap.");const ve=await ye.restartHarnessBootstrap({taskSlug:ne.taskSlug,cols:120,rows:32,...Y});a(ve.status),u(ne.taskSlug),await Yn({syncLaunchOptions:!0})}),onStopHarnessBootstrap:()=>Me(async()=>{const Y=await ye.stopHarnessBootstrap();a(Y),u((ne==null?void 0:ne.taskSlug)??null),await Yn()}),onRunHarnessBootstrap:()=>Me(async()=>{if(!ne)throw new Error("Create or select a task before running Harness Bootstrap.");const Y=await ye.runHarnessBootstrap({taskSlug:ne.taskSlug});a(Y.status),u(ne.taskSlug),await Yn()}),onOpenHarnessStudio:()=>Qt(!0),onOpenRepositoryDiff:()=>St(!0),onRefreshGateway:()=>Me(async()=>{await on()}),onGatewayEnabledChange:Y=>{Me(async()=>{const[ve,gt]=await Promise.all([ye.updateGatewaySettings({enabled:Y,...Y&&n?{currentProjectId:n.repoRoot,currentTaskSlug:(ne==null?void 0:ne.taskSlug)??null}:{}}),Y?ye.updateAppPreferences({flowPauseAlerts:!1}):Promise.resolve(null)]);gt&&At(gt),Y&&rr(),x(ve)})},onGatewayTranslationChange:Y=>{Me(async()=>{const ve=await ye.updateGatewaySettings({translationEnabled:Y});x(ve)})},onStartGatewayQrLogin:()=>{Me(async()=>{const Y=await ye.startGatewayQrLogin();_(Y),S(null),M(!0),await on()})},onResetGatewayBinding:()=>{Me(async()=>{const Y=await ye.resetGatewayBinding();x(Y),_(null),S(null),M(!1)})},onGateReviewGateEnabledChange:(Y,ve)=>{Me(async()=>{if(!ne)throw new Error("Create or select a task before changing Gate Review Gates.");const gt=await ye.updateGateReviewSettings(ne.taskSlug,{gates:{[Y]:ve}});z({taskSlug:ne.taskSlug,state:gt})})},onTranslationEnabledChange:Y=>{ce(Y),Me(async()=>{const ve=await ye.updateAppPreferences({translationEnabled:Y});At(ve)})},onTranslationAutoSendChange:Y=>{se(Y),Me(async()=>{const ve=await ye.updateAppPreferences({translationAutoSendEnabled:Y});At(ve)})},onTranslationTargetLanguageChange:Y=>{Ce(Y),Me(async()=>{const ve=await ye.updateAppPreferences({translationTargetLanguage:Y});At(ve)})},onTranslationOutputModeChange:Y=>{We(Y),Me(async()=>{const ve=await ye.updateAppPreferences({translationOutputMode:Y});At(ve)})},onOpenFileTranslation:()=>De(!0),onOpenTranslatorSession:()=>Pt(!0),onCreateTranslationBootstrap:()=>{Me(async()=>{if(!ne)throw new Error("Create or select a task before running Translation Bootstrap.");await ye.createTranslationBootstrap({taskSlug:ne.taskSlug,targetLanguage:de}),await lr()})},onUpdateTranslationMemory:()=>{Me(async()=>{if(!ne)throw new Error("Create or select a task before updating translation memory.");await ye.createTranslationMemoryUpdate({taskSlug:ne.taskSlug,targetLanguage:de}),await lr()})},onCreateTask:Y=>Me(async()=>{const ve=await ye.createTask(Y);await sr(),L(ve.taskSlug),await ks(ve.taskSlug)}),onSelectTask:L,themeMode:G,onThemeModeChange:Y=>{N(Y),Me(async()=>{const ve=await ye.updateAppPreferences({themeMode:Y});At(ve)})},flowPauseAlerts:Z,onFlowPauseAlertsChange:Y=>{if(E!=null&&E.enabled){rr();return}he(Y),Y&&b2(),Me(async()=>{const ve=await ye.updateAppPreferences({flowPauseAlerts:Y});At(ve)})},permissionRequestMode:_e,onPermissionRequestModeChange:Y=>{X(Y),Me(async()=>{const ve=await ye.updateAppPreferences({permissionRequestMode:Y});At(ve)})},launchTemplate:He,canSaveLaunchTemplate:ir,canOneClickStart:Es,onSaveLaunchTemplate:()=>{Me(async()=>{if(!(it!=null&&it.allRolesHaveSession))throw new Error("Start all core role sessions before saving a launch template.");const Y=await ye.updateAppPreferences({launchTemplate:{version:1,roles:it.roles,autoOrchestration:it.autoOrchestration}});At(Y)})},onOneClickStart:()=>{Me(async()=>{if(!ne)throw new Error("Create or select a task before one-click start.");const Y=await ye.getTaskStatus(ne.taskSlug);if(Y.sessions.some(xt=>S1.some(Xn=>Xn===xt.role)))throw new Error("One-click start is only available before any role session has started.");const ve=await ye.updateOrchestrationState(ne.taskSlug,{mode:He.autoOrchestration?"auto":"manual"});F({taskSlug:ne.taskSlug,orchestration:ve});const gt=LE(He,{gateReviewerEnabled:Rs});for(const xt of gt){const Xn={cols:100,rows:28,permissionMode:xt.permissionMode,model:xt.model,effort:xt.effort},wi=Y.sessions.find(mo=>mo.role===xt.role);if((wi==null?void 0:wi.status)==="running"){xt.role==="gate-reviewer"&&await ye.resumeRoleSession(ne.taskSlug,xt.role,Xn);continue}wi!=null&&wi.claudeSessionId?await ye.resumeRoleSession(ne.taskSlug,xt.role,Xn):await ye.startRoleSession(ne.taskSlug,xt.role,Xn)}H("project-manager"),await Mr(ne.taskSlug),await sr(),er(xt=>xt+1)})},onTryFlowPauseAlert:()=>{bt("This is a test flow pause alert.",void 0,{resetAudio:!0})},onMarkAllMessagesDone:Y=>{Me(async()=>{const ve=await ye.markAllMessagesDone(Y);I({taskSlug:Y,messages:ve.messages}),await Mr(Y)})},onDeleteMessageHistory:Y=>{Me(async()=>{const ve=await ye.deleteMessageHistory(Y);I({taskSlug:Y,messages:ve.messages}),await Mr(Y)})}}),children:[bs?T.jsx("div",{className:"error-banner",children:bs}):null,Ol?T.jsx("div",{className:"flow-pause-alert-backdrop",children:T.jsxs("section",{"aria-describedby":"flow-pause-alert-body flow-pause-alert-hint","aria-labelledby":"flow-pause-alert-title","aria-modal":"true",className:"flow-pause-alert",role:"alertdialog",children:[T.jsx("p",{className:"flow-pause-alert-kicker",children:"VCM needs attention"}),T.jsx("h2",{id:"flow-pause-alert-title",children:"Flow needs attention"}),T.jsx("p",{id:"flow-pause-alert-body",children:Ol.text}),T.jsx("p",{id:"flow-pause-alert-hint",className:"flow-pause-alert-hint",children:"The task may be complete, waiting for your decision, or blocked by a workflow issue."}),T.jsx("button",{type:"button",autoFocus:!0,onClick:Bl,children:"Confirm"})]})}):null,k&&y?T.jsx(_2,{busy:Tr,qrCheck:g,qrLogin:y,onCheck:()=>{Me(async()=>{const Y=await ye.checkGatewayQrLogin();S(Y),(Y.status==="confirmed"||Y.status==="binded_redirect")&&M(!1),await on()})},onClose:()=>M(!1)}):null,n&&ne?T.jsx(h2,{task:ne,activeRole:j,gateReviewerEnabled:Rs,translationEnabled:xs,translationAutoSendEnabled:te,translationTargetLanguage:de,refreshNonce:kr,onTaskChanged:async()=>{await sr()},onActiveRoleChange:H,onMessagesChanged:Kn,onOrchestrationChanged:bi,onRoundStateChanged:jl,onEventsChanged:po,onLaunchStateChanged:Nl}):T.jsxs("section",{className:"empty-workspace",children:[T.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),T.jsx("p",{children:n?"Tasks create local role commands and handoff artifacts for the selected repository.":"VibeCodingMaster will create a local task workspace, role sessions, and handoff artifacts."})]}),T.jsx(gE,{open:dt,taskSlug:(ne==null?void 0:ne.taskSlug)??null,targetLanguage:de,onClose:()=>De(!1)}),T.jsx(N1,{open:Xt,busy:Tr,status:jn,bootstrapStatus:Dr,engineerSession:Ee,permissionMode:ut,model:Ke,effort:ht,taskSlug:(ne==null?void 0:ne.taskSlug)??null,onClose:()=>Qt(!1),onRefresh:()=>{Me(async()=>{if(!ne)throw new Error("Create or select a task before refreshing Harness Studio.");await Promise.all([Nn(ne.taskSlug),Hn(ne.taskSlug),Yn()])})},onPermissionModeChange:mt,onModelChange:Ft,onEffortChange:Ji,onEngineerStart:()=>{Me(async()=>{if(!ne)throw new Error("Create or select a task before starting Harness Engineer.");const Y=await ye.startHarnessEngineerSession({taskSlug:ne.taskSlug,cols:120,rows:32,permissionMode:ut,model:Ke,effort:ht});et(Y),Dn(Y)})},onEngineerResume:()=>{Me(async()=>{if(!ne)throw new Error("Create or select a task before resuming Harness Engineer.");const Y=await ye.resumeHarnessEngineerSession({taskSlug:ne.taskSlug,cols:120,rows:32,permissionMode:ut,model:Ke,effort:ht});et(Y),Dn(Y)})},onEngineerRestart:()=>{Me(async()=>{if(!ne)throw new Error("Create or select a task before restarting Harness Engineer.");const Y=await ye.restartHarnessEngineerSession({taskSlug:ne.taskSlug,cols:120,rows:32,permissionMode:ut,model:Ke,effort:ht});et(Y),Dn(Y)})},onEngineerStop:()=>{Me(async()=>{const Y=await ye.stopHarnessEngineerSession();et(Y)})},onEngineerNotifyHarnessUpdated:()=>{Me(async()=>{const Y=await ye.notifyHarnessEngineerHarnessUpdated();et(Y),Dn(Y)})},onOpenRepositoryDiff:()=>St(!0)}),T.jsx(H1,{open:vn,taskSlug:(ne==null?void 0:ne.taskSlug)??null,onClose:()=>St(!1)}),T.jsx(F1,{open:Wt,busy:Tr,session:Xe,permissionMode:fe,model:Ae,effort:je,onClose:()=>Pt(!1),onPermissionModeChange:Se,onModelChange:Be,onEffortChange:ct,onStart:()=>{Me(async()=>{if(!ne)throw new Error("Create or select a task before starting Translator.");const Y=await ye.startTranslatorSession({taskSlug:ne.taskSlug,cols:100,rows:28,permissionMode:fe,model:Ae,effort:je});pt(Y),zn(Y)})},onResume:()=>{Me(async()=>{if(!ne)throw new Error("Create or select a task before resuming Translator.");const Y=await ye.resumeTranslatorSession({taskSlug:ne.taskSlug,cols:100,rows:28,permissionMode:fe,model:Ae,effort:je});pt(Y),zn(Y)})},onRestart:()=>{Me(async()=>{if(!ne)throw new Error("Create or select a task before restarting Translator.");const Y=await ye.restartTranslatorSession({taskSlug:ne.taskSlug,cols:100,rows:28,permissionMode:fe,model:Ae,effort:je});pt(Y),zn(Y)})},onStop:()=>{Me(async()=>{const Y=await ye.stopTranslatorSession();pt(Y)})},onNotifyHarnessUpdated:()=>{Me(async()=>{const Y=await ye.notifyTranslatorHarnessUpdated();pt(Y),zn(Y)})}})]})}function _2({busy:n,onCheck:r,onClose:s,qrCheck:o,qrLogin:d}){const[v,f]=re.useState(""),[a,c]=re.useState("");return re.useEffect(()=>{let h=!1;if(c(""),f(""),d.qrcodeUrl.startsWith("data:image/")){f(d.qrcodeUrl);return}try{const m=_s(0,"M");m.addData(d.qrcodeUrl),m.make(),h||f(m.createDataURL(8,2))}catch(m){h||c(m instanceof Error?m.message:"Failed to render QR code.")}return()=>{h=!0}},[d.qrcodeUrl]),T.jsx("div",{className:"modal-backdrop",children:T.jsxs("section",{"aria-labelledby":"gateway-qr-title","aria-modal":"true",className:"gateway-qr-modal",role:"dialog",children:[T.jsxs("header",{children:[T.jsxs("div",{children:[T.jsx("h2",{id:"gateway-qr-title",children:"Weixin Gateway Login"}),T.jsx("p",{className:"muted",children:"Scan with Weixin, confirm on the phone, then click Confirm."})]}),T.jsx("button",{type:"button",onClick:s,children:"Close"})]}),T.jsxs("div",{className:"gateway-qr-modal-body",children:[T.jsx("div",{className:"gateway-qr-code-frame",children:v?T.jsx("img",{alt:"Weixin Gateway QR login",src:v}):T.jsx("div",{className:"gateway-qr-placeholder",children:a||"Rendering QR code..."})}),T.jsxs("dl",{className:"gateway-qr-meta",children:[T.jsxs("div",{children:[T.jsx("dt",{children:"Status"}),T.jsx("dd",{children:(o==null?void 0:o.status)??d.status})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Expires"}),T.jsx("dd",{children:v2(d.expiresAt)})]}),o!=null&&o.message?T.jsxs("div",{children:[T.jsx("dt",{children:"Message"}),T.jsx("dd",{children:o.message})]}):null]})]}),T.jsx("footer",{children:T.jsx("button",{type:"button",disabled:n,onClick:r,children:"Confirm"})})]})})}function v2(n){const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(r)}let Qi=null;function y2(n){const r=Date.parse(n.startedAt??""),s=Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return!Number.isFinite(r)||!Number.isFinite(s)?0:Math.max(0,s-r)}function S2(n){const r=n.roundId??n.startedAt??n.taskSlug,s=n.stoppedAt??n.lastTurnEndedAt??"stopped";return`${r}:${s}`}async function b2(){const n=W_();return n?K_(n):!1}async function Ja(){const n=W_();if(!n||!await K_(n))return!1;try{const s=n.createGain(),o=n.currentTime+.025;return s.gain.setValueAtTime(.85,n.currentTime),s.connect(n.destination),Ag(n,s,{frequency:587.33,startAt:o,duration:.18,peakGain:.045}),Ag(n,s,{frequency:783.99,startAt:o+.11,duration:.28,peakGain:.055}),window.setTimeout(()=>{s.disconnect()},800),!0}catch{return!1}}function W_(){const n=window.AudioContext??window.webkitAudioContext;if(!n)return null;try{return(!Qi||Qi.state==="closed")&&(Qi=new n),Qi}catch{return null}}function C2(){ih(Qi)}function ih(n){Qi=null,n&&n.state!=="closed"&&n.close().catch(()=>{})}async function K_(n){if(kg(n))return!0;try{await n.resume();const r=kg(n);return!r&&n===Qi&&ih(n),r}catch{return n===Qi&&ih(n),!1}}function kg(n){return n.state==="running"}function Ag(n,r,s){const o=n.createGain(),d=n.createOscillator(),v=n.createOscillator(),f=s.startAt+s.duration;o.gain.setValueAtTime(1e-4,s.startAt),o.gain.exponentialRampToValueAtTime(s.peakGain,s.startAt+.018),o.gain.exponentialRampToValueAtTime(1e-4,f),d.type="sine",d.frequency.setValueAtTime(s.frequency,s.startAt),v.type="triangle",v.frequency.setValueAtTime(s.frequency*2.01,s.startAt),d.connect(o),v.connect(o),o.connect(r),d.start(s.startAt),v.start(s.startAt),d.stop(f+.02),v.stop(f+.02)}const Y_=document.getElementById("root");if(!Y_)throw new Error("Missing #root element.");c1.createRoot(Y_).render(T.jsx(re.StrictMode,{children:T.jsx(g2,{})}));