vibe-coding-master 0.4.6 → 0.4.7

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 rm=(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 Eg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var fu={exports:{}},hl={};/**
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 sm;function e1(){if(sm)return hl;sm=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 hl.Fragment=r,hl.jsx=s,hl.jsxs=s,hl}var lm;function t1(){return lm||(lm=1,fu.exports=e1()),fu.exports}var T=t1(),du={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 am;function n1(){if(am)return Ne;am=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"),p=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 k={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||k}_.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||k}var E=S.prototype=new g;E.constructor=S,x(E,_.prototype),E.isPureReactComponent=!0;var M=Array.isArray;function R(){}var D={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(R,R):(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 ge=typeof H;(ge==="undefined"||ge==="boolean")&&(H=null);var Y=!1;if(H===null)Y=!0;else switch(ge){case"bigint":case"string":case"number":Y=!0;break;case"object":switch(H.$$typeof){case n:case r:Y=!0;break;case p:return Y=H._init,V(Y(H._payload),G,N,Z,he)}}if(Y)return he=he(H),Y=Z===""?"."+$(H,0):Z,M(he)?(N="",Y!=null&&(N=Y.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,"$&/")+"/")+Y)),G.push(he)),1;Y=0;var q=Z===""?".":Z+":";if(M(H))for(var ce=0;ce<H.length;ce++)Z=H[ce],ge=q+$(Z,ce),Y+=V(Z,G,N,ge,he);else if(ce=C(H),typeof ce=="function")for(H=ce.call(H),ce=0;!(Z=H.next()).done;)Z=Z.value,ge=q+$(Z,ce++),Y+=V(Z,G,N,ge,he);else if(ge==="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 Y}function W(H,G,N){if(H==null)return H;var Z=[],he=0;return V(H,Z,"","",function(ge){return G.call(N,ge,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=D,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(H){return D.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(ge in G.key!==void 0&&(he=""+G.key),G)!A.call(G,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&G.ref===void 0||(Z[ge]=G[ge]);var ge=arguments.length-2;if(ge===1)Z.children=N;else if(1<ge){for(var Y=Array(ge),q=0;q<ge;q++)Y[q]=arguments[q+2];Z.children=Y}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={},ge=null;if(G!=null)for(Z in G.key!==void 0&&(ge=""+G.key),G)A.call(G,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(he[Z]=G[Z]);var Y=arguments.length-2;if(Y===1)he.children=N;else if(1<Y){for(var q=Array(Y),ce=0;ce<Y;ce++)q[ce]=arguments[ce+2];he.children=q}if(H&&H.defaultProps)for(Z in Y=H.defaultProps,Y)he[Z]===void 0&&(he[Z]=Y[Z]);return L(H,ge,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:p,_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=D.T,N={};D.T=N;try{var Z=H(),he=D.S;he!==null&&he(N,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(R,z)}catch(ge){z(ge)}finally{G!==null&&N.types!==null&&(G.types=N.types),D.T=G}},Ne.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Ne.use=function(H){return D.H.use(H)},Ne.useActionState=function(H,G,N){return D.H.useActionState(H,G,N)},Ne.useCallback=function(H,G){return D.H.useCallback(H,G)},Ne.useContext=function(H){return D.H.useContext(H)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(H,G){return D.H.useDeferredValue(H,G)},Ne.useEffect=function(H,G){return D.H.useEffect(H,G)},Ne.useEffectEvent=function(H){return D.H.useEffectEvent(H)},Ne.useId=function(){return D.H.useId()},Ne.useImperativeHandle=function(H,G,N){return D.H.useImperativeHandle(H,G,N)},Ne.useInsertionEffect=function(H,G){return D.H.useInsertionEffect(H,G)},Ne.useLayoutEffect=function(H,G){return D.H.useLayoutEffect(H,G)},Ne.useMemo=function(H,G){return D.H.useMemo(H,G)},Ne.useOptimistic=function(H,G){return D.H.useOptimistic(H,G)},Ne.useReducer=function(H,G,N){return D.H.useReducer(H,G,N)},Ne.useRef=function(H){return D.H.useRef(H)},Ne.useState=function(H){return D.H.useState(H)},Ne.useSyncExternalStore=function(H,G,N){return D.H.useSyncExternalStore(H,G,N)},Ne.useTransition=function(){return D.H.useTransition()},Ne.version="19.2.6",Ne}var om;function Qu(){return om||(om=1,du.exports=n1()),du.exports}var re=Qu(),pu={exports:{}},fl={},mu={exports:{}},gu={};/**
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 cm;function i1(){return cm||(cm=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=[],p=1,u=null,b=3,C=!1,k=!1,x=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function E(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,E(V),!k)if(s(c)!==null)k=!0,R||(R=!0,U());else{var W=s(h);W!==null&&K(M,W.startTime-V)}}var R=!1,D=-1,A=5,L=-1;function B(){return y?!0:!(n.unstable_now()-L<A)}function I(){if(y=!1,R){var V=n.unstable_now();L=V;var W=!0;try{e:{k=!1,x&&(x=!1,g(D),D=-1),C=!0;var J=b;try{t:{for(E(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,E(V),W=!0;break t}u===s(c)&&o(c),E(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():R=!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){D=_(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:p++,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(D),D=-1):x=!0,K(M,J-z))):(V.sortIndex=j,r(c,V),k||C||(k=!0,R||(R=!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}}}})(gu)),gu}var um;function r1(){return um||(um=1,mu.exports=i1()),mu.exports}var _u={exports:{}},Vt={};/**
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 hm;function s1(){if(hm)return Vt;hm=1;var n=Qu();function r(c){var h="https://react.dev/errors/"+c;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}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,p){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:p}}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 Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Vt.createPortal=function(c,h){var p=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,p)},Vt.flushSync=function(c){var h=f.T,p=o.p;try{if(f.T=null,o.p=2,c)return c()}finally{f.T=h,o.p=p,o.d.f()}},Vt.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))},Vt.prefetchDNS=function(c){typeof c=="string"&&o.d.D(c)},Vt.preinit=function(c,h){if(typeof c=="string"&&h&&typeof h.as=="string"){var p=h.as,u=a(p,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,C=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?o.d.S(c,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:u,integrity:b,fetchPriority:C}):p==="script"&&o.d.X(c,{crossOrigin:u,integrity:b,fetchPriority:C,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Vt.preinitModule=function(c,h){if(typeof c=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=a(h.as,h.crossOrigin);o.d.M(c,{crossOrigin:p,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)},Vt.preload=function(c,h){if(typeof c=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,u=a(p,h.crossOrigin);o.d.L(c,p,{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})}},Vt.preloadModule=function(c,h){if(typeof c=="string")if(h){var p=a(h.as,h.crossOrigin);o.d.m(c,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(c)},Vt.requestFormReset=function(c){o.d.r(c)},Vt.unstable_batchedUpdates=function(c,h){return c(h)},Vt.useFormState=function(c,h,p){return f.H.useFormState(c,h,p)},Vt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Vt.version="19.2.6",Vt}var fm;function l1(){if(fm)return _u.exports;fm=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(),_u.exports=s1(),_u.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 dm;function a1(){if(dm)return fl;dm=1;var n=r1(),r=Qu(),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 m=i.return;if(m===null)break;var w=m.alternate;if(w===null){if(l=m.return,l!==null){i=l;continue}break}if(m.child===w.child){for(w=m.child;w;){if(w===i)return c(m),e;if(w===l)return c(m),t;w=w.sibling}throw Error(o(188))}if(i.return!==l.return)i=m,l=w;else{for(var O=!1,P=m.child;P;){if(P===i){O=!0,i=m,l=w;break}if(P===l){O=!0,l=m,i=w;break}P=P.sibling}if(!O){for(P=w.child;P;){if(P===i){O=!0,i=w,l=m;break}if(P===l){O=!0,l=w,i=m;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 p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(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"),k=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"),E=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),D=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 R:return"SuspenseList";case L:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case S:return e.displayName||"Context";case g:return(e._context.displayName||"Context")+".Consumer";case E:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D: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),ge=H(null),Y=H(null);function q(e,t){switch(N(ge,t),N(he,e),N(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ap(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ap(t),e=Tp(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(ge)}function te(e){e.memoizedState!==null&&N(Y,e);var t=Z.current,i=Tp(t,e.type);t!==i&&(N(he,e),N(Z,i))}function ie(e){he.current===e&&(G(Z),G(he)),Y.current===e&&(G(Y),al._currentValue=J)}var de,we;function Ee(e){if(de===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||"",we=-1<i.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+de+e+we}var Ye=!1;function ft(e,t){if(!e||Ye)return"";Ye=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var _e=function(){throw Error()};if(Object.defineProperty(_e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_e,[])}catch(ue){var oe=ue}Reflect.construct(e,[],_e)}else{try{_e.call()}catch(ue){oe=ue}e.call(_e.prototype)}}else{try{throw Error()}catch(ue){oe=ue}(_e=e())&&typeof _e.catch=="function"&&_e.catch(function(){})}}catch(ue){if(ue&&oe&&typeof ue.stack=="string")return[ue.stack,oe.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");m&&m.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(m=l=0;l<Q.length&&!Q[l].includes("DetermineComponentFrameRoot");)l++;for(;m<ae.length&&!ae[m].includes("DetermineComponentFrameRoot");)m++;if(l===Q.length||m===ae.length)for(l=Q.length-1,m=ae.length-1;1<=l&&0<=m&&Q[l]!==ae[m];)m--;for(;1<=l&&0<=m;l--,m--)if(Q[l]!==ae[m]){if(l!==1||m!==1)do if(l--,m--,0>m||Q[l]!==ae[m]){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<=m);break}}}finally{Ye=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Ee(i):""}function Re(e,t){switch(e.tag){case 26:case 27:case 5:return Ee(e.type);case 16:return Ee("Lazy");case 13:return e.child!==t&&t!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return ft(e.type,!1);case 11:return ft(e.type.render,!1);case 1:return ft(e.type,!0);case 31:return Ee("Activity");default:return""}}function Yt(e){try{var t="",i=null;do t+=Re(e,i),i=e,e=e.return;while(e);return t}catch(l){return`
47
+ Error generating stack: `+l.message+`
48
+ `+l.stack}}var It=Object.prototype.hasOwnProperty,Nt=n.unstable_scheduleCallback,At=n.unstable_cancelCallback,Xt=n.unstable_shouldYield,St=n.unstable_requestPaint,it=n.unstable_now,Tt=n.unstable_getCurrentPriorityLevel,fe=n.unstable_ImmediatePriority,Se=n.unstable_UserBlockingPriority,Ce=n.unstable_NormalPriority,De=n.unstable_LowPriority,Be=n.unstable_IdlePriority,ct=n.log,Oe=n.unstable_setDisableYieldValue,_t=null,ut=null;function dt(e){if(typeof ct=="function"&&Oe(e),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(_t,e)}catch{}}var $e=Math.clz32?Math.clz32:Ue,Rt=Math.log,Ht=Math.LN2;function Ue(e){return e>>>=0,e===0?32:31-(Rt(e)/Ht|0)|0}var pi=256,kr=262144,Qi=4194304;function vn(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 Zi(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var m=0,w=e.suspendedLanes,O=e.pingedLanes;e=e.warmLanes;var P=l&134217727;return P!==0?(l=P&~w,l!==0?m=vn(l):(O&=P,O!==0?m=vn(O):i||(i=P&~e,i!==0&&(m=vn(i))))):(P=l&~w,P!==0?m=vn(P):O!==0?m=vn(O):i||(i=l&~e,i!==0&&(m=vn(i)))),m===0?0:t!==0&&t!==m&&(t&w)===0&&(w=m&-m,i=t&-t,w>=i||w===32&&(i&4194048)!==0)?t:m}function Ji(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ar(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 ys(){var e=Qi;return Qi<<=1,(Qi&62914560)===0&&(Qi=4194304),e}function Tr(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function xt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Al(e,t,i,l,m,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-$e(i),_e=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&=~_e}l!==0&&Dn(e,l,0),w!==0&&m===0&&e.tag!==0&&(e.suspendedLanes|=w&~(O&~t))}function Dn(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-$e(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|i&261930}function mi(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-$e(i),m=1<<l;m&t|e[l]&t&&(e[l]|=t),i&=~m}}function er(e,t){var i=t&-t;return i=(i&42)!==0?1:tr(i),(i&(e.suspendedLanes|t))!==0?0:i}function tr(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 se(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Gt(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:Qp(e.type))}function Tl(e,t){var i=W.p;try{return W.p=e,t()}finally{W.p=i}}var Nn=Math.random().toString(36).slice(2),Je="__reactFiber$"+Nn,pt="__reactProps$"+Nn,Vn="__reactContainer$"+Nn,Rr="__reactEvents$"+Nn,Ss="__reactListeners$"+Nn,so="__reactHandles$"+Nn,nr="__reactResources$"+Nn,ir="__reactMarker$"+Nn;function bs(e){delete e[Je],delete e[pt],delete e[Rr],delete e[Ss],delete e[so]}function gi(e){var t=e[Je];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Vn]||i[Je]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=jp(e);e!==null;){if(i=e[Je])return i;e=jp(e)}return t}e=i,i=e.parentNode}return null}function _i(e){if(e=e[Je]||e[Vn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function rr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function yn(e){var t=e[nr];return t||(t=e[nr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function vt(e){e[ir]=!0}var vi=new Set,Dr={};function $n(e,t){Hn(e,t),Hn(e+"Capture",t)}function Hn(e,t){for(Dr[e]=t,e=0;e<t.length;e++)vi.add(t[e])}var Cs=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]*$"),Wn={},sr={};function yi(e){return It.call(sr,e)?!0:It.call(Wn,e)?!1:Cs.test(e)?sr[e]=!0:(Wn[e]=!0,!1)}function Sn(e,t,i){if(yi(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 je(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 Mn(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 Jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Rl(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lo(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 m=l.get,w=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return m.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 lr(e){if(!e._valueTracker){var t=Rl(e)?"checked":"value";e._valueTracker=lo(e,t,""+e[t])}}function ws(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=Rl(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function X(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 ve=/[\n"\\]/g;function We(e){return e.replace(ve,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function bt(e,t,i,l,m,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=""+Jt(t)):e.value!==""+Jt(t)&&(e.value=""+Jt(t)):O!=="submit"&&O!=="reset"||e.removeAttribute("value"),t!=null?zn(e,O,Jt(t)):i!=null?zn(e,O,Jt(i)):l!=null&&e.removeAttribute("value"),m==null&&w!=null&&(e.defaultChecked=!!w),m!=null&&(e.checked=m&&typeof m!="function"&&typeof m!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?e.name=""+Jt(P):e.removeAttribute("name")}function Si(e,t,i,l,m,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)){lr(e);return}i=i!=null?""+Jt(i):"",t=t!=null?""+Jt(t):i,P||t===e.value||(e.value=t),e.defaultValue=t}l=l??m,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),lr(e)}function zn(e,t,i){t==="number"&&X(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function bi(e,t,i,l){if(e=e.options,t){t={};for(var m=0;m<i.length;m++)t["$"+i[m]]=!0;for(i=0;i<e.length;i++)m=t.hasOwnProperty("$"+e[i].value),e[i].selected!==m&&(e[i].selected=m),m&&l&&(e[i].defaultSelected=!0)}else{for(i=""+Jt(i),t=null,m=0;m<e.length;m++){if(e[m].value===i){e[m].selected=!0,l&&(e[m].defaultSelected=!0);return}t!==null||e[m].disabled||(t=e[m])}t!==null&&(t.selected=!0)}}function bh(e,t,i){if(t!=null&&(t=""+Jt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Jt(i):""}function Ch(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=Jt(t),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l),lr(e)}function Mr(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var W_=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 wh(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||W_.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function xh(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 m in t)l=t[m],t.hasOwnProperty(m)&&i[m]!==l&&wh(e,m,l)}else for(var w in t)t.hasOwnProperty(w)&&wh(e,w,t[w])}function ao(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 K_=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"]]),Y_=/^[\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 Dl(e){return Y_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kn(){}var oo=null;function co(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Lr=null,Or=null;function Eh(e){var t=_i(e);if(t&&(e=t.stateNode)){var i=e[pt]||null;e:switch(e=t.stateNode,t.type){case"input":if(bt(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="'+We(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var l=i[t];if(l!==e&&l.form===e.form){var m=l[pt]||null;if(!m)throw Error(o(90));bt(l,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&ws(l)}break e;case"textarea":bh(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&bi(e,!!i.multiple,t,!1)}}}var uo=!1;function kh(e,t,i){if(uo)return e(t,i);uo=!0;try{var l=e(t);return l}finally{if(uo=!1,(Lr!==null||Or!==null)&&(_a(),Lr&&(t=Lr,e=Or,Or=Lr=null,Eh(t),e)))for(t=0;t<e.length;t++)Eh(e[t])}}function xs(e,t){var i=e.stateNode;if(i===null)return null;var l=i[pt]||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 Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ho=!1;if(Yn)try{var Es={};Object.defineProperty(Es,"passive",{get:function(){ho=!0}}),window.addEventListener("test",Es,Es),window.removeEventListener("test",Es,Es)}catch{ho=!1}var Ci=null,fo=null,Ml=null;function Ah(){if(Ml)return Ml;var e,t=fo,i=t.length,l,m="value"in Ci?Ci.value:Ci.textContent,w=m.length;for(e=0;e<i&&t[e]===m[e];e++);var O=i-e;for(l=1;l<=O&&t[i-l]===m[w-l];l++);return Ml=m.slice(e,1<l?1-l:void 0)}function Ll(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 Ol(){return!0}function Th(){return!1}function en(e){function t(i,l,m,w,O){this._reactName=i,this._targetInst=m,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)?Ol:Th,this.isPropagationStopped=Th,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=Ol)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Ol)},persist:function(){},isPersistent:Ol}),t}var ar={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bl=en(ar),ks=u({},ar,{view:0,detail:0}),X_=en(ks),po,mo,As,jl=u({},ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_o,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!==As&&(As&&e.type==="mousemove"?(po=e.screenX-As.screenX,mo=e.screenY-As.screenY):mo=po=0,As=e),po)},movementY:function(e){return"movementY"in e?e.movementY:mo}}),Rh=en(jl),Q_=u({},jl,{dataTransfer:0}),Z_=en(Q_),J_=u({},ks,{relatedTarget:0}),go=en(J_),ev=u({},ar,{animationName:0,elapsedTime:0,pseudoElement:0}),tv=en(ev),nv=u({},ar,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),iv=en(nv),rv=u({},ar,{data:0}),Dh=en(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 _o(){return ov}var cv=u({},ks,{key:function(e){if(e.key){var t=sv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ll(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:_o,charCode:function(e){return e.type==="keypress"?Ll(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ll(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),uv=en(cv),hv=u({},jl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mh=en(hv),fv=u({},ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_o}),dv=en(fv),pv=u({},ar,{propertyName:0,elapsedTime:0,pseudoElement:0}),mv=en(pv),gv=u({},jl,{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=en(gv),vv=u({},ar,{newState:0,oldState:0}),yv=en(vv),Sv=[9,13,27,32],vo=Yn&&"CompositionEvent"in window,Ts=null;Yn&&"documentMode"in document&&(Ts=document.documentMode);var bv=Yn&&"TextEvent"in window&&!Ts,Lh=Yn&&(!vo||Ts&&8<Ts&&11>=Ts),Oh=" ",Bh=!1;function jh(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 Nh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Br=!1;function Cv(e,t){switch(e){case"compositionend":return Nh(t);case"keypress":return t.which!==32?null:(Bh=!0,Oh);case"textInput":return e=t.data,e===Oh&&Bh?null:e;default:return null}}function wv(e,t){if(Br)return e==="compositionend"||!vo&&jh(e,t)?(e=Ah(),Ml=fo=Ci=null,Br=!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 Lh&&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 Hh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xv[e.type]:t==="textarea"}function zh(e,t,i,l){Lr?Or?Or.push(l):Or=[l]:Lr=l,t=xa(t,"onChange"),0<t.length&&(i=new Bl("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var Rs=null,Ds=null;function Ev(e){bp(e,0)}function Nl(e){var t=rr(e);if(ws(t))return e}function Ih(e,t){if(e==="change")return t}var Uh=!1;if(Yn){var yo;if(Yn){var So="oninput"in document;if(!So){var Ph=document.createElement("div");Ph.setAttribute("oninput","return;"),So=typeof Ph.oninput=="function"}yo=So}else yo=!1;Uh=yo&&(!document.documentMode||9<document.documentMode)}function Fh(){Rs&&(Rs.detachEvent("onpropertychange",qh),Ds=Rs=null)}function qh(e){if(e.propertyName==="value"&&Nl(Ds)){var t=[];zh(t,Ds,e,co(e)),kh(Ev,t)}}function kv(e,t,i){e==="focusin"?(Fh(),Rs=t,Ds=i,Rs.attachEvent("onpropertychange",qh)):e==="focusout"&&Fh()}function Av(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Nl(Ds)}function Tv(e,t){if(e==="click")return Nl(t)}function Rv(e,t){if(e==="input"||e==="change")return Nl(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 Ms(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 m=i[l];if(!It.call(t,m)||!cn(e[m],t[m]))return!1}return!0}function Gh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vh(e,t){var i=Gh(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=Gh(i)}}function $h(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$h(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=X(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=X(e.document)}return t}function bo(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=Yn&&"documentMode"in document&&11>=document.documentMode,jr=null,Co=null,Ls=null,wo=!1;function Kh(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;wo||jr==null||jr!==X(l)||(l=jr,"selectionStart"in l&&bo(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}),Ls&&Ms(Ls,l)||(Ls=l,l=xa(Co,"onSelect"),0<l.length&&(t=new Bl("onSelect","select",null,t,i),e.push({event:t,listeners:l}),t.target=jr)))}function or(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Nr={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")},xo={},Yh={};Yn&&(Yh=document.createElement("div").style,"AnimationEvent"in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),"TransitionEvent"in window||delete Nr.transitionend.transition);function cr(e){if(xo[e])return xo[e];if(!Nr[e])return e;var t=Nr[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Yh)return xo[e]=t[i];return e}var Xh=cr("animationend"),Qh=cr("animationiteration"),Zh=cr("animationstart"),Lv=cr("transitionrun"),Ov=cr("transitionstart"),Bv=cr("transitioncancel"),Jh=cr("transitionend"),ef=new Map,Eo="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(" ");Eo.push("scrollEnd");function Ln(e,t){ef.set(e,t),$n(t,[e])}var Hl=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=[],Hr=0,ko=0;function zl(){for(var e=Hr,t=ko=Hr=0;t<e;){var i=bn[t];bn[t++]=null;var l=bn[t];bn[t++]=null;var m=bn[t];bn[t++]=null;var w=bn[t];if(bn[t++]=null,l!==null&&m!==null){var O=l.pending;O===null?m.next=m:(m.next=O.next,O.next=m),l.pending=m}w!==0&&tf(i,m,w)}}function Il(e,t,i,l){bn[Hr++]=e,bn[Hr++]=t,bn[Hr++]=i,bn[Hr++]=l,ko|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ao(e,t,i,l){return Il(e,t,i,l),Ul(e)}function ur(e,t){return Il(e,null,null,t),Ul(e)}function tf(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var m=!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||(m=!0)),e=w,w=w.return;return e.tag===3?(w=e.stateNode,m&&t!==null&&(m=31-$e(i),e=w.hiddenUpdates,l=e[m],l===null?e[m]=[t]:l.push(t),t.lane=i|536870912),w):null}function Ul(e){if(50<el)throw el=0,Nc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zr={};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 To(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xn(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 nf(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 Pl(e,t,i,l,m,w){var O=0;if(l=e,typeof e=="function")To(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,m),e.elementType=L,e.lanes=w,e;case x:return hr(i.children,m,w,t);case y:O=8,m|=24;break;case _:return e=un(12,i,t,m|2),e.elementType=_,e.lanes=w,e;case M:return e=un(13,i,t,m),e.elementType=M,e.lanes=w,e;case R:return e=un(19,i,t,m),e.elementType=R,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 E:O=11;break e;case D: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,m),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 Ro(e,t,i){return e=un(6,e,null,t),e.lanes=i,e}function rf(e){var t=un(18,null,null,0);return t.stateNode=e,t}function Do(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 sf=new WeakMap;function Cn(e,t){if(typeof e=="object"&&e!==null){var i=sf.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Yt(t)},sf.set(e,t),t)}return{value:e,source:t,stack:Yt(t)}}var Ir=[],Ur=0,Fl=null,Os=0,wn=[],xn=0,wi=null,In=1,Un="";function Qn(e,t){Ir[Ur++]=Os,Ir[Ur++]=Fl,Fl=e,Os=t}function lf(e,t,i){wn[xn++]=In,wn[xn++]=Un,wn[xn++]=wi,wi=e;var l=In;e=Un;var m=32-$e(l)-1;l&=~(1<<m),i+=1;var w=32-$e(t)+m;if(30<w){var O=m-m%5;w=(l&(1<<O)-1).toString(32),l>>=O,m-=O,In=1<<32-$e(t)+m|i<<m|l,Un=w+e}else In=1<<w|i<<m|l,Un=e}function Mo(e){e.return!==null&&(Qn(e,1),lf(e,1,0))}function Lo(e){for(;e===Fl;)Fl=Ir[--Ur],Ir[Ur]=null,Os=Ir[--Ur],Ir[Ur]=null;for(;e===wi;)wi=wn[--xn],wn[xn]=null,Un=wn[--xn],wn[xn]=null,In=wn[--xn],wn[xn]=null}function af(e,t){wn[xn++]=In,wn[xn++]=Un,wn[xn++]=wi,In=t.id,Un=t.overflow,wi=e}var Ut=null,mt=null,Ke=!1,xi=null,En=!1,Oo=Error(o(519));function Ei(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Bs(Cn(t,e)),Oo}function of(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[Je]=e,t[pt]=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<nl.length;i++)Fe(nl[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),Si(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),Ch(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||Ep(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=Kn),t=!0):t=!1,t||Ei(e,!0)}function cf(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 31:case 13:En=!1;return;case 27:case 3:En=!0;return;default:Ut=Ut.return}}function Pr(e){if(e!==Ut)return!1;if(!Ke)return cf(e),Ke=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Qc(e.type,e.memoizedProps)),i=!i),i&&mt&&Ei(e),cf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));mt=Bp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));mt=Bp(e)}else t===27?(t=mt,Ii(e.type)?(e=nu,nu=null,mt=e):mt=t):mt=Ut?An(e.stateNode.nextSibling):null;return!0}function fr(){mt=Ut=null,Ke=!1}function Bo(){var e=xi;return e!==null&&(sn===null?sn=e:sn.push.apply(sn,e),xi=null),e}function Bs(e){xi===null?xi=[e]:xi.push(e)}var jo=H(null),dr=null,Zn=null;function ki(e,t,i){N(jo,t._currentValue),t._currentValue=i}function Jn(e){e._currentValue=jo.current,G(jo)}function No(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 Ho(e,t,i,l){var m=e.child;for(m!==null&&(m.return=e);m!==null;){var w=m.dependencies;if(w!==null){var O=m.child;w=w.firstContext;e:for(;w!==null;){var P=w;w=m;for(var Q=0;Q<t.length;Q++)if(P.context===t[Q]){w.lanes|=i,P=w.alternate,P!==null&&(P.lanes|=i),No(w.return,i,e),l||(O=null);break e}w=P.next}}else if(m.tag===18){if(O=m.return,O===null)throw Error(o(341));O.lanes|=i,w=O.alternate,w!==null&&(w.lanes|=i),No(O,i,e),O=null}else O=m.child;if(O!==null)O.return=m;else for(O=m;O!==null;){if(O===e){O=null;break}if(m=O.sibling,m!==null){m.return=O.return,O=m;break}O=O.return}m=O}}function Fr(e,t,i,l){e=null;for(var m=t,w=!1;m!==null;){if(!w){if((m.flags&524288)!==0)w=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var O=m.alternate;if(O===null)throw Error(o(387));if(O=O.memoizedProps,O!==null){var P=m.type;cn(m.pendingProps.value,O.value)||(e!==null?e.push(P):e=[P])}}else if(m===Y.current){if(O=m.alternate,O===null)throw Error(o(387));O.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(e!==null?e.push(al):e=[al])}m=m.return}e!==null&&Ho(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,Zn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pt(e){return uf(dr,e)}function Gl(e,t){return dr===null&&pr(e),uf(e,t)}function uf(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Zn===null){if(e===null)throw Error(o(308));Zn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zn=Zn.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,Dt={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zo(){return{controller:new Nv,data:new Map,refCount:0}}function js(e){e.refCount--,e.refCount===0&&Hv(zv,function(){e.controller.abort()})}var Ns=null,Io=0,qr=0,Gr=null;function Iv(e,t){if(Ns===null){var i=Ns=[];Io=0,qr=Fc(),Gr={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Io++,t.then(hf,hf),t}function hf(){if(--Io===0&&Ns!==null){Gr!==null&&(Gr.status="fulfilled");var e=Ns;Ns=null,qr=0,Gr=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(m){i.push(m)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var m=0;m<i.length;m++)(0,i[m])(t)},function(m){for(l.status="rejected",l.reason=m,m=0;m<i.length;m++)(0,i[m])(void 0)}),l}var ff=V.S;V.S=function(e,t){Yd=it(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Iv(e,t),ff!==null&&ff(e,t)};var mr=H(null);function Uo(){var e=mr.current;return e!==null?e:at.pooledCache}function Vl(e,t){t===null?N(mr,mr.current):N(mr,t.pool)}function df(){var e=Uo();return e===null?null:{parent:Dt._currentValue,pool:e}}var Vr=Error(o(460)),Po=Error(o(474)),$l=Error(o(542)),Wl={then:function(){}};function pf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function mf(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Kn,Kn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,_f(e),e;default:if(typeof t.status=="string")t.then(Kn,Kn);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 m=t;m.status="fulfilled",m.value=l}},function(l){if(t.status==="pending"){var m=t;m.status="rejected",m.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,_f(e),e}throw _r=t,Vr}}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,Vr):i}}var _r=null;function gf(){if(_r===null)throw Error(o(459));var e=_r;return _r=null,e}function _f(e){if(e===Vr||e===$l)throw Error(o(483))}var $r=null,Hs=0;function Kl(e){var t=Hs;return Hs+=1,$r===null&&($r=[]),mf($r,e,t)}function zs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Yl(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 vf(e){function t(ne,ee){if(e){var le=ne.deletions;le===null?(ne.deletions=[ee],ne.flags|=16):le.push(ee)}}function i(ne,ee){if(!e)return null;for(;ee!==null;)t(ne,ee),ee=ee.sibling;return null}function l(ne){for(var ee=new Map;ne!==null;)ne.key!==null?ee.set(ne.key,ne):ee.set(ne.index,ne),ne=ne.sibling;return ee}function m(ne,ee){return ne=Xn(ne,ee),ne.index=0,ne.sibling=null,ne}function w(ne,ee,le){return ne.index=le,e?(le=ne.alternate,le!==null?(le=le.index,le<ee?(ne.flags|=67108866,ee):le):(ne.flags|=67108866,ee)):(ne.flags|=1048576,ee)}function O(ne){return e&&ne.alternate===null&&(ne.flags|=67108866),ne}function P(ne,ee,le,me){return ee===null||ee.tag!==6?(ee=Ro(le,ne.mode,me),ee.return=ne,ee):(ee=m(ee,le),ee.return=ne,ee)}function Q(ne,ee,le,me){var Te=le.type;return Te===x?pe(ne,ee,le.props.children,me,le.key):ee!==null&&(ee.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===A&&gr(Te)===ee.type)?(ee=m(ee,le.props),zs(ee,le),ee.return=ne,ee):(ee=Pl(le.type,le.key,le.props,null,ne.mode,me),zs(ee,le),ee.return=ne,ee)}function ae(ne,ee,le,me){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==le.containerInfo||ee.stateNode.implementation!==le.implementation?(ee=Do(le,ne.mode,me),ee.return=ne,ee):(ee=m(ee,le.children||[]),ee.return=ne,ee)}function pe(ne,ee,le,me,Te){return ee===null||ee.tag!==7?(ee=hr(le,ne.mode,me,Te),ee.return=ne,ee):(ee=m(ee,le),ee.return=ne,ee)}function _e(ne,ee,le){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=Ro(""+ee,ne.mode,le),ee.return=ne,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case C:return le=Pl(ee.type,ee.key,ee.props,null,ne.mode,le),zs(le,ee),le.return=ne,le;case k:return ee=Do(ee,ne.mode,le),ee.return=ne,ee;case A:return ee=gr(ee),_e(ne,ee,le)}if(K(ee)||U(ee))return ee=hr(ee,ne.mode,le,null),ee.return=ne,ee;if(typeof ee.then=="function")return _e(ne,Kl(ee),le);if(ee.$$typeof===S)return _e(ne,Gl(ne,ee),le);Yl(ne,ee)}return null}function oe(ne,ee,le,me){var Te=ee!==null?ee.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Te!==null?null:P(ne,ee,""+le,me);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case C:return le.key===Te?Q(ne,ee,le,me):null;case k:return le.key===Te?ae(ne,ee,le,me):null;case A:return le=gr(le),oe(ne,ee,le,me)}if(K(le)||U(le))return Te!==null?null:pe(ne,ee,le,me,null);if(typeof le.then=="function")return oe(ne,ee,Kl(le),me);if(le.$$typeof===S)return oe(ne,ee,Gl(ne,le),me);Yl(ne,le)}return null}function ue(ne,ee,le,me,Te){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return ne=ne.get(le)||null,P(ee,ne,""+me,Te);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case C:return ne=ne.get(me.key===null?le:me.key)||null,Q(ee,ne,me,Te);case k:return ne=ne.get(me.key===null?le:me.key)||null,ae(ee,ne,me,Te);case A:return me=gr(me),ue(ne,ee,le,me,Te)}if(K(me)||U(me))return ne=ne.get(le)||null,pe(ee,ne,me,Te,null);if(typeof me.then=="function")return ue(ne,ee,le,Kl(me),Te);if(me.$$typeof===S)return ue(ne,ee,le,Gl(ee,me),Te);Yl(ee,me)}return null}function ke(ne,ee,le,me){for(var Te=null,Qe=null,Ae=ee,ze=ee=0,Ve=null;Ae!==null&&ze<le.length;ze++){Ae.index>ze?(Ve=Ae,Ae=null):Ve=Ae.sibling;var Ze=oe(ne,Ae,le[ze],me);if(Ze===null){Ae===null&&(Ae=Ve);break}e&&Ae&&Ze.alternate===null&&t(ne,Ae),ee=w(Ze,ee,ze),Qe===null?Te=Ze:Qe.sibling=Ze,Qe=Ze,Ae=Ve}if(ze===le.length)return i(ne,Ae),Ke&&Qn(ne,ze),Te;if(Ae===null){for(;ze<le.length;ze++)Ae=_e(ne,le[ze],me),Ae!==null&&(ee=w(Ae,ee,ze),Qe===null?Te=Ae:Qe.sibling=Ae,Qe=Ae);return Ke&&Qn(ne,ze),Te}for(Ae=l(Ae);ze<le.length;ze++)Ve=ue(Ae,ne,ze,le[ze],me),Ve!==null&&(e&&Ve.alternate!==null&&Ae.delete(Ve.key===null?ze:Ve.key),ee=w(Ve,ee,ze),Qe===null?Te=Ve:Qe.sibling=Ve,Qe=Ve);return e&&Ae.forEach(function(Gi){return t(ne,Gi)}),Ke&&Qn(ne,ze),Te}function Le(ne,ee,le,me){if(le==null)throw Error(o(151));for(var Te=null,Qe=null,Ae=ee,ze=ee=0,Ve=null,Ze=le.next();Ae!==null&&!Ze.done;ze++,Ze=le.next()){Ae.index>ze?(Ve=Ae,Ae=null):Ve=Ae.sibling;var Gi=oe(ne,Ae,Ze.value,me);if(Gi===null){Ae===null&&(Ae=Ve);break}e&&Ae&&Gi.alternate===null&&t(ne,Ae),ee=w(Gi,ee,ze),Qe===null?Te=Gi:Qe.sibling=Gi,Qe=Gi,Ae=Ve}if(Ze.done)return i(ne,Ae),Ke&&Qn(ne,ze),Te;if(Ae===null){for(;!Ze.done;ze++,Ze=le.next())Ze=_e(ne,Ze.value,me),Ze!==null&&(ee=w(Ze,ee,ze),Qe===null?Te=Ze:Qe.sibling=Ze,Qe=Ze);return Ke&&Qn(ne,ze),Te}for(Ae=l(Ae);!Ze.done;ze++,Ze=le.next())Ze=ue(Ae,ne,ze,Ze.value,me),Ze!==null&&(e&&Ze.alternate!==null&&Ae.delete(Ze.key===null?ze:Ze.key),ee=w(Ze,ee,ze),Qe===null?Te=Ze:Qe.sibling=Ze,Qe=Ze);return e&&Ae.forEach(function(Q0){return t(ne,Q0)}),Ke&&Qn(ne,ze),Te}function lt(ne,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 Te=le.key;ee!==null;){if(ee.key===Te){if(Te=le.type,Te===x){if(ee.tag===7){i(ne,ee.sibling),me=m(ee,le.props.children),me.return=ne,ne=me;break e}}else if(ee.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===A&&gr(Te)===ee.type){i(ne,ee.sibling),me=m(ee,le.props),zs(me,le),me.return=ne,ne=me;break e}i(ne,ee);break}else t(ne,ee);ee=ee.sibling}le.type===x?(me=hr(le.props.children,ne.mode,me,le.key),me.return=ne,ne=me):(me=Pl(le.type,le.key,le.props,null,ne.mode,me),zs(me,le),me.return=ne,ne=me)}return O(ne);case k:e:{for(Te=le.key;ee!==null;){if(ee.key===Te)if(ee.tag===4&&ee.stateNode.containerInfo===le.containerInfo&&ee.stateNode.implementation===le.implementation){i(ne,ee.sibling),me=m(ee,le.children||[]),me.return=ne,ne=me;break e}else{i(ne,ee);break}else t(ne,ee);ee=ee.sibling}me=Do(le,ne.mode,me),me.return=ne,ne=me}return O(ne);case A:return le=gr(le),lt(ne,ee,le,me)}if(K(le))return ke(ne,ee,le,me);if(U(le)){if(Te=U(le),typeof Te!="function")throw Error(o(150));return le=Te.call(le),Le(ne,ee,le,me)}if(typeof le.then=="function")return lt(ne,ee,Kl(le),me);if(le.$$typeof===S)return lt(ne,ee,Gl(ne,le),me);Yl(ne,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,ee!==null&&ee.tag===6?(i(ne,ee.sibling),me=m(ee,le),me.return=ne,ne=me):(i(ne,ee),me=Ro(le,ne.mode,me),me.return=ne,ne=me),O(ne)):i(ne,ee)}return function(ne,ee,le,me){try{Hs=0;var Te=lt(ne,ee,le,me);return $r=null,Te}catch(Ae){if(Ae===Vr||Ae===$l)throw Ae;var Qe=un(29,Ae,null,ne.mode);return Qe.lanes=me,Qe.return=ne,Qe}finally{}}}var vr=vf(!0),yf=vf(!1),Ai=!1;function Fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qo(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 Ti(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ri(e,t,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(et&2)!==0){var m=l.pending;return m===null?t.next=t:(t.next=m.next,m.next=t),l.pending=t,t=Ul(e),tf(e,null,i),t}return Il(e,l,t,i),Ul(e)}function Is(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,mi(e,i)}}function Go(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var m=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?m=w=O:w=w.next=O,i=i.next}while(i!==null);w===null?m=w=t:w=w.next=t}else m=w=t;i={baseState:l.baseState,firstBaseUpdate:m,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 Vo=!1;function Us(){if(Vo){var e=Gr;if(e!==null)throw e}}function Ps(e,t,i,l){Vo=!1;var m=e.updateQueue;Ai=!1;var w=m.firstBaseUpdate,O=m.lastBaseUpdate,P=m.shared.pending;if(P!==null){m.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 _e=m.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===qr&&(Vo=!0),pe!==null&&(pe=pe.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var ke=e,Le=P;oe=t;var lt=i;switch(Le.tag){case 1:if(ke=Le.payload,typeof ke=="function"){_e=ke.call(lt,_e,oe);break e}_e=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Le.payload,oe=typeof ke=="function"?ke.call(lt,_e,oe):ke,oe==null)break e;_e=u({},_e,oe);break e;case 2:Ai=!0}}oe=P.callback,oe!==null&&(e.flags|=64,ue&&(e.flags|=8192),ue=m.callbacks,ue===null?m.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=_e):pe=pe.next=ue,O|=oe;if(P=P.next,P===null){if(P=m.shared.pending,P===null)break;ue=P,P=ue.next,ue.next=null,m.lastBaseUpdate=ue,m.shared.pending=null}}while(!0);pe===null&&(Q=_e),m.baseState=Q,m.firstBaseUpdate=ae,m.lastBaseUpdate=pe,w===null&&(m.shared.lanes=0),Bi|=O,e.lanes=O,e.memoizedState=_e}}function Sf(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function bf(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Sf(i[e],t)}var Wr=H(null),Xl=H(0);function Cf(e,t){e=oi,N(Xl,e),N(Wr,t),oi=e|t.baseLanes}function $o(){N(Xl,oi),N(Wr,Wr.current)}function Wo(){oi=Xl.current,G(Wr),G(Xl)}var hn=H(null),kn=null;function Di(e){var t=e.alternate;N(Et,Et.current&1),N(hn,e),kn===null&&(t===null||Wr.current!==null||t.memoizedState!==null)&&(kn=e)}function Ko(e){N(Et,Et.current),N(hn,e),kn===null&&(kn=e)}function wf(e){e.tag===22?(N(Et,Et.current),N(hn,e),kn===null&&(kn=e)):Mi()}function Mi(){N(Et,Et.current),N(hn,hn.current)}function fn(e){G(hn),kn===e&&(kn=null),G(Et)}var Et=H(0);function Ql(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||eu(i)||tu(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 ei=0,He=null,rt=null,Mt=null,Zl=!1,Kr=!1,yr=!1,Jl=0,Fs=0,Yr=null,Pv=0;function Ct(){throw Error(o(321))}function Yo(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 Xo(e,t,i,l,m,w){return ei=w,He=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?ld:hc,yr=!1,w=i(l,m),yr=!1,Kr&&(w=Ef(t,i,l,m)),xf(e),w}function xf(e){V.H=Vs;var t=rt!==null&&rt.next!==null;if(ei=0,Mt=rt=He=null,Zl=!1,Fs=0,Yr=null,t)throw Error(o(300));e===null||Lt||(e=e.dependencies,e!==null&&ql(e)&&(Lt=!0))}function Ef(e,t,i,l){He=e;var m=0;do{if(Kr&&(Yr=null),Fs=0,Kr=!1,25<=m)throw Error(o(301));if(m+=1,Mt=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=ad,w=t(i,l)}while(Kr);return w}function Fv(){var e=V.H,t=e.useState()[0];return t=typeof t.then=="function"?qs(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(He.flags|=1024),t}function Qo(){var e=Jl!==0;return Jl=0,e}function Zo(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Jo(e){if(Zl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Zl=!1}ei=0,Mt=rt=He=null,Kr=!1,Fs=Jl=0,Yr=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?He.memoizedState=Mt=e:Mt=Mt.next=e,Mt}function kt(){if(rt===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Mt===null?He.memoizedState:Mt.next;if(t!==null)Mt=t,rt=e;else{if(e===null)throw He.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},Mt===null?He.memoizedState=Mt=e:Mt=Mt.next=e}return Mt}function ea(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qs(e){var t=Fs;return Fs+=1,Yr===null&&(Yr=[]),e=mf(Yr,e,t),t=He,(Mt===null?t.memoizedState:Mt.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?ld:hc),e}function ta(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return qs(e);if(e.$$typeof===S)return Pt(e)}throw Error(o(438,String(e)))}function ec(e){var t=null,i=He.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var l=He.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(m){return m.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=ea(),He.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 ti(e,t){return typeof t=="function"?t(e):t}function na(e){var t=kt();return tc(t,rt,e)}function tc(e,t,i){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var m=e.baseQueue,w=l.pending;if(w!==null){if(m!==null){var O=m.next;m.next=w.next,w.next=O}t.baseQueue=m=w,l.pending=null}if(w=e.baseState,m===null)e.memoizedState=w;else{t=m.next;var P=O=null,Q=null,ae=t,pe=!1;do{var _e=ae.lane&-536870913;if(_e!==ae.lane?(Ge&_e)===_e:(ei&_e)===_e){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}),_e===qr&&(pe=!0);else if((ei&oe)===oe){ae=ae.next,oe===qr&&(pe=!0);continue}else _e={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Q===null?(P=Q=_e,O=w):Q=Q.next=_e,He.lanes|=oe,Bi|=oe;_e=ae.action,yr&&i(w,_e),w=ae.hasEagerState?ae.eagerState:i(w,_e)}else oe={lane:_e,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,He.lanes|=_e,Bi|=_e;ae=ae.next}while(ae!==null&&ae!==t);if(Q===null?O=w:Q.next=P,!cn(w,e.memoizedState)&&(Lt=!0,pe&&(i=Gr,i!==null)))throw i;e.memoizedState=w,e.baseState=O,e.baseQueue=Q,l.lastRenderedState=w}return m===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function nc(e){var t=kt(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var l=i.dispatch,m=i.pending,w=t.memoizedState;if(m!==null){i.pending=null;var O=m=m.next;do w=e(w,O.action),O=O.next;while(O!==m);cn(w,t.memoizedState)||(Lt=!0),t.memoizedState=w,t.baseQueue===null&&(t.baseState=w),i.lastRenderedState=w}return[w,l]}function kf(e,t,i){var l=He,m=kt(),w=Ke;if(w){if(i===void 0)throw Error(o(407));i=i()}else i=t();var O=!cn((rt||m).memoizedState,i);if(O&&(m.memoizedState=i,Lt=!0),m=m.queue,sc(Rf.bind(null,l,m,e),[e]),m.getSnapshot!==t||O||Mt!==null&&Mt.memoizedState.tag&1){if(l.flags|=2048,Xr(9,{destroy:void 0},Tf.bind(null,l,m,i,t),null),at===null)throw Error(o(349));w||(ei&127)!==0||Af(l,t,i)}return i}function Af(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=He.updateQueue,t===null?(t=ea(),He.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Tf(e,t,i,l){t.value=i,t.getSnapshot=l,Df(t)&&Mf(e)}function Rf(e,t,i){return i(function(){Df(t)&&Mf(e)})}function Df(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!cn(e,i)}catch{return!0}}function Mf(e){var t=ur(e,2);t!==null&&ln(t,e,2)}function ic(e){var t=Qt();if(typeof e=="function"){var i=e;if(e=i(),yr){dt(!0);try{i()}finally{dt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:e},t}function Lf(e,t,i,l){return e.baseState=i,tc(e,rt,typeof l=="function"?l:ti)}function qv(e,t,i,l,m){if(sa(e))throw Error(o(485));if(e=t.action,e!==null){var w={payload:m,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,Of(t,w)):(w.next=i.next,t.pending=i.next=w)}}function Of(e,t){var i=t.action,l=t.payload,m=e.state;if(t.isTransition){var w=V.T,O={};V.T=O;try{var P=i(m,l),Q=V.S;Q!==null&&Q(O,P),Bf(e,t,P)}catch(ae){rc(e,t,ae)}finally{w!==null&&O.types!==null&&(w.types=O.types),V.T=w}}else try{w=i(m,l),Bf(e,t,w)}catch(ae){rc(e,t,ae)}}function Bf(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){jf(e,t,l)},function(l){return rc(e,t,l)}):jf(e,t,i)}function jf(e,t,i){t.status="fulfilled",t.value=i,Nf(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Of(e,i)))}function rc(e,t,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=i,Nf(t),t=t.next;while(t!==l)}e.action=null}function Nf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Hf(e,t){return t}function zf(e,t){if(Ke){var i=at.formState;if(i!==null){e:{var l=He;if(Ke){if(mt){t:{for(var m=mt,w=En;m.nodeType!==8;){if(!w){m=null;break t}if(m=An(m.nextSibling),m===null){m=null;break t}}w=m.data,m=w==="F!"||w==="F"?m:null}if(m){mt=An(m.nextSibling),l=m.data==="F!";break e}}Ei(l)}l=!1}l&&(t=i[0])}}return i=Qt(),i.memoizedState=i.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hf,lastRenderedState:t},i.queue=l,i=id.bind(null,He,l),l.dispatch=i,l=ic(!1),w=uc.bind(null,He,!1,l.queue),l=Qt(),m={state:t,dispatch:null,action:e,pending:null},l.queue=m,i=qv.bind(null,He,m,w,i),m.dispatch=i,l.memoizedState=e,[t,i,!1]}function If(e){var t=kt();return Uf(t,rt,e)}function Uf(e,t,i){if(t=tc(e,t,Hf)[0],e=na(ti)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=qs(t)}catch(O){throw O===Vr?$l:O}else l=t;t=kt();var m=t.queue,w=m.dispatch;return i!==t.memoizedState&&(He.flags|=2048,Xr(9,{destroy:void 0},Gv.bind(null,m,i),null)),[l,w,e]}function Gv(e,t){e.action=t}function Pf(e){var t=kt(),i=rt;if(i!==null)return Uf(t,i,e);kt(),t=t.memoizedState,i=kt();var l=i.queue.dispatch;return i.memoizedState=e,[t,l,!1]}function Xr(e,t,i,l){return e={tag:e,create:i,deps:l,inst:t,next:null},t=He.updateQueue,t===null&&(t=ea(),He.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 Ff(){return kt().memoizedState}function ia(e,t,i,l){var m=Qt();He.flags|=e,m.memoizedState=Xr(1|t,{destroy:void 0},i,l===void 0?null:l)}function ra(e,t,i,l){var m=kt();l=l===void 0?null:l;var w=m.memoizedState.inst;rt!==null&&l!==null&&Yo(l,rt.memoizedState.deps)?m.memoizedState=Xr(t,w,i,l):(He.flags|=e,m.memoizedState=Xr(1|t,w,i,l))}function qf(e,t){ia(8390656,8,e,t)}function sc(e,t){ra(2048,8,e,t)}function Vv(e){He.flags|=4;var t=He.updateQueue;if(t===null)t=ea(),He.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Gf(e){var t=kt().memoizedState;return Vv({ref:t,nextImpl:e}),function(){if((et&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Vf(e,t){return ra(4,2,e,t)}function $f(e,t){return ra(4,4,e,t)}function Wf(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 Kf(e,t,i){i=i!=null?i.concat([e]):null,ra(4,4,Wf.bind(null,t,e),i)}function lc(){}function Yf(e,t){var i=kt();t=t===void 0?null:t;var l=i.memoizedState;return t!==null&&Yo(t,l[1])?l[0]:(i.memoizedState=[e,t],e)}function Xf(e,t){var i=kt();t=t===void 0?null:t;var l=i.memoizedState;if(t!==null&&Yo(t,l[1]))return l[0];if(l=e(),yr){dt(!0);try{e()}finally{dt(!1)}}return i.memoizedState=[l,t],l}function ac(e,t,i){return i===void 0||(ei&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Qd(),He.lanes|=e,Bi|=e,i)}function Qf(e,t,i,l){return cn(i,t)?i:Wr.current!==null?(e=ac(e,i,l),cn(e,t)||(Lt=!0),e):(ei&42)===0||(ei&1073741824)!==0&&(Ge&261930)===0?(Lt=!0,e.memoizedState=i):(e=Qd(),He.lanes|=e,Bi|=e,t)}function Zf(e,t,i,l,m){var w=W.p;W.p=w!==0&&8>w?w:8;var O=V.T,P={};V.T=P,uc(e,!1,t,i);try{var Q=m(),ae=V.S;if(ae!==null&&ae(P,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var pe=Uv(Q,l);Gs(e,t,pe,mn(e))}else Gs(e,t,l,mn(e))}catch(_e){Gs(e,t,{then:function(){},status:"rejected",reason:_e},mn())}finally{W.p=w,O!==null&&P.types!==null&&(O.types=P.types),V.T=O}}function $v(){}function oc(e,t,i,l){if(e.tag!==5)throw Error(o(476));var m=Jf(e).queue;Zf(e,m,t,J,i===null?$v:function(){return ed(e),i(l)})}function Jf(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:ti,lastRenderedState:J},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ed(e){var t=Jf(e);t.next===null&&(t=e.alternate.memoizedState),Gs(e,t.next.queue,{},mn())}function cc(){return Pt(al)}function td(){return kt().memoizedState}function nd(){return kt().memoizedState}function Wv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=mn();e=Ti(i);var l=Ri(t,e,i);l!==null&&(ln(l,t,i),Is(l,t,i)),t={cache:zo()},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},sa(e)?rd(t,i):(i=Ao(e,t,i,l),i!==null&&(ln(i,e,l),sd(i,t,l)))}function id(e,t,i){var l=mn();Gs(e,t,i,l)}function Gs(e,t,i,l){var m={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(sa(e))rd(t,m);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(m.hasEagerState=!0,m.eagerState=P,cn(P,O))return Il(e,t,m,0),at===null&&zl(),!1}catch{}finally{}if(i=Ao(e,t,m,l),i!==null)return ln(i,e,l),sd(i,t,l),!0}return!1}function uc(e,t,i,l){if(l={lane:2,revertLane:Fc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},sa(e)){if(t)throw Error(o(479))}else t=Ao(e,i,l,2),t!==null&&ln(t,e,2)}function sa(e){var t=e.alternate;return e===He||t!==null&&t===He}function rd(e,t){Kr=Zl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function sd(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,mi(e,i)}}var Vs={readContext:Pt,use:ta,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};Vs.useEffectEvent=Ct;var ld={readContext:Pt,use:ta,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:Pt,useEffect:qf,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,ia(4194308,4,Wf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return ia(4194308,4,e,t)},useInsertionEffect:function(e,t){ia(4,2,e,t)},useMemo:function(e,t){var i=Qt();t=t===void 0?null:t;var l=e();if(yr){dt(!0);try{e()}finally{dt(!1)}}return i.memoizedState=[l,t],l},useReducer:function(e,t,i){var l=Qt();if(i!==void 0){var m=i(t);if(yr){dt(!0);try{i(t)}finally{dt(!1)}}}else m=t;return l.memoizedState=l.baseState=m,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:m},l.queue=e,e=e.dispatch=Kv.bind(null,He,e),[l.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=ic(e);var t=e.queue,i=id.bind(null,He,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:lc,useDeferredValue:function(e,t){var i=Qt();return ac(i,e,t)},useTransition:function(){var e=ic(!1);return e=Zf.bind(null,He,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=He,m=Qt();if(Ke){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),at===null)throw Error(o(349));(Ge&127)!==0||Af(l,t,i)}m.memoizedState=i;var w={value:i,getSnapshot:t};return m.queue=w,qf(Rf.bind(null,l,w,e),[e]),l.flags|=2048,Xr(9,{destroy:void 0},Tf.bind(null,l,w,i,t),null),i},useId:function(){var e=Qt(),t=at.identifierPrefix;if(Ke){var i=Un,l=In;i=(l&~(1<<32-$e(l)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Jl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Pv++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:cc,useFormState:zf,useActionState:zf,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=uc.bind(null,He,!0,i),i.dispatch=t,[e,t]},useMemoCache:ec,useCacheRefresh:function(){return Qt().memoizedState=Wv.bind(null,He)},useEffectEvent:function(e){var t=Qt(),i={impl:e};return t.memoizedState=i,function(){if((et&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},hc={readContext:Pt,use:ta,useCallback:Yf,useContext:Pt,useEffect:sc,useImperativeHandle:Kf,useInsertionEffect:Vf,useLayoutEffect:$f,useMemo:Xf,useReducer:na,useRef:Ff,useState:function(){return na(ti)},useDebugValue:lc,useDeferredValue:function(e,t){var i=kt();return Qf(i,rt.memoizedState,e,t)},useTransition:function(){var e=na(ti)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:qs(e),t]},useSyncExternalStore:kf,useId:td,useHostTransitionStatus:cc,useFormState:If,useActionState:If,useOptimistic:function(e,t){var i=kt();return Lf(i,rt,e,t)},useMemoCache:ec,useCacheRefresh:nd};hc.useEffectEvent=Gf;var ad={readContext:Pt,use:ta,useCallback:Yf,useContext:Pt,useEffect:sc,useImperativeHandle:Kf,useInsertionEffect:Vf,useLayoutEffect:$f,useMemo:Xf,useReducer:nc,useRef:Ff,useState:function(){return nc(ti)},useDebugValue:lc,useDeferredValue:function(e,t){var i=kt();return rt===null?ac(i,e,t):Qf(i,rt.memoizedState,e,t)},useTransition:function(){var e=nc(ti)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:qs(e),t]},useSyncExternalStore:kf,useId:td,useHostTransitionStatus:cc,useFormState:Pf,useActionState:Pf,useOptimistic:function(e,t){var i=kt();return rt!==null?Lf(i,rt,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:ec,useCacheRefresh:nd};ad.useEffectEvent=Gf;function fc(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 dc={enqueueSetState:function(e,t,i){e=e._reactInternals;var l=mn(),m=Ti(l);m.payload=t,i!=null&&(m.callback=i),t=Ri(e,m,l),t!==null&&(ln(t,e,l),Is(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=mn(),m=Ti(l);m.tag=1,m.payload=t,i!=null&&(m.callback=i),t=Ri(e,m,l),t!==null&&(ln(t,e,l),Is(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=mn(),l=Ti(i);l.tag=2,t!=null&&(l.callback=t),t=Ri(e,l,i),t!==null&&(ln(t,e,i),Is(t,e,i))}};function od(e,t,i,l,m,w,O){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,w,O):t.prototype&&t.prototype.isPureReactComponent?!Ms(i,l)||!Ms(m,w):!0}function cd(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&&dc.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 m in e)i[m]===void 0&&(i[m]=e[m])}return i}function ud(e){Hl(e)}function hd(e){console.error(e)}function fd(e){Hl(e)}function la(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function dd(e,t,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function pc(e,t,i){return i=Ti(i),i.tag=3,i.payload={element:null},i.callback=function(){la(e,t)},i}function pd(e){return e=Ti(e),e.tag=3,e}function md(e,t,i,l){var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var w=l.value;e.payload=function(){return m(w)},e.callback=function(){dd(t,i,l)}}var O=i.stateNode;O!==null&&typeof O.componentDidCatch=="function"&&(e.callback=function(){dd(t,i,l),typeof m!="function"&&(ji===null?ji=new Set([this]):ji.add(this));var P=l.stack;this.componentDidCatch(l.value,{componentStack:P!==null?P:""})})}function Yv(e,t,i,l,m){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&Fr(t,i,m,!0),i=hn.current,i!==null){switch(i.tag){case 31:case 13:return kn===null?va():i.alternate===null&&wt===0&&(wt=3),i.flags&=-257,i.flags|=65536,i.lanes=m,l===Wl?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),Ic(e,l,m)),!1;case 22:return i.flags|=65536,l===Wl?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)),Ic(e,l,m)),!1}throw Error(o(435,i.tag))}return Ic(e,l,m),va(),!1}if(Ke)return t=hn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=m,l!==Oo&&(e=Error(o(422),{cause:l}),Bs(Cn(e,i)))):(l!==Oo&&(t=Error(o(423),{cause:l}),Bs(Cn(t,i))),e=e.current.alternate,e.flags|=65536,m&=-m,e.lanes|=m,l=Cn(l,i),m=pc(e.stateNode,l,m),Go(e,m),wt!==4&&(wt=2)),!1;var w=Error(o(520),{cause:l});if(w=Cn(w,i),Js===null?Js=[w]:Js.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=m&-m,i.lanes|=e,e=pc(i.stateNode,l,e),Go(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"&&(ji===null||!ji.has(w))))return i.flags|=65536,m&=-m,i.lanes|=m,m=pd(m),md(m,e,i,l),Go(i,m),!1}i=i.return}while(i!==null);return!1}var mc=Error(o(461)),Lt=!1;function Ft(e,t,i,l){t.child=e===null?yf(t,null,i,l):vr(t,e.child,i,l)}function gd(e,t,i,l,m){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=Xo(e,t,i,O,w,m),P=Qo(),e!==null&&!Lt?(Zo(e,t,m),ni(e,t,m)):(Ke&&P&&Mo(t),t.flags|=1,Ft(e,t,l,m),t.child)}function _d(e,t,i,l,m){if(e===null){var w=i.type;return typeof w=="function"&&!To(w)&&w.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=w,vd(e,t,w,l,m)):(e=Pl(i.type,null,l,t,t.mode,m),e.ref=t.ref,e.return=t,t.child=e)}if(w=e.child,!wc(e,m)){var O=w.memoizedProps;if(i=i.compare,i=i!==null?i:Ms,i(O,l)&&e.ref===t.ref)return ni(e,t,m)}return t.flags|=1,e=Xn(w,l),e.ref=t.ref,e.return=t,t.child=e}function vd(e,t,i,l,m){if(e!==null){var w=e.memoizedProps;if(Ms(w,l)&&e.ref===t.ref)if(Lt=!1,t.pendingProps=l=w,wc(e,m))(e.flags&131072)!==0&&(Lt=!0);else return t.lanes=e.lanes,ni(e,t,m)}return gc(e,t,i,l,m)}function yd(e,t,i,l){var m=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,m=0;l!==null;)m=m|l.lanes|l.childLanes,l=l.sibling;l=m&~w}else l=0,t.child=null;return Sd(e,t,w,i,l)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vl(t,w!==null?w.cachePool:null),w!==null?Cf(t,w):$o(),wf(t);else return l=t.lanes=536870912,Sd(e,t,w!==null?w.baseLanes|i:i,i,l)}else w!==null?(Vl(t,w.cachePool),Cf(t,w),Mi(),t.memoizedState=null):(e!==null&&Vl(t,null),$o(),Mi());return Ft(e,t,m,i),t.child}function $s(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Sd(e,t,i,l,m){var w=Uo();return w=w===null?null:{parent:Dt._currentValue,pool:w},t.memoizedState={baseLanes:i,cachePool:w},e!==null&&Vl(t,null),$o(),wf(t),e!==null&&Fr(e,t,l,!0),t.childLanes=m,null}function aa(e,t){return t=ca({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bd(e,t,i){return vr(t,e.child,null,i),e=aa(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function Xv(e,t,i){var l=t.pendingProps,m=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ke){if(l.mode==="hidden")return e=aa(t,l),t.lanes=536870912,$s(null,e);if(Ko(t),(e=mt)?(e=Op(e,En),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi!==null?{id:In,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},i=rf(e),i.return=t,t.child=i,Ut=t,mt=null)):e=null,e===null)throw Ei(t);return t.lanes=536870912,null}return aa(t,l)}var w=e.memoizedState;if(w!==null){var O=w.dehydrated;if(Ko(t),m)if(t.flags&256)t.flags&=-257,t=bd(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Lt||Fr(e,t,i,!1),m=(i&e.childLanes)!==0,Lt||m){if(l=at,l!==null&&(O=er(l,i),O!==0&&O!==w.retryLane))throw w.retryLane=O,ur(e,O),ln(l,e,O),mc;va(),t=bd(e,t,i)}else e=w.treeContext,mt=An(O.nextSibling),Ut=t,Ke=!0,xi=null,En=!1,e!==null&&af(t,e),t=aa(t,l),t.flags|=4096;return t}return e=Xn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function oa(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 gc(e,t,i,l,m){return pr(t),i=Xo(e,t,i,l,void 0,m),l=Qo(),e!==null&&!Lt?(Zo(e,t,m),ni(e,t,m)):(Ke&&l&&Mo(t),t.flags|=1,Ft(e,t,i,m),t.child)}function Cd(e,t,i,l,m,w){return pr(t),t.updateQueue=null,i=Ef(t,l,i,m),xf(e),l=Qo(),e!==null&&!Lt?(Zo(e,t,w),ni(e,t,w)):(Ke&&l&&Mo(t),t.flags|=1,Ft(e,t,i,w),t.child)}function wd(e,t,i,l,m){if(pr(t),t.stateNode===null){var w=zr,O=i.contextType;typeof O=="object"&&O!==null&&(w=Pt(O)),w=new i(l,w),t.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=dc,t.stateNode=w,w._reactInternals=t,w=t.stateNode,w.props=l,w.state=t.memoizedState,w.refs={},Fo(t),O=i.contextType,w.context=typeof O=="object"&&O!==null?Pt(O):zr,w.state=t.memoizedState,O=i.getDerivedStateFromProps,typeof O=="function"&&(fc(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&&dc.enqueueReplaceState(w,w.state,null),Ps(t,l,w,m),Us(),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=zr,typeof pe=="object"&&pe!==null&&(O=Pt(pe));var _e=i.getDerivedStateFromProps;pe=typeof _e=="function"||typeof w.getSnapshotBeforeUpdate=="function",P=t.pendingProps!==P,pe||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(P||ae!==O)&&cd(t,w,l,O),Ai=!1;var oe=t.memoizedState;w.state=oe,Ps(t,l,w,m),Us(),ae=t.memoizedState,P||oe!==ae||Ai?(typeof _e=="function"&&(fc(t,i,_e,l),ae=t.memoizedState),(Q=Ai||od(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,qo(e,t),O=t.memoizedProps,pe=Sr(i,O),w.props=pe,_e=t.pendingProps,oe=w.context,ae=i.contextType,Q=zr,typeof ae=="object"&&ae!==null&&(Q=Pt(ae)),P=i.getDerivedStateFromProps,(ae=typeof P=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(O!==_e||oe!==Q)&&cd(t,w,l,Q),Ai=!1,oe=t.memoizedState,w.state=oe,Ps(t,l,w,m),Us();var ue=t.memoizedState;O!==_e||oe!==ue||Ai||e!==null&&e.dependencies!==null&&ql(e.dependencies)?(typeof P=="function"&&(fc(t,i,P,l),ue=t.memoizedState),(pe=Ai||od(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,oa(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,m),t.child=vr(t,null,i,m)):Ft(e,t,i,m),t.memoizedState=w.state,e=t.child):e=ni(e,t,m),e}function xd(e,t,i,l){return fr(),t.flags|=256,Ft(e,t,i,l),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:df()}}function yc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=pn),e}function Ed(e,t,i){var l=t.pendingProps,m=!1,w=(t.flags&128)!==0,O;if((O=w)||(O=e!==null&&e.memoizedState===null?!1:(Et.current&2)!==0),O&&(m=!0,t.flags&=-129),O=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ke){if(m?Di(t):Mi(),(e=mt)?(e=Op(e,En),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi!==null?{id:In,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},i=rf(e),i.return=t,t.child=i,Ut=t,mt=null)):e=null,e===null)throw Ei(t);return tu(e)?t.lanes=32:t.lanes=536870912,null}var P=l.children;return l=l.fallback,m?(Mi(),m=t.mode,P=ca({mode:"hidden",children:P},m),l=hr(l,m,i,null),P.return=t,l.return=t,P.sibling=l,t.child=P,l=t.child,l.memoizedState=vc(i),l.childLanes=yc(e,O,i),t.memoizedState=_c,$s(null,l)):(Di(t),Sc(t,P))}var Q=e.memoizedState;if(Q!==null&&(P=Q.dehydrated,P!==null)){if(w)t.flags&256?(Di(t),t.flags&=-257,t=bc(e,t,i)):t.memoizedState!==null?(Mi(),t.child=e.child,t.flags|=128,t=null):(Mi(),P=l.fallback,m=t.mode,l=ca({mode:"visible",children:l.children},m),P=hr(P,m,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=vc(i),l.childLanes=yc(e,O,i),t.memoizedState=_c,t=$s(null,l));else if(Di(t),tu(P)){if(O=P.nextSibling&&P.nextSibling.dataset,O)var ae=O.dgst;O=ae,l=Error(o(419)),l.stack="",l.digest=O,Bs({value:l,source:null,stack:null}),t=bc(e,t,i)}else if(Lt||Fr(e,t,i,!1),O=(i&e.childLanes)!==0,Lt||O){if(O=at,O!==null&&(l=er(O,i),l!==0&&l!==Q.retryLane))throw Q.retryLane=l,ur(e,l),ln(O,e,l),mc;eu(P)||va(),t=bc(e,t,i)}else eu(P)?(t.flags|=192,t.child=e.child,t=null):(e=Q.treeContext,mt=An(P.nextSibling),Ut=t,Ke=!0,xi=null,En=!1,e!==null&&af(t,e),t=Sc(t,l.children),t.flags|=4096);return t}return m?(Mi(),P=l.fallback,m=t.mode,Q=e.child,ae=Q.sibling,l=Xn(Q,{mode:"hidden",children:l.children}),l.subtreeFlags=Q.subtreeFlags&65011712,ae!==null?P=Xn(ae,P):(P=hr(P,m,i,null),P.flags|=2),P.return=t,l.return=t,l.sibling=P,t.child=l,$s(null,l),l=t.child,P=e.child.memoizedState,P===null?P=vc(i):(m=P.cachePool,m!==null?(Q=Dt._currentValue,m=m.parent!==Q?{parent:Q,pool:Q}:m):m=df(),P={baseLanes:P.baseLanes|i,cachePool:m}),l.memoizedState=P,l.childLanes=yc(e,O,i),t.memoizedState=_c,$s(e.child,l)):(Di(t),i=e.child,e=i.sibling,i=Xn(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 Sc(e,t){return t=ca({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ca(e,t){return e=un(22,e,null,t),e.lanes=0,e}function bc(e,t,i){return vr(t,e.child,null,i),e=Sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kd(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),No(e.return,t,i)}function Cc(e,t,i,l,m,w){var O=e.memoizedState;O===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:m,treeForkCount:w}:(O.isBackwards=t,O.rendering=null,O.renderingStartTime=0,O.last=l,O.tail=i,O.tailMode=m,O.treeForkCount=w)}function Ad(e,t,i){var l=t.pendingProps,m=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),Ft(e,t,l,i),l=Ke?Os:0,!P&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kd(e,i,t);else if(e.tag===19)kd(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(m){case"forwards":for(i=t.child,m=null;i!==null;)e=i.alternate,e!==null&&Ql(e)===null&&(m=i),i=i.sibling;i=m,i===null?(m=t.child,t.child=null):(m=i.sibling,i.sibling=null),Cc(t,!1,m,i,w,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,m=t.child,t.child=null;m!==null;){if(e=m.alternate,e!==null&&Ql(e)===null){t.child=m;break}e=m.sibling,m.sibling=i,i=m,m=e}Cc(t,!0,i,null,w,l);break;case"together":Cc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function ni(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Bi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Fr(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=Xn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Xn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function wc(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),ki(t,Dt,e.memoizedState.cache),fr();break;case 27:case 5:te(t);break;case 4:q(t,t.stateNode.containerInfo);break;case 10:ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ko(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Di(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Ed(e,t,i):(Di(t),e=ni(e,t,i),e!==null?e.sibling:null);Di(t);break;case 19:var m=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(Fr(e,t,i,!1),l=(i&t.childLanes)!==0),m){if(l)return Ad(e,t,i);t.flags|=128}if(m=t.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),N(Et,Et.current),l)break;return null;case 22:return t.lanes=0,yd(e,t,i,t.pendingProps);case 24:ki(t,Dt,e.memoizedState.cache)}return ni(e,t,i)}function Td(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Lt=!0;else{if(!wc(e,i)&&(t.flags&128)===0)return Lt=!1,Qv(e,t,i);Lt=(e.flags&131072)!==0}else Lt=!1,Ke&&(t.flags&1048576)!==0&&lf(t,Os,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")To(e)?(l=Sr(e,l),t.tag=1,t=wd(null,t,e,l,i)):(t.tag=0,t=gc(null,t,e,l,i));else{if(e!=null){var m=e.$$typeof;if(m===E){t.tag=11,t=gd(null,t,e,l,i);break e}else if(m===D){t.tag=14,t=_d(null,t,e,l,i);break e}}throw t=$(e)||e,Error(o(306,t,""))}}return t;case 0:return gc(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,m=Sr(l,t.pendingProps),wd(e,t,l,m,i);case 3:e:{if(q(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var w=t.memoizedState;m=w.element,qo(e,t),Ps(t,l,null,i);var O=t.memoizedState;if(l=O.cache,ki(t,Dt,l),l!==w.cache&&Ho(t,[Dt],i,!0),Us(),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=xd(e,t,l,i);break e}else if(l!==m){m=Cn(Error(o(424)),t),Bs(m),t=xd(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(mt=An(e.firstChild),Ut=t,Ke=!0,xi=null,En=!0,i=yf(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(fr(),l===m){t=ni(e,t,i);break e}Ft(e,t,l,i)}t=t.child}return t;case 26:return oa(e,t),e===null?(i=Ip(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ke||(i=t.type,e=t.pendingProps,l=Ea(ge.current).createElement(i),l[Je]=t,l[pt]=e,qt(l,i,e),vt(l),t.stateNode=l):t.memoizedState=Ip(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return te(t),e===null&&Ke&&(l=t.stateNode=Np(t.type,t.pendingProps,ge.current),Ut=t,En=!0,m=mt,Ii(t.type)?(nu=m,mt=An(l.firstChild)):mt=m),Ft(e,t,t.pendingProps.children,i),oa(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ke&&((m=l=mt)&&(l=A0(l,t.type,t.pendingProps,En),l!==null?(t.stateNode=l,Ut=t,mt=An(l.firstChild),En=!1,m=!0):m=!1),m||Ei(t)),te(t),m=t.type,w=t.pendingProps,O=e!==null?e.memoizedProps:null,l=w.children,Qc(m,w)?l=null:O!==null&&Qc(m,O)&&(t.flags|=32),t.memoizedState!==null&&(m=Xo(e,t,Fv,null,null,i),al._currentValue=m),oa(e,t),Ft(e,t,l,i),t.child;case 6:return e===null&&Ke&&((e=i=mt)&&(i=T0(i,t.pendingProps,En),i!==null?(t.stateNode=i,Ut=t,mt=null,e=!0):e=!1),e||Ei(t)),null;case 13:return Ed(e,t,i);case 4:return q(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=vr(t,null,l,i):Ft(e,t,l,i),t.child;case 11:return gd(e,t,t.type,t.pendingProps,i);case 7:return Ft(e,t,t.pendingProps,i),t.child;case 8:return Ft(e,t,t.pendingProps.children,i),t.child;case 12:return Ft(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,ki(t,t.type,l.value),Ft(e,t,l.children,i),t.child;case 9:return m=t.type._context,l=t.pendingProps.children,pr(t),m=Pt(m),l=l(m),t.flags|=1,Ft(e,t,l,i),t.child;case 14:return _d(e,t,t.type,t.pendingProps,i);case 15:return vd(e,t,t.type,t.pendingProps,i);case 19:return Ad(e,t,i);case 31:return Xv(e,t,i);case 22:return yd(e,t,i,t.pendingProps);case 24:return pr(t),l=Pt(Dt),e===null?(m=Uo(),m===null&&(m=at,w=zo(),m.pooledCache=w,w.refCount++,w!==null&&(m.pooledCacheLanes|=i),m=w),t.memoizedState={parent:l,cache:m},Fo(t),ki(t,Dt,m)):((e.lanes&i)!==0&&(qo(e,t),Ps(t,null,null,i),Us()),m=e.memoizedState,w=t.memoizedState,m.parent!==l?(m={parent:l,cache:l},t.memoizedState=m,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=m),ki(t,Dt,l)):(l=w.cache,ki(t,Dt,l),l!==m.cache&&Ho(t,[Dt],i,!0))),Ft(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function ii(e){e.flags|=4}function xc(e,t,i,l,m){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(m&335544128)===m)if(e.stateNode.complete)e.flags|=8192;else if(tp())e.flags|=8192;else throw _r=Wl,Po}else e.flags&=-16777217}function Rd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Gp(t))if(tp())e.flags|=8192;else throw _r=Wl,Po}function ua(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ys():536870912,e.lanes|=t,es|=t)}function Ws(e,t){if(!Ke)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 gt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(t)for(var m=e.child;m!==null;)i|=m.lanes|m.childLanes,l|=m.subtreeFlags&65011712,l|=m.flags&65011712,m.return=e,m=m.sibling;else for(m=e.child;m!==null;)i|=m.lanes|m.childLanes,l|=m.subtreeFlags,l|=m.flags,m.return=e,m=m.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function Zv(e,t,i){var l=t.pendingProps;switch(Lo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(t),null;case 1:return gt(t),null;case 3:return i=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Jn(Dt),ce(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Pr(t)?ii(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Bo())),gt(t),null;case 26:var m=t.type,w=t.memoizedState;return e===null?(ii(t),w!==null?(gt(t),Rd(t,w)):(gt(t),xc(t,m,null,l,i))):w?w!==e.memoizedState?(ii(t),gt(t),Rd(t,w)):(gt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ii(t),gt(t),xc(t,m,e,l,i)),null;case 27:if(ie(t),i=ge.current,m=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ii(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return gt(t),null}e=Z.current,Pr(t)?of(t):(e=Np(m,l,i),t.stateNode=e,ii(t))}return gt(t),null;case 5:if(ie(t),m=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ii(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return gt(t),null}if(w=Z.current,Pr(t))of(t);else{var O=Ea(ge.current);switch(w){case 1:w=O.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:w=O.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":w=O.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":w=O.createElementNS("http://www.w3.org/1998/Math/MathML",m);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(m,{is:l.is}):O.createElement(m)}}w[Je]=t,w[pt]=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(qt(w,m,l),m){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ii(t)}}return gt(t),xc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ii(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ge.current,Pr(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,m=Ut,m!==null)switch(m.tag){case 27:case 5:l=m.memoizedProps}e[Je]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Ep(e.nodeValue,i)),e||Ei(t,!0)}else e=Ea(e).createTextNode(l),e[Je]=t,t.stateNode=e}return gt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(l=Pr(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[Je]=t}else fr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;gt(t),e=!1}else i=Bo(),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 gt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(m=Pr(t),l!==null&&l.dehydrated!==null){if(e===null){if(!m)throw Error(o(318));if(m=t.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));m[Je]=t}else fr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;gt(t),m=!1}else m=Bo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=m),m=!0;if(!m)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,m=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(m=l.alternate.memoizedState.cachePool.pool),w=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(w=l.memoizedState.cachePool.pool),w!==m&&(l.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),ua(t,t.updateQueue),gt(t),null);case 4:return ce(),e===null&&$c(t.stateNode.containerInfo),gt(t),null;case 10:return Jn(t.type),gt(t),null;case 19:if(G(Et),l=t.memoizedState,l===null)return gt(t),null;if(m=(t.flags&128)!==0,w=l.rendering,w===null)if(m)Ws(l,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(w=Ql(e),w!==null){for(t.flags|=128,Ws(l,!1),e=w.updateQueue,t.updateQueue=e,ua(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)nf(i,e),i=i.sibling;return N(Et,Et.current&1|2),Ke&&Qn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&it()>ma&&(t.flags|=128,m=!0,Ws(l,!1),t.lanes=4194304)}else{if(!m)if(e=Ql(w),e!==null){if(t.flags|=128,m=!0,e=e.updateQueue,t.updateQueue=e,ua(t,e),Ws(l,!0),l.tail===null&&l.tailMode==="hidden"&&!w.alternate&&!Ke)return gt(t),null}else 2*it()-l.renderingStartTime>ma&&i!==536870912&&(t.flags|=128,m=!0,Ws(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=it(),e.sibling=null,i=Et.current,N(Et,m?i&1|2:i&1),Ke&&Qn(t,l.treeForkCount),e):(gt(t),null);case 22:case 23:return fn(t),Wo(),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&&(gt(t),t.subtreeFlags&6&&(t.flags|=8192)):gt(t),i=t.updateQueue,i!==null&&ua(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),Jn(Dt),gt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Jv(e,t){switch(Lo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jn(Dt),ce(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ie(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 Jn(t.type),null;case 22:case 23:return fn(t),Wo(),e!==null&&G(mr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jn(Dt),null;case 25:return null;default:return null}}function Dd(e,t){switch(Lo(t),t.tag){case 3:Jn(Dt),ce();break;case 26:case 27:case 5:ie(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:Jn(t.type);break;case 22:case 23:fn(t),Wo(),e!==null&&G(mr);break;case 24:Jn(Dt)}}function Ks(e,t){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var m=l.next;i=m;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!==m)}}catch(P){nt(t,t.return,P)}}function Li(e,t,i){try{var l=t.updateQueue,m=l!==null?l.lastEffect:null;if(m!==null){var w=m.next;l=w;do{if((l.tag&e)===e){var O=l.inst,P=O.destroy;if(P!==void 0){O.destroy=void 0,m=t;var Q=i,ae=P;try{ae()}catch(pe){nt(m,Q,pe)}}}l=l.next}while(l!==w)}}catch(pe){nt(t,t.return,pe)}}function Md(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{bf(t,i)}catch(l){nt(e,e.return,l)}}}function Ld(e,t,i){i.props=Sr(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){nt(e,t,l)}}function Ys(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(m){nt(e,t,m)}}function Pn(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(m){nt(e,t,m)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(m){nt(e,t,m)}else i.current=null}function Od(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(m){nt(e,e.return,m)}}function Ec(e,t,i){try{var l=e.stateNode;b0(l,e.type,i,t),l[pt]=t}catch(m){nt(e,e.return,m)}}function Bd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ii(e.type)||e.tag===4}function kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bd(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&&Ii(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 Ac(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=Kn));else if(l!==4&&(l===27&&Ii(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Ac(e,t,i),e=e.sibling;e!==null;)Ac(e,t,i),e=e.sibling}function ha(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&&Ii(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(ha(e,t,i),e=e.sibling;e!==null;)ha(e,t,i),e=e.sibling}function jd(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,m=t.attributes;m.length;)t.removeAttributeNode(m[0]);qt(t,l,i),t[Je]=e,t[pt]=i}catch(w){nt(e,e.return,w)}}var ri=!1,Ot=!1,Tc=!1,Nd=typeof WeakSet=="function"?WeakSet:Set,zt=null;function e0(e,t){if(e=e.containerInfo,Yc=La,e=Wh(e),bo(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 m=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,_e=e,oe=null;t:for(;;){for(var ue;_e!==i||m!==0&&_e.nodeType!==3||(P=O+m),_e!==w||l!==0&&_e.nodeType!==3||(Q=O+l),_e.nodeType===3&&(O+=_e.nodeValue.length),(ue=_e.firstChild)!==null;)oe=_e,_e=ue;for(;;){if(_e===e)break t;if(oe===i&&++ae===m&&(P=O),oe===w&&++pe===l&&(Q=O),(ue=_e.nextSibling)!==null)break;_e=oe,oe=_e.parentNode}_e=ue}i=P===-1||Q===-1?null:{start:P,end:Q}}else i=null}i=i||{start:0,end:0}}else i=null;for(Xc={focusedElem:e,selectionRange:i},La=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,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++)m=e[i],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&w!==null){e=void 0,i=t,m=w.memoizedProps,w=w.memoizedState,l=i.stateNode;try{var ke=Sr(i.type,m);e=l.getSnapshotBeforeUpdate(ke,w),l.__reactInternalSnapshotBeforeUpdate=e}catch(Le){nt(i,i.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Jc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Jc(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,zt=e;break}zt=t.return}}function Hd(e,t,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:li(e,i),l&4&&Ks(5,i);break;case 1:if(li(e,i),l&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(O){nt(i,i.return,O)}else{var m=Sr(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(m,t,e.__reactInternalSnapshotBeforeUpdate)}catch(O){nt(i,i.return,O)}}l&64&&Md(i),l&512&&Ys(i,i.return);break;case 3:if(li(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{bf(e,t)}catch(O){nt(i,i.return,O)}}break;case 27:t===null&&l&4&&jd(i);case 26:case 5:li(e,i),t===null&&l&4&&Od(i),l&512&&Ys(i,i.return);break;case 12:li(e,i);break;case 31:li(e,i),l&4&&Ud(e,i);break;case 13:li(e,i),l&4&&Pd(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||ri,!l){t=t!==null&&t.memoizedState!==null||Ot,m=ri;var w=Ot;ri=l,(Ot=t)&&!w?ai(e,i,(i.subtreeFlags&8772)!==0):li(e,i),ri=m,Ot=w}break;case 30:break;default:li(e,i)}}function zd(e){var t=e.alternate;t!==null&&(e.alternate=null,zd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bs(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,tn=!1;function si(e,t,i){for(i=i.child;i!==null;)Id(e,t,i),i=i.sibling}function Id(e,t,i){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(_t,i)}catch{}switch(i.tag){case 26:Ot||Pn(i,t),si(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Ot||Pn(i,t);var l=yt,m=tn;Ii(i.type)&&(yt=i.stateNode,tn=!1),si(e,t,i),rl(i.stateNode),yt=l,tn=m;break;case 5:Ot||Pn(i,t);case 6:if(l=yt,m=tn,yt=null,si(e,t,i),yt=l,tn=m,yt!==null)if(tn)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&&(tn?(e=yt,Mp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),os(e)):Mp(yt,i.stateNode));break;case 4:l=yt,m=tn,yt=i.stateNode.containerInfo,tn=!0,si(e,t,i),yt=l,tn=m;break;case 0:case 11:case 14:case 15:Li(2,i,t),Ot||Li(4,i,t),si(e,t,i);break;case 1:Ot||(Pn(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Ld(i,t,l)),si(e,t,i);break;case 21:si(e,t,i);break;case 22:Ot=(l=Ot)||i.memoizedState!==null,si(e,t,i),Ot=l;break;default:si(e,t,i)}}function Ud(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{os(e)}catch(i){nt(t,t.return,i)}}}function Pd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{os(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 Nd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Nd),t;default:throw Error(o(435,e.tag))}}function fa(e,t){var i=t0(e);t.forEach(function(l){if(!i.has(l)){i.add(l);var m=u0.bind(null,e,l);l.then(m,m)}})}function nn(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var m=i[l],w=e,O=t,P=O;e:for(;P!==null;){switch(P.tag){case 27:if(Ii(P.type)){yt=P.stateNode,tn=!1;break e}break;case 5:yt=P.stateNode,tn=!1;break e;case 3:case 4:yt=P.stateNode.containerInfo,tn=!0;break e}P=P.return}if(yt===null)throw Error(o(160));Id(w,O,m),yt=null,tn=!1,w=m.alternate,w!==null&&(w.return=null),m.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Fd(t,e),t=t.sibling}var On=null;function Fd(e,t){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nn(t,e),rn(e),l&4&&(Li(3,e,e.return),Ks(3,e),Li(5,e,e.return));break;case 1:nn(t,e),rn(e),l&512&&(Ot||i===null||Pn(i,i.return)),l&64&&ri&&(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 m=On;if(nn(t,e),rn(e),l&512&&(Ot||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,m=m.ownerDocument||m;t:switch(l){case"title":w=m.getElementsByTagName("title")[0],(!w||w[ir]||w[Je]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=m.createElement(l),m.head.insertBefore(w,m.querySelector("head > title"))),qt(w,l,i),w[Je]=e,vt(w),l=w;break e;case"link":var O=Fp("link","href",m).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=m.createElement(l),qt(w,l,i),m.head.appendChild(w);break;case"meta":if(O=Fp("meta","content",m).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=m.createElement(l),qt(w,l,i),m.head.appendChild(w);break;default:throw Error(o(468,l))}w[Je]=e,vt(w),l=w}e.stateNode=l}else qp(m,e.type,e.stateNode);else e.stateNode=Pp(m,l,e.memoizedProps);else w!==l?(w===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):w.count--,l===null?qp(m,e.type,e.stateNode):Pp(m,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Ec(e,e.memoizedProps,i.memoizedProps)}break;case 27:nn(t,e),rn(e),l&512&&(Ot||i===null||Pn(i,i.return)),i!==null&&l&4&&Ec(e,e.memoizedProps,i.memoizedProps);break;case 5:if(nn(t,e),rn(e),l&512&&(Ot||i===null||Pn(i,i.return)),e.flags&32){m=e.stateNode;try{Mr(m,"")}catch(ke){nt(e,e.return,ke)}}l&4&&e.stateNode!=null&&(m=e.memoizedProps,Ec(e,m,i!==null?i.memoizedProps:m)),l&1024&&(Tc=!0);break;case 6:if(nn(t,e),rn(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(Ta=null,m=On,On=ka(t.containerInfo),nn(t,e),On=m,rn(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{os(t.containerInfo)}catch(ke){nt(e,e.return,ke)}Tc&&(Tc=!1,qd(e));break;case 4:l=On,On=ka(e.stateNode.containerInfo),nn(t,e),rn(e),On=l;break;case 12:nn(t,e),rn(e);break;case 31:nn(t,e),rn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fa(e,l)));break;case 13:nn(t,e),rn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(pa=it()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fa(e,l)));break;case 22:m=e.memoizedState!==null;var Q=i!==null&&i.memoizedState!==null,ae=ri,pe=Ot;if(ri=ae||m,Ot=pe||Q,nn(t,e),Ot=pe,ri=ae,rn(e),l&8192)e:for(t=e.stateNode,t._visibility=m?t._visibility&-2:t._visibility|1,m&&(i===null||Q||ri||Ot||br(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){Q=i=t;try{if(w=Q.stateNode,m)O=w.style,typeof O.setProperty=="function"?O.setProperty("display","none","important"):O.display="none";else{P=Q.stateNode;var _e=Q.memoizedProps.style,oe=_e!=null&&_e.hasOwnProperty("display")?_e.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=m?"":Q.memoizedProps}catch(ke){nt(Q,Q.return,ke)}}}else if(t.tag===18){if(i===null){Q=t;try{var ue=Q.stateNode;m?Lp(ue,!0):Lp(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,fa(e,i))));break;case 19:nn(t,e),rn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fa(e,l)));break;case 30:break;case 21:break;default:nn(t,e),rn(e)}}function rn(e){var t=e.flags;if(t&2){try{for(var i,l=e.return;l!==null;){if(Bd(l)){i=l;break}l=l.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var m=i.stateNode,w=kc(e);ha(e,w,m);break;case 5:var O=i.stateNode;i.flags&32&&(Mr(O,""),i.flags&=-33);var P=kc(e);ha(e,P,O);break;case 3:case 4:var Q=i.stateNode.containerInfo,ae=kc(e);Ac(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 qd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function li(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Hd(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:Li(4,t,t.return),br(t);break;case 1:Pn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Ld(t,t.return,i),br(t);break;case 27:rl(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 ai(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,m=e,w=t,O=w.flags;switch(w.tag){case 0:case 11:case 15:ai(m,w,i),Ks(4,w);break;case 1:if(ai(m,w,i),l=w,m=l.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(ae){nt(l,l.return,ae)}if(l=w,m=l.updateQueue,m!==null){var P=l.stateNode;try{var Q=m.shared.hiddenCallbacks;if(Q!==null)for(m.shared.hiddenCallbacks=null,m=0;m<Q.length;m++)Sf(Q[m],P)}catch(ae){nt(l,l.return,ae)}}i&&O&64&&Md(w),Ys(w,w.return);break;case 27:jd(w);case 26:case 5:ai(m,w,i),i&&l===null&&O&4&&Od(w),Ys(w,w.return);break;case 12:ai(m,w,i);break;case 31:ai(m,w,i),i&&O&4&&Ud(m,w);break;case 13:ai(m,w,i),i&&O&4&&Pd(m,w);break;case 22:w.memoizedState===null&&ai(m,w,i),Ys(w,w.return);break;case 30:break;default:ai(m,w,i)}t=t.sibling}}function Rc(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&&js(i))}function Dc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&js(e))}function Bn(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gd(e,t,i,l),t=t.sibling}function Gd(e,t,i,l){var m=t.flags;switch(t.tag){case 0:case 11:case 15:Bn(e,t,i,l),m&2048&&Ks(9,t);break;case 1:Bn(e,t,i,l);break;case 3:Bn(e,t,i,l),m&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&js(e)));break;case 12:if(m&2048){Bn(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 Bn(e,t,i,l);break;case 31:Bn(e,t,i,l);break;case 13:Bn(e,t,i,l);break;case 23:break;case 22:w=t.stateNode,O=t.alternate,t.memoizedState!==null?w._visibility&2?Bn(e,t,i,l):Xs(e,t):w._visibility&2?Bn(e,t,i,l):(w._visibility|=2,Qr(e,t,i,l,(t.subtreeFlags&10256)!==0||!1)),m&2048&&Rc(O,t);break;case 24:Bn(e,t,i,l),m&2048&&Dc(t.alternate,t);break;default:Bn(e,t,i,l)}}function Qr(e,t,i,l,m){for(m=m&&((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:Qr(w,O,P,Q,m),Ks(8,O);break;case 23:break;case 22:var pe=O.stateNode;O.memoizedState!==null?pe._visibility&2?Qr(w,O,P,Q,m):Xs(w,O):(pe._visibility|=2,Qr(w,O,P,Q,m)),m&&ae&2048&&Rc(O.alternate,O);break;case 24:Qr(w,O,P,Q,m),m&&ae&2048&&Dc(O.alternate,O);break;default:Qr(w,O,P,Q,m)}t=t.sibling}}function Xs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,m=l.flags;switch(l.tag){case 22:Xs(i,l),m&2048&&Rc(l.alternate,l);break;case 24:Xs(i,l),m&2048&&Dc(l.alternate,l);break;default:Xs(i,l)}t=t.sibling}}var Qs=8192;function Zr(e,t,i){if(e.subtreeFlags&Qs)for(e=e.child;e!==null;)Vd(e,t,i),e=e.sibling}function Vd(e,t,i){switch(e.tag){case 26:Zr(e,t,i),e.flags&Qs&&e.memoizedState!==null&&P0(i,On,e.memoizedState,e.memoizedProps);break;case 5:Zr(e,t,i);break;case 3:case 4:var l=On;On=ka(e.stateNode.containerInfo),Zr(e,t,i),On=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Qs,Qs=16777216,Zr(e,t,i),Qs=l):Zr(e,t,i));break;default:Zr(e,t,i)}}function $d(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 Zs(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];zt=l,Kd(l,e)}$d(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wd(e),e=e.sibling}function Wd(e){switch(e.tag){case 0:case 11:case 15:Zs(e),e.flags&2048&&Li(9,e,e.return);break;case 3:Zs(e);break;case 12:Zs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,da(e)):Zs(e);break;default:Zs(e)}}function da(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];zt=l,Kd(l,e)}$d(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Li(8,t,t.return),da(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,da(t));break;default:da(t)}e=e.sibling}}function Kd(e,t){for(;zt!==null;){var i=zt;switch(i.tag){case 0:case 11:case 15:Li(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:js(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,zt=l;else e:for(i=e;zt!==null;){l=zt;var m=l.sibling,w=l.return;if(zd(l),l===i){zt=null;break e}if(m!==null){m.return=w,zt=m;break e}zt=w}}}var n0={getCacheForType:function(e){var t=Pt(Dt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Pt(Dt).controller.signal}},i0=typeof WeakMap=="function"?WeakMap:Map,et=0,at=null,Pe=null,Ge=0,tt=0,dn=null,Oi=!1,Jr=!1,Mc=!1,oi=0,wt=0,Bi=0,Cr=0,Lc=0,pn=0,es=0,Js=null,sn=null,Oc=!1,pa=0,Yd=0,ma=1/0,ga=null,ji=null,jt=0,Ni=null,ts=null,ci=0,Bc=0,jc=null,Xd=null,el=0,Nc=null;function mn(){return(et&2)!==0&&Ge!==0?Ge&-Ge:V.T!==null?Fc():Gt()}function Qd(){if(pn===0)if((Ge&536870912)===0||Ke){var e=kr;kr<<=1,(kr&3932160)===0&&(kr=262144),pn=e}else pn=536870912;return e=hn.current,e!==null&&(e.flags|=32),pn}function ln(e,t,i){(e===at&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(ns(e,0),Hi(e,Ge,pn,!1)),xt(e,i),((et&2)===0||e!==at)&&(e===at&&((et&2)===0&&(Cr|=i),wt===4&&Hi(e,Ge,pn,!1)),Fn(e))}function Zd(e,t,i){if((et&6)!==0)throw Error(o(327));var l=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Ji(e,t),m=l?l0(e,t):zc(e,t,!0),w=l;do{if(m===0){Jr&&!l&&Hi(e,t,0,!1);break}else{if(i=e.current.alternate,w&&!r0(i)){m=zc(e,t,!1),w=!1;continue}if(m===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;m=Js;var Q=P.current.memoizedState.isDehydrated;if(Q&&(ns(P,O).flags|=256),O=zc(P,O,!1),O!==2){if(Mc&&!Q){P.errorRecoveryDisabledLanes|=w,Cr|=w,m=4;break e}w=sn,sn=m,w!==null&&(sn===null?sn=w:sn.push.apply(sn,w))}m=O}if(w=!1,m!==2)continue}}if(m===1){ns(e,0),Hi(e,t,0,!0);break}e:{switch(l=e,w=m,w){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Hi(l,t,pn,!Oi);break e;case 2:sn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(m=pa+300-it(),10<m)){if(Hi(l,t,pn,!Oi),Zi(l,0,!0)!==0)break e;ci=t,l.timeoutHandle=Rp(Jd.bind(null,l,i,sn,ga,Oc,t,pn,Cr,es,Oi,w,"Throttled",-0,0),m);break e}Jd(l,i,sn,ga,Oc,t,pn,Cr,es,Oi,w,null,-0,0)}}break}while(!0);Fn(e)}function Jd(e,t,i,l,m,w,O,P,Q,ae,pe,_e,oe,ue){if(e.timeoutHandle=-1,_e=t.subtreeFlags,_e&8192||(_e&16785408)===16785408){_e={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kn},Vd(t,w,_e);var ke=(w&62914560)===w?pa-it():(w&4194048)===w?Yd-it():0;if(ke=F0(_e,ke),ke!==null){ci=w,e.cancelPendingCommit=ke(ap.bind(null,e,t,w,i,l,m,O,P,Q,pe,_e,null,oe,ue)),Hi(e,w,O,!ae);return}}ap(e,t,w,i,l,m,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 m=i[l],w=m.getSnapshot;m=m.value;try{if(!cn(w(),m))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 Hi(e,t,i,l){t&=~Lc,t&=~Cr,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var m=t;0<m;){var w=31-$e(m),O=1<<w;l[w]=-1,m&=~O}i!==0&&Dn(e,i,t)}function _a(){return(et&6)===0?(tl(0),!1):!0}function Hc(){if(Pe!==null){if(tt===0)var e=Pe.return;else e=Pe,Zn=dr=null,Jo(e),$r=null,Hs=0,e=Pe;for(;e!==null;)Dd(e.alternate,e),e=e.return;Pe=null}}function ns(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,x0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),ci=0,Hc(),at=e,Pe=i=Xn(e.current,null),Ge=t,tt=0,dn=null,Oi=!1,Jr=Ji(e,t),Mc=!1,es=pn=Lc=Cr=Bi=wt=0,sn=Js=null,Oc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var m=31-$e(l),w=1<<m;t|=e[m],l&=~w}return oi=t,zl(),i}function ep(e,t){He=null,V.H=Vs,t===Vr||t===$l?(t=gf(),tt=3):t===Po?(t=gf(),tt=4):tt=t===mc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,Pe===null&&(wt=1,la(e,Cn(t,e.current)))}function tp(){var e=hn.current;return e===null?!0:(Ge&4194048)===Ge?kn===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===kn:!1}function np(){var e=V.H;return V.H=Vs,e===null?Vs:e}function ip(){var e=V.A;return V.A=n0,e}function va(){wt=4,Oi||(Ge&4194048)!==Ge&&hn.current!==null||(Jr=!0),(Bi&134217727)===0&&(Cr&134217727)===0||at===null||Hi(at,Ge,pn,!1)}function zc(e,t,i){var l=et;et|=2;var m=np(),w=ip();(at!==e||Ge!==t)&&(ga=null,ns(e,t)),t=!1;var O=wt;e:do try{if(tt!==0&&Pe!==null){var P=Pe,Q=dn;switch(tt){case 8:Hc(),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,is(e,P,Q,ae),i&&Jr){O=0;break e}break;default:ae=tt,tt=0,dn=null,is(e,P,Q,ae)}}s0(),O=wt;break}catch(pe){ep(e,pe)}while(!0);return t&&e.shellSuspendCounter++,Zn=dr=null,et=l,V.H=m,V.A=w,Pe===null&&(at=null,Ge=0,zl()),O}function s0(){for(;Pe!==null;)rp(Pe)}function l0(e,t){var i=et;et|=2;var l=np(),m=ip();at!==e||Ge!==t?(ga=null,ma=it()+500,ns(e,t)):Jr=Ji(e,t);e:do try{if(tt!==0&&Pe!==null){t=Pe;var w=dn;t:switch(tt){case 1:tt=0,dn=null,is(e,t,w,1);break;case 2:case 9:if(pf(w)){tt=0,dn=null,sp(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:pf(w)?(tt=0,dn=null,sp(t)):(tt=0,dn=null,is(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?Gp(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,ya(ae)):Pe=null}break t}}tt=0,dn=null,is(e,t,w,5);break;case 6:tt=0,dn=null,is(e,t,w,6);break;case 8:Hc(),wt=6;break e;default:throw Error(o(462))}}a0();break}catch(pe){ep(e,pe)}while(!0);return Zn=dr=null,V.H=l,V.A=m,et=i,Pe!==null?0:(at=null,Ge=0,zl(),wt)}function a0(){for(;Pe!==null&&!Xt();)rp(Pe)}function rp(e){var t=Td(e.alternate,e,oi);e.memoizedProps=e.pendingProps,t===null?ya(e):Pe=t}function sp(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Cd(i,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=Cd(i,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:Jo(t);default:Dd(i,t),t=Pe=nf(t,oi),t=Td(i,t,oi)}e.memoizedProps=e.pendingProps,t===null?ya(e):Pe=t}function is(e,t,i,l){Zn=dr=null,Jo(t),$r=null,Hs=0;var m=t.return;try{if(Yv(e,m,t,i,Ge)){wt=1,la(e,Cn(i,e.current)),Pe=null;return}}catch(w){if(m!==null)throw Pe=m,w;wt=1,la(e,Cn(i,e.current)),Pe=null;return}t.flags&32768?(Ke||l===1?e=!0:Jr||(Ge&536870912)!==0?e=!1:(Oi=e=!0,(l===2||l===9||l===3||l===6)&&(l=hn.current,l!==null&&l.tag===13&&(l.flags|=16384))),lp(t,e)):ya(t)}function ya(e){var t=e;do{if((t.flags&32768)!==0){lp(t,Oi);return}e=t.return;var i=Zv(t.alternate,t,oi);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 lp(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 ap(e,t,i,l,m,w,O,P,Q){e.cancelPendingCommit=null;do Sa();while(jt!==0);if((et&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(w=t.lanes|t.childLanes,w|=ko,Al(e,i,w,O,P,Q),e===at&&(Pe=at=null,Ge=0),ts=t,Ni=e,ci=i,Bc=w,jc=m,Xd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,h0(Ce,function(){return fp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=V.T,V.T=null,m=W.p,W.p=2,O=et,et|=4;try{e0(e,t,i)}finally{et=O,W.p=m,V.T=l}}jt=1,op(),cp(),up()}}function op(){if(jt===1){jt=0;var e=Ni,t=ts,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 m=et;et|=4;try{Fd(t,e);var w=Xc,O=Wh(e.containerInfo),P=w.focusedElem,Q=w.selectionRange;if(O!==P&&P&&P.ownerDocument&&$h(P.ownerDocument.documentElement,P)){if(Q!==null&&bo(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 _e=P.ownerDocument||document,oe=_e&&_e.defaultView||window;if(oe.getSelection){var ue=oe.getSelection(),ke=P.textContent.length,Le=Math.min(Q.start,ke),lt=Q.end===void 0?Le:Math.min(Q.end,ke);!ue.extend&&Le>lt&&(O=lt,lt=Le,Le=O);var ne=Vh(P,Le),ee=Vh(P,lt);if(ne&&ee&&(ue.rangeCount!==1||ue.anchorNode!==ne.node||ue.anchorOffset!==ne.offset||ue.focusNode!==ee.node||ue.focusOffset!==ee.offset)){var le=_e.createRange();le.setStart(ne.node,ne.offset),ue.removeAllRanges(),Le>lt?(ue.addRange(le),ue.extend(ee.node,ee.offset)):(le.setEnd(ee.node,ee.offset),ue.addRange(le))}}}}for(_e=[],ue=P;ue=ue.parentNode;)ue.nodeType===1&&_e.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<_e.length;P++){var me=_e[P];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}La=!!Yc,Xc=Yc=null}finally{et=m,W.p=l,V.T=i}}e.current=t,jt=2}}function cp(){if(jt===2){jt=0;var e=Ni,t=ts,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 m=et;et|=4;try{Hd(e,t.alternate,t)}finally{et=m,W.p=l,V.T=i}}jt=3}}function up(){if(jt===4||jt===3){jt=0,St();var e=Ni,t=ts,i=ci,l=Xd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?jt=5:(jt=0,ts=Ni=null,hp(e,e.pendingLanes));var m=e.pendingLanes;if(m===0&&(ji=null),se(i),t=t.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(_t,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=V.T,m=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=m}}(ci&3)!==0&&Sa(),Fn(e),m=e.pendingLanes,(i&261930)!==0&&(m&42)!==0?e===Nc?el++:(el=0,Nc=e):el=0,tl(0)}}function hp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,js(t)))}function Sa(){return op(),cp(),up(),fp()}function fp(){if(jt!==5)return!1;var e=Ni,t=Bc;Bc=0;var i=se(ci),l=V.T,m=W.p;try{W.p=32>i?32:i,V.T=null,i=jc,jc=null;var w=Ni,O=ci;if(jt=0,ts=Ni=null,ci=0,(et&6)!==0)throw Error(o(331));var P=et;if(et|=4,Wd(w.current),Gd(w,w.current,O,i),et=P,tl(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(_t,w)}catch{}return!0}finally{W.p=m,V.T=l,hp(e,t)}}function dp(e,t,i){t=Cn(i,t),t=pc(e.stateNode,t,2),e=Ri(e,t,2),e!==null&&(xt(e,2),Fn(e))}function nt(e,t,i){if(e.tag===3)dp(e,e,i);else for(;t!==null;){if(t.tag===3){dp(t,e,i);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ji===null||!ji.has(l))){e=Cn(i,e),i=pd(2),l=Ri(t,i,2),l!==null&&(md(i,l,t,e),xt(l,2),Fn(l));break}}t=t.return}}function Ic(e,t,i){var l=e.pingCache;if(l===null){l=e.pingCache=new i0;var m=new Set;l.set(t,m)}else m=l.get(t),m===void 0&&(m=new Set,l.set(t,m));m.has(i)||(Mc=!0,m.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>it()-pa?(et&2)===0&&ns(e,0):Lc|=i,es===Ge&&(es=0)),Fn(e)}function pp(e,t){t===0&&(t=ys()),e=ur(e,t),e!==null&&(xt(e,t),Fn(e))}function c0(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),pp(e,i)}function u0(e,t){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,m=e.memoizedState;m!==null&&(i=m.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),pp(e,i)}function h0(e,t){return Nt(e,t)}var ba=null,rs=null,Uc=!1,Ca=!1,Pc=!1,zi=0;function Fn(e){e!==rs&&e.next===null&&(rs===null?ba=rs=e:rs=rs.next=e),Ca=!0,Uc||(Uc=!0,d0())}function tl(e,t){if(!Pc&&Ca){Pc=!0;do for(var i=!1,l=ba;l!==null;){if(e!==0){var m=l.pendingLanes;if(m===0)var w=0;else{var O=l.suspendedLanes,P=l.pingedLanes;w=(1<<31-$e(42|e)+1)-1,w&=m&~(O&~P),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(i=!0,vp(l,w))}else w=Ge,w=Zi(l,l===at?w:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(w&3)===0||Ji(l,w)||(i=!0,vp(l,w));l=l.next}while(i);Pc=!1}}function f0(){mp()}function mp(){Ca=Uc=!1;var e=0;zi!==0&&w0()&&(e=zi);for(var t=it(),i=null,l=ba;l!==null;){var m=l.next,w=gp(l,t);w===0?(l.next=null,i===null?ba=m:i.next=m,m===null&&(rs=i)):(i=l,(e!==0||(w&3)!==0)&&(Ca=!0)),l=m}jt!==0&&jt!==5||tl(e),zi!==0&&(zi=0)}function gp(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,m=e.expirationTimes,w=e.pendingLanes&-62914561;0<w;){var O=31-$e(w),P=1<<O,Q=m[O];Q===-1?((P&i)===0||(P&l)!==0)&&(m[O]=Ar(P,t)):Q<=t&&(e.expiredLanes|=P),w&=~P}if(t=at,i=Ge,i=Zi(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&&At(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ji(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(l!==null&&At(l),se(i)){case 2:case 8:i=Se;break;case 32:i=Ce;break;case 268435456:i=Be;break;default:i=Ce}return l=_p.bind(null,e),i=Nt(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&At(l),e.callbackPriority=2,e.callbackNode=null,2}function _p(e,t){if(jt!==0&&jt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Sa()&&e.callbackNode!==i)return null;var l=Ge;return l=Zi(e,e===at?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Zd(e,l,t),gp(e,it()),e.callbackNode!=null&&e.callbackNode===i?_p.bind(null,e):null)}function vp(e,t){if(Sa())return null;Zd(e,t,!0)}function d0(){E0(function(){(et&6)!==0?Nt(fe,f0):mp()})}function Fc(){if(zi===0){var e=qr;e===0&&(e=pi,pi<<=1,(pi&261888)===0&&(pi=256)),zi=e}return zi}function yp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Dl(""+e)}function Sp(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,m){if(t==="submit"&&i&&i.stateNode===m){var w=yp((m[pt]||null).action),O=l.submitter;O&&(t=(t=O[pt]||null)?yp(t.formAction):O.getAttribute("formAction"),t!==null&&(w=t,O=null));var P=new Bl("action","action",null,l,m);e.push({event:P,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(zi!==0){var Q=O?Sp(m,O):new FormData(m);oc(i,{pending:!0,data:Q,method:m.method,action:w},null,Q)}}else typeof w=="function"&&(P.preventDefault(),Q=O?Sp(m,O):new FormData(m),oc(i,{pending:!0,data:Q,method:m.method,action:w},w,Q))},currentTarget:m}]})}}for(var qc=0;qc<Eo.length;qc++){var Gc=Eo[qc],m0=Gc.toLowerCase(),g0=Gc[0].toUpperCase()+Gc.slice(1);Ln(m0,"on"+g0)}Ln(Xh,"onAnimationEnd"),Ln(Qh,"onAnimationIteration"),Ln(Zh,"onAnimationStart"),Ln("dblclick","onDoubleClick"),Ln("focusin","onFocus"),Ln("focusout","onBlur"),Ln(Lv,"onTransitionRun"),Ln(Ov,"onTransitionStart"),Ln(Bv,"onTransitionCancel"),Ln(Jh,"onTransitionEnd"),Hn("onMouseEnter",["mouseout","mouseover"]),Hn("onMouseLeave",["mouseout","mouseover"]),Hn("onPointerEnter",["pointerout","pointerover"]),Hn("onPointerLeave",["pointerout","pointerover"]),$n("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$n("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$n("onBeforeInput",["compositionend","keypress","textInput","paste"]),$n("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$n("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$n("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nl="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(nl));function bp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],m=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&&m.isPropagationStopped())break e;w=P,m.currentTarget=ae;try{w(m)}catch(pe){Hl(pe)}m.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&&m.isPropagationStopped())break e;w=P,m.currentTarget=ae;try{w(m)}catch(pe){Hl(pe)}m.currentTarget=null,w=Q}}}}function Fe(e,t){var i=t[Rr];i===void 0&&(i=t[Rr]=new Set);var l=e+"__bubble";i.has(l)||(Cp(t,e,2,!1),i.add(l))}function Vc(e,t,i){var l=0;t&&(l|=4),Cp(i,e,l,t)}var wa="_reactListening"+Math.random().toString(36).slice(2);function $c(e){if(!e[wa]){e[wa]=!0,vi.forEach(function(i){i!=="selectionchange"&&(_0.has(i)||Vc(i,!1,e),Vc(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wa]||(t[wa]=!0,Vc("selectionchange",!1,t))}}function Cp(e,t,i,l){switch(Qp(t)){case 2:var m=V0;break;case 8:m=$0;break;default:m=au}i=m.bind(null,t,i,e),m=void 0,!ho||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(m=!0),l?m!==void 0?e.addEventListener(t,i,{capture:!0,passive:m}):e.addEventListener(t,i,!0):m!==void 0?e.addEventListener(t,i,{passive:m}):e.addEventListener(t,i,!1)}function Wc(e,t,i,l,m){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===m)break;if(O===4)for(O=l.return;O!==null;){var Q=O.tag;if((Q===3||Q===4)&&O.stateNode.containerInfo===m)return;O=O.return}for(;P!==null;){if(O=gi(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}kh(function(){var ae=w,pe=co(i),_e=[];e:{var oe=ef.get(e);if(oe!==void 0){var ue=Bl,ke=e;switch(e){case"keypress":if(Ll(i)===0)break e;case"keydown":case"keyup":ue=uv;break;case"focusin":ke="focus",ue=go;break;case"focusout":ke="blur",ue=go;break;case"beforeblur":case"afterblur":ue=go;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=Rh;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 Xh:case Qh:case Zh:ue=tv;break;case Jh: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=Mh;break;case"toggle":case"beforetoggle":ue=yv}var Le=(t&4)!==0,lt=!Le&&(e==="scroll"||e==="scrollend"),ne=Le?oe!==null?oe+"Capture":null:oe;Le=[];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||ne===null||(me=xs(ee,ne),me!=null&&Le.push(il(ee,me,le))),lt)break;ee=ee.return}0<Le.length&&(oe=new ue(oe,ke,null,i,pe),_e.push({event:oe,listeners:Le}))}}if((t&7)===0){e:{if(oe=e==="mouseover"||e==="pointerover",ue=e==="mouseout"||e==="pointerout",oe&&i!==oo&&(ke=i.relatedTarget||i.fromElement)&&(gi(ke)||ke[Vn]))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?gi(ke):null,ke!==null&&(lt=v(ke),Le=ke.tag,ke!==lt||Le!==5&&Le!==27&&Le!==6)&&(ke=null)):(ue=null,ke=ae),ue!==ke)){if(Le=Rh,me="onMouseLeave",ne="onMouseEnter",ee="mouse",(e==="pointerout"||e==="pointerover")&&(Le=Mh,me="onPointerLeave",ne="onPointerEnter",ee="pointer"),lt=ue==null?oe:rr(ue),le=ke==null?oe:rr(ke),oe=new Le(me,ee+"leave",ue,i,pe),oe.target=lt,oe.relatedTarget=le,me=null,gi(pe)===ae&&(Le=new Le(ne,ee+"enter",ke,i,pe),Le.target=le,Le.relatedTarget=lt,me=Le),lt=me,ue&&ke)t:{for(Le=v0,ne=ue,ee=ke,le=0,me=ne;me;me=Le(me))le++;me=0;for(var Te=ee;Te;Te=Le(Te))me++;for(;0<le-me;)ne=Le(ne),le--;for(;0<me-le;)ee=Le(ee),me--;for(;le--;){if(ne===ee||ee!==null&&ne===ee.alternate){Le=ne;break t}ne=Le(ne),ee=Le(ee)}Le=null}else Le=null;ue!==null&&wp(_e,oe,ue,Le,!1),ke!==null&&lt!==null&&wp(_e,lt,ke,Le,!0)}}e:{if(oe=ae?rr(ae):window,ue=oe.nodeName&&oe.nodeName.toLowerCase(),ue==="select"||ue==="input"&&oe.type==="file")var Qe=Ih;else if(Hh(oe))if(Uh)Qe=Rv;else{Qe=Av;var Ae=kv}else ue=oe.nodeName,!ue||ue.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?ae&&ao(ae.elementType)&&(Qe=Ih):Qe=Tv;if(Qe&&(Qe=Qe(e,ae))){zh(_e,Qe,i,pe);break e}Ae&&Ae(e,oe,ae),e==="focusout"&&ae&&oe.type==="number"&&ae.memoizedProps.value!=null&&zn(oe,"number",oe.value)}switch(Ae=ae?rr(ae):window,e){case"focusin":(Hh(Ae)||Ae.contentEditable==="true")&&(jr=Ae,Co=ae,Ls=null);break;case"focusout":Ls=Co=jr=null;break;case"mousedown":wo=!0;break;case"contextmenu":case"mouseup":case"dragend":wo=!1,Kh(_e,i,pe);break;case"selectionchange":if(Mv)break;case"keydown":case"keyup":Kh(_e,i,pe)}var ze;if(vo)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 Br?jh(e,i)&&(Ve="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ve="onCompositionStart");Ve&&(Lh&&i.locale!=="ko"&&(Br||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Br&&(ze=Ah()):(Ci=pe,fo="value"in Ci?Ci.value:Ci.textContent,Br=!0)),Ae=xa(ae,Ve),0<Ae.length&&(Ve=new Dh(Ve,e,null,i,pe),_e.push({event:Ve,listeners:Ae}),ze?Ve.data=ze:(ze=Nh(i),ze!==null&&(Ve.data=ze)))),(ze=bv?Cv(e,i):wv(e,i))&&(Ve=xa(ae,"onBeforeInput"),0<Ve.length&&(Ae=new Dh("onBeforeInput","beforeinput",null,i,pe),_e.push({event:Ae,listeners:Ve}),Ae.data=ze)),p0(_e,e,ae,i,pe)}bp(_e,t)})}function il(e,t,i){return{instance:e,listener:t,currentTarget:i}}function xa(e,t){for(var i=t+"Capture",l=[];e!==null;){var m=e,w=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||w===null||(m=xs(e,i),m!=null&&l.unshift(il(e,m,w)),m=xs(e,t),m!=null&&l.push(il(e,m,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 wp(e,t,i,l,m){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,m?(ae=xs(i,w),ae!=null&&O.unshift(il(i,ae,Q))):m||(ae=xs(i,w),ae!=null&&O.push(il(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 xp(e){return(typeof e=="string"?e:""+e).replace(y0,`
49
+ `).replace(S0,"")}function Ep(e,t){return t=xp(t),xp(e)===t}function st(e,t,i,l,m,w){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Mr(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Mr(e,""+l);break;case"className":je(e,"class",l);break;case"tabIndex":je(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":je(e,i,l);break;case"style":xh(e,l,w);break;case"data":if(t!=="object"){je(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=Dl(""+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",m.name,m,null),st(e,t,"formEncType",m.formEncType,m,null),st(e,t,"formMethod",m.formMethod,m,null),st(e,t,"formTarget",m.formTarget,m,null)):(st(e,t,"encType",m.encType,m,null),st(e,t,"method",m.method,m,null),st(e,t,"target",m.target,m,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=Dl(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=Kn);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(m.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=Dl(""+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),Sn(e,"popover",l);break;case"xlinkActuate":Mn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Mn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Mn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Mn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Mn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Mn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Mn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Mn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Mn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Sn(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=K_.get(i)||i,Sn(e,i,l))}}function Kc(e,t,i,l,m,w){switch(i){case"style":xh(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(m.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof l=="string"?Mr(e,l):(typeof l=="number"||typeof l=="bigint")&&Mr(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=Kn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Dr.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(m=i.endsWith("Capture"),t=i.slice(2,m?i.length-7:void 0),w=e[pt]||null,w=w!=null?w[i]:null,typeof w=="function"&&e.removeEventListener(t,w,m),typeof l=="function")){typeof w!="function"&&w!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,m);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):Sn(e,i,l)}}}function qt(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,m=!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":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,w,O,i,null)}}m&&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=m=null,Q=null,ae=null;for(l in i)if(i.hasOwnProperty(l)){var pe=i[l];if(pe!=null)switch(l){case"name":m=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)}}Si(e,w,P,Q,ae,O,m,!1);return;case"select":Fe("invalid",e),l=O=w=null;for(m in i)if(i.hasOwnProperty(m)&&(P=i[m],P!=null))switch(m){case"value":w=P;break;case"defaultValue":O=P;break;case"multiple":l=P;default:st(e,t,m,P,i,null)}t=w,i=O,e.multiple=!!l,t!=null?bi(e,!!l,t,!1):i!=null&&bi(e,!!l,i,!0);return;case"textarea":Fe("invalid",e),w=m=l=null;for(O in i)if(i.hasOwnProperty(O)&&(P=i[O],P!=null))switch(O){case"value":l=P;break;case"defaultValue":m=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)}Ch(e,l,m,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<nl.length;l++)Fe(nl[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(ao(t)){for(pe in i)i.hasOwnProperty(pe)&&(l=i[pe],l!==void 0&&Kc(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 m=null,w=null,O=null,P=null,Q=null,ae=null,pe=null;for(ue in i){var _e=i[ue];if(i.hasOwnProperty(ue)&&_e!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":Q=_e;default:l.hasOwnProperty(ue)||st(e,t,ue,null,l,_e)}}for(var oe in l){var ue=l[oe];if(_e=i[oe],l.hasOwnProperty(oe)&&(ue!=null||_e!=null))switch(oe){case"type":w=ue;break;case"name":m=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!==_e&&st(e,t,oe,ue,l,_e)}}bt(e,O,P,Q,ae,pe,w,m);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(m in l)if(w=l[m],Q=i[m],l.hasOwnProperty(m)&&(w!=null||Q!=null))switch(m){case"value":oe=w;break;case"defaultValue":P=w;break;case"multiple":O=w;default:w!==Q&&st(e,t,m,w,l,Q)}t=P,i=O,l=ue,oe!=null?bi(e,!!i,oe,!1):!!l!=!!i&&(t!=null?bi(e,!!i,t,!0):bi(e,!!i,i?[]:"",!1));return;case"textarea":ue=oe=null;for(P in i)if(m=i[P],i.hasOwnProperty(P)&&m!=null&&!l.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:st(e,t,P,null,l,m)}for(O in l)if(m=l[O],w=i[O],l.hasOwnProperty(O)&&(m!=null||w!=null))switch(O){case"value":oe=m;break;case"defaultValue":ue=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:m!==w&&st(e,t,O,m,l,w)}bh(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 Le in i)oe=i[Le],i.hasOwnProperty(Le)&&oe!=null&&!l.hasOwnProperty(Le)&&st(e,t,Le,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(ao(t)){for(var lt in i)oe=i[lt],i.hasOwnProperty(lt)&&oe!==void 0&&!l.hasOwnProperty(lt)&&Kc(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||Kc(e,t,pe,oe,l,ue);return}}for(var ne in i)oe=i[ne],i.hasOwnProperty(ne)&&oe!=null&&!l.hasOwnProperty(ne)&&st(e,t,ne,null,l,oe);for(_e in l)oe=l[_e],ue=i[_e],!l.hasOwnProperty(_e)||oe===ue||oe==null&&ue==null||st(e,t,_e,oe,l,ue)}function kp(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 m=i[l],w=m.transferSize,O=m.initiatorType,P=m.duration;if(w&&P&&kp(O)){for(O=0,P=m.responseEnd,l+=1;l<i.length;l++){var Q=i[l],ae=Q.startTime;if(ae>P)break;var pe=Q.transferSize,_e=Q.initiatorType;pe&&kp(_e)&&(Q=Q.responseEnd,O+=pe*(Q<P?1:(P-ae)/(Q-ae)))}if(--l,t+=8*(w+O)/(m.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 Yc=null,Xc=null;function Ea(e){return e.nodeType===9?e:e.ownerDocument}function Ap(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 Tp(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 Qc(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 Zc=null;function w0(){var e=window.event;return e&&e.type==="popstate"?e===Zc?!1:(Zc=e,!0):(Zc=null,!1)}var Rp=typeof setTimeout=="function"?setTimeout:void 0,x0=typeof clearTimeout=="function"?clearTimeout:void 0,Dp=typeof Promise=="function"?Promise:void 0,E0=typeof queueMicrotask=="function"?queueMicrotask:typeof Dp<"u"?function(e){return Dp.resolve(null).then(e).catch(k0)}:Rp;function k0(e){setTimeout(function(){throw e})}function Ii(e){return e==="head"}function Mp(e,t){var i=t,l=0;do{var m=i.nextSibling;if(e.removeChild(i),m&&m.nodeType===8)if(i=m.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(m),os(t);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")rl(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,rl(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"&&rl(e.ownerDocument.body);i=m}while(i);os(t)}function Lp(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 Jc(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":Jc(i),bs(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 m=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!==m.rel||e.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||e.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||e.getAttribute("title")!==(m.title==null?null:m.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(w=e.getAttribute("src"),(w!==(m.src==null?null:m.src)||e.getAttribute("type")!==(m.type==null?null:m.type)||e.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&w&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var w=m.name==null?null:""+m.name;if(m.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 Op(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 eu(e){return e.data==="$?"||e.data==="$~"}function tu(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 nu=null;function Bp(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 jp(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 Np(e,t,i){switch(t=Ea(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 rl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bs(e)}var Tn=new Map,Hp=new Set;function ka(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ui=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=ui.f(),t=_a();return e||t}function M0(e){var t=_i(e);t!==null&&t.tag===5&&t.type==="form"?ed(t):ui.r(e)}var ss=typeof document>"u"?null:document;function zp(e,t,i){var l=ss;if(l&&typeof t=="string"&&t){var m=We(t);m='link[rel="'+e+'"][href="'+m+'"]',typeof i=="string"&&(m+='[crossorigin="'+i+'"]'),Hp.has(m)||(Hp.add(m),e={rel:e,crossOrigin:i,href:t},l.querySelector(m)===null&&(t=l.createElement("link"),qt(t,"link",e),vt(t),l.head.appendChild(t)))}}function L0(e){ui.D(e),zp("dns-prefetch",e,null)}function O0(e,t){ui.C(e,t),zp("preconnect",e,t)}function B0(e,t,i){ui.L(e,t,i);var l=ss;if(l&&e&&t){var m='link[rel="preload"][as="'+We(t)+'"]';t==="image"&&i&&i.imageSrcSet?(m+='[imagesrcset="'+We(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(m+='[imagesizes="'+We(i.imageSizes)+'"]')):m+='[href="'+We(e)+'"]';var w=m;switch(t){case"style":w=ls(e);break;case"script":w=as(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(m)!==null||t==="style"&&l.querySelector(sl(w))||t==="script"&&l.querySelector(ll(w))||(t=l.createElement("link"),qt(t,"link",e),vt(t),l.head.appendChild(t)))}}function j0(e,t){ui.m(e,t);var i=ss;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",m='link[rel="modulepreload"][as="'+We(l)+'"][href="'+We(e)+'"]',w=m;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=as(e)}if(!Tn.has(w)&&(e=u({rel:"modulepreload",href:e},t),Tn.set(w,e),i.querySelector(m)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ll(w)))return}l=i.createElement("link"),qt(l,"link",e),vt(l),i.head.appendChild(l)}}}function N0(e,t,i){ui.S(e,t,i);var l=ss;if(l&&e){var m=yn(l).hoistableStyles,w=ls(e);t=t||"default";var O=m.get(w);if(!O){var P={loading:0,preload:null};if(O=l.querySelector(sl(w)))P.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Tn.get(w))&&iu(e,i);var Q=O=l.createElement("link");vt(Q),qt(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,Aa(O,t,l)}O={type:"stylesheet",instance:O,count:1,state:P},m.set(w,O)}}}function H0(e,t){ui.X(e,t);var i=ss;if(i&&e){var l=yn(i).hoistableScripts,m=as(e),w=l.get(m);w||(w=i.querySelector(ll(m)),w||(e=u({src:e,async:!0},t),(t=Tn.get(m))&&ru(e,t),w=i.createElement("script"),vt(w),qt(w,"link",e),i.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},l.set(m,w))}}function z0(e,t){ui.M(e,t);var i=ss;if(i&&e){var l=yn(i).hoistableScripts,m=as(e),w=l.get(m);w||(w=i.querySelector(ll(m)),w||(e=u({src:e,async:!0,type:"module"},t),(t=Tn.get(m))&&ru(e,t),w=i.createElement("script"),vt(w),qt(w,"link",e),i.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},l.set(m,w))}}function Ip(e,t,i,l){var m=(m=ge.current)?ka(m):null;if(!m)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=ls(i.href),i=yn(m).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=ls(i.href);var w=yn(m).hoistableStyles,O=w.get(e);if(O||(m=m.ownerDocument||m,O={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(e,O),(w=m.querySelector(sl(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(m,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=as(i),i=yn(m).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 ls(e){return'href="'+We(e)+'"'}function sl(e){return'link[rel="stylesheet"]['+e+"]"}function Up(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}),qt(t,"link",i),vt(t),e.head.appendChild(t))}function as(e){return'[src="'+We(e)+'"]'}function ll(e){return"script[async]"+e}function Pp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+We(i.href)+'"]');if(l)return t.instance=l,vt(l),l;var m=u({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),vt(l),qt(l,"style",m),Aa(l,i.precedence,e),t.instance=l;case"stylesheet":m=ls(i.href);var w=e.querySelector(sl(m));if(w)return t.state.loading|=4,t.instance=w,vt(w),w;l=Up(i),(m=Tn.get(m))&&iu(l,m),w=(e.ownerDocument||e).createElement("link"),vt(w);var O=w;return O._p=new Promise(function(P,Q){O.onload=P,O.onerror=Q}),qt(w,"link",l),t.state.loading|=4,Aa(w,i.precedence,e),t.instance=w;case"script":return w=as(i.src),(m=e.querySelector(ll(w)))?(t.instance=m,vt(m),m):(l=i,(m=Tn.get(w))&&(l=u({},i),ru(l,m)),e=e.ownerDocument||e,m=e.createElement("script"),vt(m),qt(m,"link",l),e.head.appendChild(m),t.instance=m);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,Aa(l,i.precedence,e));return t.instance}function Aa(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=l.length?l[l.length-1]:null,w=m,O=0;O<l.length;O++){var P=l[O];if(P.dataset.precedence===t)w=P;else if(w!==m)break}w?w.parentNode.insertBefore(e,w.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function iu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ru(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ta=null;function Fp(e,t,i){if(Ta===null){var l=new Map,m=Ta=new Map;m.set(i,l)}else m=Ta,l=m.get(i),l||(l=new Map,m.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),m=0;m<i.length;m++){var w=i[m];if(!(w[ir]||w[Je]||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 qp(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 Gp(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 m=ls(l.href),w=t.querySelector(sl(m));if(w){t=w._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ra.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=w,vt(w);return}w=t.ownerDocument||t,l=Up(l),(m=Tn.get(m))&&iu(l,m),w=w.createElement("link"),vt(w);var O=w;O._p=new Promise(function(P,Q){O.onload=P,O.onerror=Q}),qt(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=Ra.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var su=0;function F0(e,t){return e.stylesheets&&e.count===0&&Ma(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&Ma(e,e.stylesheets),e.unsuspend){var w=e.unsuspend;e.unsuspend=null,w()}},6e4+t);0<e.imgBytes&&su===0&&(su=62500*C0());var m=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ma(e,e.stylesheets),e.unsuspend)){var w=e.unsuspend;e.unsuspend=null,w()}},(e.imgBytes>su?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(m)}}:null}function Ra(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ma(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Da=null;function Ma(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Da=new Map,t.forEach(q0,e),Da=null,Ra.call(e))}function q0(e,t){if(!(t.state.loading&4)){var i=Da.get(e);if(i)var l=i.get(null);else{i=new Map,Da.set(e,i);for(var m=e.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<m.length;w++){var O=m[w];(O.nodeName==="LINK"||O.getAttribute("media")!=="not all")&&(i.set(O.dataset.precedence,O),l=O)}l&&i.set(null,l)}m=t.instance,O=m.getAttribute("data-precedence"),w=i.get(O)||l,w===l&&i.set(null,m),i.set(O,m),this.count++,l=Ra.bind(this),m.addEventListener("load",l),m.addEventListener("error",l),w?w.parentNode.insertBefore(m,w.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(m,e.firstChild)),t.state.loading|=4}}var al={$$typeof:S,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function G0(e,t,i,l,m,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=Tr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tr(0),this.hiddenUpdates=Tr(null),this.identifierPrefix=l,this.onUncaughtError=m,this.onCaughtError=w,this.onRecoverableError=O,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function Vp(e,t,i,l,m,w,O,P,Q,ae,pe,_e){return e=new G0(e,t,i,O,Q,ae,pe,_e,P),t=1,w===!0&&(t|=24),w=un(3,null,null,t),e.current=w,w.stateNode=e,t=zo(),t.refCount++,e.pooledCache=t,t.refCount++,w.memoizedState={element:l,isDehydrated:i,cache:t},Fo(w),e}function $p(e){return e?(e=zr,e):zr}function Wp(e,t,i,l,m,w){m=$p(m),l.context===null?l.context=m:l.pendingContext=m,l=Ti(t),l.payload={element:i},w=w===void 0?null:w,w!==null&&(l.callback=w),i=Ri(e,l,t),i!==null&&(ln(i,e,t),Is(i,e,t))}function Kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function lu(e,t){Kp(e,t),(e=e.alternate)&&Kp(e,t)}function Yp(e){if(e.tag===13||e.tag===31){var t=ur(e,67108864);t!==null&&ln(t,e,67108864),lu(e,67108864)}}function Xp(e){if(e.tag===13||e.tag===31){var t=mn();t=tr(t);var i=ur(e,t);i!==null&&ln(i,e,t),lu(e,t)}}var La=!0;function V0(e,t,i,l){var m=V.T;V.T=null;var w=W.p;try{W.p=2,au(e,t,i,l)}finally{W.p=w,V.T=m}}function $0(e,t,i,l){var m=V.T;V.T=null;var w=W.p;try{W.p=8,au(e,t,i,l)}finally{W.p=w,V.T=m}}function au(e,t,i,l){if(La){var m=ou(l);if(m===null)Wc(e,t,l,Oa,i),Zp(e,l);else if(K0(m,e,t,i,l))l.stopPropagation();else if(Zp(e,l),t&4&&-1<W0.indexOf(e)){for(;m!==null;){var w=_i(m);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var O=vn(w.pendingLanes);if(O!==0){var P=w;for(P.pendingLanes|=2,P.entangledLanes|=2;O;){var Q=1<<31-$e(O);P.entanglements[1]|=Q,O&=~Q}Fn(w),(et&6)===0&&(ma=it()+500,tl(0))}}break;case 31:case 13:P=ur(w,2),P!==null&&ln(P,w,2),_a(),lu(w,2)}if(w=ou(l),w===null&&Wc(e,t,l,Oa,i),w===m)break;m=w}m!==null&&l.stopPropagation()}else Wc(e,t,l,null,i)}}function ou(e){return e=co(e),cu(e)}var Oa=null;function cu(e){if(Oa=null,e=gi(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 Oa=e,null}function Qp(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(Tt()){case fe:return 2;case Se:return 8;case Ce:case De:return 32;case Be:return 268435456;default:return 32}default:return 32}}var uu=!1,Ui=null,Pi=null,Fi=null,ol=new Map,cl=new Map,qi=[],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 Zp(e,t){switch(e){case"focusin":case"focusout":Ui=null;break;case"dragenter":case"dragleave":Pi=null;break;case"mouseover":case"mouseout":Fi=null;break;case"pointerover":case"pointerout":ol.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":cl.delete(t.pointerId)}}function ul(e,t,i,l,m,w){return e===null||e.nativeEvent!==w?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:w,targetContainers:[m]},t!==null&&(t=_i(t),t!==null&&Yp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,m!==null&&t.indexOf(m)===-1&&t.push(m),e)}function K0(e,t,i,l,m){switch(t){case"focusin":return Ui=ul(Ui,e,t,i,l,m),!0;case"dragenter":return Pi=ul(Pi,e,t,i,l,m),!0;case"mouseover":return Fi=ul(Fi,e,t,i,l,m),!0;case"pointerover":var w=m.pointerId;return ol.set(w,ul(ol.get(w)||null,e,t,i,l,m)),!0;case"gotpointercapture":return w=m.pointerId,cl.set(w,ul(cl.get(w)||null,e,t,i,l,m)),!0}return!1}function Jp(e){var t=gi(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,Tl(e.priority,function(){Xp(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,Tl(e.priority,function(){Xp(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 Ba(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=ou(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);oo=l,i.target.dispatchEvent(l),oo=null}else return t=_i(i),t!==null&&Yp(t),e.blockedOn=i,!1;t.shift()}return!0}function em(e,t,i){Ba(e)&&i.delete(t)}function Y0(){uu=!1,Ui!==null&&Ba(Ui)&&(Ui=null),Pi!==null&&Ba(Pi)&&(Pi=null),Fi!==null&&Ba(Fi)&&(Fi=null),ol.forEach(em),cl.forEach(em)}function ja(e,t){e.blockedOn===t&&(e.blockedOn=null,uu||(uu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Y0)))}var Na=null;function tm(e){Na!==e&&(Na=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Na===e&&(Na=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],m=e[t+2];if(typeof l!="function"){if(cu(l||i)===null)continue;break}var w=_i(i);w!==null&&(e.splice(t,3),t-=3,oc(w,{pending:!0,data:m,method:i.method,action:l},l,m))}}))}function os(e){function t(Q){return ja(Q,e)}Ui!==null&&ja(Ui,e),Pi!==null&&ja(Pi,e),Fi!==null&&ja(Fi,e),ol.forEach(t),cl.forEach(t);for(var i=0;i<qi.length;i++){var l=qi[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<qi.length&&(i=qi[0],i.blockedOn===null);)Jp(i),i.blockedOn===null&&qi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var m=i[l],w=i[l+1],O=m[pt]||null;if(typeof w=="function")O||tm(i);else if(O){var P=null;if(w&&w.hasAttribute("formAction")){if(m=w,O=w[pt]||null)P=O.formAction;else if(cu(m)!==null)continue}else P=O.action;typeof P=="function"?i[l+1]=P:(i.splice(l,3),l-=3),tm(i)}}}function nm(){function e(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(O){return m=O})},focusReset:"manual",scroll:"manual"})}function t(){m!==null&&(m(),m=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,m=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),m!==null&&(m(),m=null)}}}function hu(e){this._internalRoot=e}Ha.prototype.render=hu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,l=mn();Wp(i,l,e,t,null,null)},Ha.prototype.unmount=hu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wp(e.current,2,null,e,null,null),_a(),t[Vn]=null}};function Ha(e){this._internalRoot=e}Ha.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gt();e={blockedOn:null,target:e,priority:t};for(var i=0;i<qi.length&&t!==0&&t<qi[i].priority;i++);qi.splice(i,0,e),i===0&&Jp(e)}};var im=r.version;if(im!=="19.2.6")throw Error(o(527,im,"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?p(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 za=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!za.isDisabled&&za.supportsFiber)try{_t=za.inject(X0),ut=za}catch{}}return fl.createRoot=function(e,t){if(!d(e))throw Error(o(299));var i=!1,l="",m=ud,w=hd,O=fd;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(m=t.onUncaughtError),t.onCaughtError!==void 0&&(w=t.onCaughtError),t.onRecoverableError!==void 0&&(O=t.onRecoverableError)),t=Vp(e,1,!1,null,null,i,l,null,m,w,O,nm),e[Vn]=t.current,$c(e),new hu(t)},fl.hydrateRoot=function(e,t,i){if(!d(e))throw Error(o(299));var l=!1,m="",w=ud,O=hd,P=fd,Q=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(m=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=Vp(e,1,!0,t,i??null,l,m,Q,w,O,P,nm),t.context=$p(null),i=t.current,l=mn(),l=tr(l),m=Ti(l),m.callback=null,Ri(i,m,l),i=l,t.current.lanes=i,xt(t,i),Fn(t),e[Vn]=t.current,$c(e),new Ha(t)},fl.version="19.2.6",fl}var pm;function o1(){if(pm)return pu.exports;pm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),pu.exports=a1(),pu.exports}var c1=o1();const gs=function(n,r){let d=n;const v=_l[r];let f=null,a=0,c=null;const h=[],p={},u=function(D,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(),k(),_(D,A),d>=7&&y(D),c==null&&(c=E(d,v,h)),g(c,A)},b=function(D,A){for(let L=-1;L<=7;L+=1)if(!(D+L<=-1||a<=D+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[D+L][A+B]=!0:f[D+L][A+B]=!1)},C=function(){let D=0,A=0;for(let L=0;L<8;L+=1){u(!0,L);const B=$i.getLostPoint(p);(L==0||D>B)&&(D=B,A=L)}return A},k=function(){for(let D=8;D<a-8;D+=1)f[D][6]==null&&(f[D][6]=D%2==0);for(let D=8;D<a-8;D+=1)f[6][D]==null&&(f[6][D]=D%2==0)},x=function(){const D=$i.getPatternPosition(d);for(let A=0;A<D.length;A+=1)for(let L=0;L<D.length;L+=1){const B=D[A],I=D[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(D){const A=$i.getBCHTypeNumber(d);for(let L=0;L<18;L+=1){const B=!D&&(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=!D&&(A>>L&1)==1;f[L%3+a-8-3][Math.floor(L/3)]=B}},_=function(D,A){const L=v<<3|A,B=$i.getBCHTypeInfo(L);for(let I=0;I<15;I+=1){const U=!D&&(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=!D&&(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]=!D},g=function(D,A){let L=-1,B=a-1,I=7,U=0;const F=$i.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<D.length&&(V=(D[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(D,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&D.getBuffer()[N+L];L+=J;const j=$i.getErrorCorrectPolynomial(z),G=bl(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},E=function(D,A,L){const B=mm.getRSBlocks(D,A),I=gm();for(let F=0;F<L.length;F+=1){const $=L[F];I.put($.getMode(),4),I.put($.getLength(),$i.getLengthInBits($.getMode(),D)),$.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)};p.addData=function(D,A){A=A||"Byte";let L=null;switch(A){case"Numeric":L=u1(D);break;case"Alphanumeric":L=h1(D);break;case"Byte":L=f1(D);break;case"Kanji":L=d1(D);break;default:throw"mode:"+A}h.push(L),c=null},p.isDark=function(D,A){if(D<0||a<=D||A<0||a<=A)throw D+","+A;return f[D][A]},p.getModuleCount=function(){return a},p.make=function(){if(d<1){let D=1;for(;D<40;D++){const A=mm.getRSBlocks(D,v),L=gm();for(let I=0;I<h.length;I++){const U=h[I];L.put(U.getMode(),4),L.put(U.getLength(),$i.getLengthInBits(U.getMode(),D)),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=D}u(!1,C())},p.createTableTag=function(D,A){D=D||2,A=typeof A>"u"?D*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<p.getModuleCount();B+=1){L+="<tr>";for(let I=0;I<p.getModuleCount();I+=1)L+='<td style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: 0px;",L+=" width: "+D+"px;",L+=" height: "+D+"px;",L+=" background-color: ",L+=p.isDark(B,I)?"#000000":"#ffffff",L+=";",L+='"/>';L+="</tr>"}return L+="</tbody>",L+="</table>",L},p.createSvgTag=function(D,A,L,B){let I={};typeof arguments[0]=="object"&&(I=arguments[0],D=I.cellSize,A=I.margin,L=I.alt,B=I.title),D=D||2,A=typeof A>"u"?D*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=p.getModuleCount()*D+A*2;let F,$,K,V,W="",J;for(J="l"+D+",0 0,"+D+" -"+D+",0 0,-"+D+"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<p.getModuleCount();K+=1)for(V=K*D+A,F=0;F<p.getModuleCount();F+=1)p.isDark(K,F)&&($=F*D+A,W+="M"+$+","+V+J);return W+='" stroke="transparent" fill="black"/>',W+="</svg>",W},p.createDataURL=function(D,A){D=D||2,A=typeof A>"u"?D*4:A;const L=p.getModuleCount()*D+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)/D),K=Math.floor((F-B)/D);return p.isDark(K,$)?0:1}else return 1})},p.createImgTag=function(D,A,L){D=D||2,A=typeof A>"u"?D*4:A;const B=p.getModuleCount()*D+A*2;let I="";return I+="<img",I+=' src="',I+=p.createDataURL(D,A),I+='"',I+=' width="',I+=B,I+='"',I+=' height="',I+=B,I+='"',L&&(I+=' alt="',I+=M(L),I+='"'),I+="/>",I};const M=function(D){let A="";for(let L=0;L<D.length;L+=1){const B=D.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},R=function(D){D=typeof D>"u"?2:D;const L=p.getModuleCount()*1+D*2,B=D,I=L-D;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&&p.isDark($,Math.floor((F-B)/1))&&(V=" "),B<=F&&F<I&&B<=U+1&&U+1<I&&p.isDark(K,Math.floor((F-B)/1))?V+=" ":V+="█",z+=D<1&&U+1>=I?J[V]:W[V];z+=`
50
+ `}return L%2&&D>0?z.substring(0,z.length-L-1)+Array(L+1).join("▀"):z.substring(0,z.length-1)};return p.createASCII=function(D,A){if(D=D||1,D<2)return R(A);D-=1,A=typeof A>"u"?D*2:A;const L=p.getModuleCount()*D+A*2,B=A,I=L-A;let U,F,$,K;const V=Array(D+1).join("██"),W=Array(D+1).join(" ");let J="",z="";for(U=0;U<L;U+=1){for($=Math.floor((U-B)/D),z="",F=0;F<L;F+=1)K=1,B<=F&&F<I&&B<=U&&U<I&&p.isDark($,Math.floor((F-B)/D))&&(K=0),z+=K?V:W;for($=0;$<D;$+=1)J+=z+`
51
+ `}return J.substring(0,J.length-1)},p.renderTo2dContext=function(D,A){A=A||2;const L=p.getModuleCount();for(let B=0;B<L;B++)for(let I=0;I<L;I++)D.fillStyle=p.isDark(B,I)?"black":"white",D.fillRect(I*A,B*A,A,A)},p};gs.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};gs.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(),p=v(),u=v(),b=String.fromCharCode(c<<8|h),C=p<<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 $t={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},_l={L:1,M:0,Q:3,H:2},Vi={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},$i=(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 Vi.PATTERN000:return function(a,c){return(a+c)%2==0};case Vi.PATTERN001:return function(a,c){return a%2==0};case Vi.PATTERN010:return function(a,c){return c%3==0};case Vi.PATTERN011:return function(a,c){return(a+c)%3==0};case Vi.PATTERN100:return function(a,c){return(Math.floor(a/2)+Math.floor(c/3))%2==0};case Vi.PATTERN101:return function(a,c){return a*c%2+a*c%3==0};case Vi.PATTERN110:return function(a,c){return(a*c%2+a*c%3)%2==0};case Vi.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=bl([1],0);for(let c=0;c<f;c+=1)a=a.multiply(bl([1,Ki.gexp(c)],0));return a},d.getLengthInBits=function(f,a){if(1<=a&&a<10)switch(f){case $t.MODE_NUMBER:return 10;case $t.MODE_ALPHA_NUM:return 9;case $t.MODE_8BIT_BYTE:return 8;case $t.MODE_KANJI:return 8;default:throw"mode:"+f}else if(a<27)switch(f){case $t.MODE_NUMBER:return 12;case $t.MODE_ALPHA_NUM:return 11;case $t.MODE_8BIT_BYTE:return 16;case $t.MODE_KANJI:return 10;default:throw"mode:"+f}else if(a<41)switch(f){case $t.MODE_NUMBER:return 14;case $t.MODE_ALPHA_NUM:return 13;case $t.MODE_8BIT_BYTE:return 16;case $t.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 k=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||k==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 p=Math.abs(100*h/a/a-50)/5;return c+=p*10,c},d})(),Ki=(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})(),bl=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]^=Ki.gexp(Ki.glog(o.getAt(f))+Ki.glog(d.getAt(a)));return bl(v,0)},o.mod=function(d){if(o.getLength()-d.getLength()<0)return o;const v=Ki.glog(o.getAt(0))-Ki.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]^=Ki.gexp(Ki.glog(d.getAt(a))+v);return bl(f,0).mod(d)},o},mm=(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 _l.L:return n[(d-1)*4+0];case _l.M:return n[(d-1)*4+1];case _l.Q:return n[(d-1)*4+2];case _l.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 p=f[h*3+0],u=f[h*3+1],b=f[h*3+2];for(let C=0;C<p;C+=1)c.push(r(u,b))}return c},s})(),gm=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=$t.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=$t.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=$t.MODE_8BIT_BYTE,s=gs.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=$t.MODE_KANJI,s=gs.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},kg=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,p,u){d[p*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 p=2,u=a(p);h.writeByte(p);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 p=h;let u=0,b=0;const C={};return C.write=function(k,x){if(k>>>x)throw"length over";for(;u+x>=8;)p.writeByte(255&(k<<u|b)),x-=8-u,k>>>=8-u,b=0,u=0;b=k<<u|b,u=u+x},C.flush=function(){u>0&&p.writeByte(b)},C},a=function(h){const p=1<<h,u=(1<<h)+1;let b=h+1;const C=c();for(let g=0;g<p;g+=1)C.add(String.fromCharCode(g));C.add(String.fromCharCode(p)),C.add(String.fromCharCode(u));const k=kg(),x=f(k);x.write(p,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(),k.toByteArray()},c=function(){const h={};let p=0;const u={};return u.add=function(b){if(u.contains(b))throw"dup key:"+b;h[b]=p,p+=1},u.size=function(){return p},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=kg();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};gs.stringToBytes;const ps=[{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}],Ag={name:"gate-reviewer",label:"Gate Reviewer",commandAgent:"gate-reviewer",dispatchable:!1},Zu=[...ps,Ag],v1={name:"translator",label:"Translator",commandAgent:"translator",dispatchable:!1},y1={name:"harness-engineer",label:"Harness Engineer",commandAgent:"harness-engineer",dispatchable:!1},Tg=[v1,y1],Ju=[...Zu,...Tg],S1=ps.map(n=>n.name),Rg=Zu.map(n=>n.name);Tg.map(n=>n.name);Ju.map(n=>n.name);Ju.filter(n=>n.dispatchable).map(n=>n.name);function b1(n){return Rg.includes(n)}const C1="zh-CN",w1="pm-final-only",Dg=[{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 Rg)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 xe("/api/settings/preferences")},updateAppPreferences(n){return xe("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getRuntimeDiagnostics(){return xe("/api/diagnostics/runtime")},getCurrentProject(){return xe("/api/projects/current")},pullCurrentProject(){return xe("/api/projects/current/pull",{method:"POST"})},getRecentRepositoryPaths(){return xe("/api/projects/recent")},connectProject(n){return xe("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return xe("/api/tasks")},createTask(n){return xe("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,r={}){return xe(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(r)})},getHarnessStatus(n){const r=new URLSearchParams({taskSlug:n});return xe(`/api/projects/harness?${r.toString()}`)},applyHarness(n){return xe("/api/projects/harness/apply",{method:"POST",body:JSON.stringify(n)})},getHarnessFileContent(n,r){const s=new URLSearchParams({path:r,taskSlug:n});return xe(`/api/projects/harness/file?${s.toString()}`)},updateHarnessFileContent(n,r,s){const o=new URLSearchParams({path:r,taskSlug:n});return xe(`/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),xe(`/api/projects/harness/repository-diff?${s.toString()}`)},getHarnessBootstrapStatus(n){const r=new URLSearchParams({taskSlug:n});return xe(`/api/projects/harness/bootstrap?${r.toString()}`)},startHarnessBootstrap(n={}){return xe("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},restartHarnessBootstrap(n={}){return xe("/api/projects/harness/bootstrap/restart",{method:"POST",body:JSON.stringify(n)})},stopHarnessBootstrap(){return xe("/api/projects/harness/bootstrap/stop",{method:"POST"})},runHarnessBootstrap(n){return xe("/api/projects/harness/bootstrap/run",{method:"POST",body:JSON.stringify(n)})},getHarnessEngineerSession(){return xe("/api/projects/harness/engineer/session")},ensureHarnessEngineerSession(n={}){return xe("/api/projects/harness/engineer/session/ensure",{method:"POST",body:JSON.stringify(n)})},startHarnessEngineerSession(n={}){return xe("/api/projects/harness/engineer/session/start",{method:"POST",body:JSON.stringify(n)})},resumeHarnessEngineerSession(n={}){return xe("/api/projects/harness/engineer/session/resume",{method:"POST",body:JSON.stringify(n)})},restartHarnessEngineerSession(n={}){return xe("/api/projects/harness/engineer/session/restart",{method:"POST",body:JSON.stringify(n)})},stopHarnessEngineerSession(){return xe("/api/projects/harness/engineer/session/stop",{method:"POST"})},notifyHarnessEngineerHarnessUpdated(){return xe("/api/projects/harness/engineer/session/notify-harness",{method:"POST"})},getTaskStatus(n){return xe(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return xe(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,r,s={}){return xe(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/start`,{method:"POST",body:JSON.stringify(s)})},stopRoleSession(n,r){return xe(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/stop`,{method:"POST"})},restartRoleSession(n,r,s={}){return xe(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/restart`,{method:"POST",body:JSON.stringify(s)})},resumeRoleSession(n,r,s={}){return xe(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/resume`,{method:"POST",body:JSON.stringify(s)})},notifyRoleHarnessUpdated(n,r){return xe(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/notify-harness`,{method:"POST"})},dispatchRoleCommand(n,r){return xe(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/dispatch`,{method:"POST"})},listMessages(n){return xe(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return xe(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return xe(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return xe(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,r){return xe(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(r)})},getSessionRoundState(n){return xe(`/api/tasks/${encodeURIComponent(n)}/round`)},getGateReviewState(n){return xe(`/api/tasks/${encodeURIComponent(n)}/gate-review`)},updateGateReviewSettings(n,r){return xe(`/api/tasks/${encodeURIComponent(n)}/gate-review/settings`,{method:"PUT",body:JSON.stringify(r)})},requestGateReviewGate(n,r){return xe(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/request`,{method:"POST"})},retryGateReviewGate(n,r){return xe(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/retry`,{method:"POST"})},skipGateReviewGate(n,r,s){return xe(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/skip`,{method:"POST",body:JSON.stringify(s)})},overrideGateReviewGate(n,r,s){return xe(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/override`,{method:"POST",body:JSON.stringify(s)})},getGateReviewReport(n,r){return xe(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/report`)},startTranslationSession(n,r){return xe(`/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)),xe(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,r,s){return xe(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/input`,{method:"POST",body:JSON.stringify(s)})},sendTranslatedInput(n,r,s){return xe(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/send`,{method:"POST",body:JSON.stringify(s)})},clearTranslationSession(n){return xe(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},stopTranslationSession(n){return xe(`/api/translation/sessions/${encodeURIComponent(n)}/stop`,{method:"POST"})},notifyTranslatorHarnessUpdated(){return xe("/api/projects/translation/session/notify-harness",{method:"POST"})},retryTranslation(n,r){return xe(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(r)}`,{method:"POST"})},ignoreTranslationFailures(n){return xe(`/api/translation/sessions/${encodeURIComponent(n)}/failures/ignore`,{method:"POST"})},retryTranslationFailures(n){return xe(`/api/translation/sessions/${encodeURIComponent(n)}/failures/retry`,{method:"POST"})},getTranslationState(){return xe("/api/translation/state")},getTranslatorSession(){return xe("/api/translation/session")},ensureTranslatorSession(n={}){return xe("/api/translation/session/ensure",{method:"POST",body:JSON.stringify(n)})},startTranslatorSession(n={}){return xe("/api/translation/session/start",{method:"POST",body:JSON.stringify(n)})},resumeTranslatorSession(n={}){return xe("/api/translation/session/resume",{method:"POST",body:JSON.stringify(n)})},restartTranslatorSession(n={}){return xe("/api/translation/session/restart",{method:"POST",body:JSON.stringify(n)})},stopTranslatorSession(){return xe("/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 xe(`/api/translation/source-files${s}`)},createFileTranslation(n){return xe("/api/translation/files",{method:"POST",body:JSON.stringify(n)})},readFileTranslation(n){return xe(`/api/translation/files/${encodeURIComponent(n)}`)},createTranslationBootstrap(n){return xe("/api/translation/bootstrap",{method:"POST",body:JSON.stringify(n)})},createTranslationMemoryUpdate(n){return xe("/api/translation/memory-update",{method:"POST",body:JSON.stringify(n)})},promoteTranslation(n,r){return xe(`/api/translation/files/${encodeURIComponent(n)}/promote`,{method:"POST",body:JSON.stringify({targetPath:r})})},getGatewayStatus(){return xe("/api/gateway/status")},updateGatewaySettings(n){return xe("/api/gateway/settings",{method:"PUT",body:JSON.stringify(n)})},startGatewayQrLogin(){return xe("/api/gateway/qr/start",{method:"POST"})},checkGatewayQrLogin(n={}){return xe("/api/gateway/qr/check",{method:"POST",body:JSON.stringify(n)})},resetGatewayBinding(){return xe("/api/gateway/binding/reset",{method:"POST"})}};async function xe(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,p=h?` [backend ${h.version??"unknown"} pid=${h.pid??"unknown"} cwd=${h.cwd??"unknown"}]`:"";throw new Error(`${c}${p}`)}return o.json()}var vu={exports:{}},_m;function A1(){return _m||(_m=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"))),p=window.getComputedStyle(this._terminal.element),u=c-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),b=h-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.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})()))})(vu)),vu.exports}var T1=A1(),yu={exports:{}},vm;function R1(){return vm||(vm=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={6:(f,a)=>{function c(p){try{const u=new URL(p),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 p.toLocaleLowerCase().startsWith(b.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(p,u,b,C={}){this._terminal=p,this._regex=u,this._handler=b,this._options=C}provideLinks(p,u){const b=h.computeLink(p,this._regex,this._terminal,this._handler);u(this._addCallbacks(b))}_addCallbacks(p){return p.map((u=>(u.leave=this._options.leave,u.hover=(b,C)=>{if(this._options.hover){const{range:k}=u;this._options.hover(b,C,k)}},u)))}};class h{static computeLink(u,b,C,k){const x=new RegExp(b.source,(b.flags||"")+"g"),[y,_]=h._getWindowedLineStrings(u-1,C),g=y.join("");let S;const E=[];for(;S=x.exec(g);){const M=S[0];if(!c(M))continue;const[R,D]=h._mapStrIdx(C,_,0,S.index),[A,L]=h._mapStrIdx(C,R,D,M.length);if(R===-1||D===-1||A===-1||L===-1)continue;const B={start:{x:D+1,y:R+1},end:{x:L,y:A+1}};E.push({range:B,text:M,activate:k})}return E}static _getWindowedLineStrings(u,b){let C,k=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(--k))&&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,k]}static _mapStrIdx(u,b,C,k){const x=u.buffer.active,y=x.getNullCell();let _=C;for(;k;){const g=x.getLine(b);if(!g)return[-1,-1];for(let S=_;S<g.length;++S){g.getCell(S,y);const E=y.getChars();if(y.getWidth()&&(k-=E.length||1,S===g.length-1&&E==="")){const M=x.getLine(b+1);M&&M.isWrapped&&(M.getCell(0,y),y.getWidth()===2&&(k+=1))}if(k<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(p,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(p=h,u={}){this._handler=p,this._options=u}activate(p){this._terminal=p;const u=this._options,b=u.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,b,this._handler,u))}dispose(){var p;(p=this._linkProvider)==null||p.dispose()}}})(),v})()))})(yu)),yu.exports}var D1=R1(),Su={exports:{}},ym;function M1(){return ym||(ym=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,E,M){var R,D=arguments.length,A=D<3?S:M===null?M=Object.getOwnPropertyDescriptor(S,E):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(g,S,E,M);else for(var L=g.length-1;L>=0;L--)(R=g[L])&&(A=(D<3?R(A):D>3?R(S,E,A):R(S,E))||A);return D>3&&A&&Object.defineProperty(S,E,A),A},p=this&&this.__param||function(g,S){return function(E,M){S(E,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const u=c(9042),b=c(9924),C=c(844),k=c(4725),x=c(2585),y=c(3656);let _=a.AccessibilityManager=class extends C.Disposable{constructor(g,S,E,M){super(),this._terminal=g,this._coreBrowserService=E,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 R=0;R<this._terminal.rows;R++)this._rowElements[R]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[R]);if(this._topBoundaryFocusListener=R=>this._handleBoundaryFocus(R,0),this._bottomBoundaryFocusListener=R=>this._handleBoundaryFocus(R,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((R=>this._handleResize(R.rows)))),this.register(this._terminal.onRender((R=>this._refreshRows(R.start,R.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((R=>this._handleChar(R)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
52
+ `)))),this.register(this._terminal.onA11yTab((R=>this._handleTab(R)))),this.register(this._terminal.onKey((R=>this._handleKey(R.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 E=this._terminal.buffer,M=E.lines.length.toString();for(let R=g;R<=S;R++){const D=E.lines.get(E.ydisp+R),A=[],L=(D==null?void 0:D.translateToString(!0,void 0,void 0,A))||"",B=(E.ydisp+R+1).toString(),I=this._rowElements[R];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 E=g.target,M=this._rowElements[S===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(S===0?"1":`${this._terminal.buffer.lines.length}`)||g.relatedTarget!==M)return;let R,D;if(S===0?(R=E,D=this._rowElements.pop(),this._rowContainer.removeChild(D)):(R=this._rowElements.shift(),D=E,this._rowContainer.removeChild(R)),R.removeEventListener("focus",this._topBoundaryFocusListener),D.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},E={node:g.focusNode,offset:g.focusOffset};if((S.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||S.node===E.node&&S.offset>E.offset)&&([S,E]=[E,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(E.node.compareDocumentPosition(M)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:M,offset:((L=M.textContent)==null?void 0:L.length)??0}),!this._rowContainer.contains(E.node))return;const R=({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}},D=R(S),A=R(E);if(D&&A){if(D.row>A.row||D.row===A.row&&D.column>=A.column)throw new Error("invalid range");this._terminal.select(D.column,D.row,(A.row-D.row)*this._terminal.cols-D.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([p(1,x.IInstantiationService),p(2,k.ICoreBrowserService),p(3,k.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 p(b,C,k,x){b=h(b=c(b),k.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(b,!0),C.value=""}function u(b,C,k){const x=k.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,k,x){b.stopPropagation(),b.clipboardData&&p(b.clipboardData.getData("text/plain"),C,k,x)},a.paste=p,a.moveTextAreaUnderMouseCursor=u,a.rightClickHandler=function(b,C,k,x,y){u(b,C,k),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(p,u,b){this._css.set(p,u,b)}getCss(p,u){return this._css.get(p,u)}setColor(p,u,b){this._color.set(p,u,b)}getColor(p,u){return this._color.get(p,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,p,u){c.addEventListener(h,p,u);let b=!1;return{dispose:()=>{b||(b=!0,c.removeEventListener(h,p,u))}}}},3551:function(f,a,c){var h=this&&this.__decorate||function(_,g,S,E){var M,R=arguments.length,D=R<3?g:E===null?E=Object.getOwnPropertyDescriptor(g,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(_,g,S,E);else for(var A=_.length-1;A>=0;A--)(M=_[A])&&(D=(R<3?M(D):R>3?M(g,S,D):M(g,S))||D);return R>3&&D&&Object.defineProperty(g,S,D),D},p=this&&this.__param||function(_,g){return function(S,E){g(S,E,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const u=c(3656),b=c(8460),C=c(844),k=c(2585),x=c(4725);let y=a.Linkifier=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(_,g,S,E,M){super(),this._element=_,this._mouseService=g,this._renderService=S,this._bufferService=E,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 R;this._lastMouseEvent=void 0,(R=this._activeProviderReplies)==null||R.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 E=0;E<S.length;E++){const M=S[E];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 E,M;this._activeProviderReplies&&g||((E=this._activeProviderReplies)==null||E.forEach((R=>{R==null||R.forEach((D=>{D.link.dispose&&D.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=_.y);let S=!1;for(const[R,D]of this._linkProviderService.linkProviders.entries())g?(M=this._activeProviderReplies)!=null&&M.get(R)&&(S=this._checkLinkProviderResult(R,_,S)):D.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(R,L),S=this._checkLinkProviderResult(R,_,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 E=0;E<g.size;E++){const M=g.get(E);if(M)for(let R=0;R<M.length;R++){const D=M[R],A=D.link.range.start.y<_?0:D.link.range.start.x,L=D.link.range.end.y>_?this._bufferService.cols:D.link.range.end.x;for(let B=A;B<=L;B++){if(S.has(B)){M.splice(R--,1);break}S.add(B)}}}}_checkLinkProviderResult(_,g,S){var R;if(!this._activeProviderReplies)return S;const E=this._activeProviderReplies.get(_);let M=!1;for(let D=0;D<_;D++)this._activeProviderReplies.has(D)&&!this._activeProviderReplies.get(D)||(M=!0);if(!M&&E){const D=E.find((A=>this._linkAtPosition(A.link,g)));D&&(S=!0,this._handleNewLink(D))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!S)for(let D=0;D<this._activeProviderReplies.size;D++){const A=(R=this._activeProviderReplies.get(D))==null?void 0:R.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,E;return(E=(S=this._currentLink)==null?void 0:S.state)==null?void 0:E.decorations.pointerCursor},set:S=>{var E;(E=this._currentLink)!=null&&E.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,E;return(E=(S=this._currentLink)==null?void 0:S.state)==null?void 0:E.decorations.underline},set:S=>{var E,M,R;(E=this._currentLink)!=null&&E.state&&((R=(M=this._currentLink)==null?void 0:M.state)==null?void 0:R.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 E=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>=E&&this._currentLink.link.range.end.y<=M&&(this._clearCurrentLink(E,M),this._lastMouseEvent)){const R=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);R&&this._askForLink(R,!1)}}))))}_linkHover(_,g,S){var E;(E=this._currentLink)!=null&&E.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,E=this._bufferService.buffer.ydisp,M=this._createLinkUnderlineEvent(S.start.x-1,S.start.y-E-1,S.end.x,S.end.y-E-1,void 0);(g?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(M)}_linkLeave(_,g,S){var E;(E=this._currentLink)!=null&&E.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,E=_.range.end.y*this._bufferService.cols+_.range.end.x,M=g.y*this._bufferService.cols+g.x;return S<=M&&M<=E}_positionFromMouseEvent(_,g,S){const E=S.getCoords(_,g,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(_,g,S,E,M){return{x1:_,y1:g,x2:S,y2:E,cols:this._bufferService.cols,fg:M}}};a.Linkifier=y=h([p(1,x.IMouseService),p(2,x.IRenderService),p(3,k.IBufferService),p(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,E=arguments.length,M=E<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 R=x.length-1;R>=0;R--)(S=x[R])&&(M=(E<3?S(M):E>3?S(y,_,M):S(y,_))||M);return E>3&&M&&Object.defineProperty(y,_,M),M},p=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,E=new u.CellData,M=_.getTrimmedLength();let R=-1,D=-1,A=!1;for(let B=0;B<M;B++)if(D!==-1||_.hasContent(B)){if(_.loadCell(B,E),E.hasExtendedAttrs()&&E.extended.urlId){if(D===-1){D=B,R=E.extended.urlId;continue}A=E.extended.urlId!==R}else D!==-1&&(A=!0);if(A||D!==-1&&B===M-1){const I=(L=this._oscLinkService.getLinkData(R))==null?void 0:L.uri;if(I){const U={start:{x:D+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):k(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,E.hasExtendedAttrs()&&E.extended.urlId?(D=B,R=E.extended.urlId):(D=-1,R=-1)}}y(g)}};function k(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([p(0,b.IBufferService),p(1,b.IOptionsService),p(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,p){this._rowCount=p,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),p=c(3656),u=c(3551),b=c(9042),C=c(3730),k=c(1680),x=c(3107),y=c(5744),_=c(2950),g=c(1296),S=c(428),E=c(4269),M=c(5114),R=c(8934),D=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(Y={}){super(Y),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(Y){if(this._themeService)for(const q of Y){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 ie=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)(ie)}${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((we=>we[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(Y){Y?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(N.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Y){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(W.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var Y;return(Y=this.textarea)==null?void 0:Y.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 Y=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(Y);if(!q)return;const ce=Math.min(this.buffer.x,this.cols-1),te=this._renderService.dimensions.css.cell.height,ie=q.getWidth(ce),de=this._renderService.dimensions.css.cell.width*ie,we=this.buffer.y*this._renderService.dimensions.css.cell.height,Ee=ce*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ee+"px",this.textarea.style.top=we+"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,p.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,h.copyHandler)(q,this._selectionService)})));const Y=q=>(0,h.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",Y)),this.register((0,p.addDisposableDomListener)(this.element,"paste",Y)),K.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),K.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,h.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",(Y=>this._keyUp(Y)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(Y=>this._keyDown(Y)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(Y=>this._keyPress(Y)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(Y=>this._compositionHelper.compositionupdate(Y)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(Y=>this._inputEvent(Y)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Y){var ce;if(!Y)throw new Error("Terminal requires a parent element.");if(Y.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=Y.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"),Y.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,p.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,Y.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(L.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",(te=>this._handleTextAreaFocus(te)))),this.register((0,p.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(E.CharacterJoinerService),this._instantiationService.setService(L.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(D.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(R.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(k.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,p.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,p.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 Y=this,q=this.element;function ce(de){const we=Y._mouseService.getMouseReportCoords(de,Y.screenElement);if(!we)return!1;let Ee,Ye;switch(de.overrideType||de.type){case"mousemove":Ye=32,de.buttons===void 0?(Ee=3,de.button!==void 0&&(Ee=de.button<3?de.button:3)):Ee=1&de.buttons?0:4&de.buttons?1:2&de.buttons?2:3;break;case"mouseup":Ye=0,Ee=de.button<3?de.button:3;break;case"mousedown":Ye=1,Ee=de.button<3?de.button:3;break;case"wheel":if(Y._customWheelEventHandler&&Y._customWheelEventHandler(de)===!1||Y.viewport.getLinesScrolled(de)===0)return!1;Ye=de.deltaY<0?0:1,Ee=4;break;default:return!1}return!(Ye===void 0||Ee===void 0||Ee>4)&&Y.coreMouseService.triggerMouseEvent({col:we.col,row:we.row,x:we.x,y:we.y,button:Ee,action:Ye,ctrl:de.ctrlKey,alt:de.altKey,shift:de.shiftKey})}const te={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ie={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",ie.mousemove),te.mousemove=ie.mousemove):(q.removeEventListener("mousemove",te.mousemove),te.mousemove=null),16&de?te.wheel||(q.addEventListener("wheel",ie.wheel,{passive:!1}),te.wheel=ie.wheel):(q.removeEventListener("wheel",te.wheel),te.wheel=null),2&de?te.mouseup||(te.mouseup=ie.mouseup):(this._document.removeEventListener("mouseup",te.mouseup),te.mouseup=null),4&de?te.mousedrag||(te.mousedrag=ie.mousedrag):(this._document.removeEventListener("mousemove",te.mousedrag),te.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.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,p.addDisposableDomListener)(q,"wheel",(de=>{if(!te.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(de)===!1)return!1;if(!this.buffer.hasScrollback){const we=this.viewport.getLinesScrolled(de);if(we===0)return;const Ee=W.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(de.deltaY<0?"A":"B");let Ye="";for(let ft=0;ft<Math.abs(we);ft++)Ye+=Ee;return this.coreService.triggerDataEvent(Ye,!0),this.cancel(de,!0)}return this.viewport.handleWheel(de)?this.cancel(de):void 0}}),{passive:!1})),this.register((0,p.addDisposableDomListener)(q,"touchstart",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(de),this.cancel(de)}),{passive:!0})),this.register((0,p.addDisposableDomListener)(q,"touchmove",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(de)?void 0:this.cancel(de)}),{passive:!1}))}refresh(Y,q){var ce;(ce=this._renderService)==null||ce.refreshRows(Y,q)}updateCursorStyle(Y){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(Y)?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(Y,q,ce=0){var te;ce===1?(super.scrollLines(Y,q,ce),this.refresh(0,this.rows-1)):(te=this.viewport)==null||te.scrollLines(Y)}paste(Y){(0,h.paste)(Y,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Y){this._customKeyEventHandler=Y}attachCustomWheelEventHandler(Y){this._customWheelEventHandler=Y}registerLinkProvider(Y){return this._linkProviderService.registerLinkProvider(Y)}registerCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(Y);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Y)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Y){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Y)}registerDecoration(Y){return this._decorationService.registerDecoration(Y)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Y,q,ce){this._selectionService.setSelection(Y,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 Y;(Y=this._selectionService)==null||Y.clearSelection()}selectAll(){var Y;(Y=this._selectionService)==null||Y.selectAll()}selectLines(Y,q){var ce;(ce=this._selectionService)==null||ce.selectLines(Y,q)}_keyDown(Y){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&Y.altKey;if(!q&&!this._compositionHelper.keydown(Y))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||Y.key!=="Dead"&&Y.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ce=(0,J.evaluateKeyboardEvent)(Y,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Y),ce.type===3||ce.type===2){const te=this.rows-1;return this.scrollLines(ce.type===2?-te:te),this.cancel(Y,!0)}return ce.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Y)||(ce.cancel&&this.cancel(Y,!0),!ce.key||!!(Y.key&&!Y.ctrlKey&&!Y.altKey&&!Y.metaKey&&Y.key.length===1&&Y.key.charCodeAt(0)>=65&&Y.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:Y}),this._showCursor(),this.coreService.triggerDataEvent(ce.key,!0),!this.optionsService.rawOptions.screenReaderMode||Y.altKey||Y.ctrlKey?this.cancel(Y,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Y,q){const ce=Y.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||Y.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||Y.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?ce:ce&&(!q.keyCode||q.keyCode>47)}_keyUp(Y){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(Y)||this.focus(),this.updateCursorStyle(Y),this._keyPressHandled=!1)}_keyPress(Y){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;if(this.cancel(Y),Y.charCode)q=Y.charCode;else if(Y.which===null||Y.which===void 0)q=Y.keyCode;else{if(Y.which===0||Y.charCode===0)return!1;q=Y.which}return!(!q||(Y.altKey||Y.ctrlKey||Y.metaKey)&&!this._isThirdLevelShift(this.browser,Y)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Y){if(Y.data&&Y.inputType==="insertText"&&(!Y.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=Y.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(Y),!0}return!1}resize(Y,q){Y!==this.cols||q!==this.rows?super.resize(Y,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Y,q){var ce,te;(ce=this._charSizeService)==null||ce.measure(),(te=this.viewport)==null||te.syncScrollArea(!0)}clear(){var Y;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}),(Y=this.viewport)==null||Y.reset(),this.refresh(0,this.rows-1)}}reset(){var q,ce;this.options.rows=this.rows,this.options.cols=this.cols;const Y=this._customKeyEventHandler;this._setup(),super.reset(),(q=this._selectionService)==null||q.reset(),this._decorationService.reset(),(ce=this.viewport)==null||ce.reset(),this._customKeyEventHandler=Y,this.refresh(0,this.rows-1)}clearTextureAtlas(){var Y;(Y=this._renderService)==null||Y.clearTextureAtlas()}_reportFocus(){var Y;(Y=this.element)!=null&&Y.classList.contains("focus")?this.coreService.triggerDataEvent(W.C0.ESC+"[I"):this.coreService.triggerDataEvent(W.C0.ESC+"[O")}_reportWindowsOptions(Y){if(this._renderService)switch(Y){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),ie=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${W.C0.ESC}[6;${ie};${te}t`)}}cancel(Y,q){if(this.options.cancelEvents||q)return Y.preventDefault(),Y.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,p){this._rowCount=p,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,E){var M,R=arguments.length,D=R<3?g:E===null?E=Object.getOwnPropertyDescriptor(g,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(_,g,S,E);else for(var A=_.length-1;A>=0;A--)(M=_[A])&&(D=(R<3?M(D):R>3?M(g,S,D):M(g,S))||D);return R>3&&D&&Object.defineProperty(g,S,D),D},p=this&&this.__param||function(_,g){return function(S,E){g(S,E,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const u=c(3656),b=c(4725),C=c(8460),k=c(844),x=c(2585);let y=a.Viewport=class extends k.Disposable{constructor(_,g,S,E,M,R,D,A){super(),this._viewportElement=_,this._scrollArea=g,this._bufferService=S,this._optionsService=E,this._charSizeService=M,this._renderService=R,this._coreBrowserService=D,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,E="";const M=[],R=g??this._bufferService.buffer.lines.length,D=this._bufferService.buffer.lines;for(let L=_;L<R;L++){const B=D.get(L);if(!B)continue;const I=(A=D.get(L+1))==null?void 0:A.isWrapped;if(E+=B.translateToString(!I),!I||L===D.length-1){const U=document.createElement("div");U.textContent=E,M.push(U),E.length>0&&(S=U),E=""}}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([p(2,x.IBufferService),p(3,x.IOptionsService),p(4,b.ICharSizeService),p(5,b.IRenderService),p(6,b.ICoreBrowserService),p(7,b.IThemeService)],y)},3107:function(f,a,c){var h=this&&this.__decorate||function(x,y,_,g){var S,E=arguments.length,M=E<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 R=x.length-1;R>=0;R--)(S=x[R])&&(M=(E<3?S(M):E>3?S(y,_,M):S(y,_))||M);return E>3&&M&&Object.defineProperty(y,_,M),M},p=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 k=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((E=>this._removeDecoration(E)))),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=k=h([p(1,C.IBufferService),p(2,u.ICoreBrowserService),p(3,C.IDecorationService),p(4,u.IRenderService)],k)},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,p){return h>=c.startBufferLine-this._linePadding[p||"full"]&&h<=c.endBufferLine+this._linePadding[p||"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,E,M,R){var D,A=arguments.length,L=A<3?E:R===null?R=Object.getOwnPropertyDescriptor(E,M):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(S,E,M,R);else for(var B=S.length-1;B>=0;B--)(D=S[B])&&(L=(A<3?D(L):A>3?D(E,M,L):D(E,M))||L);return A>3&&L&&Object.defineProperty(E,M,L),L},p=this&&this.__param||function(S,E){return function(M,R){E(M,R,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const u=c(5871),b=c(4725),C=c(844),k=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,E,M,R,D,A,L){var I;super(),this._viewportElement=S,this._screenElement=E,this._bufferService=M,this._decorationService=R,this._renderService=D,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),E=Math.ceil(this._canvas.width/3);y.full=this._canvas.width,y.left=S,y.center=E,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,E=Math.round(Math.max(Math.min(S,12),6)*this._coreBrowserService.dpr);x.left=E,x.center=E,x.right=E}_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 E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;const S=this._colorZoneStore.zones;for(const E of S)E.position!=="full"&&this._renderColorZone(E);for(const E of S)E.position==="full"&&this._renderColorZone(E);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,E){this._shouldUpdateDimensions=S||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=g=h([p(2,k.IBufferService),p(3,k.IDecorationService),p(4,b.IRenderService),p(5,k.IOptionsService),p(6,b.ICoreBrowserService)],g)},2950:function(f,a,c){var h=this&&this.__decorate||function(x,y,_,g){var S,E=arguments.length,M=E<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 R=x.length-1;R>=0;R--)(S=x[R])&&(M=(E<3?S(M):E>3?S(y,_,M):S(y,_))||M);return E>3&&M&&Object.defineProperty(y,_,M),M},p=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 k=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,y,_,g,S,E){this._textarea=x,this._compositionView=y,this._bufferService=_,this._optionsService=g,this._coreService=S,this._renderService=E,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 E=this._compositionView.getBoundingClientRect();this._textarea.style.left=S+"px",this._textarea.style.top=g+"px",this._textarea.style.width=Math.max(E.width,1)+"px",this._textarea.style.height=Math.max(E.height,1)+"px",this._textarea.style.lineHeight=E.height+"px"}x||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=k=h([p(2,b.IBufferService),p(3,b.IOptionsService),p(4,b.ICoreService),p(5,u.IRenderService)],k)},9806:(f,a)=>{function c(h,p,u){const b=u.getBoundingClientRect(),C=h.getComputedStyle(u),k=parseInt(C.getPropertyValue("padding-left")),x=parseInt(C.getPropertyValue("padding-top"));return[p.clientX-b.left-k,p.clientY-b.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=c,a.getCoords=function(h,p,u,b,C,k,x,y,_){if(!k)return;const g=c(h,p,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 p(y,_,g,S){const E=y-u(y,g),M=_-u(_,g),R=Math.abs(E-M)-(function(D,A,L){let B=0;const I=D-u(D,L),U=A-u(A,L);for(let F=0;F<Math.abs(I-U);F++){const $=b(D,A)==="A"?-1:1,K=L.buffer.lines.get(I+$*F);K!=null&&K.isWrapped&&B++}return B})(y,_,g);return x(R,k(b(y,_),S))}function u(y,_){let g=0,S=_.buffer.lines.get(y),E=S==null?void 0:S.isWrapped;for(;E&&y>=0&&y<_.rows;)g++,S=_.buffer.lines.get(--y),E=S==null?void 0:S.isWrapped;return g}function b(y,_){return y>_?"A":"B"}function C(y,_,g,S,E,M){let R=y,D=_,A="";for(;R!==g||D!==S;)R+=E?1:-1,E&&R>M.cols-1?(A+=M.buffer.translateBufferLineToString(D,!1,y,R),R=0,y=0,D++):!E&&R<0&&(A+=M.buffer.translateBufferLineToString(D,!1,0,y+1),R=M.cols-1,y=R,D--);return A+M.buffer.translateBufferLineToString(D,!1,y,R)}function k(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 E=g.buffer.x,M=g.buffer.y;if(!g.buffer.hasScrollback)return(function(A,L,B,I,U,F){return p(L,I,U,F).length===0?"":x(C(A,L,A,L-u(L,U),!1,U).length,k("D",F))})(E,M,0,_,g,S)+p(M,_,g,S)+(function(A,L,B,I,U,F){let $;$=p(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=p(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,k(V,F))})(E,M,y,_,g,S);let R;if(M===_)return R=E>y?"D":"C",x(Math.abs(E-y),k(R,S));R=M>_?"D":"C";const D=Math.abs(M-_);return x((function(A,L){return L.cols-A})(M>_?y:E,g)+(D-1)*g.cols+1+((M>_?E:y)-1),k(R,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},p=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),k=c(6171),x=c(6052),y=c(4725),_=c(8055),g=c(8460),S=c(844),E=c(2585),M="xterm-dom-renderer-owner-",R="xterm-rows",D="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(R),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,k.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ge=>this._injectCss(ge)))),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((ge=>this._handleLinkHover(ge)))),this.register(this._linkifier2.onHideLinkUnderline((ge=>this._handleLinkLeave(ge)))),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} .${R} 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} .${R} { 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} .${R} .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} .${R}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${R}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${R}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css};}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${R} .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} .${D}${J} { color: ${z.css}; }${this._terminalSelector} .${D}${J}.xterm-dim { color: ${_.color.multiplyOpacity(z,.5).css}; }${this._terminalSelector} .${A}${J} { background-color: ${z.css}; }`;$+=`${this._terminalSelector} .${D}${C.INVERTED_DEFAULT_COLOR} { color: ${_.color.opaque(F.background).css}; }${this._terminalSelector} .${D}${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 ge=K;ge<=V;++ge){const Y=ge+j.ydisp,q=this._rowElements[ge],ce=j.lines.get(Y);if(!q||!ce)break;q.replaceChildren(...this._rowFactory.createRow(ce,Y,Y===H,Z,he,G,N,this.dimensions.css.cell.width,this._widthCache,J?ge===K?F:0:-1,J?(ge===V?$:W)-1:-1))}}};a.DomRenderer=U=h([p(7,E.IInstantiationService),p(8,y.ICharSizeService),p(9,E.IOptionsService),p(10,E.IBufferService),p(11,y.ICoreBrowserService),p(12,y.IThemeService)],U)},3787:function(f,a,c){var h=this&&this.__decorate||function(R,D,A,L){var B,I=arguments.length,U=I<3?D:L===null?L=Object.getOwnPropertyDescriptor(D,A):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(R,D,A,L);else for(var F=R.length-1;F>=0;F--)(B=R[F])&&(U=(I<3?B(U):I>3?B(D,A,U):B(D,A))||U);return I>3&&U&&Object.defineProperty(D,A,U),U},p=this&&this.__param||function(R,D){return function(A,L){D(A,L,R)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const u=c(2223),b=c(643),C=c(511),k=c(2585),x=c(8055),y=c(4725),_=c(4269),g=c(6171),S=c(3734);let E=a.DomRendererRowFactory=class{constructor(R,D,A,L,B,I,U){this._document=R,this._characterJoinerService=D,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(R,D,A){this._selectionStart=R,this._selectionEnd=D,this._columnSelectMode=A}createRow(R,D,A,L,B,I,U,F,$,K,V){const W=[],J=this._characterJoinerService.getJoinedCharacters(D),z=this._themeService.colors;let j,H=R.getNoBgTrimmedLength();A&&H<I+1&&(H=I+1);let G=0,N="",Z=0,he=0,ge=0,Y=!1,q=0,ce=!1,te=0;const ie=[],de=K!==-1&&V!==-1;for(let we=0;we<H;we++){R.loadCell(we,this._workCell);let Ee=this._workCell.getWidth();if(Ee===0)continue;let Ye=!1,ft=we,Re=this._workCell;if(J.length>0&&we===J[0][0]){Ye=!0;const Oe=J.shift();Re=new _.JoinedCellData(this._workCell,R.translateToString(!0,Oe[0],Oe[1]),Oe[1]-Oe[0]),ft=Oe[1]-1,Ee=Re.getWidth()}const Yt=this._isCellInSelection(we,D),It=A&&we===I,Nt=de&&we>=K&&we<=V;let At=!1;this._decorationService.forEachDecorationAtCell(we,D,void 0,(Oe=>{At=!0}));let Xt=Re.getChars()||b.WHITESPACE_CELL_CHAR;if(Xt===" "&&(Re.isUnderline()||Re.isOverline())&&(Xt=" "),te=Ee*F-$.get(Xt,Re.isBold(),Re.isItalic()),j){if(G&&(Yt&&ce||!Yt&&!ce&&Re.bg===Z)&&(Yt&&ce&&z.selectionForeground||Re.fg===he)&&Re.extended.ext===ge&&Nt===Y&&te===q&&!It&&!Ye&&!At){Re.isInvisible()?N+=b.WHITESPACE_CELL_CHAR:N+=Xt,G++;continue}G&&(j.textContent=N),j=this._document.createElement("span"),G=0,N=""}else j=this._document.createElement("span");if(Z=Re.bg,he=Re.fg,ge=Re.extended.ext,Y=Nt,q=te,ce=Yt,Ye&&I>=we&&I<=ft&&(I=we),!this._coreService.isCursorHidden&&It&&this._coreService.isCursorInitialized){if(ie.push("xterm-cursor"),this._coreBrowserService.isFocused)U&&ie.push("xterm-cursor-blink"),ie.push(L==="bar"?"xterm-cursor-bar":L==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(B)switch(B){case"outline":ie.push("xterm-cursor-outline");break;case"block":ie.push("xterm-cursor-block");break;case"bar":ie.push("xterm-cursor-bar");break;case"underline":ie.push("xterm-cursor-underline")}}if(Re.isBold()&&ie.push("xterm-bold"),Re.isItalic()&&ie.push("xterm-italic"),Re.isDim()&&ie.push("xterm-dim"),N=Re.isInvisible()?b.WHITESPACE_CELL_CHAR:Re.getChars()||b.WHITESPACE_CELL_CHAR,Re.isUnderline()&&(ie.push(`xterm-underline-${Re.extended.underlineStyle}`),N===" "&&(N=" "),!Re.isUnderlineColorDefault()))if(Re.isUnderlineColorRGB())j.style.textDecorationColor=`rgb(${S.AttributeData.toColorRGB(Re.getUnderlineColor()).join(",")})`;else{let Oe=Re.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Re.isBold()&&Oe<8&&(Oe+=8),j.style.textDecorationColor=z.ansi[Oe].css}Re.isOverline()&&(ie.push("xterm-overline"),N===" "&&(N=" ")),Re.isStrikethrough()&&ie.push("xterm-strikethrough"),Nt&&(j.style.textDecoration="underline");let St=Re.getFgColor(),it=Re.getFgColorMode(),Tt=Re.getBgColor(),fe=Re.getBgColorMode();const Se=!!Re.isInverse();if(Se){const Oe=St;St=Tt,Tt=Oe;const _t=it;it=fe,fe=_t}let Ce,De,Be,ct=!1;switch(this._decorationService.forEachDecorationAtCell(we,D,void 0,(Oe=>{Oe.options.layer!=="top"&&ct||(Oe.backgroundColorRGB&&(fe=50331648,Tt=Oe.backgroundColorRGB.rgba>>8&16777215,Ce=Oe.backgroundColorRGB),Oe.foregroundColorRGB&&(it=50331648,St=Oe.foregroundColorRGB.rgba>>8&16777215,De=Oe.foregroundColorRGB),ct=Oe.options.layer==="top")})),!ct&&Yt&&(Ce=this._coreBrowserService.isFocused?z.selectionBackgroundOpaque:z.selectionInactiveBackgroundOpaque,Tt=Ce.rgba>>8&16777215,fe=50331648,ct=!0,z.selectionForeground&&(it=50331648,St=z.selectionForeground.rgba>>8&16777215,De=z.selectionForeground)),ct&&ie.push("xterm-decoration-top"),fe){case 16777216:case 33554432:Be=z.ansi[Tt],ie.push(`xterm-bg-${Tt}`);break;case 50331648:Be=x.channels.toColor(Tt>>16,Tt>>8&255,255&Tt),this._addStyle(j,`background-color:#${M((Tt>>>0).toString(16),"0",6)}`);break;default:Se?(Be=z.foreground,ie.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):Be=z.background}switch(Ce||Re.isDim()&&(Ce=x.color.multiplyOpacity(Be,.5)),it){case 16777216:case 33554432:Re.isBold()&&St<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(St+=8),this._applyMinimumContrast(j,Be,z.ansi[St],Re,Ce,void 0)||ie.push(`xterm-fg-${St}`);break;case 50331648:const Oe=x.channels.toColor(St>>16&255,St>>8&255,255&St);this._applyMinimumContrast(j,Be,Oe,Re,Ce,De)||this._addStyle(j,`color:#${M(St.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(j,Be,z.foreground,Re,Ce,De)||Se&&ie.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ie.length&&(j.className=ie.join(" "),ie.length=0),It||Ye||At?j.textContent=N:G++,te!==this.defaultSpacing&&(j.style.letterSpacing=`${te}px`),W.push(j),we=ft}return j&&G&&(j.textContent=N),W}_applyMinimumContrast(R,D,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(D.rgba,A.rgba)),F===void 0){const $=this._optionsService.rawOptions.minimumContrastRatio/(L.isDim()?2:1);F=x.color.ensureContrastRatio(B||D,I||A,$),U.setColor((B||D).rgba,(I||A).rgba,F??null)}return!!F&&(this._addStyle(R,`color:${F.css}`),!0)}_getContrastCache(R){return R.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(R,D){R.setAttribute("style",`${R.getAttribute("style")||""}${D};`)}_isCellInSelection(R,D){const A=this._selectionStart,L=this._selectionEnd;return!(!A||!L)&&(this._columnSelectMode?A[0]<=L[0]?R>=A[0]&&D>=A[1]&&R<L[0]&&D<=L[1]:R<A[0]&&D>=A[1]&&R>=L[0]&&D<=L[1]:D>A[1]&&D<L[1]||A[1]===L[1]&&D===A[1]&&R>=A[0]&&R<L[0]||A[1]<L[1]&&D===L[1]&&R<L[0]||A[1]<L[1]&&D===A[1]&&R>=A[0])}};function M(R,D,A){for(;R.length<A;)R=D+R;return R}a.DomRendererRowFactory=E=h([p(1,y.ICharacterJoinerService),p(2,k.IOptionsService),p(3,y.ICoreBrowserService),p(4,k.ICoreService),p(5,k.IDecorationService),p(6,y.IThemeService)],E)},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 p=c.createElement("span");p.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=[p,u,b,C],this._container.appendChild(p),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,p,u){c===this._font&&h===this._fontSize&&p===this._weight&&u===this._weightBold||(this._font=c,this._fontSize=h,this._weight=p,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(c,h,p){let u=0;if(!h&&!p&&c.length===1&&(u=c.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const k=this._measure(c,0);return k>0&&(this._flat[u]=k),k}let b=c;h&&(b+="B"),p&&(b+="I");let C=this._holey.get(b);if(C===void 0){let k=0;h&&(k|=1),p&&(k|=2),C=this._measure(c,k),C>0&&this._holey.set(b,C)}return C}_measure(c,h){const p=this._measureElements[h];return p.textContent=c.repeat(32),p.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(p){return 57508<=p&&p<=57558}function h(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=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(p){if(!p)throw new Error("value must not be falsy");return p},a.isPowerlineGlyph=c,a.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},a.isEmoji=h,a.allowRescaling=function(p,u,b,C){return u===1&&b>Math.ceil(1.5*C)&&p!==void 0&&p>255&&!h(p)&&!c(p)&&!(function(k){return 57344<=k&&k<=63743})(p)},a.treatGlyphAsBackgroundColor=function(p){return c(p)||(function(u){return 9472<=u&&u<=9631})(p)},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(p,u,b=0){return(p-(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(p,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 k=p.buffers.active.ydisp,x=u[1]-k,y=b[1]-k,_=Math.max(x,0),g=Math.min(y,p.rows-1);_>=p.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(p,u,b){return!!this.hasSelection&&(b-=p.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,E,M){var R,D=arguments.length,A=D<3?S:M===null?M=Object.getOwnPropertyDescriptor(S,E):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(g,S,E,M);else for(var L=g.length-1;L>=0;L--)(R=g[L])&&(A=(D<3?R(A):D>3?R(S,E,A):R(S,E))||A);return D>3&&A&&Object.defineProperty(S,E,A),A},p=this&&this.__param||function(g,S){return function(E,M){S(E,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const u=c(2585),b=c(8460),C=c(844);let k=a.CharSizeService=class extends C.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(g,S,E){super(),this._optionsService=E,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=k=h([p(2,u.IOptionsService)],k);class x extends C.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(S,E){S!==void 0&&S>0&&E!==void 0&&E>0&&(this._result.width=S,this._result.height=E)}}class y extends x{constructor(S,E,M){super(),this._document=S,this._parentElement=E,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 E=this._ctx.measureText("W");if(!("width"in E&&"fontBoundingBoxAscent"in E&&"fontBoundingBoxDescent"in E))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,E){var M,R=arguments.length,D=R<3?g:E===null?E=Object.getOwnPropertyDescriptor(g,S):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(_,g,S,E);else for(var A=_.length-1;A>=0;A--)(M=_[A])&&(D=(R<3?M(D):R>3?M(g,S,D):M(g,S))||D);return R>3&&D&&Object.defineProperty(g,S,D),D},p=this&&this.__param||function(_,g){return function(S,E){g(S,E,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const u=c(3734),b=c(643),C=c(511),k=c(2585);class x extends u.AttributeData{constructor(g,S,E){super(),this.content=0,this.combinedData="",this.fg=g.fg,this.bg=g.bg,this.combinedData=S,this._width=E}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 Mg{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 E=[],M=S.translateToString(!0);let R=0,D=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-R>1){const U=this._getJoinedRanges(M,A,D,S,R);for(let F=0;F<U.length;F++)E.push(U[F])}R=I,A=D,L=this._workCell.fg,B=this._workCell.bg}D+=this._workCell.getChars().length||b.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-R>1){const I=this._getJoinedRanges(M,A,D,S,R);for(let U=0;U<I.length;U++)E.push(I[U])}return E}_getJoinedRanges(g,S,E,M,R){const D=g.substring(S,E);let A=[];try{A=this._characterJoiners[0].handler(D)}catch(L){console.error(L)}for(let L=1;L<this._characterJoiners.length;L++)try{const B=this._characterJoiners[L].handler(D);for(let I=0;I<B.length;I++)Mg._mergeRanges(A,B[I])}catch(B){console.error(B)}return this._stringRangesToCellRanges(A,M,R),A}_stringRangesToCellRanges(g,S,E){let M=0,R=!1,D=0,A=g[M];if(A){for(let L=E;L<this._bufferService.cols;L++){const B=S.getWidth(L),I=S.getString(L).length||b.WHITESPACE_CELL_CHAR.length;if(B!==0){if(!R&&A[0]<=D&&(A[0]=L,R=!0),A[1]<=D){if(A[1]=L,A=g[++M],!A)break;A[0]<=D?(A[0]=L,R=!0):R=!1}D+=I}}A&&(A[1]=this._bufferService.cols)}}static _mergeRanges(g,S){let E=!1;for(let M=0;M<g.length;M++){const R=g[M];if(E){if(S[1]<=R[0])return g[M-1][1]=S[1],g;if(S[1]<=R[1])return g[M-1][1]=Math.max(S[1],R[1]),g.splice(M,1),g;g.splice(M,1),M--}else{if(S[1]<=R[0])return g.splice(M,0,S),g;if(S[1]<=R[1])return R[0]=Math.min(S[0],R[0]),g;S[0]<R[1]&&(R[0]=Math.min(S[0],R[0]),E=!0)}}return E?g[g.length-1][1]=S[1]:g.push(S),g}};a.CharacterJoinerService=y=h([p(0,k.IBufferService)],y)},5114:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=c(844),p=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 p.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new p.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((g=>this._screenDprMonitor.setWindow(g)))),this.register((0,p.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 p.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 p 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=p},8934:function(f,a,c){var h=this&&this.__decorate||function(k,x,y,_){var g,S=arguments.length,E=S<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,y):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(k,x,y,_);else for(var M=k.length-1;M>=0;M--)(g=k[M])&&(E=(S<3?g(E):S>3?g(x,y,E):g(x,y))||E);return S>3&&E&&Object.defineProperty(x,y,E),E},p=this&&this.__param||function(k,x){return function(y,_){x(y,_,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const u=c(4725),b=c(9806);let C=a.MouseService=class{constructor(k,x){this._renderService=k,this._charSizeService=x}getCoords(k,x,y,_,g){return(0,b.getCoords)(window,k,x,y,_,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,g)}getMouseReportCoords(k,x){const y=(0,b.getCoordsRelativeToElement)(window,k,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([p(0,u.IRenderService),p(1,u.ICharSizeService)],C)},3230:function(f,a,c){var h=this&&this.__decorate||function(g,S,E,M){var R,D=arguments.length,A=D<3?S:M===null?M=Object.getOwnPropertyDescriptor(S,E):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(g,S,E,M);else for(var L=g.length-1;L>=0;L--)(R=g[L])&&(A=(D<3?R(A):D>3?R(S,E,A):R(S,E))||A);return D>3&&A&&Object.defineProperty(S,E,A),A},p=this&&this.__param||function(g,S){return function(E,M){S(E,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const u=c(6193),b=c(4725),C=c(8460),k=c(844),x=c(7226),y=c(2585);let _=a.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(g,S,E,M,R,D,A,L){super(),this._rowCount=g,this._charSizeService=M,this._renderer=this.register(new k.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new k.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(D.onResize((()=>this._fullRefresh()))),this.register(D.buffers.onBufferActivate((()=>{var B;return(B=this._renderer.value)==null?void 0:B.clear()}))),this.register(E.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(R.onDecorationRegistered((()=>this._fullRefresh()))),this.register(R.onDecorationRemoved((()=>this._fullRefresh()))),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(D.cols,D.rows),this._fullRefresh()}))),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(D.buffer.y,D.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 E=new g.IntersectionObserver((M=>this._handleIntersectionChange(M[M.length-1])),{threshold:0});E.observe(S),this._observerDisposable.value=(0,k.toDisposable)((()=>E.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,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(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 E;return(E=this._renderer.value)==null?void 0:E.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,E){var M;this._selectionState.start=g,this._selectionState.end=S,this._selectionState.columnSelectMode=E,(M=this._renderer.value)==null||M.handleSelectionChanged(g,S,E)}handleCursorMove(){var g;(g=this._renderer.value)==null||g.handleCursorMove()}clear(){var g;(g=this._renderer.value)==null||g.clear()}};a.RenderService=_=h([p(2,y.IOptionsService),p(3,b.ICharSizeService),p(4,y.IDecorationService),p(5,y.IBufferService),p(6,b.ICoreBrowserService),p(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,$),$},p=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),k=c(4725),x=c(8460),y=c(844),_=c(6114),g=c(4841),S=c(511),E=c(2585),M=" ",R=new RegExp(M,"g");let D=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(R," "))).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 ge=F.getString(he).length;for(ge>1&&(H+=ge-1,V+=ge-1);Z>0&&K>0&&!this._isCharWordSeparator(F.loadCell(Z-1,this._workCell));){F.loadCell(Z-1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,Z--):Y>1&&(j+=Y-1,K-=Y-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 Y=this._workCell.getChars().length;this._workCell.getWidth()===2?(z++,he++):Y>1&&(H+=Y-1,V+=Y-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 ge=this._bufferService.cols-he.start;G-=ge,N+=ge}}}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=D=h([p(3,E.IBufferService),p(4,E.ICoreService),p(5,k.IMouseService),p(6,E.IOptionsService),p(7,k.IRenderService),p(8,k.ICoreBrowserService)],D)},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(D,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(D,A,L,B);else for(var $=D.length-1;$>=0;$--)(I=D[$])&&(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},p=this&&this.__param||function(D,A){return function(L,B){A(L,B,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const u=c(7239),b=c(8055),C=c(8460),k=c(844),x=c(2585),y=b.css.toColor("#ffffff"),_=b.css.toColor("#000000"),g=b.css.toColor("#ffffff"),S=b.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const D=[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];D.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;D.push({css:b.channels.toCss(B,B,B),rgba:b.channels.toRgba(B,B,B)})}return D})());let M=a.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(D){super(),this._optionsService=D,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:E,selectionBackgroundOpaque:b.color.blend(_,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:b.color.blend(_,E),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(D={}){const A=this._colors;if(A.foreground=R(D.foreground,y),A.background=R(D.background,_),A.cursor=R(D.cursor,g),A.cursorAccent=R(D.cursorAccent,S),A.selectionBackgroundTransparent=R(D.selectionBackground,E),A.selectionBackgroundOpaque=b.color.blend(A.background,A.selectionBackgroundTransparent),A.selectionInactiveBackgroundTransparent=R(D.selectionInactiveBackground,A.selectionBackgroundTransparent),A.selectionInactiveBackgroundOpaque=b.color.blend(A.background,A.selectionInactiveBackgroundTransparent),A.selectionForeground=D.selectionForeground?R(D.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]=R(D.black,a.DEFAULT_ANSI_COLORS[0]),A.ansi[1]=R(D.red,a.DEFAULT_ANSI_COLORS[1]),A.ansi[2]=R(D.green,a.DEFAULT_ANSI_COLORS[2]),A.ansi[3]=R(D.yellow,a.DEFAULT_ANSI_COLORS[3]),A.ansi[4]=R(D.blue,a.DEFAULT_ANSI_COLORS[4]),A.ansi[5]=R(D.magenta,a.DEFAULT_ANSI_COLORS[5]),A.ansi[6]=R(D.cyan,a.DEFAULT_ANSI_COLORS[6]),A.ansi[7]=R(D.white,a.DEFAULT_ANSI_COLORS[7]),A.ansi[8]=R(D.brightBlack,a.DEFAULT_ANSI_COLORS[8]),A.ansi[9]=R(D.brightRed,a.DEFAULT_ANSI_COLORS[9]),A.ansi[10]=R(D.brightGreen,a.DEFAULT_ANSI_COLORS[10]),A.ansi[11]=R(D.brightYellow,a.DEFAULT_ANSI_COLORS[11]),A.ansi[12]=R(D.brightBlue,a.DEFAULT_ANSI_COLORS[12]),A.ansi[13]=R(D.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),A.ansi[14]=R(D.brightCyan,a.DEFAULT_ANSI_COLORS[14]),A.ansi[15]=R(D.brightWhite,a.DEFAULT_ANSI_COLORS[15]),D.extendedAnsi){const L=Math.min(A.ansi.length-16,D.extendedAnsi.length);for(let B=0;B<L;B++)A.ansi[B+16]=R(D.extendedAnsi[B],a.DEFAULT_ANSI_COLORS[B+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(D){this._restoreColor(D),this._onChangeColors.fire(this.colors)}_restoreColor(D){if(D!==void 0)switch(D){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[D]=this._restoreColors.ansi[D]}else for(let A=0;A<this._restoreColors.ansi.length;++A)this._colors.ansi[A]=this._restoreColors.ansi[A]}modifyColors(D){D(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 R(D,A){if(D!==void 0)try{return b.css.toColor(D)}catch{}return A}a.ThemeService=M=h([p(0,x.IOptionsService)],M)},6349:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=c(8460),p=c(844);class u extends p.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 k=new Array(C);for(let x=0;x<Math.min(C,this.length);x++)k[x]=this._array[this._getCyclicIndex(x)];this._array=k,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let k=this._length;k<C;k++)this._array[k]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,k){this._array[this._getCyclicIndex(C)]=k}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,k,...x){if(k){for(let y=C;y<this._length-k;y++)this._array[this._getCyclicIndex(y)]=this._array[this._getCyclicIndex(y+k)];this._length-=k,this.onDeleteEmitter.fire({index:C,amount:k})}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,k,x){if(!(k<=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 _=k-1;_>=0;_--)this.set(C+_+x,this.get(C+_));const y=C+k+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<k;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,p=5){if(typeof h!="object")return h;const u=Array.isArray(h)?[]:{};for(const b in h)u[b]=p<=1?h[b]:h[b]&&c(h[b],p-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,p=0,u=0;var b,C,k,x,y;function _(S){const E=S.toString(16);return E.length<2?"0"+E:E}function g(S,E){return S<E?(E+.05)/(S+.05):(S+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(S){S.toCss=function(E,M,R,D){return D!==void 0?`#${_(E)}${_(M)}${_(R)}${_(D)}`:`#${_(E)}${_(M)}${_(R)}`},S.toRgba=function(E,M,R,D=255){return(E<<24|M<<16|R<<8|D)>>>0},S.toColor=function(E,M,R,D){return{css:S.toCss(E,M,R,D),rgba:S.toRgba(E,M,R,D)}}})(b||(a.channels=b={})),(function(S){function E(M,R){return u=Math.round(255*R),[c,h,p]=y.toChannels(M.rgba),{css:b.toCss(c,h,p,u),rgba:b.toRgba(c,h,p,u)}}S.blend=function(M,R){if(u=(255&R.rgba)/255,u===1)return{css:R.css,rgba:R.rgba};const D=R.rgba>>24&255,A=R.rgba>>16&255,L=R.rgba>>8&255,B=M.rgba>>24&255,I=M.rgba>>16&255,U=M.rgba>>8&255;return c=B+Math.round((D-B)*u),h=I+Math.round((A-I)*u),p=U+Math.round((L-U)*u),{css:b.toCss(c,h,p),rgba:b.toRgba(c,h,p)}},S.isOpaque=function(M){return(255&M.rgba)==255},S.ensureContrastRatio=function(M,R,D){const A=y.ensureContrastRatio(M.rgba,R.rgba,D);if(A)return b.toColor(A>>24&255,A>>16&255,A>>8&255)},S.opaque=function(M){const R=(255|M.rgba)>>>0;return[c,h,p]=y.toChannels(R),{css:b.toCss(c,h,p),rgba:R}},S.opacity=E,S.multiplyOpacity=function(M,R){return u=255&M.rgba,E(M,u*R/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 E,M;try{const R=document.createElement("canvas");R.width=1,R.height=1;const D=R.getContext("2d",{willReadFrequently:!0});D&&(E=D,E.globalCompositeOperation="copy",M=E.createLinearGradient(0,0,1,1))}catch{}S.toColor=function(R){if(R.match(/#[\da-f]{3,8}/i))switch(R.length){case 4:return c=parseInt(R.slice(1,2).repeat(2),16),h=parseInt(R.slice(2,3).repeat(2),16),p=parseInt(R.slice(3,4).repeat(2),16),b.toColor(c,h,p);case 5:return c=parseInt(R.slice(1,2).repeat(2),16),h=parseInt(R.slice(2,3).repeat(2),16),p=parseInt(R.slice(3,4).repeat(2),16),u=parseInt(R.slice(4,5).repeat(2),16),b.toColor(c,h,p,u);case 7:return{css:R,rgba:(parseInt(R.slice(1),16)<<8|255)>>>0};case 9:return{css:R,rgba:parseInt(R.slice(1),16)>>>0}}const D=R.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(D)return c=parseInt(D[1]),h=parseInt(D[2]),p=parseInt(D[3]),u=Math.round(255*(D[5]===void 0?1:parseFloat(D[5]))),b.toColor(c,h,p,u);if(!E||!M)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=M,E.fillStyle=R,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[c,h,p,u]=E.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:b.toRgba(c,h,p,u),css:R}}})(k||(a.css=k={})),(function(S){function E(M,R,D){const A=M/255,L=R/255,B=D/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 E(M>>16&255,M>>8&255,255&M)},S.relativeLuminance2=E})(x||(a.rgb=x={})),(function(S){function E(R,D,A){const L=R>>24&255,B=R>>16&255,I=R>>8&255;let U=D>>24&255,F=D>>16&255,$=D>>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(R,D,A){const L=R>>24&255,B=R>>16&255,I=R>>8&255;let U=D>>24&255,F=D>>16&255,$=D>>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(R,D){if(u=(255&D)/255,u===1)return D;const A=D>>24&255,L=D>>16&255,B=D>>8&255,I=R>>24&255,U=R>>16&255,F=R>>8&255;return c=I+Math.round((A-I)*u),h=U+Math.round((L-U)*u),p=F+Math.round((B-F)*u),b.toRgba(c,h,p)},S.ensureContrastRatio=function(R,D,A){const L=x.relativeLuminance(R>>8),B=x.relativeLuminance(D>>8);if(g(L,B)<A){if(B<L){const F=E(R,D,A),$=g(L,x.relativeLuminance(F>>8));if($<A){const K=M(R,D,A);return $>g(L,x.relativeLuminance(K>>8))?F:K}return F}const I=M(R,D,A),U=g(L,x.relativeLuminance(I>>8));if(U<A){const F=E(R,D,A);return U>g(L,x.relativeLuminance(F>>8))?I:F}return I}},S.reduceLuminance=E,S.increaseLuminance=M,S.toChannels=function(R){return[R>>24&255,R>>16&255,R>>8&255,255&R]}})(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),p=c(2585),u=c(4348),b=c(7866),C=c(744),k=c(7302),x=c(6975),y=c(8460),_=c(1753),g=c(1480),S=c(7994),E=c(9282),M=c(5435),R=c(5981),D=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 k.OptionsService(I)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(b.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(_.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(g.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(S.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(D.OscLinkService),this._instantiationService.setService(p.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 R.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<=p.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(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,E.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 p=[];for(let u=0;u<this._listeners.length;u++)p.push(this._listeners[u]);for(let u=0;u<p.length;u++)p[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((p=>h.fire(p)))},a.runAndSubscribe=function(c,h){return h(void 0),c((p=>h(p)))}},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},p=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),k=c(844),x=c(482),y=c(8437),_=c(8460),g=c(643),S=c(511),E=c(3734),M=c(2585),R=c(1480),D=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 k.Disposable{getAttrData(){return this._curAttrData}constructor(z,j,H,G,N,Z,he,ge,Y=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=ge,this._parser=Y,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 D.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new D.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new D.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new D.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new D.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new D.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new D.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new D.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new D.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new D.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new D.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new D.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 ge=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Y=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Y<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Y,this._bufferService.rows-1),Math.min(ge,this._bufferService.rows-1))}print(z,j,H){let G,N;const Z=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,ge=this._bufferService.cols,Y=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 ie=this._parser.precedingJoinState;for(let de=j;de<H;++de){if(G=z[de],G<127&&Z){const ft=Z[String.fromCharCode(G)];ft&&(G=ft.charCodeAt(0))}const we=this._unicodeService.charProperties(G,ie);N=R.UnicodeService.extractWidth(we);const Ee=R.UnicodeService.extractShouldJoin(we),Ye=Ee?R.UnicodeService.extractWidth(ie):0;if(ie=we,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-Ye>ge){if(Y){const ft=te;let Re=this._activeBuffer.x-Ye;for(this._activeBuffer.x=Ye,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),Ye>0&&te instanceof y.BufferLine&&te.copyCellsFrom(ft,Re,0,Ye,!1);Re<ge;)ft.setCellFromCodepoint(Re++,0,1,ce)}else if(this._activeBuffer.x=ge-1,N===2)continue}if(Ee&&this._activeBuffer.x){const ft=te.getWidth(this._activeBuffer.x-1)?1:2;te.addCodepointToCell(this._activeBuffer.x-ft,G,N);for(let Re=N-Ye;--Re>=0;)te.setCellFromCodepoint(this._activeBuffer.x++,0,0,ce)}else if(q&&(te.insertCells(this._activeBuffer.x,N-Ye,this._activeBuffer.getNullCell(ce)),te.getWidth(ge-1)===2&&te.setCellFromCodepoint(ge-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=ie,this._activeBuffer.x<ge&&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 D.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=R.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 ge=0;for(let q=0;q<Z.length;){const ce=Z.codePointAt(q)||0;he[ge++]=ce,q+=ce>65535?2:1}let Y=ge;for(let q=1;q<H;++q)he.copyWithin(Y,0,ge),Y+=ge;return this.print(he,0,Y),!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:ge}=this._bufferService,{active:Y,alt:q}=he,ce=this._optionsService.rawOptions,te=Ee=>Ee?1:2,ie=z.params[0];return de=ie,we=j?ie===2?4:ie===4?te(Z.modes.insertMode):ie===12?3:ie===20?te(ce.convertEol):0:ie===1?te(H.applicationCursorKeys):ie===3?ce.windowOptions.setWinLines?ge===80?2:ge===132?1:0:0:ie===6?te(H.origin):ie===7?te(H.wraparound):ie===8?3:ie===9?te(G==="X10"):ie===12?te(ce.cursorBlink):ie===25?te(!Z.isCursorHidden):ie===45?te(H.reverseWraparound):ie===66?te(H.applicationKeypad):ie===67?4:ie===1e3?te(G==="VT200"):ie===1002?te(G==="DRAG"):ie===1003?te(G==="ANY"):ie===1004?te(H.sendFocus):ie===1005?4:ie===1006?te(N==="SGR"):ie===1015?4:ie===1016?te(N==="SGR_PIXELS"):ie===1048?1:ie===47||ie===1047||ie===1049?te(Y===q):ie===2004?te(H.bracketedPasteMode):0,Z.triggerDataEvent(`${u.C0.ESC}[${j?"":"?"}${de};${we}$y`),!0;var de,we}_updateAttrColor(z,j,H,G,N){return j===2?(z|=50331648,z&=-16777216,z|=E.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 ge=0;do G[1]===5&&(N=1),G[Z+ge+1+N]=he[ge];while(++ge<he.length&&ge+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([p(0,M.IBufferService)],V)},844:(f,a)=>{function c(h){for(const p of h)p.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 p=this._disposables.indexOf(h);p!==-1&&this._disposables.splice(p,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var p;this._isDisposed||h===this._value||((p=this._value)==null||p.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(p,u,b){this._data[p]||(this._data[p]={}),this._data[p][u]=b}get(p,u){return this._data[p]?this._data[p][u]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(h,p,u,b,C){this._data.get(h,p)||this._data.set(h,p,new c),this._data.get(h,p).set(u,b,C)}get(h,p,u,b){var C;return(C=this._data.get(h,p))==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 p=c.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[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 p=this._getKey(h);if(p===void 0||(c=this._search(p),c===-1)||this._getKey(this._array[c])!==p)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])===p);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,p){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do p(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===h)}values(){return[...this._array].values()}_search(h){let p=0,u=this._array.length-1;for(;u>=p;){let b=p+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}p=b+1}}return p}}},7226:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=c(6114);class p{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 k=0,x=0,y=C.timeRemaining(),_=0;for(;this._i<this._tasks.length;){if(k=Date.now(),this._tasks[this._i]()||this._i++,k=Math.max(1,Date.now()-k),x=Math.max(k,x),_=C.timeRemaining(),1.5*x>_)return y-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(y-k))}ms`),void this._start();y=_}this.clear()}}class u extends p{_requestCallback(C){return setTimeout((()=>C(this._createDeadline(16))))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const k=Date.now()+C;return{timeRemaining:()=>Math.max(0,k-Date.now())}}}a.PriorityTaskQueue=u,a.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends p{_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(p){const u=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),b=u==null?void 0:u.get(p.cols-1),C=p.buffer.lines.get(p.buffer.ybase+p.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),p=c(7226),u=c(3734),b=c(8437),C=c(4634),k=c(511),x=c(643),y=c(4863),_=c(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(g,S,E){this._hasScrollback=g,this._optionsService=S,this._bufferService=E,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=k.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=k.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.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 E=this.getNullCell(b.DEFAULT_ATTR_DATA);let M=0;const R=this._getCorrectBufferLength(S);if(R>this.lines.maxLength&&(this.lines.maxLength=R),this.lines.length>0){if(this._cols<g)for(let A=0;A<this.lines.length;A++)M+=+this.lines.get(A).resize(g,E);let D=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,E)):this.ybase>0&&this.lines.length<=this.ybase+this.y+D+1?(this.ybase--,D++,this.ydisp>0&&this.ydisp--):this.lines.push(new b.BufferLine(g,E)));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(R<this.lines.maxLength){const A=this.lines.length-R;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=R}this.x=Math.min(this.x,g-1),this.y=Math.min(this.y,S-1),D&&(this.y+=D),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 D=0;D<this.lines.length;D++)M+=+this.lines.get(D).resize(g,E);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 E=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,g,this.ybase+this.y,this.getNullCell(b.DEFAULT_ATTR_DATA));if(E.length>0){const M=(0,C.reflowLargerCreateNewLayout)(this.lines,E);(0,C.reflowLargerApplyNewLayout)(this.lines,M.layout),this._reflowLargerAdjustViewport(g,S,M.countRemoved)}}_reflowLargerAdjustViewport(g,S,E){const M=this.getNullCell(b.DEFAULT_ATTR_DATA);let R=E;for(;R-- >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-E,0)}_reflowSmaller(g,S){const E=this.getNullCell(b.DEFAULT_ATTR_DATA),M=[];let R=0;for(let D=this.lines.length-1;D>=0;D--){let A=this.lines.get(D);if(!A||!A.isWrapped&&A.getTrimmedLength()<=g)continue;const L=[A];for(;A.isWrapped&&D>0;)A=this.lines.get(--D),L.unshift(A);const B=this.ybase+this.y;if(B>=D&&B<D+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:D+L.length+R,newLines:K}),R+=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],E);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+R)-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 D=[],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+R);let F=0;for(let V=Math.min(this.lines.maxLength-1,L+R-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++,D.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=D.length-1;V>=0;V--)D[V].index+=$,this.lines.onInsertEmitter.fire(D[V]),$+=D[V].amount;const K=Math.max(0,L+R-this.lines.maxLength);K>0&&this.lines.onTrimEmitter.fire(K)}}translateBufferLineToString(g,S,E=0,M){const R=this.lines.get(g);return R?R.translateToString(S,E,M):""}getWrappedRangeForLine(g){let S=g,E=g;for(;S>0&&this.lines.get(S).isWrapped;)S--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:S,last:E}}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((E=>{S.line-=E,S.line<0&&S.dispose()}))),S.register(this.lines.onInsert((E=>{S.line>=E.index&&(S.line+=E.amount)}))),S.register(this.lines.onDelete((E=>{S.line>=E.index&&S.line<E.index+E.amount&&S.dispose(),S.line>E.index&&(S.line-=E.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),p=c(511),u=c(643),b=c(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let C=0;class k{constructor(y,_,g=!1){this.isWrapped=g,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*y);const S=_||p.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let E=0;E<y;++E)this.setCell(E,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 p.CellData;for(let E=this.length-y-_-1;E>=0;--E)this.setCell(y+_+E,this.loadCell(y+E,S));for(let E=0;E<_;++E)this.setCell(y+E,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 p.CellData;for(let E=0;E<this.length-y-_;++E)this.setCell(y+E,this.loadCell(y+_+E,S));for(let E=this.length-_;E<this.length;++E)this.setCell(E,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 R=parseInt(S[M],10);R>=y&&delete this._combined[R]}const E=Object.keys(this._extendedAttrs);for(let M=0;M<E.length;M++){const R=parseInt(E[M],10);R>=y&&delete this._extendedAttrs[R]}}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 k(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,E){const M=y._data;if(E)for(let D=S-1;D>=0;D--){for(let A=0;A<3;A++)this._data[3*(g+D)+A]=M[3*(_+D)+A];268435456&M[3*(_+D)+2]&&(this._extendedAttrs[g+D]=y._extendedAttrs[_+D])}else for(let D=0;D<S;D++){for(let A=0;A<3;A++)this._data[3*(g+D)+A]=M[3*(_+D)+A];268435456&M[3*(_+D)+2]&&(this._extendedAttrs[g+D]=y._extendedAttrs[_+D])}const R=Object.keys(y._combined);for(let D=0;D<R.length;D++){const A=parseInt(R[D],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 E="";for(;_<g;){const M=this._data[3*_+0],R=2097151&M,D=2097152&M?this._combined[_]:R?(0,b.stringFromCodePoint)(R):u.WHITESPACE_CELL_CHAR;if(E+=D,S)for(let A=0;A<D.length;++A)S.push(_);_+=M>>22||1}return S&&S.push(_),E}}a.BufferLine=k},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,p,u){if(p===h.length-1)return h[p].getTrimmedLength();const b=!h[p].hasContent(u-1)&&h[p].getWidth(u-1)===1,C=h[p+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,p,u,b,C){const k=[];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,E=c(g,S,p),M=1,R=0;for(;M<g.length;){const A=c(g,M,p),L=A-R,B=u-E,I=Math.min(L,B);g[S].copyCellsFrom(g[M],R,E,I,!1),E+=I,E===u&&(S++,E=0),R+=I,R===A&&(M++,R=0),E===0&&S!==0&&g[S-1].getWidth(u-1)===2&&(g[S].copyCellsFrom(g[S-1],u-1,E++,1,!1),g[S-1].setCell(u-1,C))}g[S].replaceCells(E,u,C);let D=0;for(let A=g.length-1;A>0&&(A>S||g[A].getTrimmedLength()===0);A--)D++;D>0&&(k.push(x+g.length-D),k.push(D)),x+=g.length-1}return k},a.reflowLargerCreateNewLayout=function(h,p){const u=[];let b=0,C=p[b],k=0;for(let x=0;x<h.length;x++)if(C===x){const y=p[++b];h.onDeleteEmitter.fire({index:x-k,amount:y}),x+=y-1,k+=y,C=p[++b]}else u.push(x);return{layout:u,countRemoved:k}},a.reflowLargerApplyNewLayout=function(h,p){const u=[];for(let b=0;b<p.length;b++)u.push(h.get(p[b]));for(let b=0;b<u.length;b++)h.set(b,u[b]);h.length=p.length},a.reflowSmallerGetNewLineLengths=function(h,p,u){const b=[],C=h.map(((_,g)=>c(h,g,p))).reduce(((_,g)=>_+g));let k=0,x=0,y=0;for(;y<C;){if(C-y<u){b.push(C-y);break}k+=u;const _=c(h,x,p);k>_&&(k-=_,x++);const g=h[x].getWidth(k-1)===2;g&&k--;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),p=c(844),u=c(9092);class b extends p.Disposable{constructor(k,x){super(),this._optionsService=k,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(k){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(k),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(k,x){this._normal.resize(k,x),this._alt.resize(k,x),this.setupTabStops(k)}setupTabStops(k){this._normal.setupTabStops(k),this._alt.setupTabStops(k)}}a.BufferSet=b},511:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=c(482),p=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(k){const x=new b;return x.setFromCharData(k),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(k){this.fg=k[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(k[p.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(k[p.CHAR_DATA_CHAR_INDEX].length===2){const y=k[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=y&&y<=56319){const _=k[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=_&&_<=57343?this.content=1024*(y-55296)+_-56320+65536|k[p.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=k[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[p.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=k[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[p.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),p=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,p.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,p;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}\\`})(p||(a.C1_ESCAPED=p={}))},7399:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=c(2584),p={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,k){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&&!k||!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 _=p[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 E=String.fromCharCode(S);u.shiftKey&&(E=E.toUpperCase()),x.key=h.C0.ESC+E}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,p=c.length){let u="";for(let b=h;b<p;++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 p=c.length;if(!p)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<p;++C){const k=c.charCodeAt(C);if(55296<=k&&k<=56319){if(++C>=p)return this._interim=k,u;const x=c.charCodeAt(C);56320<=x&&x<=57343?h[u++]=1024*(k-55296)+x-56320+65536:(h[u++]=k,h[u++]=x)}else k!==65279&&(h[u++]=k)}return u}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,h){const p=c.length;if(!p)return 0;let u,b,C,k,x=0,y=0,_=0;if(this.interim[0]){let E=!1,M=this.interim[0];M&=(224&M)==192?31:(240&M)==224?15:7;let R,D=0;for(;(R=63&this.interim[++D])&&D<4;)M<<=6,M|=R;const A=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=A-D;for(;_<L;){if(_>=p)return 0;if(R=c[_++],(192&R)!=128){_--,E=!0;break}this.interim[D++]=R,M<<=6,M|=63&R}E||(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=p-4;let S=_;for(;S<p;){for(;!(!(S<g)||128&(u=c[S])||128&(b=c[S+1])||128&(C=c[S+2])||128&(k=c[S+3]));)h[x++]=u,h[x++]=b,h[x++]=C,h[x++]=k,S+=4;if(u=c[S++],u<128)h[x++]=u;else if((224&u)==192){if(S>=p)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>=p)return this.interim[0]=u,x;if(b=c[S++],(192&b)!=128){S--;continue}if(S>=p)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>=p)return this.interim[0]=u,x;if(b=c[S++],(192&b)!=128){S--;continue}if(S>=p)return this.interim[0]=u,this.interim[1]=b,x;if(C=c[S++],(192&C)!=128){S--;continue}if(S>=p)return this.interim[0]=u,this.interim[1]=b,this.interim[2]=C,x;if(k=c[S++],(192&k)!=128){S--;continue}if(y=(7&u)<<18|(63&b)<<12|(63&C)<<6|63&k,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),p=[[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<p.length;++C)b.fill(0,p[C][0],p[C][1]+1)}}wcwidth(C){return C<32?0:C<127?1:C<65536?b[C]:(function(k,x){let y,_=0,g=x.length-1;if(k<x[0][0]||k>x[g][1])return!1;for(;g>=_;)if(y=_+g>>1,k>x[y][1])_=y+1;else{if(!(k<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,k){let x=this.wcwidth(C),y=x===0&&k!==0;if(y){const _=h.UnicodeService.extractWidth(k);_===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),p=c(844);class u extends p.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,k){if(k!==void 0&&this._syncCalls>k)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,k){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(k),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(k)}_innerWrite(C=0,k=!0){const x=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const y=this._writeBuffer[this._bufferOffset],_=this._action(y,k);if(_){const S=E=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,E))):this._innerWrite(x,E);return void _.catch((E=>(queueMicrotask((()=>{throw E})),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 p(u,b){const C=u.toString(16),k=C.length<2?"0"+C:C;switch(b){case 4:return C[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}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 k=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/k*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/k*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/k*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,k=[0,0,0];for(let x=0;x<3;++x){const y=parseInt(b.slice(C*x,C*x+C),16);k[x]=C===1?y<<4:C===2?y:C===3?y>>4:y>>8}return k}},a.toRgbString=function(u,b=16){const[C,k,x]=u;return`rgb:${p(C,b)}/${p(k,b)}/${p(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),p=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(k,x){this._handlers[k]===void 0&&(this._handlers[k]=[]);const y=this._handlers[k];return y.push(x),{dispose:()=>{const _=y.indexOf(x);_!==-1&&y.splice(_,1)}}}clearHandler(k){this._handlers[k]&&delete this._handlers[k]}setHandlerFallback(k){this._handlerFb=k}reset(){if(this._active.length)for(let k=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;k>=0;--k)this._active[k].unhook(!1);this._stack.paused=!1,this._active=b,this._ident=0}hook(k,x){if(this.reset(),this._ident=k,this._active=this._handlers[k]||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(k,x,y){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(k,x,y);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(k,x,y))}unhook(k,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(k),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",k);this._active=b,this._ident=0}};const C=new p.Params;C.addParam(0),a.DcsHandler=class{constructor(k){this._handler=k,this._data="",this._params=C,this._hitLimit=!1}hook(k){this._params=k.length>1||k.params[0]?k.clone():C,this._data="",this._hitLimit=!1}put(k,x,y){this._hitLimit||(this._data+=(0,h.utf32ToString)(k,x,y),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(k){let x=!1;if(this._hitLimit)x=!1;else if(k&&(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),p=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,E){this.table[g<<8|_]=S<<4|E}addMany(_,g,S,E){for(let M=0;M<_.length;M++)this.table[g<<8|_[M]]=S<<4|E}}a.TransitionTable=C;const k=160;a.VT500_TRANSITION_TABLE=(function(){const y=new C(4095),_=Array.apply(null,Array(256)).map(((D,A)=>A)),g=(D,A)=>_.slice(D,A),S=g(32,127),E=g(0,24);E.push(25),E.push.apply(E,g(28,32));const M=g(0,14);let R;for(R in y.setDefault(1,0),y.addMany(S,0,2,0),M)y.addMany([24,26,153,154],R,3,0),y.addMany(g(128,144),R,3,0),y.addMany(g(144,152),R,3,0),y.add(156,R,0,0),y.add(27,R,11,1),y.add(157,R,4,8),y.addMany([152,158,159],R,0,7),y.add(155,R,11,3),y.add(144,R,11,9);return y.addMany(E,0,3,0),y.addMany(E,1,3,1),y.add(127,1,0,1),y.addMany(E,8,0,8),y.addMany(E,3,3,3),y.add(127,3,0,3),y.addMany(E,4,3,4),y.add(127,4,0,4),y.addMany(E,6,3,6),y.addMany(E,5,3,5),y.add(127,5,0,5),y.addMany(E,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(E,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(E,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(E,11,0,11),y.addMany(g(32,128),11,0,11),y.addMany(g(28,32),11,0,11),y.addMany(E,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(E,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(E,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(k,0,2,0),y.add(k,8,5,8),y.add(k,6,0,6),y.add(k,11,0,11),y.add(k,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 p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(g,S,E)=>{},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 R=_.intermediates.charCodeAt(M);if(32>R||R>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");S<<=8,S|=R}}if(_.final.length!==1)throw new Error("final must be a single byte");const E=_.final.charCodeAt(0);if(g[0]>E||E>g[1])throw new Error(`final must be in range ${g[0]} .. ${g[1]}`);return S<<=8,S|=E,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 E=this._escHandlers[S];return E.push(g),{dispose:()=>{const M=E.indexOf(g);M!==-1&&E.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 E=this._csiHandlers[S];return E.push(g),{dispose:()=>{const M=E.indexOf(g);M!==-1&&E.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,E,M){this._parseStack.state=_,this._parseStack.handlers=g,this._parseStack.handlerPos=S,this._parseStack.transition=E,this._parseStack.chunkPos=M}parse(_,g,S){let E,M=0,R=0,D=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,D=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&&(E=A[L](this._params),E!==!0);L--)if(E instanceof Promise)return this._parseStack.handlerPos=L,E}this._parseStack.handlers=[];break;case 4:if(S===!1&&L>-1){for(;L>=0&&(E=A[L](),E!==!0);L--)if(E instanceof Promise)return this._parseStack.handlerPos=L,E}this._parseStack.handlers=[];break;case 6:if(M=_[this._parseStack.chunkPos],E=this._dcsParser.unhook(M!==24&&M!==26,S),E)return E;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(M=_[this._parseStack.chunkPos],E=this._oscParser.end(M!==24&&M!==26,S),E)return E;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,D=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let A=D;A<g;++A){switch(M=_[A],R=this._transitions.table[this.currentState<<8|(M<160?M:k)],R>>4){case 2:for(let F=A+1;;++F){if(F>=g||(M=_[F])<32||M>126&&M<k){this._printHandler(_,A,F),A=F-1;break}if(++F>=g||(M=_[F])<32||M>126&&M<k){this._printHandler(_,A,F),A=F-1;break}if(++F>=g||(M=_[F])<32||M>126&&M<k){this._printHandler(_,A,F),A=F-1;break}if(++F>=g||(M=_[F])<32||M>126&&M<k){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&&(E=L[B](this._params),E!==!0);B--)if(E instanceof Promise)return this._preserveStack(3,L,B,R,A),E;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&&(E=I[U](),E!==!0);U--)if(E instanceof Promise)return this._preserveStack(4,I,U,R,A),E;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<k){this._dcsParser.put(_,A,F),A=F-1;break}break;case 14:if(E=this._dcsParser.unhook(M!==24&&M!==26),E)return this._preserveStack(6,[],0,R,A),E;M===27&&(R|=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<k){this._oscParser.put(_,A,F),A=F-1;break}break;case 6:if(E=this._oscParser.end(M!==24&&M!==26),E)return this._preserveStack(5,[],0,R,A),E;M===27&&(R|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&R}}}a.EscapeSequenceParser=x},6242:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const h=c(5770),p=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 k=this._handlers[b];return k.push(C),{dispose:()=>{const x=k.indexOf(C);x!==-1&&k.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,k){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(b,C,k);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(b,C,k))}start(){this.reset(),this._state=1}put(b,C,k){if(this._state!==3){if(this._state===1)for(;C<k;){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&&k-C>0&&this._put(b,C,k)}}end(b,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let k=!1,x=this._active.length-1,y=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,k=C,y=this._stack.fallThrough,this._stack.paused=!1),!y&&k===!1){for(;x>=0&&(k=this._active[x].end(b),k!==!0);x--)if(k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,k;x--}for(;x>=0;x--)if(k=this._active[x].end(!1),k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,k}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,k){this._hitLimit||(this._data+=(0,p.utf32ToString)(b,C,k),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((k=>(this._data="",this._hitLimit=!1,k)));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 k=u[C];if(Array.isArray(k))for(let x=0;x<k.length;++x)b.addSubParam(k[x]);else b.addParam(k)}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,k=255&this._subParamsIdx[b];k-C>0&&u.push(Array.prototype.slice.call(this._subParams,C,k))}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,k=255&this._subParamsIdx[b];k-C>0&&(u[b]=this._subParams.slice(C,k))}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,k=C[b-1];C[b-1]=~k?Math.min(10*k+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 p={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(p),h.dispose=()=>this._wrappedAddonDispose(p),h.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let h=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===c){h=p;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),p=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 p.CellData}}},3785:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=c(511);a.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,u){if(!(p<0||p>=this._line.length))return u?(this._line.loadCell(p,u),u):this._line.loadCell(p,new h.CellData)}translateToString(p,u,b){return this._line.translateToString(p,u,b)}}},8285:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=c(8771),p=c(8460),u=c(844);class b extends u.Disposable{constructor(k){super(),this._core=k,this._onBufferChange=this.register(new p.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,(p=>h(p.toArray())))}addCsiHandler(c,h){return this.registerCsiHandler(c,h)}registerDcsHandler(c,h){return this._core.registerDcsHandler(c,((p,u)=>h(p,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 E,M=arguments.length,R=M<3?_:S===null?S=Object.getOwnPropertyDescriptor(_,g):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,_,g,S);else for(var D=y.length-1;D>=0;D--)(E=y[D])&&(R=(M<3?E(R):M>3?E(_,g,R):E(_,g))||R);return M>3&&R&&Object.defineProperty(_,g,R),R},p=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),k=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 E=g.ybase+g.scrollTop,M=g.ybase+g.scrollBottom;if(g.scrollTop===0){const R=g.lines.isFull;M===g.lines.length-1?R?g.lines.recycle().copyFrom(S):g.lines.push(S.clone()):g.lines.splice(M+1,0,S.clone()),R?this.isUserScrolling&&(g.ydisp=Math.max(g.ydisp-1,0)):(g.ybase++,this.isUserScrolling||g.ydisp++)}else{const R=M-E+1;g.lines.shiftElements(E+1,R-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 E=S.ydisp;S.ydisp=Math.max(Math.min(S.ydisp+y,S.ybase),0),E!==S.ydisp&&(_||this._onScroll.fire(S.ydisp))}};a.BufferService=x=h([p(0,k.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,E,M,R){var D,A=arguments.length,L=A<3?E:R===null?R=Object.getOwnPropertyDescriptor(E,M):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(S,E,M,R);else for(var B=S.length-1;B>=0;B--)(D=S[B])&&(L=(A<3?D(L):A>3?D(E,M,L):D(E,M))||L);return A>3&&L&&Object.defineProperty(E,M,L),L},p=this&&this.__param||function(S,E){return function(M,R){E(M,R,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const u=c(2585),b=c(8460),C=c(844),k={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,E){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||E||(M|=3)),M}const y=String.fromCharCode,_={DEFAULT:S=>{const E=[x(S,!1)+32,S.col+32,S.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${y(E[0])}${y(E[1])}${y(E[2])}`},SGR:S=>{const E=S.action===0&&S.button!==4?"m":"M";return`\x1B[<${x(S,!0)};${S.col};${S.row}${E}`},SGR_PIXELS:S=>{const E=S.action===0&&S.button!==4?"m":"M";return`\x1B[<${x(S,!0)};${S.x};${S.y}${E}`}};let g=a.CoreMouseService=class extends C.Disposable{constructor(S,E){super(),this._bufferService=S,this._coreService=E,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(k))this.addProtocol(M,k[M]);for(const M of Object.keys(_))this.addEncoding(M,_[M]);this.reset()}addProtocol(S,E){this._protocols[S]=E}addEncoding(S,E){this._encodings[S]=E}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 E=this._encodings[this._activeEncoding](S);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!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,E,M){if(M){if(S.x!==E.x||S.y!==E.y)return!1}else if(S.col!==E.col||S.row!==E.row)return!1;return S.button===E.button&&S.action===E.action&&S.ctrl===E.ctrl&&S.alt===E.alt&&S.shift===E.shift}};a.CoreMouseService=g=h([p(0,u.IBufferService),p(1,u.ICoreService)],g)},6975:function(f,a,c){var h=this&&this.__decorate||function(g,S,E,M){var R,D=arguments.length,A=D<3?S:M===null?M=Object.getOwnPropertyDescriptor(S,E):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(g,S,E,M);else for(var L=g.length-1;L>=0;L--)(R=g[L])&&(A=(D<3?R(A):D>3?R(S,E,A):R(S,E))||A);return D>3&&A&&Object.defineProperty(S,E,A),A},p=this&&this.__param||function(g,S){return function(E,M){S(E,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const u=c(1439),b=c(8460),C=c(844),k=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,E){super(),this._bufferService=g,this._logService=S,this._optionsService=E,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 E=this._bufferService.buffer;S&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.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([p(0,k.IBufferService),p(1,k.ILogService),p(2,k.IOptionsService)],_)},9074:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=c(8055),p=c(8460),u=c(844),b=c(6106);let C=0,k=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 p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.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 E=S.marker.onDispose((()=>S.dispose()));S.onDispose((()=>{S&&(this._decorations.delete(S)&&this._onDecorationRemoved.fire(S),E.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,E){let M=0,R=0;for(const D of this._decorations.getKeyIterator(S))M=D.options.x??0,R=M+(D.options.width??1),g>=M&&g<R&&(!E||(D.options.layer??"bottom")===E)&&(yield D)}forEachDecorationAtCell(g,S,E,M){this._decorations.forEachByKey(S,(R=>{C=R.options.x??0,k=C+(R.options.width??1),g>=C&&g<k&&(!E||(R.options.layer??"bottom")===E)&&M(R)}))}}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 p.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new p.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),p=c(8343);class u{constructor(...C){this._entries=new Map;for(const[k,x]of C)this.set(k,x)}set(C,k){const x=this._entries.get(C);return this._entries.set(C,k),x}forEach(C){for(const[k,x]of this._entries.entries())C(k,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 k=(0,p.getServiceDependencies)(b).sort(((_,g)=>_.index-g.index)),x=[];for(const _ of k){const g=this._services.get(_.id);if(!g)throw new Error(`[createInstance] ${b.name} depends on UNKNOWN service ${_.id}.`);x.push(g)}const y=k.length>0?k[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 E,M=arguments.length,R=M<3?_:S===null?S=Object.getOwnPropertyDescriptor(_,g):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,_,g,S);else for(var D=y.length-1;D>=0;D--)(E=y[D])&&(R=(M<3?E(R):M>3?E(_,g,R):E(_,g))||R);return M>3&&R&&Object.defineProperty(_,g,R),R},p=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 k,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()))),k=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([p(0,b.IOptionsService)],x),a.setTraceLogger=function(y){k=y},a.traceCall=function(y,_,g){if(typeof g.value!="function")throw new Error("not supported");const S=g.value;g.value=function(...E){if(k.logLevel!==b.LogLevelEnum.TRACE)return S.apply(this,E);k.trace(`GlyphRenderer#${S.name}(${E.map((R=>JSON.stringify(R))).join(", ")})`);const M=S.apply(this,E);return k.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),p=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 p.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,p.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,k,x,y){var _,g=arguments.length,S=g<3?k:y===null?y=Object.getOwnPropertyDescriptor(k,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(C,k,x,y);else for(var E=C.length-1;E>=0;E--)(_=C[E])&&(S=(g<3?_(S):g>3?_(k,x,S):_(k,x))||S);return g>3&&S&&Object.defineProperty(k,x,S),S},p=this&&this.__param||function(C,k){return function(x,y){k(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 k=this._bufferService.buffer;if(C.id===void 0){const E=k.addMarker(k.ybase+k.y),M={data:C,id:this._nextId++,lines:[E]};return E.onDispose((()=>this._removeMarkerFromLink(M,E))),this._dataByLinkId.set(M.id,M),M.id}const x=C,y=this._getEntryIdKey(x),_=this._entriesWithId.get(y);if(_)return this.addLineToLink(_.id,k.ybase+k.y),_.id;const g=k.addMarker(k.ybase+k.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,k){const x=this._dataByLinkId.get(C);if(x&&x.lines.every((y=>y.line!==k))){const y=this._bufferService.buffer.addMarker(k);x.lines.push(y),y.onDispose((()=>this._removeMarkerFromLink(x,y)))}}getLinkData(C){var k;return(k=this._dataByLinkId.get(C))==null?void 0:k.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,k){const x=C.lines.indexOf(k);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([p(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(p){return p[h]||[]},a.createDecorator=function(p){if(a.serviceRegistry.has(p))return a.serviceRegistry.get(p);const u=function(b,C,k){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,k)};return u.toString=()=>p,a.serviceRegistry.set(p,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 p;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"})(p||(a.LogLevelEnum=p={})),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),p=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,k,x=!1){return(16777215&C)<<3|(3&k)<<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 p.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 k=0,x=0;const y=C.length;for(let _=0;_<y;++_){let g=C.charCodeAt(_);if(55296<=g&&g<=56319){if(++_>=y)return k+this.wcwidth(g);const M=C.charCodeAt(_);56320<=M&&M<=57343?g=1024*(g-55296)+M-56320+65536:k+=this.wcwidth(M)}const S=this.charProperties(g,x);let E=u.extractWidth(S);u.extractShouldJoin(S)&&(E-=u.extractWidth(x)),k+=E,x=S}return k}charProperties(C,k){return this._activeProvider.charProperties(C,k)}}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),p=d(5741),u=d(8285),b=d(7975),C=d(7090),k=["cols","rows"];class x extends h.Disposable{constructor(_){super(),this._core=this.register(new c.Terminal(_)),this._addonManager=this.register(new p.AddonManager),this._publicOptions={...this._core.options};const g=E=>this._core.options[E],S=(E,M)=>{this._checkReadonlyOptions(E),this._core.options[E]=M};for(const E in this._core.options){const M={get:g.bind(this,E),set:S.bind(this,E)};Object.defineProperty(this._publicOptions,E,M)}}_checkReadonlyOptions(_){if(k.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})()))})(Su)),Su.exports}var L1=M1();class O1{constructor(r,s){rm(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 Ja({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(p={}){const u=o.current,b=d.current,C=v.current,k=f.current;if(!u||!b||!C||!k)return!1;const x=u.getBoundingClientRect();return x.width<Sm||x.height<bm||(C.fit(),k.cols<Cm||k.rows<wm)?!1:(b.resize(k.cols,k.rows),p.focus&&k.focus(),!0)}return re.useEffect(()=>{c.current=s},[s]),re.useEffect(()=>{a.current=r},[r]),re.useEffect(()=>{if(!o.current)return;const p=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;p.loadAddon(u),p.loadAddon(new D1.WebLinksAddon),p.open(o.current),f.current=p,v.current=u;const b=o.current.getBoundingClientRect();b.width>=Sm&&b.height>=bm&&u.fit();const C=new O1(n,{onOutput(E){p.write(E)},onStatus(E){var M;(M=c.current)==null||M.call(c,E.type)},onError(E){var M;p.writeln(`\r
60
+ [VCM] ${E}`),(M=c.current)==null||M.call(c,E)}});d.current=C,p.cols>=Cm&&p.rows>=wm&&C.resize(p.cols,p.rows);const k=p.onData(E=>{C.sendInput(E)});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(),k.dispose(),C.close(),p.dispose(),d.current=null,f.current=null,v.current=null}},[n]),re.useEffect(()=>{if(!r)return;const p=[],u=[];return p.push(window.requestAnimationFrame(()=>{h({focus:!0}),p.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 p)window.cancelAnimationFrame(b);for(const b of u)window.clearTimeout(b)}},[r]),re.useEffect(()=>{const p=()=>{a.current&&h()};return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[]),T.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var p;return(p=f.current)==null?void 0:p.focus()}})}const Sm=160,bm=80,Cm=20,wm=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"},Lg=[{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"}],Og=[...j1,{value:"max",label:"Max",description:"Maximum reasoning"},{value:"ultracode",label:"Ultracode",description:"Claude Code dynamic workflows with xhigh reasoning"}];function fi({status:n}){return T.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function eh({role:n,session:r,permissionMode:s,model:o,effort:d,busy:v=!1,onPermissionModeChange:f,onModelChange:a,onEffortChange:c,onStart:h,onResume:p,onStop:u,onRestart:b,onNotifyHarnessUpdated:C}){const k=(r==null?void 0:r.status)==="running",x=!!(r!=null&&r.claudeSessionId&&!k),y=!k&&!(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:Lg.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:Og.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:p,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(fi,{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||!k||!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:p,onModelChange:u,onPermissionModeChange:b,onEngineerResume:C,onEngineerRestart:k,onEngineerStart:x,onEngineerStop:y,onEngineerNotifyHarnessUpdated:_,onOpenRepositoryDiff:g,onRefresh:S}){const[E,M]=re.useState(null),[R,D]=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=!!(R&&A!==R.content);re.useEffect(()=>{o||(M(null),D(null),L(""),I(!1),K(null))},[V,o,E]),re.useEffect(()=>{if(!o||!E||!v)return;let Z=!1;return F(!0),K(null),I(!1),ye.getHarnessFileContent(v,E).then(he=>{Z||(D(he),L(he.content))}).catch(he=>{Z||K(he.message)}).finally(()=>{Z||F(!1)}),()=>{Z=!0}},[o,E,v]);async function G(){if(!(!R||!R.editable||!H||!v)){F(!0),K(null);try{const Z=await ye.updateHarnessFileContent(v,R.path,{content:A});D(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),D(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:E?"harness-studio-left harness-studio-left-preview":"harness-studio-left",children:E?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:(R==null?void 0:R.title)??"Harness File"}),T.jsx("p",{className:"muted",children:(R==null?void 0:R.path)??E})]}),T.jsxs("div",{className:"harness-studio-file-editor-actions",children:[R?T.jsx(fi,{status:R.editable?"ok":"unknown"}):null,B?T.jsxs(T.Fragment,{children:[T.jsx("button",{type:"button",disabled:U||!v||!(R!=null&&R.editable)||!H,onClick:()=>void G(),children:"Save"}),T.jsx("button",{type:"button",disabled:U,onClick:()=>{L((R==null?void 0:R.content)??""),I(!1)},children:"Cancel"})]}):T.jsx("button",{type:"button",disabled:U||!v||!(R!=null&&R.editable),onClick:()=>I(!0),children:"Edit"}),T.jsx("button",{type:"button",onClick:N,children:"Files"})]})]}),R!=null&&R.readonlyReason?T.jsx("p",{className:"muted",children:R.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(cs,{label:"Fixed install",value:c?c.initialized?c.needsApply?"updates":"current":"new":"unknown"}),T.jsx(cs,{label:"Revision",value:String((c==null?void 0:c.harnessRevision)??0)}),T.jsx(cs,{label:"Managed files",value:String(V.length)}),T.jsx(cs,{label:"Pending updates",value:String((c==null?void 0:c.plannedChanges.length)??0)}),T.jsx(cs,{label:"Bootstrap",value:(f==null?void 0:f.status.replaceAll("_"," "))??"unknown"}),T.jsx(cs,{label:"Engineer",value:xm(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(Ia,{title:"Agents",files:W,selectedPath:E,onSelect:M}),T.jsx(Ia,{title:"Skills",files:J,selectedPath:E,onSelect:M}),T.jsx(Ia,{title:"Root Context",files:j,selectedPath:E,onSelect:M}),T.jsx(Ia,{title:"Tools",files:z,selectedPath:E,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(fi,{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:xm(a)})]}),T.jsx(fi,{status:(a==null?void 0:a.status)??"unknown"})]}),T.jsx(eh,{role:"harness-engineer",session:a??void 0,permissionMode:d,model:s,effort:r,busy:n,onPermissionModeChange:b,onModelChange:u,onEffortChange:p,onStart:x,onResume:C,onRestart:k,onStop:y,onNotifyHarnessUpdated:_}),T.jsx("div",{className:"harness-engineer-terminal",children:(a==null?void 0:a.status)==="running"?T.jsx(Ja,{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 cs({label:n,value:r}){return T.jsxs("div",{className:"harness-studio-metric",children:[T.jsx("span",{children:n}),T.jsx("strong",{children:r})]})}function Ia({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(fi,{status:d.action})]},d.path)):T.jsx("li",{children:T.jsx("span",{children:"No files."})})})]})}function xm(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,p]=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 k(y=v){var _;p(!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 E;return S&&g.files.some(M=>M.path===S)?S:((E=g.files[0])==null?void 0:E.path)??null})}catch(g){b(g instanceof Error?g.message:String(g))}finally{p(!1)}}return re.useEffect(()=>{n&&(f(null),k(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(_),k(_)},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 k(),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:[Am(y.status)," · ",km(y.stage)," · ",Em(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:[Em(C.category)," · ",Am(C.status)," · ",km(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 Em(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 km(n){return n.replaceAll("_"," ")}function Am(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:p,onRestart:u,onStart:b,onStop:C,onNotifyHarnessUpdated:k}){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(eh,{role:"translator",session:v??void 0,permissionMode:d,model:s,effort:r,busy:n,onPermissionModeChange:h,onModelChange:c,onEffortChange:a,onStart:b,onResume:p,onRestart:u,onStop:C,onNotifyHarnessUpdated:k}),T.jsx("div",{className:"translator-session-terminal",children:(v==null?void 0:v.status)==="running"?T.jsx(Ja,{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 Tm(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"?Rm(n.value):!1:Rm(n)}function Rm(n){return n.replace(K1,"")===""}class xl{constructor(r,s,o){this.normal=s,this.property=r,o&&(this.space=o)}}xl.prototype.normal={};xl.prototype.property={};xl.prototype.space=void 0;function Bg(n,r){const s={},o={};for(const d of n)Object.assign(s,d.property),Object.assign(o,d.normal);return new xl(s,o,r)}function zu(n){return n.toLowerCase()}class on{constructor(r,s){this.attribute=s,this.property=r}}on.prototype.attribute="";on.prototype.booleanish=!1;on.prototype.boolean=!1;on.prototype.commaOrSpaceSeparated=!1;on.prototype.commaSeparated=!1;on.prototype.defined=!1;on.prototype.mustUseProperty=!1;on.prototype.number=!1;on.prototype.overloadedBoolean=!1;on.prototype.property="";on.prototype.spaceSeparated=!1;on.prototype.space=void 0;let X1=0;const Ie=Er(),Bt=Er(),Iu=Er(),be=Er(),ht=Er(),ds=Er(),gn=Er();function Er(){return 2**++X1}const Uu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:Bt,commaOrSpaceSeparated:gn,commaSeparated:ds,number:be,overloadedBoolean:Iu,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),bu=Object.keys(Uu);class th extends on{constructor(r,s,o,d){let v=-1;if(super(r,s),Dm(this,"space",d),typeof o=="number")for(;++v<bu.length;){const f=bu[v];Dm(this,bu[v],(o&Uu[f])===Uu[f])}}}th.prototype.defined=!0;function Dm(n,r,s){s&&(n[r]=s)}function _s(n){const r={},s={};for(const[o,d]of Object.entries(n.properties)){const v=new th(o,n.transform(n.attributes||{},o),d,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(v.mustUseProperty=!0),r[o]=v,s[zu(o)]=o,s[zu(v.attribute)]=o}return new xl(r,s,n.space)}const jg=_s({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:ht,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:be,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:ht,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:Bt,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 Ng(n,r){return r in n?n[r]:r}function Hg(n,r){return Ng(n,r.toLowerCase())}const Q1=_s({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ds,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:ht,autoFocus:Ie,autoPlay:Ie,blocking:ht,capture:null,charSet:null,checked:Ie,cite:null,className:ht,cols:be,colSpan:null,content:null,contentEditable:Bt,controls:Ie,controlsList:ht,coords:be|ds,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:Iu,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:ht,height:be,hidden:Iu,high:be,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:ht,itemRef:ht,itemScope:Ie,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,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:Ie,optimum:be,pattern:null,ping:ht,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:ht,required:Ie,reversed:Ie,rows:be,rowSpan:be,sandbox:ht,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:Bt,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:Ie,useMap:null,value:Bt,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,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:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:Bt,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:Ie,disableRemotePlayback:Ie,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:Hg}),Z1=_s({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:ht,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:Ie,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:ds,g2:ds,glyphName:ds,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:ht,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:Ng}),zg=_s({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()}}),Ig=_s({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Hg}),Ug=_s({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,Mm=/-[a-z]/g,ty=/^data[-\w.:]+$/i;function ny(n,r){const s=zu(r);let o=r,d=on;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(Mm,ry);o="data"+v.charAt(0).toUpperCase()+v.slice(1)}else{const v=r.slice(4);if(!Mm.test(v)){let f=v.replace(ey,iy);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}d=th}return new d(o,r)}function iy(n){return"-"+n.toLowerCase()}function ry(n){return n.charAt(1).toUpperCase()}const sy=Bg([jg,Q1,zg,Ig,Ug],"html"),nh=Bg([jg,Z1,zg,Ig,Ug],"svg");function ly(n){return n.join(" ").trim()}var us={},Cu,Lm;function ay(){if(Lm)return Cu;Lm=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="/",p="*",u="",b="comment",C="declaration";function k(y,_){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];_=_||{};var g=1,S=1;function E($){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 R($),L(),K}}function R($){this.start=$,this.end={line:g,column:S},this.source=_.source}R.prototype.content=y;function D($){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 E(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)||p!=y.charAt(1))){for(var K=2;u!=y.charAt(K)&&(p!=y.charAt(K)||h!=y.charAt(K+1));)++K;if(K+=2,u===y.charAt(K-1))return D("End of comment missing");var V=y.slice(2,K-2);return S+=2,E(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 D("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 Cu=k,Cu}var Om;function oy(){if(Om)return us;Om=1;var n=us&&us.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(us,"__esModule",{value:!0}),us.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:p}=c;a?d(h,p,c):p&&(v=v||{},v[h]=p)}),v}return us}var dl={},Bm;function cy(){if(Bm)return dl;Bm=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.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,p){return p.toUpperCase()},a=function(h,p){return"".concat(p,"-")},c=function(h,p){return p===void 0&&(p={}),v(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(d,a):h=h.replace(o,a),h.replace(r,f))};return dl.camelCase=c,dl}var pl,jm;function uy(){if(jm)return pl;jm=1;var n=pl&&pl.__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,pl=o,pl}var hy=uy();const fy=Eg(hy),Pg=Fg("end"),ih=Fg("start");function Fg(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=ih(n),s=Pg(n);if(r&&s)return{start:r,end:s}}function vl(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Nm(n.position):"start"in n||"end"in n?Nm(n):"line"in n||"column"in n?Pu(n):""}function Pu(n){return Hm(n&&n.line)+":"+Hm(n&&n.column)}function Nm(n){return Pu(n&&n.start)+"-"+Pu(n&&n.end)}function Hm(n){return n&&typeof n=="number"?n:1}class Kt 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=vl(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}}Kt.prototype.file="";Kt.prototype.name="";Kt.prototype.reason="";Kt.prototype.message="";Kt.prototype.stack="";Kt.prototype.column=void 0;Kt.prototype.line=void 0;Kt.prototype.ancestors=void 0;Kt.prototype.cause=void 0;Kt.prototype.fatal=void 0;Kt.prototype.place=void 0;Kt.prototype.ruleId=void 0;Kt.prototype.source=void 0;const rh={}.hasOwnProperty,py=new Map,my=/[A-Z]/g,gy=new Set(["table","tbody","thead","tfoot","tr"]),_y=new Set(["td","th"]),qg="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"?nh:sy,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},v=Gg(d,n,void 0);return v&&typeof v!="string"?v:d.create(n,d.Fragment,{children:v||void 0},void 0)}function Gg(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=nh,n.schema=d),n.ancestors.push(r);const v=$g(n,r.tagName,!1),f=Ay(n,r);let a=lh(n,r);return gy.has(r.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!Y1(c):!0})),Vg(n,f,v,r),sh(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)}Cl(n,r.position)}function by(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);Cl(n,r.position)}function Cy(n,r,s){const o=n.schema;let d=o;r.name==="svg"&&o.space==="html"&&(d=nh,n.schema=d),n.ancestors.push(r);const v=r.name===null?n.Fragment:$g(n,r.name,!0),f=Ty(n,r),a=lh(n,r);return Vg(n,f,v,r),sh(f,a),n.ancestors.pop(),n.schema=o,n.create(r,v,f,s)}function wy(n,r,s){const o={};return sh(o,lh(n,r)),n.create(r,n.Fragment,o,s)}function xy(n,r){return r.value}function Vg(n,r,s,o){typeof s!="string"&&s!==n.Fragment&&n.passNode&&(r.node=o)}function sh(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=ih(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"&&rh.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 Cl(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 Cl(n,r.position);else v=o.value===null?!0:o.value;s[d]=v}return s}function lh(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=Gg(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 Kt("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=qg+"#cannot-parse-style-attribute",d}}function $g(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=Tm(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=Tm(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(o.type==="Literal"){const d=o.value;return rh.call(n.components,d)?n.components[d]:d}if(n.evaluater)return n.evaluater.evaluateExpression(o);Cl(n)}function Cl(n,r){const s=new Kt("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=qg+"#cannot-handle-mdx-estrees-without-createevaluater",s}function My(n){const r={};let s;for(s in n)rh.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 wu={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 ah(n,r){const s=By,o=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,d=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return Wg(n,o,d)}function Wg(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 zm(n.children,r,s)}return Array.isArray(n)?zm(n,r,s):""}function zm(n,r,s){const o=[];let d=-1;for(;++d<n.length;)o[d]=Wg(n[d],r,s);return o.join("")}function jy(n){return!!(n&&typeof n=="object")}const Im=document.createElement("i");function oh(n){const r="&"+n+";";Im.innerHTML=r;const s=Im.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 Um={}.hasOwnProperty;function Kg(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=(Um.call(n,s)?n[s]:void 0)||(n[s]={}),v=r[s];let f;if(v)for(f in v){Um.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 Yg(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 jn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Zt=Xi(/[A-Za-z]/),Wt=Xi(/[\dA-Za-z]/),zy=Xi(/[#-'*+\--9=?A-Z^-~]/);function Wa(n){return n!==null&&(n<32||n===127)}const Fu=Xi(/\d/),Iy=Xi(/[\dA-Fa-f]/),Uy=Xi(/[!-/:-@[-`{-~]/);function Me(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 eo=Xi(new RegExp("\\p{P}|\\p{S}","u")),xr=Xi(/\s/);function Xi(n){return r;function r(s){return s!==null&&s>-1&&n.test(String.fromCharCode(s))}}function vs(n){const r=[];let s=-1,o=0,d=0;for(;++s<n.length;){const v=n.charCodeAt(s);let f="";if(v===37&&Wt(n.charCodeAt(s+1))&&Wt(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 Xe(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"),Xe(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 Me(a)?(n.consume(a),n.exit("chunkText"),v):(n.consume(a),f)}}const qy={tokenize:Gy},Pm={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 E=s[o];return r.containerState=E[1],n.attempt(E[0].continuation,c,h)(S)}return h(S)}function c(S){if(o++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,d&&g();const E=r.events.length;let M=E,R;for(;M--;)if(r.events[M][0]==="exit"&&r.events[M][1].type==="chunkFlow"){R=r.events[M][1].end;break}_(o);let D=E;for(;D<r.events.length;)r.events[D][1].end={...R},D++;return _n(r.events,M+1,0,r.events.slice(E)),r.events.length=D,h(S)}return a(S)}function h(S){if(o===s.length){if(!d)return b(S);if(d.currentConstruct&&d.currentConstruct.concrete)return k(S);r.interrupt=!!(d.currentConstruct&&!d._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(Pm,p,u)(S)}function p(S){return d&&g(),_(o),b(S)}function u(S){return r.parser.lazy[r.now().line]=o!==s.length,f=r.now().offset,k(S)}function b(S){return r.containerState={},n.attempt(Pm,C,k)(S)}function C(S){return o++,s.push([r.currentConstruct,r.containerState]),b(S)}function k(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 Me(S)?(n.consume(S),y(n.exit("chunkFlow")),o=0,r.interrupt=void 0,a):(n.consume(S),x)}function y(S,E){const M=r.sliceStream(S);if(E&&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 R=d.events.length;for(;R--;)if(d.events[R][1].start.offset<f&&(!d.events[R][1].end||d.events[R][1].end.offset>f))return;const D=r.events.length;let A=D,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),R=D;R<r.events.length;)r.events[R][1].end={...B},R++;_n(r.events,A+1,0,r.events.slice(D)),r.events.length=R}}function _(S){let E=s.length;for(;E-- >S;){const M=s[E];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 Xe(n,n.attempt(this.parser.constructs.document,r,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ms(n){if(n===null||ot(n)||xr(n))return 1;if(eo(n))return 2}function to(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 qu={name:"attention",resolveAll:$y,tokenize:Wy};function $y(n,r){let s=-1,o,d,v,f,a,c,h,p;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};Fm(u,-c),Fm(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,to(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?(p=2,h=Rn(h,[["enter",n[s][1],r],["exit",n[s][1],r]])):p=0,_n(n,o-1,s-o+3,h),s=o+h.length-p-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=ms(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"),p=ms(c),u=!p||p===2&&d||s.includes(c),b=!d||d===2&&p||s.includes(o);return h._open=!!(v===42?u:u&&(d||!b)),h._close=!!(v===42?b:b&&(p||!u)),r(c)}}function Fm(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 Zt(C)?(n.consume(C),f):C===64?s(C):h(C)}function f(C){return C===43||C===45||C===46||Wt(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||Wt(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||Wa(C)?s(C):(n.consume(C),c)}function h(C){return C===64?(n.consume(C),p):zy(C)?(n.consume(C),h):s(C)}function p(C){return Wt(C)?u(C):s(C)}function u(C){return C===46?(n.consume(C),o=0,p):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||Wt(C))&&o++<63){const k=C===45?b:u;return n.consume(C),k}return s(C)}}const El={partial:!0,tokenize:Xy};function Xy(n,r,s){return o;function o(v){return qe(v)?Xe(n,d,"linePrefix")(v):d(v)}function d(v){return v===null||Me(v)?r(v):s(v)}}const Xg={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)?Xe(n,v,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):v(f)}function v(f){return n.attempt(Xg,r,s)(f)}}function Jy(n){n.exit("blockQuote")}const Qg={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 Zg={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=Wt,p(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,p):(n.enter("characterReferenceValue"),v=7,f=Fu,p(u))}function p(u){if(u===59&&d){const b=n.exit("characterReferenceValue");return f===Wt&&!oh(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),p):s(u)}}const qm={partial:!0,tokenize:iS},Gm={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(R){return h(R)}function h(R){const D=o.events[o.events.length-1];return v=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,a=R,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===a?(f++,n.consume(R),p):f<3?s(R):(n.exit("codeFencedFenceSequence"),qe(R)?Xe(n,u,"whitespace")(R):u(R))}function u(R){return R===null||Me(R)?(n.exit("codeFencedFence"),o.interrupt?r(R):n.check(qm,x,E)(R)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),b(R))}function b(R){return R===null||Me(R)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),u(R)):qe(R)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Xe(n,C,"whitespace")(R)):R===96&&R===a?s(R):(n.consume(R),b)}function C(R){return R===null||Me(R)?u(R):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(R))}function k(R){return R===null||Me(R)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),u(R)):R===96&&R===a?s(R):(n.consume(R),k)}function x(R){return n.attempt(d,E,y)(R)}function y(R){return n.enter("lineEnding"),n.consume(R),n.exit("lineEnding"),_}function _(R){return v>0&&qe(R)?Xe(n,g,"linePrefix",v+1)(R):g(R)}function g(R){return R===null||Me(R)?n.check(qm,x,E)(R):(n.enter("codeFlowValue"),S(R))}function S(R){return R===null||Me(R)?(n.exit("codeFlowValue"),g(R)):(n.consume(R),S)}function E(R){return n.exit("codeFenced"),r(R)}function M(R,D,A){let L=0;return B;function B(K){return R.enter("lineEnding"),R.consume(K),R.exit("lineEnding"),I}function I(K){return R.enter("codeFencedFence"),qe(K)?Xe(R,U,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):U(K)}function U(K){return K===a?(R.enter("codeFencedFenceSequence"),F(K)):A(K)}function F(K){return K===a?(L++,R.consume(K),F):L>=f?(R.exit("codeFencedFenceSequence"),qe(K)?Xe(R,$,"whitespace")(K):$(K)):A(K)}function $(K){return K===null||Me(K)?(R.exit("codeFencedFence"),D(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 xu={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"),Xe(n,v,"linePrefix",5)(h)}function v(h){const p=o.events[o.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?f(h):s(h)}function f(h){return h===null?c(h):Me(h)?n.attempt(rS,f,c)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||Me(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):Me(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),d):Xe(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):Me(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,p(u)):Me(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||Me(u)?(n.exit("codeTextData"),c(u)):(n.consume(u),h)}function p(u){return u===96?(n.consume(u),d++,p):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&&ml(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),ml(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),ml(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);ml(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);ml(this.left,s.reverse())}}}function ml(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 Jg(n){const r={};let s=-1,o,d,v,f,a,c,h;const p=new hS(n);for(;++s<p.length;){for(;s in r;)s=r[s];if(o=p.get(s),s&&o[1].type==="chunkFlow"&&p.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(p,s)),s=r[s],h=!0);else if(o[1]._container){for(v=s,d=void 0;v--;)if(f=p.get(v),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(d&&(p.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={...p.get(d)[1].start},a=p.slice(d,s),a.unshift(o),p.splice(d,s-d+1,a))}}return _n(n,0,Number.POSITIVE_INFINITY,p.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 p,u,b=-1,C=s,k=0,x=0;const y=[x];for(;C;){for(;n.get(++d)[1]!==C;);v.push(d),C._tokenizer||(p=o.sliceStream(C),C.next||p.push(null),u&&f.defineSkip(C.start),C._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(p),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[k+c[b][0]]=k+c[b][1],k+=c[b][1]-c[b][0]-1;return h}const dS={resolve:mS,tokenize:gS},pS={partial:!0,tokenize:_S};function mS(n){return Jg(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):Me(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"),Xe(n,v,"linePrefix")}function v(f){if(f===null||Me(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 e_(n,r,s,o,d,v,f,a,c){const h=c||Number.POSITIVE_INFINITY;let p=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||Wa(_)?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||Me(_)?s(_):(n.consume(_),_===92?k:C)}function k(_){return _===60||_===62||_===92?(n.consume(_),C):C(_)}function x(_){return!p&&(_===null||_===41||ot(_))?(n.exit("chunkString"),n.exit(a),n.exit(f),n.exit(o),r(_)):p<h&&_===40?(n.consume(_),p++,x):_===41?(n.consume(_),p--,x):_===null||_===32||_===40||Wa(_)?s(_):(n.consume(_),_===92?y:x)}function y(_){return _===40||_===41||_===92?(n.consume(_),x):x(_)}}function t_(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),p}function p(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):Me(C)?(n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),u(C))}function u(C){return C===null||C===91||C===93||Me(C)||a++>999?(n.exit("chunkString"),p(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 n_(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):Me(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),Xe(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===f||b===null||Me(b)?(n.exit("chunkString"),h(b)):(n.consume(b),b===92?u:p)}function u(b){return b===f||b===92?(n.consume(b),p):p(b)}}function yl(n,r){let s;return o;function o(d){return Me(d)?(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),s=!0,o):qe(d)?Xe(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 t_.call(o,n,a,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(C)}function a(C){return d=jn(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)?yl(n,h)(C):h(C)}function h(C){return e_(n,p,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(C)}function p(C){return n.attempt(yS,u,u)(C)}function u(C){return qe(C)?Xe(n,b,"whitespace")(C):b(C)}function b(C){return C===null||Me(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)?yl(n,d)(a):s(a)}function d(a){return n_(n,v,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function v(a){return qe(a)?Xe(n,f,"whitespace")(a):f(a)}function f(a){return a===null||Me(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 Me(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(p){return n.enter("atxHeading"),v(p)}function v(p){return n.enter("atxHeadingSequence"),f(p)}function f(p){return p===35&&o++<6?(n.consume(p),f):p===null||ot(p)?(n.exit("atxHeadingSequence"),a(p)):s(p)}function a(p){return p===35?(n.enter("atxHeadingSequence"),c(p)):p===null||Me(p)?(n.exit("atxHeading"),r(p)):qe(p)?Xe(n,a,"whitespace")(p):(n.enter("atxHeadingText"),h(p))}function c(p){return p===35?(n.consume(p),c):(n.exit("atxHeadingSequence"),a(p))}function h(p){return p===null||p===35||ot(p)?(n.exit("atxHeadingText"),a(p)):(n.consume(p),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"],Vm=["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 p(N)}function p(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):Zt(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,k):Zt(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 k(N){const Z="CDATA[";return N===Z.charCodeAt(a++)?(n.consume(N),a===Z.length?o.interrupt?r:U:k):s(N)}function x(N){return Zt(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&&Vm.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||Wt(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||Zt(N)?(n.consume(N),E):qe(N)?(n.consume(N),S):B(N)}function E(N){return N===45||N===46||N===58||N===95||Wt(N)?(n.consume(N),E):M(N)}function M(N){return N===61?(n.consume(N),R):qe(N)?(n.consume(N),M):S(N)}function R(N){return N===null||N===60||N===61||N===62||N===96?s(N):N===34||N===39?(n.consume(N),c=N,D):qe(N)?(n.consume(N),R):A(N)}function D(N){return N===c?(n.consume(N),c=null,L):N===null||Me(N)?s(N):(n.consume(N),D)}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||Me(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):Me(N)&&(d===6||d===7)?(n.exit("htmlFlowData"),n.check(RS,G,F)(N)):N===null||Me(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||Me(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 Vm.includes(Z)?(n.consume(N),H):U(N)}return Zt(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||Me(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 Me(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(El,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):Zt(j)?(n.consume(j),A):s(j)}function h(j){return j===45?(n.consume(j),p):j===91?(n.consume(j),v=0,k):Zt(j)?(n.consume(j),g):s(j)}function p(j){return j===45?(n.consume(j),C):s(j)}function u(j){return j===null?s(j):j===45?(n.consume(j),b):Me(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 k(j){const H="CDATA[";return j===H.charCodeAt(v++)?(n.consume(j),v===H.length?x:k):s(j)}function x(j){return j===null?s(j):j===93?(n.consume(j),y):Me(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):Me(j)?(f=g,W(j)):(n.consume(j),g)}function S(j){return j===null?s(j):j===63?(n.consume(j),E):Me(j)?(f=S,W(j)):(n.consume(j),S)}function E(j){return j===62?V(j):S(j)}function M(j){return Zt(j)?(n.consume(j),R):s(j)}function R(j){return j===45||Wt(j)?(n.consume(j),R):D(j)}function D(j){return Me(j)?(f=D,W(j)):qe(j)?(n.consume(j),D):V(j)}function A(j){return j===45||Wt(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||Zt(j)?(n.consume(j),B):Me(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||Wt(j)?(n.consume(j),B):I(j)}function I(j){return j===61?(n.consume(j),U):Me(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):Me(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):Me(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)?Xe(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 ch={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}},p={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",p,r]]),a=Rn(a,to(r.parser.constructs.insideSpan.null,n.slice(v+o+4,f-3),r)),a=Rn(a,[["exit",p,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(jn(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,p,f?p:u)(b):b===91?n.attempt(zS,p,f?h:u)(b):f?p(b):u(b)}function h(b){return n.attempt(IS,p,u)(b)}function p(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)?yl(n,v)(u):v(u)}function v(u){return u===41?p(u):e_(n,f,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function f(u){return ot(u)?yl(n,c)(u):p(u)}function a(u){return s(u)}function c(u){return u===34||u===39||u===40?n_(n,h,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):p(u)}function h(u){return ot(u)?yl(n,p)(u):p(u)}function p(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 t_.call(o,n,v,f,"reference","referenceMarker","referenceString")(a)}function v(a){return o.parser.defined.includes(jn(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:ch.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:ch.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 Eu={name:"lineEnding",tokenize:XS};function XS(n,r){return s;function s(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Xe(n,r,"linePrefix")}}const $a={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||Me(h))?(n.exit("thematicBreak"),r(h)):s(h)}function c(h){return h===d?(n.consume(h),o++,c):(n.exit("thematicBreakSequence"),qe(h)?Xe(n,a,"whitespace")(h):a(h))}}const an={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 k=o.containerState.type||(C===42||C===43||C===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!o.containerState.marker||C===o.containerState.marker:Fu(C)){if(o.containerState.type||(o.containerState.type=k,n.enter(k,{_container:!0})),k==="listUnordered")return n.enter("listItemPrefix"),C===42||C===45?n.check($a,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 Fu(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(El,o.interrupt?s:p,n.attempt(ZS,b,u))}function p(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(El,d,v);function d(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Xe(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,Xe(n,n.attempt(an,r,s),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function nb(n,r,s){const o=this;return Xe(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 Xe(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 $m={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 p=o.events.length,u;for(;p--;)if(o.events[p][1].type!=="lineEnding"&&o.events[p][1].type!=="linePrefix"&&o.events[p][1].type!=="content"){u=o.events[p][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)?Xe(n,c,"lineSuffix")(h):c(h))}function c(h){return h===null||Me(h)?(n.exit("setextHeadingLine"),r(h)):s(h)}}const ab={tokenize:ob};function ob(n){const r=this,s=n.attempt(El,o,n.attempt(this.parser.constructs.flowInitial,d,Xe(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:r_()},ub=i_("string"),hb=i_("text");function i_(n){return{resolveAll:r_(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(p){return h(p)?v(p):a(p)}function a(p){if(p===null){s.consume(p);return}return s.enter("data"),s.consume(p),c}function c(p){return h(p)?(s.exit("data"),v(p)):(s.consume(p),c)}function h(p){if(p===null)return!0;const u=d[p];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 r_(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:an,43:an,45:an,48:an,49:an,50:an,51:an,52:an,53:an,54:an,55:an,56:an,57:an,62:Xg},pb={91:vS},mb={[-2]:xu,[-1]:xu,32:xu},gb={35:xS,42:$a,45:[$m,$a],60:TS,61:$m,95:$a,96:Gm,126:Gm},_b={38:Zg,92:Qg},vb={[-5]:Eu,[-4]:Eu,[-3]:Eu,33:$S,38:Zg,42:qu,60:[Ky,jS],91:KS,92:[CS,Qg],93:ch,95:qu,96:aS},yb={null:[qu,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:D(M),check:D(R),consume:g,enter:S,exit:E,interrupt:D(R,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:k,parser:n,previous:null,sliceSerialize:b,sliceStream:C,write:u};let p=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=to(v,h.events,h),h.events)}function b(I,U){return Eb(C(I),U)}function C(I){return xb(f,I)}function k(){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){p=p(I)}function g(I){Me(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=k(),h.events.push(["enter",F,h]),a.push(F),F}function E(I){const U=a.pop();return U.end=k(),h.events.push(["exit",U,h]),U}function M(I,U){A(I,U.from)}function R(I,U){U.restore()}function D(I,U){return F;function F($,K,V){let W,J,z,j;return Array.isArray($)?G($):"tokenize"in $?G([$]):H($);function H(ge){return Y;function Y(q){const ce=q!==null&&ge[q],te=q!==null&&ge.null,ie=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(te)?te:te?[te]:[]];return G(ie)(q)}}function G(ge){return W=ge,J=0,ge.length===0?V:N(ge[J])}function N(ge){return Y;function Y(q){return j=L(),z=ge,ge.partial||(h.currentConstruct=ge),ge.name&&h.parser.constructs.disable.null.includes(ge.name)?he():ge.tokenize.call(U?Object.assign(Object.create(h),U):h,c,Z,he)(q)}}function Z(ge){return I(z,j),K}function he(ge){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=k(),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:Kg([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(;!Jg(n););return n}const Wm=/[\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,p,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(Wm.lastIndex=u,h=Wm.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(p=Math.ceil(n/4)*4,c.push(-2);n++<p;)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 Yg(s.slice(v?2:1),v?16:10)}return oh(s)||n}const s_={}.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(It),autolinkProtocol:L,autolinkEmail:L,atxHeading:v(Ye),blockQuote:v(te),characterEscape:L,characterReference:L,codeFenced:v(ie),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:v(ie,f),codeText:v(de,f),codeTextData:L,data:L,codeFlowValue:L,definition:v(we),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:v(Ee),hardBreakEscape:v(ft),hardBreakTrailing:v(ft),htmlFlow:v(Re,f),htmlFlowData:L,htmlText:v(Re,f),htmlTextData:L,image:v(Yt),label:f,link:v(It),listItem:v(At),listItemValue:b,listOrdered:v(Nt,u),listUnordered:v(Nt),paragraph:v(Xt),reference:N,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:v(Ye),strong:v(St),thematicBreak:v(Tt)},exit:{atxHeading:c(),atxHeadingSequence:M,autolink:c(),autolinkEmail:ce,autolinkProtocol:q,blockQuote:c(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:ge,characterReference:Y,codeFenced:c(y),codeFencedFence:x,codeFencedFenceInfo:C,codeFencedFenceMeta:k,codeFlowValue:B,codeIndented:c(_),codeText:c(K),codeTextData:B,data:B,definition:c(),definitionDestinationString:E,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:D,setextHeadingText:R,strong:c(),thematicBreak:c()}};l_(r,(n||{}).mdastExtensions||[]);const s={};return o;function o(fe){let Se={type:"root",children:[]};const Ce={stack:[Se],tokenStack:[],config:r,enter:a,exit:h,buffer:f,resume:p,data:s},De=[];let Be=-1;for(;++Be<fe.length;)if(fe[Be][1].type==="listOrdered"||fe[Be][1].type==="listUnordered")if(fe[Be][0]==="enter")De.push(Be);else{const ct=De.pop();Be=d(fe,ct,Be)}for(Be=-1;++Be<fe.length;){const ct=r[fe[Be][0]];s_.call(ct,fe[Be][1].type)&&ct[fe[Be][1].type].call(Object.assign({sliceSerialize:fe[Be][2].sliceSerialize},Ce),fe[Be][1])}if(Ce.tokenStack.length>0){const ct=Ce.tokenStack[Ce.tokenStack.length-1];(ct[1]||Km).call(Ce,void 0,ct[0])}for(Se.position={start:Wi(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:Wi(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<r.transforms.length;)Se=r.transforms[Be](Se)||Se;return Se}function d(fe,Se,Ce){let De=Se-1,Be=-1,ct=!1,Oe,_t,ut,dt;for(;++De<=Ce;){const $e=fe[De];switch($e[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$e[0]==="enter"?Be++:Be--,dt=void 0;break}case"lineEndingBlank":{$e[0]==="enter"&&(Oe&&!dt&&!Be&&!ut&&(ut=De),dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:dt=void 0}if(!Be&&$e[0]==="enter"&&$e[1].type==="listItemPrefix"||Be===-1&&$e[0]==="exit"&&($e[1].type==="listUnordered"||$e[1].type==="listOrdered")){if(Oe){let Rt=De;for(_t=void 0;Rt--;){const Ht=fe[Rt];if(Ht[1].type==="lineEnding"||Ht[1].type==="lineEndingBlank"){if(Ht[0]==="exit")continue;_t&&(fe[_t][1].type="lineEndingBlank",ct=!0),Ht[1].type="lineEnding",_t=Rt}else if(!(Ht[1].type==="linePrefix"||Ht[1].type==="blockQuotePrefix"||Ht[1].type==="blockQuotePrefixWhitespace"||Ht[1].type==="blockQuoteMarker"||Ht[1].type==="listItemIndent"))break}ut&&(!_t||ut<_t)&&(Oe._spread=!0),Oe.end=Object.assign({},_t?fe[_t][1].start:$e[1].end),fe.splice(_t||De,0,["exit",Oe,$e[2]]),De++,Ce++}if($e[1].type==="listItemPrefix"){const Rt={type:"listItem",_spread:!1,start:Object.assign({},$e[1].start),end:void 0};Oe=Rt,fe.splice(De,0,["enter",Rt,$e[2]]),De++,Ce++,ut=void 0,dt=!0}}}return fe[Se][1]._spread=ct,Ce}function v(fe,Se){return Ce;function Ce(De){a.call(this,fe(De),De),Se&&Se.call(this,De)}}function f(){this.stack.push({type:"fragment",children:[]})}function a(fe,Se,Ce){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([Se,Ce||void 0]),fe.position={start:Wi(Se.start),end:void 0}}function c(fe){return Se;function Se(Ce){fe&&fe.call(this,Ce),h.call(this,Ce)}}function h(fe,Se){const Ce=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==fe.type&&(Se?Se.call(this,fe,De[0]):(De[1]||Km).call(this,fe,De[0]));else throw new Error("Cannot close `"+fe.type+"` ("+vl({start:fe.start,end:fe.end})+"): it’s not open");Ce.position.end=Wi(fe.end)}function p(){return ah(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 k(){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(),Ce=this.stack[this.stack.length-1];Ce.label=Se,Ce.identifier=jn(this.sliceSerialize(fe)).toLowerCase()}function S(){const fe=this.resume(),Se=this.stack[this.stack.length-1];Se.title=fe}function E(){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 Ce=this.sliceSerialize(fe).length;Se.depth=Ce}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function D(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 Ce=this.stack[this.stack.length-1].children;let De=Ce[Ce.length-1];(!De||De.type!=="text")&&(De=it(),De.position={start:Wi(fe.start),end:void 0},Ce.push(De)),this.stack.push(De)}function B(fe){const Se=this.stack.pop();Se.value+=this.sliceSerialize(fe),Se.position.end=Wi(fe.end)}function I(fe){const Se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=Se.children[Se.children.length-1];Ce.position.end=Wi(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),Ce=this.stack[this.stack.length-2];Ce.label=Db(Se),Ce.identifier=jn(Se).toLowerCase()}function z(){const fe=this.stack[this.stack.length-1],Se=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const De=fe.children;Ce.children=De}else Ce.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(),Ce=this.stack[this.stack.length-1];Ce.label=Se,Ce.identifier=jn(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function he(fe){this.data.characterReferenceType=fe.type}function ge(fe){const Se=this.sliceSerialize(fe),Ce=this.data.characterReferenceType;let De;Ce?(De=Yg(Se,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=oh(Se);const Be=this.stack[this.stack.length-1];Be.value+=De}function Y(fe){const Se=this.stack.pop();Se.position.end=Wi(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 ie(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function we(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ee(){return{type:"emphasis",children:[]}}function Ye(){return{type:"heading",depth:0,children:[]}}function ft(){return{type:"break"}}function Re(){return{type:"html",value:""}}function Yt(){return{type:"image",title:null,url:"",alt:null}}function It(){return{type:"link",title:null,url:"",children:[]}}function Nt(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function At(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function Xt(){return{type:"paragraph",children:[]}}function St(){return{type:"strong",children:[]}}function it(){return{type:"text",value:""}}function Tt(){return{type:"thematicBreak"}}}function Wi(n){return{line:n.line,column:n.column,offset:n.offset}}function l_(n,r){let s=-1;for(;++s<r.length;){const o=r[s];Array.isArray(o)?l_(n,o):Bb(n,o)}}function Bb(n,r){let s;for(s in r)if(s_.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 Km(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+vl({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+vl({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+vl({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=vs(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 a_(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 a_(n,r);const d={src:vs(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:vs(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 a_(n,r);const d={href:vs(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:vs(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):o_(r),v={},f=[];if(typeof r.checked=="boolean"){const p=o[0];let u;p&&p.type==="element"&&p.tagName==="p"?u=p:(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 p=o[a];(d||a!==0||p.type!=="element"||p.tagName!=="p")&&f.push({type:"text",value:`
67
+ `}),p.type==="element"&&p.tagName==="p"&&!d?f.push(...p.children):f.push(p)}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=o_(s[o])}return r}function o_(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=ih(r.children[1]),c=Pg(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 k={type:"element",tagName:v,properties:b,children:[]};u&&(k.children=n.all(u),n.patch(u,k),k=n.applyData(u,k)),h.push(k)}const p={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(r,p),n.applyData(r,p)}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 Ym=9,Xm=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(Qm(r.slice(d,o.index),d>0,!0),o[0]),d=o.index+o[0].length,o=s.exec(r);return v.push(Qm(r.slice(d),d>0,!1)),v.join("")}function Qm(n,r,s){let o=0,d=n.length;if(r){let v=n.codePointAt(o);for(;v===Ym||v===Xm;)o++,v=n.codePointAt(o)}if(s){let v=n.codePointAt(d-1);for(;v===Ym||v===Xm;)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:Ua,yaml:Ua,definition:Ua,footnoteDefinition:Ua};function Ua(){}const c_=-1,no=0,Sl=1,Ka=2,uh=3,hh=4,fh=5,dh=6,u_=7,h_=8,oC=typeof self=="object"?self:globalThis,Zm=(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 no:case c_:return s(f,d);case Sl:{const a=s([],d);for(const c of f)a.push(o(c));return a}case Ka:{const a=s({},d);for(const[c,h]of f)a[o(c)]=o(h);return a}case uh:return s(new Date(f),d);case hh:{const{source:a,flags:c}=f;return s(new RegExp(a,c),d)}case fh:{const a=s(new Map,d);for(const[c,h]of f)a.set(o(c),o(h));return a}case dh:{const a=s(new Set,d);for(const c of f)a.add(o(c));return a}case u_:{const{name:a,message:c}=f;return s(Zm(a,c),d)}case h_: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(Zm(v,f),d)};return o},Jm=n=>cC(new Map,n)(0),hs="",{toString:uC}={},{keys:hC}=Object,gl=n=>{const r=typeof n;if(r!=="object"||!n)return[no,r];const s=uC.call(n).slice(8,-1);switch(s){case"Array":return[Sl,hs];case"Object":return[Ka,hs];case"Date":return[uh,hs];case"RegExp":return[hh,hs];case"Map":return[fh,hs];case"Set":return[dh,hs];case"DataView":return[Sl,s]}return s.includes("Array")?[Sl,s]:s.includes("Error")?[u_,s]:[Ka,s]},Pa=([n,r])=>n===no&&(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]=gl(f);switch(a){case no:{let p=f;switch(c){case"bigint":a=h_,p=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+c);p=null;break;case"undefined":return d([c_],f)}return d([a,p],f)}case Sl:{if(c){let b=f;return c==="DataView"?b=new Uint8Array(f.buffer):c==="ArrayBuffer"&&(b=new Uint8Array(f)),d([c,[...b]],f)}const p=[],u=d([a,p],f);for(const b of f)p.push(v(b));return u}case Ka:{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 p=[],u=d([a,p],f);for(const b of hC(f))(n||!Pa(gl(f[b])))&&p.push([v(b),v(f[b])]);return u}case uh:return d([a,f.toISOString()],f);case hh:{const{source:p,flags:u}=f;return d([a,{source:p,flags:u}],f)}case fh:{const p=[],u=d([a,p],f);for(const[b,C]of f)(n||!(Pa(gl(b))||Pa(gl(C))))&&p.push([v(b),v(C)]);return u}case dh:{const p=[],u=d([a,p],f);for(const b of f)(n||!Pa(gl(b)))&&p.push(v(b));return u}}const{message:h}=f;return d([a,{name:c,message:h}],f)};return v},eg=(n,{json:r,lossy:s}={})=>{const o=[];return fC(!(r||s),!!r,new Map,o)(n),o},Ya=typeof structuredClone=="function"?(n,r)=>r&&("json"in r||"lossy"in r)?Jm(eg(n,r)):structuredClone(n):(n,r)=>Jm(eg(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 p=n.all(h),u=String(h.identifier).toUpperCase(),b=vs(u.toLowerCase());let C=0;const k=[],x=n.footnoteCounts.get(u);for(;x!==void 0&&++C<=x;){k.length>0&&k.push({type:"text",value:" "});let g=typeof s=="string"?s:s(c,C);typeof g=="string"&&(g={type:"text",value:g}),k.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=p[p.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(...k)}else p.push(...k);const _={type:"element",tagName:"li",properties:{id:r+"fn-"+b},children:n.wrap(p,!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:{...Ya(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 io=(function(n){if(n==null)return yC;if(typeof n=="function")return ro(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]=io(n[s]);return ro(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 ro(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 ro(r);function r(s){return s&&s.type===n}}function ro(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 f_=[],bC=!0,Gu=!1,CC="skip";function d_(n,r,s,o){let d;typeof r=="function"&&typeof s!="function"?(o=s,s=r):d=r;const v=io(d),f=o?-1:1;a(n,void 0,[])();function a(c,h,p){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=f_,k,x,y;if((!r||v(c,h,p[p.length-1]||void 0))&&(C=wC(s(c,p)),C[0]===Gu))return C;if("children"in c&&c.children){const _=c;if(_.children&&C[0]!==CC)for(x=(o?_.children.length:-1)+f,y=p.concat(_);x>-1&&x<_.children.length;){const g=_.children[x];if(k=a(g,x,y)(),k[0]===Gu)return k;x=typeof k[1]=="number"?k[1]:x+f}}return C}}}function wC(n){return Array.isArray(n)?n:typeof n=="number"?[bC,n]:n==null?f_:[n]}function ph(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),d_(n,v,a,d);function a(c,h){const p=h[h.length-1],u=p?p.children.indexOf(c):void 0;return f(c,u,p)}}const Vu={}.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 ph(n,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const u=p.type==="definition"?o:d,b=String(p.identifier).toUpperCase();u.has(b)||u.set(b,p)}}),a;function c(p,u){const b=p.type,C=a.handlers[b];if(Vu.call(a.handlers,b)&&C)return C(a,p,u);if(a.options.passThrough&&a.options.passThrough.includes(b)){if("children"in p){const{children:x,...y}=p,_=Ya(y);return _.children=a.all(p),_}return Ya(p)}return(a.options.unknownHandler||TC)(a,p,u)}function h(p){const u=[];if("children"in p){const b=p.children;let C=-1;for(;++C<b.length;){const k=a.one(b[C],p);if(k){if(C&&b[C-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=tg(k.value)),!Array.isArray(k)&&k.type==="element")){const x=k.children[0];x&&x.type==="text"&&(x.value=tg(x.value))}Array.isArray(k)?u.push(...k):u.push(k)}}}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,Ya(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&&!(Vu.call(s,"hProperties")||Vu.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 tg(n){let r=0,s=n.charCodeAt(r);for(;s===9||s===32;)r++,s=n.charCodeAt(r);return n.slice(r)}function ng(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=ng(s,{file:o,...r});await n.run(d,o)}:function(s,o){return ng(s,{file:o,...n||r})}}function ig(n){if(n)throw n}var ku,rg;function MC(){if(rg)return ku;rg=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 p=n.call(h,"constructor"),u=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!u)return!1;var b;for(b in h);return typeof b>"u"||n.call(h,b)},f=function(h,p){s&&p.name==="__proto__"?s(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},a=function(h,p){if(p==="__proto__")if(n.call(h,p)){if(o)return o(h,p).value}else return;return h[p]};return ku=function c(){var h,p,u,b,C,k,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(p in h)u=a(x,p),b=a(h,p),x!==b&&(g&&b&&(v(b)||(C=d(b)))?(C?(C=!1,k=u&&d(u)?u:[]):k=u&&v(u)?u:{},f(x,{name:p,newValue:c(g,k,b)})):typeof b<"u"&&f(x,{name:p,newValue:b}));return x},ku}var LC=MC();const Au=Eg(LC);function $u(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 p=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,p?BC(p,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 p=h;if(a&&s)throw p;return d(p)}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');kl(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(kl(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){kl(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;)kl(n[r]),n[r]&&(s=s===void 0?n[r]:s+"/"+n[r]);return s===void 0?".":IC(s)}function IC(n){kl(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 kl(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 Wu(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(!Wu(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 Tu=["history","path","basename","stem","extname","dirname"];class p_{constructor(r){let s;r?Wu(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<Tu.length;){const v=Tu[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)Tu.includes(d)||(this[d]=s[d])}get basename(){return typeof this.path=="string"?qn.basename(this.path):void 0}set basename(r){Du(r,"basename"),Ru(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){sg(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(Ru(r,"extname"),sg(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){Wu(r)&&(r=qC(r)),Du(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){Du(r,"stem"),Ru(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 Kt(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 Ru(n,r){if(n&&n.includes(qn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+qn.sep+"`")}function Du(n,r){if(!n)throw new Error("`"+r+"` cannot be empty")}function sg(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 mh 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 mh;let s=-1;for(;++s<this.attachers.length;){const o=this.attachers[s];r.use(...o)}return r.data(Au(!0,{},this.namespace)),r}data(r,s){return typeof r=="string"?arguments.length===2?(Ou("data",this.frozen),this.namespace[r]=s,this):WC.call(this.namespace,r)&&this.namespace[r]||void 0:r?(Ou("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=Fa(r),o=this.parser||this.Parser;return Mu("parse",o),o(String(s),s)}process(r,s){const o=this;return this.freeze(),Mu("process",this.parser||this.Parser),Lu("process",this.compiler||this.Compiler),s?d(void 0,s):new Promise(d);function d(v,f){const a=Fa(r),c=o.parse(a);o.run(c,a,function(p,u,b){if(p||!u||!b)return h(p);const C=u,k=o.stringify(C,b);XC(k)?b.value=k:b.result=k,h(p,b)});function h(p,u){p||!u?f(p):v?v(u):s(void 0,u)}}}processSync(r){let s=!1,o;return this.freeze(),Mu("processSync",this.parser||this.Parser),Lu("processSync",this.compiler||this.Compiler),this.process(r,d),ag("processSync","process",s),o;function d(v,f){s=!0,ig(v),o=f}}run(r,s,o){lg(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=Fa(s);d.run(r,c,h);function h(p,u,b){const C=u||r;p?a(p):f?f(C):o(void 0,C,b)}}}runSync(r,s){let o=!1,d;return this.run(r,s,v),ag("runSync","run",o),d;function v(f,a){ig(f),d=a,o=!0}}stringify(r,s){this.freeze();const o=Fa(s),d=this.compiler||this.Compiler;return Lu("stringify",d),lg(r),d(r,o)}use(r,...s){const o=this.attachers,d=this.namespace;if(Ou("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[p,...u]=h;c(p,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=Au(!0,d.settings,h.settings))}function a(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const u=h[p];v(u)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function c(h,p){let u=-1,b=-1;for(;++u<o.length;)if(o[u][0]===h){b=u;break}if(b===-1)o.push([h,...p]);else if(p.length>0){let[C,...k]=p;const x=o[b][1];$u(x)&&$u(C)&&(C=Au(!0,x,C)),o[b]=[h,C,...k]}}}}const KC=new mh().freeze();function Mu(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Lu(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function Ou(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 lg(n){if(!$u(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function ag(n,r,s){if(!s)throw new Error("`"+n+"` finished async. Use `"+r+"` instead")}function Fa(n){return YC(n)?n:new p_(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",og=[],cg={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 m_(n){const r=tw(n),s=nw(n);return iw(r.runSync(r.parse(s),s),n)}function tw(n){const r=n.rehypePlugins||og,s=n.remarkPlugins||og,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...cg}:cg;return KC().use(jb).use(s).use(DC,o).use(r)}function nw(n){const r=n.children||"",s=new p_;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 p of ew)Object.hasOwn(r,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+ZC+p.id,void 0);return ph(n,h),vy(n,{Fragment:T.Fragment,components:d,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function h(p,u,b){if(p.type==="raw"&&b&&typeof u=="number")return f?b.children.splice(u,1):b.children[u]={type:"text",value:p.value},u;if(p.type==="element"){let C;for(C in wu)if(Object.hasOwn(wu,C)&&Object.hasOwn(p.properties,C)){const k=p.properties[C],x=wu[C];(x===null||x.includes(p.tagName))&&(p.properties[C]=c(String(k||""),C,p))}}if(p.type==="element"){let C=s?!s.includes(p.tagName):v?v.includes(p.tagName):!1;if(!C&&o&&typeof u=="number"&&(C=!o(p,u,b)),C&&b&&typeof u=="number")return a&&p.children?b.children.splice(u,1,...p.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 ug(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=io((s||{}).ignore||[]),v=aw(r);let f=-1;for(;++f<v.length;)d_(n,"text",a);function a(h,p){let u=-1,b;for(;++u<p.length;){const C=p[u],k=b?b.children:void 0;if(d(C,k?k.indexOf(C):void 0,b))return;b=C}if(b)return c(h,p)}function c(h,p){const u=p[p.length-1],b=v[f][0],C=v[f][1];let k=0;const y=u.children.indexOf(h);let _=!1,g=[];b.lastIndex=0;let S=b.exec(h.value);for(;S;){const E=S.index,M={index:S.index,input:S.input,stack:[...p,h]};let R=C(...S,M);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?b.lastIndex=E+1:(k!==E&&g.push({type:"text",value:h.value.slice(k,E)}),Array.isArray(R)?g.push(...R):R&&g.push(R),k=E+S[0].length,_=!0),!b.global)break;S=b.exec(h.value)}return _?(k<h.value.length&&g.push({type:"text",value:h.value.slice(k)}),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 Bu="phrasing",ju=["autolink","link","image","label"];function uw(){return{transforms:[_w],enter:{literalAutolink:fw,literalAutolinkEmail:Nu,literalAutolinkHttp:Nu,literalAutolinkWww:Nu},exit:{literalAutolink:gw,literalAutolinkEmail:mw,literalAutolinkHttp:dw,literalAutolinkWww:pw}}}function hw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Bu,notInConstruct:ju},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Bu,notInConstruct:ju},{character:":",before:"[ps]",after:"\\/",inConstruct:Bu,notInConstruct:ju}]}}function fw(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function Nu(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(!g_(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!g_(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=ug(n,"(");let v=ug(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 g_(n,r){const s=n.input.charCodeAt(n.index-1);return(n.index===0||xr(s)||eo(s))&&(!r||s!==47)}__.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=jn(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=jn(this.sliceSerialize(n)).toLowerCase(),s.label=r}function Rw(n){this.exit(n)}function Dw(){return"["}function __(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:__},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"),p=v.enter("label");return c+=a.move(v.safe(v.associationId(o),{before:c,after:"]"})),p(),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?v_:Ow))),h(),c}}function Ow(n,r,s){return r===0?n:v_(n,r,s)}function v_(n,r,s){return(s?"":" ")+n}const Bw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];y_.peek=Iw;function jw(){return{canContainEols:["delete"],enter:{strikethrough:Hw},exit:{strikethrough:zw}}}function Nw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Bw}],handlers:{delete:y_}}}function Hw(n){this.enter({type:"delete",children:[]},n)}function zw(n){this.exit(n)}function y_(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,p=-1;for(;++p<n.length;){const x=[],y=[];let _=-1;for(n[p].length>h&&(h=n[p].length);++_<n[p].length;){const g=Fw(n[p][_]);if(s.alignDelimiters!==!1){const S=d(g);y[_]=S,(c[_]===void 0||S>c[_])&&(c[_]=S)}x.push(g)}f[p]=x,a[p]=y}let u=-1;if(typeof o=="object"&&"length"in o)for(;++u<h;)v[u]=hg(o[u]);else{const x=hg(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),p=-1;const k=[];for(;++p<f.length;){const x=f[p],y=a[p];u=-1;const _=[];for(;++u<h;){const g=x[u]||"";let S="",E="";if(s.alignDelimiters!==!1){const M=c[u]-(y[u]||0),R=v[u];R===114?S=" ".repeat(M):R===99?M%2?(S=" ".repeat(M/2+.5),E=" ".repeat(M/2-.5)):(S=" ".repeat(M/2),E=S):E=" ".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(E),s.padding!==!1&&_.push(" "),(s.delimiterEnd!==!1||u!==h-1)&&_.push("|")}k.push(s.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return k.join(`
76
+ `)}function Fw(n){return n==null?"":String(n)}function hg(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 fg(n,r.inConstruct,!0)&&!fg(n,r.notInConstruct,!1)}function fg(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 dg(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 p=a.move(c);if(n.lang){const u=s.enter(`codeFencedLang${f}`);p+=a.move(s.safe(n.lang,{before:p,after:" ",encode:["`"],...a.current()})),u()}if(n.lang&&n.meta){const u=s.enter(`codeFencedMeta${f}`);p+=a.move(" "),p+=a.move(s.safe(n.meta,{before:p,after:`
79
+ `,encode:["`"],...a.current()})),u()}return p+=a.move(`
80
+ `),v&&(p+=a.move(v+`
81
+ `)),p+=a.move(c),h(),p}function Xw(n,r,s){return(s?"":" ")+n}function gh(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=gh(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 wl(n){return"&#x"+n.toString(16).toUpperCase()+";"}function Xa(n,r,s){const o=ms(n),d=ms(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}}S_.peek=Jw;function S_(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),p=Xa(o.before.charCodeAt(o.before.length-1),h,d);p.inside&&(c=wl(h)+c.slice(1));const u=c.charCodeAt(c.length-1),b=Xa(o.after.charCodeAt(0),u,d);b.inside&&(c=c.slice(0,-1)+wl(u));const C=f.move(d);return v(),s.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},a+c+C}function Jw(n,r,s){return s.options.emphasis||"*"}function ex(n,r){let s=!1;return ph(n,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return s=!0,Gu}),!!((!n.depth||n.depth<3)&&ah(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 p=s.enter("headingSetext"),u=s.enter("phrasing"),b=s.containerPhrasing(n,{...v.current(),before:`
83
+ `,after:`
84
+ `});return u(),p(),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=wl(h.charCodeAt(0))+h.slice(1)),h=h?f+" "+h:f,s.options.closeAtx&&(h+=" "+f),c(),a(),h}b_.peek=nx;function b_(n){return n.value||""}function nx(){return"<"}C_.peek=ix;function C_(n,r,s,o){const d=gh(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"!"}w_.peek=rx;function w_(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 p=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...a.current()});return f(),s.stack=p,v(),d==="full"||!h||h!==u?c+=a.move(u+"]"):d==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function rx(){return"!"}x_.peek=sx;function x_(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 E_(n,r){const s=ah(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))}k_.peek=lx;function k_(n,r,s,o){const d=gh(s),v=d==='"'?"Quote":"Apostrophe",f=s.createTracker(o);let a,c;if(E_(n,s)){const p=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=p,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 E_(n,s)?"<":"["}A_.peek=ax;function A_(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 p=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...a.current()});return f(),s.stack=p,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 _h(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=_h(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 T_(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):_h(s);const a=n.ordered?f==="."?")":".":ox(s);let c=r&&s.bulletLastUsed?f===s.bulletLastUsed:!1;if(!n.ordered){const p=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&p&&(!p.children||!p.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),T_(s)===f&&p){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||_h(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()),p);return c(),h;function p(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=io(["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}R_.peek=_x;function R_(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),p=Xa(o.before.charCodeAt(o.before.length-1),h,d);p.inside&&(c=wl(h)+c.slice(1));const u=c.charCodeAt(c.length-1),b=Xa(o.after.charCodeAt(0),u,d);b.inside&&(c=c.slice(0,-1)+wl(u));const C=f.move(d+d);return v(),s.attentionEncodeSurroundingInfo={after:b.outside,before:p.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=(T_(s)+(s.options.ruleSpaces?" ":"")).repeat(yx(s));return s.options.ruleSpaces?o.slice(0,-1):o}const D_={blockquote:qw,break:dg,code:Yw,definition:Qw,emphasis:S_,hardBreak:dg,heading:tx,html:b_,image:C_,imageReference:w_,inlineCode:x_,link:k_,linkReference:A_,list:ux,listItem:fx,paragraph:dx,root:mx,strong:R_,text:vx,thematicBreak:Sx};function bx(){return{enter:{table:Cx,tableData:pg,tableHeader:pg,tableRow:xx},exit:{codeText:Ex,table:wx,tableData:Hu,tableHeader:Hu,tableRow:Hu}}}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 Hu(n){this.exit(n)}function pg(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,k,x,y){return h(p(C,x,y),C.align)}function a(C,k,x,y){const _=u(C,x,y),g=h([_]);return g.slice(0,g.indexOf(`
89
+ `))}function c(C,k,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,k){return Pw(C,{align:k,alignDelimiters:o,padding:s,stringLength:d})}function p(C,k,x){const y=C.children;let _=-1;const g=[],S=k.enter("table");for(;++_<y.length;)g[_]=u(y[_],k,x);return S(),g}function u(C,k,x){const y=C.children;let _=-1;const g=[],S=k.enter("tableRow");for(;++_<y.length;)g[_]=c(y[_],C,k,x);return S(),g}function b(C,k,x){let y=D_.inlineCode(C,k,x);return x.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function Tx(){return{exit:{taskListCheckValueChecked:mg,taskListCheckValueUnchecked:mg,paragraph:Dx}}}function Rx(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Mx}}}function mg(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=D_.listItem(n,r,s,{...o,...a.current()});return v&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),c;function h(p){return p+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},M_={tokenize:Px,partial:!0},L_={tokenize:Fx,partial:!0},O_={tokenize:qx,partial:!0},jx={tokenize:Gx,partial:!0},B_={name:"wwwAutolink",tokenize:zx,previous:N_},j_={name:"protocolAutolink",tokenize:Ix,previous:H_},di={name:"emailAutolink",tokenize:Hx,previous:z_},Gn={};function Nx(){return{text:Gn}}let wr=48;for(;wr<123;)Gn[wr]=di,wr++,wr===58?wr=65:wr===91&&(wr=97);Gn[43]=di;Gn[45]=di;Gn[46]=di;Gn[95]=di;Gn[72]=[di,j_];Gn[104]=[di,j_];Gn[87]=[di,B_];Gn[119]=[di,B_];function Hx(n,r,s){const o=this;let d,v;return f;function f(u){return!Ku(u)||!z_.call(o,o.previous)||vh(o.events)?s(u):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(u))}function a(u){return Ku(u)?(n.consume(u),a):u===64?(n.consume(u),c):s(u)}function c(u){return u===46?n.check(jx,p,h)(u):u===45||u===95||Wt(u)?(v=!0,n.consume(u),c):p(u)}function h(u){return n.consume(u),d=!0,c}function p(u){return v&&d&&Zt(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||!N_.call(o,o.previous)||vh(o.events)?s(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(Bx,n.attempt(M_,n.attempt(L_,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)&&H_.call(o,o.previous)&&!vh(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),d+=String.fromCodePoint(u),n.consume(u),a):s(u)}function a(u){if(Zt(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||Wa(u)||ot(u)||xr(u)||eo(u)?s(u):n.attempt(M_,n.attempt(L_,p),s)(u)}function p(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(O_,c,a)(h):h===null||ot(h)||xr(h)||h!==45&&eo(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(O_,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 Zt(a)?f(a):s(a)}function f(a){return a===59?(n.consume(a),o):Zt(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 Wt(v)?s(v):r(v)}}function N_(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||ot(n)}function H_(n){return!Zt(n)}function z_(n){return!(n===47||Ku(n))}function Ku(n){return n===43||n===45||n===46||n===95||Wt(n)}function vh(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=jn(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(jn(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?p:h}function p(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(k){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",p):s(k)}function p(k){if(f>999||k===93&&!a||k===null||k===91||ot(k))return s(k);if(k===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return v=jn(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),b}return ot(k)||(a=!0),f++,n.consume(k),k===92?u:p}function u(k){return k===91||k===92||k===93?(n.consume(k),f++,p):p(k)}function b(k){return k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),d.includes(v)||d.push(v),Xe(n,C,"gfmFootnoteDefinitionWhitespace")):s(k)}function C(k){return r(k)}}function Qx(n,r,s){return n.check(El,r,n.attempt(Vx,r,s))}function Zx(n){n.exit("gfmFootnoteDefinition")}function Jx(n,r,s){const o=this;return Xe(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 p={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",p,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,to(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",p,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,p=this.events;let u=0;return b;function b(k){return h===126&&p[p.length-1][1].type!=="characterEscape"?c(k):(f.enter("strikethroughSequenceTemporary"),C(k))}function C(k){const x=ms(h);if(k===126)return u>1?c(k):(f.consume(k),u++,C);if(u<2&&!s)return c(k);const y=f.exit("strikethroughSequenceTemporary"),_=ms(k);return y._open=!_||_===2&&!!x,y._close=!x||x===2&&!!_,a(k)}}}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"?R:c;return F===R&&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),p(B)}function p(B){return B===null?s(B):Me(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)?Xe(n,p,"whitespace")(B):(v+=1,f&&(f=!1,d+=1),B===124?(n.enter("tableCellDivider"),n.consume(B),n.exit("tableCellDivider"),f=!0,p):(n.enter("data"),u(B)))}function u(B){return B===null||B===124||ot(B)?(n.exit("data"),p(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)?Xe(n,k,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):k(B))}function k(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)?Xe(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||Me(B)?E(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)?Xe(n,E,"whitespace")(B):E(B)}function E(B){return B===124?k(B):B===null||Me(B)?!f||d!==v?M(B):(n.exit("tableDelimiterRow"),n.exit("tableHead"),r(B)):M(B)}function M(B){return s(B)}function R(B){return n.enter("tableRow"),D(B)}function D(B){return B===124?(n.enter("tableCellDivider"),n.consume(B),n.exit("tableCellDivider"),D):B===null||Me(B)?(n.exit("tableRow"),r(B)):qe(B)?Xe(n,D,"whitespace")(B):(n.enter("data"),A(B))}function A(B){return B===null||B===124||ot(B)?(n.exit("data"),D(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,p,u;const b=new tE;for(;++s<n.length;){const C=n[s],k=C[1];C[0]==="enter"?k.type==="tableHead"?(a=!1,c!==0&&(gg(b,r,c,h,p),p=void 0,c=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(s,0,[["enter",h,r]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(o=!0,u=void 0,v=[0,0,0,0],f=[0,s+1,0,0],a&&(a=!1,p={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(s,0,[["enter",p,r]])),d=k.type==="tableDelimiterRow"?2:p?3:1):d&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.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)):k.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])):k.type==="tableHead"?(a=!0,c=s):k.type==="tableRow"||k.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&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(f[3]=s)}for(c!==0&&gg(b,r,c,h,p),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({},fs(r.events,s[0])),n.add(s[0],0,[["exit",v,r]]));const c=fs(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=fs(r.events,s[2]),p=fs(r.events,s[3]),u={type:a,start:Object.assign({},h),end:Object.assign({},p)};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 k=s[2]+1,x=s[3]-s[2]-1;n.add(k,x,[])}}n.add(s[3]+1,0,[["exit",u,r]])}return d!==void 0&&(v.end=Object.assign({},fs(r.events,d)),n.add(d,0,[["exit",v,r]]),v=void 0),v}function gg(n,r,s,o,d){const v=[],f=fs(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 fs(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 Me(c)?r(c):qe(c)?n.check({tokenize:uE},r,s)(c):s(c)}}function uE(n,r,s){return Xe(n,o,"whitespace");function o(d){return d===null?s(d):r(d)}}function hE(n){return Kg([Nx(),$x(),eE(n),rE(),oE()])}const fE={};function I_(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,Qa=`
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([]),[p,u]=re.useState(""),[b,C]=re.useState(!1),[k,x]=re.useState("ready"),[y,_]=re.useState(""),[g,S]=re.useState(Date.now()),[E,M]=re.useState(!1),[R,D]=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([]),D(""),x("ready"),_(""),I.current=1;let N=!1,Z;const he=()=>{N||(Z=window.setTimeout(ge,B.current?200:1e3))},ge=async()=>{if(!N)try{const Y=await ye.pollTranslationSession(v,I.current);if(N)return;K(Y.events),I.current=Y.nextCursor,x(Y.status),B.current&&_(RE(new Date().toISOString()))}catch(Y){N||D(Y instanceof Error?Y.message:"Translation poll failed.")}finally{he()}};return ye.startTranslationSession(o,d).then(Y=>{N||(x(Y.status),I.current=Y.nextCursor,ge())}).catch(Y=>{N||D(Y instanceof Error?Y.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=p;M(!0),D(""),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(U_(Z,he.englishPreview)),C(!0))}catch(he){D(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"?D(he.message):he.type==="failures"&&h(he.failures);const Z=N.filter(he=>he.type==="entry");Z.length>0&&(a(he=>{const ge=Z.reduce((q,ce)=>AE(q,ce.entry),he),Y=wE(ge);return Y.removedIds.size>0&&h(q=>q.filter(ce=>!Y.removedIds.has(ce.translationId))),Y.entries}),L(he=>he+1))}async function V(){const N=b?vg(p):p;if(N.trim()){M(!0),D("");try{await ye.sendTranslatedInput(o,d,{englishText:N}),u(""),C(!1)}catch(Z){D(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(),!E&&p.trim()&&(b?V():$(r)))}async function J(){a([]),h([]),I.current=1,await ye.clearTranslationSession(v).catch(N=>D(N.message))}async function z(){M(!0),D("");try{const N=await ye.ignoreTranslationFailures(v);h(N.failures)}catch(N){D(N instanceof Error?N.message:"Failed to ignore translation failures.")}finally{M(!1)}}async function j(){M(!0),D("");try{const N=await ye.retryTranslationFailures(v);h(N.failures)}catch(N){D(N instanceof Error?N.message:"Failed to retry translation failures.")}finally{M(!1)}}const H=CE(f,k,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:E,onClick:()=>void z(),children:["Ignore ",G]}),T.jsxs("button",{type:"button",disabled:E,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 -"})]})]}),R?T.jsx("div",{className:"error-banner",children:R}):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:p,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:E||!b||!vg(p).trim(),onClick:()=>void V(),children:"Send English"})})]})})]})}function mE(n){var r;return((r=Dg.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),[p,u]=re.useState(""),[b,C]=re.useState(""),[k,x]=re.useState(""),[y,_]=re.useState(!1),[g,S]=re.useState(null),[E,M]=re.useState(""),[R,D]=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,p]);async function U(W=!1){try{const J=await ye.getTranslationState();h(J);const z=p?J.fileIndex.jobs.some(j=>j.id===p):!1;if((!p||!z)&&J.fileIndex.jobs[0])F(J.fileIndex.jobs[0].id);else if(!J.fileIndex.jobs[0])u(""),C(""),x("");else if(W&&p){const j=await ye.readFileTranslation(p);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(E,R)}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),D(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:p,output:b,report:k,onClose:()=>{_(!1),o()},onRefresh:()=>void U(),onSelectJob:W=>void F(W),onTranslate:()=>void $()})}),y?T.jsx(_E,{busy:d||B,state:g,currentPath:E,query:R,selectedPath:A,onBrowse:(W,J)=>void K(W,J),onClose:()=>_(!1),onQueryChange:D,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 p=(r==null?void 0:r.entries)??[],u=p.filter(C=>C.type==="directory"),b=p.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&&p.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(_g,{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(_g,{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 _g({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 p=(s==null?void 0:s.fileIndex.jobs)??[],u=p.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:[p.length===0?T.jsx("p",{className:"muted",children:"No translated files yet."}):null,p.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(m_,{remarkPlugins:[I_],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(m_,{remarkPlugins:[I_],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(yh);return(r==null?void 0:r.translationStartedAt)??(r==null?void 0:r.createdAt)}function CE(n,r,s){const o=n.find(yh);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 yh(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;yh(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"?U_(n.sourceText,n.translatedText):n.translatedText:n.translatedText||n.sourceText}function U_(n,r){return`${n.trimEnd()}${Qa}${r.trimStart()}`}function kE(n){return n.includes(Qa)}function vg(n){const r=n.indexOf(Qa);return r===-1?n:n.slice(r+Qa.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=ps.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:p,onStopBootstrap:u,onRunBootstrap:b}){const[C,k]=re.useState(!1),[x,y]=re.useState("default"),[_,g]=re.useState("default"),[S,E]=re.useState("default"),M=r==null?void 0:r.session,R=(r==null?void 0:r.status)==="running",D=(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&&E(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(fi,{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:()=>{k(!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(fi,{status:M.status}):null,T.jsx("button",{type:"button",onClick:()=>k(!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||R||D,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||R||D,onChange:B=>g(B.target.value),children:Lg.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||R||D,onChange:B=>E(B.target.value),children:Og.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||R||!(r!=null&&r.canStart),onClick:()=>void h(L),children:"Start"}),T.jsx("button",{type:"button",disabled:d||R||!(r!=null&&r.canStart),onClick:()=>void p(L),children:"Restart"}),T.jsx("button",{type:"button",disabled:d||!M,onClick:()=>void u(),children:"Stop"}),T.jsx("button",{type:"button",disabled:d||R||!D,onClick:()=>void b(),children:"Run bootstrap"})]})]}),T.jsx("div",{className:"harness-bootstrap-terminal",children:D?T.jsx(Ja,{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 Sh(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),p=Sh(n),u=(r==null?void 0:r.mode)??"auto",b=HE(n,o);async function C(k){await PE(k.body),h(k.id),window.setTimeout(()=>h(x=>x===k.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:[p.total," total / ",p.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:k=>f(k.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:k,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:Za(k),children:IE(Za(k))}),T.jsxs("strong",{children:[k.fromRole," ","->"," ",k.toRole]}),T.jsx("span",{children:k.type})]}),T.jsx("p",{children:k.body}),k.failureReason?T.jsx("span",{className:"message-reason",children:k.failureReason}):null,k.bodyPath?T.jsx("span",{className:"message-path",children:k.bodyPath}):null]}),T.jsx("div",{className:"message-actions",children:T.jsx("button",{type:"button",disabled:s,onClick:()=>void C(k),children:c===k.id?"Copied":"Copy"})})]},k.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 Za(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function UE(n,r){const s=Za(n).localeCompare(Za(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(fi,{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:p,translationTargetLanguage:u,translationOutputMode:b,translatorSession:C,harnessStatus:k,harnessBootstrapStatus:x,harnessApplyResult:y,gatewayStatus:_,gatewayQrLogin:g,gatewayQrCheck:S,busy:E,onConnect:M,onRefreshConnectedRepository:R,onPullConnectedRepository:D,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:ge,onOpenTranslatorSession:Y,onCreateTranslationBootstrap:q,onUpdateTranslationMemory:ce,onCreateTask:te,onSelectTask:ie,themeMode:de,onThemeModeChange:we,flowPauseAlerts:Ee,onFlowPauseAlertsChange:Ye,permissionRequestMode:ft,onPermissionRequestModeChange:Re,launchTemplate:Yt,canSaveLaunchTemplate:It,canOneClickStart:Nt,onSaveLaunchTemplate:At,onOneClickStart:Xt,onTryFlowPauseAlert:St,onMarkAllMessagesDone:it,onDeleteMessageHistory:Tt}){const[fe,Se]=re.useState(""),[Ce,De]=re.useState(!1),[Be,ct]=re.useState(!1),[Oe,_t]=re.useState(()=>o?null:"repository-path"),ut=Sh(d),dt=fe.trim(),$e=s.find(Ue=>Ue.taskSlug===o)??null;re.useEffect(()=>{_t(Ue=>o&&Ue==="repository-path"?null:!o&&Ue===null?"repository-path":Ue)},[o]);function Rt(Ue,pi){_t(pi?Ue:null)}async function Ht(Ue){Ue.preventDefault(),await te({taskSlug:dt}),Se("")}return T.jsxs("div",{className:"project-dashboard",children:[T.jsx("header",{className:"brand-header",children:T.jsx("strong",{children:"VibeCodingMaster"})}),T.jsx(hi,{title:"Repository Path",open:Oe==="repository-path",onOpenChange:Ue=>Rt("repository-path",Ue),children:T.jsx(FE,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:r,busy:E,onConnect:M})}),n?T.jsx(hi,{title:"Connected Repository",open:Oe==="connected-repository",onOpenChange:Ue=>{Rt("connected-repository",Ue),Ue&&R()},children:T.jsx(QE,{busy:E,project:n,onPull:D})}):null,T.jsx(hi,{title:"Settings",open:Oe==="settings",onOpenChange:Ue=>Rt("settings",Ue),children:T.jsxs("div",{className:"sidebar-settings",children:[T.jsxs("button",{"aria-label":`Theme mode: ${Sg(de)}`,className:"settings-toggle theme-mode-toggle",disabled:E,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>we(n2(de)),children:[T.jsx("span",{children:"Theme"}),T.jsx("span",{children:Sg(de)})]}),T.jsxs("button",{"aria-pressed":!(_!=null&&_.enabled)&&Ee,className:!(_!=null&&_.enabled)&&Ee?"settings-toggle is-active":"settings-toggle",disabled:E||(_==null?void 0:_.enabled),title:_!=null&&_.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:()=>Ye(!Ee),children:[T.jsx("span",{children:"Flow pause alert"}),T.jsx("span",{children:_!=null&&_.enabled?"off":Ee?"on":"off"})]}),T.jsxs("button",{className:"settings-toggle",disabled:E||(_==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:ft,disabled:E,onChange:Ue=>Re(Ue.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:E||!It,title:"Save the current core role launch settings and optional Gate Reviewer settings",type:"button",onClick:At,children:[T.jsx("span",{children:"Save launch template"}),T.jsx("span",{children:It?"ready":"needs core sessions"})]}),Nt?T.jsxs("button",{className:"settings-toggle is-active",disabled:E,title:VE(Yt),type:"button",onClick:Xt,children:[T.jsx("span",{children:"One-click start"}),T.jsx("span",{children:P_(Yt)})]}):null,o?T.jsxs(T.Fragment,{children:[T.jsxs("button",{type:"button",onClick:()=>De(!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(hi,{title:"Translation",open:Oe==="translation",onOpenChange:Ue=>Rt("translation",Ue),children:T.jsx($E,{busy:E,enabled:h,autoSendEnabled:p,targetLanguage:u,outputMode:b,fileTranslationAvailable:!!n,translatorSession:C,onAutoSendChange:N,onCreateBootstrap:q,onEnabledChange:G,onUpdateMemory:ce,onTargetLanguageChange:Z,onOutputModeChange:he,onOpenFileTranslation:ge,onOpenTranslatorSession:Y})}),n&&o?T.jsx(hi,{title:"Gate Review Gates",open:Oe==="gate-review-gates",onOpenChange:Ue=>Rt("gate-review-gates",Ue),children:T.jsx(KE,{busy:E,state:c,onGateEnabledChange:H})}):null,T.jsx(hi,{title:"Gateway",open:Oe==="gateway",onOpenChange:Ue=>{Rt("gateway",Ue),Ue&&V()},children:T.jsx(XE,{busy:E,qrCheck:S,qrLogin:g,status:_,onEnabledChange:W,onResetBinding:j,onStartQrLogin:z,onTranslationChange:J})}),n?T.jsx(hi,{title:"VCM Harness",open:Oe==="vcm-harness",onOpenChange:Ue=>Rt("vcm-harness",Ue),children:T.jsx(jE,{status:k,bootstrapStatus:x,applyResult:y,hasActiveTask:!!$e,busy:E,onRefresh:A,onApply:L,onOpenStudio:$,onOpenRepositoryDiff:K,onStartBootstrap:B,onRestartBootstrap:I,onStopBootstrap:U,onRunBootstrap:F})}):null,n?T.jsx(hi,{title:"New Task",open:Oe==="new-task",onOpenChange:Ue=>Rt("new-task",Ue),children:T.jsx("div",{className:"task-create",children:T.jsxs("form",{onSubmit:Ht,children:[T.jsx("input",{value:fe,onChange:Ue=>Se(Ue.target.value),placeholder:"task name"}),T.jsxs("div",{className:"task-create-preview",children:[T.jsxs("small",{children:["branch: ",dt?`feature/${dt}`:"feature/<task>"]}),T.jsxs("small",{children:["worktree: ",dt?`.claude/worktrees/${dt}`:".claude/worktrees/<task>"]})]}),T.jsx("button",{type:"submit",disabled:E||!dt,children:"Create"})]})})}):null,s.length>0?T.jsx(hi,{title:"Tasks",open:Oe==="tasks",onOpenChange:Ue=>Rt("tasks",Ue),children:T.jsx(qE,{tasks:s,activeTaskSlug:o,onSelect:ie})}):null,n&&$e?T.jsx(e2,{task:$e,roundState:a}):null,Ce?T.jsx(r2,{busy:E,messages:d,orchestration:v,onClose:()=>De(!1),onMarkAllDone:()=>{o&&it(o)},onDeleteMessageHistory:()=>{o&&Tt(o)}}):null,Be?T.jsx(i2,{events:f,onClose:()=>ct(!1)}):null]})}function P_(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: ${P_(n)}; ${r}`}function $E({autoSendEnabled:n,busy:r,enabled:s,fileTranslationAvailable:o,outputMode:d,targetLanguage:v,translatorSession:f,onAutoSendChange:a,onCreateBootstrap:c,onEnabledChange:h,onUpdateMemory:p,onOutputModeChange:u,onTargetLanguageChange:b,onOpenFileTranslation:C,onOpenTranslatorSession:k}){return T.jsxs("div",{className:"sidebar-settings",children:[T.jsxs("button",{"aria-pressed":s,className:s?"settings-toggle is-active":"settings-toggle",disabled:r,type:"button",onClick:()=>h(!s),children:[T.jsx("span",{children:"Conversation translation"}),T.jsx("span",{children:s?"on":"off"})]}),T.jsxs("button",{"aria-pressed":n,className:n?"settings-toggle is-active":"settings-toggle",disabled:r,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:r,onChange:x=>b(x.target.value),children:Dg.map(x=>T.jsx("option",{value:x.value,children:x.label},x.value))})]}),T.jsxs("label",{className:"settings-select-row",children:[T.jsx("span",{children:"Reply scope"}),T.jsx("select",{value:d,disabled:r,onChange:x=>u(x.target.value),children:x1.map(x=>T.jsx("option",{value:x.value,children:x.label},x.value))})]}),T.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Open file translation":"Connect a repository first",type:"button",onClick:C,children:[T.jsx("span",{children:"File translation"}),T.jsx("span",{children:"open"})]}),T.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Run translation bootstrap":"Connect a repository first",type:"button",onClick:c,children:[T.jsx("span",{children:"Bootstrap"}),T.jsx("span",{children:"run"})]}),T.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Compact and update translation memory":"Connect a repository first",type:"button",onClick:p,children:[T.jsx("span",{children:"Update memory"}),T.jsx("span",{children:"run"})]}),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:r||!o,title:o?"Open Translator session":"Connect a repository first",type:"button",onClick:k,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({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:YE(o)}),T.jsx("span",{children:v?"on":"off"})]},o)})})}function YE(n){switch(n){case"architecture-plan":return"Architecture plan";case"validation-adequacy":return"Validation adequacy";case"final-diff":return"Final diff"}return n}function XE({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 QE({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:ZE(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:JE(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 ${Yu(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 ZE(n){return n.branch||"unknown"}function JE(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 e2({roundState:n,task:r}){var p;const[s,o]=re.useState(()=>Date.now()),d=!!(n!=null&&n.startedAt),v=F_(r.createdAt,s),f=yg(n,(n==null?void 0:n.totalCcActiveMs)??0,s),a=d&&n?yg(n,n.currentRoundCcActiveMs,s):0,c=d&&n?t2(n,s):0,h=((p=r.title)==null?void 0:p.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:Yu(r.createdAt)})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Session total"}),T.jsx("dd",{children:Ga(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:Ga(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:Yu(n.startedAt)})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Total"}),T.jsx("dd",{children:Ga(c)})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Role runtime"}),T.jsx("dd",{children:Ga(a)})]}),T.jsxs("div",{children:[T.jsx("dt",{children:"Turn count"}),T.jsx("dd",{children:n.turnCount})]})]})]}):null]})}function yg(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 t2(n,r){const s=n.status==="running"?r:Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return F_(n.startedAt??"",Number.isFinite(s)?s:r)}function F_(n,r){const s=Date.parse(n);return Number.isFinite(s)?Math.max(0,r-s):0}function Yu(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 Ga(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 n2(n){return n==="system"?"light":n==="light"?"dark":"system"}function Sg(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function i2({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 r2({busy:n,messages:r,orchestration:s,onClose:o,onMarkAllDone:d,onDeleteMessageHistory:v}){const f=Sh(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 hi({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 q_(n,r){return n.find(s=>s.role===r)}function s2({activeRole:n,roles:r=Ju,sessions:s,onSelect:o}){return T.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:r.map(d=>{const v=q_(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(fi,{status:f})]},d.name)})})}function l2({role:n,session:r,permissionMode:s,model:o,effort:d,active:v=!0,busy:f,translationEnabled:a,translationAutoSendEnabled:c,translationTargetLanguage:h,onPermissionModeChange:p,onModelChange:u,onEffortChange:b,onStart:C,onResume:k,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(eh,{role:n,session:r,permissionMode:s,model:o,effort:d,busy:f,onPermissionModeChange:p,onModelChange:u,onEffortChange:b,onStart:C,onResume:k,onStop:x,onRestart:y,onNotifyHarnessUpdated:_}),(r==null?void 0:r.status)==="running"?T.jsx(Ja,{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 a2(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(o2)[d.length-1])==null?void 0:v.toRole)??null}function o2(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 c2=2e3;function u2({task:n,activeRole:r,gateReviewerEnabled:s,translationEnabled:o,translationAutoSendEnabled:d,translationTargetLanguage:v,refreshNonce:f=0,onTaskChanged:a,onActiveRoleChange:c,onMessagesChanged:h,onOrchestrationChanged:p,onRoundStateChanged:u,onEventsChanged:b,onLaunchStateChanged:C}){const[k,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"}),[E,M]=re.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","gate-reviewer":"default",translator:"medium","harness-engineer":"medium"}),[R,D]=re.useState(!1),[A,L]=re.useState(""),[B,I]=re.useState([]),[U,F]=re.useState(null),$=re.useRef(null),K=re.useRef(""),V=!!(k!=null&&k.sessions.some(te=>te.role==="gate-reviewer")),W=s||V,J=[...ps,...W?[Ag]:[]],z=re.useCallback((te,ie)=>{var Ee;const de=((Ee=$.current)==null?void 0:Ee.taskSlug)===n.taskSlug?$.current.messages:null,we=a2(de,te,ie);$.current={taskSlug:n.taskSlug,messages:te},F(ie),h==null||h(te),p==null||p(ie),we&&(c(we),Z(`auto switched to ${we} before VCM dispatch`))},[c,h,p,n.taskSlug]),j=re.useCallback((te,ie,de,we)=>{x(te),z(ie,de),u==null||u(we)},[z,u]),H=re.useCallback(async()=>{const[te,ie,de,we]=await Promise.all([ye.getTaskStatus(n.taskSlug),ye.listMessages(n.taskSlug),ye.getOrchestrationState(n.taskSlug),ye.getSessionRoundState(n.taskSlug)]);j(te,ie,de,we)},[j,n.taskSlug]);re.useEffect(()=>{H().catch(te=>L(te.message))},[H,f]),re.useEffect(()=>{I([]),b==null||b([])},[b,n.taskSlug]),re.useEffect(()=>{k&&!W&&r==="gate-reviewer"&&c("project-manager"),k&&r==="translator"&&c("project-manager")},[r,W,c,k]),re.useEffect(()=>{const te=k==null?void 0:k.task;if(!te||te.taskSlug!==n.taskSlug)return;const ie=bg(te);if(ie===bg(n)){K.current="";return}K.current!==ie&&(K.current=ie,a().catch(de=>{K.current="",L(de.message)}))},[a,k==null?void 0:k.task,n]),re.useEffect(()=>{_(te=>{let ie=!1;const de={...te};for(const we of(k==null?void 0:k.sessions)??[])de[we.role]!==we.permissionMode&&(de[we.role]=we.permissionMode,ie=!0);return ie?de:te})},[k==null?void 0:k.sessions]),re.useEffect(()=>{S(te=>{let ie=!1;const de={...te};for(const we of(k==null?void 0:k.sessions)??[]){const Ee=we.model??"default";de[we.role]!==Ee&&(de[we.role]=Ee,ie=!0)}return ie?de:te})},[k==null?void 0:k.sessions]),re.useEffect(()=>{M(te=>{let ie=!1;const de={...te};for(const we of(k==null?void 0:k.sessions)??[]){const Ee=we.effort??"default";de[we.role]!==Ee&&(de[we.role]=Ee,ie=!0)}return ie?de:te})},[k==null?void 0:k.sessions]),re.useEffect(()=>{const ie=((k==null?void 0:k.sessions)??[]).filter(Ee=>h2(Ee.role)),de=new Set(ie.map(Ee=>Ee.role)),we={};for(const Ee of Zu)we[Ee.name]={permissionMode:y[Ee.name],model:g[Ee.name],effort:E[Ee.name]};C==null||C({taskSlug:n.taskSlug,roles:we,autoOrchestration:((U==null?void 0:U.mode)??"auto")==="auto",statusLoaded:!!k,sessionCount:ie.length,hasAnySession:ie.length>0,allRolesHaveSession:ps.every(Ee=>de.has(Ee.name))})},[g,E,C,U==null?void 0:U.mode,y,k,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(([ie,de,we,Ee])=>{j(ie,de,we,Ee)}).catch(ie=>L(ie.message))},3e3);return()=>window.clearInterval(te)},[j,n.taskSlug]),re.useEffect(()=>{let te=!1,ie=!1;const de=window.setInterval(()=>{ie||(ie=!0,Promise.all([ye.listMessages(n.taskSlug),ye.getOrchestrationState(n.taskSlug)]).then(([we,Ee])=>{te||z(we,Ee)}).catch(we=>{te||L(we.message)}).finally(()=>{ie=!1}))},c2);return()=>{te=!0,window.clearInterval(de)}},[z,n.taskSlug]);async function G(te){D(!0),L("");try{await te(),await H(),await a()}catch(ie){L(ie instanceof Error?ie.message:"Action failed.")}finally{D(!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)){D(!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{D(!1)}}}function Z(te){I(ie=>{const de=[...ie,`${new Date().toLocaleTimeString()} ${te}`];return b==null||b(de),de})}function he(te,ie){_(de=>({...de,[te]:ie}))}function ge(te,ie){S(de=>({...de,[te]:ie}))}function Y(te,ie){M(de=>({...de,[te]:ie}))}async function q(te){D(!0),L("");try{const ie=await ye.updateOrchestrationState(n.taskSlug,{mode:te});F(ie),p==null||p(ie),Z(`auto orchestration ${te==="auto"?"enabled":"disabled"}`)}catch(ie){L(ie instanceof Error?ie.message:"Failed to update orchestration mode.")}finally{D(!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(s2,{activeRole:r,roles:J,sessions:(k==null?void 0:k.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:R,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:R,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 ie=te.name,de=ie===r,we=q_((k==null?void 0:k.sessions)??[],ie);return T.jsx("div",{className:de?"role-console-panel is-active":"role-console-panel","aria-hidden":!de,children:T.jsx(l2,{role:ie,session:we,permissionMode:y[ie],model:g[ie],effort:E[ie],active:de,busy:R,translationEnabled:o,translationAutoSendEnabled:d,translationTargetLanguage:v,onPermissionModeChange:Ee=>he(ie,Ee),onModelChange:Ee=>ge(ie,Ee),onEffortChange:Ee=>Y(ie,Ee),onStart:()=>void G(async()=>{await ye.startRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:y[ie],model:g[ie],effort:E[ie]}),Z(`started ${ie} with ${y[ie]} / ${g[ie]} / ${E[ie]}`)}),onResume:()=>void G(async()=>{await ye.resumeRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:y[ie],model:g[ie],effort:E[ie]}),Z(`resumed ${ie} with ${y[ie]} / ${g[ie]} / ${E[ie]}`)}),onStop:()=>void G(async()=>{await ye.stopRoleSession(n.taskSlug,ie),Z(`stopped ${ie}`)}),onRestart:()=>void G(async()=>{await ye.restartRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:y[ie],model:g[ie],effort:E[ie]}),Z(`restarted ${ie} with ${y[ie]} / ${g[ie]} / ${E[ie]}`)}),onNotifyHarnessUpdated:()=>void G(async()=>{await ye.notifyRoleHarnessUpdated(n.taskSlug,ie),Z(`notified ${ie} to reload latest harness`)}),onTerminalEvent:Ee=>Z(`${te.label}: ${Ee}`)})},ie)})})})})]})}function h2(n){return ps.some(r=>r.name===n)}function bg(n){return[n.status,n.updatedAt,n.cleanupStatus??"",n.cleanedAt??""].join(":")}const f2=120*1e3,Cg=1400,d2=3;function p2(){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),[p,u]=re.useState(null),[b,C]=re.useState(null),[k,x]=re.useState(null),[y,_]=re.useState(!1),[g,S]=re.useState([]),[E,M]=re.useState(null),[R,D]=re.useState(null),[A,L]=re.useState(null),[B,I]=re.useState(null),[U,F]=re.useState(null),[$,K]=re.useState(null),[V,W]=re.useState("project-manager"),[J,z]=re.useState("system"),[j,H]=re.useState(!0),[G,N]=re.useState("off"),[Z,he]=re.useState(!1),[ge,Y]=re.useState(!1),[q,ce]=re.useState(C1),[te,ie]=re.useState(w1),[de,we]=re.useState(!1),[Ee,Ye]=re.useState(!1),[ft,Re]=re.useState(!1),[Yt,It]=re.useState(!1),[Nt,At]=re.useState(null),[Xt,St]=re.useState("default"),[it,Tt]=re.useState("default"),[fe,Se]=re.useState("medium"),[Ce,De]=re.useState(null),[Be,ct]=re.useState("default"),[Oe,_t]=re.useState("default"),[ut,dt]=re.useState("medium"),[$e,Rt]=re.useState(()=>E1()),[Ht,Ue]=re.useState(null),[pi,kr]=re.useState(0),[Qi,vn]=re.useState(null),[Zi,Ji]=re.useState(!1),[Ar,ys]=re.useState(!1),[Tr,xt]=re.useState(""),Al=re.useRef({}),Dn=re.useRef(null),mi=re.useRef(""),er=re.useRef(""),tr=re.useRef(""),se=re.useMemo(()=>ME(g,E),[g,E]),Gt=(Ht==null?void 0:Ht.taskSlug)===(se==null?void 0:se.taskSlug)?Ht:null,Tl=!!(Gt!=null&&Gt.statusLoaded&&Gt.allRolesHaveSession),Nn=!!(se&&(Gt!=null&&Gt.statusLoaded)&&!Gt.hasAnySession),Je=re.useCallback(X=>{z(X.themeMode),H(X.flowPauseAlerts),N(X.permissionRequestMode),he(X.translationEnabled),Y(X.translationAutoSendEnabled),ce(X.translationTargetLanguage),ie(X.translationOutputMode),Rt(X.launchTemplate)},[]),pt=re.useCallback(()=>{Dn.current!==null&&(window.clearInterval(Dn.current),Dn.current=null)},[]),Vn=re.useCallback((X={})=>{pt(),X.resetAudio&&S2(),Va(),Dn.current=window.setInterval(()=>{Va()},Cg)},[pt]),Rr=re.useCallback(()=>{pt(),vn(null);let X=1;Va(),Dn.current=window.setInterval(()=>{X+=1,Va(),X>=d2&&Dn.current!==null&&(window.clearInterval(Dn.current),Dn.current=null)},Cg)},[pt]),Ss=re.useCallback((X,ve=`manual-${Date.now()}`,We={})=>{vn({id:ve,text:X}),Vn(We)},[Vn]),so=re.useCallback(()=>{pt(),vn(null)},[pt]),nr=re.useCallback(()=>{pt(),vn(null),H(!1)},[pt]),ir=re.useCallback(X=>{se!=null&&se.taskSlug&&D({taskSlug:se.taskSlug,messages:X})},[se==null?void 0:se.taskSlug]),bs=re.useCallback(X=>{se!=null&&se.taskSlug&&L({taskSlug:se.taskSlug,orchestration:X})},[se==null?void 0:se.taskSlug]),gi=re.useCallback(X=>{se!=null&&se.taskSlug&&I({taskSlug:se.taskSlug,events:X})},[se==null?void 0:se.taskSlug]),_i=re.useCallback(X=>{if(!(se!=null&&se.taskSlug)||X.taskSlug!==se.taskSlug||(F({taskSlug:X.taskSlug,roundState:X}),X.status!=="stopped"||!X.roundId))return;const ve=v2(X);if(Al.current[X.taskSlug]===ve||(Al.current[X.taskSlug]=ve,!j))return;const bt=X.activeRole??"role";_2(X)>=f2?Ss(`No new turn started after ${bt} stopped.`,ve):Rr()},[se==null?void 0:se.taskSlug,j,Rr,Ss]),rr=re.useCallback(X=>{Ue(ve=>(ve==null?void 0:ve.taskSlug)===X.taskSlug&&ve.statusLoaded===X.statusLoaded&&ve.sessionCount===X.sessionCount&&ve.hasAnySession===X.hasAnySession&&ve.allRolesHaveSession===X.allRolesHaveSession&&ve.autoOrchestration===X.autoOrchestration&&JSON.stringify(ve.roles)===JSON.stringify(X.roles)?ve:X)},[]);async function yn(){const X=await ye.listTasks();return S(X),M(ve=>{var We;return ve&&X.some(bt=>bt.taskSlug===ve)?ve:((We=X[0])==null?void 0:We.taskSlug)??null}),X}async function vt(X=se==null?void 0:se.taskSlug){if(!X)return v(null),null;const ve=await ye.getHarnessStatus(X);return v(ve),ve}async function vi(X=se==null?void 0:se.taskSlug){if(!X)return a(null),null;const ve=await ye.getHarnessBootstrapStatus(X);return a(ve),ve}async function Dr(){const X=await ye.getGatewayStatus();return u(X),X}async function $n(){const X=await ye.getRecentRepositoryPaths();return o(X),X}async function Hn(X){const[ve,We]=await Promise.all([ye.listMessages(X),ye.getOrchestrationState(X)]);D({taskSlug:X,messages:ve}),L({taskSlug:X,orchestration:We})}async function Cs(X){const ve=await ye.getGateReviewState(X);return K({taskSlug:X,state:ve}),ve}function Wn(X){X&&(St(X.permissionMode),X.model&&Tt(X.model),X.effort&&Se(X.effort))}async function sr(X={}){const ve=await ye.getTranslatorSession();return At(ve),X.syncLaunchOptions&&Wn(ve),ve}function yi(X){X&&(ct(X.permissionMode),X.model&&_t(X.model),X.effort&&dt(X.effort))}async function Sn(X={}){const ve=await ye.getHarnessEngineerSession();return De(ve),X.syncLaunchOptions&&yi(ve),ve}re.useEffect(()=>{Promise.all([ye.getCurrentProject(),ye.getRecentRepositoryPaths(),ye.getAppPreferences(),ye.getGatewayStatus()]).then(async([X,ve,We,bt])=>{r(X),o(ve),u(bt),Je(We),X&&await yn()}).catch(X=>xt(X.message))},[Je]),re.useEffect(()=>{const X=window.matchMedia("(prefers-color-scheme: dark)"),ve=()=>Ji(X.matches);return ve(),X.addEventListener("change",ve),()=>X.removeEventListener("change",ve)},[]),re.useEffect(()=>()=>pt(),[pt]),re.useEffect(()=>{const X=J==="system"?Zi?"dark":"light":J;document.documentElement.dataset.theme=X,document.documentElement.dataset.themeMode=J},[Zi,J]),re.useEffect(()=>{!(p!=null&&p.enabled)||!j||(nr(),ye.updateAppPreferences({flowPauseAlerts:!1}).then(X=>Je(X)).catch(X=>xt(X.message)))},[Je,nr,j,p==null?void 0:p.enabled]),re.useEffect(()=>{if(!(p!=null&&p.enabled)||!n||!se)return;const X=`${n.repoRoot}:${se.taskSlug}`;if(p.currentProjectId===n.repoRoot&&p.currentTaskSlug===se.taskSlug){mi.current=X;return}mi.current!==X&&(mi.current=X,ye.updateGatewaySettings({currentProjectId:n.repoRoot,currentTaskSlug:se.taskSlug}).then(ve=>u(ve)).catch(ve=>{mi.current===X&&(mi.current=""),xt(ve.message)}))},[se==null?void 0:se.taskSlug,p==null?void 0:p.currentProjectId,p==null?void 0:p.currentTaskSlug,p==null?void 0:p.enabled,n==null?void 0:n.repoRoot]),re.useEffect(()=>{if(!(se!=null&&se.taskSlug)){K(null);return}Cs(se.taskSlug).catch(X=>xt(X.message))},[se==null?void 0:se.taskSlug]),re.useEffect(()=>{er.current="",tr.current="",At(null),St("default"),Tt("default"),Se("medium"),De(null),ct("default"),_t("default"),dt("medium")},[n==null?void 0:n.repoRoot]),re.useEffect(()=>{if(!n)return;sr({syncLaunchOptions:!0}).catch(ve=>xt(ve.message));const X=window.setInterval(()=>{sr().catch(ve=>xt(ve.message))},3e3);return()=>window.clearInterval(X)},[n==null?void 0:n.repoRoot]),re.useEffect(()=>{if(!n)return;Sn({syncLaunchOptions:!0}).catch(ve=>xt(ve.message));const X=window.setInterval(()=>{Sn().catch(ve=>xt(ve.message))},3e3);return()=>window.clearInterval(X)},[n==null?void 0:n.repoRoot]),re.useEffect(()=>{if(!n||!(se!=null&&se.taskSlug)||!(Ce!=null&&Ce.claudeSessionId)||Ce.status==="running"||Ce.status==="done")return;const X=`${n.repoRoot}:${se.taskSlug}:${Ce.claudeSessionId}`;tr.current!==X&&(tr.current=X,ye.resumeHarnessEngineerSession({taskSlug:se.taskSlug,permissionMode:Ce.permissionMode,model:Ce.model,effort:Ce.effort}).then(ve=>{De(ve),yi(ve)}).catch(ve=>xt(ve.message)))},[se==null?void 0:se.taskSlug,Ce==null?void 0:Ce.claudeSessionId,Ce==null?void 0:Ce.effort,Ce==null?void 0:Ce.model,Ce==null?void 0:Ce.permissionMode,Ce==null?void 0:Ce.status,n==null?void 0:n.repoRoot]),re.useEffect(()=>{if(!n||!(se!=null&&se.taskSlug)){v(null),a(null);return}const X=se.taskSlug;Promise.all([vt(X),vi(X)]).catch(We=>xt(We.message));const ve=window.setInterval(()=>{Promise.all([vt(X),vi(X)]).catch(We=>xt(We.message))},3e3);return()=>window.clearInterval(ve)},[n==null?void 0:n.repoRoot,se==null?void 0:se.taskSlug]),re.useEffect(()=>{if(!n||!Z||!(se!=null&&se.taskSlug))return;const X=`${n.repoRoot}:${se.taskSlug}`;er.current===X&&(Nt==null?void 0:Nt.status)==="running"||(er.current=X,ye.ensureTranslatorSession({taskSlug:se.taskSlug}).then(ve=>{At(ve),Wn(ve)}).catch(ve=>{er.current="",xt(ve.message)}))},[n==null?void 0:n.repoRoot,se==null?void 0:se.taskSlug,Z]),re.useEffect(()=>{if(!(se!=null&&se.taskSlug))return;const X=se.taskSlug,ve=window.setInterval(()=>{Cs(X).catch(We=>xt(We.message))},3e3);return()=>window.clearInterval(ve)},[se==null?void 0:se.taskSlug]);async function je(X){ys(!0),xt("");try{await X()}catch(ve){xt(ve instanceof Error?ve.message:"Action failed.")}finally{ys(!1)}}const Mn=R&&R.taskSlug===(se==null?void 0:se.taskSlug)?R.messages:[],Jt=A&&A.taskSlug===(se==null?void 0:se.taskSlug)?A.orchestration:null,Rl=B&&B.taskSlug===(se==null?void 0:se.taskSlug)?B.events:[],lo=U&&U.taskSlug===(se==null?void 0:se.taskSlug)?U.roundState:null,lr=$&&$.taskSlug===(se==null?void 0:se.taskSlug)?$.state:null,ws=!!(lr&&Object.values(lr.gates).some(X=>X.required));return T.jsxs(k1,{sidebar:T.jsx(GE,{project:n,recentRepositoryPaths:s,tasks:g,activeTaskSlug:(se==null?void 0:se.taskSlug)??null,messages:Mn,orchestration:Jt,events:Rl,roundState:lo,gateReview:lr,translationEnabled:Z,translationAutoSendEnabled:ge,translationTargetLanguage:q,translationOutputMode:te,translatorSession:Nt,harnessStatus:d,harnessBootstrapStatus:f,harnessApplyResult:c,gatewayStatus:p,gatewayQrLogin:b,gatewayQrCheck:k,busy:Ar,onConnect:X=>je(async()=>{const ve=await ye.connectProject({repoPath:X});r(ve),h(null),await Promise.all([yn(),$n()])}),onRefreshConnectedRepository:()=>je(async()=>{const X=await ye.getCurrentProject();r(X)}),onPullConnectedRepository:()=>je(async()=>{const X=await ye.pullCurrentProject();r(X)}),onRefreshHarness:()=>je(async()=>{if(!se)throw new Error("Create or select a task before refreshing VCM Harness.");h(null),await Promise.all([vt(se.taskSlug),vi(se.taskSlug)])}),onApplyHarness:()=>je(async()=>{if(!se)throw new Error("Create or select a task before applying VCM Harness.");const X=await ye.applyHarness({taskSlug:se.taskSlug});h(X),await Promise.all([vt(se.taskSlug),vi(se.taskSlug)])}),onStartHarnessBootstrap:X=>je(async()=>{if(!se)throw new Error("Create or select a task before starting Harness Bootstrap.");const ve=await ye.startHarnessBootstrap({taskSlug:se.taskSlug,cols:120,rows:32,...X});a(ve.status),await Sn({syncLaunchOptions:!0})}),onRestartHarnessBootstrap:X=>je(async()=>{if(!se)throw new Error("Create or select a task before restarting Harness Bootstrap.");const ve=await ye.restartHarnessBootstrap({taskSlug:se.taskSlug,cols:120,rows:32,...X});a(ve.status),await Sn({syncLaunchOptions:!0})}),onStopHarnessBootstrap:()=>je(async()=>{const X=await ye.stopHarnessBootstrap();a(X),await Sn()}),onRunHarnessBootstrap:()=>je(async()=>{if(!se)throw new Error("Create or select a task before running Harness Bootstrap.");const X=await ye.runHarnessBootstrap({taskSlug:se.taskSlug});a(X.status),await Sn()}),onOpenHarnessStudio:()=>Re(!0),onOpenRepositoryDiff:()=>It(!0),onRefreshGateway:()=>je(async()=>{await Dr()}),onGatewayEnabledChange:X=>{je(async()=>{const[ve,We]=await Promise.all([ye.updateGatewaySettings({enabled:X,...X&&n?{currentProjectId:n.repoRoot,currentTaskSlug:(se==null?void 0:se.taskSlug)??null}:{}}),X?ye.updateAppPreferences({flowPauseAlerts:!1}):Promise.resolve(null)]);We&&Je(We),X&&nr(),u(ve)})},onGatewayTranslationChange:X=>{je(async()=>{const ve=await ye.updateGatewaySettings({translationEnabled:X});u(ve)})},onStartGatewayQrLogin:()=>{je(async()=>{const X=await ye.startGatewayQrLogin();C(X),x(null),_(!0),await Dr()})},onResetGatewayBinding:()=>{je(async()=>{const X=await ye.resetGatewayBinding();u(X),C(null),x(null),_(!1)})},onGateReviewGateEnabledChange:(X,ve)=>{je(async()=>{if(!se)throw new Error("Create or select a task before changing Gate Review Gates.");const We=await ye.updateGateReviewSettings(se.taskSlug,{gates:{[X]:ve}});K({taskSlug:se.taskSlug,state:We})})},onTranslationEnabledChange:X=>{he(X),je(async()=>{const ve=await ye.updateAppPreferences({translationEnabled:X});Je(ve)})},onTranslationAutoSendChange:X=>{Y(X),je(async()=>{const ve=await ye.updateAppPreferences({translationAutoSendEnabled:X});Je(ve)})},onTranslationTargetLanguageChange:X=>{ce(X),je(async()=>{const ve=await ye.updateAppPreferences({translationTargetLanguage:X});Je(ve)})},onTranslationOutputModeChange:X=>{ie(X),je(async()=>{const ve=await ye.updateAppPreferences({translationOutputMode:X});Je(ve)})},onOpenFileTranslation:()=>we(!0),onOpenTranslatorSession:()=>Ye(!0),onCreateTranslationBootstrap:()=>{je(async()=>{if(!se)throw new Error("Create or select a task before running Translation Bootstrap.");await ye.createTranslationBootstrap({taskSlug:se.taskSlug,targetLanguage:q}),await sr()})},onUpdateTranslationMemory:()=>{je(async()=>{if(!se)throw new Error("Create or select a task before updating translation memory.");await ye.createTranslationMemoryUpdate({taskSlug:se.taskSlug,targetLanguage:q}),await sr()})},onCreateTask:X=>je(async()=>{const ve=await ye.createTask(X);await yn(),M(ve.taskSlug),await Cs(ve.taskSlug)}),onSelectTask:M,themeMode:J,onThemeModeChange:X=>{z(X),je(async()=>{const ve=await ye.updateAppPreferences({themeMode:X});Je(ve)})},flowPauseAlerts:j,onFlowPauseAlertsChange:X=>{if(p!=null&&p.enabled){nr();return}H(X),X&&y2(),je(async()=>{const ve=await ye.updateAppPreferences({flowPauseAlerts:X});Je(ve)})},permissionRequestMode:G,onPermissionRequestModeChange:X=>{N(X),je(async()=>{const ve=await ye.updateAppPreferences({permissionRequestMode:X});Je(ve)})},launchTemplate:$e,canSaveLaunchTemplate:Tl,canOneClickStart:Nn,onSaveLaunchTemplate:()=>{je(async()=>{if(!(Gt!=null&&Gt.allRolesHaveSession))throw new Error("Start all core role sessions before saving a launch template.");const X=await ye.updateAppPreferences({launchTemplate:{version:1,roles:Gt.roles,autoOrchestration:Gt.autoOrchestration}});Je(X)})},onOneClickStart:()=>{je(async()=>{if(!se)throw new Error("Create or select a task before one-click start.");const X=await ye.getTaskStatus(se.taskSlug);if(X.sessions.some(bt=>S1.some(Si=>Si===bt.role)))throw new Error("One-click start is only available before any role session has started.");const ve=await ye.updateOrchestrationState(se.taskSlug,{mode:$e.autoOrchestration?"auto":"manual"});L({taskSlug:se.taskSlug,orchestration:ve});const We=LE($e,{gateReviewerEnabled:ws});for(const bt of We){const Si={cols:100,rows:28,permissionMode:bt.permissionMode,model:bt.model,effort:bt.effort},zn=X.sessions.find(bi=>bi.role===bt.role);if((zn==null?void 0:zn.status)==="running"){bt.role==="gate-reviewer"&&await ye.resumeRoleSession(se.taskSlug,bt.role,Si);continue}zn!=null&&zn.claudeSessionId?await ye.resumeRoleSession(se.taskSlug,bt.role,Si):await ye.startRoleSession(se.taskSlug,bt.role,Si)}W("project-manager"),await Hn(se.taskSlug),await yn(),kr(bt=>bt+1)})},onTryFlowPauseAlert:()=>{Ss("This is a test flow pause alert.",void 0,{resetAudio:!0})},onMarkAllMessagesDone:X=>{je(async()=>{const ve=await ye.markAllMessagesDone(X);D({taskSlug:X,messages:ve.messages}),await Hn(X)})},onDeleteMessageHistory:X=>{je(async()=>{const ve=await ye.deleteMessageHistory(X);D({taskSlug:X,messages:ve.messages}),await Hn(X)})}}),children:[Tr?T.jsx("div",{className:"error-banner",children:Tr}):null,Qi?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:Qi.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:so,children:"Confirm"})]})}):null,y&&b?T.jsx(m2,{busy:Ar,qrCheck:k,qrLogin:b,onCheck:()=>{je(async()=>{const X=await ye.checkGatewayQrLogin();x(X),(X.status==="confirmed"||X.status==="binded_redirect")&&_(!1),await Dr()})},onClose:()=>_(!1)}):null,n&&se?T.jsx(u2,{task:se,activeRole:V,gateReviewerEnabled:ws,translationEnabled:Z,translationAutoSendEnabled:ge,translationTargetLanguage:q,refreshNonce:pi,onTaskChanged:async()=>{await yn()},onActiveRoleChange:W,onMessagesChanged:ir,onOrchestrationChanged:bs,onRoundStateChanged:_i,onEventsChanged:gi,onLaunchStateChanged:rr}):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:de,taskSlug:(se==null?void 0:se.taskSlug)??null,targetLanguage:q,onClose:()=>we(!1)}),T.jsx(N1,{open:ft,busy:Ar,status:d,bootstrapStatus:f,engineerSession:Ce,permissionMode:Be,model:Oe,effort:ut,taskSlug:(se==null?void 0:se.taskSlug)??null,onClose:()=>Re(!1),onRefresh:()=>{je(async()=>{if(!se)throw new Error("Create or select a task before refreshing Harness Studio.");await Promise.all([vt(se.taskSlug),vi(se.taskSlug),Sn()])})},onPermissionModeChange:ct,onModelChange:_t,onEffortChange:dt,onEngineerStart:()=>{je(async()=>{if(!se)throw new Error("Create or select a task before starting Harness Engineer.");const X=await ye.startHarnessEngineerSession({taskSlug:se.taskSlug,cols:120,rows:32,permissionMode:Be,model:Oe,effort:ut});De(X),yi(X)})},onEngineerResume:()=>{je(async()=>{if(!se)throw new Error("Create or select a task before resuming Harness Engineer.");const X=await ye.resumeHarnessEngineerSession({taskSlug:se.taskSlug,cols:120,rows:32,permissionMode:Be,model:Oe,effort:ut});De(X),yi(X)})},onEngineerRestart:()=>{je(async()=>{if(!se)throw new Error("Create or select a task before restarting Harness Engineer.");const X=await ye.restartHarnessEngineerSession({taskSlug:se.taskSlug,cols:120,rows:32,permissionMode:Be,model:Oe,effort:ut});De(X),yi(X)})},onEngineerStop:()=>{je(async()=>{const X=await ye.stopHarnessEngineerSession();De(X)})},onEngineerNotifyHarnessUpdated:()=>{je(async()=>{const X=await ye.notifyHarnessEngineerHarnessUpdated();De(X),yi(X)})},onOpenRepositoryDiff:()=>It(!0)}),T.jsx(H1,{open:Yt,taskSlug:(se==null?void 0:se.taskSlug)??null,onClose:()=>It(!1)}),T.jsx(F1,{open:Ee,busy:Ar,session:Nt,permissionMode:Xt,model:it,effort:fe,onClose:()=>Ye(!1),onPermissionModeChange:St,onModelChange:Tt,onEffortChange:Se,onStart:()=>{je(async()=>{if(!se)throw new Error("Create or select a task before starting Translator.");const X=await ye.startTranslatorSession({taskSlug:se.taskSlug,cols:100,rows:28,permissionMode:Xt,model:it,effort:fe});At(X),Wn(X)})},onResume:()=>{je(async()=>{if(!se)throw new Error("Create or select a task before resuming Translator.");const X=await ye.resumeTranslatorSession({taskSlug:se.taskSlug,cols:100,rows:28,permissionMode:Xt,model:it,effort:fe});At(X),Wn(X)})},onRestart:()=>{je(async()=>{if(!se)throw new Error("Create or select a task before restarting Translator.");const X=await ye.restartTranslatorSession({taskSlug:se.taskSlug,cols:100,rows:28,permissionMode:Xt,model:it,effort:fe});At(X),Wn(X)})},onStop:()=>{je(async()=>{const X=await ye.stopTranslatorSession();At(X)})},onNotifyHarnessUpdated:()=>{je(async()=>{const X=await ye.notifyTranslatorHarnessUpdated();At(X),Wn(X)})}})]})}function m2({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 p=gs(0,"M");p.addData(d.qrcodeUrl),p.make(),h||f(p.createDataURL(8,2))}catch(p){h||c(p instanceof Error?p.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:g2(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 g2(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 Yi=null;function _2(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 v2(n){const r=n.roundId??n.startedAt??n.taskSlug,s=n.stoppedAt??n.lastTurnEndedAt??"stopped";return`${r}:${s}`}async function y2(){const n=G_();return n?V_(n):!1}async function Va(){const n=G_();if(!n||!await V_(n))return!1;try{const s=n.createGain(),o=n.currentTime+.025;return s.gain.setValueAtTime(.85,n.currentTime),s.connect(n.destination),xg(n,s,{frequency:587.33,startAt:o,duration:.18,peakGain:.045}),xg(n,s,{frequency:783.99,startAt:o+.11,duration:.28,peakGain:.055}),window.setTimeout(()=>{s.disconnect()},800),!0}catch{return!1}}function G_(){const n=window.AudioContext??window.webkitAudioContext;if(!n)return null;try{return(!Yi||Yi.state==="closed")&&(Yi=new n),Yi}catch{return null}}function S2(){Xu(Yi)}function Xu(n){Yi=null,n&&n.state!=="closed"&&n.close().catch(()=>{})}async function V_(n){if(wg(n))return!0;try{await n.resume();const r=wg(n);return!r&&n===Yi&&Xu(n),r}catch{return n===Yi&&Xu(n),!1}}function wg(n){return n.state==="running"}function xg(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 $_=document.getElementById("root");if(!$_)throw new Error("Missing #root element.");c1.createRoot($_).render(T.jsx(re.StrictMode,{children:T.jsx(p2,{})}));