vibe-coding-master 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -9
- package/dist/backend/api/round-routes.js +33 -0
- package/dist/backend/api/session-routes.js +2 -0
- package/dist/backend/api/task-routes.js +1 -0
- package/dist/backend/server.js +19 -3
- package/dist/backend/services/app-settings-service.js +2 -1
- package/dist/backend/services/message-service.js +158 -55
- package/dist/backend/services/project-service.js +1 -1
- package/dist/backend/services/round-service.js +227 -0
- package/dist/backend/services/task-service.js +14 -6
- package/dist/backend/templates/harness/architect-agent.js +1 -0
- package/dist/backend/templates/harness/claude-root.js +3 -0
- package/dist/backend/templates/harness/coder-agent.js +1 -0
- package/dist/backend/templates/harness/gitignore.js +2 -1
- package/dist/backend/templates/harness/project-manager-agent.js +3 -0
- package/dist/backend/templates/harness/reviewer-agent.js +1 -0
- package/dist/backend/ws/terminal-ws.js +15 -1
- package/dist/shared/types/round.js +1 -0
- package/dist-frontend/assets/index-CyJrJge9.js +88 -0
- package/dist-frontend/assets/index-N5DA0uE9.css +32 -0
- package/dist-frontend/index.html +2 -2
- package/docs/cc-best-practices.md +7 -4
- package/docs/product-design.md +59 -25
- package/docs/v1-architecture-design.md +86 -27
- package/docs/v1-implementation-plan.md +74 -12
- package/package.json +1 -1
- package/dist-frontend/assets/index-Bi4X3GSR.css +0 -32
- package/dist-frontend/assets/index-DaHXq14j.js +0 -88
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
var t0=Object.defineProperty;var n0=(n,s,l)=>s in n?t0(n,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[s]=l;var Tp=(n,s,l)=>n0(n,typeof s!="symbol"?s+"":s,l);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const S of document.querySelectorAll('link[rel="modulepreload"]'))o(S);new MutationObserver(S=>{for(const C of S)if(C.type==="childList")for(const g of C.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&o(g)}).observe(document,{childList:!0,subtree:!0});function l(S){const C={};return S.integrity&&(C.integrity=S.integrity),S.referrerPolicy&&(C.referrerPolicy=S.referrerPolicy),S.crossOrigin==="use-credentials"?C.credentials="include":S.crossOrigin==="anonymous"?C.credentials="omit":C.credentials="same-origin",C}function o(S){if(S.ep)return;S.ep=!0;const C=l(S);fetch(S.href,C)}})();function M_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Tu={exports:{}},ws={};/**
|
|
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 Dp;function i0(){if(Dp)return ws;Dp=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function l(o,S,C){var g=null;if(C!==void 0&&(g=""+C),S.key!==void 0&&(g=""+S.key),"key"in S){C={};for(var a in S)a!=="key"&&(C[a]=S[a])}else C=S;return S=C.ref,{$$typeof:n,type:o,key:g,ref:S!==void 0?S:null,props:C}}return ws.Fragment=s,ws.jsx=l,ws.jsxs=l,ws}var Rp;function r0(){return Rp||(Rp=1,Tu.exports=i0()),Tu.exports}var F=r0(),Du={exports:{}},Te={};/**
|
|
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 Lp;function s0(){if(Lp)return Te;Lp=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),g=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),b=Symbol.iterator;function w(B){return B===null||typeof B!="object"?null:(B=b&&B[b]||B["@@iterator"],typeof B=="function"?B:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function _(B,P,N){this.props=B,this.context=P,this.refs=v,this.updater=N||k}_.prototype.isReactComponent={},_.prototype.setState=function(B,P){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,P,"setState")},_.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function d(){}d.prototype=_.prototype;function m(B,P,N){this.props=B,this.context=P,this.refs=v,this.updater=N||k}var E=m.prototype=new d;E.constructor=m,x(E,_.prototype),E.isPureReactComponent=!0;var R=Array.isArray;function A(){}var L={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function z(B,P,N){var ie=N.ref;return{$$typeof:n,type:B,key:P,ref:ie!==void 0?ie:null,props:N}}function H(B,P){return z(B.type,P,B.props)}function q(B){return typeof B=="object"&&B!==null&&B.$$typeof===n}function V(B){var P={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(N){return P[N]})}var I=/\/+/g;function G(B,P){return typeof B=="object"&&B!==null&&B.key!=null?V(""+B.key):P.toString(36)}function K(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(A,A):(B.status="pending",B.then(function(P){B.status==="pending"&&(B.status="fulfilled",B.value=P)},function(P){B.status==="pending"&&(B.status="rejected",B.reason=P)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function Y(B,P,N,ie,fe){var de=typeof B;(de==="undefined"||de==="boolean")&&(B=null);var X=!1;if(B===null)X=!0;else switch(de){case"bigint":case"string":case"number":X=!0;break;case"object":switch(B.$$typeof){case n:case s:X=!0;break;case p:return X=B._init,Y(X(B._payload),P,N,ie,fe)}}if(X)return fe=fe(B),X=ie===""?"."+G(B,0):ie,R(fe)?(N="",X!=null&&(N=X.replace(I,"$&/")+"/"),Y(fe,P,N,"",function(Q){return Q})):fe!=null&&(q(fe)&&(fe=H(fe,N+(fe.key==null||B&&B.key===fe.key?"":(""+fe.key).replace(I,"$&/")+"/")+X)),P.push(fe)),1;X=0;var U=ie===""?".":ie+":";if(R(B))for(var le=0;le<B.length;le++)ie=B[le],de=U+G(ie,le),X+=Y(ie,P,N,de,fe);else if(le=w(B),typeof le=="function")for(B=le.call(B),le=0;!(ie=B.next()).done;)ie=ie.value,de=U+G(ie,le++),X+=Y(ie,P,N,de,fe);else if(de==="object"){if(typeof B.then=="function")return Y(K(B),P,N,ie,fe);throw P=String(B),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return X}function Z(B,P,N){if(B==null)return B;var ie=[],fe=0;return Y(B,ie,"","",function(de){return P.call(N,de,fe++)}),ie}function ee(B){if(B._status===-1){var P=B._result;P=P(),P.then(function(N){(B._status===0||B._status===-1)&&(B._status=1,B._result=N)},function(N){(B._status===0||B._status===-1)&&(B._status=2,B._result=N)}),B._status===-1&&(B._status=0,B._result=P)}if(B._status===1)return B._result.default;throw B._result}var O=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},M={map:Z,forEach:function(B,P,N){Z(B,function(){P.apply(this,arguments)},N)},count:function(B){var P=0;return Z(B,function(){P++}),P},toArray:function(B){return Z(B,function(P){return P})||[]},only:function(B){if(!q(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return Te.Activity=c,Te.Children=M,Te.Component=_,Te.Fragment=l,Te.Profiler=S,Te.PureComponent=m,Te.StrictMode=o,Te.Suspense=u,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Te.__COMPILER_RUNTIME={__proto__:null,c:function(B){return L.H.useMemoCache(B)}},Te.cache=function(B){return function(){return B.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(B,P,N){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var ie=x({},B.props),fe=B.key;if(P!=null)for(de in P.key!==void 0&&(fe=""+P.key),P)!T.call(P,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&P.ref===void 0||(ie[de]=P[de]);var de=arguments.length-2;if(de===1)ie.children=N;else if(1<de){for(var X=Array(de),U=0;U<de;U++)X[U]=arguments[U+2];ie.children=X}return z(B.type,fe,ie)},Te.createContext=function(B){return B={$$typeof:g,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:C,_context:B},B},Te.createElement=function(B,P,N){var ie,fe={},de=null;if(P!=null)for(ie in P.key!==void 0&&(de=""+P.key),P)T.call(P,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(fe[ie]=P[ie]);var X=arguments.length-2;if(X===1)fe.children=N;else if(1<X){for(var U=Array(X),le=0;le<X;le++)U[le]=arguments[le+2];fe.children=U}if(B&&B.defaultProps)for(ie in X=B.defaultProps,X)fe[ie]===void 0&&(fe[ie]=X[ie]);return z(B,de,fe)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(B){return{$$typeof:a,render:B}},Te.isValidElement=q,Te.lazy=function(B){return{$$typeof:p,_payload:{_status:-1,_result:B},_init:ee}},Te.memo=function(B,P){return{$$typeof:h,type:B,compare:P===void 0?null:P}},Te.startTransition=function(B){var P=L.T,N={};L.T=N;try{var ie=B(),fe=L.S;fe!==null&&fe(N,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(A,O)}catch(de){O(de)}finally{P!==null&&N.types!==null&&(P.types=N.types),L.T=P}},Te.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Te.use=function(B){return L.H.use(B)},Te.useActionState=function(B,P,N){return L.H.useActionState(B,P,N)},Te.useCallback=function(B,P){return L.H.useCallback(B,P)},Te.useContext=function(B){return L.H.useContext(B)},Te.useDebugValue=function(){},Te.useDeferredValue=function(B,P){return L.H.useDeferredValue(B,P)},Te.useEffect=function(B,P){return L.H.useEffect(B,P)},Te.useEffectEvent=function(B){return L.H.useEffectEvent(B)},Te.useId=function(){return L.H.useId()},Te.useImperativeHandle=function(B,P,N){return L.H.useImperativeHandle(B,P,N)},Te.useInsertionEffect=function(B,P){return L.H.useInsertionEffect(B,P)},Te.useLayoutEffect=function(B,P){return L.H.useLayoutEffect(B,P)},Te.useMemo=function(B,P){return L.H.useMemo(B,P)},Te.useOptimistic=function(B,P){return L.H.useOptimistic(B,P)},Te.useReducer=function(B,P,N){return L.H.useReducer(B,P,N)},Te.useRef=function(B){return L.H.useRef(B)},Te.useState=function(B){return L.H.useState(B)},Te.useSyncExternalStore=function(B,P,N){return L.H.useSyncExternalStore(B,P,N)},Te.useTransition=function(){return L.H.useTransition()},Te.version="19.2.6",Te}var Mp;function hc(){return Mp||(Mp=1,Du.exports=s0()),Du.exports}var ge=hc(),Ru={exports:{}},xs={},Lu={exports:{}},Mu={};/**
|
|
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 Op;function l0(){return Op||(Op=1,(function(n){function s(Y,Z){var ee=Y.length;Y.push(Z);e:for(;0<ee;){var O=ee-1>>>1,M=Y[O];if(0<S(M,Z))Y[O]=Z,Y[ee]=M,ee=O;else break e}}function l(Y){return Y.length===0?null:Y[0]}function o(Y){if(Y.length===0)return null;var Z=Y[0],ee=Y.pop();if(ee!==Z){Y[0]=ee;e:for(var O=0,M=Y.length,B=M>>>1;O<B;){var P=2*(O+1)-1,N=Y[P],ie=P+1,fe=Y[ie];if(0>S(N,ee))ie<M&&0>S(fe,N)?(Y[O]=fe,Y[ie]=ee,O=ie):(Y[O]=N,Y[P]=ee,O=P);else if(ie<M&&0>S(fe,ee))Y[O]=fe,Y[ie]=ee,O=ie;else break e}}return Z}function S(Y,Z){var ee=Y.sortIndex-Z.sortIndex;return ee!==0?ee:Y.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var C=performance;n.unstable_now=function(){return C.now()}}else{var g=Date,a=g.now();n.unstable_now=function(){return g.now()-a}}var u=[],h=[],p=1,c=null,b=3,w=!1,k=!1,x=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;function E(Y){for(var Z=l(h);Z!==null;){if(Z.callback===null)o(h);else if(Z.startTime<=Y)o(h),Z.sortIndex=Z.expirationTime,s(u,Z);else break;Z=l(h)}}function R(Y){if(x=!1,E(Y),!k)if(l(u)!==null)k=!0,A||(A=!0,V());else{var Z=l(h);Z!==null&&K(R,Z.startTime-Y)}}var A=!1,L=-1,T=5,z=-1;function H(){return v?!0:!(n.unstable_now()-z<T)}function q(){if(v=!1,A){var Y=n.unstable_now();z=Y;var Z=!0;try{e:{k=!1,x&&(x=!1,d(L),L=-1),w=!0;var ee=b;try{t:{for(E(Y),c=l(u);c!==null&&!(c.expirationTime>Y&&H());){var O=c.callback;if(typeof O=="function"){c.callback=null,b=c.priorityLevel;var M=O(c.expirationTime<=Y);if(Y=n.unstable_now(),typeof M=="function"){c.callback=M,E(Y),Z=!0;break t}c===l(u)&&o(u),E(Y)}else o(u);c=l(u)}if(c!==null)Z=!0;else{var B=l(h);B!==null&&K(R,B.startTime-Y),Z=!1}}break e}finally{c=null,b=ee,w=!1}Z=void 0}}finally{Z?V():A=!1}}}var V;if(typeof m=="function")V=function(){m(q)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,G=I.port2;I.port1.onmessage=q,V=function(){G.postMessage(null)}}else V=function(){_(q,0)};function K(Y,Z){L=_(function(){Y(n.unstable_now())},Z)}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(Y){Y.callback=null},n.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<Y?Math.floor(1e3/Y):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(Y){switch(b){case 1:case 2:case 3:var Z=3;break;default:Z=b}var ee=b;b=Z;try{return Y()}finally{b=ee}},n.unstable_requestPaint=function(){v=!0},n.unstable_runWithPriority=function(Y,Z){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var ee=b;b=Y;try{return Z()}finally{b=ee}},n.unstable_scheduleCallback=function(Y,Z,ee){var O=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?O+ee:O):ee=O,Y){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=ee+M,Y={id:p++,callback:Z,priorityLevel:Y,startTime:ee,expirationTime:M,sortIndex:-1},ee>O?(Y.sortIndex=ee,s(h,Y),l(u)===null&&Y===l(h)&&(x?(d(L),L=-1):x=!0,K(R,ee-O))):(Y.sortIndex=M,s(u,Y),k||w||(k=!0,A||(A=!0,V()))),Y},n.unstable_shouldYield=H,n.unstable_wrapCallback=function(Y){var Z=b;return function(){var ee=b;b=Z;try{return Y.apply(this,arguments)}finally{b=ee}}}})(Mu)),Mu}var Bp;function a0(){return Bp||(Bp=1,Lu.exports=l0()),Lu.exports}var Ou={exports:{}},Tt={};/**
|
|
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 zp;function o0(){if(zp)return Tt;zp=1;var n=hc();function s(u){var h="https://react.dev/errors/"+u;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 #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={d:{f:l,r:function(){throw Error(s(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},S=Symbol.for("react.portal");function C(u,h,p){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:S,key:c==null?null:""+c,children:u,containerInfo:h,implementation:p}}var g=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Tt.createPortal=function(u,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(s(299));return C(u,h,null,p)},Tt.flushSync=function(u){var h=g.T,p=o.p;try{if(g.T=null,o.p=2,u)return u()}finally{g.T=h,o.p=p,o.d.f()}},Tt.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(u,h))},Tt.prefetchDNS=function(u){typeof u=="string"&&o.d.D(u)},Tt.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var p=h.as,c=a(p,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?o.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:c,integrity:b,fetchPriority:w}):p==="script"&&o.d.X(u,{crossOrigin:c,integrity:b,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Tt.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=a(h.as,h.crossOrigin);o.d.M(u,{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(u)},Tt.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,c=a(p,h.crossOrigin);o.d.L(u,p,{crossOrigin:c,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})}},Tt.preloadModule=function(u,h){if(typeof u=="string")if(h){var p=a(h.as,h.crossOrigin);o.d.m(u,{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(u)},Tt.requestFormReset=function(u){o.d.r(u)},Tt.unstable_batchedUpdates=function(u,h){return u(h)},Tt.useFormState=function(u,h,p){return g.H.useFormState(u,h,p)},Tt.useFormStatus=function(){return g.H.useHostTransitionStatus()},Tt.version="19.2.6",Tt}var Hp;function u0(){if(Hp)return Ou.exports;Hp=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(s){console.error(s)}}return n(),Ou.exports=o0(),Ou.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 Np;function c0(){if(Np)return xs;Np=1;var n=a0(),s=hc(),l=u0();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 S(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function C(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 g(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 u(e){if(C(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=C(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,r=t;;){var f=i.return;if(f===null)break;var y=f.alternate;if(y===null){if(r=f.return,r!==null){i=r;continue}break}if(f.child===y.child){for(y=f.child;y;){if(y===i)return u(f),e;if(y===r)return u(f),t;y=y.sibling}throw Error(o(188))}if(i.return!==r.return)i=f,r=y;else{for(var D=!1,j=f.child;j;){if(j===i){D=!0,i=f,r=y;break}if(j===r){D=!0,r=f,i=y;break}j=j.sibling}if(!D){for(j=y.child;j;){if(j===i){D=!0,i=y,r=f;break}if(j===r){D=!0,r=y,i=f;break}j=j.sibling}if(!D)throw Error(o(189))}}if(i.alternate!==r)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 c=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),m=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function V(e){return e===null||typeof e!="object"?null:(e=q&&e[q]||e["@@iterator"],typeof e=="function"?e:null)}var I=Symbol.for("react.client.reference");function G(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===I?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case _:return"Profiler";case v:return"StrictMode";case R:return"Suspense";case A:return"SuspenseList";case z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case m:return e.displayName||"Context";case d: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 L:return t=e.displayName||null,t!==null?t:G(e.type)||"Memo";case T:t=e._payload,e=e._init;try{return G(e(t))}catch{}}return null}var K=Array.isArray,Y=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},O=[],M=-1;function B(e){return{current:e}}function P(e){0>M||(e.current=O[M],O[M]=null,M--)}function N(e,t){M++,O[M]=e.current,e.current=t}var ie=B(null),fe=B(null),de=B(null),X=B(null);function U(e,t){switch(N(de,t),N(fe,e),N(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Qd(t),e=Zd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P(ie),N(ie,e)}function le(){P(ie),P(fe),P(de)}function Q(e){e.memoizedState!==null&&N(X,e);var t=ie.current,i=Zd(t,e.type);t!==i&&(N(fe,e),N(ie,i))}function pe(e){fe.current===e&&(P(ie),P(fe)),X.current===e&&(P(X),Ss._currentValue=ee)}var _e,Ae;function ce(e){if(_e===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);_e=t&&t[1]||"",Ae=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+_e+e+Ae}var be=!1;function Ge(e,t){if(!e||be)return"";be=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(se){var re=se}Reflect.construct(e,[],he)}else{try{he.call()}catch(se){re=se}e.call(he.prototype)}}else{try{throw Error()}catch(se){re=se}(he=e())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(se){if(se&&re&&typeof se.stack=="string")return[se.stack,re.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=r.DetermineComponentFrameRoot(),D=y[0],j=y[1];if(D&&j){var W=D.split(`
|
|
44
|
+
`),ne=j.split(`
|
|
45
|
+
`);for(f=r=0;r<W.length&&!W[r].includes("DetermineComponentFrameRoot");)r++;for(;f<ne.length&&!ne[f].includes("DetermineComponentFrameRoot");)f++;if(r===W.length||f===ne.length)for(r=W.length-1,f=ne.length-1;1<=r&&0<=f&&W[r]!==ne[f];)f--;for(;1<=r&&0<=f;r--,f--)if(W[r]!==ne[f]){if(r!==1||f!==1)do if(r--,f--,0>f||W[r]!==ne[f]){var oe=`
|
|
46
|
+
`+W[r].replace(" at new "," at ");return e.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",e.displayName)),oe}while(1<=r&&0<=f);break}}}finally{be=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ce(i):""}function we(e,t){switch(e.tag){case 26:case 27:case 5:return ce(e.type);case 16:return ce("Lazy");case 13:return e.child!==t&&t!==null?ce("Suspense Fallback"):ce("Suspense");case 19:return ce("SuspenseList");case 0:case 15:return Ge(e.type,!1);case 11:return Ge(e.type.render,!1);case 1:return Ge(e.type,!0);case 31:return ce("Activity");default:return""}}function mn(e){try{var t="",i=null;do t+=we(e,i),i=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var gn=Object.prototype.hasOwnProperty,vn=n.unstable_scheduleCallback,En=n.unstable_cancelCallback,Yn=n.unstable_shouldYield,At=n.unstable_requestPaint,ot=n.unstable_now,Ot=n.unstable_getCurrentPriorityLevel,ae=n.unstable_ImmediatePriority,ve=n.unstable_UserBlockingPriority,Ce=n.unstable_NormalPriority,De=n.unstable_LowPriority,Oe=n.unstable_IdlePriority,mt=n.log,qe=n.unstable_setDisableYieldValue,bt=null,gt=null;function Bt(e){if(typeof mt=="function"&&qe(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(bt,e)}catch{}}var Je=Math.clz32?Math.clz32:Pm,Gn=Math.log,hn=Math.LN2;function Pm(e){return e>>>=0,e===0?32:31-(Gn(e)/hn|0)|0}var js=256,Us=262144,Is=4194304;function Si(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 Ps(e,t,i){var r=e.pendingLanes;if(r===0)return 0;var f=0,y=e.suspendedLanes,D=e.pingedLanes;e=e.warmLanes;var j=r&134217727;return j!==0?(r=j&~y,r!==0?f=Si(r):(D&=j,D!==0?f=Si(D):i||(i=j&~e,i!==0&&(f=Si(i))))):(j=r&~y,j!==0?f=Si(j):D!==0?f=Si(D):i||(i=r&~e,i!==0&&(f=Si(i)))),f===0?0:t!==0&&t!==f&&(t&y)===0&&(y=f&-f,i=t&-t,y>=i||y===32&&(i&4194048)!==0)?t:f}function Mr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fm(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 Lc(){var e=Is;return Is<<=1,(Is&62914560)===0&&(Is=4194304),e}function _a(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Or(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qm(e,t,i,r,f,y){var D=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 j=e.entanglements,W=e.expirationTimes,ne=e.hiddenUpdates;for(i=D&~i;0<i;){var oe=31-Je(i),he=1<<oe;j[oe]=0,W[oe]=-1;var re=ne[oe];if(re!==null)for(ne[oe]=null,oe=0;oe<re.length;oe++){var se=re[oe];se!==null&&(se.lane&=-536870913)}i&=~he}r!==0&&Mc(e,r,0),y!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=y&~(D&~t))}function Mc(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function Oc(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var r=31-Je(i),f=1<<r;f&t|e[r]&t&&(e[r]|=t),i&=~f}}function Bc(e,t){var i=t&-t;return i=(i&42)!==0?1:ma(i),(i&(e.suspendedLanes|t))!==0?0:i}function ma(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 ga(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function zc(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:bp(e.type))}function Hc(e,t){var i=Z.p;try{return Z.p=e,t()}finally{Z.p=i}}var Wn=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Wn,zt="__reactProps$"+Wn,Pi="__reactContainer$"+Wn,va="__reactEvents$"+Wn,Vm="__reactListeners$"+Wn,Ym="__reactHandles$"+Wn,Nc="__reactResources$"+Wn,Br="__reactMarker$"+Wn;function Sa(e){delete e[Ct],delete e[zt],delete e[va],delete e[Vm],delete e[Ym]}function Fi(e){var t=e[Ct];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Pi]||i[Ct]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=sp(e);e!==null;){if(i=e[Ct])return i;e=sp(e)}return t}e=i,i=e.parentNode}return null}function qi(e){if(e=e[Ct]||e[Pi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function zr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Vi(e){var t=e[Nc];return t||(t=e[Nc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function St(e){e[Br]=!0}var jc=new Set,Uc={};function yi(e,t){Yi(e,t),Yi(e+"Capture",t)}function Yi(e,t){for(Uc[e]=t,e=0;e<t.length;e++)jc.add(t[e])}var Gm=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]*$"),Ic={},Pc={};function Wm(e){return gn.call(Pc,e)?!0:gn.call(Ic,e)?!1:Gm.test(e)?Pc[e]=!0:(Ic[e]=!0,!1)}function Fs(e,t,i){if(Wm(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function qs(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 kn(e,t,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+r)}}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 Fc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Km(e,t,i){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var f=r.get,y=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(D){i=""+D,y.call(this,D)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(D){i=""+D},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ya(e){if(!e._valueTracker){var t=Fc(e)?"checked":"value";e._valueTracker=Km(e,t,""+e[t])}}function qc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),r="";return e&&(r=Fc(e)?e.checked?"true":"false":e.value),e=r,e!==i?(t.setValue(e),!0):!1}function Vs(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 Xm=/[\n"\\]/g;function en(e){return e.replace(Xm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ba(e,t,i,r,f,y,D,j){e.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?e.type=D:e.removeAttribute("type"),t!=null?D==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Jt(t)):e.value!==""+Jt(t)&&(e.value=""+Jt(t)):D!=="submit"&&D!=="reset"||e.removeAttribute("value"),t!=null?Ca(e,D,Jt(t)):i!=null?Ca(e,D,Jt(i)):r!=null&&e.removeAttribute("value"),f==null&&y!=null&&(e.defaultChecked=!!y),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?e.name=""+Jt(j):e.removeAttribute("name")}function Vc(e,t,i,r,f,y,D,j){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.type=y),t!=null||i!=null){if(!(y!=="submit"&&y!=="reset"||t!=null)){ya(e);return}i=i!=null?""+Jt(i):"",t=t!=null?""+Jt(t):i,j||t===e.value||(e.value=t),e.defaultValue=t}r=r??f,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=j?e.checked:!!r,e.defaultChecked=!!r,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(e.name=D),ya(e)}function Ca(e,t,i){t==="number"&&Vs(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Gi(e,t,i,r){if(e=e.options,t){t={};for(var f=0;f<i.length;f++)t["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=t.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&r&&(e[i].defaultSelected=!0)}else{for(i=""+Jt(i),t=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,r&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function Yc(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 Gc(e,t,i,r){if(t==null){if(r!=null){if(i!=null)throw Error(o(92));if(K(r)){if(1<r.length)throw Error(o(93));r=r[0]}i=r}i==null&&(i=""),t=i}i=Jt(t),e.defaultValue=i,r=e.textContent,r===i&&r!==""&&r!==null&&(e.value=r),ya(e)}function Wi(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var $m=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 Wc(e,t,i){var r=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,i):typeof i!="number"||i===0||$m.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Kc(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var r in i)!i.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var f in t)r=t[f],t.hasOwnProperty(f)&&i[f]!==r&&Wc(e,f,r)}else for(var y in t)t.hasOwnProperty(y)&&Wc(e,y,t[y])}function wa(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 Qm=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"]]),Zm=/^[\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 Ys(e){return Zm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function An(){}var xa=null;function Ea(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ki=null,Xi=null;function Xc(e){var t=qi(e);if(t&&(e=t.stateNode)){var i=e[zt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ba(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="'+en(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var r=i[t];if(r!==e&&r.form===e.form){var f=r[zt]||null;if(!f)throw Error(o(90));ba(r,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<i.length;t++)r=i[t],r.form===e.form&&qc(r)}break e;case"textarea":Yc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Gi(e,!!i.multiple,t,!1)}}}var ka=!1;function $c(e,t,i){if(ka)return e(t,i);ka=!0;try{var r=e(t);return r}finally{if(ka=!1,(Ki!==null||Xi!==null)&&(Ml(),Ki&&(t=Ki,e=Xi,Xi=Ki=null,Xc(t),e)))for(t=0;t<e.length;t++)Xc(e[t])}}function Hr(e,t){var i=e.stateNode;if(i===null)return null;var r=i[zt]||null;if(r===null)return null;i=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Aa=!1;if(Tn)try{var Nr={};Object.defineProperty(Nr,"passive",{get:function(){Aa=!0}}),window.addEventListener("test",Nr,Nr),window.removeEventListener("test",Nr,Nr)}catch{Aa=!1}var Kn=null,Ta=null,Gs=null;function Qc(){if(Gs)return Gs;var e,t=Ta,i=t.length,r,f="value"in Kn?Kn.value:Kn.textContent,y=f.length;for(e=0;e<i&&t[e]===f[e];e++);var D=i-e;for(r=1;r<=D&&t[i-r]===f[y-r];r++);return Gs=f.slice(e,1<r?1-r:void 0)}function Ws(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 Ks(){return!0}function Zc(){return!1}function Ht(e){function t(i,r,f,y,D){this._reactName=i,this._targetInst=f,this.type=r,this.nativeEvent=y,this.target=D,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(i=e[j],this[j]=i?i(y):y[j]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Ks:Zc,this.isPropagationStopped=Zc,this}return c(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=Ks)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Ks)},persist:function(){},isPersistent:Ks}),t}var bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xs=Ht(bi),jr=c({},bi,{view:0,detail:0}),Jm=Ht(jr),Da,Ra,Ur,$s=c({},jr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ma,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ur&&(Ur&&e.type==="mousemove"?(Da=e.screenX-Ur.screenX,Ra=e.screenY-Ur.screenY):Ra=Da=0,Ur=e),Da)},movementY:function(e){return"movementY"in e?e.movementY:Ra}}),Jc=Ht($s),eg=c({},$s,{dataTransfer:0}),tg=Ht(eg),ng=c({},jr,{relatedTarget:0}),La=Ht(ng),ig=c({},bi,{animationName:0,elapsedTime:0,pseudoElement:0}),rg=Ht(ig),sg=c({},bi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lg=Ht(sg),ag=c({},bi,{data:0}),eh=Ht(ag),og={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ug={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"},cg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=cg[e])?!!t[e]:!1}function Ma(){return hg}var fg=c({},jr,{key:function(e){if(e.key){var t=og[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ws(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ug[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ma,charCode:function(e){return e.type==="keypress"?Ws(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ws(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dg=Ht(fg),pg=c({},$s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),th=Ht(pg),_g=c({},jr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ma}),mg=Ht(_g),gg=c({},bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),vg=Ht(gg),Sg=c({},$s,{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}),yg=Ht(Sg),bg=c({},bi,{newState:0,oldState:0}),Cg=Ht(bg),wg=[9,13,27,32],Oa=Tn&&"CompositionEvent"in window,Ir=null;Tn&&"documentMode"in document&&(Ir=document.documentMode);var xg=Tn&&"TextEvent"in window&&!Ir,nh=Tn&&(!Oa||Ir&&8<Ir&&11>=Ir),ih=" ",rh=!1;function sh(e,t){switch(e){case"keyup":return wg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $i=!1;function Eg(e,t){switch(e){case"compositionend":return lh(t);case"keypress":return t.which!==32?null:(rh=!0,ih);case"textInput":return e=t.data,e===ih&&rh?null:e;default:return null}}function kg(e,t){if($i)return e==="compositionend"||!Oa&&sh(e,t)?(e=Qc(),Gs=Ta=Kn=null,$i=!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 nh&&t.locale!=="ko"?null:t.data;default:return null}}var Ag={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 ah(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ag[e.type]:t==="textarea"}function oh(e,t,i,r){Ki?Xi?Xi.push(r):Xi=[r]:Ki=r,t=Ul(t,"onChange"),0<t.length&&(i=new Xs("onChange","change",null,i,r),e.push({event:i,listeners:t}))}var Pr=null,Fr=null;function Tg(e){Yd(e,0)}function Qs(e){var t=zr(e);if(qc(t))return e}function uh(e,t){if(e==="change")return t}var ch=!1;if(Tn){var Ba;if(Tn){var za="oninput"in document;if(!za){var hh=document.createElement("div");hh.setAttribute("oninput","return;"),za=typeof hh.oninput=="function"}Ba=za}else Ba=!1;ch=Ba&&(!document.documentMode||9<document.documentMode)}function fh(){Pr&&(Pr.detachEvent("onpropertychange",dh),Fr=Pr=null)}function dh(e){if(e.propertyName==="value"&&Qs(Fr)){var t=[];oh(t,Fr,e,Ea(e)),$c(Tg,t)}}function Dg(e,t,i){e==="focusin"?(fh(),Pr=t,Fr=i,Pr.attachEvent("onpropertychange",dh)):e==="focusout"&&fh()}function Rg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qs(Fr)}function Lg(e,t){if(e==="click")return Qs(t)}function Mg(e,t){if(e==="input"||e==="change")return Qs(t)}function Og(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:Og;function qr(e,t){if(Vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(r=0;r<i.length;r++){var f=i[r];if(!gn.call(t,f)||!Vt(e[f],t[f]))return!1}return!0}function ph(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _h(e,t){var i=ph(e);e=0;for(var r;i;){if(i.nodeType===3){if(r=e+i.textContent.length,e<=t&&r>=t)return{node:i,offset:t-e};e=r}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ph(i)}}function mh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vs(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=Vs(e.document)}return t}function Ha(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 Bg=Tn&&"documentMode"in document&&11>=document.documentMode,Qi=null,Na=null,Vr=null,ja=!1;function vh(e,t,i){var r=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ja||Qi==null||Qi!==Vs(r)||(r=Qi,"selectionStart"in r&&Ha(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vr&&qr(Vr,r)||(Vr=r,r=Ul(Na,"onSelect"),0<r.length&&(t=new Xs("onSelect","select",null,t,i),e.push({event:t,listeners:r}),t.target=Qi)))}function Ci(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Zi={animationend:Ci("Animation","AnimationEnd"),animationiteration:Ci("Animation","AnimationIteration"),animationstart:Ci("Animation","AnimationStart"),transitionrun:Ci("Transition","TransitionRun"),transitionstart:Ci("Transition","TransitionStart"),transitioncancel:Ci("Transition","TransitionCancel"),transitionend:Ci("Transition","TransitionEnd")},Ua={},Sh={};Tn&&(Sh=document.createElement("div").style,"AnimationEvent"in window||(delete Zi.animationend.animation,delete Zi.animationiteration.animation,delete Zi.animationstart.animation),"TransitionEvent"in window||delete Zi.transitionend.transition);function wi(e){if(Ua[e])return Ua[e];if(!Zi[e])return e;var t=Zi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Sh)return Ua[e]=t[i];return e}var yh=wi("animationend"),bh=wi("animationiteration"),Ch=wi("animationstart"),zg=wi("transitionrun"),Hg=wi("transitionstart"),Ng=wi("transitioncancel"),wh=wi("transitionend"),xh=new Map,Ia="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(" ");Ia.push("scrollEnd");function fn(e,t){xh.set(e,t),yi(t,[e])}var Zs=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)},tn=[],Ji=0,Pa=0;function Js(){for(var e=Ji,t=Pa=Ji=0;t<e;){var i=tn[t];tn[t++]=null;var r=tn[t];tn[t++]=null;var f=tn[t];tn[t++]=null;var y=tn[t];if(tn[t++]=null,r!==null&&f!==null){var D=r.pending;D===null?f.next=f:(f.next=D.next,D.next=f),r.pending=f}y!==0&&Eh(i,f,y)}}function el(e,t,i,r){tn[Ji++]=e,tn[Ji++]=t,tn[Ji++]=i,tn[Ji++]=r,Pa|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Fa(e,t,i,r){return el(e,t,i,r),tl(e)}function xi(e,t){return el(e,null,null,t),tl(e)}function Eh(e,t,i){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i);for(var f=!1,y=e.return;y!==null;)y.childLanes|=i,r=y.alternate,r!==null&&(r.childLanes|=i),y.tag===22&&(e=y.stateNode,e===null||e._visibility&1||(f=!0)),e=y,y=y.return;return e.tag===3?(y=e.stateNode,f&&t!==null&&(f=31-Je(i),e=y.hiddenUpdates,r=e[f],r===null?e[f]=[t]:r.push(t),t.lane=i|536870912),y):null}function tl(e){if(50<fs)throw fs=0,Zo=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var er={};function jg(e,t,i,r){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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,t,i,r){return new jg(e,t,i,r)}function qa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Dn(e,t){var i=e.alternate;return i===null?(i=Yt(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 kh(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 nl(e,t,i,r,f,y){var D=0;if(r=e,typeof e=="function")qa(e)&&(D=1);else if(typeof e=="string")D=qv(e,i,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case z:return e=Yt(31,i,t,f),e.elementType=z,e.lanes=y,e;case x:return Ei(i.children,f,y,t);case v:D=8,f|=24;break;case _:return e=Yt(12,i,t,f|2),e.elementType=_,e.lanes=y,e;case R:return e=Yt(13,i,t,f),e.elementType=R,e.lanes=y,e;case A:return e=Yt(19,i,t,f),e.elementType=A,e.lanes=y,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case m:D=10;break e;case d:D=9;break e;case E:D=11;break e;case L:D=14;break e;case T:D=16,r=null;break e}D=29,i=Error(o(130,e===null?"null":typeof e,"")),r=null}return t=Yt(D,i,t,f),t.elementType=e,t.type=r,t.lanes=y,t}function Ei(e,t,i,r){return e=Yt(7,e,r,t),e.lanes=i,e}function Va(e,t,i){return e=Yt(6,e,null,t),e.lanes=i,e}function Ah(e){var t=Yt(18,null,null,0);return t.stateNode=e,t}function Ya(e,t,i){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Th=new WeakMap;function nn(e,t){if(typeof e=="object"&&e!==null){var i=Th.get(e);return i!==void 0?i:(t={value:e,source:t,stack:mn(t)},Th.set(e,t),t)}return{value:e,source:t,stack:mn(t)}}var tr=[],nr=0,il=null,Yr=0,rn=[],sn=0,Xn=null,Sn=1,yn="";function Rn(e,t){tr[nr++]=Yr,tr[nr++]=il,il=e,Yr=t}function Dh(e,t,i){rn[sn++]=Sn,rn[sn++]=yn,rn[sn++]=Xn,Xn=e;var r=Sn;e=yn;var f=32-Je(r)-1;r&=~(1<<f),i+=1;var y=32-Je(t)+f;if(30<y){var D=f-f%5;y=(r&(1<<D)-1).toString(32),r>>=D,f-=D,Sn=1<<32-Je(t)+f|i<<f|r,yn=y+e}else Sn=1<<y|i<<f|r,yn=e}function Ga(e){e.return!==null&&(Rn(e,1),Dh(e,1,0))}function Wa(e){for(;e===il;)il=tr[--nr],tr[nr]=null,Yr=tr[--nr],tr[nr]=null;for(;e===Xn;)Xn=rn[--sn],rn[sn]=null,yn=rn[--sn],rn[sn]=null,Sn=rn[--sn],rn[sn]=null}function Rh(e,t){rn[sn++]=Sn,rn[sn++]=yn,rn[sn++]=Xn,Sn=t.id,yn=t.overflow,Xn=e}var wt=null,it=null,Ie=!1,$n=null,ln=!1,Ka=Error(o(519));function Qn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gr(nn(t,e)),Ka}function Lh(e){var t=e.stateNode,i=e.type,r=e.memoizedProps;switch(t[Ct]=e,t[zt]=r,i){case"dialog":He("cancel",t),He("close",t);break;case"iframe":case"object":case"embed":He("load",t);break;case"video":case"audio":for(i=0;i<ps.length;i++)He(ps[i],t);break;case"source":He("error",t);break;case"img":case"image":case"link":He("error",t),He("load",t);break;case"details":He("toggle",t);break;case"input":He("invalid",t),Vc(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":He("invalid",t);break;case"textarea":He("invalid",t),Gc(t,r.value,r.defaultValue,r.children)}i=r.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||r.suppressHydrationWarning===!0||Xd(t.textContent,i)?(r.popover!=null&&(He("beforetoggle",t),He("toggle",t)),r.onScroll!=null&&He("scroll",t),r.onScrollEnd!=null&&He("scrollend",t),r.onClick!=null&&(t.onclick=An),t=!0):t=!1,t||Qn(e,!0)}function Mh(e){for(wt=e.return;wt;)switch(wt.tag){case 5:case 31:case 13:ln=!1;return;case 27:case 3:ln=!0;return;default:wt=wt.return}}function ir(e){if(e!==wt)return!1;if(!Ie)return Mh(e),Ie=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||du(e.type,e.memoizedProps)),i=!i),i&&it&&Qn(e),Mh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));it=rp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));it=rp(e)}else t===27?(t=it,hi(e.type)?(e=vu,vu=null,it=e):it=t):it=wt?on(e.stateNode.nextSibling):null;return!0}function ki(){it=wt=null,Ie=!1}function Xa(){var e=$n;return e!==null&&(It===null?It=e:It.push.apply(It,e),$n=null),e}function Gr(e){$n===null?$n=[e]:$n.push(e)}var $a=B(null),Ai=null,Ln=null;function Zn(e,t,i){N($a,t._currentValue),t._currentValue=i}function Mn(e){e._currentValue=$a.current,P($a)}function Qa(e,t,i){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===i)break;e=e.return}}function Za(e,t,i,r){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var y=f.dependencies;if(y!==null){var D=f.child;y=y.firstContext;e:for(;y!==null;){var j=y;y=f;for(var W=0;W<t.length;W++)if(j.context===t[W]){y.lanes|=i,j=y.alternate,j!==null&&(j.lanes|=i),Qa(y.return,i,e),r||(D=null);break e}y=j.next}}else if(f.tag===18){if(D=f.return,D===null)throw Error(o(341));D.lanes|=i,y=D.alternate,y!==null&&(y.lanes|=i),Qa(D,i,e),D=null}else D=f.child;if(D!==null)D.return=f;else for(D=f;D!==null;){if(D===e){D=null;break}if(f=D.sibling,f!==null){f.return=D.return,D=f;break}D=D.return}f=D}}function rr(e,t,i,r){e=null;for(var f=t,y=!1;f!==null;){if(!y){if((f.flags&524288)!==0)y=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var D=f.alternate;if(D===null)throw Error(o(387));if(D=D.memoizedProps,D!==null){var j=f.type;Vt(f.pendingProps.value,D.value)||(e!==null?e.push(j):e=[j])}}else if(f===X.current){if(D=f.alternate,D===null)throw Error(o(387));D.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Ss):e=[Ss])}f=f.return}e!==null&&Za(t,e,i,r),t.flags|=262144}function rl(e){for(e=e.firstContext;e!==null;){if(!Vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ti(e){Ai=e,Ln=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return Oh(Ai,e)}function sl(e,t){return Ai===null&&Ti(e),Oh(e,t)}function Oh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Ln===null){if(e===null)throw Error(o(308));Ln=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ln=Ln.next=t;return i}var Ug=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},Ig=n.unstable_scheduleCallback,Pg=n.unstable_NormalPriority,ht={$$typeof:m,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ja(){return{controller:new Ug,data:new Map,refCount:0}}function Wr(e){e.refCount--,e.refCount===0&&Ig(Pg,function(){e.controller.abort()})}var Kr=null,eo=0,sr=0,lr=null;function Fg(e,t){if(Kr===null){var i=Kr=[];eo=0,sr=ru(),lr={status:"pending",value:void 0,then:function(r){i.push(r)}}}return eo++,t.then(Bh,Bh),t}function Bh(){if(--eo===0&&Kr!==null){lr!==null&&(lr.status="fulfilled");var e=Kr;Kr=null,sr=0,lr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qg(e,t){var i=[],r={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var f=0;f<i.length;f++)(0,i[f])(t)},function(f){for(r.status="rejected",r.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),r}var zh=Y.S;Y.S=function(e,t){Sd=ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fg(e,t),zh!==null&&zh(e,t)};var Di=B(null);function to(){var e=Di.current;return e!==null?e:et.pooledCache}function ll(e,t){t===null?N(Di,Di.current):N(Di,t.pool)}function Hh(){var e=to();return e===null?null:{parent:ht._currentValue,pool:e}}var ar=Error(o(460)),no=Error(o(474)),al=Error(o(542)),ol={then:function(){}};function Nh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function jh(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(An,An),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ih(e),e;default:if(typeof t.status=="string")t.then(An,An);else{if(e=et,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=r}},function(r){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ih(e),e}throw Li=t,ar}}function Ri(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Li=i,ar):i}}var Li=null;function Uh(){if(Li===null)throw Error(o(459));var e=Li;return Li=null,e}function Ih(e){if(e===ar||e===al)throw Error(o(483))}var or=null,Xr=0;function ul(e){var t=Xr;return Xr+=1,or===null&&(or=[]),jh(or,e,t)}function $r(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function cl(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 Ph(e){function t(J,$){if(e){var te=J.deletions;te===null?(J.deletions=[$],J.flags|=16):te.push($)}}function i(J,$){if(!e)return null;for(;$!==null;)t(J,$),$=$.sibling;return null}function r(J){for(var $=new Map;J!==null;)J.key!==null?$.set(J.key,J):$.set(J.index,J),J=J.sibling;return $}function f(J,$){return J=Dn(J,$),J.index=0,J.sibling=null,J}function y(J,$,te){return J.index=te,e?(te=J.alternate,te!==null?(te=te.index,te<$?(J.flags|=67108866,$):te):(J.flags|=67108866,$)):(J.flags|=1048576,$)}function D(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function j(J,$,te,ue){return $===null||$.tag!==6?($=Va(te,J.mode,ue),$.return=J,$):($=f($,te),$.return=J,$)}function W(J,$,te,ue){var xe=te.type;return xe===x?oe(J,$,te.props.children,ue,te.key):$!==null&&($.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===T&&Ri(xe)===$.type)?($=f($,te.props),$r($,te),$.return=J,$):($=nl(te.type,te.key,te.props,null,J.mode,ue),$r($,te),$.return=J,$)}function ne(J,$,te,ue){return $===null||$.tag!==4||$.stateNode.containerInfo!==te.containerInfo||$.stateNode.implementation!==te.implementation?($=Ya(te,J.mode,ue),$.return=J,$):($=f($,te.children||[]),$.return=J,$)}function oe(J,$,te,ue,xe){return $===null||$.tag!==7?($=Ei(te,J.mode,ue,xe),$.return=J,$):($=f($,te),$.return=J,$)}function he(J,$,te){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Va(""+$,J.mode,te),$.return=J,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case w:return te=nl($.type,$.key,$.props,null,J.mode,te),$r(te,$),te.return=J,te;case k:return $=Ya($,J.mode,te),$.return=J,$;case T:return $=Ri($),he(J,$,te)}if(K($)||V($))return $=Ei($,J.mode,te,null),$.return=J,$;if(typeof $.then=="function")return he(J,ul($),te);if($.$$typeof===m)return he(J,sl(J,$),te);cl(J,$)}return null}function re(J,$,te,ue){var xe=$!==null?$.key:null;if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return xe!==null?null:j(J,$,""+te,ue);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case w:return te.key===xe?W(J,$,te,ue):null;case k:return te.key===xe?ne(J,$,te,ue):null;case T:return te=Ri(te),re(J,$,te,ue)}if(K(te)||V(te))return xe!==null?null:oe(J,$,te,ue,null);if(typeof te.then=="function")return re(J,$,ul(te),ue);if(te.$$typeof===m)return re(J,$,sl(J,te),ue);cl(J,te)}return null}function se(J,$,te,ue,xe){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return J=J.get(te)||null,j($,J,""+ue,xe);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case w:return J=J.get(ue.key===null?te:ue.key)||null,W($,J,ue,xe);case k:return J=J.get(ue.key===null?te:ue.key)||null,ne($,J,ue,xe);case T:return ue=Ri(ue),se(J,$,te,ue,xe)}if(K(ue)||V(ue))return J=J.get(te)||null,oe($,J,ue,xe,null);if(typeof ue.then=="function")return se(J,$,te,ul(ue),xe);if(ue.$$typeof===m)return se(J,$,te,sl($,ue),xe);cl($,ue)}return null}function Se(J,$,te,ue){for(var xe=null,Ve=null,ye=$,Le=$=0,Ue=null;ye!==null&&Le<te.length;Le++){ye.index>Le?(Ue=ye,ye=null):Ue=ye.sibling;var Ye=re(J,ye,te[Le],ue);if(Ye===null){ye===null&&(ye=Ue);break}e&&ye&&Ye.alternate===null&&t(J,ye),$=y(Ye,$,Le),Ve===null?xe=Ye:Ve.sibling=Ye,Ve=Ye,ye=Ue}if(Le===te.length)return i(J,ye),Ie&&Rn(J,Le),xe;if(ye===null){for(;Le<te.length;Le++)ye=he(J,te[Le],ue),ye!==null&&($=y(ye,$,Le),Ve===null?xe=ye:Ve.sibling=ye,Ve=ye);return Ie&&Rn(J,Le),xe}for(ye=r(ye);Le<te.length;Le++)Ue=se(ye,J,Le,te[Le],ue),Ue!==null&&(e&&Ue.alternate!==null&&ye.delete(Ue.key===null?Le:Ue.key),$=y(Ue,$,Le),Ve===null?xe=Ue:Ve.sibling=Ue,Ve=Ue);return e&&ye.forEach(function(mi){return t(J,mi)}),Ie&&Rn(J,Le),xe}function ke(J,$,te,ue){if(te==null)throw Error(o(151));for(var xe=null,Ve=null,ye=$,Le=$=0,Ue=null,Ye=te.next();ye!==null&&!Ye.done;Le++,Ye=te.next()){ye.index>Le?(Ue=ye,ye=null):Ue=ye.sibling;var mi=re(J,ye,Ye.value,ue);if(mi===null){ye===null&&(ye=Ue);break}e&&ye&&mi.alternate===null&&t(J,ye),$=y(mi,$,Le),Ve===null?xe=mi:Ve.sibling=mi,Ve=mi,ye=Ue}if(Ye.done)return i(J,ye),Ie&&Rn(J,Le),xe;if(ye===null){for(;!Ye.done;Le++,Ye=te.next())Ye=he(J,Ye.value,ue),Ye!==null&&($=y(Ye,$,Le),Ve===null?xe=Ye:Ve.sibling=Ye,Ve=Ye);return Ie&&Rn(J,Le),xe}for(ye=r(ye);!Ye.done;Le++,Ye=te.next())Ye=se(ye,J,Le,Ye.value,ue),Ye!==null&&(e&&Ye.alternate!==null&&ye.delete(Ye.key===null?Le:Ye.key),$=y(Ye,$,Le),Ve===null?xe=Ye:Ve.sibling=Ye,Ve=Ye);return e&&ye.forEach(function(e0){return t(J,e0)}),Ie&&Rn(J,Le),xe}function Ze(J,$,te,ue){if(typeof te=="object"&&te!==null&&te.type===x&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case w:e:{for(var xe=te.key;$!==null;){if($.key===xe){if(xe=te.type,xe===x){if($.tag===7){i(J,$.sibling),ue=f($,te.props.children),ue.return=J,J=ue;break e}}else if($.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===T&&Ri(xe)===$.type){i(J,$.sibling),ue=f($,te.props),$r(ue,te),ue.return=J,J=ue;break e}i(J,$);break}else t(J,$);$=$.sibling}te.type===x?(ue=Ei(te.props.children,J.mode,ue,te.key),ue.return=J,J=ue):(ue=nl(te.type,te.key,te.props,null,J.mode,ue),$r(ue,te),ue.return=J,J=ue)}return D(J);case k:e:{for(xe=te.key;$!==null;){if($.key===xe)if($.tag===4&&$.stateNode.containerInfo===te.containerInfo&&$.stateNode.implementation===te.implementation){i(J,$.sibling),ue=f($,te.children||[]),ue.return=J,J=ue;break e}else{i(J,$);break}else t(J,$);$=$.sibling}ue=Ya(te,J.mode,ue),ue.return=J,J=ue}return D(J);case T:return te=Ri(te),Ze(J,$,te,ue)}if(K(te))return Se(J,$,te,ue);if(V(te)){if(xe=V(te),typeof xe!="function")throw Error(o(150));return te=xe.call(te),ke(J,$,te,ue)}if(typeof te.then=="function")return Ze(J,$,ul(te),ue);if(te.$$typeof===m)return Ze(J,$,sl(J,te),ue);cl(J,te)}return typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint"?(te=""+te,$!==null&&$.tag===6?(i(J,$.sibling),ue=f($,te),ue.return=J,J=ue):(i(J,$),ue=Va(te,J.mode,ue),ue.return=J,J=ue),D(J)):i(J,$)}return function(J,$,te,ue){try{Xr=0;var xe=Ze(J,$,te,ue);return or=null,xe}catch(ye){if(ye===ar||ye===al)throw ye;var Ve=Yt(29,ye,null,J.mode);return Ve.lanes=ue,Ve.return=J,Ve}finally{}}}var Mi=Ph(!0),Fh=Ph(!1),Jn=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ro(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 ei(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ti(e,t,i){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(We&2)!==0){var f=r.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),r.pending=t,t=tl(e),Eh(e,null,i),t}return el(e,r,t,i),tl(e)}function Qr(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Oc(e,i)}}function so(e,t){var i=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,i===r)){var f=null,y=null;if(i=i.firstBaseUpdate,i!==null){do{var D={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};y===null?f=y=D:y=y.next=D,i=i.next}while(i!==null);y===null?f=y=t:y=y.next=t}else f=y=t;i={baseState:r.baseState,firstBaseUpdate:f,lastBaseUpdate:y,shared:r.shared,callbacks:r.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var lo=!1;function Zr(){if(lo){var e=lr;if(e!==null)throw e}}function Jr(e,t,i,r){lo=!1;var f=e.updateQueue;Jn=!1;var y=f.firstBaseUpdate,D=f.lastBaseUpdate,j=f.shared.pending;if(j!==null){f.shared.pending=null;var W=j,ne=W.next;W.next=null,D===null?y=ne:D.next=ne,D=W;var oe=e.alternate;oe!==null&&(oe=oe.updateQueue,j=oe.lastBaseUpdate,j!==D&&(j===null?oe.firstBaseUpdate=ne:j.next=ne,oe.lastBaseUpdate=W))}if(y!==null){var he=f.baseState;D=0,oe=ne=W=null,j=y;do{var re=j.lane&-536870913,se=re!==j.lane;if(se?(je&re)===re:(r&re)===re){re!==0&&re===sr&&(lo=!0),oe!==null&&(oe=oe.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var Se=e,ke=j;re=t;var Ze=i;switch(ke.tag){case 1:if(Se=ke.payload,typeof Se=="function"){he=Se.call(Ze,he,re);break e}he=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=ke.payload,re=typeof Se=="function"?Se.call(Ze,he,re):Se,re==null)break e;he=c({},he,re);break e;case 2:Jn=!0}}re=j.callback,re!==null&&(e.flags|=64,se&&(e.flags|=8192),se=f.callbacks,se===null?f.callbacks=[re]:se.push(re))}else se={lane:re,tag:j.tag,payload:j.payload,callback:j.callback,next:null},oe===null?(ne=oe=se,W=he):oe=oe.next=se,D|=re;if(j=j.next,j===null){if(j=f.shared.pending,j===null)break;se=j,j=se.next,se.next=null,f.lastBaseUpdate=se,f.shared.pending=null}}while(!0);oe===null&&(W=he),f.baseState=W,f.firstBaseUpdate=ne,f.lastBaseUpdate=oe,y===null&&(f.shared.lanes=0),li|=D,e.lanes=D,e.memoizedState=he}}function qh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Vh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)qh(i[e],t)}var ur=B(null),hl=B(0);function Yh(e,t){e=Pn,N(hl,e),N(ur,t),Pn=e|t.baseLanes}function ao(){N(hl,Pn),N(ur,ur.current)}function oo(){Pn=hl.current,P(ur),P(hl)}var Gt=B(null),an=null;function ni(e){var t=e.alternate;N(ut,ut.current&1),N(Gt,e),an===null&&(t===null||ur.current!==null||t.memoizedState!==null)&&(an=e)}function uo(e){N(ut,ut.current),N(Gt,e),an===null&&(an=e)}function Gh(e){e.tag===22?(N(ut,ut.current),N(Gt,e),an===null&&(an=e)):ii()}function ii(){N(ut,ut.current),N(Gt,Gt.current)}function Wt(e){P(Gt),an===e&&(an=null),P(ut)}var ut=B(0);function fl(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||mu(i)||gu(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 On=0,Re=null,$e=null,ft=null,dl=!1,cr=!1,Oi=!1,pl=0,es=0,hr=null,Vg=0;function lt(){throw Error(o(321))}function co(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Vt(e[i],t[i]))return!1;return!0}function ho(e,t,i,r,f,y){return On=y,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Y.H=e===null||e.memoizedState===null?Rf:Ao,Oi=!1,y=i(r,f),Oi=!1,cr&&(y=Kh(t,i,r,f)),Wh(e),y}function Wh(e){Y.H=is;var t=$e!==null&&$e.next!==null;if(On=0,ft=$e=Re=null,dl=!1,es=0,hr=null,t)throw Error(o(300));e===null||dt||(e=e.dependencies,e!==null&&rl(e)&&(dt=!0))}function Kh(e,t,i,r){Re=e;var f=0;do{if(cr&&(hr=null),es=0,cr=!1,25<=f)throw Error(o(301));if(f+=1,ft=$e=null,e.updateQueue!=null){var y=e.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}Y.H=Lf,y=t(i,r)}while(cr);return y}function Yg(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?ts(t):t,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(Re.flags|=1024),t}function fo(){var e=pl!==0;return pl=0,e}function po(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function _o(e){if(dl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}dl=!1}On=0,ft=$e=Re=null,cr=!1,es=pl=0,hr=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?Re.memoizedState=ft=e:ft=ft.next=e,ft}function ct(){if($e===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=ft===null?Re.memoizedState:ft.next;if(t!==null)ft=t,$e=e;else{if(e===null)throw Re.alternate===null?Error(o(467)):Error(o(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},ft===null?Re.memoizedState=ft=e:ft=ft.next=e}return ft}function _l(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ts(e){var t=es;return es+=1,hr===null&&(hr=[]),e=jh(hr,e,t),t=Re,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,Y.H=t===null||t.memoizedState===null?Rf:Ao),e}function ml(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ts(e);if(e.$$typeof===m)return xt(e)}throw Error(o(438,String(e)))}function mo(e){var t=null,i=Re.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var r=Re.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=_l(),Re.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),r=0;r<e;r++)i[r]=H;return t.index++,i}function Bn(e,t){return typeof t=="function"?t(e):t}function gl(e){var t=ct();return go(t,$e,e)}function go(e,t,i){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=i;var f=e.baseQueue,y=r.pending;if(y!==null){if(f!==null){var D=f.next;f.next=y.next,y.next=D}t.baseQueue=f=y,r.pending=null}if(y=e.baseState,f===null)e.memoizedState=y;else{t=f.next;var j=D=null,W=null,ne=t,oe=!1;do{var he=ne.lane&-536870913;if(he!==ne.lane?(je&he)===he:(On&he)===he){var re=ne.revertLane;if(re===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),he===sr&&(oe=!0);else if((On&re)===re){ne=ne.next,re===sr&&(oe=!0);continue}else he={lane:0,revertLane:ne.revertLane,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},W===null?(j=W=he,D=y):W=W.next=he,Re.lanes|=re,li|=re;he=ne.action,Oi&&i(y,he),y=ne.hasEagerState?ne.eagerState:i(y,he)}else re={lane:he,revertLane:ne.revertLane,gesture:ne.gesture,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},W===null?(j=W=re,D=y):W=W.next=re,Re.lanes|=he,li|=he;ne=ne.next}while(ne!==null&&ne!==t);if(W===null?D=y:W.next=j,!Vt(y,e.memoizedState)&&(dt=!0,oe&&(i=lr,i!==null)))throw i;e.memoizedState=y,e.baseState=D,e.baseQueue=W,r.lastRenderedState=y}return f===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function vo(e){var t=ct(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var r=i.dispatch,f=i.pending,y=t.memoizedState;if(f!==null){i.pending=null;var D=f=f.next;do y=e(y,D.action),D=D.next;while(D!==f);Vt(y,t.memoizedState)||(dt=!0),t.memoizedState=y,t.baseQueue===null&&(t.baseState=y),i.lastRenderedState=y}return[y,r]}function Xh(e,t,i){var r=Re,f=ct(),y=Ie;if(y){if(i===void 0)throw Error(o(407));i=i()}else i=t();var D=!Vt(($e||f).memoizedState,i);if(D&&(f.memoizedState=i,dt=!0),f=f.queue,bo(Zh.bind(null,r,f,e),[e]),f.getSnapshot!==t||D||ft!==null&&ft.memoizedState.tag&1){if(r.flags|=2048,fr(9,{destroy:void 0},Qh.bind(null,r,f,i,t),null),et===null)throw Error(o(349));y||(On&127)!==0||$h(r,t,i)}return i}function $h(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Re.updateQueue,t===null?(t=_l(),Re.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Qh(e,t,i,r){t.value=i,t.getSnapshot=r,Jh(t)&&ef(e)}function Zh(e,t,i){return i(function(){Jh(t)&&ef(e)})}function Jh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Vt(e,i)}catch{return!0}}function ef(e){var t=xi(e,2);t!==null&&Pt(t,e,2)}function So(e){var t=Lt();if(typeof e=="function"){var i=e;if(e=i(),Oi){Bt(!0);try{i()}finally{Bt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:e},t}function tf(e,t,i,r){return e.baseState=i,go(e,$e,typeof r=="function"?r:Bn)}function Gg(e,t,i,r,f){if(yl(e))throw Error(o(485));if(e=t.action,e!==null){var y={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){y.listeners.push(D)}};Y.T!==null?i(!0):y.isTransition=!1,r(y),i=t.pending,i===null?(y.next=t.pending=y,nf(t,y)):(y.next=i.next,t.pending=i.next=y)}}function nf(e,t){var i=t.action,r=t.payload,f=e.state;if(t.isTransition){var y=Y.T,D={};Y.T=D;try{var j=i(f,r),W=Y.S;W!==null&&W(D,j),rf(e,t,j)}catch(ne){yo(e,t,ne)}finally{y!==null&&D.types!==null&&(y.types=D.types),Y.T=y}}else try{y=i(f,r),rf(e,t,y)}catch(ne){yo(e,t,ne)}}function rf(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(r){sf(e,t,r)},function(r){return yo(e,t,r)}):sf(e,t,i)}function sf(e,t,i){t.status="fulfilled",t.value=i,lf(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,nf(e,i)))}function yo(e,t,i){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=i,lf(t),t=t.next;while(t!==r)}e.action=null}function lf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function af(e,t){return t}function of(e,t){if(Ie){var i=et.formState;if(i!==null){e:{var r=Re;if(Ie){if(it){t:{for(var f=it,y=ln;f.nodeType!==8;){if(!y){f=null;break t}if(f=on(f.nextSibling),f===null){f=null;break t}}y=f.data,f=y==="F!"||y==="F"?f:null}if(f){it=on(f.nextSibling),r=f.data==="F!";break e}}Qn(r)}r=!1}r&&(t=i[0])}}return i=Lt(),i.memoizedState=i.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:af,lastRenderedState:t},i.queue=r,i=Af.bind(null,Re,r),r.dispatch=i,r=So(!1),y=ko.bind(null,Re,!1,r.queue),r=Lt(),f={state:t,dispatch:null,action:e,pending:null},r.queue=f,i=Gg.bind(null,Re,f,y,i),f.dispatch=i,r.memoizedState=e,[t,i,!1]}function uf(e){var t=ct();return cf(t,$e,e)}function cf(e,t,i){if(t=go(e,t,af)[0],e=gl(Bn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ts(t)}catch(D){throw D===ar?al:D}else r=t;t=ct();var f=t.queue,y=f.dispatch;return i!==t.memoizedState&&(Re.flags|=2048,fr(9,{destroy:void 0},Wg.bind(null,f,i),null)),[r,y,e]}function Wg(e,t){e.action=t}function hf(e){var t=ct(),i=$e;if(i!==null)return cf(t,i,e);ct(),t=t.memoizedState,i=ct();var r=i.queue.dispatch;return i.memoizedState=e,[t,r,!1]}function fr(e,t,i,r){return e={tag:e,create:i,deps:r,inst:t,next:null},t=Re.updateQueue,t===null&&(t=_l(),Re.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(r=i.next,i.next=e,e.next=r,t.lastEffect=e),e}function ff(){return ct().memoizedState}function vl(e,t,i,r){var f=Lt();Re.flags|=e,f.memoizedState=fr(1|t,{destroy:void 0},i,r===void 0?null:r)}function Sl(e,t,i,r){var f=ct();r=r===void 0?null:r;var y=f.memoizedState.inst;$e!==null&&r!==null&&co(r,$e.memoizedState.deps)?f.memoizedState=fr(t,y,i,r):(Re.flags|=e,f.memoizedState=fr(1|t,y,i,r))}function df(e,t){vl(8390656,8,e,t)}function bo(e,t){Sl(2048,8,e,t)}function Kg(e){Re.flags|=4;var t=Re.updateQueue;if(t===null)t=_l(),Re.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function pf(e){var t=ct().memoizedState;return Kg({ref:t,nextImpl:e}),function(){if((We&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function _f(e,t){return Sl(4,2,e,t)}function mf(e,t){return Sl(4,4,e,t)}function gf(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 vf(e,t,i){i=i!=null?i.concat([e]):null,Sl(4,4,gf.bind(null,t,e),i)}function Co(){}function Sf(e,t){var i=ct();t=t===void 0?null:t;var r=i.memoizedState;return t!==null&&co(t,r[1])?r[0]:(i.memoizedState=[e,t],e)}function yf(e,t){var i=ct();t=t===void 0?null:t;var r=i.memoizedState;if(t!==null&&co(t,r[1]))return r[0];if(r=e(),Oi){Bt(!0);try{e()}finally{Bt(!1)}}return i.memoizedState=[r,t],r}function wo(e,t,i){return i===void 0||(On&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=bd(),Re.lanes|=e,li|=e,i)}function bf(e,t,i,r){return Vt(i,t)?i:ur.current!==null?(e=wo(e,i,r),Vt(e,t)||(dt=!0),e):(On&42)===0||(On&1073741824)!==0&&(je&261930)===0?(dt=!0,e.memoizedState=i):(e=bd(),Re.lanes|=e,li|=e,t)}function Cf(e,t,i,r,f){var y=Z.p;Z.p=y!==0&&8>y?y:8;var D=Y.T,j={};Y.T=j,ko(e,!1,t,i);try{var W=f(),ne=Y.S;if(ne!==null&&ne(j,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var oe=qg(W,r);ns(e,t,oe,$t(e))}else ns(e,t,r,$t(e))}catch(he){ns(e,t,{then:function(){},status:"rejected",reason:he},$t())}finally{Z.p=y,D!==null&&j.types!==null&&(D.types=j.types),Y.T=D}}function Xg(){}function xo(e,t,i,r){if(e.tag!==5)throw Error(o(476));var f=wf(e).queue;Cf(e,f,t,ee,i===null?Xg:function(){return xf(e),i(r)})}function wf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:ee},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xf(e){var t=wf(e);t.next===null&&(t=e.alternate.memoizedState),ns(e,t.next.queue,{},$t())}function Eo(){return xt(Ss)}function Ef(){return ct().memoizedState}function kf(){return ct().memoizedState}function $g(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=$t();e=ei(i);var r=ti(t,e,i);r!==null&&(Pt(r,t,i),Qr(r,t,i)),t={cache:Ja()},e.payload=t;return}t=t.return}}function Qg(e,t,i){var r=$t();i={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},yl(e)?Tf(t,i):(i=Fa(e,t,i,r),i!==null&&(Pt(i,e,r),Df(i,t,r)))}function Af(e,t,i){var r=$t();ns(e,t,i,r)}function ns(e,t,i,r){var f={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(yl(e))Tf(t,f);else{var y=e.alternate;if(e.lanes===0&&(y===null||y.lanes===0)&&(y=t.lastRenderedReducer,y!==null))try{var D=t.lastRenderedState,j=y(D,i);if(f.hasEagerState=!0,f.eagerState=j,Vt(j,D))return el(e,t,f,0),et===null&&Js(),!1}catch{}finally{}if(i=Fa(e,t,f,r),i!==null)return Pt(i,e,r),Df(i,t,r),!0}return!1}function ko(e,t,i,r){if(r={lane:2,revertLane:ru(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},yl(e)){if(t)throw Error(o(479))}else t=Fa(e,i,r,2),t!==null&&Pt(t,e,2)}function yl(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function Tf(e,t){cr=dl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Df(e,t,i){if((i&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Oc(e,i)}}var is={readContext:xt,use:ml,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt};is.useEffectEvent=lt;var Rf={readContext:xt,use:ml,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:df,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,vl(4194308,4,gf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return vl(4194308,4,e,t)},useInsertionEffect:function(e,t){vl(4,2,e,t)},useMemo:function(e,t){var i=Lt();t=t===void 0?null:t;var r=e();if(Oi){Bt(!0);try{e()}finally{Bt(!1)}}return i.memoizedState=[r,t],r},useReducer:function(e,t,i){var r=Lt();if(i!==void 0){var f=i(t);if(Oi){Bt(!0);try{i(t)}finally{Bt(!1)}}}else f=t;return r.memoizedState=r.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},r.queue=e,e=e.dispatch=Qg.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=So(e);var t=e.queue,i=Af.bind(null,Re,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Co,useDeferredValue:function(e,t){var i=Lt();return wo(i,e,t)},useTransition:function(){var e=So(!1);return e=Cf.bind(null,Re,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var r=Re,f=Lt();if(Ie){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),et===null)throw Error(o(349));(je&127)!==0||$h(r,t,i)}f.memoizedState=i;var y={value:i,getSnapshot:t};return f.queue=y,df(Zh.bind(null,r,y,e),[e]),r.flags|=2048,fr(9,{destroy:void 0},Qh.bind(null,r,y,i,t),null),i},useId:function(){var e=Lt(),t=et.identifierPrefix;if(Ie){var i=yn,r=Sn;i=(r&~(1<<32-Je(r)-1)).toString(32)+i,t="_"+t+"R_"+i,i=pl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Vg++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Eo,useFormState:of,useActionState:of,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=ko.bind(null,Re,!0,i),i.dispatch=t,[e,t]},useMemoCache:mo,useCacheRefresh:function(){return Lt().memoizedState=$g.bind(null,Re)},useEffectEvent:function(e){var t=Lt(),i={impl:e};return t.memoizedState=i,function(){if((We&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Ao={readContext:xt,use:ml,useCallback:Sf,useContext:xt,useEffect:bo,useImperativeHandle:vf,useInsertionEffect:_f,useLayoutEffect:mf,useMemo:yf,useReducer:gl,useRef:ff,useState:function(){return gl(Bn)},useDebugValue:Co,useDeferredValue:function(e,t){var i=ct();return bf(i,$e.memoizedState,e,t)},useTransition:function(){var e=gl(Bn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:ts(e),t]},useSyncExternalStore:Xh,useId:Ef,useHostTransitionStatus:Eo,useFormState:uf,useActionState:uf,useOptimistic:function(e,t){var i=ct();return tf(i,$e,e,t)},useMemoCache:mo,useCacheRefresh:kf};Ao.useEffectEvent=pf;var Lf={readContext:xt,use:ml,useCallback:Sf,useContext:xt,useEffect:bo,useImperativeHandle:vf,useInsertionEffect:_f,useLayoutEffect:mf,useMemo:yf,useReducer:vo,useRef:ff,useState:function(){return vo(Bn)},useDebugValue:Co,useDeferredValue:function(e,t){var i=ct();return $e===null?wo(i,e,t):bf(i,$e.memoizedState,e,t)},useTransition:function(){var e=vo(Bn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:ts(e),t]},useSyncExternalStore:Xh,useId:Ef,useHostTransitionStatus:Eo,useFormState:hf,useActionState:hf,useOptimistic:function(e,t){var i=ct();return $e!==null?tf(i,$e,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:mo,useCacheRefresh:kf};Lf.useEffectEvent=pf;function To(e,t,i,r){t=e.memoizedState,i=i(r,t),i=i==null?t:c({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Do={enqueueSetState:function(e,t,i){e=e._reactInternals;var r=$t(),f=ei(r);f.payload=t,i!=null&&(f.callback=i),t=ti(e,f,r),t!==null&&(Pt(t,e,r),Qr(t,e,r))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var r=$t(),f=ei(r);f.tag=1,f.payload=t,i!=null&&(f.callback=i),t=ti(e,f,r),t!==null&&(Pt(t,e,r),Qr(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=$t(),r=ei(i);r.tag=2,t!=null&&(r.callback=t),t=ti(e,r,i),t!==null&&(Pt(t,e,i),Qr(t,e,i))}};function Mf(e,t,i,r,f,y,D){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,y,D):t.prototype&&t.prototype.isPureReactComponent?!qr(i,r)||!qr(f,y):!0}function Of(e,t,i,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,r),t.state!==e&&Do.enqueueReplaceState(t,t.state,null)}function Bi(e,t){var i=t;if("ref"in t){i={};for(var r in t)r!=="ref"&&(i[r]=t[r])}if(e=e.defaultProps){i===t&&(i=c({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function Bf(e){Zs(e)}function zf(e){console.error(e)}function Hf(e){Zs(e)}function bl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Nf(e,t,i){try{var r=e.onCaughtError;r(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Ro(e,t,i){return i=ei(i),i.tag=3,i.payload={element:null},i.callback=function(){bl(e,t)},i}function jf(e){return e=ei(e),e.tag=3,e}function Uf(e,t,i,r){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var y=r.value;e.payload=function(){return f(y)},e.callback=function(){Nf(t,i,r)}}var D=i.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(e.callback=function(){Nf(t,i,r),typeof f!="function"&&(ai===null?ai=new Set([this]):ai.add(this));var j=r.stack;this.componentDidCatch(r.value,{componentStack:j!==null?j:""})})}function Zg(e,t,i,r,f){if(i.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=i.alternate,t!==null&&rr(t,i,f,!0),i=Gt.current,i!==null){switch(i.tag){case 31:case 13:return an===null?Ol():i.alternate===null&&at===0&&(at=3),i.flags&=-257,i.flags|=65536,i.lanes=f,r===ol?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([r]):t.add(r),tu(e,r,f)),!1;case 22:return i.flags|=65536,r===ol?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([r]):i.add(r)),tu(e,r,f)),!1}throw Error(o(435,i.tag))}return tu(e,r,f),Ol(),!1}if(Ie)return t=Gt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,r!==Ka&&(e=Error(o(422),{cause:r}),Gr(nn(e,i)))):(r!==Ka&&(t=Error(o(423),{cause:r}),Gr(nn(t,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,r=nn(r,i),f=Ro(e.stateNode,r,f),so(e,f),at!==4&&(at=2)),!1;var y=Error(o(520),{cause:r});if(y=nn(y,i),hs===null?hs=[y]:hs.push(y),at!==4&&(at=2),t===null)return!0;r=nn(r,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=Ro(i.stateNode,r,e),so(i,e),!1;case 1:if(t=i.type,y=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ai===null||!ai.has(y))))return i.flags|=65536,f&=-f,i.lanes|=f,f=jf(f),Uf(f,e,i,r),so(i,f),!1}i=i.return}while(i!==null);return!1}var Lo=Error(o(461)),dt=!1;function Et(e,t,i,r){t.child=e===null?Fh(t,null,i,r):Mi(t,e.child,i,r)}function If(e,t,i,r,f){i=i.render;var y=t.ref;if("ref"in r){var D={};for(var j in r)j!=="ref"&&(D[j]=r[j])}else D=r;return Ti(t),r=ho(e,t,i,D,y,f),j=fo(),e!==null&&!dt?(po(e,t,f),zn(e,t,f)):(Ie&&j&&Ga(t),t.flags|=1,Et(e,t,r,f),t.child)}function Pf(e,t,i,r,f){if(e===null){var y=i.type;return typeof y=="function"&&!qa(y)&&y.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=y,Ff(e,t,y,r,f)):(e=nl(i.type,null,r,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(y=e.child,!Uo(e,f)){var D=y.memoizedProps;if(i=i.compare,i=i!==null?i:qr,i(D,r)&&e.ref===t.ref)return zn(e,t,f)}return t.flags|=1,e=Dn(y,r),e.ref=t.ref,e.return=t,t.child=e}function Ff(e,t,i,r,f){if(e!==null){var y=e.memoizedProps;if(qr(y,r)&&e.ref===t.ref)if(dt=!1,t.pendingProps=r=y,Uo(e,f))(e.flags&131072)!==0&&(dt=!0);else return t.lanes=e.lanes,zn(e,t,f)}return Mo(e,t,i,r,f)}function qf(e,t,i,r){var f=r.children,y=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(y=y!==null?y.baseLanes|i:i,e!==null){for(r=t.child=e.child,f=0;r!==null;)f=f|r.lanes|r.childLanes,r=r.sibling;r=f&~y}else r=0,t.child=null;return Vf(e,t,y,i,r)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ll(t,y!==null?y.cachePool:null),y!==null?Yh(t,y):ao(),Gh(t);else return r=t.lanes=536870912,Vf(e,t,y!==null?y.baseLanes|i:i,i,r)}else y!==null?(ll(t,y.cachePool),Yh(t,y),ii(),t.memoizedState=null):(e!==null&&ll(t,null),ao(),ii());return Et(e,t,f,i),t.child}function rs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vf(e,t,i,r,f){var y=to();return y=y===null?null:{parent:ht._currentValue,pool:y},t.memoizedState={baseLanes:i,cachePool:y},e!==null&&ll(t,null),ao(),Gh(t),e!==null&&rr(e,t,r,!0),t.childLanes=f,null}function Cl(e,t){return t=xl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Yf(e,t,i){return Mi(t,e.child,null,i),e=Cl(t,t.pendingProps),e.flags|=2,Wt(t),t.memoizedState=null,e}function Jg(e,t,i){var r=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ie){if(r.mode==="hidden")return e=Cl(t,r),t.lanes=536870912,rs(null,e);if(uo(t),(e=it)?(e=ip(e,ln),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xn!==null?{id:Sn,overflow:yn}:null,retryLane:536870912,hydrationErrors:null},i=Ah(e),i.return=t,t.child=i,wt=t,it=null)):e=null,e===null)throw Qn(t);return t.lanes=536870912,null}return Cl(t,r)}var y=e.memoizedState;if(y!==null){var D=y.dehydrated;if(uo(t),f)if(t.flags&256)t.flags&=-257,t=Yf(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(dt||rr(e,t,i,!1),f=(i&e.childLanes)!==0,dt||f){if(r=et,r!==null&&(D=Bc(r,i),D!==0&&D!==y.retryLane))throw y.retryLane=D,xi(e,D),Pt(r,e,D),Lo;Ol(),t=Yf(e,t,i)}else e=y.treeContext,it=on(D.nextSibling),wt=t,Ie=!0,$n=null,ln=!1,e!==null&&Rh(t,e),t=Cl(t,r),t.flags|=4096;return t}return e=Dn(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function wl(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 Mo(e,t,i,r,f){return Ti(t),i=ho(e,t,i,r,void 0,f),r=fo(),e!==null&&!dt?(po(e,t,f),zn(e,t,f)):(Ie&&r&&Ga(t),t.flags|=1,Et(e,t,i,f),t.child)}function Gf(e,t,i,r,f,y){return Ti(t),t.updateQueue=null,i=Kh(t,r,i,f),Wh(e),r=fo(),e!==null&&!dt?(po(e,t,y),zn(e,t,y)):(Ie&&r&&Ga(t),t.flags|=1,Et(e,t,i,y),t.child)}function Wf(e,t,i,r,f){if(Ti(t),t.stateNode===null){var y=er,D=i.contextType;typeof D=="object"&&D!==null&&(y=xt(D)),y=new i(r,y),t.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Do,t.stateNode=y,y._reactInternals=t,y=t.stateNode,y.props=r,y.state=t.memoizedState,y.refs={},io(t),D=i.contextType,y.context=typeof D=="object"&&D!==null?xt(D):er,y.state=t.memoizedState,D=i.getDerivedStateFromProps,typeof D=="function"&&(To(t,i,D,r),y.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(D=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),D!==y.state&&Do.enqueueReplaceState(y,y.state,null),Jr(t,r,y,f),Zr(),y.state=t.memoizedState),typeof y.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){y=t.stateNode;var j=t.memoizedProps,W=Bi(i,j);y.props=W;var ne=y.context,oe=i.contextType;D=er,typeof oe=="object"&&oe!==null&&(D=xt(oe));var he=i.getDerivedStateFromProps;oe=typeof he=="function"||typeof y.getSnapshotBeforeUpdate=="function",j=t.pendingProps!==j,oe||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(j||ne!==D)&&Of(t,y,r,D),Jn=!1;var re=t.memoizedState;y.state=re,Jr(t,r,y,f),Zr(),ne=t.memoizedState,j||re!==ne||Jn?(typeof he=="function"&&(To(t,i,he,r),ne=t.memoizedState),(W=Jn||Mf(t,i,W,r,re,ne,D))?(oe||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(t.flags|=4194308)):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=ne),y.props=r,y.state=ne,y.context=D,r=W):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{y=t.stateNode,ro(e,t),D=t.memoizedProps,oe=Bi(i,D),y.props=oe,he=t.pendingProps,re=y.context,ne=i.contextType,W=er,typeof ne=="object"&&ne!==null&&(W=xt(ne)),j=i.getDerivedStateFromProps,(ne=typeof j=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(D!==he||re!==W)&&Of(t,y,r,W),Jn=!1,re=t.memoizedState,y.state=re,Jr(t,r,y,f),Zr();var se=t.memoizedState;D!==he||re!==se||Jn||e!==null&&e.dependencies!==null&&rl(e.dependencies)?(typeof j=="function"&&(To(t,i,j,r),se=t.memoizedState),(oe=Jn||Mf(t,i,oe,r,re,se,W)||e!==null&&e.dependencies!==null&&rl(e.dependencies))?(ne||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(r,se,W),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(r,se,W)),typeof y.componentDidUpdate=="function"&&(t.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof y.componentDidUpdate!="function"||D===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=se),y.props=r,y.state=se,y.context=W,r=oe):(typeof y.componentDidUpdate!="function"||D===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),r=!1)}return y=r,wl(e,t),r=(t.flags&128)!==0,y||r?(y=t.stateNode,i=r&&typeof i.getDerivedStateFromError!="function"?null:y.render(),t.flags|=1,e!==null&&r?(t.child=Mi(t,e.child,null,f),t.child=Mi(t,null,i,f)):Et(e,t,i,f),t.memoizedState=y.state,e=t.child):e=zn(e,t,f),e}function Kf(e,t,i,r){return ki(),t.flags|=256,Et(e,t,i,r),t.child}var Oo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bo(e){return{baseLanes:e,cachePool:Hh()}}function zo(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Xt),e}function Xf(e,t,i){var r=t.pendingProps,f=!1,y=(t.flags&128)!==0,D;if((D=y)||(D=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),D&&(f=!0,t.flags&=-129),D=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ie){if(f?ni(t):ii(),(e=it)?(e=ip(e,ln),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xn!==null?{id:Sn,overflow:yn}:null,retryLane:536870912,hydrationErrors:null},i=Ah(e),i.return=t,t.child=i,wt=t,it=null)):e=null,e===null)throw Qn(t);return gu(e)?t.lanes=32:t.lanes=536870912,null}var j=r.children;return r=r.fallback,f?(ii(),f=t.mode,j=xl({mode:"hidden",children:j},f),r=Ei(r,f,i,null),j.return=t,r.return=t,j.sibling=r,t.child=j,r=t.child,r.memoizedState=Bo(i),r.childLanes=zo(e,D,i),t.memoizedState=Oo,rs(null,r)):(ni(t),Ho(t,j))}var W=e.memoizedState;if(W!==null&&(j=W.dehydrated,j!==null)){if(y)t.flags&256?(ni(t),t.flags&=-257,t=No(e,t,i)):t.memoizedState!==null?(ii(),t.child=e.child,t.flags|=128,t=null):(ii(),j=r.fallback,f=t.mode,r=xl({mode:"visible",children:r.children},f),j=Ei(j,f,i,null),j.flags|=2,r.return=t,j.return=t,r.sibling=j,t.child=r,Mi(t,e.child,null,i),r=t.child,r.memoizedState=Bo(i),r.childLanes=zo(e,D,i),t.memoizedState=Oo,t=rs(null,r));else if(ni(t),gu(j)){if(D=j.nextSibling&&j.nextSibling.dataset,D)var ne=D.dgst;D=ne,r=Error(o(419)),r.stack="",r.digest=D,Gr({value:r,source:null,stack:null}),t=No(e,t,i)}else if(dt||rr(e,t,i,!1),D=(i&e.childLanes)!==0,dt||D){if(D=et,D!==null&&(r=Bc(D,i),r!==0&&r!==W.retryLane))throw W.retryLane=r,xi(e,r),Pt(D,e,r),Lo;mu(j)||Ol(),t=No(e,t,i)}else mu(j)?(t.flags|=192,t.child=e.child,t=null):(e=W.treeContext,it=on(j.nextSibling),wt=t,Ie=!0,$n=null,ln=!1,e!==null&&Rh(t,e),t=Ho(t,r.children),t.flags|=4096);return t}return f?(ii(),j=r.fallback,f=t.mode,W=e.child,ne=W.sibling,r=Dn(W,{mode:"hidden",children:r.children}),r.subtreeFlags=W.subtreeFlags&65011712,ne!==null?j=Dn(ne,j):(j=Ei(j,f,i,null),j.flags|=2),j.return=t,r.return=t,r.sibling=j,t.child=r,rs(null,r),r=t.child,j=e.child.memoizedState,j===null?j=Bo(i):(f=j.cachePool,f!==null?(W=ht._currentValue,f=f.parent!==W?{parent:W,pool:W}:f):f=Hh(),j={baseLanes:j.baseLanes|i,cachePool:f}),r.memoizedState=j,r.childLanes=zo(e,D,i),t.memoizedState=Oo,rs(e.child,r)):(ni(t),i=e.child,e=i.sibling,i=Dn(i,{mode:"visible",children:r.children}),i.return=t,i.sibling=null,e!==null&&(D=t.deletions,D===null?(t.deletions=[e],t.flags|=16):D.push(e)),t.child=i,t.memoizedState=null,i)}function Ho(e,t){return t=xl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function xl(e,t){return e=Yt(22,e,null,t),e.lanes=0,e}function No(e,t,i){return Mi(t,e.child,null,i),e=Ho(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $f(e,t,i){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qa(e.return,t,i)}function jo(e,t,i,r,f,y){var D=e.memoizedState;D===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:i,tailMode:f,treeForkCount:y}:(D.isBackwards=t,D.rendering=null,D.renderingStartTime=0,D.last=r,D.tail=i,D.tailMode=f,D.treeForkCount=y)}function Qf(e,t,i){var r=t.pendingProps,f=r.revealOrder,y=r.tail;r=r.children;var D=ut.current,j=(D&2)!==0;if(j?(D=D&1|2,t.flags|=128):D&=1,N(ut,D),Et(e,t,r,i),r=Ie?Yr:0,!j&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$f(e,i,t);else if(e.tag===19)$f(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(f){case"forwards":for(i=t.child,f=null;i!==null;)e=i.alternate,e!==null&&fl(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=t.child,t.child=null):(f=i.sibling,i.sibling=null),jo(t,!1,f,i,y,r);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&fl(e)===null){t.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}jo(t,!0,i,null,y,r);break;case"together":jo(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function zn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),li|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(rr(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=Dn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Dn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Uo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&rl(e)))}function ev(e,t,i){switch(t.tag){case 3:U(t,t.stateNode.containerInfo),Zn(t,ht,e.memoizedState.cache),ki();break;case 27:case 5:Q(t);break;case 4:U(t,t.stateNode.containerInfo);break;case 10:Zn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,uo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(ni(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Xf(e,t,i):(ni(t),e=zn(e,t,i),e!==null?e.sibling:null);ni(t);break;case 19:var f=(e.flags&128)!==0;if(r=(i&t.childLanes)!==0,r||(rr(e,t,i,!1),r=(i&t.childLanes)!==0),f){if(r)return Qf(e,t,i);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),N(ut,ut.current),r)break;return null;case 22:return t.lanes=0,qf(e,t,i,t.pendingProps);case 24:Zn(t,ht,e.memoizedState.cache)}return zn(e,t,i)}function Zf(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)dt=!0;else{if(!Uo(e,i)&&(t.flags&128)===0)return dt=!1,ev(e,t,i);dt=(e.flags&131072)!==0}else dt=!1,Ie&&(t.flags&1048576)!==0&&Dh(t,Yr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Ri(t.elementType),t.type=e,typeof e=="function")qa(e)?(r=Bi(e,r),t.tag=1,t=Wf(null,t,e,r,i)):(t.tag=0,t=Mo(null,t,e,r,i));else{if(e!=null){var f=e.$$typeof;if(f===E){t.tag=11,t=If(null,t,e,r,i);break e}else if(f===L){t.tag=14,t=Pf(null,t,e,r,i);break e}}throw t=G(e)||e,Error(o(306,t,""))}}return t;case 0:return Mo(e,t,t.type,t.pendingProps,i);case 1:return r=t.type,f=Bi(r,t.pendingProps),Wf(e,t,r,f,i);case 3:e:{if(U(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var y=t.memoizedState;f=y.element,ro(e,t),Jr(t,r,null,i);var D=t.memoizedState;if(r=D.cache,Zn(t,ht,r),r!==y.cache&&Za(t,[ht],i,!0),Zr(),r=D.element,y.isDehydrated)if(y={element:r,isDehydrated:!1,cache:D.cache},t.updateQueue.baseState=y,t.memoizedState=y,t.flags&256){t=Kf(e,t,r,i);break e}else if(r!==f){f=nn(Error(o(424)),t),Gr(f),t=Kf(e,t,r,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(it=on(e.firstChild),wt=t,Ie=!0,$n=null,ln=!0,i=Fh(t,null,r,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ki(),r===f){t=zn(e,t,i);break e}Et(e,t,r,i)}t=t.child}return t;case 26:return wl(e,t),e===null?(i=up(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ie||(i=t.type,e=t.pendingProps,r=Il(de.current).createElement(i),r[Ct]=t,r[zt]=e,kt(r,i,e),St(r),t.stateNode=r):t.memoizedState=up(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Q(t),e===null&&Ie&&(r=t.stateNode=lp(t.type,t.pendingProps,de.current),wt=t,ln=!0,f=it,hi(t.type)?(vu=f,it=on(r.firstChild)):it=f),Et(e,t,t.pendingProps.children,i),wl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ie&&((f=r=it)&&(r=Rv(r,t.type,t.pendingProps,ln),r!==null?(t.stateNode=r,wt=t,it=on(r.firstChild),ln=!1,f=!0):f=!1),f||Qn(t)),Q(t),f=t.type,y=t.pendingProps,D=e!==null?e.memoizedProps:null,r=y.children,du(f,y)?r=null:D!==null&&du(f,D)&&(t.flags|=32),t.memoizedState!==null&&(f=ho(e,t,Yg,null,null,i),Ss._currentValue=f),wl(e,t),Et(e,t,r,i),t.child;case 6:return e===null&&Ie&&((e=i=it)&&(i=Lv(i,t.pendingProps,ln),i!==null?(t.stateNode=i,wt=t,it=null,e=!0):e=!1),e||Qn(t)),null;case 13:return Xf(e,t,i);case 4:return U(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Mi(t,null,r,i):Et(e,t,r,i),t.child;case 11:return If(e,t,t.type,t.pendingProps,i);case 7:return Et(e,t,t.pendingProps,i),t.child;case 8:return Et(e,t,t.pendingProps.children,i),t.child;case 12:return Et(e,t,t.pendingProps.children,i),t.child;case 10:return r=t.pendingProps,Zn(t,t.type,r.value),Et(e,t,r.children,i),t.child;case 9:return f=t.type._context,r=t.pendingProps.children,Ti(t),f=xt(f),r=r(f),t.flags|=1,Et(e,t,r,i),t.child;case 14:return Pf(e,t,t.type,t.pendingProps,i);case 15:return Ff(e,t,t.type,t.pendingProps,i);case 19:return Qf(e,t,i);case 31:return Jg(e,t,i);case 22:return qf(e,t,i,t.pendingProps);case 24:return Ti(t),r=xt(ht),e===null?(f=to(),f===null&&(f=et,y=Ja(),f.pooledCache=y,y.refCount++,y!==null&&(f.pooledCacheLanes|=i),f=y),t.memoizedState={parent:r,cache:f},io(t),Zn(t,ht,f)):((e.lanes&i)!==0&&(ro(e,t),Jr(t,null,null,i),Zr()),f=e.memoizedState,y=t.memoizedState,f.parent!==r?(f={parent:r,cache:r},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),Zn(t,ht,r)):(r=y.cache,Zn(t,ht,r),r!==f.cache&&Za(t,[ht],i,!0))),Et(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Hn(e){e.flags|=4}function Io(e,t,i,r,f){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Ed())e.flags|=8192;else throw Li=ol,no}else e.flags&=-16777217}function Jf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!pp(t))if(Ed())e.flags|=8192;else throw Li=ol,no}function El(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Lc():536870912,e.lanes|=t,mr|=t)}function ss(e,t){if(!Ie)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 r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,r=0;if(t)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,r|=f.subtreeFlags&65011712,r|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=r,e.childLanes=i,t}function tv(e,t,i){var r=t.pendingProps;switch(Wa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return rt(t),null;case 3:return i=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Mn(ht),le(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(ir(t)?Hn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xa())),rt(t),null;case 26:var f=t.type,y=t.memoizedState;return e===null?(Hn(t),y!==null?(rt(t),Jf(t,y)):(rt(t),Io(t,f,null,r,i))):y?y!==e.memoizedState?(Hn(t),rt(t),Jf(t,y)):(rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Hn(t),rt(t),Io(t,f,e,r,i)),null;case 27:if(pe(t),i=de.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Hn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return rt(t),null}e=ie.current,ir(t)?Lh(t):(e=lp(f,r,i),t.stateNode=e,Hn(t))}return rt(t),null;case 5:if(pe(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Hn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return rt(t),null}if(y=ie.current,ir(t))Lh(t);else{var D=Il(de.current);switch(y){case 1:y=D.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:y=D.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":y=D.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":y=D.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":y=D.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof r.is=="string"?D.createElement("select",{is:r.is}):D.createElement("select"),r.multiple?y.multiple=!0:r.size&&(y.size=r.size);break;default:y=typeof r.is=="string"?D.createElement(f,{is:r.is}):D.createElement(f)}}y[Ct]=t,y[zt]=r;e:for(D=t.child;D!==null;){if(D.tag===5||D.tag===6)y.appendChild(D.stateNode);else if(D.tag!==4&&D.tag!==27&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===t)break e;for(;D.sibling===null;){if(D.return===null||D.return===t)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}t.stateNode=y;e:switch(kt(y,f,r),f){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Hn(t)}}return rt(t),Io(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Hn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(o(166));if(e=de.current,ir(t)){if(e=t.stateNode,i=t.memoizedProps,r=null,f=wt,f!==null)switch(f.tag){case 27:case 5:r=f.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===i||r!==null&&r.suppressHydrationWarning===!0||Xd(e.nodeValue,i)),e||Qn(t,!0)}else e=Il(e).createTextNode(r),e[Ct]=t,t.stateNode=e}return rt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(r=ir(t),i!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ct]=t}else ki(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),e=!1}else i=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Wt(t),t):(Wt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return rt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=ir(t),r!==null&&r.dehydrated!==null){if(e===null){if(!f)throw Error(o(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));f[Ct]=t}else ki(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),f=!1}else f=Xa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(Wt(t),t):(Wt(t),null)}return Wt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=r!==null,e=e!==null&&e.memoizedState!==null,i&&(r=t.child,f=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(f=r.alternate.memoizedState.cachePool.pool),y=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(y=r.memoizedState.cachePool.pool),y!==f&&(r.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),El(t,t.updateQueue),rt(t),null);case 4:return le(),e===null&&ou(t.stateNode.containerInfo),rt(t),null;case 10:return Mn(t.type),rt(t),null;case 19:if(P(ut),r=t.memoizedState,r===null)return rt(t),null;if(f=(t.flags&128)!==0,y=r.rendering,y===null)if(f)ss(r,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(y=fl(e),y!==null){for(t.flags|=128,ss(r,!1),e=y.updateQueue,t.updateQueue=e,El(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)kh(i,e),i=i.sibling;return N(ut,ut.current&1|2),Ie&&Rn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ot()>Rl&&(t.flags|=128,f=!0,ss(r,!1),t.lanes=4194304)}else{if(!f)if(e=fl(y),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,El(t,e),ss(r,!0),r.tail===null&&r.tailMode==="hidden"&&!y.alternate&&!Ie)return rt(t),null}else 2*ot()-r.renderingStartTime>Rl&&i!==536870912&&(t.flags|=128,f=!0,ss(r,!1),t.lanes=4194304);r.isBackwards?(y.sibling=t.child,t.child=y):(e=r.last,e!==null?e.sibling=y:t.child=y,r.last=y)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ot(),e.sibling=null,i=ut.current,N(ut,f?i&1|2:i&1),Ie&&Rn(t,r.treeForkCount),e):(rt(t),null);case 22:case 23:return Wt(t),oo(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(i&536870912)!==0&&(t.flags&128)===0&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),i=t.updateQueue,i!==null&&El(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==i&&(t.flags|=2048),e!==null&&P(Di),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Mn(ht),rt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function nv(e,t){switch(Wa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mn(ht),le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(Wt(t),t.alternate===null)throw Error(o(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return P(ut),null;case 4:return le(),null;case 10:return Mn(t.type),null;case 22:case 23:return Wt(t),oo(),e!==null&&P(Di),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Mn(ht),null;case 25:return null;default:return null}}function ed(e,t){switch(Wa(t),t.tag){case 3:Mn(ht),le();break;case 26:case 27:case 5:pe(t);break;case 4:le();break;case 31:t.memoizedState!==null&&Wt(t);break;case 13:Wt(t);break;case 19:P(ut);break;case 10:Mn(t.type);break;case 22:case 23:Wt(t),oo(),e!==null&&P(Di);break;case 24:Mn(ht)}}function ls(e,t){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var f=r.next;i=f;do{if((i.tag&e)===e){r=void 0;var y=i.create,D=i.inst;r=y(),D.destroy=r}i=i.next}while(i!==f)}}catch(j){Xe(t,t.return,j)}}function ri(e,t,i){try{var r=t.updateQueue,f=r!==null?r.lastEffect:null;if(f!==null){var y=f.next;r=y;do{if((r.tag&e)===e){var D=r.inst,j=D.destroy;if(j!==void 0){D.destroy=void 0,f=t;var W=i,ne=j;try{ne()}catch(oe){Xe(f,W,oe)}}}r=r.next}while(r!==y)}}catch(oe){Xe(t,t.return,oe)}}function td(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Vh(t,i)}catch(r){Xe(e,e.return,r)}}}function nd(e,t,i){i.props=Bi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(r){Xe(e,t,r)}}function as(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof i=="function"?e.refCleanup=i(r):i.current=r}}catch(f){Xe(e,t,f)}}function bn(e,t){var i=e.ref,r=e.refCleanup;if(i!==null)if(typeof r=="function")try{r()}catch(f){Xe(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){Xe(e,t,f)}else i.current=null}function id(e){var t=e.type,i=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&r.focus();break e;case"img":i.src?r.src=i.src:i.srcSet&&(r.srcset=i.srcSet)}}catch(f){Xe(e,e.return,f)}}function Po(e,t,i){try{var r=e.stateNode;xv(r,e.type,i,t),r[zt]=t}catch(f){Xe(e,e.return,f)}}function rd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&hi(e.type)||e.tag===4}function Fo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rd(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&&hi(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 qo(e,t,i){var r=e.tag;if(r===5||r===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=An));else if(r!==4&&(r===27&&hi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(qo(e,t,i),e=e.sibling;e!==null;)qo(e,t,i),e=e.sibling}function kl(e,t,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(r!==4&&(r===27&&hi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(kl(e,t,i),e=e.sibling;e!==null;)kl(e,t,i),e=e.sibling}function sd(e){var t=e.stateNode,i=e.memoizedProps;try{for(var r=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);kt(t,r,i),t[Ct]=e,t[zt]=i}catch(y){Xe(e,e.return,y)}}var Nn=!1,pt=!1,Vo=!1,ld=typeof WeakSet=="function"?WeakSet:Set,yt=null;function iv(e,t){if(e=e.containerInfo,hu=Wl,e=gh(e),Ha(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var r=i.getSelection&&i.getSelection();if(r&&r.rangeCount!==0){i=r.anchorNode;var f=r.anchorOffset,y=r.focusNode;r=r.focusOffset;try{i.nodeType,y.nodeType}catch{i=null;break e}var D=0,j=-1,W=-1,ne=0,oe=0,he=e,re=null;t:for(;;){for(var se;he!==i||f!==0&&he.nodeType!==3||(j=D+f),he!==y||r!==0&&he.nodeType!==3||(W=D+r),he.nodeType===3&&(D+=he.nodeValue.length),(se=he.firstChild)!==null;)re=he,he=se;for(;;){if(he===e)break t;if(re===i&&++ne===f&&(j=D),re===y&&++oe===r&&(W=D),(se=he.nextSibling)!==null)break;he=re,re=he.parentNode}he=se}i=j===-1||W===-1?null:{start:j,end:W}}else i=null}i=i||{start:0,end:0}}else i=null;for(fu={focusedElem:e,selectionRange:i},Wl=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){switch(t=yt,y=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++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&y!==null){e=void 0,i=t,f=y.memoizedProps,y=y.memoizedState,r=i.stateNode;try{var Se=Bi(i.type,f);e=r.getSnapshotBeforeUpdate(Se,y),r.__reactInternalSnapshotBeforeUpdate=e}catch(ke){Xe(i,i.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)_u(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_u(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,yt=e;break}yt=t.return}}function ad(e,t,i){var r=i.flags;switch(i.tag){case 0:case 11:case 15:Un(e,i),r&4&&ls(5,i);break;case 1:if(Un(e,i),r&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(D){Xe(i,i.return,D)}else{var f=Bi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(D){Xe(i,i.return,D)}}r&64&&td(i),r&512&&as(i,i.return);break;case 3:if(Un(e,i),r&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{Vh(e,t)}catch(D){Xe(i,i.return,D)}}break;case 27:t===null&&r&4&&sd(i);case 26:case 5:Un(e,i),t===null&&r&4&&id(i),r&512&&as(i,i.return);break;case 12:Un(e,i);break;case 31:Un(e,i),r&4&&cd(e,i);break;case 13:Un(e,i),r&4&&hd(e,i),r&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=fv.bind(null,i),Mv(e,i))));break;case 22:if(r=i.memoizedState!==null||Nn,!r){t=t!==null&&t.memoizedState!==null||pt,f=Nn;var y=pt;Nn=r,(pt=t)&&!y?In(e,i,(i.subtreeFlags&8772)!==0):Un(e,i),Nn=f,pt=y}break;case 30:break;default:Un(e,i)}}function od(e){var t=e.alternate;t!==null&&(e.alternate=null,od(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Sa(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 st=null,Nt=!1;function jn(e,t,i){for(i=i.child;i!==null;)ud(e,t,i),i=i.sibling}function ud(e,t,i){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(bt,i)}catch{}switch(i.tag){case 26:pt||bn(i,t),jn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:pt||bn(i,t);var r=st,f=Nt;hi(i.type)&&(st=i.stateNode,Nt=!1),jn(e,t,i),ms(i.stateNode),st=r,Nt=f;break;case 5:pt||bn(i,t);case 6:if(r=st,f=Nt,st=null,jn(e,t,i),st=r,Nt=f,st!==null)if(Nt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(i.stateNode)}catch(y){Xe(i,t,y)}else try{st.removeChild(i.stateNode)}catch(y){Xe(i,t,y)}break;case 18:st!==null&&(Nt?(e=st,tp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),xr(e)):tp(st,i.stateNode));break;case 4:r=st,f=Nt,st=i.stateNode.containerInfo,Nt=!0,jn(e,t,i),st=r,Nt=f;break;case 0:case 11:case 14:case 15:ri(2,i,t),pt||ri(4,i,t),jn(e,t,i);break;case 1:pt||(bn(i,t),r=i.stateNode,typeof r.componentWillUnmount=="function"&&nd(i,t,r)),jn(e,t,i);break;case 21:jn(e,t,i);break;case 22:pt=(r=pt)||i.memoizedState!==null,jn(e,t,i),pt=r;break;default:jn(e,t,i)}}function cd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{xr(e)}catch(i){Xe(t,t.return,i)}}}function hd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{xr(e)}catch(i){Xe(t,t.return,i)}}function rv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ld),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ld),t;default:throw Error(o(435,e.tag))}}function Al(e,t){var i=rv(e);t.forEach(function(r){if(!i.has(r)){i.add(r);var f=dv.bind(null,e,r);r.then(f,f)}})}function jt(e,t){var i=t.deletions;if(i!==null)for(var r=0;r<i.length;r++){var f=i[r],y=e,D=t,j=D;e:for(;j!==null;){switch(j.tag){case 27:if(hi(j.type)){st=j.stateNode,Nt=!1;break e}break;case 5:st=j.stateNode,Nt=!1;break e;case 3:case 4:st=j.stateNode.containerInfo,Nt=!0;break e}j=j.return}if(st===null)throw Error(o(160));ud(y,D,f),st=null,Nt=!1,y=f.alternate,y!==null&&(y.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fd(t,e),t=t.sibling}var dn=null;function fd(e,t){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:jt(t,e),Ut(e),r&4&&(ri(3,e,e.return),ls(3,e),ri(5,e,e.return));break;case 1:jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),r&64&&Nn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:var f=dn;if(jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),r&4){var y=i!==null?i.memoizedState:null;if(r=e.memoizedState,i===null)if(r===null)if(e.stateNode===null){e:{r=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(r){case"title":y=f.getElementsByTagName("title")[0],(!y||y[Br]||y[Ct]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=f.createElement(r),f.head.insertBefore(y,f.querySelector("head > title"))),kt(y,r,i),y[Ct]=e,St(y),r=y;break e;case"link":var D=fp("link","href",f).get(r+(i.href||""));if(D){for(var j=0;j<D.length;j++)if(y=D[j],y.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&y.getAttribute("rel")===(i.rel==null?null:i.rel)&&y.getAttribute("title")===(i.title==null?null:i.title)&&y.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){D.splice(j,1);break t}}y=f.createElement(r),kt(y,r,i),f.head.appendChild(y);break;case"meta":if(D=fp("meta","content",f).get(r+(i.content||""))){for(j=0;j<D.length;j++)if(y=D[j],y.getAttribute("content")===(i.content==null?null:""+i.content)&&y.getAttribute("name")===(i.name==null?null:i.name)&&y.getAttribute("property")===(i.property==null?null:i.property)&&y.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&y.getAttribute("charset")===(i.charSet==null?null:i.charSet)){D.splice(j,1);break t}}y=f.createElement(r),kt(y,r,i),f.head.appendChild(y);break;default:throw Error(o(468,r))}y[Ct]=e,St(y),r=y}e.stateNode=r}else dp(f,e.type,e.stateNode);else e.stateNode=hp(f,r,e.memoizedProps);else y!==r?(y===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):y.count--,r===null?dp(f,e.type,e.stateNode):hp(f,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Po(e,e.memoizedProps,i.memoizedProps)}break;case 27:jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),i!==null&&r&4&&Po(e,e.memoizedProps,i.memoizedProps);break;case 5:if(jt(t,e),Ut(e),r&512&&(pt||i===null||bn(i,i.return)),e.flags&32){f=e.stateNode;try{Wi(f,"")}catch(Se){Xe(e,e.return,Se)}}r&4&&e.stateNode!=null&&(f=e.memoizedProps,Po(e,f,i!==null?i.memoizedProps:f)),r&1024&&(Vo=!0);break;case 6:if(jt(t,e),Ut(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,i=e.stateNode;try{i.nodeValue=r}catch(Se){Xe(e,e.return,Se)}}break;case 3:if(ql=null,f=dn,dn=Pl(t.containerInfo),jt(t,e),dn=f,Ut(e),r&4&&i!==null&&i.memoizedState.isDehydrated)try{xr(t.containerInfo)}catch(Se){Xe(e,e.return,Se)}Vo&&(Vo=!1,dd(e));break;case 4:r=dn,dn=Pl(e.stateNode.containerInfo),jt(t,e),Ut(e),dn=r;break;case 12:jt(t,e),Ut(e);break;case 31:jt(t,e),Ut(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Al(e,r)));break;case 13:jt(t,e),Ut(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Dl=ot()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Al(e,r)));break;case 22:f=e.memoizedState!==null;var W=i!==null&&i.memoizedState!==null,ne=Nn,oe=pt;if(Nn=ne||f,pt=oe||W,jt(t,e),pt=oe,Nn=ne,Ut(e),r&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(i===null||W||Nn||pt||zi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){W=i=t;try{if(y=W.stateNode,f)D=y.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{j=W.stateNode;var he=W.memoizedProps.style,re=he!=null&&he.hasOwnProperty("display")?he.display:null;j.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(Se){Xe(W,W.return,Se)}}}else if(t.tag===6){if(i===null){W=t;try{W.stateNode.nodeValue=f?"":W.memoizedProps}catch(Se){Xe(W,W.return,Se)}}}else if(t.tag===18){if(i===null){W=t;try{var se=W.stateNode;f?np(se,!0):np(W.stateNode,!1)}catch(Se){Xe(W,W.return,Se)}}}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}r&4&&(r=e.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,Al(e,i))));break;case 19:jt(t,e),Ut(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Al(e,r)));break;case 30:break;case 21:break;default:jt(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{for(var i,r=e.return;r!==null;){if(rd(r)){i=r;break}r=r.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var f=i.stateNode,y=Fo(e);kl(e,y,f);break;case 5:var D=i.stateNode;i.flags&32&&(Wi(D,""),i.flags&=-33);var j=Fo(e);kl(e,j,D);break;case 3:case 4:var W=i.stateNode.containerInfo,ne=Fo(e);qo(e,ne,W);break;default:throw Error(o(161))}}catch(oe){Xe(e,e.return,oe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function dd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;dd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Un(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ad(e,t.alternate,t),t=t.sibling}function zi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ri(4,t,t.return),zi(t);break;case 1:bn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&nd(t,t.return,i),zi(t);break;case 27:ms(t.stateNode);case 26:case 5:bn(t,t.return),zi(t);break;case 22:t.memoizedState===null&&zi(t);break;case 30:zi(t);break;default:zi(t)}e=e.sibling}}function In(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,f=e,y=t,D=y.flags;switch(y.tag){case 0:case 11:case 15:In(f,y,i),ls(4,y);break;case 1:if(In(f,y,i),r=y,f=r.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(ne){Xe(r,r.return,ne)}if(r=y,f=r.updateQueue,f!==null){var j=r.stateNode;try{var W=f.shared.hiddenCallbacks;if(W!==null)for(f.shared.hiddenCallbacks=null,f=0;f<W.length;f++)qh(W[f],j)}catch(ne){Xe(r,r.return,ne)}}i&&D&64&&td(y),as(y,y.return);break;case 27:sd(y);case 26:case 5:In(f,y,i),i&&r===null&&D&4&&id(y),as(y,y.return);break;case 12:In(f,y,i);break;case 31:In(f,y,i),i&&D&4&&cd(f,y);break;case 13:In(f,y,i),i&&D&4&&hd(f,y);break;case 22:y.memoizedState===null&&In(f,y,i),as(y,y.return);break;case 30:break;default:In(f,y,i)}t=t.sibling}}function Yo(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&&Wr(i))}function Go(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wr(e))}function pn(e,t,i,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)pd(e,t,i,r),t=t.sibling}function pd(e,t,i,r){var f=t.flags;switch(t.tag){case 0:case 11:case 15:pn(e,t,i,r),f&2048&&ls(9,t);break;case 1:pn(e,t,i,r);break;case 3:pn(e,t,i,r),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wr(e)));break;case 12:if(f&2048){pn(e,t,i,r),e=t.stateNode;try{var y=t.memoizedProps,D=y.id,j=y.onPostCommit;typeof j=="function"&&j(D,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(W){Xe(t,t.return,W)}}else pn(e,t,i,r);break;case 31:pn(e,t,i,r);break;case 13:pn(e,t,i,r);break;case 23:break;case 22:y=t.stateNode,D=t.alternate,t.memoizedState!==null?y._visibility&2?pn(e,t,i,r):os(e,t):y._visibility&2?pn(e,t,i,r):(y._visibility|=2,dr(e,t,i,r,(t.subtreeFlags&10256)!==0||!1)),f&2048&&Yo(D,t);break;case 24:pn(e,t,i,r),f&2048&&Go(t.alternate,t);break;default:pn(e,t,i,r)}}function dr(e,t,i,r,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var y=e,D=t,j=i,W=r,ne=D.flags;switch(D.tag){case 0:case 11:case 15:dr(y,D,j,W,f),ls(8,D);break;case 23:break;case 22:var oe=D.stateNode;D.memoizedState!==null?oe._visibility&2?dr(y,D,j,W,f):os(y,D):(oe._visibility|=2,dr(y,D,j,W,f)),f&&ne&2048&&Yo(D.alternate,D);break;case 24:dr(y,D,j,W,f),f&&ne&2048&&Go(D.alternate,D);break;default:dr(y,D,j,W,f)}t=t.sibling}}function os(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,r=t,f=r.flags;switch(r.tag){case 22:os(i,r),f&2048&&Yo(r.alternate,r);break;case 24:os(i,r),f&2048&&Go(r.alternate,r);break;default:os(i,r)}t=t.sibling}}var us=8192;function pr(e,t,i){if(e.subtreeFlags&us)for(e=e.child;e!==null;)_d(e,t,i),e=e.sibling}function _d(e,t,i){switch(e.tag){case 26:pr(e,t,i),e.flags&us&&e.memoizedState!==null&&Vv(i,dn,e.memoizedState,e.memoizedProps);break;case 5:pr(e,t,i);break;case 3:case 4:var r=dn;dn=Pl(e.stateNode.containerInfo),pr(e,t,i),dn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=us,us=16777216,pr(e,t,i),us=r):pr(e,t,i));break;default:pr(e,t,i)}}function md(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 cs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];yt=r,vd(r,e)}md(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)gd(e),e=e.sibling}function gd(e){switch(e.tag){case 0:case 11:case 15:cs(e),e.flags&2048&&ri(9,e,e.return);break;case 3:cs(e);break;case 12:cs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Tl(e)):cs(e);break;default:cs(e)}}function Tl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];yt=r,vd(r,e)}md(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ri(8,t,t.return),Tl(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Tl(t));break;default:Tl(t)}e=e.sibling}}function vd(e,t){for(;yt!==null;){var i=yt;switch(i.tag){case 0:case 11:case 15:ri(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var r=i.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Wr(i.memoizedState.cache)}if(r=i.child,r!==null)r.return=i,yt=r;else e:for(i=e;yt!==null;){r=yt;var f=r.sibling,y=r.return;if(od(r),r===i){yt=null;break e}if(f!==null){f.return=y,yt=f;break e}yt=y}}}var sv={getCacheForType:function(e){var t=xt(ht),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return xt(ht).controller.signal}},lv=typeof WeakMap=="function"?WeakMap:Map,We=0,et=null,ze=null,je=0,Ke=0,Kt=null,si=!1,_r=!1,Wo=!1,Pn=0,at=0,li=0,Hi=0,Ko=0,Xt=0,mr=0,hs=null,It=null,Xo=!1,Dl=0,Sd=0,Rl=1/0,Ll=null,ai=null,vt=0,oi=null,gr=null,Fn=0,$o=0,Qo=null,yd=null,fs=0,Zo=null;function $t(){return(We&2)!==0&&je!==0?je&-je:Y.T!==null?ru():zc()}function bd(){if(Xt===0)if((je&536870912)===0||Ie){var e=Us;Us<<=1,(Us&3932160)===0&&(Us=262144),Xt=e}else Xt=536870912;return e=Gt.current,e!==null&&(e.flags|=32),Xt}function Pt(e,t,i){(e===et&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(vr(e,0),ui(e,je,Xt,!1)),Or(e,i),((We&2)===0||e!==et)&&(e===et&&((We&2)===0&&(Hi|=i),at===4&&ui(e,je,Xt,!1)),Cn(e))}function Cd(e,t,i){if((We&6)!==0)throw Error(o(327));var r=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Mr(e,t),f=r?uv(e,t):eu(e,t,!0),y=r;do{if(f===0){_r&&!r&&ui(e,t,0,!1);break}else{if(i=e.current.alternate,y&&!av(i)){f=eu(e,t,!1),y=!1;continue}if(f===2){if(y=t,e.errorRecoveryDisabledLanes&y)var D=0;else D=e.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){t=D;e:{var j=e;f=hs;var W=j.current.memoizedState.isDehydrated;if(W&&(vr(j,D).flags|=256),D=eu(j,D,!1),D!==2){if(Wo&&!W){j.errorRecoveryDisabledLanes|=y,Hi|=y,f=4;break e}y=It,It=f,y!==null&&(It===null?It=y:It.push.apply(It,y))}f=D}if(y=!1,f!==2)continue}}if(f===1){vr(e,0),ui(e,t,0,!0);break}e:{switch(r=e,y=f,y){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:ui(r,t,Xt,!si);break e;case 2:It=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(f=Dl+300-ot(),10<f)){if(ui(r,t,Xt,!si),Ps(r,0,!0)!==0)break e;Fn=t,r.timeoutHandle=Jd(wd.bind(null,r,i,It,Ll,Xo,t,Xt,Hi,mr,si,y,"Throttled",-0,0),f);break e}wd(r,i,It,Ll,Xo,t,Xt,Hi,mr,si,y,null,-0,0)}}break}while(!0);Cn(e)}function wd(e,t,i,r,f,y,D,j,W,ne,oe,he,re,se){if(e.timeoutHandle=-1,he=t.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:An},_d(t,y,he);var Se=(y&62914560)===y?Dl-ot():(y&4194048)===y?Sd-ot():0;if(Se=Yv(he,Se),Se!==null){Fn=y,e.cancelPendingCommit=Se(Ld.bind(null,e,t,y,i,r,f,D,j,W,oe,he,null,re,se)),ui(e,y,D,!ne);return}}Ld(e,t,y,i,r,f,D,j,W)}function av(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 r=0;r<i.length;r++){var f=i[r],y=f.getSnapshot;f=f.value;try{if(!Vt(y(),f))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 ui(e,t,i,r){t&=~Ko,t&=~Hi,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var f=t;0<f;){var y=31-Je(f),D=1<<y;r[y]=-1,f&=~D}i!==0&&Mc(e,i,t)}function Ml(){return(We&6)===0?(ds(0),!1):!0}function Jo(){if(ze!==null){if(Ke===0)var e=ze.return;else e=ze,Ln=Ai=null,_o(e),or=null,Xr=0,e=ze;for(;e!==null;)ed(e.alternate,e),e=e.return;ze=null}}function vr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Av(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Fn=0,Jo(),et=e,ze=i=Dn(e.current,null),je=t,Ke=0,Kt=null,si=!1,_r=Mr(e,t),Wo=!1,mr=Xt=Ko=Hi=li=at=0,It=hs=null,Xo=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var f=31-Je(r),y=1<<f;t|=e[f],r&=~y}return Pn=t,Js(),i}function xd(e,t){Re=null,Y.H=is,t===ar||t===al?(t=Uh(),Ke=3):t===no?(t=Uh(),Ke=4):Ke=t===Lo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Kt=t,ze===null&&(at=1,bl(e,nn(t,e.current)))}function Ed(){var e=Gt.current;return e===null?!0:(je&4194048)===je?an===null:(je&62914560)===je||(je&536870912)!==0?e===an:!1}function kd(){var e=Y.H;return Y.H=is,e===null?is:e}function Ad(){var e=Y.A;return Y.A=sv,e}function Ol(){at=4,si||(je&4194048)!==je&&Gt.current!==null||(_r=!0),(li&134217727)===0&&(Hi&134217727)===0||et===null||ui(et,je,Xt,!1)}function eu(e,t,i){var r=We;We|=2;var f=kd(),y=Ad();(et!==e||je!==t)&&(Ll=null,vr(e,t)),t=!1;var D=at;e:do try{if(Ke!==0&&ze!==null){var j=ze,W=Kt;switch(Ke){case 8:Jo(),D=6;break e;case 3:case 2:case 9:case 6:Gt.current===null&&(t=!0);var ne=Ke;if(Ke=0,Kt=null,Sr(e,j,W,ne),i&&_r){D=0;break e}break;default:ne=Ke,Ke=0,Kt=null,Sr(e,j,W,ne)}}ov(),D=at;break}catch(oe){xd(e,oe)}while(!0);return t&&e.shellSuspendCounter++,Ln=Ai=null,We=r,Y.H=f,Y.A=y,ze===null&&(et=null,je=0,Js()),D}function ov(){for(;ze!==null;)Td(ze)}function uv(e,t){var i=We;We|=2;var r=kd(),f=Ad();et!==e||je!==t?(Ll=null,Rl=ot()+500,vr(e,t)):_r=Mr(e,t);e:do try{if(Ke!==0&&ze!==null){t=ze;var y=Kt;t:switch(Ke){case 1:Ke=0,Kt=null,Sr(e,t,y,1);break;case 2:case 9:if(Nh(y)){Ke=0,Kt=null,Dd(t);break}t=function(){Ke!==2&&Ke!==9||et!==e||(Ke=7),Cn(e)},y.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:Nh(y)?(Ke=0,Kt=null,Dd(t)):(Ke=0,Kt=null,Sr(e,t,y,7));break;case 5:var D=null;switch(ze.tag){case 26:D=ze.memoizedState;case 5:case 27:var j=ze;if(D?pp(D):j.stateNode.complete){Ke=0,Kt=null;var W=j.sibling;if(W!==null)ze=W;else{var ne=j.return;ne!==null?(ze=ne,Bl(ne)):ze=null}break t}}Ke=0,Kt=null,Sr(e,t,y,5);break;case 6:Ke=0,Kt=null,Sr(e,t,y,6);break;case 8:Jo(),at=6;break e;default:throw Error(o(462))}}cv();break}catch(oe){xd(e,oe)}while(!0);return Ln=Ai=null,Y.H=r,Y.A=f,We=i,ze!==null?0:(et=null,je=0,Js(),at)}function cv(){for(;ze!==null&&!Yn();)Td(ze)}function Td(e){var t=Zf(e.alternate,e,Pn);e.memoizedProps=e.pendingProps,t===null?Bl(e):ze=t}function Dd(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Gf(i,t,t.pendingProps,t.type,void 0,je);break;case 11:t=Gf(i,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:_o(t);default:ed(i,t),t=ze=kh(t,Pn),t=Zf(i,t,Pn)}e.memoizedProps=e.pendingProps,t===null?Bl(e):ze=t}function Sr(e,t,i,r){Ln=Ai=null,_o(t),or=null,Xr=0;var f=t.return;try{if(Zg(e,f,t,i,je)){at=1,bl(e,nn(i,e.current)),ze=null;return}}catch(y){if(f!==null)throw ze=f,y;at=1,bl(e,nn(i,e.current)),ze=null;return}t.flags&32768?(Ie||r===1?e=!0:_r||(je&536870912)!==0?e=!1:(si=e=!0,(r===2||r===9||r===3||r===6)&&(r=Gt.current,r!==null&&r.tag===13&&(r.flags|=16384))),Rd(t,e)):Bl(t)}function Bl(e){var t=e;do{if((t.flags&32768)!==0){Rd(t,si);return}e=t.return;var i=tv(t.alternate,t,Pn);if(i!==null){ze=i;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);at===0&&(at=5)}function Rd(e,t){do{var i=nv(e.alternate,e);if(i!==null){i.flags&=32767,ze=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ze=e;return}ze=e=i}while(e!==null);at=6,ze=null}function Ld(e,t,i,r,f,y,D,j,W){e.cancelPendingCommit=null;do zl();while(vt!==0);if((We&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(y=t.lanes|t.childLanes,y|=Pa,qm(e,i,y,D,j,W),e===et&&(ze=et=null,je=0),gr=t,oi=e,Fn=i,$o=y,Qo=f,yd=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,pv(Ce,function(){return Hd(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=Y.T,Y.T=null,f=Z.p,Z.p=2,D=We,We|=4;try{iv(e,t,i)}finally{We=D,Z.p=f,Y.T=r}}vt=1,Md(),Od(),Bd()}}function Md(){if(vt===1){vt=0;var e=oi,t=gr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=Y.T,Y.T=null;var r=Z.p;Z.p=2;var f=We;We|=4;try{fd(t,e);var y=fu,D=gh(e.containerInfo),j=y.focusedElem,W=y.selectionRange;if(D!==j&&j&&j.ownerDocument&&mh(j.ownerDocument.documentElement,j)){if(W!==null&&Ha(j)){var ne=W.start,oe=W.end;if(oe===void 0&&(oe=ne),"selectionStart"in j)j.selectionStart=ne,j.selectionEnd=Math.min(oe,j.value.length);else{var he=j.ownerDocument||document,re=he&&he.defaultView||window;if(re.getSelection){var se=re.getSelection(),Se=j.textContent.length,ke=Math.min(W.start,Se),Ze=W.end===void 0?ke:Math.min(W.end,Se);!se.extend&&ke>Ze&&(D=Ze,Ze=ke,ke=D);var J=_h(j,ke),$=_h(j,Ze);if(J&&$&&(se.rangeCount!==1||se.anchorNode!==J.node||se.anchorOffset!==J.offset||se.focusNode!==$.node||se.focusOffset!==$.offset)){var te=he.createRange();te.setStart(J.node,J.offset),se.removeAllRanges(),ke>Ze?(se.addRange(te),se.extend($.node,$.offset)):(te.setEnd($.node,$.offset),se.addRange(te))}}}}for(he=[],se=j;se=se.parentNode;)se.nodeType===1&&he.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<he.length;j++){var ue=he[j];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Wl=!!hu,fu=hu=null}finally{We=f,Z.p=r,Y.T=i}}e.current=t,vt=2}}function Od(){if(vt===2){vt=0;var e=oi,t=gr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=Y.T,Y.T=null;var r=Z.p;Z.p=2;var f=We;We|=4;try{ad(e,t.alternate,t)}finally{We=f,Z.p=r,Y.T=i}}vt=3}}function Bd(){if(vt===4||vt===3){vt=0,At();var e=oi,t=gr,i=Fn,r=yd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,gr=oi=null,zd(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(ai=null),ga(i),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(bt,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=Y.T,f=Z.p,Z.p=2,Y.T=null;try{for(var y=e.onRecoverableError,D=0;D<r.length;D++){var j=r[D];y(j.value,{componentStack:j.stack})}}finally{Y.T=t,Z.p=f}}(Fn&3)!==0&&zl(),Cn(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===Zo?fs++:(fs=0,Zo=e):fs=0,ds(0)}}function zd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Wr(t)))}function zl(){return Md(),Od(),Bd(),Hd()}function Hd(){if(vt!==5)return!1;var e=oi,t=$o;$o=0;var i=ga(Fn),r=Y.T,f=Z.p;try{Z.p=32>i?32:i,Y.T=null,i=Qo,Qo=null;var y=oi,D=Fn;if(vt=0,gr=oi=null,Fn=0,(We&6)!==0)throw Error(o(331));var j=We;if(We|=4,gd(y.current),pd(y,y.current,D,i),We=j,ds(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(bt,y)}catch{}return!0}finally{Z.p=f,Y.T=r,zd(e,t)}}function Nd(e,t,i){t=nn(i,t),t=Ro(e.stateNode,t,2),e=ti(e,t,2),e!==null&&(Or(e,2),Cn(e))}function Xe(e,t,i){if(e.tag===3)Nd(e,e,i);else for(;t!==null;){if(t.tag===3){Nd(t,e,i);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ai===null||!ai.has(r))){e=nn(i,e),i=jf(2),r=ti(t,i,2),r!==null&&(Uf(i,r,t,e),Or(r,2),Cn(r));break}}t=t.return}}function tu(e,t,i){var r=e.pingCache;if(r===null){r=e.pingCache=new lv;var f=new Set;r.set(t,f)}else f=r.get(t),f===void 0&&(f=new Set,r.set(t,f));f.has(i)||(Wo=!0,f.add(i),e=hv.bind(null,e,t,i),t.then(e,e))}function hv(e,t,i){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,et===e&&(je&i)===i&&(at===4||at===3&&(je&62914560)===je&&300>ot()-Dl?(We&2)===0&&vr(e,0):Ko|=i,mr===je&&(mr=0)),Cn(e)}function jd(e,t){t===0&&(t=Lc()),e=xi(e,t),e!==null&&(Or(e,t),Cn(e))}function fv(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),jd(e,i)}function dv(e,t){var i=0;switch(e.tag){case 31:case 13:var r=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),jd(e,i)}function pv(e,t){return vn(e,t)}var Hl=null,yr=null,nu=!1,Nl=!1,iu=!1,ci=0;function Cn(e){e!==yr&&e.next===null&&(yr===null?Hl=yr=e:yr=yr.next=e),Nl=!0,nu||(nu=!0,mv())}function ds(e,t){if(!iu&&Nl){iu=!0;do for(var i=!1,r=Hl;r!==null;){if(e!==0){var f=r.pendingLanes;if(f===0)var y=0;else{var D=r.suspendedLanes,j=r.pingedLanes;y=(1<<31-Je(42|e)+1)-1,y&=f&~(D&~j),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(i=!0,Fd(r,y))}else y=je,y=Ps(r,r===et?y:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(y&3)===0||Mr(r,y)||(i=!0,Fd(r,y));r=r.next}while(i);iu=!1}}function _v(){Ud()}function Ud(){Nl=nu=!1;var e=0;ci!==0&&kv()&&(e=ci);for(var t=ot(),i=null,r=Hl;r!==null;){var f=r.next,y=Id(r,t);y===0?(r.next=null,i===null?Hl=f:i.next=f,f===null&&(yr=i)):(i=r,(e!==0||(y&3)!==0)&&(Nl=!0)),r=f}vt!==0&&vt!==5||ds(e),ci!==0&&(ci=0)}function Id(e,t){for(var i=e.suspendedLanes,r=e.pingedLanes,f=e.expirationTimes,y=e.pendingLanes&-62914561;0<y;){var D=31-Je(y),j=1<<D,W=f[D];W===-1?((j&i)===0||(j&r)!==0)&&(f[D]=Fm(j,t)):W<=t&&(e.expiredLanes|=j),y&=~j}if(t=et,i=je,i=Ps(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,i===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&En(r),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Mr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(r!==null&&En(r),ga(i)){case 2:case 8:i=ve;break;case 32:i=Ce;break;case 268435456:i=Oe;break;default:i=Ce}return r=Pd.bind(null,e),i=vn(i,r),e.callbackPriority=t,e.callbackNode=i,t}return r!==null&&r!==null&&En(r),e.callbackPriority=2,e.callbackNode=null,2}function Pd(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(zl()&&e.callbackNode!==i)return null;var r=je;return r=Ps(e,e===et?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Cd(e,r,t),Id(e,ot()),e.callbackNode!=null&&e.callbackNode===i?Pd.bind(null,e):null)}function Fd(e,t){if(zl())return null;Cd(e,t,!0)}function mv(){Tv(function(){(We&6)!==0?vn(ae,_v):Ud()})}function ru(){if(ci===0){var e=sr;e===0&&(e=js,js<<=1,(js&261888)===0&&(js=256)),ci=e}return ci}function qd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ys(""+e)}function Vd(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 gv(e,t,i,r,f){if(t==="submit"&&i&&i.stateNode===f){var y=qd((f[zt]||null).action),D=r.submitter;D&&(t=(t=D[zt]||null)?qd(t.formAction):D.getAttribute("formAction"),t!==null&&(y=t,D=null));var j=new Xs("action","action",null,r,f);e.push({event:j,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ci!==0){var W=D?Vd(f,D):new FormData(f);xo(i,{pending:!0,data:W,method:f.method,action:y},null,W)}}else typeof y=="function"&&(j.preventDefault(),W=D?Vd(f,D):new FormData(f),xo(i,{pending:!0,data:W,method:f.method,action:y},y,W))},currentTarget:f}]})}}for(var su=0;su<Ia.length;su++){var lu=Ia[su],vv=lu.toLowerCase(),Sv=lu[0].toUpperCase()+lu.slice(1);fn(vv,"on"+Sv)}fn(yh,"onAnimationEnd"),fn(bh,"onAnimationIteration"),fn(Ch,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(zg,"onTransitionRun"),fn(Hg,"onTransitionStart"),fn(Ng,"onTransitionCancel"),fn(wh,"onTransitionEnd"),Yi("onMouseEnter",["mouseout","mouseover"]),Yi("onMouseLeave",["mouseout","mouseover"]),Yi("onPointerEnter",["pointerout","pointerover"]),Yi("onPointerLeave",["pointerout","pointerover"]),yi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),yi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),yi("onBeforeInput",["compositionend","keypress","textInput","paste"]),yi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),yi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),yi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ps="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(" "),yv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ps));function Yd(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var r=e[i],f=r.event;r=r.listeners;e:{var y=void 0;if(t)for(var D=r.length-1;0<=D;D--){var j=r[D],W=j.instance,ne=j.currentTarget;if(j=j.listener,W!==y&&f.isPropagationStopped())break e;y=j,f.currentTarget=ne;try{y(f)}catch(oe){Zs(oe)}f.currentTarget=null,y=W}else for(D=0;D<r.length;D++){if(j=r[D],W=j.instance,ne=j.currentTarget,j=j.listener,W!==y&&f.isPropagationStopped())break e;y=j,f.currentTarget=ne;try{y(f)}catch(oe){Zs(oe)}f.currentTarget=null,y=W}}}}function He(e,t){var i=t[va];i===void 0&&(i=t[va]=new Set);var r=e+"__bubble";i.has(r)||(Gd(t,e,2,!1),i.add(r))}function au(e,t,i){var r=0;t&&(r|=4),Gd(i,e,r,t)}var jl="_reactListening"+Math.random().toString(36).slice(2);function ou(e){if(!e[jl]){e[jl]=!0,jc.forEach(function(i){i!=="selectionchange"&&(yv.has(i)||au(i,!1,e),au(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jl]||(t[jl]=!0,au("selectionchange",!1,t))}}function Gd(e,t,i,r){switch(bp(t)){case 2:var f=Kv;break;case 8:f=Xv;break;default:f=wu}i=f.bind(null,t,i,e),f=void 0,!Aa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),r?f!==void 0?e.addEventListener(t,i,{capture:!0,passive:f}):e.addEventListener(t,i,!0):f!==void 0?e.addEventListener(t,i,{passive:f}):e.addEventListener(t,i,!1)}function uu(e,t,i,r,f){var y=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var D=r.tag;if(D===3||D===4){var j=r.stateNode.containerInfo;if(j===f)break;if(D===4)for(D=r.return;D!==null;){var W=D.tag;if((W===3||W===4)&&D.stateNode.containerInfo===f)return;D=D.return}for(;j!==null;){if(D=Fi(j),D===null)return;if(W=D.tag,W===5||W===6||W===26||W===27){r=y=D;continue e}j=j.parentNode}}r=r.return}$c(function(){var ne=y,oe=Ea(i),he=[];e:{var re=xh.get(e);if(re!==void 0){var se=Xs,Se=e;switch(e){case"keypress":if(Ws(i)===0)break e;case"keydown":case"keyup":se=dg;break;case"focusin":Se="focus",se=La;break;case"focusout":Se="blur",se=La;break;case"beforeblur":case"afterblur":se=La;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":se=Jc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=tg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=mg;break;case yh:case bh:case Ch:se=rg;break;case wh:se=vg;break;case"scroll":case"scrollend":se=Jm;break;case"wheel":se=yg;break;case"copy":case"cut":case"paste":se=lg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=th;break;case"toggle":case"beforetoggle":se=Cg}var ke=(t&4)!==0,Ze=!ke&&(e==="scroll"||e==="scrollend"),J=ke?re!==null?re+"Capture":null:re;ke=[];for(var $=ne,te;$!==null;){var ue=$;if(te=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||te===null||J===null||(ue=Hr($,J),ue!=null&&ke.push(_s($,ue,te))),Ze)break;$=$.return}0<ke.length&&(re=new se(re,Se,null,i,oe),he.push({event:re,listeners:ke}))}}if((t&7)===0){e:{if(re=e==="mouseover"||e==="pointerover",se=e==="mouseout"||e==="pointerout",re&&i!==xa&&(Se=i.relatedTarget||i.fromElement)&&(Fi(Se)||Se[Pi]))break e;if((se||re)&&(re=oe.window===oe?oe:(re=oe.ownerDocument)?re.defaultView||re.parentWindow:window,se?(Se=i.relatedTarget||i.toElement,se=ne,Se=Se?Fi(Se):null,Se!==null&&(Ze=C(Se),ke=Se.tag,Se!==Ze||ke!==5&&ke!==27&&ke!==6)&&(Se=null)):(se=null,Se=ne),se!==Se)){if(ke=Jc,ue="onMouseLeave",J="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(ke=th,ue="onPointerLeave",J="onPointerEnter",$="pointer"),Ze=se==null?re:zr(se),te=Se==null?re:zr(Se),re=new ke(ue,$+"leave",se,i,oe),re.target=Ze,re.relatedTarget=te,ue=null,Fi(oe)===ne&&(ke=new ke(J,$+"enter",Se,i,oe),ke.target=te,ke.relatedTarget=Ze,ue=ke),Ze=ue,se&&Se)t:{for(ke=bv,J=se,$=Se,te=0,ue=J;ue;ue=ke(ue))te++;ue=0;for(var xe=$;xe;xe=ke(xe))ue++;for(;0<te-ue;)J=ke(J),te--;for(;0<ue-te;)$=ke($),ue--;for(;te--;){if(J===$||$!==null&&J===$.alternate){ke=J;break t}J=ke(J),$=ke($)}ke=null}else ke=null;se!==null&&Wd(he,re,se,ke,!1),Se!==null&&Ze!==null&&Wd(he,Ze,Se,ke,!0)}}e:{if(re=ne?zr(ne):window,se=re.nodeName&&re.nodeName.toLowerCase(),se==="select"||se==="input"&&re.type==="file")var Ve=uh;else if(ah(re))if(ch)Ve=Mg;else{Ve=Rg;var ye=Dg}else se=re.nodeName,!se||se.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?ne&&wa(ne.elementType)&&(Ve=uh):Ve=Lg;if(Ve&&(Ve=Ve(e,ne))){oh(he,Ve,i,oe);break e}ye&&ye(e,re,ne),e==="focusout"&&ne&&re.type==="number"&&ne.memoizedProps.value!=null&&Ca(re,"number",re.value)}switch(ye=ne?zr(ne):window,e){case"focusin":(ah(ye)||ye.contentEditable==="true")&&(Qi=ye,Na=ne,Vr=null);break;case"focusout":Vr=Na=Qi=null;break;case"mousedown":ja=!0;break;case"contextmenu":case"mouseup":case"dragend":ja=!1,vh(he,i,oe);break;case"selectionchange":if(Bg)break;case"keydown":case"keyup":vh(he,i,oe)}var Le;if(Oa)e:{switch(e){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else $i?sh(e,i)&&(Ue="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ue="onCompositionStart");Ue&&(nh&&i.locale!=="ko"&&($i||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&$i&&(Le=Qc()):(Kn=oe,Ta="value"in Kn?Kn.value:Kn.textContent,$i=!0)),ye=Ul(ne,Ue),0<ye.length&&(Ue=new eh(Ue,e,null,i,oe),he.push({event:Ue,listeners:ye}),Le?Ue.data=Le:(Le=lh(i),Le!==null&&(Ue.data=Le)))),(Le=xg?Eg(e,i):kg(e,i))&&(Ue=Ul(ne,"onBeforeInput"),0<Ue.length&&(ye=new eh("onBeforeInput","beforeinput",null,i,oe),he.push({event:ye,listeners:Ue}),ye.data=Le)),gv(he,e,ne,i,oe)}Yd(he,t)})}function _s(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Ul(e,t){for(var i=t+"Capture",r=[];e!==null;){var f=e,y=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||y===null||(f=Hr(e,i),f!=null&&r.unshift(_s(e,f,y)),f=Hr(e,t),f!=null&&r.push(_s(e,f,y))),e.tag===3)return r;e=e.return}return[]}function bv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Wd(e,t,i,r,f){for(var y=t._reactName,D=[];i!==null&&i!==r;){var j=i,W=j.alternate,ne=j.stateNode;if(j=j.tag,W!==null&&W===r)break;j!==5&&j!==26&&j!==27||ne===null||(W=ne,f?(ne=Hr(i,y),ne!=null&&D.unshift(_s(i,ne,W))):f||(ne=Hr(i,y),ne!=null&&D.push(_s(i,ne,W)))),i=i.return}D.length!==0&&e.push({event:t,listeners:D})}var Cv=/\r\n?/g,wv=/\u0000|\uFFFD/g;function Kd(e){return(typeof e=="string"?e:""+e).replace(Cv,`
|
|
49
|
+
`).replace(wv,"")}function Xd(e,t){return t=Kd(t),Kd(e)===t}function Qe(e,t,i,r,f,y){switch(i){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Wi(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Wi(e,""+r);break;case"className":qs(e,"class",r);break;case"tabIndex":qs(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":qs(e,i,r);break;case"style":Kc(e,r,y);break;case"data":if(t!=="object"){qs(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Ys(""+r),e.setAttribute(i,r);break;case"action":case"formAction":if(typeof r=="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 y=="function"&&(i==="formAction"?(t!=="input"&&Qe(e,t,"name",f.name,f,null),Qe(e,t,"formEncType",f.formEncType,f,null),Qe(e,t,"formMethod",f.formMethod,f,null),Qe(e,t,"formTarget",f.formTarget,f,null)):(Qe(e,t,"encType",f.encType,f,null),Qe(e,t,"method",f.method,f,null),Qe(e,t,"target",f.target,f,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Ys(""+r),e.setAttribute(i,r);break;case"onClick":r!=null&&(e.onclick=An);break;case"onScroll":r!=null&&He("scroll",e);break;case"onScrollEnd":r!=null&&He("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(f.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}i=Ys(""+r),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":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""+r):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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":r===!0?e.setAttribute(i,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,r):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(i,r):e.removeAttribute(i);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(i):e.setAttribute(i,r);break;case"popover":He("beforetoggle",e),He("toggle",e),Fs(e,"popover",r);break;case"xlinkActuate":kn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":kn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":kn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":kn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":kn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":kn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":kn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":kn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":kn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Fs(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Qm.get(i)||i,Fs(e,i,r))}}function cu(e,t,i,r,f,y){switch(i){case"style":Kc(e,r,y);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(f.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof r=="string"?Wi(e,r):(typeof r=="number"||typeof r=="bigint")&&Wi(e,""+r);break;case"onScroll":r!=null&&He("scroll",e);break;case"onScrollEnd":r!=null&&He("scrollend",e);break;case"onClick":r!=null&&(e.onclick=An);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Uc.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),t=i.slice(2,f?i.length-7:void 0),y=e[zt]||null,y=y!=null?y[i]:null,typeof y=="function"&&e.removeEventListener(t,y,f),typeof r=="function")){typeof y!="function"&&y!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,r,f);break e}i in e?e[i]=r:r===!0?e.setAttribute(i,""):Fs(e,i,r)}}}function kt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("load",e);var r=!1,f=!1,y;for(y in i)if(i.hasOwnProperty(y)){var D=i[y];if(D!=null)switch(y){case"src":r=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Qe(e,t,y,D,i,null)}}f&&Qe(e,t,"srcSet",i.srcSet,i,null),r&&Qe(e,t,"src",i.src,i,null);return;case"input":He("invalid",e);var j=y=D=f=null,W=null,ne=null;for(r in i)if(i.hasOwnProperty(r)){var oe=i[r];if(oe!=null)switch(r){case"name":f=oe;break;case"type":D=oe;break;case"checked":W=oe;break;case"defaultChecked":ne=oe;break;case"value":y=oe;break;case"defaultValue":j=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,t));break;default:Qe(e,t,r,oe,i,null)}}Vc(e,y,j,W,ne,D,f,!1);return;case"select":He("invalid",e),r=D=y=null;for(f in i)if(i.hasOwnProperty(f)&&(j=i[f],j!=null))switch(f){case"value":y=j;break;case"defaultValue":D=j;break;case"multiple":r=j;default:Qe(e,t,f,j,i,null)}t=y,i=D,e.multiple=!!r,t!=null?Gi(e,!!r,t,!1):i!=null&&Gi(e,!!r,i,!0);return;case"textarea":He("invalid",e),y=f=r=null;for(D in i)if(i.hasOwnProperty(D)&&(j=i[D],j!=null))switch(D){case"value":r=j;break;case"defaultValue":f=j;break;case"children":y=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(o(91));break;default:Qe(e,t,D,j,i,null)}Gc(e,r,f,y);return;case"option":for(W in i)if(i.hasOwnProperty(W)&&(r=i[W],r!=null))switch(W){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Qe(e,t,W,r,i,null)}return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(r=0;r<ps.length;r++)He(ps[r],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ne in i)if(i.hasOwnProperty(ne)&&(r=i[ne],r!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Qe(e,t,ne,r,i,null)}return;default:if(wa(t)){for(oe in i)i.hasOwnProperty(oe)&&(r=i[oe],r!==void 0&&cu(e,t,oe,r,i,void 0));return}}for(j in i)i.hasOwnProperty(j)&&(r=i[j],r!=null&&Qe(e,t,j,r,i,null))}function xv(e,t,i,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,y=null,D=null,j=null,W=null,ne=null,oe=null;for(se in i){var he=i[se];if(i.hasOwnProperty(se)&&he!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":W=he;default:r.hasOwnProperty(se)||Qe(e,t,se,null,r,he)}}for(var re in r){var se=r[re];if(he=i[re],r.hasOwnProperty(re)&&(se!=null||he!=null))switch(re){case"type":y=se;break;case"name":f=se;break;case"checked":ne=se;break;case"defaultChecked":oe=se;break;case"value":D=se;break;case"defaultValue":j=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,t));break;default:se!==he&&Qe(e,t,re,se,r,he)}}ba(e,D,j,W,ne,oe,y,f);return;case"select":se=D=j=re=null;for(y in i)if(W=i[y],i.hasOwnProperty(y)&&W!=null)switch(y){case"value":break;case"multiple":se=W;default:r.hasOwnProperty(y)||Qe(e,t,y,null,r,W)}for(f in r)if(y=r[f],W=i[f],r.hasOwnProperty(f)&&(y!=null||W!=null))switch(f){case"value":re=y;break;case"defaultValue":j=y;break;case"multiple":D=y;default:y!==W&&Qe(e,t,f,y,r,W)}t=j,i=D,r=se,re!=null?Gi(e,!!i,re,!1):!!r!=!!i&&(t!=null?Gi(e,!!i,t,!0):Gi(e,!!i,i?[]:"",!1));return;case"textarea":se=re=null;for(j in i)if(f=i[j],i.hasOwnProperty(j)&&f!=null&&!r.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Qe(e,t,j,null,r,f)}for(D in r)if(f=r[D],y=i[D],r.hasOwnProperty(D)&&(f!=null||y!=null))switch(D){case"value":re=f;break;case"defaultValue":se=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:f!==y&&Qe(e,t,D,f,r,y)}Yc(e,re,se);return;case"option":for(var Se in i)if(re=i[Se],i.hasOwnProperty(Se)&&re!=null&&!r.hasOwnProperty(Se))switch(Se){case"selected":e.selected=!1;break;default:Qe(e,t,Se,null,r,re)}for(W in r)if(re=r[W],se=i[W],r.hasOwnProperty(W)&&re!==se&&(re!=null||se!=null))switch(W){case"selected":e.selected=re&&typeof re!="function"&&typeof re!="symbol";break;default:Qe(e,t,W,re,r,se)}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 ke in i)re=i[ke],i.hasOwnProperty(ke)&&re!=null&&!r.hasOwnProperty(ke)&&Qe(e,t,ke,null,r,re);for(ne in r)if(re=r[ne],se=i[ne],r.hasOwnProperty(ne)&&re!==se&&(re!=null||se!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(o(137,t));break;default:Qe(e,t,ne,re,r,se)}return;default:if(wa(t)){for(var Ze in i)re=i[Ze],i.hasOwnProperty(Ze)&&re!==void 0&&!r.hasOwnProperty(Ze)&&cu(e,t,Ze,void 0,r,re);for(oe in r)re=r[oe],se=i[oe],!r.hasOwnProperty(oe)||re===se||re===void 0&&se===void 0||cu(e,t,oe,re,r,se);return}}for(var J in i)re=i[J],i.hasOwnProperty(J)&&re!=null&&!r.hasOwnProperty(J)&&Qe(e,t,J,null,r,re);for(he in r)re=r[he],se=i[he],!r.hasOwnProperty(he)||re===se||re==null&&se==null||Qe(e,t,he,re,r,se)}function $d(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ev(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),r=0;r<i.length;r++){var f=i[r],y=f.transferSize,D=f.initiatorType,j=f.duration;if(y&&j&&$d(D)){for(D=0,j=f.responseEnd,r+=1;r<i.length;r++){var W=i[r],ne=W.startTime;if(ne>j)break;var oe=W.transferSize,he=W.initiatorType;oe&&$d(he)&&(W=W.responseEnd,D+=oe*(W<j?1:(j-ne)/(W-ne)))}if(--r,t+=8*(y+D)/(f.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 hu=null,fu=null;function Il(e){return e.nodeType===9?e:e.ownerDocument}function Qd(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 Zd(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 du(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 pu=null;function kv(){var e=window.event;return e&&e.type==="popstate"?e===pu?!1:(pu=e,!0):(pu=null,!1)}var Jd=typeof setTimeout=="function"?setTimeout:void 0,Av=typeof clearTimeout=="function"?clearTimeout:void 0,ep=typeof Promise=="function"?Promise:void 0,Tv=typeof queueMicrotask=="function"?queueMicrotask:typeof ep<"u"?function(e){return ep.resolve(null).then(e).catch(Dv)}:Jd;function Dv(e){setTimeout(function(){throw e})}function hi(e){return e==="head"}function tp(e,t){var i=t,r=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(r===0){e.removeChild(f),xr(t);return}r--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")r++;else if(i==="html")ms(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,ms(i);for(var y=i.firstChild;y;){var D=y.nextSibling,j=y.nodeName;y[Br]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&y.rel.toLowerCase()==="stylesheet"||i.removeChild(y),y=D}}else i==="body"&&ms(e.ownerDocument.body);i=f}while(i);xr(t)}function np(e,t){var i=e;e=0;do{var r=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||""),r&&r.nodeType===8)if(i=r.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=r}while(i)}function _u(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":_u(i),Sa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function Rv(e,t,i,r){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Br])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(y=e.getAttribute("rel"),y==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(y!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(y=e.getAttribute("src"),(y!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&y&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var y=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===y)return e}else return e;if(e=on(e.nextSibling),e===null)break}return null}function Lv(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=on(e.nextSibling),e===null))return null;return e}function ip(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=on(e.nextSibling),e===null))return null;return e}function mu(e){return e.data==="$?"||e.data==="$~"}function gu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Mv(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var r=function(){t(),i.removeEventListener("DOMContentLoaded",r)};i.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function on(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 vu=null;function rp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return on(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function sp(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 lp(e,t,i){switch(t=Il(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 ms(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Sa(e)}var un=new Map,ap=new Set;function Pl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qn=Z.d;Z.d={f:Ov,r:Bv,D:zv,C:Hv,L:Nv,m:jv,X:Iv,S:Uv,M:Pv};function Ov(){var e=qn.f(),t=Ml();return e||t}function Bv(e){var t=qi(e);t!==null&&t.tag===5&&t.type==="form"?xf(t):qn.r(e)}var br=typeof document>"u"?null:document;function op(e,t,i){var r=br;if(r&&typeof t=="string"&&t){var f=en(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),ap.has(f)||(ap.add(f),e={rel:e,crossOrigin:i,href:t},r.querySelector(f)===null&&(t=r.createElement("link"),kt(t,"link",e),St(t),r.head.appendChild(t)))}}function zv(e){qn.D(e),op("dns-prefetch",e,null)}function Hv(e,t){qn.C(e,t),op("preconnect",e,t)}function Nv(e,t,i){qn.L(e,t,i);var r=br;if(r&&e&&t){var f='link[rel="preload"][as="'+en(t)+'"]';t==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+en(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+en(i.imageSizes)+'"]')):f+='[href="'+en(e)+'"]';var y=f;switch(t){case"style":y=Cr(e);break;case"script":y=wr(e)}un.has(y)||(e=c({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),un.set(y,e),r.querySelector(f)!==null||t==="style"&&r.querySelector(gs(y))||t==="script"&&r.querySelector(vs(y))||(t=r.createElement("link"),kt(t,"link",e),St(t),r.head.appendChild(t)))}}function jv(e,t){qn.m(e,t);var i=br;if(i&&e){var r=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+en(r)+'"][href="'+en(e)+'"]',y=f;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=wr(e)}if(!un.has(y)&&(e=c({rel:"modulepreload",href:e},t),un.set(y,e),i.querySelector(f)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(vs(y)))return}r=i.createElement("link"),kt(r,"link",e),St(r),i.head.appendChild(r)}}}function Uv(e,t,i){qn.S(e,t,i);var r=br;if(r&&e){var f=Vi(r).hoistableStyles,y=Cr(e);t=t||"default";var D=f.get(y);if(!D){var j={loading:0,preload:null};if(D=r.querySelector(gs(y)))j.loading=5;else{e=c({rel:"stylesheet",href:e,"data-precedence":t},i),(i=un.get(y))&&Su(e,i);var W=D=r.createElement("link");St(W),kt(W,"link",e),W._p=new Promise(function(ne,oe){W.onload=ne,W.onerror=oe}),W.addEventListener("load",function(){j.loading|=1}),W.addEventListener("error",function(){j.loading|=2}),j.loading|=4,Fl(D,t,r)}D={type:"stylesheet",instance:D,count:1,state:j},f.set(y,D)}}}function Iv(e,t){qn.X(e,t);var i=br;if(i&&e){var r=Vi(i).hoistableScripts,f=wr(e),y=r.get(f);y||(y=i.querySelector(vs(f)),y||(e=c({src:e,async:!0},t),(t=un.get(f))&&yu(e,t),y=i.createElement("script"),St(y),kt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function Pv(e,t){qn.M(e,t);var i=br;if(i&&e){var r=Vi(i).hoistableScripts,f=wr(e),y=r.get(f);y||(y=i.querySelector(vs(f)),y||(e=c({src:e,async:!0,type:"module"},t),(t=un.get(f))&&yu(e,t),y=i.createElement("script"),St(y),kt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function up(e,t,i,r){var f=(f=de.current)?Pl(f):null;if(!f)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Cr(i.href),i=Vi(f).hoistableStyles,r=i.get(t),r||(r={type:"style",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Cr(i.href);var y=Vi(f).hoistableStyles,D=y.get(e);if(D||(f=f.ownerDocument||f,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(e,D),(y=f.querySelector(gs(e)))&&!y._p&&(D.instance=y,D.state.loading=5),un.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},un.set(e,i),y||Fv(f,e,i,D.state))),t&&r===null)throw Error(o(528,""));return D}if(t&&r!==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=wr(i),i=Vi(f).hoistableScripts,r=i.get(t),r||(r={type:"script",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Cr(e){return'href="'+en(e)+'"'}function gs(e){return'link[rel="stylesheet"]['+e+"]"}function cp(e){return c({},e,{"data-precedence":e.precedence,precedence:null})}function Fv(e,t,i,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),kt(t,"link",i),St(t),e.head.appendChild(t))}function wr(e){return'[src="'+en(e)+'"]'}function vs(e){return"script[async]"+e}function hp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+en(i.href)+'"]');if(r)return t.instance=r,St(r),r;var f=c({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),St(r),kt(r,"style",f),Fl(r,i.precedence,e),t.instance=r;case"stylesheet":f=Cr(i.href);var y=e.querySelector(gs(f));if(y)return t.state.loading|=4,t.instance=y,St(y),y;r=cp(i),(f=un.get(f))&&Su(r,f),y=(e.ownerDocument||e).createElement("link"),St(y);var D=y;return D._p=new Promise(function(j,W){D.onload=j,D.onerror=W}),kt(y,"link",r),t.state.loading|=4,Fl(y,i.precedence,e),t.instance=y;case"script":return y=wr(i.src),(f=e.querySelector(vs(y)))?(t.instance=f,St(f),f):(r=i,(f=un.get(y))&&(r=c({},i),yu(r,f)),e=e.ownerDocument||e,f=e.createElement("script"),St(f),kt(f,"link",r),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Fl(r,i.precedence,e));return t.instance}function Fl(e,t,i){for(var r=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=r.length?r[r.length-1]:null,y=f,D=0;D<r.length;D++){var j=r[D];if(j.dataset.precedence===t)y=j;else if(y!==f)break}y?y.parentNode.insertBefore(e,y.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Su(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ql=null;function fp(e,t,i){if(ql===null){var r=new Map,f=ql=new Map;f.set(i,r)}else f=ql,r=f.get(i),r||(r=new Map,f.set(i,r));if(r.has(e))return r;for(r.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var y=i[f];if(!(y[Br]||y[Ct]||e==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var D=y.getAttribute(t)||"";D=e+D;var j=r.get(D);j?j.push(y):r.set(D,[y])}}return r}function dp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function qv(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 pp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Vv(e,t,i,r){if(i.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=Cr(r.href),y=t.querySelector(gs(f));if(y){t=y._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Vl.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=y,St(y);return}y=t.ownerDocument||t,r=cp(r),(f=un.get(f))&&Su(r,f),y=y.createElement("link"),St(y);var D=y;D._p=new Promise(function(j,W){D.onload=j,D.onerror=W}),kt(y,"link",r),i.instance=y}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Vl.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var bu=0;function Yv(e,t){return e.stylesheets&&e.count===0&&Gl(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var r=setTimeout(function(){if(e.stylesheets&&Gl(e,e.stylesheets),e.unsuspend){var y=e.unsuspend;e.unsuspend=null,y()}},6e4+t);0<e.imgBytes&&bu===0&&(bu=62500*Ev());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Gl(e,e.stylesheets),e.unsuspend)){var y=e.unsuspend;e.unsuspend=null,y()}},(e.imgBytes>bu?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(f)}}:null}function Vl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yl=null;function Gl(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yl=new Map,t.forEach(Gv,e),Yl=null,Vl.call(e))}function Gv(e,t){if(!(t.state.loading&4)){var i=Yl.get(e);if(i)var r=i.get(null);else{i=new Map,Yl.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<f.length;y++){var D=f[y];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(i.set(D.dataset.precedence,D),r=D)}r&&i.set(null,r)}f=t.instance,D=f.getAttribute("data-precedence"),y=i.get(D)||r,y===r&&i.set(null,f),i.set(D,f),this.count++,r=Vl.bind(this),f.addEventListener("load",r),f.addEventListener("error",r),y?y.parentNode.insertBefore(f,y.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var Ss={$$typeof:m,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Wv(e,t,i,r,f,y,D,j,W){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=_a(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_a(0),this.hiddenUpdates=_a(null),this.identifierPrefix=r,this.onUncaughtError=f,this.onCaughtError=y,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function _p(e,t,i,r,f,y,D,j,W,ne,oe,he){return e=new Wv(e,t,i,D,W,ne,oe,he,j),t=1,y===!0&&(t|=24),y=Yt(3,null,null,t),e.current=y,y.stateNode=e,t=Ja(),t.refCount++,e.pooledCache=t,t.refCount++,y.memoizedState={element:r,isDehydrated:i,cache:t},io(y),e}function mp(e){return e?(e=er,e):er}function gp(e,t,i,r,f,y){f=mp(f),r.context===null?r.context=f:r.pendingContext=f,r=ei(t),r.payload={element:i},y=y===void 0?null:y,y!==null&&(r.callback=y),i=ti(e,r,t),i!==null&&(Pt(i,e,t),Qr(i,e,t))}function vp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Cu(e,t){vp(e,t),(e=e.alternate)&&vp(e,t)}function Sp(e){if(e.tag===13||e.tag===31){var t=xi(e,67108864);t!==null&&Pt(t,e,67108864),Cu(e,67108864)}}function yp(e){if(e.tag===13||e.tag===31){var t=$t();t=ma(t);var i=xi(e,t);i!==null&&Pt(i,e,t),Cu(e,t)}}var Wl=!0;function Kv(e,t,i,r){var f=Y.T;Y.T=null;var y=Z.p;try{Z.p=2,wu(e,t,i,r)}finally{Z.p=y,Y.T=f}}function Xv(e,t,i,r){var f=Y.T;Y.T=null;var y=Z.p;try{Z.p=8,wu(e,t,i,r)}finally{Z.p=y,Y.T=f}}function wu(e,t,i,r){if(Wl){var f=xu(r);if(f===null)uu(e,t,r,Kl,i),Cp(e,r);else if(Qv(f,e,t,i,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<$v.indexOf(e)){for(;f!==null;){var y=qi(f);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var D=Si(y.pendingLanes);if(D!==0){var j=y;for(j.pendingLanes|=2,j.entangledLanes|=2;D;){var W=1<<31-Je(D);j.entanglements[1]|=W,D&=~W}Cn(y),(We&6)===0&&(Rl=ot()+500,ds(0))}}break;case 31:case 13:j=xi(y,2),j!==null&&Pt(j,y,2),Ml(),Cu(y,2)}if(y=xu(r),y===null&&uu(e,t,r,Kl,i),y===f)break;f=y}f!==null&&r.stopPropagation()}else uu(e,t,r,null,i)}}function xu(e){return e=Ea(e),Eu(e)}var Kl=null;function Eu(e){if(Kl=null,e=Fi(e),e!==null){var t=C(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=g(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 Kl=e,null}function bp(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(Ot()){case ae:return 2;case ve:return 8;case Ce:case De:return 32;case Oe:return 268435456;default:return 32}default:return 32}}var ku=!1,fi=null,di=null,pi=null,ys=new Map,bs=new Map,_i=[],$v="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 Cp(e,t){switch(e){case"focusin":case"focusout":fi=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":pi=null;break;case"pointerover":case"pointerout":ys.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bs.delete(t.pointerId)}}function Cs(e,t,i,r,f,y){return e===null||e.nativeEvent!==y?(e={blockedOn:t,domEventName:i,eventSystemFlags:r,nativeEvent:y,targetContainers:[f]},t!==null&&(t=qi(t),t!==null&&Sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function Qv(e,t,i,r,f){switch(t){case"focusin":return fi=Cs(fi,e,t,i,r,f),!0;case"dragenter":return di=Cs(di,e,t,i,r,f),!0;case"mouseover":return pi=Cs(pi,e,t,i,r,f),!0;case"pointerover":var y=f.pointerId;return ys.set(y,Cs(ys.get(y)||null,e,t,i,r,f)),!0;case"gotpointercapture":return y=f.pointerId,bs.set(y,Cs(bs.get(y)||null,e,t,i,r,f)),!0}return!1}function wp(e){var t=Fi(e.target);if(t!==null){var i=C(t);if(i!==null){if(t=i.tag,t===13){if(t=g(i),t!==null){e.blockedOn=t,Hc(e.priority,function(){yp(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,Hc(e.priority,function(){yp(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 Xl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=xu(e.nativeEvent);if(i===null){i=e.nativeEvent;var r=new i.constructor(i.type,i);xa=r,i.target.dispatchEvent(r),xa=null}else return t=qi(i),t!==null&&Sp(t),e.blockedOn=i,!1;t.shift()}return!0}function xp(e,t,i){Xl(e)&&i.delete(t)}function Zv(){ku=!1,fi!==null&&Xl(fi)&&(fi=null),di!==null&&Xl(di)&&(di=null),pi!==null&&Xl(pi)&&(pi=null),ys.forEach(xp),bs.forEach(xp)}function $l(e,t){e.blockedOn===t&&(e.blockedOn=null,ku||(ku=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Zv)))}var Ql=null;function Ep(e){Ql!==e&&(Ql=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ql===e&&(Ql=null);for(var t=0;t<e.length;t+=3){var i=e[t],r=e[t+1],f=e[t+2];if(typeof r!="function"){if(Eu(r||i)===null)continue;break}var y=qi(i);y!==null&&(e.splice(t,3),t-=3,xo(y,{pending:!0,data:f,method:i.method,action:r},r,f))}}))}function xr(e){function t(W){return $l(W,e)}fi!==null&&$l(fi,e),di!==null&&$l(di,e),pi!==null&&$l(pi,e),ys.forEach(t),bs.forEach(t);for(var i=0;i<_i.length;i++){var r=_i[i];r.blockedOn===e&&(r.blockedOn=null)}for(;0<_i.length&&(i=_i[0],i.blockedOn===null);)wp(i),i.blockedOn===null&&_i.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(r=0;r<i.length;r+=3){var f=i[r],y=i[r+1],D=f[zt]||null;if(typeof y=="function")D||Ep(i);else if(D){var j=null;if(y&&y.hasAttribute("formAction")){if(f=y,D=y[zt]||null)j=D.formAction;else if(Eu(f)!==null)continue}else j=D.action;typeof j=="function"?i[r+1]=j:(i.splice(r,3),r-=3),Ep(i)}}}function kp(){function e(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(D){return f=D})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),r||setTimeout(i,20)}function i(){if(!r&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),f!==null&&(f(),f=null)}}}function Au(e){this._internalRoot=e}Zl.prototype.render=Au.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,r=$t();gp(i,r,e,t,null,null)},Zl.prototype.unmount=Au.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gp(e.current,2,null,e,null,null),Ml(),t[Pi]=null}};function Zl(e){this._internalRoot=e}Zl.prototype.unstable_scheduleHydration=function(e){if(e){var t=zc();e={blockedOn:null,target:e,priority:t};for(var i=0;i<_i.length&&t!==0&&t<_i[i].priority;i++);_i.splice(i,0,e),i===0&&wp(e)}};var Ap=s.version;if(Ap!=="19.2.6")throw Error(o(527,Ap,"19.2.6"));Z.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 Jv={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jl.isDisabled&&Jl.supportsFiber)try{bt=Jl.inject(Jv),gt=Jl}catch{}}return xs.createRoot=function(e,t){if(!S(e))throw Error(o(299));var i=!1,r="",f=Bf,y=zf,D=Hf;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(y=t.onCaughtError),t.onRecoverableError!==void 0&&(D=t.onRecoverableError)),t=_p(e,1,!1,null,null,i,r,null,f,y,D,kp),e[Pi]=t.current,ou(e),new Au(t)},xs.hydrateRoot=function(e,t,i){if(!S(e))throw Error(o(299));var r=!1,f="",y=Bf,D=zf,j=Hf,W=null;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(y=i.onUncaughtError),i.onCaughtError!==void 0&&(D=i.onCaughtError),i.onRecoverableError!==void 0&&(j=i.onRecoverableError),i.formState!==void 0&&(W=i.formState)),t=_p(e,1,!0,t,i??null,r,f,W,y,D,j,kp),t.context=mp(null),i=t.current,r=$t(),r=ma(r),f=ei(r),f.callback=null,ti(i,f,r),i=r,t.current.lanes=i,Or(t,i),Cn(t),e[Pi]=t.current,ou(e),new Zl(t)},xs.version="19.2.6",xs}var jp;function h0(){if(jp)return Ru.exports;jp=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(s){console.error(s)}}return n(),Ru.exports=c0(),Ru.exports}var f0=h0();function d0({sidebar:n,children:s}){const[l,o]=ge.useState(!1);return F.jsxs("div",{className:l?"app-shell is-sidebar-collapsed":"app-shell",children:[F.jsxs("aside",{className:"app-sidebar",children:[F.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":l?"Expand sidebar":"Collapse sidebar",title:l?"Expand sidebar":"Collapse sidebar",onClick:()=>o(S=>!S)}),F.jsx("div",{className:"sidebar-content",children:n})]}),F.jsx("main",{className:"app-main",children:s})]})}function p0(n,s){return n.find(l=>l.taskSlug===s)??n[0]??null}const Be={getAppPreferences(){return Pe("/api/settings/preferences")},updateAppPreferences(n){return Pe("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getCurrentProject(){return Pe("/api/projects/current")},getRecentRepositoryPaths(){return Pe("/api/projects/recent")},connectProject(n){return Pe("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return Pe("/api/tasks")},createTask(n){return Pe("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,s={}){return Pe(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(s)})},getHarnessStatus(){return Pe("/api/projects/harness")},applyHarness(){return Pe("/api/projects/harness/apply",{method:"POST"})},getTaskStatus(n){return Pe(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return Pe(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,s,l={}){return Pe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/start`,{method:"POST",body:JSON.stringify(l)})},stopRoleSession(n,s){return Pe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/stop`,{method:"POST"})},restartRoleSession(n,s,l={}){return Pe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/restart`,{method:"POST",body:JSON.stringify(l)})},resumeRoleSession(n,s,l={}){return Pe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/resume`,{method:"POST",body:JSON.stringify(l)})},dispatchRoleCommand(n,s){return Pe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/dispatch`,{method:"POST"})},listMessages(n){return Pe(`/api/tasks/${encodeURIComponent(n)}/messages`)},sendRoleMessage(n,s){return Pe(`/api/tasks/${encodeURIComponent(n)}/messages`,{method:"POST",body:JSON.stringify(s)})},stageMessage(n,s){return Pe(`/api/tasks/${encodeURIComponent(n)}/messages/${s}/stage`,{method:"POST"})},rejectMessage(n,s){return Pe(`/api/tasks/${encodeURIComponent(n)}/messages/${s}/reject`,{method:"POST"})},getOrchestrationState(n){return Pe(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,s){return Pe(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(s)})},getTaskRoundState(n){return Pe(`/api/tasks/${encodeURIComponent(n)}/round`)},getTranslationSettings(){return Pe("/api/translation/settings")},updateTranslationSettings(n){return Pe("/api/translation/settings",{method:"PUT",body:JSON.stringify(n)})},getTranslationPrompts(){return Pe("/api/translation/prompts")},testTranslationProvider(){return Pe("/api/translation/test",{method:"POST"})},startTranslationSession(n,s){return Pe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/start`,{method:"POST"})},pollTranslationSession(n,s,l){const o=new URLSearchParams({after:String(s)});return l!==void 0&&o.set("limit",String(l)),Pe(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,s,l){return Pe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/input`,{method:"POST",body:JSON.stringify(l)})},sendTranslatedInput(n,s,l){return Pe(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/send`,{method:"POST",body:JSON.stringify(l)})},clearTranslationSession(n){return Pe(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},retryTranslation(n,s){return Pe(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(s)}`,{method:"POST"})}};async function Pe(n,s={}){var S,C;const l=new Headers(s.headers);s.body!==void 0&&s.body!==null&&!l.has("content-type")&&l.set("content-type","application/json");const o=await fetch(n,{...s,headers:l});if(!o.ok){const g=await o.json().catch(()=>null),a=(S=g==null?void 0:g.error)!=null&&S.hint?`${g.error.message} ${g.error.hint}`:((C=g==null?void 0:g.error)==null?void 0:C.message)??`Request failed: ${o.status}`;throw new Error(a)}return o.json()}function _0({events:n,maxEvents:s=8,showHeader:l=!0}){const o=s===null?n:n.slice(-s);return F.jsxs("section",{className:"event-log",children:[l?F.jsx("h2",{children:"Events"}):null,n.length===0?F.jsx("p",{className:"muted",children:"No terminal events yet."}):F.jsx("ol",{children:o.map((S,C)=>F.jsx("li",{children:S},`${S}-${C}`))})]})}function Bs({status:n}){return F.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function m0({status:n,applyResult:s,busy:l=!1,onRefresh:o,onApply:S}){return n?F.jsxs("section",{className:"harness-panel",children:[F.jsxs("div",{className:"harness-panel-header",children:[F.jsx("p",{className:"muted",children:n.needsApply?`${n.plannedChanges.length} planned changes`:"up to date"}),F.jsxs("div",{className:"harness-actions",children:[F.jsx("button",{type:"button",disabled:l,onClick:()=>void o(),children:"Refresh"}),F.jsx("button",{type:"button",disabled:l||!n.needsApply,onClick:()=>void S(),children:"Install / Update"})]})]}),F.jsx("ol",{className:"harness-file-list",children:n.files.map(C=>F.jsxs("li",{children:[F.jsx("span",{children:C.path}),F.jsx(Bs,{status:C.action})]},C.path))}),n.plannedChanges.length>0?F.jsxs("div",{className:"harness-changes",children:[F.jsx("h3",{children:"Planned Changes"}),F.jsx("ul",{children:n.plannedChanges.map(C=>F.jsxs("li",{children:[F.jsx("strong",{children:C.action})," ",C.path]},`${C.path}:${C.action}`))})]}):null,s?F.jsxs("div",{className:"harness-result",children:[F.jsx("p",{children:s.message}),s.changedFiles.length>0?F.jsx("ul",{children:s.changedFiles.map(C=>F.jsxs("li",{children:[F.jsx("strong",{children:C.action})," ",C.path]},`${C.path}:${C.action}`))}):null]}):null,n.warnings.length>0?F.jsx("ul",{className:"warnings",children:n.warnings.map(C=>F.jsx("li",{children:C},C))}):null]}):null}function fc(n){return{pending:n.filter(s=>s.status==="pending_approval").length,queued:n.filter(s=>s.status==="queued").length,delivered:n.filter(s=>s.status==="delivered"||s.status==="staged").length}}function g0({messages:n,orchestration:s,busy:l,maxMessages:o=6,showControls:S=!0,showHeader:C=!0,onModeChange:g,onPausedChange:a}){const[u,h]=ge.useState(null),p=fc(n),c=(s==null?void 0:s.mode)??"manual",b=o===null?n:n.slice(-o),w=o===null?0:Math.max(0,n.length-o);async function k(x){await S0(x.body),h(x.id),window.setTimeout(()=>h(v=>v===x.id?null:v),1200)}return F.jsxs("section",{className:"message-panel",children:[C?F.jsxs("div",{className:"message-panel-header",children:[F.jsxs("div",{children:[F.jsx("h2",{children:"Messages"}),F.jsxs("p",{className:"muted",children:[p.pending," pending / ",p.queued," queued / ",p.delivered," delivered"]})]}),S&&g&&a?F.jsxs("div",{className:"message-controls",children:[F.jsxs("label",{className:"message-mode-toggle",children:[F.jsx("input",{type:"checkbox",checked:c==="auto",disabled:l,onChange:x=>g(x.target.checked?"auto":"manual")}),F.jsx("span",{children:"Auto orchestration"})]}),F.jsx("button",{type:"button",disabled:l||c!=="auto",onClick:()=>a(!(s!=null&&s.paused)),children:s!=null&&s.paused?"Resume":"Pause"})]}):null]}):null,n.length===0?F.jsx("p",{className:"muted",children:"No role messages yet."}):F.jsx("ol",{className:"message-list",children:b.map((x,v)=>{const _=w+v+1;return F.jsxs("li",{className:`message-item message-${x.status}`,children:[F.jsxs("div",{className:"message-item-main",children:[F.jsxs("div",{className:"message-meta",children:[F.jsxs("span",{className:"message-sequence",children:["#",_]}),F.jsx("time",{dateTime:x.createdAt,children:v0(x.createdAt)}),F.jsxs("strong",{children:[x.fromRole," ","->"," ",x.toRole]}),F.jsx("span",{children:x.type}),F.jsx(Bs,{status:x.status})]}),F.jsx("p",{children:x.body}),x.failureReason?F.jsx("span",{className:"message-reason",children:x.failureReason}):null,x.bodyPath?F.jsx("span",{className:"message-path",children:x.bodyPath}):null]}),F.jsx("div",{className:"message-actions",children:F.jsx("button",{type:"button",disabled:l,onClick:()=>void k(x),children:u===x.id?"Copied":"Copy"})})]},x.id)})})]})}function v0(n){const s=new Date(n);return Number.isNaN(s.getTime())?n:s.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}async function S0(n){var l;if((l=navigator.clipboard)!=null&&l.writeText){await navigator.clipboard.writeText(n);return}const s=document.createElement("textarea");s.value=n,s.setAttribute("readonly","true"),s.style.position="fixed",s.style.left="-9999px",document.body.appendChild(s),s.select(),document.execCommand("copy"),s.remove()}function y0({defaultPath:n="",recentPaths:s=[],busy:l=!1,onConnect:o}){const[S,C]=ge.useState(n);ge.useEffect(()=>{n&&C(n)},[n]);async function g(a){a.preventDefault(),await o(S)}return F.jsx("form",{className:"repo-connect",onSubmit:g,children:F.jsxs("div",{className:s.length>0?"inline-form has-recent-paths":"inline-form",children:[F.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:S,onChange:a=>C(a.target.value),placeholder:"/path/to/repo"}),s.length>0?F.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:a=>{a.target.value&&C(a.target.value)},children:[F.jsx("option",{value:"",children:"Recent"}),s.map(a=>F.jsx("option",{value:a,children:a},a))]}):null,F.jsx("button",{type:"submit",disabled:l||!S.trim(),children:"Connect"})]})})}function b0({tasks:n,activeTaskSlug:s,onSelect:l}){return F.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(o=>F.jsxs("button",{className:o.taskSlug===s?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>l(o.taskSlug),children:[F.jsx("span",{children:o.title||o.taskSlug}),F.jsx(Bs,{status:o.status==="created"?"unknown":"running"})]},o.taskSlug))})}function C0({workflow:n}){return n?F.jsxs("section",{className:"workflow-panel",children:[F.jsx("div",{className:"workflow-summary",children:F.jsx("p",{children:n.nextAction})}),F.jsx("ol",{className:"workflow-steps",children:n.steps.map(s=>F.jsxs("li",{className:s.id===n.currentStepId?"is-current":void 0,children:[F.jsx("span",{children:s.label}),F.jsx(Bs,{status:s.status})]},s.id))})]}):null}function w0({project:n,recentRepositoryPaths:s,tasks:l,activeTaskSlug:o,workflow:S,messages:C,orchestration:g,events:a,harnessStatus:u,harnessApplyResult:h,busy:p,onConnect:c,onRefreshHarness:b,onApplyHarness:w,onCreateTask:k,onSelectTask:x,themeMode:v,onThemeModeChange:_,roundCompletionAlerts:d,onRoundCompletionAlertsChange:m,onStageMessage:E,onRejectMessage:R,onOpenMessageRole:A}){const[L,T]=ge.useState(""),[z,H]=ge.useState(!0),[q,V]=ge.useState(!1),[I,G]=ge.useState(!1),K=fc(C),Y=L.trim();async function Z(ee){ee.preventDefault(),await k({taskSlug:Y,createWorktree:z}),T(""),H(!0)}return F.jsxs("div",{className:"project-dashboard",children:[F.jsx("header",{className:"brand-header",children:F.jsx("strong",{children:"VibeCodingMaster"})}),F.jsx(Ni,{title:"Repository Path",defaultOpen:!o,children:F.jsx(y0,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:s,busy:p,onConnect:c})}),n?F.jsx(Ni,{title:"Repository",children:F.jsxs("div",{className:"project-summary",children:[F.jsxs("dl",{children:[F.jsxs("div",{children:[F.jsx("dt",{children:"Path"}),F.jsx("dd",{children:n.repoRoot})]}),F.jsxs("div",{children:[F.jsx("dt",{children:"Branch"}),F.jsx("dd",{children:n.branch})]}),F.jsxs("div",{children:[F.jsx("dt",{children:"Working tree"}),F.jsx("dd",{children:n.isDirty?"uncommitted changes":"clean"})]})]}),n.warnings.length>0?F.jsx("ul",{className:"warnings",children:n.warnings.map(ee=>F.jsx("li",{children:ee},ee))}):null]})}):null,o?F.jsx(Ni,{title:"Workflow",children:S?F.jsx(C0,{workflow:S}):F.jsx("p",{className:"muted",children:"Loading workflow..."})}):null,F.jsx(Ni,{title:"Settings",children:F.jsxs("div",{className:"sidebar-settings",children:[F.jsxs("button",{"aria-label":`Theme mode: ${Up(v)}`,className:"settings-toggle theme-mode-toggle",disabled:p,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>_(x0(v)),children:[F.jsx("span",{children:"Theme"}),F.jsx("span",{children:Up(v)})]}),F.jsxs("button",{"aria-pressed":d,className:d?"settings-toggle is-active":"settings-toggle",disabled:p,type:"button",onClick:()=>m(!d),children:[F.jsx("span",{children:"Round alert"}),F.jsx("span",{children:d?"on":"off"})]}),o?F.jsxs(F.Fragment,{children:[F.jsxs("button",{type:"button",onClick:()=>V(!0),children:[F.jsx("span",{children:"Messages"}),F.jsxs("span",{className:"muted",children:[K.pending," pending / ",K.queued," queued"]})]}),F.jsxs("button",{type:"button",onClick:()=>G(!0),children:[F.jsx("span",{children:"Events"}),F.jsxs("span",{className:"muted",children:[a.length," total"]})]})]}):null]})}),n?F.jsx(Ni,{title:"VCM Harness",children:F.jsx(m0,{status:u,applyResult:h,busy:p,onRefresh:b,onApply:w})}):null,n?F.jsx(Ni,{title:"New Task",children:F.jsx("div",{className:"task-create",children:F.jsxs("form",{onSubmit:Z,children:[F.jsx("input",{value:L,onChange:ee=>T(ee.target.value),placeholder:"task name"}),F.jsxs("label",{className:"task-create-option",children:[F.jsx("input",{type:"checkbox",checked:z,onChange:ee=>H(ee.target.checked)}),F.jsx("span",{children:"Create worktree and branch"})]}),z?F.jsxs("div",{className:"task-create-preview",children:[F.jsxs("small",{children:["branch: ",Y?`feature/${Y}`:"feature/<task>"]}),F.jsxs("small",{children:["worktree: ",Y?`.claude/worktrees/${Y}`:".claude/worktrees/<task>"]})]}):F.jsx("div",{className:"task-create-preview",children:F.jsx("small",{children:"uses current repository path and current branch"})}),F.jsx("button",{type:"submit",disabled:p||!Y,children:"Create"})]})})}):null,l.length>0?F.jsx(Ni,{title:"Tasks",children:F.jsx(b0,{tasks:l,activeTaskSlug:o,onSelect:x})}):null,q?F.jsx(k0,{busy:p,messages:C,orchestration:g,onClose:()=>V(!1),onOpenRole:A,onReject:R,onStage:E}):null,I?F.jsx(E0,{events:a,onClose:()=>G(!1)}):null]})}function x0(n){return n==="system"?"light":n==="light"?"dark":"system"}function Up(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function E0({events:n,onClose:s}){return F.jsx("div",{className:"modal-backdrop",children:F.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[F.jsxs("header",{children:[F.jsxs("div",{children:[F.jsx("h2",{children:"Events"}),F.jsxs("p",{className:"muted",children:[n.length," total"]})]}),F.jsx("button",{type:"button",onClick:s,children:"Close"})]}),F.jsx(_0,{events:n,maxEvents:null,showHeader:!1})]})})}function k0({busy:n,messages:s,orchestration:l,onClose:o,onOpenRole:S,onReject:C,onStage:g}){const a=fc(s);return F.jsx("div",{className:"modal-backdrop",children:F.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[F.jsxs("header",{children:[F.jsxs("div",{children:[F.jsx("h2",{children:"Messages"}),F.jsxs("p",{className:"muted",children:[a.pending," pending / ",a.queued," queued / ",a.delivered," delivered",l?` · ${l.mode}${l.paused?" paused":""}`:""]})]}),F.jsx("button",{type:"button",onClick:o,children:"Close"})]}),F.jsx(g0,{busy:n,maxMessages:null,messages:s,orchestration:l,showControls:!1,showHeader:!1,onOpenRole:S,onReject:C,onStage:g})]})})}function Ni({children:n,defaultOpen:s=!1,title:l}){const[o,S]=ge.useState(s);return ge.useEffect(()=>{S(s)},[s]),F.jsxs("section",{className:"sidebar-section",children:[F.jsxs("button",{"aria-expanded":o,className:"sidebar-section-toggle",type:"button",onClick:()=>S(C=>!C),children:[F.jsx("span",{children:l}),F.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),o?F.jsx("div",{className:"sidebar-section-content",children:n}):null]})}const ua=[{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}];ua.map(n=>n.name);ua.filter(n=>n.dispatchable).map(n=>n.name);function O_(n,s){return n.find(l=>l.role===s)}function A0({activeRole:n,sessions:s,onSelect:l}){return F.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:ua.map(o=>{const S=O_(s,o.name);return F.jsxs("button",{className:o.name===n?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":o.name===n,onClick:()=>l(o.name),children:[F.jsx("span",{children:o.label}),F.jsx(Bs,{status:(S==null?void 0:S.status)??"not_started"})]},o.name)})})}var Bu={exports:{}},Ip;function T0(){return Ip||(Ip=1,(function(n,s){(function(l,o){n.exports=o()})(self,(()=>(()=>{var l={};return(()=>{var o=l;Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0,o.FitAddon=class{activate(S){this._terminal=S}dispose(){}fit(){const S=this.proposeDimensions();if(!S||!this._terminal||isNaN(S.cols)||isNaN(S.rows))return;const C=this._terminal._core;this._terminal.rows===S.rows&&this._terminal.cols===S.cols||(C._renderService.clear(),this._terminal.resize(S.cols,S.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const S=this._terminal._core,C=S._renderService.dimensions;if(C.css.cell.width===0||C.css.cell.height===0)return;const g=this._terminal.options.scrollback===0?0:S.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(a.getPropertyValue("height")),h=Math.max(0,parseInt(a.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),c=u-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),b=h-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-g;return{cols:Math.max(2,Math.floor(b/C.css.cell.width)),rows:Math.max(1,Math.floor(c/C.css.cell.height))}}}})(),l})()))})(Bu)),Bu.exports}var D0=T0(),zu={exports:{}},Pp;function R0(){return Pp||(Pp=1,(function(n,s){(function(l,o){n.exports=o()})(self,(()=>(()=>{var l={6:(g,a)=>{function u(p){try{const c=new URL(p),b=c.password&&c.username?`${c.protocol}//${c.username}:${c.password}@${c.host}`:c.username?`${c.protocol}//${c.username}@${c.host}`:`${c.protocol}//${c.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,c,b,w={}){this._terminal=p,this._regex=c,this._handler=b,this._options=w}provideLinks(p,c){const b=h.computeLink(p,this._regex,this._terminal,this._handler);c(this._addCallbacks(b))}_addCallbacks(p){return p.map((c=>(c.leave=this._options.leave,c.hover=(b,w)=>{if(this._options.hover){const{range:k}=c;this._options.hover(b,w,k)}},c)))}};class h{static computeLink(c,b,w,k){const x=new RegExp(b.source,(b.flags||"")+"g"),[v,_]=h._getWindowedLineStrings(c-1,w),d=v.join("");let m;const E=[];for(;m=x.exec(d);){const R=m[0];if(!u(R))continue;const[A,L]=h._mapStrIdx(w,_,0,m.index),[T,z]=h._mapStrIdx(w,A,L,R.length);if(A===-1||L===-1||T===-1||z===-1)continue;const H={start:{x:L+1,y:A+1},end:{x:z,y:T+1}};E.push({range:H,text:R,activate:k})}return E}static _getWindowedLineStrings(c,b){let w,k=c,x=c,v=0,_="";const d=[];if(w=b.buffer.active.getLine(c)){const m=w.translateToString(!0);if(w.isWrapped&&m[0]!==" "){for(v=0;(w=b.buffer.active.getLine(--k))&&v<2048&&(_=w.translateToString(!0),v+=_.length,d.push(_),w.isWrapped&&_.indexOf(" ")===-1););d.reverse()}for(d.push(m),v=0;(w=b.buffer.active.getLine(++x))&&w.isWrapped&&v<2048&&(_=w.translateToString(!0),v+=_.length,d.push(_),_.indexOf(" ")===-1););}return[d,k]}static _mapStrIdx(c,b,w,k){const x=c.buffer.active,v=x.getNullCell();let _=w;for(;k;){const d=x.getLine(b);if(!d)return[-1,-1];for(let m=_;m<d.length;++m){d.getCell(m,v);const E=v.getChars();if(v.getWidth()&&(k-=E.length||1,m===d.length-1&&E==="")){const R=x.getLine(b+1);R&&R.isWrapped&&(R.getCell(0,v),v.getWidth()===2&&(k+=1))}if(k<0)return[b,m]}b++,_=0}return[b,_]}}a.LinkComputer=h}},o={};function S(g){var a=o[g];if(a!==void 0)return a.exports;var u=o[g]={exports:{}};return l[g](u,u.exports,S),u.exports}var C={};return(()=>{var g=C;Object.defineProperty(g,"__esModule",{value:!0}),g.WebLinksAddon=void 0;const a=S(6),u=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(p,c){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}g.WebLinksAddon=class{constructor(p=h,c={}){this._handler=p,this._options=c}activate(p){this._terminal=p;const c=this._options,b=c.urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,b,this._handler,c))}dispose(){var p;(p=this._linkProvider)==null||p.dispose()}}})(),C})()))})(zu)),zu.exports}var L0=R0(),Hu={exports:{}},Fp;function M0(){return Fp||(Fp=1,(function(n,s){(function(l,o){n.exports=o()})(globalThis,(()=>(()=>{var l={4567:function(g,a,u){var h=this&&this.__decorate||function(d,m,E,R){var A,L=arguments.length,T=L<3?m:R===null?R=Object.getOwnPropertyDescriptor(m,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(d,m,E,R);else for(var z=d.length-1;z>=0;z--)(A=d[z])&&(T=(L<3?A(T):L>3?A(m,E,T):A(m,E))||T);return L>3&&T&&Object.defineProperty(m,E,T),T},p=this&&this.__param||function(d,m){return function(E,R){m(E,R,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const c=u(9042),b=u(9924),w=u(844),k=u(4725),x=u(2585),v=u(3656);let _=a.AccessibilityManager=class extends w.Disposable{constructor(d,m,E,R){super(),this._terminal=d,this._coreBrowserService=E,this._renderService=R,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 A=0;A<this._terminal.rows;A++)this._rowElements[A]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[A]);if(this._topBoundaryFocusListener=A=>this._handleBoundaryFocus(A,0),this._bottomBoundaryFocusListener=A=>this._handleBoundaryFocus(A,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((A=>this._handleResize(A.rows)))),this.register(this._terminal.onRender((A=>this._refreshRows(A.start,A.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((A=>this._handleChar(A)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
50
|
+
`)))),this.register(this._terminal.onA11yTab((A=>this._handleTab(A)))),this.register(this._terminal.onKey((A=>this._handleKey(A.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,v.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,w.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(d){for(let m=0;m<d;m++)this._handleChar(" ")}_handleChar(d){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==d&&(this._charsToAnnounce+=d):this._charsToAnnounce+=d,d===`
|
|
51
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=c.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(d){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(d)||this._charsToConsume.push(d)}_refreshRows(d,m){this._liveRegionDebouncer.refresh(d,m,this._terminal.rows)}_renderRows(d,m){const E=this._terminal.buffer,R=E.lines.length.toString();for(let A=d;A<=m;A++){const L=E.lines.get(E.ydisp+A),T=[],z=(L==null?void 0:L.translateToString(!0,void 0,void 0,T))||"",H=(E.ydisp+A+1).toString(),q=this._rowElements[A];q&&(z.length===0?(q.innerText=" ",this._rowColumns.set(q,[0,1])):(q.textContent=z,this._rowColumns.set(q,T)),q.setAttribute("aria-posinset",H),q.setAttribute("aria-setsize",R))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(d,m){const E=d.target,R=this._rowElements[m===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(m===0?"1":`${this._terminal.buffer.lines.length}`)||d.relatedTarget!==R)return;let A,L;if(m===0?(A=E,L=this._rowElements.pop(),this._rowContainer.removeChild(L)):(A=this._rowElements.shift(),L=E,this._rowContainer.removeChild(A)),A.removeEventListener("focus",this._topBoundaryFocusListener),L.removeEventListener("focus",this._bottomBoundaryFocusListener),m===0){const T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{const T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(m===0?-1:1),this._rowElements[m===0?1:this._rowElements.length-2].focus(),d.preventDefault(),d.stopImmediatePropagation()}_handleSelectionChange(){var z;if(this._rowElements.length===0)return;const d=document.getSelection();if(!d)return;if(d.isCollapsed)return void(this._rowContainer.contains(d.anchorNode)&&this._terminal.clearSelection());if(!d.anchorNode||!d.focusNode)return void console.error("anchorNode and/or focusNode are null");let m={node:d.anchorNode,offset:d.anchorOffset},E={node:d.focusNode,offset:d.focusOffset};if((m.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||m.node===E.node&&m.offset>E.offset)&&([m,E]=[E,m]),m.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(m={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(m.node))return;const R=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(R)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:R,offset:((z=R.textContent)==null?void 0:z.length)??0}),!this._rowContainer.contains(E.node))return;const A=({node:H,offset:q})=>{const V=H instanceof Text?H.parentNode:H;let I=parseInt(V==null?void 0:V.getAttribute("aria-posinset"),10)-1;if(isNaN(I))return console.warn("row is invalid. Race condition?"),null;const G=this._rowColumns.get(V);if(!G)return console.warn("columns is null. Race condition?"),null;let K=q<G.length?G[q]:G.slice(-1)[0]+1;return K>=this._terminal.cols&&(++I,K=0),{row:I,column:K}},L=A(m),T=A(E);if(L&&T){if(L.row>T.row||L.row===T.row&&L.column>=T.column)throw new Error("invalid range");this._terminal.select(L.column,L.row,(T.row-L.row)*this._terminal.cols-L.column+T.column)}}_handleResize(d){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let m=this._rowContainer.children.length;m<this._terminal.rows;m++)this._rowElements[m]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[m]);for(;this._rowElements.length>d;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const d=this._coreBrowserService.mainDocument.createElement("div");return d.setAttribute("role","listitem"),d.tabIndex=-1,this._refreshRowDimensions(d),d}_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 d=0;d<this._terminal.rows;d++)this._refreshRowDimensions(this._rowElements[d])}}_refreshRowDimensions(d){d.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:(g,a)=>{function u(b){return b.replace(/\r?\n/g,"\r")}function h(b,w){return w?"\x1B[200~"+b+"\x1B[201~":b}function p(b,w,k,x){b=h(b=u(b),k.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(b,!0),w.value=""}function c(b,w,k){const x=k.getBoundingClientRect(),v=b.clientX-x.left-10,_=b.clientY-x.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${v}px`,w.style.top=`${_}px`,w.style.zIndex="1000",w.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=u,a.bracketTextForPaste=h,a.copyHandler=function(b,w){b.clipboardData&&b.clipboardData.setData("text/plain",w.selectionText),b.preventDefault()},a.handlePasteEvent=function(b,w,k,x){b.stopPropagation(),b.clipboardData&&p(b.clipboardData.getData("text/plain"),w,k,x)},a.paste=p,a.moveTextAreaUnderMouseCursor=c,a.rightClickHandler=function(b,w,k,x,v){c(b,w,k),v&&x.rightClickSelect(b),w.value=x.selectionText,w.select()}},7239:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const h=u(1505);a.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(p,c,b){this._css.set(p,c,b)}getCss(p,c){return this._css.get(p,c)}setColor(p,c,b){this._color.set(p,c,b)}getColor(p,c){return this._color.get(p,c)}clear(){this._color.clear(),this._css.clear()}}},3656:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,h,p,c){u.addEventListener(h,p,c);let b=!1;return{dispose:()=>{b||(b=!0,u.removeEventListener(h,p,c))}}}},3551:function(g,a,u){var h=this&&this.__decorate||function(_,d,m,E){var R,A=arguments.length,L=A<3?d:E===null?E=Object.getOwnPropertyDescriptor(d,m):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,d,m,E);else for(var T=_.length-1;T>=0;T--)(R=_[T])&&(L=(A<3?R(L):A>3?R(d,m,L):R(d,m))||L);return A>3&&L&&Object.defineProperty(d,m,L),L},p=this&&this.__param||function(_,d){return function(m,E){d(m,E,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const c=u(3656),b=u(8460),w=u(844),k=u(2585),x=u(4725);let v=a.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(_,d,m,E,R){super(),this._element=_,this._mouseService=d,this._renderService=m,this._bufferService=E,this._linkProviderService=R,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,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var A;this._lastMouseEvent=void 0,(A=this._activeProviderReplies)==null||A.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,c.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,c.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(_){this._lastMouseEvent=_;const d=this._positionFromMouseEvent(_,this._element,this._mouseService);if(!d)return;this._isMouseOut=!1;const m=_.composedPath();for(let E=0;E<m.length;E++){const R=m[E];if(R.classList.contains("xterm"))break;if(R.classList.contains("xterm-hover"))return}this._lastBufferCell&&d.x===this._lastBufferCell.x&&d.y===this._lastBufferCell.y||(this._handleHover(d),this._lastBufferCell=d)}_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(_,d){var E,R;this._activeProviderReplies&&d||((E=this._activeProviderReplies)==null||E.forEach((A=>{A==null||A.forEach((L=>{L.link.dispose&&L.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=_.y);let m=!1;for(const[A,L]of this._linkProviderService.linkProviders.entries())d?(R=this._activeProviderReplies)!=null&&R.get(A)&&(m=this._checkLinkProviderResult(A,_,m)):L.provideLinks(_.y,(T=>{var H,q;if(this._isMouseOut)return;const z=T==null?void 0:T.map((V=>({link:V})));(H=this._activeProviderReplies)==null||H.set(A,z),m=this._checkLinkProviderResult(A,_,m),((q=this._activeProviderReplies)==null?void 0:q.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(_.y,this._activeProviderReplies)}))}_removeIntersectingLinks(_,d){const m=new Set;for(let E=0;E<d.size;E++){const R=d.get(E);if(R)for(let A=0;A<R.length;A++){const L=R[A],T=L.link.range.start.y<_?0:L.link.range.start.x,z=L.link.range.end.y>_?this._bufferService.cols:L.link.range.end.x;for(let H=T;H<=z;H++){if(m.has(H)){R.splice(A--,1);break}m.add(H)}}}}_checkLinkProviderResult(_,d,m){var A;if(!this._activeProviderReplies)return m;const E=this._activeProviderReplies.get(_);let R=!1;for(let L=0;L<_;L++)this._activeProviderReplies.has(L)&&!this._activeProviderReplies.get(L)||(R=!0);if(!R&&E){const L=E.find((T=>this._linkAtPosition(T.link,d)));L&&(m=!0,this._handleNewLink(L))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!m)for(let L=0;L<this._activeProviderReplies.size;L++){const T=(A=this._activeProviderReplies.get(L))==null?void 0:A.find((z=>this._linkAtPosition(z.link,d)));if(T){m=!0,this._handleNewLink(T);break}}return m}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(_){if(!this._currentLink)return;const d=this._positionFromMouseEvent(_,this._element,this._mouseService);d&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,d)&&this._currentLink.link.activate(_,this._currentLink.link.text)}_clearCurrentLink(_,d){this._currentLink&&this._lastMouseEvent&&(!_||!d||this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=d)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(_){if(!this._lastMouseEvent)return;const d=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);d&&this._linkAtPosition(_.link,d)&&(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 m,E;return(E=(m=this._currentLink)==null?void 0:m.state)==null?void 0:E.decorations.pointerCursor},set:m=>{var E;(E=this._currentLink)!=null&&E.state&&this._currentLink.state.decorations.pointerCursor!==m&&(this._currentLink.state.decorations.pointerCursor=m,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",m))}},underline:{get:()=>{var m,E;return(E=(m=this._currentLink)==null?void 0:m.state)==null?void 0:E.decorations.underline},set:m=>{var E,R,A;(E=this._currentLink)!=null&&E.state&&((A=(R=this._currentLink)==null?void 0:R.state)==null?void 0:A.decorations.underline)!==m&&(this._currentLink.state.decorations.underline=m,this._currentLink.state.isHovered&&this._fireUnderlineEvent(_.link,m))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((m=>{if(!this._currentLink)return;const E=m.start===0?0:m.start+1+this._bufferService.buffer.ydisp,R=this._bufferService.buffer.ydisp+1+m.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=R&&(this._clearCurrentLink(E,R),this._lastMouseEvent)){const A=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);A&&this._askForLink(A,!1)}}))))}_linkHover(_,d,m){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(d,!0),this._currentLink.state.decorations.pointerCursor&&_.classList.add("xterm-cursor-pointer")),d.hover&&d.hover(m,d.text)}_fireUnderlineEvent(_,d){const m=_.range,E=this._bufferService.buffer.ydisp,R=this._createLinkUnderlineEvent(m.start.x-1,m.start.y-E-1,m.end.x,m.end.y-E-1,void 0);(d?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(R)}_linkLeave(_,d,m){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(d,!1),this._currentLink.state.decorations.pointerCursor&&_.classList.remove("xterm-cursor-pointer")),d.leave&&d.leave(m,d.text)}_linkAtPosition(_,d){const m=_.range.start.y*this._bufferService.cols+_.range.start.x,E=_.range.end.y*this._bufferService.cols+_.range.end.x,R=d.y*this._bufferService.cols+d.x;return m<=R&&R<=E}_positionFromMouseEvent(_,d,m){const E=m.getCoords(_,d,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(_,d,m,E,R){return{x1:_,y1:d,x2:m,y2:E,cols:this._bufferService.cols,fg:R}}};a.Linkifier=v=h([p(1,x.IMouseService),p(2,x.IRenderService),p(3,k.IBufferService),p(4,x.ILinkProviderService)],v)},9042:(g,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(g,a,u){var h=this&&this.__decorate||function(x,v,_,d){var m,E=arguments.length,R=E<3?v:d===null?d=Object.getOwnPropertyDescriptor(v,_):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,v,_,d);else for(var A=x.length-1;A>=0;A--)(m=x[A])&&(R=(E<3?m(R):E>3?m(v,_,R):m(v,_))||R);return E>3&&R&&Object.defineProperty(v,_,R),R},p=this&&this.__param||function(x,v){return function(_,d){v(_,d,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const c=u(511),b=u(2585);let w=a.OscLinkProvider=class{constructor(x,v,_){this._bufferService=x,this._optionsService=v,this._oscLinkService=_}provideLinks(x,v){var z;const _=this._bufferService.buffer.lines.get(x-1);if(!_)return void v(void 0);const d=[],m=this._optionsService.rawOptions.linkHandler,E=new c.CellData,R=_.getTrimmedLength();let A=-1,L=-1,T=!1;for(let H=0;H<R;H++)if(L!==-1||_.hasContent(H)){if(_.loadCell(H,E),E.hasExtendedAttrs()&&E.extended.urlId){if(L===-1){L=H,A=E.extended.urlId;continue}T=E.extended.urlId!==A}else L!==-1&&(T=!0);if(T||L!==-1&&H===R-1){const q=(z=this._oscLinkService.getLinkData(A))==null?void 0:z.uri;if(q){const V={start:{x:L+1,y:x},end:{x:H+(T||H!==R-1?0:1),y:x}};let I=!1;if(!(m!=null&&m.allowNonHttpProtocols))try{const G=new URL(q);["http:","https:"].includes(G.protocol)||(I=!0)}catch{I=!0}I||d.push({text:q,range:V,activate:(G,K)=>m?m.activate(G,K,V):k(0,K),hover:(G,K)=>{var Y;return(Y=m==null?void 0:m.hover)==null?void 0:Y.call(m,G,K,V)},leave:(G,K)=>{var Y;return(Y=m==null?void 0:m.leave)==null?void 0:Y.call(m,G,K,V)}})}T=!1,E.hasExtendedAttrs()&&E.extended.urlId?(L=H,A=E.extended.urlId):(L=-1,A=-1)}}v(d)}};function k(x,v){if(confirm(`Do you want to navigate to ${v}?
|
|
52
|
+
|
|
53
|
+
WARNING: This link could potentially be dangerous`)){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=w=h([p(0,b.IBufferService),p(1,b.IOptionsService),p(2,b.IOscLinkService)],w)},6193:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(u,h){this._renderCallback=u,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,h,p){this._rowCount=p,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,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 u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const h=u(3614),p=u(3656),c=u(3551),b=u(9042),w=u(3730),k=u(1680),x=u(3107),v=u(5744),_=u(2950),d=u(1296),m=u(428),E=u(4269),R=u(5114),A=u(8934),L=u(3230),T=u(9312),z=u(4725),H=u(6731),q=u(8055),V=u(8969),I=u(8460),G=u(844),K=u(6114),Y=u(8437),Z=u(2584),ee=u(7399),O=u(5941),M=u(9074),B=u(2585),P=u(5435),N=u(4567),ie=u(779);class fe extends V.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(X={}){super(X),this.browser=K,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new G.MutableDisposable),this._onCursorMove=this.register(new I.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new I.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new I.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new I.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new I.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new I.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new I.EventEmitter),this._onBlur=this.register(new I.EventEmitter),this._onA11yCharEmitter=this.register(new I.EventEmitter),this._onA11yTabEmitter=this.register(new I.EventEmitter),this._onWillOpen=this.register(new I.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(M.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ie.LinkProviderService),this._instantiationService.setService(z.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((U,le)=>this.refresh(U,le)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((U=>this._reportWindowsOptions(U)))),this.register(this._inputHandler.onColor((U=>this._handleColorEvent(U)))),this.register((0,I.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,I.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((U=>this._afterResize(U.cols,U.rows)))),this.register((0,G.toDisposable)((()=>{var U,le;this._customKeyEventHandler=void 0,(le=(U=this.element)==null?void 0:U.parentNode)==null||le.removeChild(this.element)})))}_handleColorEvent(X){if(this._themeService)for(const U of X){let le,Q="";switch(U.index){case 256:le="foreground",Q="10";break;case 257:le="background",Q="11";break;case 258:le="cursor",Q="12";break;default:le="ansi",Q="4;"+U.index}switch(U.type){case 0:const pe=q.color.toColorRGB(le==="ansi"?this._themeService.colors.ansi[U.index]:this._themeService.colors[le]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${Q};${(0,O.toRgbString)(pe)}${Z.C1_ESCAPED.ST}`);break;case 1:if(le==="ansi")this._themeService.modifyColors((_e=>_e.ansi[U.index]=q.channels.toColor(...U.color)));else{const _e=le;this._themeService.modifyColors((Ae=>Ae[_e]=q.channels.toColor(...U.color)))}break;case 2:this._themeService.restoreColor(U.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(X){X?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(N.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(X){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var X;return(X=this.textarea)==null?void 0:X.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const X=this.buffer.ybase+this.buffer.y,U=this.buffer.lines.get(X);if(!U)return;const le=Math.min(this.buffer.x,this.cols-1),Q=this._renderService.dimensions.css.cell.height,pe=U.getWidth(le),_e=this._renderService.dimensions.css.cell.width*pe,Ae=this.buffer.y*this._renderService.dimensions.css.cell.height,ce=le*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ce+"px",this.textarea.style.top=Ae+"px",this.textarea.style.width=_e+"px",this.textarea.style.height=Q+"px",this.textarea.style.lineHeight=Q+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,p.addDisposableDomListener)(this.element,"copy",(U=>{this.hasSelection()&&(0,h.copyHandler)(U,this._selectionService)})));const X=U=>(0,h.handlePasteEvent)(U,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",X)),this.register((0,p.addDisposableDomListener)(this.element,"paste",X)),K.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(U=>{U.button===2&&(0,h.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",(U=>{(0,h.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),K.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",(U=>{U.button===1&&(0,h.moveTextAreaUnderMouseCursor)(U,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",(X=>this._keyUp(X)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(X=>this._keyDown(X)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(X=>this._keyPress(X)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(X=>this._compositionHelper.compositionupdate(X)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(X=>this._inputEvent(X)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(X){var le;if(!X)throw new Error("Terminal requires a parent element.");if(X.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((le=this.element)==null?void 0:le.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=X.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),X.appendChild(this.element);const U=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),U.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",(Q=>this.updateCursorStyle(Q)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),U.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(R.CoreBrowserService,this.textarea,X.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(z.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",(Q=>this._handleTextAreaFocus(Q)))),this.register((0,p.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(m.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(z.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(H.ThemeService),this._instantiationService.setService(z.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(z.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(L.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(z.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((Q=>this._onRender.fire(Q)))),this.onResize((Q=>this._renderService.resize(Q.cols,Q.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(A.MouseService),this._instantiationService.setService(z.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(c.Linkifier,this.screenElement)),this.element.appendChild(U);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((Q=>this.scrollLines(Q.amount,Q.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(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(z.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((Q=>this.scrollLines(Q.amount,Q.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((Q=>this._renderService.handleSelectionChanged(Q.start,Q.end,Q.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((Q=>{this.textarea.value=Q,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((Q=>{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",(Q=>this._selectionService.handleMouseDown(Q)))),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",(Q=>this._handleScreenReaderModeOptionChange(Q)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(Q=>{!this._overviewRulerRenderer&&Q&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(d.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const X=this,U=this.element;function le(_e){const Ae=X._mouseService.getMouseReportCoords(_e,X.screenElement);if(!Ae)return!1;let ce,be;switch(_e.overrideType||_e.type){case"mousemove":be=32,_e.buttons===void 0?(ce=3,_e.button!==void 0&&(ce=_e.button<3?_e.button:3)):ce=1&_e.buttons?0:4&_e.buttons?1:2&_e.buttons?2:3;break;case"mouseup":be=0,ce=_e.button<3?_e.button:3;break;case"mousedown":be=1,ce=_e.button<3?_e.button:3;break;case"wheel":if(X._customWheelEventHandler&&X._customWheelEventHandler(_e)===!1||X.viewport.getLinesScrolled(_e)===0)return!1;be=_e.deltaY<0?0:1,ce=4;break;default:return!1}return!(be===void 0||ce===void 0||ce>4)&&X.coreMouseService.triggerMouseEvent({col:Ae.col,row:Ae.row,x:Ae.x,y:Ae.y,button:ce,action:be,ctrl:_e.ctrlKey,alt:_e.altKey,shift:_e.shiftKey})}const Q={mouseup:null,wheel:null,mousedrag:null,mousemove:null},pe={mouseup:_e=>(le(_e),_e.buttons||(this._document.removeEventListener("mouseup",Q.mouseup),Q.mousedrag&&this._document.removeEventListener("mousemove",Q.mousedrag)),this.cancel(_e)),wheel:_e=>(le(_e),this.cancel(_e,!0)),mousedrag:_e=>{_e.buttons&&le(_e)},mousemove:_e=>{_e.buttons||le(_e)}};this.register(this.coreMouseService.onProtocolChange((_e=>{_e?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(_e)),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&_e?Q.mousemove||(U.addEventListener("mousemove",pe.mousemove),Q.mousemove=pe.mousemove):(U.removeEventListener("mousemove",Q.mousemove),Q.mousemove=null),16&_e?Q.wheel||(U.addEventListener("wheel",pe.wheel,{passive:!1}),Q.wheel=pe.wheel):(U.removeEventListener("wheel",Q.wheel),Q.wheel=null),2&_e?Q.mouseup||(Q.mouseup=pe.mouseup):(this._document.removeEventListener("mouseup",Q.mouseup),Q.mouseup=null),4&_e?Q.mousedrag||(Q.mousedrag=pe.mousedrag):(this._document.removeEventListener("mousemove",Q.mousedrag),Q.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(U,"mousedown",(_e=>{if(_e.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(_e))return le(_e),Q.mouseup&&this._document.addEventListener("mouseup",Q.mouseup),Q.mousedrag&&this._document.addEventListener("mousemove",Q.mousedrag),this.cancel(_e)}))),this.register((0,p.addDisposableDomListener)(U,"wheel",(_e=>{if(!Q.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(_e)===!1)return!1;if(!this.buffer.hasScrollback){const Ae=this.viewport.getLinesScrolled(_e);if(Ae===0)return;const ce=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(_e.deltaY<0?"A":"B");let be="";for(let Ge=0;Ge<Math.abs(Ae);Ge++)be+=ce;return this.coreService.triggerDataEvent(be,!0),this.cancel(_e,!0)}return this.viewport.handleWheel(_e)?this.cancel(_e):void 0}}),{passive:!1})),this.register((0,p.addDisposableDomListener)(U,"touchstart",(_e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(_e),this.cancel(_e)}),{passive:!0})),this.register((0,p.addDisposableDomListener)(U,"touchmove",(_e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(_e)?void 0:this.cancel(_e)}),{passive:!1}))}refresh(X,U){var le;(le=this._renderService)==null||le.refreshRows(X,U)}updateCursorStyle(X){var U;(U=this._selectionService)!=null&&U.shouldColumnSelect(X)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(X,U,le=0){var Q;le===1?(super.scrollLines(X,U,le),this.refresh(0,this.rows-1)):(Q=this.viewport)==null||Q.scrollLines(X)}paste(X){(0,h.paste)(X,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(X){this._customKeyEventHandler=X}attachCustomWheelEventHandler(X){this._customWheelEventHandler=X}registerLinkProvider(X){return this._linkProviderService.registerLinkProvider(X)}registerCharacterJoiner(X){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const U=this._characterJoinerService.register(X);return this.refresh(0,this.rows-1),U}deregisterCharacterJoiner(X){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(X)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(X){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+X)}registerDecoration(X){return this._decorationService.registerDecoration(X)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(X,U,le){this._selectionService.setSelection(X,U,le)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var X;(X=this._selectionService)==null||X.clearSelection()}selectAll(){var X;(X=this._selectionService)==null||X.selectAll()}selectLines(X,U){var le;(le=this._selectionService)==null||le.selectLines(X,U)}_keyDown(X){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;const U=this.browser.isMac&&this.options.macOptionIsMeta&&X.altKey;if(!U&&!this._compositionHelper.keydown(X))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;U||X.key!=="Dead"&&X.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const le=(0,ee.evaluateKeyboardEvent)(X,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(X),le.type===3||le.type===2){const Q=this.rows-1;return this.scrollLines(le.type===2?-Q:Q),this.cancel(X,!0)}return le.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,X)||(le.cancel&&this.cancel(X,!0),!le.key||!!(X.key&&!X.ctrlKey&&!X.altKey&&!X.metaKey&&X.key.length===1&&X.key.charCodeAt(0)>=65&&X.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(le.key!==Z.C0.ETX&&le.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:le.key,domEvent:X}),this._showCursor(),this.coreService.triggerDataEvent(le.key,!0),!this.optionsService.rawOptions.screenReaderMode||X.altKey||X.ctrlKey?this.cancel(X,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(X,U){const le=X.isMac&&!this.options.macOptionIsMeta&&U.altKey&&!U.ctrlKey&&!U.metaKey||X.isWindows&&U.altKey&&U.ctrlKey&&!U.metaKey||X.isWindows&&U.getModifierState("AltGraph");return U.type==="keypress"?le:le&&(!U.keyCode||U.keyCode>47)}_keyUp(X){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1||((function(U){return U.keyCode===16||U.keyCode===17||U.keyCode===18})(X)||this.focus(),this.updateCursorStyle(X),this._keyPressHandled=!1)}_keyPress(X){let U;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;if(this.cancel(X),X.charCode)U=X.charCode;else if(X.which===null||X.which===void 0)U=X.keyCode;else{if(X.which===0||X.charCode===0)return!1;U=X.which}return!(!U||(X.altKey||X.ctrlKey||X.metaKey)&&!this._isThirdLevelShift(this.browser,X)||(U=String.fromCharCode(U),this._onKey.fire({key:U,domEvent:X}),this._showCursor(),this.coreService.triggerDataEvent(U,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(X){if(X.data&&X.inputType==="insertText"&&(!X.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const U=X.data;return this.coreService.triggerDataEvent(U,!0),this.cancel(X),!0}return!1}resize(X,U){X!==this.cols||U!==this.rows?super.resize(X,U):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(X,U){var le,Q;(le=this._charSizeService)==null||le.measure(),(Q=this.viewport)==null||Q.syncScrollArea(!0)}clear(){var X;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let U=1;U<this.rows;U++)this.buffer.lines.push(this.buffer.getBlankLine(Y.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(X=this.viewport)==null||X.reset(),this.refresh(0,this.rows-1)}}reset(){var U,le;this.options.rows=this.rows,this.options.cols=this.cols;const X=this._customKeyEventHandler;this._setup(),super.reset(),(U=this._selectionService)==null||U.reset(),this._decorationService.reset(),(le=this.viewport)==null||le.reset(),this._customKeyEventHandler=X,this.refresh(0,this.rows-1)}clearTextureAtlas(){var X;(X=this._renderService)==null||X.clearTextureAtlas()}_reportFocus(){var X;(X=this.element)!=null&&X.classList.contains("focus")?this.coreService.triggerDataEvent(Z.C0.ESC+"[I"):this.coreService.triggerDataEvent(Z.C0.ESC+"[O")}_reportWindowsOptions(X){if(this._renderService)switch(X){case P.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const U=this._renderService.dimensions.css.canvas.width.toFixed(0),le=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Z.C0.ESC}[4;${le};${U}t`);break;case P.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const Q=this._renderService.dimensions.css.cell.width.toFixed(0),pe=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Z.C0.ESC}[6;${pe};${Q}t`)}}cancel(X,U){if(this.options.cancelEvents||U)return X.preventDefault(),X.stopPropagation(),!1}}a.Terminal=fe},9924:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(u,h=1e3){this._renderCallback=u,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,h,p){this._rowCount=p,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const c=Date.now();if(c-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=c,this._innerRefresh();else if(!this._additionalRefreshRequested){const b=c-this._lastRefreshMs,w=this._debounceThresholdMS-b;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),w)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h)}}},1680:function(g,a,u){var h=this&&this.__decorate||function(_,d,m,E){var R,A=arguments.length,L=A<3?d:E===null?E=Object.getOwnPropertyDescriptor(d,m):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,d,m,E);else for(var T=_.length-1;T>=0;T--)(R=_[T])&&(L=(A<3?R(L):A>3?R(d,m,L):R(d,m))||L);return A>3&&L&&Object.defineProperty(d,m,L),L},p=this&&this.__param||function(_,d){return function(m,E){d(m,E,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const c=u(3656),b=u(4725),w=u(8460),k=u(844),x=u(2585);let v=a.Viewport=class extends k.Disposable{constructor(_,d,m,E,R,A,L,T){super(),this._viewportElement=_,this._scrollArea=d,this._bufferService=m,this._optionsService=E,this._charSizeService=R,this._renderService=A,this._coreBrowserService=L,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 w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,c.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((z=>this._activeBuffer=z.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((z=>this._renderDimensions=z))),this._handleThemeChange(T.colors),this.register(T.onChangeColors((z=>this._handleThemeChange(z)))),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 d=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==d&&(this._lastRecordedBufferHeight=d,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 d=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:d,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(_,d){const m=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(d<0&&this._viewportElement.scrollTop!==0||d>0&&m<this._lastRecordedBufferHeight)||(_.cancelable&&_.preventDefault(),!1)}handleWheel(_){const d=this._getPixelsScrolled(_);return d!==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+d:this._smoothScrollState.target+=d,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=d,this._bubbleScroll(_,d))}scrollLines(_){if(_!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const d=_*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+d,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 d=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_LINE?d*=this._currentRowHeight:_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(d*=this._currentRowHeight*this._bufferService.rows),d}getBufferElements(_,d){var T;let m,E="";const R=[],A=d??this._bufferService.buffer.lines.length,L=this._bufferService.buffer.lines;for(let z=_;z<A;z++){const H=L.get(z);if(!H)continue;const q=(T=L.get(z+1))==null?void 0:T.isWrapped;if(E+=H.translateToString(!q),!q||z===L.length-1){const V=document.createElement("div");V.textContent=E,R.push(V),E.length>0&&(m=V),E=""}}return{bufferElements:R,cursorElement:m}}getLinesScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let d=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(d/=this._currentRowHeight+0,this._wheelPartialScroll+=d,d=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(d*=this._bufferService.rows),d}_applyScrollModifier(_,d){const m=this._optionsService.rawOptions.fastScrollModifier;return m==="alt"&&d.altKey||m==="ctrl"&&d.ctrlKey||m==="shift"&&d.shiftKey?_*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:_*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(_){this._lastTouchY=_.touches[0].pageY}handleTouchMove(_){const d=this._lastTouchY-_.touches[0].pageY;return this._lastTouchY=_.touches[0].pageY,d!==0&&(this._viewportElement.scrollTop+=d,this._bubbleScroll(_,d))}};a.Viewport=v=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)],v)},3107:function(g,a,u){var h=this&&this.__decorate||function(x,v,_,d){var m,E=arguments.length,R=E<3?v:d===null?d=Object.getOwnPropertyDescriptor(v,_):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,v,_,d);else for(var A=x.length-1;A>=0;A--)(m=x[A])&&(R=(E<3?m(R):E>3?m(v,_,R):m(v,_))||R);return E>3&&R&&Object.defineProperty(v,_,R),R},p=this&&this.__param||function(x,v){return function(_,d){v(_,d,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const c=u(4725),b=u(844),w=u(2585);let k=a.BufferDecorationRenderer=class extends b.Disposable{constructor(x,v,_,d,m){super(),this._screenElement=x,this._bufferService=v,this._coreBrowserService=_,this._decorationService=d,this._renderService=m,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 d;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((d=x==null?void 0:x.options)==null?void 0:d.layer)==="top"),v.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const _=x.options.x??0;return _&&_>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(x,v),v}_refreshStyle(x){const v=x.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=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=v*this._renderService.dimensions.css.cell.height+"px",_.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(_)}}_refreshXPosition(x,v=x.element){if(!v)return;const _=x.options.x??0;(x.options.anchor||"left")==="right"?v.style.right=_?_*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=_?_*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){var v;(v=this._decorationElements.get(x))==null||v.remove(),this._decorationElements.delete(x),x.dispose()}};a.BufferDecorationRenderer=k=h([p(1,w.IBufferService),p(2,c.ICoreBrowserService),p(3,w.IDecorationService),p(4,c.IRenderService)],k)},5871:(g,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(u){if(u.options.overviewRulerOptions){for(const h of this._zones)if(h.color===u.options.overviewRulerOptions.color&&h.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,u.marker.line))return;if(this._lineAdjacentToZone(h,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(h,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,h){return h>=u.startBufferLine&&h<=u.endBufferLine}_lineAdjacentToZone(u,h,p){return h>=u.startBufferLine-this._linePadding[p||"full"]&&h<=u.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(u,h){u.startBufferLine=Math.min(u.startBufferLine,h),u.endBufferLine=Math.max(u.endBufferLine,h)}}},5744:function(g,a,u){var h=this&&this.__decorate||function(m,E,R,A){var L,T=arguments.length,z=T<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,R):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(m,E,R,A);else for(var H=m.length-1;H>=0;H--)(L=m[H])&&(z=(T<3?L(z):T>3?L(E,R,z):L(E,R))||z);return T>3&&z&&Object.defineProperty(E,R,z),z},p=this&&this.__param||function(m,E){return function(R,A){E(R,A,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const c=u(5871),b=u(4725),w=u(844),k=u(2585),x={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},_={full:0,left:0,center:0,right:0};let d=a.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(m,E,R,A,L,T,z){var q;super(),this._viewportElement=m,this._screenElement=E,this._bufferService=R,this._decorationService=A,this._renderService=L,this._optionsService=T,this._coreBrowserService=z,this._colorZoneStore=new c.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(),(q=this._viewportElement.parentElement)==null||q.insertBefore(this._canvas,this._viewportElement);const H=this._canvas.getContext("2d");if(!H)throw new Error("Ctx cannot be null");this._ctx=H,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var V;(V=this._canvas)==null||V.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 m=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=m,v.center=E,v.right=m,this._refreshDrawHeightConstants(),_.full=0,_.left=0,_.center=v.left,_.right=v.left+v.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const m=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(m,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 m=this._colorZoneStore.zones;for(const E of m)E.position!=="full"&&this._renderColorZone(E);for(const E of m)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(m){this._ctx.fillStyle=m.color,this._ctx.fillRect(_[m.position||"full"],Math.round((this._canvas.height-1)*(m.startBufferLine/this._bufferService.buffers.active.lines.length)-x[m.position||"full"]/2),v[m.position||"full"],Math.round((this._canvas.height-1)*((m.endBufferLine-m.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[m.position||"full"]))}_queueRefresh(m,E){this._shouldUpdateDimensions=m||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=d=h([p(2,k.IBufferService),p(3,k.IDecorationService),p(4,b.IRenderService),p(5,k.IOptionsService),p(6,b.ICoreBrowserService)],d)},2950:function(g,a,u){var h=this&&this.__decorate||function(x,v,_,d){var m,E=arguments.length,R=E<3?v:d===null?d=Object.getOwnPropertyDescriptor(v,_):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,v,_,d);else for(var A=x.length-1;A>=0;A--)(m=x[A])&&(R=(E<3?m(R):E>3?m(v,_,R):m(v,_))||R);return E>3&&R&&Object.defineProperty(v,_,R),R},p=this&&this.__param||function(x,v){return function(_,d){v(_,d,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const c=u(4725),b=u(2585),w=u(2584);let k=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,v,_,d,m,E){this._textarea=x,this._compositionView=v,this._bufferService=_,this._optionsService=d,this._coreService=m,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 v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let _;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,_=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),_.length>0&&this._coreService.triggerDataEvent(_,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const x=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,_=v.replace(x,"");this._dataAlreadySent=_,v.length>x.length?this._coreService.triggerDataEvent(_,!0):v.length<x.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):v.length===x.length&&v!==x&&this._coreService.triggerDataEvent(v,!0)}}),0)}updateCompositionElements(x){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const v=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),_=this._renderService.dimensions.css.cell.height,d=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,m=v*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=m+"px",this._compositionView.style.top=d+"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=m+"px",this._textarea.style.top=d+"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,c.IRenderService)],k)},9806:(g,a)=>{function u(h,p,c){const b=c.getBoundingClientRect(),w=h.getComputedStyle(c),k=parseInt(w.getPropertyValue("padding-left")),x=parseInt(w.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=u,a.getCoords=function(h,p,c,b,w,k,x,v,_){if(!k)return;const d=u(h,p,c);return d?(d[0]=Math.ceil((d[0]+(_?x/2:0))/x),d[1]=Math.ceil(d[1]/v),d[0]=Math.min(Math.max(d[0],1),b+(_?1:0)),d[1]=Math.min(Math.max(d[1],1),w),d):void 0}},9504:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const h=u(2584);function p(v,_,d,m){const E=v-c(v,d),R=_-c(_,d),A=Math.abs(E-R)-(function(L,T,z){let H=0;const q=L-c(L,z),V=T-c(T,z);for(let I=0;I<Math.abs(q-V);I++){const G=b(L,T)==="A"?-1:1,K=z.buffer.lines.get(q+G*I);K!=null&&K.isWrapped&&H++}return H})(v,_,d);return x(A,k(b(v,_),m))}function c(v,_){let d=0,m=_.buffer.lines.get(v),E=m==null?void 0:m.isWrapped;for(;E&&v>=0&&v<_.rows;)d++,m=_.buffer.lines.get(--v),E=m==null?void 0:m.isWrapped;return d}function b(v,_){return v>_?"A":"B"}function w(v,_,d,m,E,R){let A=v,L=_,T="";for(;A!==d||L!==m;)A+=E?1:-1,E&&A>R.cols-1?(T+=R.buffer.translateBufferLineToString(L,!1,v,A),A=0,v=0,L++):!E&&A<0&&(T+=R.buffer.translateBufferLineToString(L,!1,0,v+1),A=R.cols-1,v=A,L--);return T+R.buffer.translateBufferLineToString(L,!1,v,A)}function k(v,_){const d=_?"O":"[";return h.C0.ESC+d+v}function x(v,_){v=Math.floor(v);let d="";for(let m=0;m<v;m++)d+=_;return d}a.moveToCellSequence=function(v,_,d,m){const E=d.buffer.x,R=d.buffer.y;if(!d.buffer.hasScrollback)return(function(T,z,H,q,V,I){return p(z,q,V,I).length===0?"":x(w(T,z,T,z-c(z,V),!1,V).length,k("D",I))})(E,R,0,_,d,m)+p(R,_,d,m)+(function(T,z,H,q,V,I){let G;G=p(z,q,V,I).length>0?q-c(q,V):z;const K=q,Y=(function(Z,ee,O,M,B,P){let N;return N=p(O,M,B,P).length>0?M-c(M,B):ee,Z<O&&N<=M||Z>=O&&N<M?"C":"D"})(T,z,H,q,V,I);return x(w(T,G,H,K,Y==="C",V).length,k(Y,I))})(E,R,v,_,d,m);let A;if(R===_)return A=E>v?"D":"C",x(Math.abs(E-v),k(A,m));A=R>_?"D":"C";const L=Math.abs(R-_);return x((function(T,z){return z.cols-T})(R>_?v:E,d)+(L-1)*d.cols+1+((R>_?E:v)-1),k(A,m))}},1296:function(g,a,u){var h=this&&this.__decorate||function(I,G,K,Y){var Z,ee=arguments.length,O=ee<3?G:Y===null?Y=Object.getOwnPropertyDescriptor(G,K):Y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(I,G,K,Y);else for(var M=I.length-1;M>=0;M--)(Z=I[M])&&(O=(ee<3?Z(O):ee>3?Z(G,K,O):Z(G,K))||O);return ee>3&&O&&Object.defineProperty(G,K,O),O},p=this&&this.__param||function(I,G){return function(K,Y){G(K,Y,I)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const c=u(3787),b=u(2550),w=u(2223),k=u(6171),x=u(6052),v=u(4725),_=u(8055),d=u(8460),m=u(844),E=u(2585),R="xterm-dom-renderer-owner-",A="xterm-rows",L="xterm-fg-",T="xterm-bg-",z="xterm-focus",H="xterm-selection";let q=1,V=a.DomRenderer=class extends m.Disposable{constructor(I,G,K,Y,Z,ee,O,M,B,P,N,ie,fe){super(),this._terminal=I,this._document=G,this._element=K,this._screenElement=Y,this._viewportElement=Z,this._helperContainer=ee,this._linkifier2=O,this._charSizeService=B,this._optionsService=P,this._bufferService=N,this._coreBrowserService=ie,this._themeService=fe,this._terminalClass=q++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new d.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(A),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(H),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((de=>this._injectCss(de)))),this._injectCss(this._themeService.colors),this._rowFactory=M.createInstance(c.DomRendererRowFactory,document),this._element.classList.add(R+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((de=>this._handleLinkHover(de)))),this.register(this._linkifier2.onHideLinkUnderline((de=>this._handleLinkLeave(de)))),this.register((0,m.toDisposable)((()=>{this._element.classList.remove(R+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 I=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*I,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*I),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/I),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/I),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 G=`${this._terminalSelector} .${A} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=G,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(I){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let G=`${this._terminalSelector} .${A} { color: ${I.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;G+=`${this._terminalSelector} .${A} .xterm-dim { color: ${_.color.multiplyOpacity(I.foreground,.5).css};}`,G+=`${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}`,Y=`blink_bar_${this._terminalClass}`,Z=`blink_block_${this._terminalClass}`;G+=`@keyframes ${K} { 50% { border-bottom-style: hidden; }}`,G+=`@keyframes ${Y} { 50% { box-shadow: none; }}`,G+=`@keyframes ${Z} { 0% { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css}; } 50% { background-color: inherit; color: ${I.cursor.css}; }}`,G+=`${this._terminalSelector} .${A}.${z} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${A}.${z} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${A}.${z} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css};}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${I.cursor.css} !important; color: ${I.cursorAccent.css} !important;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${I.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${I.cursor.css} inset;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${I.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,G+=`${this._terminalSelector} .${H} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${H} div { position: absolute; background-color: ${I.selectionBackgroundOpaque.css};}${this._terminalSelector} .${H} div { position: absolute; background-color: ${I.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,O]of I.ansi.entries())G+=`${this._terminalSelector} .${L}${ee} { color: ${O.css}; }${this._terminalSelector} .${L}${ee}.xterm-dim { color: ${_.color.multiplyOpacity(O,.5).css}; }${this._terminalSelector} .${T}${ee} { background-color: ${O.css}; }`;G+=`${this._terminalSelector} .${L}${w.INVERTED_DEFAULT_COLOR} { color: ${_.color.opaque(I.background).css}; }${this._terminalSelector} .${L}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${_.color.multiplyOpacity(_.color.opaque(I.background),.5).css}; }${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR} { background-color: ${I.foreground.css}; }`,this._themeStyleElement.textContent=G}_setDefaultSpacing(){const I=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${I}px`,this._rowFactory.defaultSpacing=I}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(I,G){for(let K=this._rowElements.length;K<=G;K++){const Y=this._document.createElement("div");this._rowContainer.appendChild(Y),this._rowElements.push(Y)}for(;this._rowElements.length>G;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(I,G){this._refreshRowElements(I,G),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(z),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(z),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(I,G,K){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(I,G,K),this.renderRows(0,this._bufferService.rows-1),!I||!G)return;this._selectionRenderModel.update(this._terminal,I,G,K);const Y=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,O=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||O<0)return;const M=this._document.createDocumentFragment();if(K){const B=I[0]>G[0];M.appendChild(this._createSelectionElement(ee,B?G[0]:I[0],B?I[0]:G[0],O-ee+1))}else{const B=Y===ee?I[0]:0,P=ee===Z?G[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(ee,B,P));const N=O-ee-1;if(M.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,N)),ee!==O){const ie=Z===O?G[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(O,0,ie))}}this._selectionContainer.appendChild(M)}_createSelectionElement(I,G,K,Y=1){const Z=this._document.createElement("div"),ee=G*this.dimensions.css.cell.width;let O=this.dimensions.css.cell.width*(K-G);return ee+O>this.dimensions.css.canvas.width&&(O=this.dimensions.css.canvas.width-ee),Z.style.height=Y*this.dimensions.css.cell.height+"px",Z.style.top=I*this.dimensions.css.cell.height+"px",Z.style.left=`${ee}px`,Z.style.width=`${O}px`,Z}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 I of this._rowElements)I.replaceChildren()}renderRows(I,G){const K=this._bufferService.buffer,Y=K.ybase+K.y,Z=Math.min(K.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,O=this._optionsService.rawOptions.cursorStyle,M=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=I;B<=G;B++){const P=B+K.ydisp,N=this._rowElements[B],ie=K.lines.get(P);if(!N||!ie)break;N.replaceChildren(...this._rowFactory.createRow(ie,P,P===Y,O,M,Z,ee,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${R}${this._terminalClass}`}_handleLinkHover(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!0)}_handleLinkLeave(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!1)}_setCellUnderline(I,G,K,Y,Z,ee){K<0&&(I=0),Y<0&&(G=0);const O=this._bufferService.rows-1;K=Math.max(Math.min(K,O),0),Y=Math.max(Math.min(Y,O),0),Z=Math.min(Z,this._bufferService.cols);const M=this._bufferService.buffer,B=M.ybase+M.y,P=Math.min(M.x,Z-1),N=this._optionsService.rawOptions.cursorBlink,ie=this._optionsService.rawOptions.cursorStyle,fe=this._optionsService.rawOptions.cursorInactiveStyle;for(let de=K;de<=Y;++de){const X=de+M.ydisp,U=this._rowElements[de],le=M.lines.get(X);if(!U||!le)break;U.replaceChildren(...this._rowFactory.createRow(le,X,X===B,ie,fe,P,N,this.dimensions.css.cell.width,this._widthCache,ee?de===K?I:0:-1,ee?(de===Y?G:Z)-1:-1))}}};a.DomRenderer=V=h([p(7,E.IInstantiationService),p(8,v.ICharSizeService),p(9,E.IOptionsService),p(10,E.IBufferService),p(11,v.ICoreBrowserService),p(12,v.IThemeService)],V)},3787:function(g,a,u){var h=this&&this.__decorate||function(A,L,T,z){var H,q=arguments.length,V=q<3?L:z===null?z=Object.getOwnPropertyDescriptor(L,T):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(A,L,T,z);else for(var I=A.length-1;I>=0;I--)(H=A[I])&&(V=(q<3?H(V):q>3?H(L,T,V):H(L,T))||V);return q>3&&V&&Object.defineProperty(L,T,V),V},p=this&&this.__param||function(A,L){return function(T,z){L(T,z,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const c=u(2223),b=u(643),w=u(511),k=u(2585),x=u(8055),v=u(4725),_=u(4269),d=u(6171),m=u(3734);let E=a.DomRendererRowFactory=class{constructor(A,L,T,z,H,q,V){this._document=A,this._characterJoinerService=L,this._optionsService=T,this._coreBrowserService=z,this._coreService=H,this._decorationService=q,this._themeService=V,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(A,L,T){this._selectionStart=A,this._selectionEnd=L,this._columnSelectMode=T}createRow(A,L,T,z,H,q,V,I,G,K,Y){const Z=[],ee=this._characterJoinerService.getJoinedCharacters(L),O=this._themeService.colors;let M,B=A.getNoBgTrimmedLength();T&&B<q+1&&(B=q+1);let P=0,N="",ie=0,fe=0,de=0,X=!1,U=0,le=!1,Q=0;const pe=[],_e=K!==-1&&Y!==-1;for(let Ae=0;Ae<B;Ae++){A.loadCell(Ae,this._workCell);let ce=this._workCell.getWidth();if(ce===0)continue;let be=!1,Ge=Ae,we=this._workCell;if(ee.length>0&&Ae===ee[0][0]){be=!0;const qe=ee.shift();we=new _.JoinedCellData(this._workCell,A.translateToString(!0,qe[0],qe[1]),qe[1]-qe[0]),Ge=qe[1]-1,ce=we.getWidth()}const mn=this._isCellInSelection(Ae,L),gn=T&&Ae===q,vn=_e&&Ae>=K&&Ae<=Y;let En=!1;this._decorationService.forEachDecorationAtCell(Ae,L,void 0,(qe=>{En=!0}));let Yn=we.getChars()||b.WHITESPACE_CELL_CHAR;if(Yn===" "&&(we.isUnderline()||we.isOverline())&&(Yn=" "),Q=ce*I-G.get(Yn,we.isBold(),we.isItalic()),M){if(P&&(mn&&le||!mn&&!le&&we.bg===ie)&&(mn&&le&&O.selectionForeground||we.fg===fe)&&we.extended.ext===de&&vn===X&&Q===U&&!gn&&!be&&!En){we.isInvisible()?N+=b.WHITESPACE_CELL_CHAR:N+=Yn,P++;continue}P&&(M.textContent=N),M=this._document.createElement("span"),P=0,N=""}else M=this._document.createElement("span");if(ie=we.bg,fe=we.fg,de=we.extended.ext,X=vn,U=Q,le=mn,be&&q>=Ae&&q<=Ge&&(q=Ae),!this._coreService.isCursorHidden&&gn&&this._coreService.isCursorInitialized){if(pe.push("xterm-cursor"),this._coreBrowserService.isFocused)V&&pe.push("xterm-cursor-blink"),pe.push(z==="bar"?"xterm-cursor-bar":z==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(H)switch(H){case"outline":pe.push("xterm-cursor-outline");break;case"block":pe.push("xterm-cursor-block");break;case"bar":pe.push("xterm-cursor-bar");break;case"underline":pe.push("xterm-cursor-underline")}}if(we.isBold()&&pe.push("xterm-bold"),we.isItalic()&&pe.push("xterm-italic"),we.isDim()&&pe.push("xterm-dim"),N=we.isInvisible()?b.WHITESPACE_CELL_CHAR:we.getChars()||b.WHITESPACE_CELL_CHAR,we.isUnderline()&&(pe.push(`xterm-underline-${we.extended.underlineStyle}`),N===" "&&(N=" "),!we.isUnderlineColorDefault()))if(we.isUnderlineColorRGB())M.style.textDecorationColor=`rgb(${m.AttributeData.toColorRGB(we.getUnderlineColor()).join(",")})`;else{let qe=we.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&we.isBold()&&qe<8&&(qe+=8),M.style.textDecorationColor=O.ansi[qe].css}we.isOverline()&&(pe.push("xterm-overline"),N===" "&&(N=" ")),we.isStrikethrough()&&pe.push("xterm-strikethrough"),vn&&(M.style.textDecoration="underline");let At=we.getFgColor(),ot=we.getFgColorMode(),Ot=we.getBgColor(),ae=we.getBgColorMode();const ve=!!we.isInverse();if(ve){const qe=At;At=Ot,Ot=qe;const bt=ot;ot=ae,ae=bt}let Ce,De,Oe,mt=!1;switch(this._decorationService.forEachDecorationAtCell(Ae,L,void 0,(qe=>{qe.options.layer!=="top"&&mt||(qe.backgroundColorRGB&&(ae=50331648,Ot=qe.backgroundColorRGB.rgba>>8&16777215,Ce=qe.backgroundColorRGB),qe.foregroundColorRGB&&(ot=50331648,At=qe.foregroundColorRGB.rgba>>8&16777215,De=qe.foregroundColorRGB),mt=qe.options.layer==="top")})),!mt&&mn&&(Ce=this._coreBrowserService.isFocused?O.selectionBackgroundOpaque:O.selectionInactiveBackgroundOpaque,Ot=Ce.rgba>>8&16777215,ae=50331648,mt=!0,O.selectionForeground&&(ot=50331648,At=O.selectionForeground.rgba>>8&16777215,De=O.selectionForeground)),mt&&pe.push("xterm-decoration-top"),ae){case 16777216:case 33554432:Oe=O.ansi[Ot],pe.push(`xterm-bg-${Ot}`);break;case 50331648:Oe=x.channels.toColor(Ot>>16,Ot>>8&255,255&Ot),this._addStyle(M,`background-color:#${R((Ot>>>0).toString(16),"0",6)}`);break;default:ve?(Oe=O.foreground,pe.push(`xterm-bg-${c.INVERTED_DEFAULT_COLOR}`)):Oe=O.background}switch(Ce||we.isDim()&&(Ce=x.color.multiplyOpacity(Oe,.5)),ot){case 16777216:case 33554432:we.isBold()&&At<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(At+=8),this._applyMinimumContrast(M,Oe,O.ansi[At],we,Ce,void 0)||pe.push(`xterm-fg-${At}`);break;case 50331648:const qe=x.channels.toColor(At>>16&255,At>>8&255,255&At);this._applyMinimumContrast(M,Oe,qe,we,Ce,De)||this._addStyle(M,`color:#${R(At.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(M,Oe,O.foreground,we,Ce,De)||ve&&pe.push(`xterm-fg-${c.INVERTED_DEFAULT_COLOR}`)}pe.length&&(M.className=pe.join(" "),pe.length=0),gn||be||En?M.textContent=N:P++,Q!==this.defaultSpacing&&(M.style.letterSpacing=`${Q}px`),Z.push(M),Ae=Ge}return M&&P&&(M.textContent=N),Z}_applyMinimumContrast(A,L,T,z,H,q){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,d.treatGlyphAsBackgroundColor)(z.getCode()))return!1;const V=this._getContrastCache(z);let I;if(H||q||(I=V.getColor(L.rgba,T.rgba)),I===void 0){const G=this._optionsService.rawOptions.minimumContrastRatio/(z.isDim()?2:1);I=x.color.ensureContrastRatio(H||L,q||T,G),V.setColor((H||L).rgba,(q||T).rgba,I??null)}return!!I&&(this._addStyle(A,`color:${I.css}`),!0)}_getContrastCache(A){return A.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(A,L){A.setAttribute("style",`${A.getAttribute("style")||""}${L};`)}_isCellInSelection(A,L){const T=this._selectionStart,z=this._selectionEnd;return!(!T||!z)&&(this._columnSelectMode?T[0]<=z[0]?A>=T[0]&&L>=T[1]&&A<z[0]&&L<=z[1]:A<T[0]&&L>=T[1]&&A>=z[0]&&L<=z[1]:L>T[1]&&L<z[1]||T[1]===z[1]&&L===T[1]&&A>=T[0]&&A<z[0]||T[1]<z[1]&&L===z[1]&&A<z[0]||T[1]<z[1]&&L===T[1]&&A>=T[0])}};function R(A,L,T){for(;A.length<T;)A=L+A;return A}a.DomRendererRowFactory=E=h([p(1,v.ICharacterJoinerService),p(2,k.IOptionsService),p(3,v.ICoreBrowserService),p(4,k.ICoreService),p(5,k.IDecorationService),p(6,v.IThemeService)],E)},2550:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(u,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.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=u.createElement("span");p.classList.add("xterm-char-measure-element");const c=u.createElement("span");c.classList.add("xterm-char-measure-element"),c.style.fontWeight="bold";const b=u.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontStyle="italic";const w=u.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[p,c,b,w],this._container.appendChild(p),this._container.appendChild(c),this._container.appendChild(b),this._container.appendChild(w),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(u,h,p,c){u===this._font&&h===this._fontSize&&p===this._weight&&c===this._weightBold||(this._font=u,this._fontSize=h,this._weight=p,this._weightBold=c,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${c}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${c}`,this.clear())}get(u,h,p){let c=0;if(!h&&!p&&u.length===1&&(c=u.charCodeAt(0))<256){if(this._flat[c]!==-9999)return this._flat[c];const k=this._measure(u,0);return k>0&&(this._flat[c]=k),k}let b=u;h&&(b+="B"),p&&(b+="I");let w=this._holey.get(b);if(w===void 0){let k=0;h&&(k|=1),p&&(k|=2),w=this._measure(u,k),w>0&&this._holey.set(b,w)}return w}_measure(u,h){const p=this._measureElements[h];return p.textContent=u.repeat(32),p.offsetWidth/32}}},2223:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const h=u(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(g,a)=>{function u(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=u,a.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},a.isEmoji=h,a.allowRescaling=function(p,c,b,w){return c===1&&b>Math.ceil(1.5*w)&&p!==void 0&&p>255&&!h(p)&&!u(p)&&!(function(k){return 57344<=k&&k<=63743})(p)},a.treatGlyphAsBackgroundColor=function(p){return u(p)||(function(c){return 9472<=c&&c<=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,c,b=0){return(p-(2*Math.round(c)-b))%(2*Math.round(c))}},6052:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class u{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,c,b,w=!1){if(this.selectionStart=c,this.selectionEnd=b,!c||!b||c[0]===b[0]&&c[1]===b[1])return void this.clear();const k=p.buffers.active.ydisp,x=c[1]-k,v=b[1]-k,_=Math.max(x,0),d=Math.min(v,p.rows-1);_>=p.rows||d<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=x,this.viewportEndRow=v,this.viewportCappedStartRow=_,this.viewportCappedEndRow=d,this.startCol=c[0],this.endCol=b[0])}isCellSelected(p,c,b){return!!this.hasSelection&&(b-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?c>=this.startCol&&b>=this.viewportCappedStartRow&&c<this.endCol&&b<=this.viewportCappedEndRow:c<this.startCol&&b>=this.viewportCappedStartRow&&c>=this.endCol&&b<=this.viewportCappedEndRow:b>this.viewportStartRow&&b<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&b===this.viewportStartRow&&c>=this.startCol&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportEndRow&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportStartRow&&c>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},456:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(u){this._bufferService=u,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 u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,h=this.selectionEnd;return!(!u||!h)&&(u[1]>h[1]||u[1]===h[1]&&u[0]>h[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(g,a,u){var h=this&&this.__decorate||function(d,m,E,R){var A,L=arguments.length,T=L<3?m:R===null?R=Object.getOwnPropertyDescriptor(m,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(d,m,E,R);else for(var z=d.length-1;z>=0;z--)(A=d[z])&&(T=(L<3?A(T):L>3?A(m,E,T):A(m,E))||T);return L>3&&T&&Object.defineProperty(m,E,T),T},p=this&&this.__param||function(d,m){return function(E,R){m(E,R,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const c=u(2585),b=u(8460),w=u(844);let k=a.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(d,m,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 v(d,m,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const d=this._measureStrategy.measure();d.width===this.width&&d.height===this.height||(this.width=d.width,this.height=d.height,this._onCharSizeChange.fire())}};a.CharSizeService=k=h([p(2,c.IOptionsService)],k);class x extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(m,E){m!==void 0&&m>0&&E!==void 0&&E>0&&(this._result.width=m,this._result.height=E)}}class v extends x{constructor(m,E,R){super(),this._document=m,this._parentElement=E,this._optionsService=R,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(m){super(),this._optionsService=m,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 m=this._ctx.measureText("W");return this._validateAndSet(m.width,m.fontBoundingBoxAscent+m.fontBoundingBoxDescent),this._result}}},4269:function(g,a,u){var h=this&&this.__decorate||function(_,d,m,E){var R,A=arguments.length,L=A<3?d:E===null?E=Object.getOwnPropertyDescriptor(d,m):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(_,d,m,E);else for(var T=_.length-1;T>=0;T--)(R=_[T])&&(L=(A<3?R(L):A>3?R(d,m,L):R(d,m))||L);return A>3&&L&&Object.defineProperty(d,m,L),L},p=this&&this.__param||function(_,d){return function(m,E){d(m,E,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const c=u(3734),b=u(643),w=u(511),k=u(2585);class x extends c.AttributeData{constructor(d,m,E){super(),this.content=0,this.combinedData="",this.fg=d.fg,this.bg=d.bg,this.combinedData=m,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(d){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=x;let v=a.CharacterJoinerService=class B_{constructor(d){this._bufferService=d,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(d){const m={id:this._nextCharacterJoinerId++,handler:d};return this._characterJoiners.push(m),m.id}deregister(d){for(let m=0;m<this._characterJoiners.length;m++)if(this._characterJoiners[m].id===d)return this._characterJoiners.splice(m,1),!0;return!1}getJoinedCharacters(d){if(this._characterJoiners.length===0)return[];const m=this._bufferService.buffer.lines.get(d);if(!m||m.length===0)return[];const E=[],R=m.translateToString(!0);let A=0,L=0,T=0,z=m.getFg(0),H=m.getBg(0);for(let q=0;q<m.getTrimmedLength();q++)if(m.loadCell(q,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==z||this._workCell.bg!==H){if(q-A>1){const V=this._getJoinedRanges(R,T,L,m,A);for(let I=0;I<V.length;I++)E.push(V[I])}A=q,T=L,z=this._workCell.fg,H=this._workCell.bg}L+=this._workCell.getChars().length||b.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-A>1){const q=this._getJoinedRanges(R,T,L,m,A);for(let V=0;V<q.length;V++)E.push(q[V])}return E}_getJoinedRanges(d,m,E,R,A){const L=d.substring(m,E);let T=[];try{T=this._characterJoiners[0].handler(L)}catch(z){console.error(z)}for(let z=1;z<this._characterJoiners.length;z++)try{const H=this._characterJoiners[z].handler(L);for(let q=0;q<H.length;q++)B_._mergeRanges(T,H[q])}catch(H){console.error(H)}return this._stringRangesToCellRanges(T,R,A),T}_stringRangesToCellRanges(d,m,E){let R=0,A=!1,L=0,T=d[R];if(T){for(let z=E;z<this._bufferService.cols;z++){const H=m.getWidth(z),q=m.getString(z).length||b.WHITESPACE_CELL_CHAR.length;if(H!==0){if(!A&&T[0]<=L&&(T[0]=z,A=!0),T[1]<=L){if(T[1]=z,T=d[++R],!T)break;T[0]<=L?(T[0]=z,A=!0):A=!1}L+=q}}T&&(T[1]=this._bufferService.cols)}}static _mergeRanges(d,m){let E=!1;for(let R=0;R<d.length;R++){const A=d[R];if(E){if(m[1]<=A[0])return d[R-1][1]=m[1],d;if(m[1]<=A[1])return d[R-1][1]=Math.max(m[1],A[1]),d.splice(R,1),d;d.splice(R,1),R--}else{if(m[1]<=A[0])return d.splice(R,0,m),d;if(m[1]<=A[1])return A[0]=Math.min(m[0],A[0]),d;m[0]<A[1]&&(A[0]=Math.min(m[0],A[0]),E=!0)}}return E?d[d.length-1][1]=m[1]:d.push(m),d}};a.CharacterJoinerService=v=h([p(0,k.IBufferService)],v)},5114:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=u(844),p=u(8460),c=u(3656);class b extends h.Disposable{constructor(x,v,_){super(),this._textarea=x,this._window=v,this.mainDocument=_,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(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((d=>this._screenDprMonitor.setWindow(d)))),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 w 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,c.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:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const h=u(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 w=this.linkProviders.indexOf(b);w!==-1&&this.linkProviders.splice(w,1)}}}}a.LinkProviderService=p},8934:function(g,a,u){var h=this&&this.__decorate||function(k,x,v,_){var d,m=arguments.length,E=m<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,v):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(k,x,v,_);else for(var R=k.length-1;R>=0;R--)(d=k[R])&&(E=(m<3?d(E):m>3?d(x,v,E):d(x,v))||E);return m>3&&E&&Object.defineProperty(x,v,E),E},p=this&&this.__param||function(k,x){return function(v,_){x(v,_,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const c=u(4725),b=u(9806);let w=a.MouseService=class{constructor(k,x){this._renderService=k,this._charSizeService=x}getCoords(k,x,v,_,d){return(0,b.getCoords)(window,k,x,v,_,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,d)}getMouseReportCoords(k,x){const v=(0,b.getCoordsRelativeToElement)(window,k,x);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};a.MouseService=w=h([p(0,c.IRenderService),p(1,c.ICharSizeService)],w)},3230:function(g,a,u){var h=this&&this.__decorate||function(d,m,E,R){var A,L=arguments.length,T=L<3?m:R===null?R=Object.getOwnPropertyDescriptor(m,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(d,m,E,R);else for(var z=d.length-1;z>=0;z--)(A=d[z])&&(T=(L<3?A(T):L>3?A(m,E,T):A(m,E))||T);return L>3&&T&&Object.defineProperty(m,E,T),T},p=this&&this.__param||function(d,m){return function(E,R){m(E,R,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const c=u(6193),b=u(4725),w=u(8460),k=u(844),x=u(7226),v=u(2585);let _=a.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(d,m,E,R,A,L,T,z){super(),this._rowCount=d,this._charSizeService=R,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 w.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new w.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new w.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new c.RenderDebouncer(((H,q)=>this._renderRows(H,q)),T),this.register(this._renderDebouncer),this.register(T.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(L.onResize((()=>this._fullRefresh()))),this.register(L.buffers.onBufferActivate((()=>{var H;return(H=this._renderer.value)==null?void 0:H.clear()}))),this.register(E.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(A.onDecorationRegistered((()=>this._fullRefresh()))),this.register(A.onDecorationRemoved((()=>this._fullRefresh()))),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(L.cols,L.rows),this._fullRefresh()}))),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(L.buffer.y,L.buffer.y,!0)))),this.register(z.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(T.window,m),this.register(T.onWindowChange((H=>this._registerIntersectionObserver(H,m))))}_registerIntersectionObserver(d,m){if("IntersectionObserver"in d){const E=new d.IntersectionObserver((R=>this._handleIntersectionChange(R[R.length-1])),{threshold:0});E.observe(m),this._observerDisposable.value=(0,k.toDisposable)((()=>E.disconnect()))}}_handleIntersectionChange(d){this._isPaused=d.isIntersecting===void 0?d.intersectionRatio===0:!d.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(d,m,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(d,m,this._rowCount))}_renderRows(d,m){this._renderer.value&&(d=Math.min(d,this._rowCount-1),m=Math.min(m,this._rowCount-1),this._renderer.value.renderRows(d,m),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:d,end:m}),this._onRender.fire({start:d,end:m}),this._isNextRenderRedrawOnly=!0)}resize(d,m){this._rowCount=m,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(d){this._renderer.value=d,this._renderer.value&&(this._renderer.value.onRequestRedraw((m=>this.refreshRows(m.start,m.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(d){return this._renderDebouncer.addRefreshCallback(d)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var d,m;this._renderer.value&&((m=(d=this._renderer.value).clearTextureAtlas)==null||m.call(d),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(d,m){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var E;return(E=this._renderer.value)==null?void 0:E.handleResize(d,m)})):this._renderer.value.handleResize(d,m),this._fullRefresh())}handleCharSizeChanged(){var d;(d=this._renderer.value)==null||d.handleCharSizeChanged()}handleBlur(){var d;(d=this._renderer.value)==null||d.handleBlur()}handleFocus(){var d;(d=this._renderer.value)==null||d.handleFocus()}handleSelectionChanged(d,m,E){var R;this._selectionState.start=d,this._selectionState.end=m,this._selectionState.columnSelectMode=E,(R=this._renderer.value)==null||R.handleSelectionChanged(d,m,E)}handleCursorMove(){var d;(d=this._renderer.value)==null||d.handleCursorMove()}clear(){var d;(d=this._renderer.value)==null||d.clear()}};a.RenderService=_=h([p(2,v.IOptionsService),p(3,b.ICharSizeService),p(4,v.IDecorationService),p(5,v.IBufferService),p(6,b.ICoreBrowserService),p(7,b.IThemeService)],_)},9312:function(g,a,u){var h=this&&this.__decorate||function(T,z,H,q){var V,I=arguments.length,G=I<3?z:q===null?q=Object.getOwnPropertyDescriptor(z,H):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(T,z,H,q);else for(var K=T.length-1;K>=0;K--)(V=T[K])&&(G=(I<3?V(G):I>3?V(z,H,G):V(z,H))||G);return I>3&&G&&Object.defineProperty(z,H,G),G},p=this&&this.__param||function(T,z){return function(H,q){z(H,q,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const c=u(9806),b=u(9504),w=u(456),k=u(4725),x=u(8460),v=u(844),_=u(6114),d=u(4841),m=u(511),E=u(2585),R=" ",A=new RegExp(R,"g");let L=a.SelectionService=class extends v.Disposable{constructor(T,z,H,q,V,I,G,K,Y){super(),this._element=T,this._screenElement=z,this._linkifier=H,this._bufferService=q,this._coreService=V,this._mouseService=I,this._optionsService=G,this._renderService=K,this._coreBrowserService=Y,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new m.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=Z=>this._handleMouseMove(Z),this._mouseUpListener=Z=>this._handleMouseUp(Z),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Z=>this._handleTrim(Z))),this.register(this._bufferService.buffers.onBufferActivate((Z=>this._handleBufferActivate(Z)))),this.enable(),this._model=new w.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.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 T=this._model.finalSelectionStart,z=this._model.finalSelectionEnd;return!(!T||!z||T[0]===z[0]&&T[1]===z[1])}get selectionText(){const T=this._model.finalSelectionStart,z=this._model.finalSelectionEnd;if(!T||!z)return"";const H=this._bufferService.buffer,q=[];if(this._activeSelectionMode===3){if(T[0]===z[0])return"";const V=T[0]<z[0]?T[0]:z[0],I=T[0]<z[0]?z[0]:T[0];for(let G=T[1];G<=z[1];G++){const K=H.translateBufferLineToString(G,!0,V,I);q.push(K)}}else{const V=T[1]===z[1]?z[0]:void 0;q.push(H.translateBufferLineToString(T[1],!0,T[0],V));for(let I=T[1]+1;I<=z[1]-1;I++){const G=H.lines.get(I),K=H.translateBufferLineToString(I,!0);G!=null&&G.isWrapped?q[q.length-1]+=K:q.push(K)}if(T[1]!==z[1]){const I=H.lines.get(z[1]),G=H.translateBufferLineToString(z[1],!0,0,z[0]);I&&I.isWrapped?q[q.length-1]+=G:q.push(G)}}return q.map((V=>V.replace(A," "))).join(_.isWindows?`\r
|
|
54
|
+
`:`
|
|
55
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(T){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),_.isLinux&&T&&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(T){const z=this._getMouseBufferCoords(T),H=this._model.finalSelectionStart,q=this._model.finalSelectionEnd;return!!(H&&q&&z)&&this._areCoordsInSelection(z,H,q)}isCellInSelection(T,z){const H=this._model.finalSelectionStart,q=this._model.finalSelectionEnd;return!(!H||!q)&&this._areCoordsInSelection([T,z],H,q)}_areCoordsInSelection(T,z,H){return T[1]>z[1]&&T[1]<H[1]||z[1]===H[1]&&T[1]===z[1]&&T[0]>=z[0]&&T[0]<H[0]||z[1]<H[1]&&T[1]===H[1]&&T[0]<H[0]||z[1]<H[1]&&T[1]===z[1]&&T[0]>=z[0]}_selectWordAtCursor(T,z){var V,I;const H=(I=(V=this._linkifier.currentLink)==null?void 0:V.link)==null?void 0:I.range;if(H)return this._model.selectionStart=[H.start.x-1,H.start.y-1],this._model.selectionStartLength=(0,d.getRangeLength)(H,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const q=this._getMouseBufferCoords(T);return!!q&&(this._selectWordAt(q,z),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(T,z){this._model.clearSelection(),T=Math.max(T,0),z=Math.min(z,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,T],this._model.selectionEnd=[this._bufferService.cols,z],this.refresh(),this._onSelectionChange.fire()}_handleTrim(T){this._model.handleTrim(T)&&this.refresh()}_getMouseBufferCoords(T){const z=this._mouseService.getCoords(T,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(z)return z[0]--,z[1]--,z[1]+=this._bufferService.buffer.ydisp,z}_getMouseEventScrollAmount(T){let z=(0,c.getCoordsRelativeToElement)(this._coreBrowserService.window,T,this._screenElement)[1];const H=this._renderService.dimensions.css.canvas.height;return z>=0&&z<=H?0:(z>H&&(z-=H),z=Math.min(Math.max(z,-50),50),z/=50,z/Math.abs(z)+Math.round(14*z))}shouldForceSelection(T){return _.isMac?T.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:T.shiftKey}handleMouseDown(T){if(this._mouseDownTimeStamp=T.timeStamp,(T.button!==2||!this.hasSelection)&&T.button===0){if(!this._enabled){if(!this.shouldForceSelection(T))return;T.stopPropagation()}T.preventDefault(),this._dragScrollAmount=0,this._enabled&&T.shiftKey?this._handleIncrementalClick(T):T.detail===1?this._handleSingleClick(T):T.detail===2?this._handleDoubleClick(T):T.detail===3&&this._handleTripleClick(T),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(T){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(T))}_handleSingleClick(T){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(T)?3:0,this._model.selectionStart=this._getMouseBufferCoords(T),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const z=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);z&&z.length!==this._model.selectionStart[0]&&z.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(T){this._selectWordAtCursor(T,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(T){const z=this._getMouseBufferCoords(T);z&&(this._activeSelectionMode=2,this._selectLineAt(z[1]))}shouldColumnSelect(T){return T.altKey&&!(_.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(T){if(T.stopImmediatePropagation(),!this._model.selectionStart)return;const z=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(T),!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(T),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const H=this._bufferService.buffer;if(this._model.selectionEnd[1]<H.lines.length){const q=H.lines.get(this._model.selectionEnd[1]);q&&q.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}z&&z[0]===this._model.selectionEnd[0]&&z[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 T=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(T.ydisp+this._bufferService.rows,T.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=T.ydisp),this.refresh()}}_handleMouseUp(T){const z=T.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&z<500&&T.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const H=this._mouseService.getCoords(T,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(H&&H[0]!==void 0&&H[1]!==void 0){const q=(0,b.moveToCellSequence)(H[0]-1,H[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(q,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const T=this._model.finalSelectionStart,z=this._model.finalSelectionEnd,H=!(!T||!z||T[0]===z[0]&&T[1]===z[1]);H?T&&z&&(this._oldSelectionStart&&this._oldSelectionEnd&&T[0]===this._oldSelectionStart[0]&&T[1]===this._oldSelectionStart[1]&&z[0]===this._oldSelectionEnd[0]&&z[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(T,z,H)):this._oldHasSelection&&this._fireOnSelectionChange(T,z,H)}_fireOnSelectionChange(T,z,H){this._oldSelectionStart=T,this._oldSelectionEnd=z,this._oldHasSelection=H,this._onSelectionChange.fire()}_handleBufferActivate(T){this.clearSelection(),this._trimListener.dispose(),this._trimListener=T.activeBuffer.lines.onTrim((z=>this._handleTrim(z)))}_convertViewportColToCharacterIndex(T,z){let H=z;for(let q=0;z>=q;q++){const V=T.loadCell(q,this._workCell).getChars().length;this._workCell.getWidth()===0?H--:V>1&&z!==q&&(H+=V-1)}return H}setSelection(T,z,H){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[T,z],this._model.selectionStartLength=H,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(T){this._isClickInSelection(T)||(this._selectWordAtCursor(T,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(T,z,H=!0,q=!0){if(T[0]>=this._bufferService.cols)return;const V=this._bufferService.buffer,I=V.lines.get(T[1]);if(!I)return;const G=V.translateBufferLineToString(T[1],!1);let K=this._convertViewportColToCharacterIndex(I,T[0]),Y=K;const Z=T[0]-K;let ee=0,O=0,M=0,B=0;if(G.charAt(K)===" "){for(;K>0&&G.charAt(K-1)===" ";)K--;for(;Y<G.length&&G.charAt(Y+1)===" ";)Y++}else{let ie=T[0],fe=T[0];I.getWidth(ie)===0&&(ee++,ie--),I.getWidth(fe)===2&&(O++,fe++);const de=I.getString(fe).length;for(de>1&&(B+=de-1,Y+=de-1);ie>0&&K>0&&!this._isCharWordSeparator(I.loadCell(ie-1,this._workCell));){I.loadCell(ie-1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,ie--):X>1&&(M+=X-1,K-=X-1),K--,ie--}for(;fe<I.length&&Y+1<G.length&&!this._isCharWordSeparator(I.loadCell(fe+1,this._workCell));){I.loadCell(fe+1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===2?(O++,fe++):X>1&&(B+=X-1,Y+=X-1),Y++,fe++}}Y++;let P=K+Z-ee+M,N=Math.min(this._bufferService.cols,Y-K+ee+O-M-B);if(z||G.slice(K,Y).trim()!==""){if(H&&P===0&&I.getCodePoint(0)!==32){const ie=V.lines.get(T[1]-1);if(ie&&I.isWrapped&&ie.getCodePoint(this._bufferService.cols-1)!==32){const fe=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(fe){const de=this._bufferService.cols-fe.start;P-=de,N+=de}}}if(q&&P+N===this._bufferService.cols&&I.getCodePoint(this._bufferService.cols-1)!==32){const ie=V.lines.get(T[1]+1);if(ie!=null&&ie.isWrapped&&ie.getCodePoint(0)!==32){const fe=this._getWordAt([0,T[1]+1],!1,!1,!0);fe&&(N+=fe.length)}}return{start:P,length:N}}}_selectWordAt(T,z){const H=this._getWordAt(T,z);if(H){for(;H.start<0;)H.start+=this._bufferService.cols,T[1]--;this._model.selectionStart=[H.start,T[1]],this._model.selectionStartLength=H.length}}_selectToWordAt(T){const z=this._getWordAt(T,!0);if(z){let H=T[1];for(;z.start<0;)z.start+=this._bufferService.cols,H--;if(!this._model.areSelectionValuesReversed())for(;z.start+z.length>this._bufferService.cols;)z.length-=this._bufferService.cols,H++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?z.start:z.start+z.length,H]}}_isCharWordSeparator(T){return T.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(T.getChars())>=0}_selectLineAt(T){const z=this._bufferService.buffer.getWrappedRangeForLine(T),H={start:{x:0,y:z.first},end:{x:this._bufferService.cols-1,y:z.last}};this._model.selectionStart=[0,z.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,d.getRangeLength)(H,this._bufferService.cols)}};a.SelectionService=L=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)],L)},4725:(g,a,u)=>{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=u(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(g,a,u){var h=this&&this.__decorate||function(L,T,z,H){var q,V=arguments.length,I=V<3?T:H===null?H=Object.getOwnPropertyDescriptor(T,z):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(L,T,z,H);else for(var G=L.length-1;G>=0;G--)(q=L[G])&&(I=(V<3?q(I):V>3?q(T,z,I):q(T,z))||I);return V>3&&I&&Object.defineProperty(T,z,I),I},p=this&&this.__param||function(L,T){return function(z,H){T(z,H,L)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const c=u(7239),b=u(8055),w=u(8460),k=u(844),x=u(2585),v=b.css.toColor("#ffffff"),_=b.css.toColor("#000000"),d=b.css.toColor("#ffffff"),m=b.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const L=[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")],T=[0,95,135,175,215,255];for(let z=0;z<216;z++){const H=T[z/36%6|0],q=T[z/6%6|0],V=T[z%6];L.push({css:b.channels.toCss(H,q,V),rgba:b.channels.toRgba(H,q,V)})}for(let z=0;z<24;z++){const H=8+10*z;L.push({css:b.channels.toCss(H,H,H),rgba:b.channels.toRgba(H,H,H)})}return L})());let R=a.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(L){super(),this._optionsService=L,this._contrastCache=new c.ColorContrastCache,this._halfContrastCache=new c.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:_,cursor:d,cursorAccent:m,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(L={}){const T=this._colors;if(T.foreground=A(L.foreground,v),T.background=A(L.background,_),T.cursor=A(L.cursor,d),T.cursorAccent=A(L.cursorAccent,m),T.selectionBackgroundTransparent=A(L.selectionBackground,E),T.selectionBackgroundOpaque=b.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=A(L.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=b.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=L.selectionForeground?A(L.selectionForeground,b.NULL_COLOR):void 0,T.selectionForeground===b.NULL_COLOR&&(T.selectionForeground=void 0),b.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=b.color.opacity(T.selectionBackgroundTransparent,.3)),b.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=b.color.opacity(T.selectionInactiveBackgroundTransparent,.3)),T.ansi=a.DEFAULT_ANSI_COLORS.slice(),T.ansi[0]=A(L.black,a.DEFAULT_ANSI_COLORS[0]),T.ansi[1]=A(L.red,a.DEFAULT_ANSI_COLORS[1]),T.ansi[2]=A(L.green,a.DEFAULT_ANSI_COLORS[2]),T.ansi[3]=A(L.yellow,a.DEFAULT_ANSI_COLORS[3]),T.ansi[4]=A(L.blue,a.DEFAULT_ANSI_COLORS[4]),T.ansi[5]=A(L.magenta,a.DEFAULT_ANSI_COLORS[5]),T.ansi[6]=A(L.cyan,a.DEFAULT_ANSI_COLORS[6]),T.ansi[7]=A(L.white,a.DEFAULT_ANSI_COLORS[7]),T.ansi[8]=A(L.brightBlack,a.DEFAULT_ANSI_COLORS[8]),T.ansi[9]=A(L.brightRed,a.DEFAULT_ANSI_COLORS[9]),T.ansi[10]=A(L.brightGreen,a.DEFAULT_ANSI_COLORS[10]),T.ansi[11]=A(L.brightYellow,a.DEFAULT_ANSI_COLORS[11]),T.ansi[12]=A(L.brightBlue,a.DEFAULT_ANSI_COLORS[12]),T.ansi[13]=A(L.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),T.ansi[14]=A(L.brightCyan,a.DEFAULT_ANSI_COLORS[14]),T.ansi[15]=A(L.brightWhite,a.DEFAULT_ANSI_COLORS[15]),L.extendedAnsi){const z=Math.min(T.ansi.length-16,L.extendedAnsi.length);for(let H=0;H<z;H++)T.ansi[H+16]=A(L.extendedAnsi[H],a.DEFAULT_ANSI_COLORS[H+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(L){this._restoreColor(L),this._onChangeColors.fire(this.colors)}_restoreColor(L){if(L!==void 0)switch(L){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[L]=this._restoreColors.ansi[L]}else for(let T=0;T<this._restoreColors.ansi.length;++T)this._colors.ansi[T]=this._restoreColors.ansi[T]}modifyColors(L){L(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 A(L,T){if(L!==void 0)try{return b.css.toColor(L)}catch{}return T}a.ThemeService=R=h([p(0,x.IOptionsService)],R)},6349:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=u(8460),p=u(844);class c extends p.Disposable{constructor(w){super(),this._maxLength=w,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(w){if(this._maxLength===w)return;const k=new Array(w);for(let x=0;x<Math.min(w,this.length);x++)k[x]=this._array[this._getCyclicIndex(x)];this._array=k,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let k=this._length;k<w;k++)this._array[k]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,k){this._array[this._getCyclicIndex(w)]=k}push(w){this._array[this._getCyclicIndex(this._length)]=w,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(w,k,...x){if(k){for(let v=w;v<this._length-k;v++)this._array[this._getCyclicIndex(v)]=this._array[this._getCyclicIndex(v+k)];this._length-=k,this.onDeleteEmitter.fire({index:w,amount:k})}for(let v=this._length-1;v>=w;v--)this._array[this._getCyclicIndex(v+x.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;v<x.length;v++)this._array[this._getCyclicIndex(w+v)]=x[v];if(x.length&&this.onInsertEmitter.fire({index:w,amount:x.length}),this._length+x.length>this._maxLength){const v=this._length+x.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=x.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,k,x){if(!(k<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let _=k-1;_>=0;_--)this.set(w+_+x,this.get(w+_));const v=w+k+x-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v<k;v++)this.set(w+v+x,this.get(w+v))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}a.CircularList=c},1439:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function u(h,p=5){if(typeof h!="object")return h;const c=Array.isArray(h)?[]:{};for(const b in h)c[b]=p<=1?h[b]:h[b]&&u(h[b],p-1);return c}},8055:(g,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 u=0,h=0,p=0,c=0;var b,w,k,x,v;function _(m){const E=m.toString(16);return E.length<2?"0"+E:E}function d(m,E){return m<E?(E+.05)/(m+.05):(m+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(m){m.toCss=function(E,R,A,L){return L!==void 0?`#${_(E)}${_(R)}${_(A)}${_(L)}`:`#${_(E)}${_(R)}${_(A)}`},m.toRgba=function(E,R,A,L=255){return(E<<24|R<<16|A<<8|L)>>>0},m.toColor=function(E,R,A,L){return{css:m.toCss(E,R,A,L),rgba:m.toRgba(E,R,A,L)}}})(b||(a.channels=b={})),(function(m){function E(R,A){return c=Math.round(255*A),[u,h,p]=v.toChannels(R.rgba),{css:b.toCss(u,h,p,c),rgba:b.toRgba(u,h,p,c)}}m.blend=function(R,A){if(c=(255&A.rgba)/255,c===1)return{css:A.css,rgba:A.rgba};const L=A.rgba>>24&255,T=A.rgba>>16&255,z=A.rgba>>8&255,H=R.rgba>>24&255,q=R.rgba>>16&255,V=R.rgba>>8&255;return u=H+Math.round((L-H)*c),h=q+Math.round((T-q)*c),p=V+Math.round((z-V)*c),{css:b.toCss(u,h,p),rgba:b.toRgba(u,h,p)}},m.isOpaque=function(R){return(255&R.rgba)==255},m.ensureContrastRatio=function(R,A,L){const T=v.ensureContrastRatio(R.rgba,A.rgba,L);if(T)return b.toColor(T>>24&255,T>>16&255,T>>8&255)},m.opaque=function(R){const A=(255|R.rgba)>>>0;return[u,h,p]=v.toChannels(A),{css:b.toCss(u,h,p),rgba:A}},m.opacity=E,m.multiplyOpacity=function(R,A){return c=255&R.rgba,E(R,c*A/255)},m.toColorRGB=function(R){return[R.rgba>>24&255,R.rgba>>16&255,R.rgba>>8&255]}})(w||(a.color=w={})),(function(m){let E,R;try{const A=document.createElement("canvas");A.width=1,A.height=1;const L=A.getContext("2d",{willReadFrequently:!0});L&&(E=L,E.globalCompositeOperation="copy",R=E.createLinearGradient(0,0,1,1))}catch{}m.toColor=function(A){if(A.match(/#[\da-f]{3,8}/i))switch(A.length){case 4:return u=parseInt(A.slice(1,2).repeat(2),16),h=parseInt(A.slice(2,3).repeat(2),16),p=parseInt(A.slice(3,4).repeat(2),16),b.toColor(u,h,p);case 5:return u=parseInt(A.slice(1,2).repeat(2),16),h=parseInt(A.slice(2,3).repeat(2),16),p=parseInt(A.slice(3,4).repeat(2),16),c=parseInt(A.slice(4,5).repeat(2),16),b.toColor(u,h,p,c);case 7:return{css:A,rgba:(parseInt(A.slice(1),16)<<8|255)>>>0};case 9:return{css:A,rgba:parseInt(A.slice(1),16)>>>0}}const L=A.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(L)return u=parseInt(L[1]),h=parseInt(L[2]),p=parseInt(L[3]),c=Math.round(255*(L[5]===void 0?1:parseFloat(L[5]))),b.toColor(u,h,p,c);if(!E||!R)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=R,E.fillStyle=A,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[u,h,p,c]=E.getImageData(0,0,1,1).data,c!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:b.toRgba(u,h,p,c),css:A}}})(k||(a.css=k={})),(function(m){function E(R,A,L){const T=R/255,z=A/255,H=L/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))+.0722*(H<=.03928?H/12.92:Math.pow((H+.055)/1.055,2.4))}m.relativeLuminance=function(R){return E(R>>16&255,R>>8&255,255&R)},m.relativeLuminance2=E})(x||(a.rgb=x={})),(function(m){function E(A,L,T){const z=A>>24&255,H=A>>16&255,q=A>>8&255;let V=L>>24&255,I=L>>16&255,G=L>>8&255,K=d(x.relativeLuminance2(V,I,G),x.relativeLuminance2(z,H,q));for(;K<T&&(V>0||I>0||G>0);)V-=Math.max(0,Math.ceil(.1*V)),I-=Math.max(0,Math.ceil(.1*I)),G-=Math.max(0,Math.ceil(.1*G)),K=d(x.relativeLuminance2(V,I,G),x.relativeLuminance2(z,H,q));return(V<<24|I<<16|G<<8|255)>>>0}function R(A,L,T){const z=A>>24&255,H=A>>16&255,q=A>>8&255;let V=L>>24&255,I=L>>16&255,G=L>>8&255,K=d(x.relativeLuminance2(V,I,G),x.relativeLuminance2(z,H,q));for(;K<T&&(V<255||I<255||G<255);)V=Math.min(255,V+Math.ceil(.1*(255-V))),I=Math.min(255,I+Math.ceil(.1*(255-I))),G=Math.min(255,G+Math.ceil(.1*(255-G))),K=d(x.relativeLuminance2(V,I,G),x.relativeLuminance2(z,H,q));return(V<<24|I<<16|G<<8|255)>>>0}m.blend=function(A,L){if(c=(255&L)/255,c===1)return L;const T=L>>24&255,z=L>>16&255,H=L>>8&255,q=A>>24&255,V=A>>16&255,I=A>>8&255;return u=q+Math.round((T-q)*c),h=V+Math.round((z-V)*c),p=I+Math.round((H-I)*c),b.toRgba(u,h,p)},m.ensureContrastRatio=function(A,L,T){const z=x.relativeLuminance(A>>8),H=x.relativeLuminance(L>>8);if(d(z,H)<T){if(H<z){const I=E(A,L,T),G=d(z,x.relativeLuminance(I>>8));if(G<T){const K=R(A,L,T);return G>d(z,x.relativeLuminance(K>>8))?I:K}return I}const q=R(A,L,T),V=d(z,x.relativeLuminance(q>>8));if(V<T){const I=E(A,L,T);return V>d(z,x.relativeLuminance(I>>8))?q:I}return q}},m.reduceLuminance=E,m.increaseLuminance=R,m.toChannels=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]}})(v||(a.rgba=v={})),a.toPaddedHex=_,a.contrastRatio=d},8969:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=u(844),p=u(2585),c=u(4348),b=u(7866),w=u(744),k=u(7302),x=u(6975),v=u(8460),_=u(1753),d=u(1480),m=u(7994),E=u(9282),R=u(5435),A=u(5981),L=u(2660);let T=!1;class z extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((q=>{var V;(V=this._onScrollApi)==null||V.fire(q.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(q){for(const V in q)this.optionsService.options[V]=q[V]}constructor(q){super(),this._windowsWrappingHeuristics=this.register(new h.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new c.InstantiationService,this.optionsService=this.register(new k.OptionsService(q)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.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(d.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(m.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(L.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new R.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.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((V=>{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((V=>{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 A.WriteBuffer(((V,I)=>this._inputHandler.parse(V,I)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(q,V){this._writeBuffer.write(q,V)}writeSync(q,V){this._logService.logLevel<=p.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(q,V)}input(q,V=!0){this.coreService.triggerDataEvent(q,V)}resize(q,V){isNaN(q)||isNaN(V)||(q=Math.max(q,w.MINIMUM_COLS),V=Math.max(V,w.MINIMUM_ROWS),this._bufferService.resize(q,V))}scroll(q,V=!1){this._bufferService.scroll(q,V)}scrollLines(q,V,I){this._bufferService.scrollLines(q,V,I)}scrollPages(q){this.scrollLines(q*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(q){const V=q-this._bufferService.buffer.ydisp;V!==0&&this.scrollLines(V)}registerEscHandler(q,V){return this._inputHandler.registerEscHandler(q,V)}registerDcsHandler(q,V){return this._inputHandler.registerDcsHandler(q,V)}registerCsiHandler(q,V){return this._inputHandler.registerCsiHandler(q,V)}registerOscHandler(q,V){return this._inputHandler.registerOscHandler(q,V)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let q=!1;const V=this.optionsService.rawOptions.windowsPty;V&&V.buildNumber!==void 0&&V.buildNumber!==void 0?q=V.backend==="conpty"&&V.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(q=!0),q?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const q=[];q.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),q.push(this.registerCsiHandler({final:"H"},(()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const V of q)V.dispose()}))}}}a.CoreTerminal=z},8460:(g,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===u)return void this._listeners.splice(h,1)}}})),this._event}fire(u,h){const p=[];for(let c=0;c<this._listeners.length;c++)p.push(this._listeners[c]);for(let c=0;c<p.length;c++)p[c].call(void 0,u,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,h){return u((p=>h.fire(p)))},a.runAndSubscribe=function(u,h){return h(void 0),u((p=>h(p)))}},5435:function(g,a,u){var h=this&&this.__decorate||function(ee,O,M,B){var P,N=arguments.length,ie=N<3?O:B===null?B=Object.getOwnPropertyDescriptor(O,M):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(ee,O,M,B);else for(var fe=ee.length-1;fe>=0;fe--)(P=ee[fe])&&(ie=(N<3?P(ie):N>3?P(O,M,ie):P(O,M))||ie);return N>3&&ie&&Object.defineProperty(O,M,ie),ie},p=this&&this.__param||function(ee,O){return function(M,B){O(M,B,ee)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const c=u(2584),b=u(7116),w=u(2015),k=u(844),x=u(482),v=u(8437),_=u(8460),d=u(643),m=u(511),E=u(3734),R=u(2585),A=u(1480),L=u(6242),T=u(6351),z=u(5941),H={"(":0,")":1,"*":2,"+":3,"-":1,".":2},q=131072;function V(ee,O){if(ee>24)return O.setWinLines||!1;switch(ee){case 1:return!!O.restoreWin;case 2:return!!O.minimizeWin;case 3:return!!O.setWinPosition;case 4:return!!O.setWinSizePixels;case 5:return!!O.raiseWin;case 6:return!!O.lowerWin;case 7:return!!O.refreshWin;case 8:return!!O.setWinSizeChars;case 9:return!!O.maximizeWin;case 10:return!!O.fullscreenWin;case 11:return!!O.getWinState;case 13:return!!O.getWinPosition;case 14:return!!O.getWinSizePixels;case 15:return!!O.getScreenSizePixels;case 16:return!!O.getCellSizePixels;case 18:return!!O.getWinSizeChars;case 19:return!!O.getScreenSizeChars;case 20:return!!O.getIconTitle;case 21:return!!O.getWinTitle;case 22:return!!O.pushTitle;case 23:return!!O.popTitle;case 24:return!!O.setWinLines}return!1}var I;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(I||(a.WindowsOptionsReportType=I={}));let G=0;class K extends k.Disposable{getAttrData(){return this._curAttrData}constructor(O,M,B,P,N,ie,fe,de,X=new w.EscapeSequenceParser){super(),this._bufferService=O,this._charsetService=M,this._coreService=B,this._logService=P,this._optionsService=N,this._oscLinkService=ie,this._coreMouseService=fe,this._unicodeService=de,this._parser=X,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new m.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.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 Y(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((U=>this._activeBuffer=U.activeBuffer))),this._parser.setCsiHandlerFallback(((U,le)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(U),params:le.toArray()})})),this._parser.setEscHandlerFallback((U=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(U)})})),this._parser.setExecuteHandlerFallback((U=>{this._logService.debug("Unknown EXECUTE code: ",{code:U})})),this._parser.setOscHandlerFallback(((U,le,Q)=>{this._logService.debug("Unknown OSC code: ",{identifier:U,action:le,data:Q})})),this._parser.setDcsHandlerFallback(((U,le,Q)=>{le==="HOOK"&&(Q=Q.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(U),action:le,payload:Q})})),this._parser.setPrintHandler(((U,le,Q)=>this.print(U,le,Q))),this._parser.registerCsiHandler({final:"@"},(U=>this.insertChars(U))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(U=>this.scrollLeft(U))),this._parser.registerCsiHandler({final:"A"},(U=>this.cursorUp(U))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(U=>this.scrollRight(U))),this._parser.registerCsiHandler({final:"B"},(U=>this.cursorDown(U))),this._parser.registerCsiHandler({final:"C"},(U=>this.cursorForward(U))),this._parser.registerCsiHandler({final:"D"},(U=>this.cursorBackward(U))),this._parser.registerCsiHandler({final:"E"},(U=>this.cursorNextLine(U))),this._parser.registerCsiHandler({final:"F"},(U=>this.cursorPrecedingLine(U))),this._parser.registerCsiHandler({final:"G"},(U=>this.cursorCharAbsolute(U))),this._parser.registerCsiHandler({final:"H"},(U=>this.cursorPosition(U))),this._parser.registerCsiHandler({final:"I"},(U=>this.cursorForwardTab(U))),this._parser.registerCsiHandler({final:"J"},(U=>this.eraseInDisplay(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(U=>this.eraseInDisplay(U,!0))),this._parser.registerCsiHandler({final:"K"},(U=>this.eraseInLine(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(U=>this.eraseInLine(U,!0))),this._parser.registerCsiHandler({final:"L"},(U=>this.insertLines(U))),this._parser.registerCsiHandler({final:"M"},(U=>this.deleteLines(U))),this._parser.registerCsiHandler({final:"P"},(U=>this.deleteChars(U))),this._parser.registerCsiHandler({final:"S"},(U=>this.scrollUp(U))),this._parser.registerCsiHandler({final:"T"},(U=>this.scrollDown(U))),this._parser.registerCsiHandler({final:"X"},(U=>this.eraseChars(U))),this._parser.registerCsiHandler({final:"Z"},(U=>this.cursorBackwardTab(U))),this._parser.registerCsiHandler({final:"`"},(U=>this.charPosAbsolute(U))),this._parser.registerCsiHandler({final:"a"},(U=>this.hPositionRelative(U))),this._parser.registerCsiHandler({final:"b"},(U=>this.repeatPrecedingCharacter(U))),this._parser.registerCsiHandler({final:"c"},(U=>this.sendDeviceAttributesPrimary(U))),this._parser.registerCsiHandler({prefix:">",final:"c"},(U=>this.sendDeviceAttributesSecondary(U))),this._parser.registerCsiHandler({final:"d"},(U=>this.linePosAbsolute(U))),this._parser.registerCsiHandler({final:"e"},(U=>this.vPositionRelative(U))),this._parser.registerCsiHandler({final:"f"},(U=>this.hVPosition(U))),this._parser.registerCsiHandler({final:"g"},(U=>this.tabClear(U))),this._parser.registerCsiHandler({final:"h"},(U=>this.setMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(U=>this.setModePrivate(U))),this._parser.registerCsiHandler({final:"l"},(U=>this.resetMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(U=>this.resetModePrivate(U))),this._parser.registerCsiHandler({final:"m"},(U=>this.charAttributes(U))),this._parser.registerCsiHandler({final:"n"},(U=>this.deviceStatus(U))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(U=>this.deviceStatusPrivate(U))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(U=>this.softReset(U))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(U=>this.setCursorStyle(U))),this._parser.registerCsiHandler({final:"r"},(U=>this.setScrollRegion(U))),this._parser.registerCsiHandler({final:"s"},(U=>this.saveCursor(U))),this._parser.registerCsiHandler({final:"t"},(U=>this.windowOptions(U))),this._parser.registerCsiHandler({final:"u"},(U=>this.restoreCursor(U))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(U=>this.insertColumns(U))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(U=>this.deleteColumns(U))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(U=>this.selectProtected(U))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(U=>this.requestMode(U,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(U=>this.requestMode(U,!1))),this._parser.setExecuteHandler(c.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(c.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(c.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(c.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(c.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(c.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(c.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(c.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(c.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new L.OscHandler((U=>(this.setTitle(U),this.setIconName(U),!0)))),this._parser.registerOscHandler(1,new L.OscHandler((U=>this.setIconName(U)))),this._parser.registerOscHandler(2,new L.OscHandler((U=>this.setTitle(U)))),this._parser.registerOscHandler(4,new L.OscHandler((U=>this.setOrReportIndexedColor(U)))),this._parser.registerOscHandler(8,new L.OscHandler((U=>this.setHyperlink(U)))),this._parser.registerOscHandler(10,new L.OscHandler((U=>this.setOrReportFgColor(U)))),this._parser.registerOscHandler(11,new L.OscHandler((U=>this.setOrReportBgColor(U)))),this._parser.registerOscHandler(12,new L.OscHandler((U=>this.setOrReportCursorColor(U)))),this._parser.registerOscHandler(104,new L.OscHandler((U=>this.restoreIndexedColor(U)))),this._parser.registerOscHandler(110,new L.OscHandler((U=>this.restoreFgColor(U)))),this._parser.registerOscHandler(111,new L.OscHandler((U=>this.restoreBgColor(U)))),this._parser.registerOscHandler(112,new L.OscHandler((U=>this.restoreCursorColor(U)))),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 U in b.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:U},(()=>this.selectCharset("("+U))),this._parser.registerEscHandler({intermediates:")",final:U},(()=>this.selectCharset(")"+U))),this._parser.registerEscHandler({intermediates:"*",final:U},(()=>this.selectCharset("*"+U))),this._parser.registerEscHandler({intermediates:"+",final:U},(()=>this.selectCharset("+"+U))),this._parser.registerEscHandler({intermediates:"-",final:U},(()=>this.selectCharset("-"+U))),this._parser.registerEscHandler({intermediates:".",final:U},(()=>this.selectCharset("."+U))),this._parser.registerEscHandler({intermediates:"/",final:U},(()=>this.selectCharset("/"+U)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((U=>(this._logService.error("Parsing error: ",U),U))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler(((U,le)=>this.requestStatusString(U,le))))}_preserveStack(O,M,B,P){this._parseStack.paused=!0,this._parseStack.cursorStartX=O,this._parseStack.cursorStartY=M,this._parseStack.decodedLength=B,this._parseStack.position=P}_logSlowResolvingAsync(O){this._logService.logLevel<=R.LogLevelEnum.WARN&&Promise.race([O,new Promise(((M,B)=>setTimeout((()=>B("#SLOW_TIMEOUT")),5e3)))]).catch((M=>{if(M!=="#SLOW_TIMEOUT")throw M;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(O,M){let B,P=this._activeBuffer.x,N=this._activeBuffer.y,ie=0;const fe=this._parseStack.paused;if(fe){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,M))return this._logSlowResolvingAsync(B),B;P=this._parseStack.cursorStartX,N=this._parseStack.cursorStartY,this._parseStack.paused=!1,O.length>q&&(ie=this._parseStack.position+q)}if(this._logService.logLevel<=R.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof O=="string"?` "${O}"`:` "${Array.prototype.map.call(O,(U=>String.fromCharCode(U))).join("")}"`),typeof O=="string"?O.split("").map((U=>U.charCodeAt(0))):O),this._parseBuffer.length<O.length&&this._parseBuffer.length<q&&(this._parseBuffer=new Uint32Array(Math.min(O.length,q))),fe||this._dirtyRowTracker.clearRange(),O.length>q)for(let U=ie;U<O.length;U+=q){const le=U+q<O.length?U+q:O.length,Q=typeof O=="string"?this._stringDecoder.decode(O.substring(U,le),this._parseBuffer):this._utf8Decoder.decode(O.subarray(U,le),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,Q))return this._preserveStack(P,N,Q,U),this._logSlowResolvingAsync(B),B}else if(!fe){const U=typeof O=="string"?this._stringDecoder.decode(O,this._parseBuffer):this._utf8Decoder.decode(O,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,U))return this._preserveStack(P,N,U,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===P&&this._activeBuffer.y===N||this._onCursorMove.fire();const de=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),X=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);X<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(X,this._bufferService.rows-1),Math.min(de,this._bufferService.rows-1))}print(O,M,B){let P,N;const ie=this._charsetService.charset,fe=this._optionsService.rawOptions.screenReaderMode,de=this._bufferService.cols,X=this._coreService.decPrivateModes.wraparound,U=this._coreService.modes.insertMode,le=this._curAttrData;let Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&B-M>0&&Q.getWidth(this._activeBuffer.x-1)===2&&Q.setCellFromCodepoint(this._activeBuffer.x-1,0,1,le);let pe=this._parser.precedingJoinState;for(let _e=M;_e<B;++_e){if(P=O[_e],P<127&&ie){const Ge=ie[String.fromCharCode(P)];Ge&&(P=Ge.charCodeAt(0))}const Ae=this._unicodeService.charProperties(P,pe);N=A.UnicodeService.extractWidth(Ae);const ce=A.UnicodeService.extractShouldJoin(Ae),be=ce?A.UnicodeService.extractWidth(pe):0;if(pe=Ae,fe&&this._onA11yChar.fire((0,x.stringFromCodePoint)(P)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+N-be>de){if(X){const Ge=Q;let we=this._activeBuffer.x-be;for(this._activeBuffer.x=be,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),Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),be>0&&Q instanceof v.BufferLine&&Q.copyCellsFrom(Ge,we,0,be,!1);we<de;)Ge.setCellFromCodepoint(we++,0,1,le)}else if(this._activeBuffer.x=de-1,N===2)continue}if(ce&&this._activeBuffer.x){const Ge=Q.getWidth(this._activeBuffer.x-1)?1:2;Q.addCodepointToCell(this._activeBuffer.x-Ge,P,N);for(let we=N-be;--we>=0;)Q.setCellFromCodepoint(this._activeBuffer.x++,0,0,le)}else if(U&&(Q.insertCells(this._activeBuffer.x,N-be,this._activeBuffer.getNullCell(le)),Q.getWidth(de-1)===2&&Q.setCellFromCodepoint(de-1,d.NULL_CELL_CODE,d.NULL_CELL_WIDTH,le)),Q.setCellFromCodepoint(this._activeBuffer.x++,P,N,le),N>0)for(;--N;)Q.setCellFromCodepoint(this._activeBuffer.x++,0,0,le)}this._parser.precedingJoinState=pe,this._activeBuffer.x<de&&B-M>0&&Q.getWidth(this._activeBuffer.x)===0&&!Q.hasContent(this._activeBuffer.x)&&Q.setCellFromCodepoint(this._activeBuffer.x,0,1,le),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(O,M){return O.final!=="t"||O.prefix||O.intermediates?this._parser.registerCsiHandler(O,M):this._parser.registerCsiHandler(O,(B=>!V(B.params[0],this._optionsService.rawOptions.windowOptions)||M(B)))}registerDcsHandler(O,M){return this._parser.registerDcsHandler(O,new T.DcsHandler(M))}registerEscHandler(O,M){return this._parser.registerEscHandler(O,M)}registerOscHandler(O,M){return this._parser.registerOscHandler(O,new L.OscHandler(M))}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 O;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&&((O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&O.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);M.hasWidth(this._activeBuffer.x)&&!M.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const O=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-O),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(O=this._bufferService.cols-1){this._activeBuffer.x=Math.min(O,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(O,M){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=O,this._activeBuffer.y=this._activeBuffer.scrollTop+M):(this._activeBuffer.x=O,this._activeBuffer.y=M),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(O,M){this._restrictCursor(),this._setCursor(this._activeBuffer.x+O,this._activeBuffer.y+M)}cursorUp(O){const M=this._activeBuffer.y-this._activeBuffer.scrollTop;return M>=0?this._moveCursor(0,-Math.min(M,O.params[0]||1)):this._moveCursor(0,-(O.params[0]||1)),!0}cursorDown(O){const M=this._activeBuffer.scrollBottom-this._activeBuffer.y;return M>=0?this._moveCursor(0,Math.min(M,O.params[0]||1)):this._moveCursor(0,O.params[0]||1),!0}cursorForward(O){return this._moveCursor(O.params[0]||1,0),!0}cursorBackward(O){return this._moveCursor(-(O.params[0]||1),0),!0}cursorNextLine(O){return this.cursorDown(O),this._activeBuffer.x=0,!0}cursorPrecedingLine(O){return this.cursorUp(O),this._activeBuffer.x=0,!0}cursorCharAbsolute(O){return this._setCursor((O.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(O){return this._setCursor(O.length>=2?(O.params[1]||1)-1:0,(O.params[0]||1)-1),!0}charPosAbsolute(O){return this._setCursor((O.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(O){return this._moveCursor(O.params[0]||1,0),!0}linePosAbsolute(O){return this._setCursor(this._activeBuffer.x,(O.params[0]||1)-1),!0}vPositionRelative(O){return this._moveCursor(0,O.params[0]||1),!0}hVPosition(O){return this.cursorPosition(O),!0}tabClear(O){const M=O.params[0];return M===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:M===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(O){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=O.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(O){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=O.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(O){const M=O.params[0];return M===1&&(this._curAttrData.bg|=536870912),M!==2&&M!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(O,M,B,P=!1,N=!1){const ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);ie.replaceCells(M,B,this._activeBuffer.getNullCell(this._eraseAttrData()),N),P&&(ie.isWrapped=!1)}_resetBufferLine(O,M=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),M),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+O),B.isWrapped=!1)}eraseInDisplay(O,M=!1){let B;switch(this._restrictCursor(this._bufferService.cols),O.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);B<this._bufferService.rows;B++)this._resetBufferLine(B,M);this._dirtyRowTracker.markDirty(B);break;case 1:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B,0,this._activeBuffer.x+1,!0,M),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,M);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,M);this._dirtyRowTracker.markDirty(0);break;case 3:const P=this._activeBuffer.lines.length-this._bufferService.rows;P>0&&(this._activeBuffer.lines.trimStart(P),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-P,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-P,0),this._onScroll.fire(0))}return!0}eraseInLine(O,M=!1){switch(this._restrictCursor(this._bufferService.cols),O.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,M);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,M)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(O){this._restrictCursor();let M=O.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y,P=this._bufferService.rows-1-this._activeBuffer.scrollBottom,N=this._bufferService.rows-1+this._activeBuffer.ybase-P+1;for(;M--;)this._activeBuffer.lines.splice(N-1,1),this._activeBuffer.lines.splice(B,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(O){this._restrictCursor();let M=O.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y;let P;for(P=this._bufferService.rows-1-this._activeBuffer.scrollBottom,P=this._bufferService.rows-1+this._activeBuffer.ybase-P;M--;)this._activeBuffer.lines.splice(B,1),this._activeBuffer.lines.splice(P,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(O){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.insertCells(this._activeBuffer.x,O.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(O){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.deleteCells(this._activeBuffer.x,O.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(O){let M=O.params[0]||1;for(;M--;)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(O){let M=O.params[0]||1;for(;M--;)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(v.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=O.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);P.deleteCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=O.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);P.insertCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=O.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);P.insertCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=O.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);P.deleteCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),P.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(O){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(O.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(O){const M=this._parser.precedingJoinState;if(!M)return!0;const B=O.params[0]||1,P=A.UnicodeService.extractWidth(M),N=this._activeBuffer.x-P,ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(N),fe=new Uint32Array(ie.length*B);let de=0;for(let U=0;U<ie.length;){const le=ie.codePointAt(U)||0;fe[de++]=le,U+=le>65535?2:1}let X=de;for(let U=1;U<B;++U)fe.copyWithin(X,0,de),X+=de;return this.print(fe,0,X),!0}sendDeviceAttributesPrimary(O){return O.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(c.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(c.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(O){return O.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(c.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(c.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(O.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(c.C0.ESC+"[>83;40003;0c")),!0}_is(O){return(this._optionsService.rawOptions.termName+"").indexOf(O)===0}setMode(O){for(let M=0;M<O.length;M++)switch(O.params[M]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(O){for(let M=0;M<O.length;M++)switch(O.params[M]){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(O){for(let M=0;M<O.length;M++)switch(O.params[M]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(O){for(let M=0;M<O.length;M++)switch(O.params[M]){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(),O.params[M]===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(O,M){const B=this._coreService.decPrivateModes,{activeProtocol:P,activeEncoding:N}=this._coreMouseService,ie=this._coreService,{buffers:fe,cols:de}=this._bufferService,{active:X,alt:U}=fe,le=this._optionsService.rawOptions,Q=ce=>ce?1:2,pe=O.params[0];return _e=pe,Ae=M?pe===2?4:pe===4?Q(ie.modes.insertMode):pe===12?3:pe===20?Q(le.convertEol):0:pe===1?Q(B.applicationCursorKeys):pe===3?le.windowOptions.setWinLines?de===80?2:de===132?1:0:0:pe===6?Q(B.origin):pe===7?Q(B.wraparound):pe===8?3:pe===9?Q(P==="X10"):pe===12?Q(le.cursorBlink):pe===25?Q(!ie.isCursorHidden):pe===45?Q(B.reverseWraparound):pe===66?Q(B.applicationKeypad):pe===67?4:pe===1e3?Q(P==="VT200"):pe===1002?Q(P==="DRAG"):pe===1003?Q(P==="ANY"):pe===1004?Q(B.sendFocus):pe===1005?4:pe===1006?Q(N==="SGR"):pe===1015?4:pe===1016?Q(N==="SGR_PIXELS"):pe===1048?1:pe===47||pe===1047||pe===1049?Q(X===U):pe===2004?Q(B.bracketedPasteMode):0,ie.triggerDataEvent(`${c.C0.ESC}[${M?"":"?"}${_e};${Ae}$y`),!0;var _e,Ae}_updateAttrColor(O,M,B,P,N){return M===2?(O|=50331648,O&=-16777216,O|=E.AttributeData.fromColorRGB([B,P,N])):M===5&&(O&=-50331904,O|=33554432|255&B),O}_extractColor(O,M,B){const P=[0,0,-1,0,0,0];let N=0,ie=0;do{if(P[ie+N]=O.params[M+ie],O.hasSubParams(M+ie)){const fe=O.getSubParams(M+ie);let de=0;do P[1]===5&&(N=1),P[ie+de+1+N]=fe[de];while(++de<fe.length&&de+ie+1+N<P.length);break}if(P[1]===5&&ie+N>=2||P[1]===2&&ie+N>=5)break;P[1]&&(N=1)}while(++ie+M<O.length&&ie+N<P.length);for(let fe=2;fe<P.length;++fe)P[fe]===-1&&(P[fe]=0);switch(P[0]){case 38:B.fg=this._updateAttrColor(B.fg,P[1],P[3],P[4],P[5]);break;case 48:B.bg=this._updateAttrColor(B.bg,P[1],P[3],P[4],P[5]);break;case 58:B.extended=B.extended.clone(),B.extended.underlineColor=this._updateAttrColor(B.extended.underlineColor,P[1],P[3],P[4],P[5])}return ie}_processUnderline(O,M){M.extended=M.extended.clone(),(!~O||O>5)&&(O=1),M.extended.underlineStyle=O,M.fg|=268435456,O===0&&(M.fg&=-268435457),M.updateExtended()}_processSGR0(O){O.fg=v.DEFAULT_ATTR_DATA.fg,O.bg=v.DEFAULT_ATTR_DATA.bg,O.extended=O.extended.clone(),O.extended.underlineStyle=0,O.extended.underlineColor&=-67108864,O.updateExtended()}charAttributes(O){if(O.length===1&&O.params[0]===0)return this._processSGR0(this._curAttrData),!0;const M=O.length;let B;const P=this._curAttrData;for(let N=0;N<M;N++)B=O.params[N],B>=30&&B<=37?(P.fg&=-50331904,P.fg|=16777216|B-30):B>=40&&B<=47?(P.bg&=-50331904,P.bg|=16777216|B-40):B>=90&&B<=97?(P.fg&=-50331904,P.fg|=16777224|B-90):B>=100&&B<=107?(P.bg&=-50331904,P.bg|=16777224|B-100):B===0?this._processSGR0(P):B===1?P.fg|=134217728:B===3?P.bg|=67108864:B===4?(P.fg|=268435456,this._processUnderline(O.hasSubParams(N)?O.getSubParams(N)[0]:1,P)):B===5?P.fg|=536870912:B===7?P.fg|=67108864:B===8?P.fg|=1073741824:B===9?P.fg|=2147483648:B===2?P.bg|=134217728:B===21?this._processUnderline(2,P):B===22?(P.fg&=-134217729,P.bg&=-134217729):B===23?P.bg&=-67108865:B===24?(P.fg&=-268435457,this._processUnderline(0,P)):B===25?P.fg&=-536870913:B===27?P.fg&=-67108865:B===28?P.fg&=-1073741825:B===29?P.fg&=2147483647:B===39?(P.fg&=-67108864,P.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):B===49?(P.bg&=-67108864,P.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?N+=this._extractColor(O,N,P):B===53?P.bg|=1073741824:B===55?P.bg&=-1073741825:B===59?(P.extended=P.extended.clone(),P.extended.underlineColor=-1,P.updateExtended()):B===100?(P.fg&=-67108864,P.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,P.bg&=-67108864,P.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus(O){switch(O.params[0]){case 5:this._coreService.triggerDataEvent(`${c.C0.ESC}[0n`);break;case 6:const M=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[${M};${B}R`)}return!0}deviceStatusPrivate(O){if(O.params[0]===6){const M=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[?${M};${B}R`)}return!0}softReset(O){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.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(O){const M=O.params[0]||1;switch(M){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 B=M%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion(O){const M=O.params[0]||1;let B;return(O.length<2||(B=O.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>M&&(this._activeBuffer.scrollTop=M-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions(O){if(!V(O.params[0],this._optionsService.rawOptions.windowOptions))return!0;const M=O.length>1?O.params[1]:0;switch(O.params[0]){case 14:M!==2&&this._onRequestWindowsOptionsReport.fire(I.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(I.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${c.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:M!==0&&M!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),M!==0&&M!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:M!==0&&M!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),M!==0&&M!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(O){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(O){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(O){return this._windowTitle=O,this._onTitleChange.fire(O),!0}setIconName(O){return this._iconName=O,!0}setOrReportIndexedColor(O){const M=[],B=O.split(";");for(;B.length>1;){const P=B.shift(),N=B.shift();if(/^\d+$/.exec(P)){const ie=parseInt(P);if(Z(ie))if(N==="?")M.push({type:0,index:ie});else{const fe=(0,z.parseColor)(N);fe&&M.push({type:1,index:ie,color:fe})}}}return M.length&&this._onColor.fire(M),!0}setHyperlink(O){const M=O.split(";");return!(M.length<2)&&(M[1]?this._createHyperlink(M[0],M[1]):!M[0]&&this._finishHyperlink())}_createHyperlink(O,M){this._getCurrentLinkId()&&this._finishHyperlink();const B=O.split(":");let P;const N=B.findIndex((ie=>ie.startsWith("id=")));return N!==-1&&(P=B[N].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:P,uri:M}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(O,M){const B=O.split(";");for(let P=0;P<B.length&&!(M>=this._specialColors.length);++P,++M)if(B[P]==="?")this._onColor.fire([{type:0,index:this._specialColors[M]}]);else{const N=(0,z.parseColor)(B[P]);N&&this._onColor.fire([{type:1,index:this._specialColors[M],color:N}])}return!0}setOrReportFgColor(O){return this._setOrReportSpecialColor(O,0)}setOrReportBgColor(O){return this._setOrReportSpecialColor(O,1)}setOrReportCursorColor(O){return this._setOrReportSpecialColor(O,2)}restoreIndexedColor(O){if(!O)return this._onColor.fire([{type:2}]),!0;const M=[],B=O.split(";");for(let P=0;P<B.length;++P)if(/^\d+$/.exec(B[P])){const N=parseInt(B[P]);Z(N)&&M.push({type:2,index:N})}return M.length&&this._onColor.fire(M),!0}restoreFgColor(O){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(O){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(O){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(O){return O.length!==2?(this.selectDefaultCharset(),!0):(O[0]==="/"||this._charsetService.setgCharset(H[O[0]],b.CHARSETS[O[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 O=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,O,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=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(O){return this._charsetService.setgLevel(O),!0}screenAlignmentPattern(){const O=new m.CellData;O.content=4194373,O.fg=this._curAttrData.fg,O.bg=this._curAttrData.bg,this._setCursor(0,0);for(let M=0;M<this._bufferService.rows;++M){const B=this._activeBuffer.ybase+this._activeBuffer.y+M,P=this._activeBuffer.lines.get(B);P&&(P.fill(O),P.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(O,M){const B=this._bufferService.buffer,P=this._optionsService.rawOptions;return(N=>(this._coreService.triggerDataEvent(`${c.C0.ESC}${N}${c.C0.ESC}\\`),!0))(O==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:O==='"p'?'P1$r61;1"p':O==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:O==="m"?"P1$r0m":O===" q"?`P1$r${{block:2,underline:4,bar:6}[P.cursorStyle]-(P.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(O,M){this._dirtyRowTracker.markRangeDirty(O,M)}}a.InputHandler=K;let Y=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){ee<this.start?this.start=ee:ee>this.end&&(this.end=ee)}markRangeDirty(ee,O){ee>O&&(G=ee,ee=O,O=G),ee<this.start&&(this.start=ee),O>this.end&&(this.end=O)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(ee){return 0<=ee&&ee<256}Y=h([p(0,R.IBufferService)],Y)},844:(g,a)=>{function u(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=u,a.getDisposeArrayDisposable=function(h){return{dispose:()=>u(h)}}},1505:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(p,c,b){this._data[p]||(this._data[p]={}),this._data[p][c]=b}get(p,c){return this._data[p]?this._data[p][c]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(h,p,c,b,w){this._data.get(h,p)||this._data.set(h,p,new u),this._data.get(h,p).set(c,b,w)}get(h,p,c,b){var w;return(w=this._data.get(h,p))==null?void 0:w.get(c,b)}clear(){this._data.clear()}}},6114:(g,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 u=a.isNode?"node":navigator.userAgent,h=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const p=u.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(u)},6106:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let u=0;a.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(u=this._search(this._getKey(h)),this._array.splice(u,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const p=this._getKey(h);if(p===void 0||(u=this._search(p),u===-1)||this._getKey(this._array[u])!==p)return!1;do if(this._array[u]===h)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===p);return!1}*getKeyIterator(h){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===h)}forEachByKey(h,p){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do p(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===h)}values(){return[...this._array].values()}_search(h){let p=0,c=this._array.length-1;for(;c>=p;){let b=p+c>>1;const w=this._getKey(this._array[b]);if(w>h)c=b-1;else{if(!(w<h)){for(;b>0&&this._getKey(this._array[b-1])===h;)b--;return b}p=b+1}}return p}}},7226:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=u(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let k=0,x=0,v=w.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),_=w.timeRemaining(),1.5*x>_)return v-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-k))}ms`),void this._start();v=_}this.clear()}}class c extends p{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const k=Date.now()+w;return{timeRemaining:()=>Math.max(0,k-Date.now())}}}a.PriorityTaskQueue=c,a.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(b){return requestIdleCallback(b)}_cancelCallback(b){cancelIdleCallback(b)}}:c,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(b){this._queue.clear(),this._queue.enqueue(b)}flush(){this._queue.flush()}}},9282:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const h=u(643);a.updateWindowsModeWrappedState=function(p){const c=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),b=c==null?void 0:c.get(p.cols-1),w=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);w&&b&&(w.isWrapped=b[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&b[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(c){return[c>>>16&255,c>>>8&255,255&c]}static fromColorRGB(c){return(255&c[0])<<16|(255&c[1])<<8|255&c[2]}clone(){const c=new u;return c.fg=this.fg,c.bg=this.bg,c.extended=this.extended.clone(),c}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=u;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(c){this._ext=c}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(c){this._ext&=-469762049,this._ext|=c<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(c){this._ext&=-67108864,this._ext|=67108863&c}get urlId(){return this._urlId}set urlId(c){this._urlId=c}get underlineVariantOffset(){const c=(3758096384&this._ext)>>29;return c<0?4294967288^c:c}set underlineVariantOffset(c){this._ext&=536870911,this._ext|=c<<29&3758096384}constructor(c=0,b=0){this._ext=0,this._urlId=0,this._ext=c,this._urlId=b}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=h},9092:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const h=u(6349),p=u(7226),c=u(3734),b=u(8437),w=u(4634),k=u(511),x=u(643),v=u(4863),_=u(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(d,m,E){this._hasScrollback=d,this._optionsService=m,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(d){return d?(this._nullCell.fg=d.fg,this._nullCell.bg=d.bg,this._nullCell.extended=d.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new c.ExtendedAttrs),this._nullCell}getWhitespaceCell(d){return d?(this._whitespaceCell.fg=d.fg,this._whitespaceCell.bg=d.bg,this._whitespaceCell.extended=d.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new c.ExtendedAttrs),this._whitespaceCell}getBlankLine(d,m){return new b.BufferLine(this._bufferService.cols,this.getNullCell(d),m)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const d=this.ybase+this.y-this.ydisp;return d>=0&&d<this._rows}_getCorrectBufferLength(d){if(!this._hasScrollback)return d;const m=d+this._optionsService.rawOptions.scrollback;return m>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:m}fillViewportRows(d){if(this.lines.length===0){d===void 0&&(d=b.DEFAULT_ATTR_DATA);let m=this._rows;for(;m--;)this.lines.push(this.getBlankLine(d))}}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(d,m){const E=this.getNullCell(b.DEFAULT_ATTR_DATA);let R=0;const A=this._getCorrectBufferLength(m);if(A>this.lines.maxLength&&(this.lines.maxLength=A),this.lines.length>0){if(this._cols<d)for(let T=0;T<this.lines.length;T++)R+=+this.lines.get(T).resize(d,E);let L=0;if(this._rows<m)for(let T=this._rows;T<m;T++)this.lines.length<m+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(d,E)):this.ybase>0&&this.lines.length<=this.ybase+this.y+L+1?(this.ybase--,L++,this.ydisp>0&&this.ydisp--):this.lines.push(new b.BufferLine(d,E)));else for(let T=this._rows;T>m;T--)this.lines.length>m+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(A<this.lines.maxLength){const T=this.lines.length-A;T>0&&(this.lines.trimStart(T),this.ybase=Math.max(this.ybase-T,0),this.ydisp=Math.max(this.ydisp-T,0),this.savedY=Math.max(this.savedY-T,0)),this.lines.maxLength=A}this.x=Math.min(this.x,d-1),this.y=Math.min(this.y,m-1),L&&(this.y+=L),this.savedX=Math.min(this.savedX,d-1),this.scrollTop=0}if(this.scrollBottom=m-1,this._isReflowEnabled&&(this._reflow(d,m),this._cols>d))for(let L=0;L<this.lines.length;L++)R+=+this.lines.get(L).resize(d,E);this._cols=d,this._rows=m,this._memoryCleanupQueue.clear(),R>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let d=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,d=!1);let m=0;for(;this._memoryCleanupPosition<this.lines.length;)if(m+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),m>100)return!0;return d}get _isReflowEnabled(){const d=this._optionsService.rawOptions.windowsPty;return d&&d.buildNumber?this._hasScrollback&&d.backend==="conpty"&&d.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(d,m){this._cols!==d&&(d>this._cols?this._reflowLarger(d,m):this._reflowSmaller(d,m))}_reflowLarger(d,m){const E=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,d,this.ybase+this.y,this.getNullCell(b.DEFAULT_ATTR_DATA));if(E.length>0){const R=(0,w.reflowLargerCreateNewLayout)(this.lines,E);(0,w.reflowLargerApplyNewLayout)(this.lines,R.layout),this._reflowLargerAdjustViewport(d,m,R.countRemoved)}}_reflowLargerAdjustViewport(d,m,E){const R=this.getNullCell(b.DEFAULT_ATTR_DATA);let A=E;for(;A-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<m&&this.lines.push(new b.BufferLine(d,R))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-E,0)}_reflowSmaller(d,m){const E=this.getNullCell(b.DEFAULT_ATTR_DATA),R=[];let A=0;for(let L=this.lines.length-1;L>=0;L--){let T=this.lines.get(L);if(!T||!T.isWrapped&&T.getTrimmedLength()<=d)continue;const z=[T];for(;T.isWrapped&&L>0;)T=this.lines.get(--L),z.unshift(T);const H=this.ybase+this.y;if(H>=L&&H<L+z.length)continue;const q=z[z.length-1].getTrimmedLength(),V=(0,w.reflowSmallerGetNewLineLengths)(z,this._cols,d),I=V.length-z.length;let G;G=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+I):Math.max(0,this.lines.length-this.lines.maxLength+I);const K=[];for(let B=0;B<I;B++){const P=this.getBlankLine(b.DEFAULT_ATTR_DATA,!0);K.push(P)}K.length>0&&(R.push({start:L+z.length+A,newLines:K}),A+=K.length),z.push(...K);let Y=V.length-1,Z=V[Y];Z===0&&(Y--,Z=V[Y]);let ee=z.length-I-1,O=q;for(;ee>=0;){const B=Math.min(O,Z);if(z[Y]===void 0)break;if(z[Y].copyCellsFrom(z[ee],O-B,Z-B,B,!0),Z-=B,Z===0&&(Y--,Z=V[Y]),O-=B,O===0){ee--;const P=Math.max(ee,0);O=(0,w.getWrappedLineTrimmedLength)(z,P,this._cols)}}for(let B=0;B<z.length;B++)V[B]<d&&z[B].setCell(V[B],E);let M=I-G;for(;M-- >0;)this.ybase===0?this.y<m-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+A)-m&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+I,this.ybase+m-1)}if(R.length>0){const L=[],T=[];for(let Y=0;Y<this.lines.length;Y++)T.push(this.lines.get(Y));const z=this.lines.length;let H=z-1,q=0,V=R[q];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+A);let I=0;for(let Y=Math.min(this.lines.maxLength-1,z+A-1);Y>=0;Y--)if(V&&V.start>H+I){for(let Z=V.newLines.length-1;Z>=0;Z--)this.lines.set(Y--,V.newLines[Z]);Y++,L.push({index:H+1,amount:V.newLines.length}),I+=V.newLines.length,V=R[++q]}else this.lines.set(Y,T[H--]);let G=0;for(let Y=L.length-1;Y>=0;Y--)L[Y].index+=G,this.lines.onInsertEmitter.fire(L[Y]),G+=L[Y].amount;const K=Math.max(0,z+A-this.lines.maxLength);K>0&&this.lines.onTrimEmitter.fire(K)}}translateBufferLineToString(d,m,E=0,R){const A=this.lines.get(d);return A?A.translateToString(m,E,R):""}getWrappedRangeForLine(d){let m=d,E=d;for(;m>0&&this.lines.get(m).isWrapped;)m--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:m,last:E}}setupTabStops(d){for(d!=null?this.tabs[d]||(d=this.prevStop(d)):(this.tabs={},d=0);d<this._cols;d+=this._optionsService.rawOptions.tabStopWidth)this.tabs[d]=!0}prevStop(d){for(d==null&&(d=this.x);!this.tabs[--d]&&d>0;);return d>=this._cols?this._cols-1:d<0?0:d}nextStop(d){for(d==null&&(d=this.x);!this.tabs[++d]&&d<this._cols;);return d>=this._cols?this._cols-1:d<0?0:d}clearMarkers(d){this._isClearing=!0;for(let m=0;m<this.markers.length;m++)this.markers[m].line===d&&(this.markers[m].dispose(),this.markers.splice(m--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let d=0;d<this.markers.length;d++)this.markers[d].dispose(),this.markers.splice(d--,1);this._isClearing=!1}addMarker(d){const m=new v.Marker(d);return this.markers.push(m),m.register(this.lines.onTrim((E=>{m.line-=E,m.line<0&&m.dispose()}))),m.register(this.lines.onInsert((E=>{m.line>=E.index&&(m.line+=E.amount)}))),m.register(this.lines.onDelete((E=>{m.line>=E.index&&m.line<E.index+E.amount&&m.dispose(),m.line>E.index&&(m.line-=E.amount)}))),m.register(m.onDispose((()=>this._removeMarker(m)))),m}_removeMarker(d){this._isClearing||this.markers.splice(this.markers.indexOf(d),1)}}},8437:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const h=u(3734),p=u(511),c=u(643),b=u(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let w=0;class k{constructor(v,_,d=!1){this.isWrapped=d,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const m=_||p.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]);for(let E=0;E<v;++E)this.setCell(E,m);this.length=v}get(v){const _=this._data[3*v+0],d=2097151&_;return[this._data[3*v+1],2097152&_?this._combined[v]:d?(0,b.stringFromCodePoint)(d):"",_>>22,2097152&_?this._combined[v].charCodeAt(this._combined[v].length-1):d]}set(v,_){this._data[3*v+1]=_[c.CHAR_DATA_ATTR_INDEX],_[c.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=_[1],this._data[3*v+0]=2097152|v|_[c.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=_[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|_[c.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const _=this._data[3*v+0];return 2097152&_?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&_}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const _=this._data[3*v+0];return 2097152&_?this._combined[v]:2097151&_?(0,b.stringFromCodePoint)(2097151&_):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,_){return w=3*v,_.content=this._data[w+0],_.fg=this._data[w+1],_.bg=this._data[w+2],2097152&_.content&&(_.combinedData=this._combined[v]),268435456&_.bg&&(_.extended=this._extendedAttrs[v]),_}setCell(v,_){2097152&_.content&&(this._combined[v]=_.combinedData),268435456&_.bg&&(this._extendedAttrs[v]=_.extended),this._data[3*v+0]=_.content,this._data[3*v+1]=_.fg,this._data[3*v+2]=_.bg}setCellFromCodepoint(v,_,d,m){268435456&m.bg&&(this._extendedAttrs[v]=m.extended),this._data[3*v+0]=_|d<<22,this._data[3*v+1]=m.fg,this._data[3*v+2]=m.bg}addCodepointToCell(v,_,d){let m=this._data[3*v+0];2097152&m?this._combined[v]+=(0,b.stringFromCodePoint)(_):2097151&m?(this._combined[v]=(0,b.stringFromCodePoint)(2097151&m)+(0,b.stringFromCodePoint)(_),m&=-2097152,m|=2097152):m=_|4194304,d&&(m&=-12582913,m|=d<<22),this._data[3*v+0]=m}insertCells(v,_,d){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,d),_<this.length-v){const m=new p.CellData;for(let E=this.length-v-_-1;E>=0;--E)this.setCell(v+_+E,this.loadCell(v+E,m));for(let E=0;E<_;++E)this.setCell(v+E,d)}else for(let m=v;m<this.length;++m)this.setCell(m,d);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,d)}deleteCells(v,_,d){if(v%=this.length,_<this.length-v){const m=new p.CellData;for(let E=0;E<this.length-v-_;++E)this.setCell(v+E,this.loadCell(v+_+E,m));for(let E=this.length-_;E<this.length;++E)this.setCell(E,d)}else for(let m=v;m<this.length;++m)this.setCell(m,d);v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,d),this.getWidth(v)!==0||this.hasContent(v)||this.setCellFromCodepoint(v,0,1,d)}replaceCells(v,_,d,m=!1){if(m)for(v&&this.getWidth(v-1)===2&&!this.isProtected(v-1)&&this.setCellFromCodepoint(v-1,0,1,d),_<this.length&&this.getWidth(_-1)===2&&!this.isProtected(_)&&this.setCellFromCodepoint(_,0,1,d);v<_&&v<this.length;)this.isProtected(v)||this.setCell(v,d),v++;else for(v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,d),_<this.length&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_,0,1,d);v<_&&v<this.length;)this.setCell(v++,d)}resize(v,_){if(v===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const d=3*v;if(v>this.length){if(this._data.buffer.byteLength>=4*d)this._data=new Uint32Array(this._data.buffer,0,d);else{const m=new Uint32Array(d);m.set(this._data),this._data=m}for(let m=this.length;m<v;++m)this.setCell(m,_)}else{this._data=this._data.subarray(0,d);const m=Object.keys(this._combined);for(let R=0;R<m.length;R++){const A=parseInt(m[R],10);A>=v&&delete this._combined[A]}const E=Object.keys(this._extendedAttrs);for(let R=0;R<E.length;R++){const A=parseInt(E[R],10);A>=v&&delete this._extendedAttrs[A]}}return this.length=v,4*d*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const v=new Uint32Array(this._data.length);return v.set(this._data),this._data=v,1}return 0}fill(v,_=!1){if(_)for(let d=0;d<this.length;++d)this.isProtected(d)||this.setCell(d,v);else{this._combined={},this._extendedAttrs={};for(let d=0;d<this.length;++d)this.setCell(d,v)}}copyFrom(v){this.length!==v.length?this._data=new Uint32Array(v._data):this._data.set(v._data),this.length=v.length,this._combined={};for(const _ in v._combined)this._combined[_]=v._combined[_];this._extendedAttrs={};for(const _ in v._extendedAttrs)this._extendedAttrs[_]=v._extendedAttrs[_];this.isWrapped=v.isWrapped}clone(){const v=new k(0);v._data=new Uint32Array(this._data),v.length=this.length;for(const _ in this._combined)v._combined[_]=this._combined[_];for(const _ in this._extendedAttrs)v._extendedAttrs[_]=this._extendedAttrs[_];return v.isWrapped=this.isWrapped,v}getTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,_,d,m,E){const R=v._data;if(E)for(let L=m-1;L>=0;L--){for(let T=0;T<3;T++)this._data[3*(d+L)+T]=R[3*(_+L)+T];268435456&R[3*(_+L)+2]&&(this._extendedAttrs[d+L]=v._extendedAttrs[_+L])}else for(let L=0;L<m;L++){for(let T=0;T<3;T++)this._data[3*(d+L)+T]=R[3*(_+L)+T];268435456&R[3*(_+L)+2]&&(this._extendedAttrs[d+L]=v._extendedAttrs[_+L])}const A=Object.keys(v._combined);for(let L=0;L<A.length;L++){const T=parseInt(A[L],10);T>=_&&(this._combined[T-_+d]=v._combined[T])}}translateToString(v,_,d,m){_=_??0,d=d??this.length,v&&(d=Math.min(d,this.getTrimmedLength())),m&&(m.length=0);let E="";for(;_<d;){const R=this._data[3*_+0],A=2097151&R,L=2097152&R?this._combined[_]:A?(0,b.stringFromCodePoint)(A):c.WHITESPACE_CELL_CHAR;if(E+=L,m)for(let T=0;T<L.length;++T)m.push(_);_+=R>>22||1}return m&&m.push(_),E}}a.BufferLine=k},4841:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(u,h){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return h*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(g,a)=>{function u(h,p,c){if(p===h.length-1)return h[p].getTrimmedLength();const b=!h[p].hasContent(c-1)&&h[p].getWidth(c-1)===1,w=h[p+1].getWidth(0)===2;return b&&w?c-1:c}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(h,p,c,b,w){const k=[];for(let x=0;x<h.length-1;x++){let v=x,_=h.get(++v);if(!_.isWrapped)continue;const d=[h.get(x)];for(;v<h.length&&_.isWrapped;)d.push(_),_=h.get(++v);if(b>=x&&b<v){x+=d.length-1;continue}let m=0,E=u(d,m,p),R=1,A=0;for(;R<d.length;){const T=u(d,R,p),z=T-A,H=c-E,q=Math.min(z,H);d[m].copyCellsFrom(d[R],A,E,q,!1),E+=q,E===c&&(m++,E=0),A+=q,A===T&&(R++,A=0),E===0&&m!==0&&d[m-1].getWidth(c-1)===2&&(d[m].copyCellsFrom(d[m-1],c-1,E++,1,!1),d[m-1].setCell(c-1,w))}d[m].replaceCells(E,c,w);let L=0;for(let T=d.length-1;T>0&&(T>m||d[T].getTrimmedLength()===0);T--)L++;L>0&&(k.push(x+d.length-L),k.push(L)),x+=d.length-1}return k},a.reflowLargerCreateNewLayout=function(h,p){const c=[];let b=0,w=p[b],k=0;for(let x=0;x<h.length;x++)if(w===x){const v=p[++b];h.onDeleteEmitter.fire({index:x-k,amount:v}),x+=v-1,k+=v,w=p[++b]}else c.push(x);return{layout:c,countRemoved:k}},a.reflowLargerApplyNewLayout=function(h,p){const c=[];for(let b=0;b<p.length;b++)c.push(h.get(p[b]));for(let b=0;b<c.length;b++)h.set(b,c[b]);h.length=p.length},a.reflowSmallerGetNewLineLengths=function(h,p,c){const b=[],w=h.map(((_,d)=>u(h,d,p))).reduce(((_,d)=>_+d));let k=0,x=0,v=0;for(;v<w;){if(w-v<c){b.push(w-v);break}k+=c;const _=u(h,x,p);k>_&&(k-=_,x++);const d=h[x].getWidth(k-1)===2;d&&k--;const m=d?c-1:c;b.push(m),v+=m}return b},a.getWrappedLineTrimmedLength=u},5295:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const h=u(8460),p=u(844),c=u(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 c.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new c.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:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=u(482),p=u(643),c=u(3734);class b extends c.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new c.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 v=k[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const _=k[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=_&&_<=57343?this.content=1024*(v-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:(g,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:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const h=u(8460),p=u(844);class c{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=c._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(w){return this._disposables.push(w),w}}a.Marker=c,c._nextId=1},7116:(g,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:(g,a)=>{var u,h,p;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(c){c.NUL="\0",c.SOH="",c.STX="",c.ETX="",c.EOT="",c.ENQ="",c.ACK="",c.BEL="\x07",c.BS="\b",c.HT=" ",c.LF=`
|
|
56
|
+
`,c.VT="\v",c.FF="\f",c.CR="\r",c.SO="",c.SI="",c.DLE="",c.DC1="",c.DC2="",c.DC3="",c.DC4="",c.NAK="",c.SYN="",c.ETB="",c.CAN="",c.EM="",c.SUB="",c.ESC="\x1B",c.FS="",c.GS="",c.RS="",c.US="",c.SP=" ",c.DEL=""})(u||(a.C0=u={})),(function(c){c.PAD="",c.HOP="",c.BPH="",c.NBH="",c.IND="",c.NEL="
",c.SSA="",c.ESA="",c.HTS="",c.HTJ="",c.VTS="",c.PLD="",c.PLU="",c.RI="",c.SS2="",c.SS3="",c.DCS="",c.PU1="",c.PU2="",c.STS="",c.CCH="",c.MW="",c.SPA="",c.EPA="",c.SOS="",c.SGCI="",c.SCI="",c.CSI="",c.ST="",c.OSC="",c.PM="",c.APC=""})(h||(a.C1=h={})),(function(c){c.ST=`${u.ESC}\\`})(p||(a.C1_ESCAPED=p={}))},7399:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=u(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(c,b,w,k){const x={type:0,cancel:!1,key:void 0},v=(c.shiftKey?1:0)|(c.altKey?2:0)|(c.ctrlKey?4:0)|(c.metaKey?8:0);switch(c.keyCode){case 0:c.key==="UIKeyInputUpArrow"?x.key=b?h.C0.ESC+"OA":h.C0.ESC+"[A":c.key==="UIKeyInputLeftArrow"?x.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D":c.key==="UIKeyInputRightArrow"?x.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C":c.key==="UIKeyInputDownArrow"&&(x.key=b?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:x.key=c.ctrlKey?"\b":h.C0.DEL,c.altKey&&(x.key=h.C0.ESC+x.key);break;case 9:if(c.shiftKey){x.key=h.C0.ESC+"[Z";break}x.key=h.C0.HT,x.cancel=!0;break;case 13:x.key=c.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,x.cancel=!0;break;case 27:x.key=h.C0.ESC,c.altKey&&(x.key=h.C0.ESC+h.C0.ESC),x.cancel=!0;break;case 37:if(c.metaKey)break;v?(x.key=h.C0.ESC+"[1;"+(v+1)+"D",x.key===h.C0.ESC+"[1;3D"&&(x.key=h.C0.ESC+(w?"b":"[1;5D"))):x.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(c.metaKey)break;v?(x.key=h.C0.ESC+"[1;"+(v+1)+"C",x.key===h.C0.ESC+"[1;3C"&&(x.key=h.C0.ESC+(w?"f":"[1;5C"))):x.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(c.metaKey)break;v?(x.key=h.C0.ESC+"[1;"+(v+1)+"A",w||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(c.metaKey)break;v?(x.key=h.C0.ESC+"[1;"+(v+1)+"B",w||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:c.shiftKey||c.ctrlKey||(x.key=h.C0.ESC+"[2~");break;case 46:x.key=v?h.C0.ESC+"[3;"+(v+1)+"~":h.C0.ESC+"[3~";break;case 36:x.key=v?h.C0.ESC+"[1;"+(v+1)+"H":b?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:x.key=v?h.C0.ESC+"[1;"+(v+1)+"F":b?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:c.shiftKey?x.type=2:c.ctrlKey?x.key=h.C0.ESC+"[5;"+(v+1)+"~":x.key=h.C0.ESC+"[5~";break;case 34:c.shiftKey?x.type=3:c.ctrlKey?x.key=h.C0.ESC+"[6;"+(v+1)+"~":x.key=h.C0.ESC+"[6~";break;case 112:x.key=v?h.C0.ESC+"[1;"+(v+1)+"P":h.C0.ESC+"OP";break;case 113:x.key=v?h.C0.ESC+"[1;"+(v+1)+"Q":h.C0.ESC+"OQ";break;case 114:x.key=v?h.C0.ESC+"[1;"+(v+1)+"R":h.C0.ESC+"OR";break;case 115:x.key=v?h.C0.ESC+"[1;"+(v+1)+"S":h.C0.ESC+"OS";break;case 116:x.key=v?h.C0.ESC+"[15;"+(v+1)+"~":h.C0.ESC+"[15~";break;case 117:x.key=v?h.C0.ESC+"[17;"+(v+1)+"~":h.C0.ESC+"[17~";break;case 118:x.key=v?h.C0.ESC+"[18;"+(v+1)+"~":h.C0.ESC+"[18~";break;case 119:x.key=v?h.C0.ESC+"[19;"+(v+1)+"~":h.C0.ESC+"[19~";break;case 120:x.key=v?h.C0.ESC+"[20;"+(v+1)+"~":h.C0.ESC+"[20~";break;case 121:x.key=v?h.C0.ESC+"[21;"+(v+1)+"~":h.C0.ESC+"[21~";break;case 122:x.key=v?h.C0.ESC+"[23;"+(v+1)+"~":h.C0.ESC+"[23~";break;case 123:x.key=v?h.C0.ESC+"[24;"+(v+1)+"~":h.C0.ESC+"[24~";break;default:if(!c.ctrlKey||c.shiftKey||c.altKey||c.metaKey)if(w&&!k||!c.altKey||c.metaKey)!w||c.altKey||c.ctrlKey||c.shiftKey||!c.metaKey?c.key&&!c.ctrlKey&&!c.altKey&&!c.metaKey&&c.keyCode>=48&&c.key.length===1?x.key=c.key:c.key&&c.ctrlKey&&(c.key==="_"&&(x.key=h.C0.US),c.key==="@"&&(x.key=h.C0.NUL)):c.keyCode===65&&(x.type=1);else{const _=p[c.keyCode],d=_==null?void 0:_[c.shiftKey?1:0];if(d)x.key=h.C0.ESC+d;else if(c.keyCode>=65&&c.keyCode<=90){const m=c.ctrlKey?c.keyCode-64:c.keyCode+32;let E=String.fromCharCode(m);c.shiftKey&&(E=E.toUpperCase()),x.key=h.C0.ESC+E}else if(c.keyCode===32)x.key=h.C0.ESC+(c.ctrlKey?h.C0.NUL:" ");else if(c.key==="Dead"&&c.code.startsWith("Key")){let m=c.code.slice(3,4);c.shiftKey||(m=m.toLowerCase()),x.key=h.C0.ESC+m,x.cancel=!0}}else c.keyCode>=65&&c.keyCode<=90?x.key=String.fromCharCode(c.keyCode-64):c.keyCode===32?x.key=h.C0.NUL:c.keyCode>=51&&c.keyCode<=55?x.key=String.fromCharCode(c.keyCode-51+27):c.keyCode===56?x.key=h.C0.DEL:c.keyCode===219?x.key=h.C0.ESC:c.keyCode===220?x.key=h.C0.FS:c.keyCode===221&&(x.key=h.C0.GS)}return x}},482:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,h=0,p=u.length){let c="";for(let b=h;b<p;++b){let w=u[b];w>65535?(w-=65536,c+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):c+=String.fromCharCode(w)}return c},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,h){const p=u.length;if(!p)return 0;let c=0,b=0;if(this._interim){const w=u.charCodeAt(b++);56320<=w&&w<=57343?h[c++]=1024*(this._interim-55296)+w-56320+65536:(h[c++]=this._interim,h[c++]=w),this._interim=0}for(let w=b;w<p;++w){const k=u.charCodeAt(w);if(55296<=k&&k<=56319){if(++w>=p)return this._interim=k,c;const x=u.charCodeAt(w);56320<=x&&x<=57343?h[c++]=1024*(k-55296)+x-56320+65536:(h[c++]=k,h[c++]=x)}else k!==65279&&(h[c++]=k)}return c}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,h){const p=u.length;if(!p)return 0;let c,b,w,k,x=0,v=0,_=0;if(this.interim[0]){let E=!1,R=this.interim[0];R&=(224&R)==192?31:(240&R)==224?15:7;let A,L=0;for(;(A=63&this.interim[++L])&&L<4;)R<<=6,R|=A;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,z=T-L;for(;_<z;){if(_>=p)return 0;if(A=u[_++],(192&A)!=128){_--,E=!0;break}this.interim[L++]=A,R<<=6,R|=63&A}E||(T===2?R<128?_--:h[x++]=R:T===3?R<2048||R>=55296&&R<=57343||R===65279||(h[x++]=R):R<65536||R>1114111||(h[x++]=R)),this.interim.fill(0)}const d=p-4;let m=_;for(;m<p;){for(;!(!(m<d)||128&(c=u[m])||128&(b=u[m+1])||128&(w=u[m+2])||128&(k=u[m+3]));)h[x++]=c,h[x++]=b,h[x++]=w,h[x++]=k,m+=4;if(c=u[m++],c<128)h[x++]=c;else if((224&c)==192){if(m>=p)return this.interim[0]=c,x;if(b=u[m++],(192&b)!=128){m--;continue}if(v=(31&c)<<6|63&b,v<128){m--;continue}h[x++]=v}else if((240&c)==224){if(m>=p)return this.interim[0]=c,x;if(b=u[m++],(192&b)!=128){m--;continue}if(m>=p)return this.interim[0]=c,this.interim[1]=b,x;if(w=u[m++],(192&w)!=128){m--;continue}if(v=(15&c)<<12|(63&b)<<6|63&w,v<2048||v>=55296&&v<=57343||v===65279)continue;h[x++]=v}else if((248&c)==240){if(m>=p)return this.interim[0]=c,x;if(b=u[m++],(192&b)!=128){m--;continue}if(m>=p)return this.interim[0]=c,this.interim[1]=b,x;if(w=u[m++],(192&w)!=128){m--;continue}if(m>=p)return this.interim[0]=c,this.interim[1]=b,this.interim[2]=w,x;if(k=u[m++],(192&k)!=128){m--;continue}if(v=(7&c)<<18|(63&b)<<12|(63&w)<<6|63&k,v<65536||v>1114111)continue;h[x++]=v}}return x}}},225:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const h=u(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]],c=[[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 w=0;w<p.length;++w)b.fill(0,p[w][0],p[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?b[w]:(function(k,x){let v,_=0,d=x.length-1;if(k<x[0][0]||k>x[d][1])return!1;for(;d>=_;)if(v=_+d>>1,k>x[v][1])_=v+1;else{if(!(k<x[v][0]))return!0;d=v-1}return!1})(w,c)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,k){let x=this.wcwidth(w),v=x===0&&k!==0;if(v){const _=h.UnicodeService.extractWidth(k);_===0?v=!1:_>x&&(x=_)}return h.UnicodeService.createPropertyValue(0,x,v)}}},5981:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const h=u(8460),p=u(844);class c extends p.Disposable{constructor(w){super(),this._action=w,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(w,k){if(k!==void 0&&this._syncCalls>k)return void(this._syncCalls=0);if(this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);const v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,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+=w.length,this._writeBuffer.push(w),this._callbacks.push(k),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(k)}_innerWrite(w=0,k=!0){const x=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],_=this._action(v,k);if(_){const m=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(m)}const d=this._callbacks[this._bufferOffset];if(d&&d(),this._bufferOffset++,this._pendingData-=v.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=c},5941:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const u=/^([\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(c,b){const w=c.toString(16),k=w.length<2?"0"+w:w;switch(b){case 4:return w[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}a.parseColor=function(c){if(!c)return;let b=c.toLowerCase();if(b.indexOf("rgb:")===0){b=b.slice(4);const w=u.exec(b);if(w){const k=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/k*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/k*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/k*255)]}}else if(b.indexOf("#")===0&&(b=b.slice(1),h.exec(b)&&[3,6,9,12].includes(b.length))){const w=b.length/3,k=[0,0,0];for(let x=0;x<3;++x){const v=parseInt(b.slice(w*x,w*x+w),16);k[x]=w===1?v<<4:w===2?v:w===3?v>>4:v>>8}return k}},a.toRgbString=function(c,b=16){const[w,k,x]=c;return`rgb:${p(w,b)}/${p(k,b)}/${p(x,b)}`}},5770:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const h=u(482),p=u(8742),c=u(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 v=this._handlers[k];return v.push(x),{dispose:()=>{const _=v.indexOf(x);_!==-1&&v.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 v=this._active.length-1;v>=0;v--)this._active[v].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(k,x,v){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(k,x,v);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(k,x,v))}unhook(k,x=!0){if(this._active.length){let v=!1,_=this._active.length-1,d=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,v=x,d=this._stack.fallThrough,this._stack.paused=!1),!d&&v===!1){for(;_>=0&&(v=this._active[_].unhook(k),v!==!0);_--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,v;_--}for(;_>=0;_--)if(v=this._active[_].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",k);this._active=b,this._ident=0}};const w=new p.Params;w.addParam(0),a.DcsHandler=class{constructor(k){this._handler=k,this._data="",this._params=w,this._hitLimit=!1}hook(k){this._params=k.length>1||k.params[0]?k.clone():w,this._data="",this._hitLimit=!1}put(k,x,v){this._hitLimit||(this._data+=(0,h.utf32ToString)(k,x,v),this._data.length>c.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((v=>(this._params=w,this._data="",this._hitLimit=!1,v)));return this._params=w,this._data="",this._hitLimit=!1,x}}},2015:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const h=u(844),p=u(8742),c=u(6242),b=u(6351);class w{constructor(_){this.table=new Uint8Array(_)}setDefault(_,d){this.table.fill(_<<4|d)}add(_,d,m,E){this.table[d<<8|_]=m<<4|E}addMany(_,d,m,E){for(let R=0;R<_.length;R++)this.table[d<<8|_[R]]=m<<4|E}}a.TransitionTable=w;const k=160;a.VT500_TRANSITION_TABLE=(function(){const v=new w(4095),_=Array.apply(null,Array(256)).map(((L,T)=>T)),d=(L,T)=>_.slice(L,T),m=d(32,127),E=d(0,24);E.push(25),E.push.apply(E,d(28,32));const R=d(0,14);let A;for(A in v.setDefault(1,0),v.addMany(m,0,2,0),R)v.addMany([24,26,153,154],A,3,0),v.addMany(d(128,144),A,3,0),v.addMany(d(144,152),A,3,0),v.add(156,A,0,0),v.add(27,A,11,1),v.add(157,A,4,8),v.addMany([152,158,159],A,0,7),v.add(155,A,11,3),v.add(144,A,11,9);return v.addMany(E,0,3,0),v.addMany(E,1,3,1),v.add(127,1,0,1),v.addMany(E,8,0,8),v.addMany(E,3,3,3),v.add(127,3,0,3),v.addMany(E,4,3,4),v.add(127,4,0,4),v.addMany(E,6,3,6),v.addMany(E,5,3,5),v.add(127,5,0,5),v.addMany(E,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(m,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(d(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(m,7,0,7),v.addMany(E,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(d(64,127),3,7,0),v.addMany(d(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(d(48,60),4,8,4),v.addMany(d(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(d(32,64),6,0,6),v.add(127,6,0,6),v.addMany(d(64,127),6,0,0),v.addMany(d(32,48),3,9,5),v.addMany(d(32,48),5,9,5),v.addMany(d(48,64),5,0,6),v.addMany(d(64,127),5,7,0),v.addMany(d(32,48),4,9,5),v.addMany(d(32,48),1,9,2),v.addMany(d(32,48),2,9,2),v.addMany(d(48,127),2,10,0),v.addMany(d(48,80),1,10,0),v.addMany(d(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(d(96,127),1,10,0),v.add(80,1,11,9),v.addMany(E,9,0,9),v.add(127,9,0,9),v.addMany(d(28,32),9,0,9),v.addMany(d(32,48),9,9,12),v.addMany(d(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(E,11,0,11),v.addMany(d(32,128),11,0,11),v.addMany(d(28,32),11,0,11),v.addMany(E,10,0,10),v.add(127,10,0,10),v.addMany(d(28,32),10,0,10),v.addMany(d(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(d(32,48),10,9,12),v.addMany(E,12,0,12),v.add(127,12,0,12),v.addMany(d(28,32),12,0,12),v.addMany(d(32,48),12,9,12),v.addMany(d(48,64),12,0,11),v.addMany(d(64,127),12,12,13),v.addMany(d(64,127),10,12,13),v.addMany(d(64,127),9,12,13),v.addMany(E,13,13,13),v.addMany(m,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(k,0,2,0),v.add(k,8,5,8),v.add(k,6,0,6),v.add(k,11,0,11),v.add(k,13,13,13),v})();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=(d,m,E)=>{},this._executeHandlerFb=d=>{},this._csiHandlerFb=(d,m)=>{},this._escHandlerFb=d=>{},this._errorHandlerFb=d=>d,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 c.OscParser),this._dcsParser=this.register(new b.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(_,d=[64,126]){let m=0;if(_.prefix){if(_.prefix.length>1)throw new Error("only one byte as prefix supported");if(m=_.prefix.charCodeAt(0),m&&60>m||m>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 R=0;R<_.intermediates.length;++R){const A=_.intermediates.charCodeAt(R);if(32>A||A>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");m<<=8,m|=A}}if(_.final.length!==1)throw new Error("final must be a single byte");const E=_.final.charCodeAt(0);if(d[0]>E||E>d[1])throw new Error(`final must be in range ${d[0]} .. ${d[1]}`);return m<<=8,m|=E,m}identToString(_){const d=[];for(;_;)d.push(String.fromCharCode(255&_)),_>>=8;return d.reverse().join("")}setPrintHandler(_){this._printHandler=_}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(_,d){const m=this._identifier(_,[48,126]);this._escHandlers[m]===void 0&&(this._escHandlers[m]=[]);const E=this._escHandlers[m];return E.push(d),{dispose:()=>{const R=E.indexOf(d);R!==-1&&E.splice(R,1)}}}clearEscHandler(_){this._escHandlers[this._identifier(_,[48,126])]&&delete this._escHandlers[this._identifier(_,[48,126])]}setEscHandlerFallback(_){this._escHandlerFb=_}setExecuteHandler(_,d){this._executeHandlers[_.charCodeAt(0)]=d}clearExecuteHandler(_){this._executeHandlers[_.charCodeAt(0)]&&delete this._executeHandlers[_.charCodeAt(0)]}setExecuteHandlerFallback(_){this._executeHandlerFb=_}registerCsiHandler(_,d){const m=this._identifier(_);this._csiHandlers[m]===void 0&&(this._csiHandlers[m]=[]);const E=this._csiHandlers[m];return E.push(d),{dispose:()=>{const R=E.indexOf(d);R!==-1&&E.splice(R,1)}}}clearCsiHandler(_){this._csiHandlers[this._identifier(_)]&&delete this._csiHandlers[this._identifier(_)]}setCsiHandlerFallback(_){this._csiHandlerFb=_}registerDcsHandler(_,d){return this._dcsParser.registerHandler(this._identifier(_),d)}clearDcsHandler(_){this._dcsParser.clearHandler(this._identifier(_))}setDcsHandlerFallback(_){this._dcsParser.setHandlerFallback(_)}registerOscHandler(_,d){return this._oscParser.registerHandler(_,d)}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(_,d,m,E,R){this._parseStack.state=_,this._parseStack.handlers=d,this._parseStack.handlerPos=m,this._parseStack.transition=E,this._parseStack.chunkPos=R}parse(_,d,m){let E,R=0,A=0,L=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,L=this._parseStack.chunkPos+1;else{if(m===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const T=this._parseStack.handlers;let z=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(m===!1&&z>-1){for(;z>=0&&(E=T[z](this._params),E!==!0);z--)if(E instanceof Promise)return this._parseStack.handlerPos=z,E}this._parseStack.handlers=[];break;case 4:if(m===!1&&z>-1){for(;z>=0&&(E=T[z](),E!==!0);z--)if(E instanceof Promise)return this._parseStack.handlerPos=z,E}this._parseStack.handlers=[];break;case 6:if(R=_[this._parseStack.chunkPos],E=this._dcsParser.unhook(R!==24&&R!==26,m),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(R=_[this._parseStack.chunkPos],E=this._oscParser.end(R!==24&&R!==26,m),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,L=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let T=L;T<d;++T){switch(R=_[T],A=this._transitions.table[this.currentState<<8|(R<160?R:k)],A>>4){case 2:for(let I=T+1;;++I){if(I>=d||(R=_[I])<32||R>126&&R<k){this._printHandler(_,T,I),T=I-1;break}if(++I>=d||(R=_[I])<32||R>126&&R<k){this._printHandler(_,T,I),T=I-1;break}if(++I>=d||(R=_[I])<32||R>126&&R<k){this._printHandler(_,T,I),T=I-1;break}if(++I>=d||(R=_[I])<32||R>126&&R<k){this._printHandler(_,T,I),T=I-1;break}}break;case 3:this._executeHandlers[R]?this._executeHandlers[R]():this._executeHandlerFb(R),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:T,code:R,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const z=this._csiHandlers[this._collect<<8|R];let H=z?z.length-1:-1;for(;H>=0&&(E=z[H](this._params),E!==!0);H--)if(E instanceof Promise)return this._preserveStack(3,z,H,A,T),E;H<0&&this._csiHandlerFb(this._collect<<8|R,this._params),this.precedingJoinState=0;break;case 8:do switch(R){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(R-48)}while(++T<d&&(R=_[T])>47&&R<60);T--;break;case 9:this._collect<<=8,this._collect|=R;break;case 10:const q=this._escHandlers[this._collect<<8|R];let V=q?q.length-1:-1;for(;V>=0&&(E=q[V](),E!==!0);V--)if(E instanceof Promise)return this._preserveStack(4,q,V,A,T),E;V<0&&this._escHandlerFb(this._collect<<8|R),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|R,this._params);break;case 13:for(let I=T+1;;++I)if(I>=d||(R=_[I])===24||R===26||R===27||R>127&&R<k){this._dcsParser.put(_,T,I),T=I-1;break}break;case 14:if(E=this._dcsParser.unhook(R!==24&&R!==26),E)return this._preserveStack(6,[],0,A,T),E;R===27&&(A|=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 I=T+1;;I++)if(I>=d||(R=_[I])<32||R>127&&R<k){this._oscParser.put(_,T,I),T=I-1;break}break;case 6:if(E=this._oscParser.end(R!==24&&R!==26),E)return this._preserveStack(5,[],0,A,T),E;R===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&A}}}a.EscapeSequenceParser=x},6242:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const h=u(5770),p=u(482),c=[];a.OscParser=class{constructor(){this._state=0,this._active=c,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(b,w){this._handlers[b]===void 0&&(this._handlers[b]=[]);const k=this._handlers[b];return k.push(w),{dispose:()=>{const x=k.indexOf(w);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=c}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=c,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||c,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,w,k){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(b,w,k);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(b,w,k))}start(){this.reset(),this._state=1}put(b,w,k){if(this._state!==3){if(this._state===1)for(;w<k;){const x=b[w++];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-w>0&&this._put(b,w,k)}}end(b,w=!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,v=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,k=w,v=this._stack.fallThrough,this._stack.paused=!1),!v&&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=c,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,w,k){this._hitLimit||(this._data+=(0,p.utf32ToString)(b,w,k),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(b){let w=!1;if(this._hitLimit)w=!1;else if(b&&(w=this._handler(this._data),w instanceof Promise))return w.then((k=>(this._data="",this._hitLimit=!1,k)));return this._data="",this._hitLimit=!1,w}}},8742:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const u=2147483647;class h{static fromArray(c){const b=new h;if(!c.length)return b;for(let w=Array.isArray(c[0])?1:0;w<c.length;++w){const k=c[w];if(Array.isArray(k))for(let x=0;x<k.length;++x)b.addSubParam(k[x]);else b.addParam(k)}return b}constructor(c=32,b=32){if(this.maxLength=c,this.maxSubParamsLength=b,b>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(c),this.length=0,this._subParams=new Int32Array(b),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(c),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const c=new h(this.maxLength,this.maxSubParamsLength);return c.params.set(this.params),c.length=this.length,c._subParams.set(this._subParams),c._subParamsLength=this._subParamsLength,c._subParamsIdx.set(this._subParamsIdx),c._rejectDigits=this._rejectDigits,c._rejectSubDigits=this._rejectSubDigits,c._digitIsSub=this._digitIsSub,c}toArray(){const c=[];for(let b=0;b<this.length;++b){c.push(this.params[b]);const w=this._subParamsIdx[b]>>8,k=255&this._subParamsIdx[b];k-w>0&&c.push(Array.prototype.slice.call(this._subParams,w,k))}return c}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(c){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=c>u?u:c}}addSubParam(c){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=c>u?u:c,this._subParamsIdx[this.length-1]++}}hasSubParams(c){return(255&this._subParamsIdx[c])-(this._subParamsIdx[c]>>8)>0}getSubParams(c){const b=this._subParamsIdx[c]>>8,w=255&this._subParamsIdx[c];return w-b>0?this._subParams.subarray(b,w):null}getSubParamsAll(){const c={};for(let b=0;b<this.length;++b){const w=this._subParamsIdx[b]>>8,k=255&this._subParamsIdx[b];k-w>0&&(c[b]=this._subParams.slice(w,k))}return c}addDigit(c){let b;if(this._rejectDigits||!(b=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,k=w[b-1];w[b-1]=~k?Math.min(10*k+c,u):c}}a.Params=h},5741:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,h){const p={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(p),h.dispose=()=>this._wrappedAddonDispose(p),h.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let h=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===u){h=p;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(h,1)}}},8771:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const h=u(3785),p=u(511);a.BufferApiView=class{constructor(c,b){this._buffer=c,this.type=b}init(c){return this._buffer=c,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(c){const b=this._buffer.lines.get(c);if(b)return new h.BufferLineApiView(b)}getNullCell(){return new p.CellData}}},3785:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=u(511);a.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,c){if(!(p<0||p>=this._line.length))return c?(this._line.loadCell(p,c),c):this._line.loadCell(p,new h.CellData)}translateToString(p,c,b){return this._line.translateToString(p,c,b)}}},8285:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=u(8771),p=u(8460),c=u(844);class b extends c.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:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,h){return this._core.registerCsiHandler(u,(p=>h(p.toArray())))}addCsiHandler(u,h){return this.registerCsiHandler(u,h)}registerDcsHandler(u,h){return this._core.registerDcsHandler(u,((p,c)=>h(p,c.toArray())))}addDcsHandler(u,h){return this.registerDcsHandler(u,h)}registerEscHandler(u,h){return this._core.registerEscHandler(u,h)}addEscHandler(u,h){return this.registerEscHandler(u,h)}registerOscHandler(u,h){return this._core.registerOscHandler(u,h)}addOscHandler(u,h){return this.registerOscHandler(u,h)}}},7090:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(g,a,u){var h=this&&this.__decorate||function(v,_,d,m){var E,R=arguments.length,A=R<3?_:m===null?m=Object.getOwnPropertyDescriptor(_,d):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(v,_,d,m);else for(var L=v.length-1;L>=0;L--)(E=v[L])&&(A=(R<3?E(A):R>3?E(_,d,A):E(_,d))||A);return R>3&&A&&Object.defineProperty(_,d,A),A},p=this&&this.__param||function(v,_){return function(d,m){_(d,m,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const c=u(8460),b=u(844),w=u(5295),k=u(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends b.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(v,this))}resize(v,_){this.cols=v,this.rows=_,this.buffers.resize(v,_),this._onResize.fire({cols:v,rows:_})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,_=!1){const d=this.buffer;let m;m=this._cachedBlankLine,m&&m.length===this.cols&&m.getFg(0)===v.fg&&m.getBg(0)===v.bg||(m=d.getBlankLine(v,_),this._cachedBlankLine=m),m.isWrapped=_;const E=d.ybase+d.scrollTop,R=d.ybase+d.scrollBottom;if(d.scrollTop===0){const A=d.lines.isFull;R===d.lines.length-1?A?d.lines.recycle().copyFrom(m):d.lines.push(m.clone()):d.lines.splice(R+1,0,m.clone()),A?this.isUserScrolling&&(d.ydisp=Math.max(d.ydisp-1,0)):(d.ybase++,this.isUserScrolling||d.ydisp++)}else{const A=R-E+1;d.lines.shiftElements(E+1,A-1,-1),d.lines.set(R,m.clone())}this.isUserScrolling||(d.ydisp=d.ybase),this._onScroll.fire(d.ydisp)}scrollLines(v,_,d){const m=this.buffer;if(v<0){if(m.ydisp===0)return;this.isUserScrolling=!0}else v+m.ydisp>=m.ybase&&(this.isUserScrolling=!1);const E=m.ydisp;m.ydisp=Math.max(Math.min(m.ydisp+v,m.ybase),0),E!==m.ydisp&&(_||this._onScroll.fire(m.ydisp))}};a.BufferService=x=h([p(0,k.IOptionsService)],x)},7994:(g,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(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,h){this._charsets[u]=h,this.glevel===u&&(this.charset=h)}}},1753:function(g,a,u){var h=this&&this.__decorate||function(m,E,R,A){var L,T=arguments.length,z=T<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,R):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(m,E,R,A);else for(var H=m.length-1;H>=0;H--)(L=m[H])&&(z=(T<3?L(z):T>3?L(E,R,z):L(E,R))||z);return T>3&&z&&Object.defineProperty(E,R,z),z},p=this&&this.__param||function(m,E){return function(R,A){E(R,A,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const c=u(2585),b=u(8460),w=u(844),k={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:m=>m.button!==4&&m.action===1&&(m.ctrl=!1,m.alt=!1,m.shift=!1,!0)},VT200:{events:19,restrict:m=>m.action!==32},DRAG:{events:23,restrict:m=>m.action!==32||m.button!==3},ANY:{events:31,restrict:m=>!0}};function x(m,E){let R=(m.ctrl?16:0)|(m.shift?4:0)|(m.alt?8:0);return m.button===4?(R|=64,R|=m.action):(R|=3&m.button,4&m.button&&(R|=64),8&m.button&&(R|=128),m.action===32?R|=32:m.action!==0||E||(R|=3)),R}const v=String.fromCharCode,_={DEFAULT:m=>{const E=[x(m,!1)+32,m.col+32,m.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${v(E[0])}${v(E[1])}${v(E[2])}`},SGR:m=>{const E=m.action===0&&m.button!==4?"m":"M";return`\x1B[<${x(m,!0)};${m.col};${m.row}${E}`},SGR_PIXELS:m=>{const E=m.action===0&&m.button!==4?"m":"M";return`\x1B[<${x(m,!0)};${m.x};${m.y}${E}`}};let d=a.CoreMouseService=class extends w.Disposable{constructor(m,E){super(),this._bufferService=m,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 R of Object.keys(k))this.addProtocol(R,k[R]);for(const R of Object.keys(_))this.addEncoding(R,_[R]);this.reset()}addProtocol(m,E){this._protocols[m]=E}addEncoding(m,E){this._encodings[m]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(m){if(!this._protocols[m])throw new Error(`unknown protocol "${m}"`);this._activeProtocol=m,this._onProtocolChange.fire(this._protocols[m].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(m){if(!this._encodings[m])throw new Error(`unknown encoding "${m}"`);this._activeEncoding=m}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(m){if(m.col<0||m.col>=this._bufferService.cols||m.row<0||m.row>=this._bufferService.rows||m.button===4&&m.action===32||m.button===3&&m.action!==32||m.button!==4&&(m.action===2||m.action===3)||(m.col++,m.row++,m.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,m,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(m))return!1;const E=this._encodings[this._activeEncoding](m);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=m,!0}explainEvents(m){return{down:!!(1&m),up:!!(2&m),drag:!!(4&m),move:!!(8&m),wheel:!!(16&m)}}_equalEvents(m,E,R){if(R){if(m.x!==E.x||m.y!==E.y)return!1}else if(m.col!==E.col||m.row!==E.row)return!1;return m.button===E.button&&m.action===E.action&&m.ctrl===E.ctrl&&m.alt===E.alt&&m.shift===E.shift}};a.CoreMouseService=d=h([p(0,c.IBufferService),p(1,c.ICoreService)],d)},6975:function(g,a,u){var h=this&&this.__decorate||function(d,m,E,R){var A,L=arguments.length,T=L<3?m:R===null?R=Object.getOwnPropertyDescriptor(m,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(d,m,E,R);else for(var z=d.length-1;z>=0;z--)(A=d[z])&&(T=(L<3?A(T):L>3?A(m,E,T):A(m,E))||T);return L>3&&T&&Object.defineProperty(m,E,T),T},p=this&&this.__param||function(d,m){return function(E,R){m(E,R,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const c=u(1439),b=u(8460),w=u(844),k=u(2585),x=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let _=a.CoreService=class extends w.Disposable{constructor(d,m,E){super(),this._bufferService=d,this._logService=m,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,c.clone)(x),this.decPrivateModes=(0,c.clone)(v)}reset(){this.modes=(0,c.clone)(x),this.decPrivateModes=(0,c.clone)(v)}triggerDataEvent(d,m=!1){if(this._optionsService.rawOptions.disableStdin)return;const E=this._bufferService.buffer;m&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),m&&this._onUserInput.fire(),this._logService.debug(`sending data "${d}"`,(()=>d.split("").map((R=>R.charCodeAt(0))))),this._onData.fire(d)}triggerBinaryEvent(d){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${d}"`,(()=>d.split("").map((m=>m.charCodeAt(0))))),this._onBinary.fire(d))}};a.CoreService=_=h([p(0,k.IBufferService),p(1,k.ILogService),p(2,k.IOptionsService)],_)},9074:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=u(8055),p=u(8460),c=u(844),b=u(6106);let w=0,k=0;class x extends c.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new b.SortedList((d=>d==null?void 0:d.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,c.toDisposable)((()=>this.reset())))}registerDecoration(d){if(d.marker.isDisposed)return;const m=new v(d);if(m){const E=m.marker.onDispose((()=>m.dispose()));m.onDispose((()=>{m&&(this._decorations.delete(m)&&this._onDecorationRemoved.fire(m),E.dispose())})),this._decorations.insert(m),this._onDecorationRegistered.fire(m)}return m}reset(){for(const d of this._decorations.values())d.dispose();this._decorations.clear()}*getDecorationsAtCell(d,m,E){let R=0,A=0;for(const L of this._decorations.getKeyIterator(m))R=L.options.x??0,A=R+(L.options.width??1),d>=R&&d<A&&(!E||(L.options.layer??"bottom")===E)&&(yield L)}forEachDecorationAtCell(d,m,E,R){this._decorations.forEachByKey(m,(A=>{w=A.options.x??0,k=w+(A.options.width??1),d>=w&&d<k&&(!E||(A.options.layer??"bottom")===E)&&R(A)}))}}a.DecorationService=x;class v extends c.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(d){super(),this.options=d,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=d.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const h=u(2585),p=u(8343);class c{constructor(...w){this._entries=new Map;for(const[k,x]of w)this.set(k,x)}set(w,k){const x=this._entries.get(w);return this._entries.set(w,k),x}forEach(w){for(const[k,x]of this._entries.entries())w(k,x)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}a.ServiceCollection=c,a.InstantiationService=class{constructor(){this._services=new c,this._services.set(h.IInstantiationService,this)}setService(b,w){this._services.set(b,w)}getService(b){return this._services.get(b)}createInstance(b,...w){const k=(0,p.getServiceDependencies)(b).sort(((_,d)=>_.index-d.index)),x=[];for(const _ of k){const d=this._services.get(_.id);if(!d)throw new Error(`[createInstance] ${b.name} depends on UNKNOWN service ${_.id}.`);x.push(d)}const v=k.length>0?k[0].index:w.length;if(w.length!==v)throw new Error(`[createInstance] First service dependency of ${b.name} at position ${v+1} conflicts with ${w.length} static arguments`);return new b(...w,...x)}}},7866:function(g,a,u){var h=this&&this.__decorate||function(v,_,d,m){var E,R=arguments.length,A=R<3?_:m===null?m=Object.getOwnPropertyDescriptor(_,d):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(v,_,d,m);else for(var L=v.length-1;L>=0;L--)(E=v[L])&&(A=(R<3?E(A):R>3?E(_,d,A):E(_,d))||A);return R>3&&A&&Object.defineProperty(_,d,A),A},p=this&&this.__param||function(v,_){return function(d,m){_(d,m,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const c=u(844),b=u(2585),w={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 c.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=b.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),k=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let _=0;_<v.length;_++)typeof v[_]=="function"&&(v[_]=v[_]())}_log(v,_,d){this._evalLazyOptionalParams(d),v.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+_,...d)}trace(v,..._){var d;this._logLevel<=b.LogLevelEnum.TRACE&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.trace.bind(this._optionsService.options.logger))??console.log,v,_)}debug(v,..._){var d;this._logLevel<=b.LogLevelEnum.DEBUG&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.debug.bind(this._optionsService.options.logger))??console.log,v,_)}info(v,..._){var d;this._logLevel<=b.LogLevelEnum.INFO&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.info.bind(this._optionsService.options.logger))??console.info,v,_)}warn(v,..._){var d;this._logLevel<=b.LogLevelEnum.WARN&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.warn.bind(this._optionsService.options.logger))??console.warn,v,_)}error(v,..._){var d;this._logLevel<=b.LogLevelEnum.ERROR&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.error.bind(this._optionsService.options.logger))??console.error,v,_)}};a.LogService=x=h([p(0,b.IOptionsService)],x),a.setTraceLogger=function(v){k=v},a.traceCall=function(v,_,d){if(typeof d.value!="function")throw new Error("not supported");const m=d.value;d.value=function(...E){if(k.logLevel!==b.LogLevelEnum.TRACE)return m.apply(this,E);k.trace(`GlyphRenderer#${m.name}(${E.map((A=>JSON.stringify(A))).join(", ")})`);const R=m.apply(this,E);return k.trace(`GlyphRenderer#${m.name} return`,R),R}}},7302:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const h=u(8460),p=u(844),c=u(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:c.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 w extends p.Disposable{constructor(x){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...a.DEFAULT_OPTIONS};for(const _ in x)if(_ in v)try{const d=x[_];v[_]=this._sanitizeAndValidateOption(_,d)}catch(d){console.error(d)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,p.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,v){return this.onOptionChange((_=>{_===x&&v(this.rawOptions[x])}))}onMultipleOptionChange(x,v){return this.onOptionChange((_=>{x.indexOf(_)!==-1&&v()}))}_setupOptions(){const x=_=>{if(!(_ in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);return this.rawOptions[_]},v=(_,d)=>{if(!(_ in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);d=this._sanitizeAndValidateOption(_,d),this.rawOptions[_]!==d&&(this.rawOptions[_]=d,this._onOptionChange.fire(_))};for(const _ in this.rawOptions){const d={get:x.bind(this,_),set:v.bind(this,_)};Object.defineProperty(this.options,_,d)}}_sanitizeAndValidateOption(x,v){switch(x){case"cursorStyle":if(v||(v=a.DEFAULT_OPTIONS[x]),!(function(_){return _==="block"||_==="underline"||_==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${x}`);break;case"wordSeparator":v||(v=a.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=b.includes(v)?v:a.DEFAULT_OPTIONS[x];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${x} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${x} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}a.OptionsService=w},2660:function(g,a,u){var h=this&&this.__decorate||function(w,k,x,v){var _,d=arguments.length,m=d<3?k:v===null?v=Object.getOwnPropertyDescriptor(k,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(w,k,x,v);else for(var E=w.length-1;E>=0;E--)(_=w[E])&&(m=(d<3?_(m):d>3?_(k,x,m):_(k,x))||m);return d>3&&m&&Object.defineProperty(k,x,m),m},p=this&&this.__param||function(w,k){return function(x,v){k(x,v,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const c=u(2585);let b=a.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const k=this._bufferService.buffer;if(w.id===void 0){const E=k.addMarker(k.ybase+k.y),R={data:w,id:this._nextId++,lines:[E]};return E.onDispose((()=>this._removeMarkerFromLink(R,E))),this._dataByLinkId.set(R.id,R),R.id}const x=w,v=this._getEntryIdKey(x),_=this._entriesWithId.get(v);if(_)return this.addLineToLink(_.id,k.ybase+k.y),_.id;const d=k.addMarker(k.ybase+k.y),m={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[d]};return d.onDispose((()=>this._removeMarkerFromLink(m,d))),this._entriesWithId.set(m.key,m),this._dataByLinkId.set(m.id,m),m.id}addLineToLink(w,k){const x=this._dataByLinkId.get(w);if(x&&x.lines.every((v=>v.line!==k))){const v=this._bufferService.buffer.addMarker(k);x.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(x,v)))}}getLinkData(w){var k;return(k=this._dataByLinkId.get(w))==null?void 0:k.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,k){const x=w.lines.indexOf(k);x!==-1&&(w.lines.splice(x,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};a.OscLinkService=b=h([p(0,c.IBufferService)],b)},8343:(g,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="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 c=function(b,w,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,v,_){v[u]===v?v[h].push({id:x,index:_}):(v[h]=[{id:x,index:_}],v[u]=v)})(c,b,k)};return c.toString=()=>p,a.serviceRegistry.set(p,c),c}},2585:(g,a,u)=>{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=u(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(c){c[c.TRACE=0]="TRACE",c[c.DEBUG=1]="DEBUG",c[c.INFO=2]="INFO",c[c.WARN=3]="WARN",c[c.ERROR=4]="ERROR",c[c.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:(g,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const h=u(8460),p=u(225);class c{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,k,x=!1){return(16777215&w)<<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 w=new p.UnicodeV6;this.register(w),this._active=w.version,this._activeProvider=w}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(w){if(!this._providers[w])throw new Error(`unknown Unicode version "${w}"`);this._active=w,this._activeProvider=this._providers[w],this._onChange.fire(w)}register(w){this._providers[w.version]=w}wcwidth(w){return this._activeProvider.wcwidth(w)}getStringCellWidth(w){let k=0,x=0;const v=w.length;for(let _=0;_<v;++_){let d=w.charCodeAt(_);if(55296<=d&&d<=56319){if(++_>=v)return k+this.wcwidth(d);const R=w.charCodeAt(_);56320<=R&&R<=57343?d=1024*(d-55296)+R-56320+65536:k+=this.wcwidth(R)}const m=this.charProperties(d,x);let E=c.extractWidth(m);c.extractShouldJoin(m)&&(E-=c.extractWidth(x)),k+=E,x=m}return k}charProperties(w,k){return this._activeProvider.charProperties(w,k)}}a.UnicodeService=c}},o={};function S(g){var a=o[g];if(a!==void 0)return a.exports;var u=o[g]={exports:{}};return l[g].call(u.exports,u,u.exports,S),u.exports}var C={};return(()=>{var g=C;Object.defineProperty(g,"__esModule",{value:!0}),g.Terminal=void 0;const a=S(9042),u=S(3236),h=S(844),p=S(5741),c=S(8285),b=S(7975),w=S(7090),k=["cols","rows"];class x extends h.Disposable{constructor(_){super(),this._core=this.register(new u.Terminal(_)),this._addonManager=this.register(new p.AddonManager),this._publicOptions={...this._core.options};const d=E=>this._core.options[E],m=(E,R)=>{this._checkReadonlyOptions(E),this._core.options[E]=R};for(const E in this._core.options){const R={get:d.bind(this,E),set:m.bind(this,E)};Object.defineProperty(this._publicOptions,E,R)}}_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 w.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 c.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const _=this._core.coreService.decPrivateModes;let d="none";switch(this._core.coreMouseService.activeProtocol){case"X10":d="x10";break;case"VT200":d="vt200";break;case"DRAG":d="drag";break;case"ANY":d="any"}return{applicationCursorKeysMode:_.applicationCursorKeys,applicationKeypadMode:_.applicationKeypad,bracketedPasteMode:_.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:d,originMode:_.origin,reverseWraparoundMode:_.reverseWraparound,sendFocusMode:_.sendFocus,wraparoundMode:_.wraparound}}get options(){return this._publicOptions}set options(_){for(const d in _)this._publicOptions[d]=_[d]}blur(){this._core.blur()}focus(){this._core.focus()}input(_,d=!0){this._core.input(_,d)}resize(_,d){this._verifyIntegers(_,d),this._core.resize(_,d)}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(_,d,m){this._verifyIntegers(_,d,m),this._core.select(_,d,m)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(_,d){this._verifyIntegers(_,d),this._core.selectLines(_,d)}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(_,d){this._core.write(_,d)}writeln(_,d){this._core.write(_),this._core.write(`\r
|
|
57
|
+
`,d)}paste(_){this._core.paste(_)}refresh(_,d){this._verifyIntegers(_,d),this._core.refresh(_,d)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(_){this._addonManager.loadAddon(this,_)}static get strings(){return a}_verifyIntegers(..._){for(const d of _)if(d===1/0||isNaN(d)||d%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(..._){for(const d of _)if(d&&(d===1/0||isNaN(d)||d%1!=0||d<0))throw new Error("This API only accepts positive integers")}}g.Terminal=x})(),C})()))})(Hu)),Hu.exports}var O0=M0();class B0{constructor(s,l){Tp(this,"socket");const o=window.location.protocol==="https:"?"wss:":"ws:";this.socket=new WebSocket(`${o}//${window.location.host}/ws/terminal/${encodeURIComponent(s)}`),this.socket.addEventListener("message",S=>{var g,a;const C=JSON.parse(S.data);C.type==="output"?l.onOutput(C.data):C.type==="error"?(g=l.onError)==null||g.call(l,C.message):(a=l.onStatus)==null||a.call(l,C)}),this.socket.addEventListener("error",()=>{var S;(S=l.onError)==null||S.call(l,"Terminal connection failed.")})}sendInput(s){this.send({type:"input",data:s})}resize(s,l){this.send({type:"resize",cols:s,rows:l})}close(){this.socket.close()}send(s){const l=JSON.stringify(s);if(this.socket.readyState===WebSocket.OPEN){this.socket.send(l);return}this.socket.addEventListener("open",()=>this.socket.send(l),{once:!0})}}function z0({sessionId:n,active:s=!0,onEvent:l}){const o=ge.useRef(null),S=ge.useRef(null),C=ge.useRef(null),g=ge.useRef(null),a=ge.useRef(s),u=ge.useRef(l);function h(p={}){const c=o.current,b=S.current,w=C.current,k=g.current;if(!c||!b||!w||!k)return!1;const x=c.getBoundingClientRect();return x.width<H0||x.height<N0||(w.fit(),k.cols<j0||k.rows<U0)?!1:(b.resize(k.cols,k.rows),p.focus&&k.focus(),!0)}return ge.useEffect(()=>{u.current=l},[l]),ge.useEffect(()=>{a.current=s},[s]),ge.useEffect(()=>{if(!o.current)return;const p=new O0.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:I0}),c=new D0.FitAddon;p.loadAddon(c),p.loadAddon(new L0.WebLinksAddon),p.open(o.current),g.current=p,C.current=c;const b=new B0(n,{onOutput(m){p.write(m)},onStatus(m){var E;(E=u.current)==null||E.call(u,m.type)},onError(m){var E;p.writeln(`\r
|
|
58
|
+
[VCM] ${m}`),(E=u.current)==null||E.call(u,m)}});S.current=b;const w=p.onData(m=>{b.sendInput(m)});let k=0,x=0,v=0;const _=()=>{k&&window.cancelAnimationFrame(k),k=window.requestAnimationFrame(()=>{k=0,h({focus:a.current})})},d=new ResizeObserver(()=>{_()});return d.observe(o.current),x=window.requestAnimationFrame(_),v=window.setTimeout(_,120),()=>{k&&window.cancelAnimationFrame(k),x&&window.cancelAnimationFrame(x),v&&window.clearTimeout(v),d.disconnect(),w.dispose(),b.close(),p.dispose(),S.current=null,g.current=null,C.current=null}},[n]),ge.useEffect(()=>{if(!s)return;const p=[],c=[];return p.push(window.requestAnimationFrame(()=>{h({focus:!0}),p.push(window.requestAnimationFrame(()=>h({focus:!0})))})),c.push(window.setTimeout(()=>h({focus:!0}),160)),c.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const b of p)window.cancelAnimationFrame(b);for(const b of c)window.clearTimeout(b)}},[s]),ge.useEffect(()=>{const p=()=>{a.current&&h()};return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[]),F.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var p;return(p=g.current)==null?void 0:p.focus()}})}const H0=160,N0=80,j0=20,U0=5,I0={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"};function P0({role:n,session:s,permissionMode:l,busy:o=!1,onPermissionModeChange:S,onStart:C,onResume:g,onStop:a,onRestart:u}){const h=(s==null?void 0:s.status)==="running",p=!!(s!=null&&s.claudeSessionId&&!h),c=!h&&!(s!=null&&s.claudeSessionId),b=!!(s&&s.permissionMode!==l);return F.jsxs("div",{className:"session-controls",children:[F.jsxs("label",{className:"permission-mode-field",children:[F.jsxs("span",{children:["Permission",F.jsx("small",{children:s?`current: ${F0(s.permissionMode)}${b?" / next launch":""}`:"applies on start"})]}),F.jsxs("select",{value:l,onChange:w=>S(w.target.value),children:[F.jsx("option",{value:"default",children:"默认"}),F.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"}),F.jsx("option",{value:"dangerously-skip-permissions",children:"--dangerously-skip-permissions"})]})]}),F.jsxs("div",{className:"session-toolbar",children:[F.jsx("button",{type:"button",disabled:o||!c,onClick:C,children:"Start"}),F.jsx("button",{type:"button",disabled:o||!p,onClick:g,children:"Resume"}),F.jsx("button",{type:"button",disabled:o||!s,onClick:u,children:"Restart"}),F.jsx("button",{type:"button",disabled:o||!s,onClick:a,children:"Stop"})]})]})}function F0(n){return n==="dangerously-skip-permissions"?"--dangerously-skip-permissions":n}function q0(n,s){const l={};return(n[n.length-1]===""?[...n,""]:n).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const V0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Y0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,G0={};function qp(n,s){return(G0.jsx?Y0:V0).test(n)}const W0=/[ \t\n\f\r]/g;function K0(n){return typeof n=="object"?n.type==="text"?Vp(n.value):!1:Vp(n)}function Vp(n){return n.replace(W0,"")===""}class zs{constructor(s,l,o){this.normal=l,this.property=s,o&&(this.space=o)}}zs.prototype.normal={};zs.prototype.property={};zs.prototype.space=void 0;function z_(n,s){const l={},o={};for(const S of n)Object.assign(l,S.property),Object.assign(o,S.normal);return new zs(l,o,s)}function ec(n){return n.toLowerCase()}class qt{constructor(s,l){this.attribute=l,this.property=s}}qt.prototype.attribute="";qt.prototype.booleanish=!1;qt.prototype.boolean=!1;qt.prototype.commaOrSpaceSeparated=!1;qt.prototype.commaSeparated=!1;qt.prototype.defined=!1;qt.prototype.mustUseProperty=!1;qt.prototype.number=!1;qt.prototype.overloadedBoolean=!1;qt.prototype.property="";qt.prototype.spaceSeparated=!1;qt.prototype.space=void 0;let X0=0;const Me=Ii(),_t=Ii(),tc=Ii(),me=Ii(),nt=Ii(),Tr=Ii(),Qt=Ii();function Ii(){return 2**++X0}const nc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Me,booleanish:_t,commaOrSpaceSeparated:Qt,commaSeparated:Tr,number:me,overloadedBoolean:tc,spaceSeparated:nt},Symbol.toStringTag,{value:"Module"})),Nu=Object.keys(nc);class dc extends qt{constructor(s,l,o,S){let C=-1;if(super(s,l),Yp(this,"space",S),typeof o=="number")for(;++C<Nu.length;){const g=Nu[C];Yp(this,Nu[C],(o&nc[g])===nc[g])}}}dc.prototype.defined=!0;function Yp(n,s,l){l&&(n[s]=l)}function Rr(n){const s={},l={};for(const[o,S]of Object.entries(n.properties)){const C=new dc(o,n.transform(n.attributes||{},o),S,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(C.mustUseProperty=!0),s[o]=C,l[ec(o)]=o,l[ec(C.attribute)]=o}return new zs(s,l,n.space)}const H_=Rr({properties:{ariaActiveDescendant:null,ariaAtomic:_t,ariaAutoComplete:null,ariaBusy:_t,ariaChecked:_t,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:nt,ariaCurrent:null,ariaDescribedBy:nt,ariaDetails:null,ariaDisabled:_t,ariaDropEffect:nt,ariaErrorMessage:null,ariaExpanded:_t,ariaFlowTo:nt,ariaGrabbed:_t,ariaHasPopup:null,ariaHidden:_t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:nt,ariaLevel:me,ariaLive:null,ariaModal:_t,ariaMultiLine:_t,ariaMultiSelectable:_t,ariaOrientation:null,ariaOwns:nt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:_t,ariaReadOnly:_t,ariaRelevant:null,ariaRequired:_t,ariaRoleDescription:nt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:_t,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(n,s){return s==="role"?s:"aria-"+s.slice(4).toLowerCase()}});function N_(n,s){return s in n?n[s]:s}function j_(n,s){return N_(n,s.toLowerCase())}const $0=Rr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Tr,acceptCharset:nt,accessKey:nt,action:null,allow:null,allowFullScreen:Me,allowPaymentRequest:Me,allowUserMedia:Me,alt:null,as:null,async:Me,autoCapitalize:null,autoComplete:nt,autoFocus:Me,autoPlay:Me,blocking:nt,capture:null,charSet:null,checked:Me,cite:null,className:nt,cols:me,colSpan:null,content:null,contentEditable:_t,controls:Me,controlsList:nt,coords:me|Tr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Me,defer:Me,dir:null,dirName:null,disabled:Me,download:tc,draggable:_t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Me,formTarget:null,headers:nt,height:me,hidden:tc,high:me,href:null,hrefLang:null,htmlFor:nt,httpEquiv:nt,id:null,imageSizes:null,imageSrcSet:null,inert:Me,inputMode:null,integrity:null,is:null,isMap:Me,itemId:null,itemProp:nt,itemRef:nt,itemScope:Me,itemType:nt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Me,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:Me,muted:Me,name:null,nonce:null,noModule:Me,noValidate:Me,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:Me,optimum:me,pattern:null,ping:nt,placeholder:null,playsInline:Me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Me,referrerPolicy:null,rel:nt,required:Me,reversed:Me,rows:me,rowSpan:me,sandbox:nt,scope:null,scoped:Me,seamless:Me,selected:Me,shadowRootClonable:Me,shadowRootDelegatesFocus:Me,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:_t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:Me,useMap:null,value:_t,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:nt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Me,declare:Me,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:Me,noHref:Me,noShade:Me,noWrap:Me,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:_t,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Me,disableRemotePlayback:Me,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:j_}),Q0=Rr({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:Qt,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:nt,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:Me,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:Tr,g2:Tr,glyphName:Tr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:nt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qt,rev:Qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qt,requiredFeatures:Qt,requiredFonts:Qt,requiredFormats:Qt,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qt,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:N_}),U_=Rr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,s){return"xlink:"+s.slice(5).toLowerCase()}}),I_=Rr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:j_}),P_=Rr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,s){return"xml:"+s.slice(3).toLowerCase()}}),Z0={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"},J0=/[A-Z]/g,Gp=/-[a-z]/g,eS=/^data[-\w.:]+$/i;function tS(n,s){const l=ec(s);let o=s,S=qt;if(l in n.normal)return n.property[n.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&eS.test(s)){if(s.charAt(4)==="-"){const C=s.slice(5).replace(Gp,iS);o="data"+C.charAt(0).toUpperCase()+C.slice(1)}else{const C=s.slice(4);if(!Gp.test(C)){let g=C.replace(J0,nS);g.charAt(0)!=="-"&&(g="-"+g),s="data"+g}}S=dc}return new S(o,s)}function nS(n){return"-"+n.toLowerCase()}function iS(n){return n.charAt(1).toUpperCase()}const rS=z_([H_,$0,U_,I_,P_],"html"),pc=z_([H_,Q0,U_,I_,P_],"svg");function sS(n){return n.join(" ").trim()}var Er={},ju,Wp;function lS(){if(Wp)return ju;Wp=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,s=/\n/g,l=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,S=/^:\s*/,C=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,g=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
|
|
59
|
+
`,h="/",p="*",c="",b="comment",w="declaration";function k(v,_){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];_=_||{};var d=1,m=1;function E(G){var K=G.match(s);K&&(d+=K.length);var Y=G.lastIndexOf(u);m=~Y?G.length-Y:m+G.length}function R(){var G={line:d,column:m};return function(K){return K.position=new A(G),z(),K}}function A(G){this.start=G,this.end={line:d,column:m},this.source=_.source}A.prototype.content=v;function L(G){var K=new Error(_.source+":"+d+":"+m+": "+G);if(K.reason=G,K.filename=_.source,K.line=d,K.column=m,K.source=v,!_.silent)throw K}function T(G){var K=G.exec(v);if(K){var Y=K[0];return E(Y),v=v.slice(Y.length),K}}function z(){T(l)}function H(G){var K;for(G=G||[];K=q();)K!==!1&&G.push(K);return G}function q(){var G=R();if(!(h!=v.charAt(0)||p!=v.charAt(1))){for(var K=2;c!=v.charAt(K)&&(p!=v.charAt(K)||h!=v.charAt(K+1));)++K;if(K+=2,c===v.charAt(K-1))return L("End of comment missing");var Y=v.slice(2,K-2);return m+=2,E(Y),v=v.slice(K),m+=2,G({type:b,comment:Y})}}function V(){var G=R(),K=T(o);if(K){if(q(),!T(S))return L("property missing ':'");var Y=T(C),Z=G({type:w,property:x(K[0].replace(n,c)),value:Y?x(Y[0].replace(n,c)):c});return T(g),Z}}function I(){var G=[];H(G);for(var K;K=V();)K!==!1&&(G.push(K),H(G));return G}return z(),I()}function x(v){return v?v.replace(a,c):c}return ju=k,ju}var Kp;function aS(){if(Kp)return Er;Kp=1;var n=Er&&Er.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Er,"__esModule",{value:!0}),Er.default=l;const s=n(lS());function l(o,S){let C=null;if(!o||typeof o!="string")return C;const g=(0,s.default)(o),a=typeof S=="function";return g.forEach(u=>{if(u.type!=="declaration")return;const{property:h,value:p}=u;a?S(h,p,u):p&&(C=C||{},C[h]=p)}),C}return Er}var Es={},Xp;function oS(){if(Xp)return Es;Xp=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,s=/-([a-z])/g,l=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,S=/^-(ms)-/,C=function(h){return!h||l.test(h)||n.test(h)},g=function(h,p){return p.toUpperCase()},a=function(h,p){return"".concat(p,"-")},u=function(h,p){return p===void 0&&(p={}),C(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(S,a):h=h.replace(o,a),h.replace(s,g))};return Es.camelCase=u,Es}var ks,$p;function uS(){if($p)return ks;$p=1;var n=ks&&ks.__importDefault||function(S){return S&&S.__esModule?S:{default:S}},s=n(aS()),l=oS();function o(S,C){var g={};return!S||typeof S!="string"||(0,s.default)(S,function(a,u){a&&u&&(g[(0,l.camelCase)(a,C)]=u)}),g}return o.default=o,ks=o,ks}var cS=uS();const hS=M_(cS),F_=q_("end"),_c=q_("start");function q_(n){return s;function s(l){const o=l&&l.position&&l.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 fS(n){const s=_c(n),l=F_(n);if(s&&l)return{start:s,end:l}}function Ds(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Qp(n.position):"start"in n||"end"in n?Qp(n):"line"in n||"column"in n?ic(n):""}function ic(n){return Zp(n&&n.line)+":"+Zp(n&&n.column)}function Qp(n){return ic(n&&n.start)+"-"+ic(n&&n.end)}function Zp(n){return n&&typeof n=="number"?n:1}class Rt extends Error{constructor(s,l,o){super(),typeof l=="string"&&(o=l,l=void 0);let S="",C={},g=!1;if(l&&("line"in l&&"column"in l?C={place:l}:"start"in l&&"end"in l?C={place:l}:"type"in l?C={ancestors:[l],place:l.position}:C={...l}),typeof s=="string"?S=s:!C.cause&&s&&(g=!0,S=s.message,C.cause=s),!C.ruleId&&!C.source&&typeof o=="string"){const u=o.indexOf(":");u===-1?C.ruleId=o:(C.source=o.slice(0,u),C.ruleId=o.slice(u+1))}if(!C.place&&C.ancestors&&C.ancestors){const u=C.ancestors[C.ancestors.length-1];u&&(C.place=u.position)}const a=C.place&&"start"in C.place?C.place.start:C.place;this.ancestors=C.ancestors||void 0,this.cause=C.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=S,this.line=a?a.line:void 0,this.name=Ds(C.place)||"1:1",this.place=C.place||void 0,this.reason=this.message,this.ruleId=C.ruleId||void 0,this.source=C.source||void 0,this.stack=g&&C.cause&&typeof C.cause.stack=="string"?C.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Rt.prototype.file="";Rt.prototype.name="";Rt.prototype.reason="";Rt.prototype.message="";Rt.prototype.stack="";Rt.prototype.column=void 0;Rt.prototype.line=void 0;Rt.prototype.ancestors=void 0;Rt.prototype.cause=void 0;Rt.prototype.fatal=void 0;Rt.prototype.place=void 0;Rt.prototype.ruleId=void 0;Rt.prototype.source=void 0;const mc={}.hasOwnProperty,dS=new Map,pS=/[A-Z]/g,_S=new Set(["table","tbody","thead","tfoot","tr"]),mS=new Set(["td","th"]),V_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gS(n,s){if(!s||s.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=s.filePath||void 0;let o;if(s.development){if(typeof s.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=ES(l,s.jsxDEV)}else{if(typeof s.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof s.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=xS(l,s.jsx,s.jsxs)}const S={Fragment:s.Fragment,ancestors:[],components:s.components||{},create:o,elementAttributeNameCase:s.elementAttributeNameCase||"react",evaluater:s.createEvaluater?s.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:s.ignoreInvalidStyle||!1,passKeys:s.passKeys!==!1,passNode:s.passNode||!1,schema:s.space==="svg"?pc:rS,stylePropertyNameCase:s.stylePropertyNameCase||"dom",tableCellAlignToStyle:s.tableCellAlignToStyle!==!1},C=Y_(S,n,void 0);return C&&typeof C!="string"?C:S.create(n,S.Fragment,{children:C||void 0},void 0)}function Y_(n,s,l){if(s.type==="element")return vS(n,s,l);if(s.type==="mdxFlowExpression"||s.type==="mdxTextExpression")return SS(n,s);if(s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement")return bS(n,s,l);if(s.type==="mdxjsEsm")return yS(n,s);if(s.type==="root")return CS(n,s,l);if(s.type==="text")return wS(n,s)}function vS(n,s,l){const o=n.schema;let S=o;s.tagName.toLowerCase()==="svg"&&o.space==="html"&&(S=pc,n.schema=S),n.ancestors.push(s);const C=W_(n,s.tagName,!1),g=kS(n,s);let a=vc(n,s);return _S.has(s.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!K0(u):!0})),G_(n,g,C,s),gc(g,a),n.ancestors.pop(),n.schema=o,n.create(s,C,g,l)}function SS(n,s){if(s.data&&s.data.estree&&n.evaluater){const o=s.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}Ms(n,s.position)}function yS(n,s){if(s.data&&s.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(s.data.estree);Ms(n,s.position)}function bS(n,s,l){const o=n.schema;let S=o;s.name==="svg"&&o.space==="html"&&(S=pc,n.schema=S),n.ancestors.push(s);const C=s.name===null?n.Fragment:W_(n,s.name,!0),g=AS(n,s),a=vc(n,s);return G_(n,g,C,s),gc(g,a),n.ancestors.pop(),n.schema=o,n.create(s,C,g,l)}function CS(n,s,l){const o={};return gc(o,vc(n,s)),n.create(s,n.Fragment,o,l)}function wS(n,s){return s.value}function G_(n,s,l,o){typeof l!="string"&&l!==n.Fragment&&n.passNode&&(s.node=o)}function gc(n,s){if(s.length>0){const l=s.length>1?s:s[0];l&&(n.children=l)}}function xS(n,s,l){return o;function o(S,C,g,a){const h=Array.isArray(g.children)?l:s;return a?h(C,g,a):h(C,g)}}function ES(n,s){return l;function l(o,S,C,g){const a=Array.isArray(C.children),u=_c(o);return s(S,C,g,a,{columnNumber:u?u.column-1:void 0,fileName:n,lineNumber:u?u.line:void 0},void 0)}}function kS(n,s){const l={};let o,S;for(S in s.properties)if(S!=="children"&&mc.call(s.properties,S)){const C=TS(n,S,s.properties[S]);if(C){const[g,a]=C;n.tableCellAlignToStyle&&g==="align"&&typeof a=="string"&&mS.has(s.tagName)?o=a:l[g]=a}}if(o){const C=l.style||(l.style={});C[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return l}function AS(n,s){const l={};for(const o of s.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const C=o.data.estree.body[0];C.type;const g=C.expression;g.type;const a=g.properties[0];a.type,Object.assign(l,n.evaluater.evaluateExpression(a.argument))}else Ms(n,s.position);else{const S=o.name;let C;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,C=n.evaluater.evaluateExpression(a.expression)}else Ms(n,s.position);else C=o.value===null?!0:o.value;l[S]=C}return l}function vc(n,s){const l=[];let o=-1;const S=n.passKeys?new Map:dS;for(;++o<s.children.length;){const C=s.children[o];let g;if(n.passKeys){const u=C.type==="element"?C.tagName:C.type==="mdxJsxFlowElement"||C.type==="mdxJsxTextElement"?C.name:void 0;if(u){const h=S.get(u)||0;g=u+"-"+h,S.set(u,h+1)}}const a=Y_(n,C,g);a!==void 0&&l.push(a)}return l}function TS(n,s,l){const o=tS(n.schema,s);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=o.commaSeparated?q0(l):sS(l)),o.property==="style"){let S=typeof l=="object"?l:DS(n,String(l));return n.stylePropertyNameCase==="css"&&(S=RS(S)),["style",S]}return[n.elementAttributeNameCase==="react"&&o.space?Z0[o.property]||o.property:o.attribute,l]}}function DS(n,s){try{return hS(s,{reactCompat:!0})}catch(l){if(n.ignoreInvalidStyle)return{};const o=l,S=new Rt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw S.file=n.filePath||void 0,S.url=V_+"#cannot-parse-style-attribute",S}}function W_(n,s,l){let o;if(!l)o={type:"Literal",value:s};else if(s.includes(".")){const S=s.split(".");let C=-1,g;for(;++C<S.length;){const a=qp(S[C])?{type:"Identifier",name:S[C]}:{type:"Literal",value:S[C]};g=g?{type:"MemberExpression",object:g,property:a,computed:!!(C&&a.type==="Literal"),optional:!1}:a}o=g}else o=qp(s)&&!/^[a-z]/.test(s)?{type:"Identifier",name:s}:{type:"Literal",value:s};if(o.type==="Literal"){const S=o.value;return mc.call(n.components,S)?n.components[S]:S}if(n.evaluater)return n.evaluater.evaluateExpression(o);Ms(n)}function Ms(n,s){const l=new Rt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:s,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=n.filePath||void 0,l.url=V_+"#cannot-handle-mdx-estrees-without-createevaluater",l}function RS(n){const s={};let l;for(l in n)mc.call(n,l)&&(s[LS(l)]=n[l]);return s}function LS(n){let s=n.replace(pS,MS);return s.slice(0,3)==="ms-"&&(s="-"+s),s}function MS(n){return"-"+n.toLowerCase()}const Uu={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"]},OS={};function Sc(n,s){const l=OS,o=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,S=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return K_(n,o,S)}function K_(n,s,l){if(BS(n)){if("value"in n)return n.type==="html"&&!l?"":n.value;if(s&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Jp(n.children,s,l)}return Array.isArray(n)?Jp(n,s,l):""}function Jp(n,s,l){const o=[];let S=-1;for(;++S<n.length;)o[S]=K_(n[S],s,l);return o.join("")}function BS(n){return!!(n&&typeof n=="object")}const e_=document.createElement("i");function yc(n){const s="&"+n+";";e_.innerHTML=s;const l=e_.textContent;return l.charCodeAt(l.length-1)===59&&n!=="semi"||l===s?!1:l}function Zt(n,s,l,o){const S=n.length;let C=0,g;if(s<0?s=-s>S?0:S+s:s=s>S?S:s,l=l>0?l:0,o.length<1e4)g=Array.from(o),g.unshift(s,l),n.splice(...g);else for(l&&n.splice(s,l);C<o.length;)g=o.slice(C,C+1e4),g.unshift(s,0),n.splice(...g),C+=1e4,s+=1e4}function cn(n,s){return n.length>0?(Zt(n,n.length,0,s),n):s}const t_={}.hasOwnProperty;function X_(n){const s={};let l=-1;for(;++l<n.length;)zS(s,n[l]);return s}function zS(n,s){let l;for(l in s){const S=(t_.call(n,l)?n[l]:void 0)||(n[l]={}),C=s[l];let g;if(C)for(g in C){t_.call(S,g)||(S[g]=[]);const a=C[g];HS(S[g],Array.isArray(a)?a:a?[a]:[])}}}function HS(n,s){let l=-1;const o=[];for(;++l<s.length;)(s[l].add==="after"?n:o).push(s[l]);Zt(n,0,0,o)}function $_(n,s){const l=Number.parseInt(n,s);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function _n(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mt=vi(/[A-Za-z]/),Dt=vi(/[\dA-Za-z]/),NS=vi(/[#-'*+\--9=?A-Z^-~]/);function sa(n){return n!==null&&(n<32||n===127)}const rc=vi(/\d/),jS=vi(/[\dA-Fa-f]/),US=vi(/[!-/:-@[-`{-~]/);function Ee(n){return n!==null&&n<-2}function tt(n){return n!==null&&(n<0||n===32)}function Ne(n){return n===-2||n===-1||n===32}const ca=vi(new RegExp("\\p{P}|\\p{S}","u")),Ui=vi(/\s/);function vi(n){return s;function s(l){return l!==null&&l>-1&&n.test(String.fromCharCode(l))}}function Lr(n){const s=[];let l=-1,o=0,S=0;for(;++l<n.length;){const C=n.charCodeAt(l);let g="";if(C===37&&Dt(n.charCodeAt(l+1))&&Dt(n.charCodeAt(l+2)))S=2;else if(C<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(C))||(g=String.fromCharCode(C));else if(C>55295&&C<57344){const a=n.charCodeAt(l+1);C<56320&&a>56319&&a<57344?(g=String.fromCharCode(C,a),S=1):g="�"}else g=String.fromCharCode(C);g&&(s.push(n.slice(o,l),encodeURIComponent(g)),o=l+S+1,g=""),S&&(l+=S,S=0)}return s.join("")+n.slice(o)}function Fe(n,s,l,o){const S=o?o-1:Number.POSITIVE_INFINITY;let C=0;return g;function g(u){return Ne(u)?(n.enter(l),a(u)):s(u)}function a(u){return Ne(u)&&C++<S?(n.consume(u),a):(n.exit(l),s(u))}}const IS={tokenize:PS};function PS(n){const s=n.attempt(this.parser.constructs.contentInitial,o,S);let l;return s;function o(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),Fe(n,s,"linePrefix")}function S(a){return n.enter("paragraph"),C(a)}function C(a){const u=n.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=u),l=u,g(a)}function g(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return Ee(a)?(n.consume(a),n.exit("chunkText"),C):(n.consume(a),g)}}const FS={tokenize:qS},n_={tokenize:VS};function qS(n){const s=this,l=[];let o=0,S,C,g;return a;function a(m){if(o<l.length){const E=l[o];return s.containerState=E[1],n.attempt(E[0].continuation,u,h)(m)}return h(m)}function u(m){if(o++,s.containerState._closeFlow){s.containerState._closeFlow=void 0,S&&d();const E=s.events.length;let R=E,A;for(;R--;)if(s.events[R][0]==="exit"&&s.events[R][1].type==="chunkFlow"){A=s.events[R][1].end;break}_(o);let L=E;for(;L<s.events.length;)s.events[L][1].end={...A},L++;return Zt(s.events,R+1,0,s.events.slice(E)),s.events.length=L,h(m)}return a(m)}function h(m){if(o===l.length){if(!S)return b(m);if(S.currentConstruct&&S.currentConstruct.concrete)return k(m);s.interrupt=!!(S.currentConstruct&&!S._gfmTableDynamicInterruptHack)}return s.containerState={},n.check(n_,p,c)(m)}function p(m){return S&&d(),_(o),b(m)}function c(m){return s.parser.lazy[s.now().line]=o!==l.length,g=s.now().offset,k(m)}function b(m){return s.containerState={},n.attempt(n_,w,k)(m)}function w(m){return o++,l.push([s.currentConstruct,s.containerState]),b(m)}function k(m){if(m===null){S&&d(),_(0),n.consume(m);return}return S=S||s.parser.flow(s.now()),n.enter("chunkFlow",{_tokenizer:S,contentType:"flow",previous:C}),x(m)}function x(m){if(m===null){v(n.exit("chunkFlow"),!0),_(0),n.consume(m);return}return Ee(m)?(n.consume(m),v(n.exit("chunkFlow")),o=0,s.interrupt=void 0,a):(n.consume(m),x)}function v(m,E){const R=s.sliceStream(m);if(E&&R.push(null),m.previous=C,C&&(C.next=m),C=m,S.defineSkip(m.start),S.write(R),s.parser.lazy[m.start.line]){let A=S.events.length;for(;A--;)if(S.events[A][1].start.offset<g&&(!S.events[A][1].end||S.events[A][1].end.offset>g))return;const L=s.events.length;let T=L,z,H;for(;T--;)if(s.events[T][0]==="exit"&&s.events[T][1].type==="chunkFlow"){if(z){H=s.events[T][1].end;break}z=!0}for(_(o),A=L;A<s.events.length;)s.events[A][1].end={...H},A++;Zt(s.events,T+1,0,s.events.slice(L)),s.events.length=A}}function _(m){let E=l.length;for(;E-- >m;){const R=l[E];s.containerState=R[1],R[0].exit.call(s,n)}l.length=m}function d(){S.write([null]),C=void 0,S=void 0,s.containerState._closeFlow=void 0}}function VS(n,s,l){return Fe(n,n.attempt(this.parser.constructs.document,s,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Dr(n){if(n===null||tt(n)||Ui(n))return 1;if(ca(n))return 2}function ha(n,s,l){const o=[];let S=-1;for(;++S<n.length;){const C=n[S].resolveAll;C&&!o.includes(C)&&(s=C(s,l),o.push(C))}return s}const sc={name:"attention",resolveAll:YS,tokenize:GS};function YS(n,s){let l=-1,o,S,C,g,a,u,h,p;for(;++l<n.length;)if(n[l][0]==="enter"&&n[l][1].type==="attentionSequence"&&n[l][1]._close){for(o=l;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&s.sliceSerialize(n[o][1]).charCodeAt(0)===s.sliceSerialize(n[l][1]).charCodeAt(0)){if((n[o][1]._close||n[l][1]._open)&&(n[l][1].end.offset-n[l][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[l][1].end.offset-n[l][1].start.offset)%3))continue;u=n[o][1].end.offset-n[o][1].start.offset>1&&n[l][1].end.offset-n[l][1].start.offset>1?2:1;const c={...n[o][1].end},b={...n[l][1].start};i_(c,-u),i_(b,u),g={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...n[o][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...n[l][1].start},end:b},C={type:u>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[l][1].start}},S={type:u>1?"strong":"emphasis",start:{...g.start},end:{...a.end}},n[o][1].end={...g.start},n[l][1].start={...a.end},h=[],n[o][1].end.offset-n[o][1].start.offset&&(h=cn(h,[["enter",n[o][1],s],["exit",n[o][1],s]])),h=cn(h,[["enter",S,s],["enter",g,s],["exit",g,s],["enter",C,s]]),h=cn(h,ha(s.parser.constructs.insideSpan.null,n.slice(o+1,l),s)),h=cn(h,[["exit",C,s],["enter",a,s],["exit",a,s],["exit",S,s]]),n[l][1].end.offset-n[l][1].start.offset?(p=2,h=cn(h,[["enter",n[l][1],s],["exit",n[l][1],s]])):p=0,Zt(n,o-1,l-o+3,h),l=o+h.length-p-2;break}}for(l=-1;++l<n.length;)n[l][1].type==="attentionSequence"&&(n[l][1].type="data");return n}function GS(n,s){const l=this.parser.constructs.attentionMarkers.null,o=this.previous,S=Dr(o);let C;return g;function g(u){return C=u,n.enter("attentionSequence"),a(u)}function a(u){if(u===C)return n.consume(u),a;const h=n.exit("attentionSequence"),p=Dr(u),c=!p||p===2&&S||l.includes(u),b=!S||S===2&&p||l.includes(o);return h._open=!!(C===42?c:c&&(S||!b)),h._close=!!(C===42?b:b&&(p||!c)),s(u)}}function i_(n,s){n.column+=s,n.offset+=s,n._bufferIndex+=s}const WS={name:"autolink",tokenize:KS};function KS(n,s,l){let o=0;return S;function S(w){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),C}function C(w){return Mt(w)?(n.consume(w),g):w===64?l(w):h(w)}function g(w){return w===43||w===45||w===46||Dt(w)?(o=1,a(w)):h(w)}function a(w){return w===58?(n.consume(w),o=0,u):(w===43||w===45||w===46||Dt(w))&&o++<32?(n.consume(w),a):(o=0,h(w))}function u(w){return w===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),s):w===null||w===32||w===60||sa(w)?l(w):(n.consume(w),u)}function h(w){return w===64?(n.consume(w),p):NS(w)?(n.consume(w),h):l(w)}function p(w){return Dt(w)?c(w):l(w)}function c(w){return w===46?(n.consume(w),o=0,p):w===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),s):b(w)}function b(w){if((w===45||Dt(w))&&o++<63){const k=w===45?b:c;return n.consume(w),k}return l(w)}}const Hs={partial:!0,tokenize:XS};function XS(n,s,l){return o;function o(C){return Ne(C)?Fe(n,S,"linePrefix")(C):S(C)}function S(C){return C===null||Ee(C)?s(C):l(C)}}const Q_={continuation:{tokenize:QS},exit:ZS,name:"blockQuote",tokenize:$S};function $S(n,s,l){const o=this;return S;function S(g){if(g===62){const a=o.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(g),n.exit("blockQuoteMarker"),C}return l(g)}function C(g){return Ne(g)?(n.enter("blockQuotePrefixWhitespace"),n.consume(g),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),s):(n.exit("blockQuotePrefix"),s(g))}}function QS(n,s,l){const o=this;return S;function S(g){return Ne(g)?Fe(n,C,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):C(g)}function C(g){return n.attempt(Q_,s,l)(g)}}function ZS(n){n.exit("blockQuote")}const Z_={name:"characterEscape",tokenize:JS};function JS(n,s,l){return o;function o(C){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(C),n.exit("escapeMarker"),S}function S(C){return US(C)?(n.enter("characterEscapeValue"),n.consume(C),n.exit("characterEscapeValue"),n.exit("characterEscape"),s):l(C)}}const J_={name:"characterReference",tokenize:ey};function ey(n,s,l){const o=this;let S=0,C,g;return a;function a(c){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),u}function u(c){return c===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(c),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),C=31,g=Dt,p(c))}function h(c){return c===88||c===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(c),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),C=6,g=jS,p):(n.enter("characterReferenceValue"),C=7,g=rc,p(c))}function p(c){if(c===59&&S){const b=n.exit("characterReferenceValue");return g===Dt&&!yc(o.sliceSerialize(b))?l(c):(n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),n.exit("characterReference"),s)}return g(c)&&S++<C?(n.consume(c),p):l(c)}}const r_={partial:!0,tokenize:ny},s_={concrete:!0,name:"codeFenced",tokenize:ty};function ty(n,s,l){const o=this,S={partial:!0,tokenize:R};let C=0,g=0,a;return u;function u(A){return h(A)}function h(A){const L=o.events[o.events.length-1];return C=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,a=A,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),p(A)}function p(A){return A===a?(g++,n.consume(A),p):g<3?l(A):(n.exit("codeFencedFenceSequence"),Ne(A)?Fe(n,c,"whitespace")(A):c(A))}function c(A){return A===null||Ee(A)?(n.exit("codeFencedFence"),o.interrupt?s(A):n.check(r_,x,E)(A)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||Ee(A)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),c(A)):Ne(A)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Fe(n,w,"whitespace")(A)):A===96&&A===a?l(A):(n.consume(A),b)}function w(A){return A===null||Ee(A)?c(A):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(A))}function k(A){return A===null||Ee(A)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),c(A)):A===96&&A===a?l(A):(n.consume(A),k)}function x(A){return n.attempt(S,E,v)(A)}function v(A){return n.enter("lineEnding"),n.consume(A),n.exit("lineEnding"),_}function _(A){return C>0&&Ne(A)?Fe(n,d,"linePrefix",C+1)(A):d(A)}function d(A){return A===null||Ee(A)?n.check(r_,x,E)(A):(n.enter("codeFlowValue"),m(A))}function m(A){return A===null||Ee(A)?(n.exit("codeFlowValue"),d(A)):(n.consume(A),m)}function E(A){return n.exit("codeFenced"),s(A)}function R(A,L,T){let z=0;return H;function H(K){return A.enter("lineEnding"),A.consume(K),A.exit("lineEnding"),q}function q(K){return A.enter("codeFencedFence"),Ne(K)?Fe(A,V,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):V(K)}function V(K){return K===a?(A.enter("codeFencedFenceSequence"),I(K)):T(K)}function I(K){return K===a?(z++,A.consume(K),I):z>=g?(A.exit("codeFencedFenceSequence"),Ne(K)?Fe(A,G,"whitespace")(K):G(K)):T(K)}function G(K){return K===null||Ee(K)?(A.exit("codeFencedFence"),L(K)):T(K)}}}function ny(n,s,l){const o=this;return S;function S(g){return g===null?l(g):(n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),C)}function C(g){return o.parser.lazy[o.now().line]?l(g):s(g)}}const Iu={name:"codeIndented",tokenize:ry},iy={partial:!0,tokenize:sy};function ry(n,s,l){const o=this;return S;function S(h){return n.enter("codeIndented"),Fe(n,C,"linePrefix",5)(h)}function C(h){const p=o.events[o.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?g(h):l(h)}function g(h){return h===null?u(h):Ee(h)?n.attempt(iy,g,u)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||Ee(h)?(n.exit("codeFlowValue"),g(h)):(n.consume(h),a)}function u(h){return n.exit("codeIndented"),s(h)}}function sy(n,s,l){const o=this;return S;function S(g){return o.parser.lazy[o.now().line]?l(g):Ee(g)?(n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),S):Fe(n,C,"linePrefix",5)(g)}function C(g){const a=o.events[o.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?s(g):Ee(g)?S(g):l(g)}}const ly={name:"codeText",previous:oy,resolve:ay,tokenize:uy};function ay(n){let s=n.length-4,l=3,o,S;if((n[l][1].type==="lineEnding"||n[l][1].type==="space")&&(n[s][1].type==="lineEnding"||n[s][1].type==="space")){for(o=l;++o<s;)if(n[o][1].type==="codeTextData"){n[l][1].type="codeTextPadding",n[s][1].type="codeTextPadding",l+=2,s-=2;break}}for(o=l-1,s++;++o<=s;)S===void 0?o!==s&&n[o][1].type!=="lineEnding"&&(S=o):(o===s||n[o][1].type==="lineEnding")&&(n[S][1].type="codeTextData",o!==S+2&&(n[S][1].end=n[o-1][1].end,n.splice(S+2,o-S-2),s-=o-S-2,o=S+2),S=void 0);return n}function oy(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uy(n,s,l){let o=0,S,C;return g;function g(c){return n.enter("codeText"),n.enter("codeTextSequence"),a(c)}function a(c){return c===96?(n.consume(c),o++,a):(n.exit("codeTextSequence"),u(c))}function u(c){return c===null?l(c):c===32?(n.enter("space"),n.consume(c),n.exit("space"),u):c===96?(C=n.enter("codeTextSequence"),S=0,p(c)):Ee(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),u):(n.enter("codeTextData"),h(c))}function h(c){return c===null||c===32||c===96||Ee(c)?(n.exit("codeTextData"),u(c)):(n.consume(c),h)}function p(c){return c===96?(n.consume(c),S++,p):S===o?(n.exit("codeTextSequence"),n.exit("codeText"),s(c)):(C.type="codeTextData",h(c))}}class cy{constructor(s){this.left=s?[...s]:[],this.right=[]}get(s){if(s<0||s>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+s+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return s<this.left.length?this.left[s]:this.right[this.right.length-s+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(s,l){const o=l??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(s,o):s>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-s+this.left.length).reverse():this.left.slice(s).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(s,l,o){const S=l||0;this.setCursor(Math.trunc(s));const C=this.right.splice(this.right.length-S,Number.POSITIVE_INFINITY);return o&&As(this.left,o),C.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(s){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(s)}pushMany(s){this.setCursor(Number.POSITIVE_INFINITY),As(this.left,s)}unshift(s){this.setCursor(0),this.right.push(s)}unshiftMany(s){this.setCursor(0),As(this.right,s.reverse())}setCursor(s){if(!(s===this.left.length||s>this.left.length&&this.right.length===0||s<0&&this.left.length===0))if(s<this.left.length){const l=this.left.splice(s,Number.POSITIVE_INFINITY);As(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-s,Number.POSITIVE_INFINITY);As(this.left,l.reverse())}}}function As(n,s){let l=0;if(s.length<1e4)n.push(...s);else for(;l<s.length;)n.push(...s.slice(l,l+1e4)),l+=1e4}function em(n){const s={};let l=-1,o,S,C,g,a,u,h;const p=new cy(n);for(;++l<p.length;){for(;l in s;)l=s[l];if(o=p.get(l),l&&o[1].type==="chunkFlow"&&p.get(l-1)[1].type==="listItemPrefix"&&(u=o[1]._tokenizer.events,C=0,C<u.length&&u[C][1].type==="lineEndingBlank"&&(C+=2),C<u.length&&u[C][1].type==="content"))for(;++C<u.length&&u[C][1].type!=="content";)u[C][1].type==="chunkText"&&(u[C][1]._isInFirstContentOfListItem=!0,C++);if(o[0]==="enter")o[1].contentType&&(Object.assign(s,hy(p,l)),l=s[l],h=!0);else if(o[1]._container){for(C=l,S=void 0;C--;)if(g=p.get(C),g[1].type==="lineEnding"||g[1].type==="lineEndingBlank")g[0]==="enter"&&(S&&(p.get(S)[1].type="lineEndingBlank"),g[1].type="lineEnding",S=C);else if(!(g[1].type==="linePrefix"||g[1].type==="listItemIndent"))break;S&&(o[1].end={...p.get(S)[1].start},a=p.slice(S,l),a.unshift(o),p.splice(S,l-S+1,a))}}return Zt(n,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function hy(n,s){const l=n.get(s)[1],o=n.get(s)[2];let S=s-1;const C=[];let g=l._tokenizer;g||(g=o.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(g._contentTypeTextTrailing=!0));const a=g.events,u=[],h={};let p,c,b=-1,w=l,k=0,x=0;const v=[x];for(;w;){for(;n.get(++S)[1]!==w;);C.push(S),w._tokenizer||(p=o.sliceStream(w),w.next||p.push(null),c&&g.defineSkip(w.start),w._isInFirstContentOfListItem&&(g._gfmTasklistFirstContentOfListItem=!0),g.write(p),w._isInFirstContentOfListItem&&(g._gfmTasklistFirstContentOfListItem=void 0)),c=w,w=w.next}for(w=l;++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,v.push(x),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(g.events=[],w?(w._tokenizer=void 0,w.previous=void 0):v.pop(),b=v.length;b--;){const _=a.slice(v[b],v[b+1]),d=C.pop();u.push([d,d+_.length-1]),n.splice(d,2,_)}for(u.reverse(),b=-1;++b<u.length;)h[k+u[b][0]]=k+u[b][1],k+=u[b][1]-u[b][0]-1;return h}const fy={resolve:py,tokenize:_y},dy={partial:!0,tokenize:my};function py(n){return em(n),n}function _y(n,s){let l;return o;function o(a){return n.enter("content"),l=n.enter("chunkContent",{contentType:"content"}),S(a)}function S(a){return a===null?C(a):Ee(a)?n.check(dy,g,C)(a):(n.consume(a),S)}function C(a){return n.exit("chunkContent"),n.exit("content"),s(a)}function g(a){return n.consume(a),n.exit("chunkContent"),l.next=n.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,S}}function my(n,s,l){const o=this;return S;function S(g){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),Fe(n,C,"linePrefix")}function C(g){if(g===null||Ee(g))return l(g);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?s(g):n.interrupt(o.parser.constructs.flow,l,s)(g)}}function tm(n,s,l,o,S,C,g,a,u){const h=u||Number.POSITIVE_INFINITY;let p=0;return c;function c(_){return _===60?(n.enter(o),n.enter(S),n.enter(C),n.consume(_),n.exit(C),b):_===null||_===32||_===41||sa(_)?l(_):(n.enter(o),n.enter(g),n.enter(a),n.enter("chunkString",{contentType:"string"}),x(_))}function b(_){return _===62?(n.enter(C),n.consume(_),n.exit(C),n.exit(S),n.exit(o),s):(n.enter(a),n.enter("chunkString",{contentType:"string"}),w(_))}function w(_){return _===62?(n.exit("chunkString"),n.exit(a),b(_)):_===null||_===60||Ee(_)?l(_):(n.consume(_),_===92?k:w)}function k(_){return _===60||_===62||_===92?(n.consume(_),w):w(_)}function x(_){return!p&&(_===null||_===41||tt(_))?(n.exit("chunkString"),n.exit(a),n.exit(g),n.exit(o),s(_)):p<h&&_===40?(n.consume(_),p++,x):_===41?(n.consume(_),p--,x):_===null||_===32||_===40||sa(_)?l(_):(n.consume(_),_===92?v:x)}function v(_){return _===40||_===41||_===92?(n.consume(_),x):x(_)}}function nm(n,s,l,o,S,C){const g=this;let a=0,u;return h;function h(w){return n.enter(o),n.enter(S),n.consume(w),n.exit(S),n.enter(C),p}function p(w){return a>999||w===null||w===91||w===93&&!u||w===94&&!a&&"_hiddenFootnoteSupport"in g.parser.constructs?l(w):w===93?(n.exit(C),n.enter(S),n.consume(w),n.exit(S),n.exit(o),s):Ee(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),c(w))}function c(w){return w===null||w===91||w===93||Ee(w)||a++>999?(n.exit("chunkString"),p(w)):(n.consume(w),u||(u=!Ne(w)),w===92?b:c)}function b(w){return w===91||w===92||w===93?(n.consume(w),a++,c):c(w)}}function im(n,s,l,o,S,C){let g;return a;function a(b){return b===34||b===39||b===40?(n.enter(o),n.enter(S),n.consume(b),n.exit(S),g=b===40?41:b,u):l(b)}function u(b){return b===g?(n.enter(S),n.consume(b),n.exit(S),n.exit(o),s):(n.enter(C),h(b))}function h(b){return b===g?(n.exit(C),u(g)):b===null?l(b):Ee(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),Fe(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===g||b===null||Ee(b)?(n.exit("chunkString"),h(b)):(n.consume(b),b===92?c:p)}function c(b){return b===g||b===92?(n.consume(b),p):p(b)}}function Rs(n,s){let l;return o;function o(S){return Ee(S)?(n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),l=!0,o):Ne(S)?Fe(n,o,l?"linePrefix":"lineSuffix")(S):s(S)}}const gy={name:"definition",tokenize:Sy},vy={partial:!0,tokenize:yy};function Sy(n,s,l){const o=this;let S;return C;function C(w){return n.enter("definition"),g(w)}function g(w){return nm.call(o,n,a,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function a(w){return S=_n(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),w===58?(n.enter("definitionMarker"),n.consume(w),n.exit("definitionMarker"),u):l(w)}function u(w){return tt(w)?Rs(n,h)(w):h(w)}function h(w){return tm(n,p,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function p(w){return n.attempt(vy,c,c)(w)}function c(w){return Ne(w)?Fe(n,b,"whitespace")(w):b(w)}function b(w){return w===null||Ee(w)?(n.exit("definition"),o.parser.defined.push(S),s(w)):l(w)}}function yy(n,s,l){return o;function o(a){return tt(a)?Rs(n,S)(a):l(a)}function S(a){return im(n,C,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function C(a){return Ne(a)?Fe(n,g,"whitespace")(a):g(a)}function g(a){return a===null||Ee(a)?s(a):l(a)}}const by={name:"hardBreakEscape",tokenize:Cy};function Cy(n,s,l){return o;function o(C){return n.enter("hardBreakEscape"),n.consume(C),S}function S(C){return Ee(C)?(n.exit("hardBreakEscape"),s(C)):l(C)}}const wy={name:"headingAtx",resolve:xy,tokenize:Ey};function xy(n,s){let l=n.length-2,o=3,S,C;return n[o][1].type==="whitespace"&&(o+=2),l-2>o&&n[l][1].type==="whitespace"&&(l-=2),n[l][1].type==="atxHeadingSequence"&&(o===l-1||l-4>o&&n[l-2][1].type==="whitespace")&&(l-=o+1===l?2:4),l>o&&(S={type:"atxHeadingText",start:n[o][1].start,end:n[l][1].end},C={type:"chunkText",start:n[o][1].start,end:n[l][1].end,contentType:"text"},Zt(n,o,l-o+1,[["enter",S,s],["enter",C,s],["exit",C,s],["exit",S,s]])),n}function Ey(n,s,l){let o=0;return S;function S(p){return n.enter("atxHeading"),C(p)}function C(p){return n.enter("atxHeadingSequence"),g(p)}function g(p){return p===35&&o++<6?(n.consume(p),g):p===null||tt(p)?(n.exit("atxHeadingSequence"),a(p)):l(p)}function a(p){return p===35?(n.enter("atxHeadingSequence"),u(p)):p===null||Ee(p)?(n.exit("atxHeading"),s(p)):Ne(p)?Fe(n,a,"whitespace")(p):(n.enter("atxHeadingText"),h(p))}function u(p){return p===35?(n.consume(p),u):(n.exit("atxHeadingSequence"),a(p))}function h(p){return p===null||p===35||tt(p)?(n.exit("atxHeadingText"),a(p)):(n.consume(p),h)}}const ky=["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"],l_=["pre","script","style","textarea"],Ay={concrete:!0,name:"htmlFlow",resolveTo:Ry,tokenize:Ly},Ty={partial:!0,tokenize:Oy},Dy={partial:!0,tokenize:My};function Ry(n){let s=n.length;for(;s--&&!(n[s][0]==="enter"&&n[s][1].type==="htmlFlow"););return s>1&&n[s-2][1].type==="linePrefix"&&(n[s][1].start=n[s-2][1].start,n[s+1][1].start=n[s-2][1].start,n.splice(s-2,2)),n}function Ly(n,s,l){const o=this;let S,C,g,a,u;return h;function h(N){return p(N)}function p(N){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(N),c}function c(N){return N===33?(n.consume(N),b):N===47?(n.consume(N),C=!0,x):N===63?(n.consume(N),S=3,o.interrupt?s:M):Mt(N)?(n.consume(N),g=String.fromCharCode(N),v):l(N)}function b(N){return N===45?(n.consume(N),S=2,w):N===91?(n.consume(N),S=5,a=0,k):Mt(N)?(n.consume(N),S=4,o.interrupt?s:M):l(N)}function w(N){return N===45?(n.consume(N),o.interrupt?s:M):l(N)}function k(N){const ie="CDATA[";return N===ie.charCodeAt(a++)?(n.consume(N),a===ie.length?o.interrupt?s:V:k):l(N)}function x(N){return Mt(N)?(n.consume(N),g=String.fromCharCode(N),v):l(N)}function v(N){if(N===null||N===47||N===62||tt(N)){const ie=N===47,fe=g.toLowerCase();return!ie&&!C&&l_.includes(fe)?(S=1,o.interrupt?s(N):V(N)):ky.includes(g.toLowerCase())?(S=6,ie?(n.consume(N),_):o.interrupt?s(N):V(N)):(S=7,o.interrupt&&!o.parser.lazy[o.now().line]?l(N):C?d(N):m(N))}return N===45||Dt(N)?(n.consume(N),g+=String.fromCharCode(N),v):l(N)}function _(N){return N===62?(n.consume(N),o.interrupt?s:V):l(N)}function d(N){return Ne(N)?(n.consume(N),d):H(N)}function m(N){return N===47?(n.consume(N),H):N===58||N===95||Mt(N)?(n.consume(N),E):Ne(N)?(n.consume(N),m):H(N)}function E(N){return N===45||N===46||N===58||N===95||Dt(N)?(n.consume(N),E):R(N)}function R(N){return N===61?(n.consume(N),A):Ne(N)?(n.consume(N),R):m(N)}function A(N){return N===null||N===60||N===61||N===62||N===96?l(N):N===34||N===39?(n.consume(N),u=N,L):Ne(N)?(n.consume(N),A):T(N)}function L(N){return N===u?(n.consume(N),u=null,z):N===null||Ee(N)?l(N):(n.consume(N),L)}function T(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||tt(N)?R(N):(n.consume(N),T)}function z(N){return N===47||N===62||Ne(N)?m(N):l(N)}function H(N){return N===62?(n.consume(N),q):l(N)}function q(N){return N===null||Ee(N)?V(N):Ne(N)?(n.consume(N),q):l(N)}function V(N){return N===45&&S===2?(n.consume(N),Y):N===60&&S===1?(n.consume(N),Z):N===62&&S===4?(n.consume(N),B):N===63&&S===3?(n.consume(N),M):N===93&&S===5?(n.consume(N),O):Ee(N)&&(S===6||S===7)?(n.exit("htmlFlowData"),n.check(Ty,P,I)(N)):N===null||Ee(N)?(n.exit("htmlFlowData"),I(N)):(n.consume(N),V)}function I(N){return n.check(Dy,G,P)(N)}function G(N){return n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),K}function K(N){return N===null||Ee(N)?I(N):(n.enter("htmlFlowData"),V(N))}function Y(N){return N===45?(n.consume(N),M):V(N)}function Z(N){return N===47?(n.consume(N),g="",ee):V(N)}function ee(N){if(N===62){const ie=g.toLowerCase();return l_.includes(ie)?(n.consume(N),B):V(N)}return Mt(N)&&g.length<8?(n.consume(N),g+=String.fromCharCode(N),ee):V(N)}function O(N){return N===93?(n.consume(N),M):V(N)}function M(N){return N===62?(n.consume(N),B):N===45&&S===2?(n.consume(N),M):V(N)}function B(N){return N===null||Ee(N)?(n.exit("htmlFlowData"),P(N)):(n.consume(N),B)}function P(N){return n.exit("htmlFlow"),s(N)}}function My(n,s,l){const o=this;return S;function S(g){return Ee(g)?(n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),C):l(g)}function C(g){return o.parser.lazy[o.now().line]?l(g):s(g)}}function Oy(n,s,l){return o;function o(S){return n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),n.attempt(Hs,s,l)}}const By={name:"htmlText",tokenize:zy};function zy(n,s,l){const o=this;let S,C,g;return a;function a(M){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(M),u}function u(M){return M===33?(n.consume(M),h):M===47?(n.consume(M),R):M===63?(n.consume(M),m):Mt(M)?(n.consume(M),T):l(M)}function h(M){return M===45?(n.consume(M),p):M===91?(n.consume(M),C=0,k):Mt(M)?(n.consume(M),d):l(M)}function p(M){return M===45?(n.consume(M),w):l(M)}function c(M){return M===null?l(M):M===45?(n.consume(M),b):Ee(M)?(g=c,Z(M)):(n.consume(M),c)}function b(M){return M===45?(n.consume(M),w):c(M)}function w(M){return M===62?Y(M):M===45?b(M):c(M)}function k(M){const B="CDATA[";return M===B.charCodeAt(C++)?(n.consume(M),C===B.length?x:k):l(M)}function x(M){return M===null?l(M):M===93?(n.consume(M),v):Ee(M)?(g=x,Z(M)):(n.consume(M),x)}function v(M){return M===93?(n.consume(M),_):x(M)}function _(M){return M===62?Y(M):M===93?(n.consume(M),_):x(M)}function d(M){return M===null||M===62?Y(M):Ee(M)?(g=d,Z(M)):(n.consume(M),d)}function m(M){return M===null?l(M):M===63?(n.consume(M),E):Ee(M)?(g=m,Z(M)):(n.consume(M),m)}function E(M){return M===62?Y(M):m(M)}function R(M){return Mt(M)?(n.consume(M),A):l(M)}function A(M){return M===45||Dt(M)?(n.consume(M),A):L(M)}function L(M){return Ee(M)?(g=L,Z(M)):Ne(M)?(n.consume(M),L):Y(M)}function T(M){return M===45||Dt(M)?(n.consume(M),T):M===47||M===62||tt(M)?z(M):l(M)}function z(M){return M===47?(n.consume(M),Y):M===58||M===95||Mt(M)?(n.consume(M),H):Ee(M)?(g=z,Z(M)):Ne(M)?(n.consume(M),z):Y(M)}function H(M){return M===45||M===46||M===58||M===95||Dt(M)?(n.consume(M),H):q(M)}function q(M){return M===61?(n.consume(M),V):Ee(M)?(g=q,Z(M)):Ne(M)?(n.consume(M),q):z(M)}function V(M){return M===null||M===60||M===61||M===62||M===96?l(M):M===34||M===39?(n.consume(M),S=M,I):Ee(M)?(g=V,Z(M)):Ne(M)?(n.consume(M),V):(n.consume(M),G)}function I(M){return M===S?(n.consume(M),S=void 0,K):M===null?l(M):Ee(M)?(g=I,Z(M)):(n.consume(M),I)}function G(M){return M===null||M===34||M===39||M===60||M===61||M===96?l(M):M===47||M===62||tt(M)?z(M):(n.consume(M),G)}function K(M){return M===47||M===62||tt(M)?z(M):l(M)}function Y(M){return M===62?(n.consume(M),n.exit("htmlTextData"),n.exit("htmlText"),s):l(M)}function Z(M){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(M),n.exit("lineEnding"),ee}function ee(M){return Ne(M)?Fe(n,O,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):O(M)}function O(M){return n.enter("htmlTextData"),g(M)}}const bc={name:"labelEnd",resolveAll:Uy,resolveTo:Iy,tokenize:Py},Hy={tokenize:Fy},Ny={tokenize:qy},jy={tokenize:Vy};function Uy(n){let s=-1;const l=[];for(;++s<n.length;){const o=n[s][1];if(l.push(n[s]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const S=o.type==="labelImage"?4:2;o.type="data",s+=S}}return n.length!==l.length&&Zt(n,0,n.length,l),n}function Iy(n,s){let l=n.length,o=0,S,C,g,a;for(;l--;)if(S=n[l][1],C){if(S.type==="link"||S.type==="labelLink"&&S._inactive)break;n[l][0]==="enter"&&S.type==="labelLink"&&(S._inactive=!0)}else if(g){if(n[l][0]==="enter"&&(S.type==="labelImage"||S.type==="labelLink")&&!S._balanced&&(C=l,S.type!=="labelLink")){o=2;break}}else S.type==="labelEnd"&&(g=l);const u={type:n[C][1].type==="labelLink"?"link":"image",start:{...n[C][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[C][1].start},end:{...n[g][1].end}},p={type:"labelText",start:{...n[C+o+2][1].end},end:{...n[g-2][1].start}};return a=[["enter",u,s],["enter",h,s]],a=cn(a,n.slice(C+1,C+o+3)),a=cn(a,[["enter",p,s]]),a=cn(a,ha(s.parser.constructs.insideSpan.null,n.slice(C+o+4,g-3),s)),a=cn(a,[["exit",p,s],n[g-2],n[g-1],["exit",h,s]]),a=cn(a,n.slice(g+1)),a=cn(a,[["exit",u,s]]),Zt(n,C,n.length,a),n}function Py(n,s,l){const o=this;let S=o.events.length,C,g;for(;S--;)if((o.events[S][1].type==="labelImage"||o.events[S][1].type==="labelLink")&&!o.events[S][1]._balanced){C=o.events[S][1];break}return a;function a(b){return C?C._inactive?c(b):(g=o.parser.defined.includes(_n(o.sliceSerialize({start:C.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(b),n.exit("labelMarker"),n.exit("labelEnd"),u):l(b)}function u(b){return b===40?n.attempt(Hy,p,g?p:c)(b):b===91?n.attempt(Ny,p,g?h:c)(b):g?p(b):c(b)}function h(b){return n.attempt(jy,p,c)(b)}function p(b){return s(b)}function c(b){return C._balanced=!0,l(b)}}function Fy(n,s,l){return o;function o(c){return n.enter("resource"),n.enter("resourceMarker"),n.consume(c),n.exit("resourceMarker"),S}function S(c){return tt(c)?Rs(n,C)(c):C(c)}function C(c){return c===41?p(c):tm(n,g,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function g(c){return tt(c)?Rs(n,u)(c):p(c)}function a(c){return l(c)}function u(c){return c===34||c===39||c===40?im(n,h,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):p(c)}function h(c){return tt(c)?Rs(n,p)(c):p(c)}function p(c){return c===41?(n.enter("resourceMarker"),n.consume(c),n.exit("resourceMarker"),n.exit("resource"),s):l(c)}}function qy(n,s,l){const o=this;return S;function S(a){return nm.call(o,n,C,g,"reference","referenceMarker","referenceString")(a)}function C(a){return o.parser.defined.includes(_n(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?s(a):l(a)}function g(a){return l(a)}}function Vy(n,s,l){return o;function o(C){return n.enter("reference"),n.enter("referenceMarker"),n.consume(C),n.exit("referenceMarker"),S}function S(C){return C===93?(n.enter("referenceMarker"),n.consume(C),n.exit("referenceMarker"),n.exit("reference"),s):l(C)}}const Yy={name:"labelStartImage",resolveAll:bc.resolveAll,tokenize:Gy};function Gy(n,s,l){const o=this;return S;function S(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),C}function C(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),g):l(a)}function g(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?l(a):s(a)}}const Wy={name:"labelStartLink",resolveAll:bc.resolveAll,tokenize:Ky};function Ky(n,s,l){const o=this;return S;function S(g){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(g),n.exit("labelMarker"),n.exit("labelLink"),C}function C(g){return g===94&&"_hiddenFootnoteSupport"in o.parser.constructs?l(g):s(g)}}const Pu={name:"lineEnding",tokenize:Xy};function Xy(n,s){return l;function l(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Fe(n,s,"linePrefix")}}const ra={name:"thematicBreak",tokenize:$y};function $y(n,s,l){let o=0,S;return C;function C(h){return n.enter("thematicBreak"),g(h)}function g(h){return S=h,a(h)}function a(h){return h===S?(n.enter("thematicBreakSequence"),u(h)):o>=3&&(h===null||Ee(h))?(n.exit("thematicBreak"),s(h)):l(h)}function u(h){return h===S?(n.consume(h),o++,u):(n.exit("thematicBreakSequence"),Ne(h)?Fe(n,a,"whitespace")(h):a(h))}}const Ft={continuation:{tokenize:e1},exit:n1,name:"list",tokenize:Jy},Qy={partial:!0,tokenize:i1},Zy={partial:!0,tokenize:t1};function Jy(n,s,l){const o=this,S=o.events[o.events.length-1];let C=S&&S[1].type==="linePrefix"?S[2].sliceSerialize(S[1],!0).length:0,g=0;return a;function a(w){const k=o.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!o.containerState.marker||w===o.containerState.marker:rc(w)){if(o.containerState.type||(o.containerState.type=k,n.enter(k,{_container:!0})),k==="listUnordered")return n.enter("listItemPrefix"),w===42||w===45?n.check(ra,l,h)(w):h(w);if(!o.interrupt||w===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),u(w)}return l(w)}function u(w){return rc(w)&&++g<10?(n.consume(w),u):(!o.interrupt||g<2)&&(o.containerState.marker?w===o.containerState.marker:w===41||w===46)?(n.exit("listItemValue"),h(w)):l(w)}function h(w){return n.enter("listItemMarker"),n.consume(w),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||w,n.check(Hs,o.interrupt?l:p,n.attempt(Qy,b,c))}function p(w){return o.containerState.initialBlankLine=!0,C++,b(w)}function c(w){return Ne(w)?(n.enter("listItemPrefixWhitespace"),n.consume(w),n.exit("listItemPrefixWhitespace"),b):l(w)}function b(w){return o.containerState.size=C+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,s(w)}}function e1(n,s,l){const o=this;return o.containerState._closeFlow=void 0,n.check(Hs,S,C);function S(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Fe(n,s,"listItemIndent",o.containerState.size+1)(a)}function C(a){return o.containerState.furtherBlankLines||!Ne(a)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,g(a)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(Zy,s,g)(a))}function g(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,Fe(n,n.attempt(Ft,s,l),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function t1(n,s,l){const o=this;return Fe(n,S,"listItemIndent",o.containerState.size+1);function S(C){const g=o.events[o.events.length-1];return g&&g[1].type==="listItemIndent"&&g[2].sliceSerialize(g[1],!0).length===o.containerState.size?s(C):l(C)}}function n1(n){n.exit(this.containerState.type)}function i1(n,s,l){const o=this;return Fe(n,S,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function S(C){const g=o.events[o.events.length-1];return!Ne(C)&&g&&g[1].type==="listItemPrefixWhitespace"?s(C):l(C)}}const a_={name:"setextUnderline",resolveTo:r1,tokenize:s1};function r1(n,s){let l=n.length,o,S,C;for(;l--;)if(n[l][0]==="enter"){if(n[l][1].type==="content"){o=l;break}n[l][1].type==="paragraph"&&(S=l)}else n[l][1].type==="content"&&n.splice(l,1),!C&&n[l][1].type==="definition"&&(C=l);const g={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[S][1].type="setextHeadingText",C?(n.splice(S,0,["enter",g,s]),n.splice(C+1,0,["exit",n[o][1],s]),n[o][1].end={...n[C][1].end}):n[o][1]=g,n.push(["exit",g,s]),n}function s1(n,s,l){const o=this;let S;return C;function C(h){let p=o.events.length,c;for(;p--;)if(o.events[p][1].type!=="lineEnding"&&o.events[p][1].type!=="linePrefix"&&o.events[p][1].type!=="content"){c=o.events[p][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||c)?(n.enter("setextHeadingLine"),S=h,g(h)):l(h)}function g(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===S?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),Ne(h)?Fe(n,u,"lineSuffix")(h):u(h))}function u(h){return h===null||Ee(h)?(n.exit("setextHeadingLine"),s(h)):l(h)}}const l1={tokenize:a1};function a1(n){const s=this,l=n.attempt(Hs,o,n.attempt(this.parser.constructs.flowInitial,S,Fe(n,n.attempt(this.parser.constructs.flow,S,n.attempt(fy,S)),"linePrefix")));return l;function o(C){if(C===null){n.consume(C);return}return n.enter("lineEndingBlank"),n.consume(C),n.exit("lineEndingBlank"),s.currentConstruct=void 0,l}function S(C){if(C===null){n.consume(C);return}return n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),s.currentConstruct=void 0,l}}const o1={resolveAll:sm()},u1=rm("string"),c1=rm("text");function rm(n){return{resolveAll:sm(n==="text"?h1:void 0),tokenize:s};function s(l){const o=this,S=this.parser.constructs[n],C=l.attempt(S,g,a);return g;function g(p){return h(p)?C(p):a(p)}function a(p){if(p===null){l.consume(p);return}return l.enter("data"),l.consume(p),u}function u(p){return h(p)?(l.exit("data"),C(p)):(l.consume(p),u)}function h(p){if(p===null)return!0;const c=S[p];let b=-1;if(c)for(;++b<c.length;){const w=c[b];if(!w.previous||w.previous.call(o,o.previous))return!0}return!1}}}function sm(n){return s;function s(l,o){let S=-1,C;for(;++S<=l.length;)C===void 0?l[S]&&l[S][1].type==="data"&&(C=S,S++):(!l[S]||l[S][1].type!=="data")&&(S!==C+2&&(l[C][1].end=l[S-1][1].end,l.splice(C+2,S-C-2),S=C+2),C=void 0);return n?n(l,o):l}}function h1(n,s){let l=0;for(;++l<=n.length;)if((l===n.length||n[l][1].type==="lineEnding")&&n[l-1][1].type==="data"){const o=n[l-1][1],S=s.sliceStream(o);let C=S.length,g=-1,a=0,u;for(;C--;){const h=S[C];if(typeof h=="string"){for(g=h.length;h.charCodeAt(g-1)===32;)a++,g--;if(g)break;g=-1}else if(h===-2)u=!0,a++;else if(h!==-1){C++;break}}if(s._contentTypeTextTrailing&&l===n.length&&(a=0),a){const h={type:l===n.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:C?g:o.start._bufferIndex+g,_index:o.start._index+C,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(l,0,["enter",h,s],["exit",h,s]),l+=2)}l++}return n}const f1={42:Ft,43:Ft,45:Ft,48:Ft,49:Ft,50:Ft,51:Ft,52:Ft,53:Ft,54:Ft,55:Ft,56:Ft,57:Ft,62:Q_},d1={91:gy},p1={[-2]:Iu,[-1]:Iu,32:Iu},_1={35:wy,42:ra,45:[a_,ra],60:Ay,61:a_,95:ra,96:s_,126:s_},m1={38:J_,92:Z_},g1={[-5]:Pu,[-4]:Pu,[-3]:Pu,33:Yy,38:J_,42:sc,60:[WS,By],91:Wy,92:[by,Z_],93:bc,95:sc,96:ly},v1={null:[sc,o1]},S1={null:[42,95]},y1={null:[]},b1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:S1,contentInitial:d1,disable:y1,document:f1,flow:_1,flowInitial:p1,insideSpan:v1,string:m1,text:g1},Symbol.toStringTag,{value:"Module"}));function C1(n,s,l){let o={_bufferIndex:-1,_index:0,line:l&&l.line||1,column:l&&l.column||1,offset:l&&l.offset||0};const S={},C=[];let g=[],a=[];const u={attempt:L(R),check:L(A),consume:d,enter:m,exit:E,interrupt:L(A,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:k,parser:n,previous:null,sliceSerialize:b,sliceStream:w,write:c};let p=s.tokenize.call(h,u);return s.resolveAll&&C.push(s),h;function c(q){return g=cn(g,q),v(),g[g.length-1]!==null?[]:(T(s,0),h.events=ha(C,h.events,h),h.events)}function b(q,V){return x1(w(q),V)}function w(q){return w1(g,q)}function k(){const{_bufferIndex:q,_index:V,line:I,column:G,offset:K}=o;return{_bufferIndex:q,_index:V,line:I,column:G,offset:K}}function x(q){S[q.line]=q.column,H()}function v(){let q;for(;o._index<g.length;){const V=g[o._index];if(typeof V=="string")for(q=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===q&&o._bufferIndex<V.length;)_(V.charCodeAt(o._bufferIndex));else _(V)}}function _(q){p=p(q)}function d(q){Ee(q)?(o.line++,o.column=1,o.offset+=q===-3?2:1,H()):q!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===g[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=q}function m(q,V){const I=V||{};return I.type=q,I.start=k(),h.events.push(["enter",I,h]),a.push(I),I}function E(q){const V=a.pop();return V.end=k(),h.events.push(["exit",V,h]),V}function R(q,V){T(q,V.from)}function A(q,V){V.restore()}function L(q,V){return I;function I(G,K,Y){let Z,ee,O,M;return Array.isArray(G)?P(G):"tokenize"in G?P([G]):B(G);function B(de){return X;function X(U){const le=U!==null&&de[U],Q=U!==null&&de.null,pe=[...Array.isArray(le)?le:le?[le]:[],...Array.isArray(Q)?Q:Q?[Q]:[]];return P(pe)(U)}}function P(de){return Z=de,ee=0,de.length===0?Y:N(de[ee])}function N(de){return X;function X(U){return M=z(),O=de,de.partial||(h.currentConstruct=de),de.name&&h.parser.constructs.disable.null.includes(de.name)?fe():de.tokenize.call(V?Object.assign(Object.create(h),V):h,u,ie,fe)(U)}}function ie(de){return q(O,M),K}function fe(de){return M.restore(),++ee<Z.length?N(Z[ee]):Y}}}function T(q,V){q.resolveAll&&!C.includes(q)&&C.push(q),q.resolve&&Zt(h.events,V,h.events.length-V,q.resolve(h.events.slice(V),h)),q.resolveTo&&(h.events=q.resolveTo(h.events,h))}function z(){const q=k(),V=h.previous,I=h.currentConstruct,G=h.events.length,K=Array.from(a);return{from:G,restore:Y};function Y(){o=q,h.previous=V,h.currentConstruct=I,h.events.length=G,a=K,H()}}function H(){o.line in S&&o.column<2&&(o.column=S[o.line],o.offset+=S[o.line]-1)}}function w1(n,s){const l=s.start._index,o=s.start._bufferIndex,S=s.end._index,C=s.end._bufferIndex;let g;if(l===S)g=[n[l].slice(o,C)];else{if(g=n.slice(l,S),o>-1){const a=g[0];typeof a=="string"?g[0]=a.slice(o):g.shift()}C>0&&g.push(n[S].slice(0,C))}return g}function x1(n,s){let l=-1;const o=[];let S;for(;++l<n.length;){const C=n[l];let g;if(typeof C=="string")g=C;else switch(C){case-5:{g="\r";break}case-4:{g=`
|
|
60
|
+
`;break}case-3:{g=`\r
|
|
61
|
+
`;break}case-2:{g=s?" ":" ";break}case-1:{if(!s&&S)continue;g=" ";break}default:g=String.fromCharCode(C)}S=C===-2,o.push(g)}return o.join("")}function E1(n){const o={constructs:X_([b1,...(n||{}).extensions||[]]),content:S(IS),defined:[],document:S(FS),flow:S(l1),lazy:{},string:S(u1),text:S(c1)};return o;function S(C){return g;function g(a){return C1(o,C,a)}}}function k1(n){for(;!em(n););return n}const o_=/[\0\t\n\r]/g;function A1(){let n=1,s="",l=!0,o;return S;function S(C,g,a){const u=[];let h,p,c,b,w;for(C=s+(typeof C=="string"?C.toString():new TextDecoder(g||void 0).decode(C)),c=0,s="",l&&(C.charCodeAt(0)===65279&&c++,l=void 0);c<C.length;){if(o_.lastIndex=c,h=o_.exec(C),b=h&&h.index!==void 0?h.index:C.length,w=C.charCodeAt(b),!h){s=C.slice(c);break}if(w===10&&c===b&&o)u.push(-3),o=void 0;else switch(o&&(u.push(-5),o=void 0),c<b&&(u.push(C.slice(c,b)),n+=b-c),w){case 0:{u.push(65533),n++;break}case 9:{for(p=Math.ceil(n/4)*4,u.push(-2);n++<p;)u.push(-1);break}case 10:{u.push(-4),n=1;break}default:o=!0,n=1}c=b+1}return a&&(o&&u.push(-5),s&&u.push(s),u.push(null)),u}}const T1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function D1(n){return n.replace(T1,R1)}function R1(n,s,l){if(s)return s;if(l.charCodeAt(0)===35){const S=l.charCodeAt(1),C=S===120||S===88;return $_(l.slice(C?2:1),C?16:10)}return yc(l)||n}const lm={}.hasOwnProperty;function L1(n,s,l){return s&&typeof s=="object"&&(l=s,s=void 0),M1(l)(k1(E1(l).document().write(A1()(n,s,!0))))}function M1(n){const s={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:C(gn),autolinkProtocol:z,autolinkEmail:z,atxHeading:C(be),blockQuote:C(Q),characterEscape:z,characterReference:z,codeFenced:C(pe),codeFencedFenceInfo:g,codeFencedFenceMeta:g,codeIndented:C(pe,g),codeText:C(_e,g),codeTextData:z,data:z,codeFlowValue:z,definition:C(Ae),definitionDestinationString:g,definitionLabelString:g,definitionTitleString:g,emphasis:C(ce),hardBreakEscape:C(Ge),hardBreakTrailing:C(Ge),htmlFlow:C(we,g),htmlFlowData:z,htmlText:C(we,g),htmlTextData:z,image:C(mn),label:g,link:C(gn),listItem:C(En),listItemValue:b,listOrdered:C(vn,c),listUnordered:C(vn),paragraph:C(Yn),reference:N,referenceString:g,resourceDestinationString:g,resourceTitleString:g,setextHeading:C(be),strong:C(At),thematicBreak:C(Ot)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:le,autolinkProtocol:U,blockQuote:u(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:de,characterReference:X,codeFenced:u(v),codeFencedFence:x,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:H,codeIndented:u(_),codeText:u(K),codeTextData:H,data:H,definition:u(),definitionDestinationString:E,definitionLabelString:d,definitionTitleString:m,emphasis:u(),hardBreakEscape:u(V),hardBreakTrailing:u(V),htmlFlow:u(I),htmlFlowData:H,htmlText:u(G),htmlTextData:H,image:u(Z),label:O,labelText:ee,lineEnding:q,link:u(Y),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ie,resourceDestinationString:M,resourceTitleString:B,resource:P,setextHeading:u(T),setextHeadingLineSequence:L,setextHeadingText:A,strong:u(),thematicBreak:u()}};am(s,(n||{}).mdastExtensions||[]);const l={};return o;function o(ae){let ve={type:"root",children:[]};const Ce={stack:[ve],tokenStack:[],config:s,enter:a,exit:h,buffer:g,resume:p,data:l},De=[];let Oe=-1;for(;++Oe<ae.length;)if(ae[Oe][1].type==="listOrdered"||ae[Oe][1].type==="listUnordered")if(ae[Oe][0]==="enter")De.push(Oe);else{const mt=De.pop();Oe=S(ae,mt,Oe)}for(Oe=-1;++Oe<ae.length;){const mt=s[ae[Oe][0]];lm.call(mt,ae[Oe][1].type)&&mt[ae[Oe][1].type].call(Object.assign({sliceSerialize:ae[Oe][2].sliceSerialize},Ce),ae[Oe][1])}if(Ce.tokenStack.length>0){const mt=Ce.tokenStack[Ce.tokenStack.length-1];(mt[1]||u_).call(Ce,void 0,mt[0])}for(ve.position={start:gi(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:gi(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},Oe=-1;++Oe<s.transforms.length;)ve=s.transforms[Oe](ve)||ve;return ve}function S(ae,ve,Ce){let De=ve-1,Oe=-1,mt=!1,qe,bt,gt,Bt;for(;++De<=Ce;){const Je=ae[De];switch(Je[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Je[0]==="enter"?Oe++:Oe--,Bt=void 0;break}case"lineEndingBlank":{Je[0]==="enter"&&(qe&&!Bt&&!Oe&&!gt&&(gt=De),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!Oe&&Je[0]==="enter"&&Je[1].type==="listItemPrefix"||Oe===-1&&Je[0]==="exit"&&(Je[1].type==="listUnordered"||Je[1].type==="listOrdered")){if(qe){let Gn=De;for(bt=void 0;Gn--;){const hn=ae[Gn];if(hn[1].type==="lineEnding"||hn[1].type==="lineEndingBlank"){if(hn[0]==="exit")continue;bt&&(ae[bt][1].type="lineEndingBlank",mt=!0),hn[1].type="lineEnding",bt=Gn}else if(!(hn[1].type==="linePrefix"||hn[1].type==="blockQuotePrefix"||hn[1].type==="blockQuotePrefixWhitespace"||hn[1].type==="blockQuoteMarker"||hn[1].type==="listItemIndent"))break}gt&&(!bt||gt<bt)&&(qe._spread=!0),qe.end=Object.assign({},bt?ae[bt][1].start:Je[1].end),ae.splice(bt||De,0,["exit",qe,Je[2]]),De++,Ce++}if(Je[1].type==="listItemPrefix"){const Gn={type:"listItem",_spread:!1,start:Object.assign({},Je[1].start),end:void 0};qe=Gn,ae.splice(De,0,["enter",Gn,Je[2]]),De++,Ce++,gt=void 0,Bt=!0}}}return ae[ve][1]._spread=mt,Ce}function C(ae,ve){return Ce;function Ce(De){a.call(this,ae(De),De),ve&&ve.call(this,De)}}function g(){this.stack.push({type:"fragment",children:[]})}function a(ae,ve,Ce){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([ve,Ce||void 0]),ae.position={start:gi(ve.start),end:void 0}}function u(ae){return ve;function ve(Ce){ae&&ae.call(this,Ce),h.call(this,Ce)}}function h(ae,ve){const Ce=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==ae.type&&(ve?ve.call(this,ae,De[0]):(De[1]||u_).call(this,ae,De[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Ds({start:ae.start,end:ae.end})+"): it’s not open");Ce.position.end=gi(ae.end)}function p(){return Sc(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function b(ae){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function w(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=ae}function k(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=ae}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae.replace(/(\r?\n|\r)$/g,"")}function d(ae){const ve=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ve,Ce.identifier=_n(this.sliceSerialize(ae)).toLowerCase()}function m(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ae}function E(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ae}function R(ae){const ve=this.stack[this.stack.length-1];if(!ve.depth){const Ce=this.sliceSerialize(ae).length;ve.depth=Ce}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function L(ae){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function z(ae){const Ce=this.stack[this.stack.length-1].children;let De=Ce[Ce.length-1];(!De||De.type!=="text")&&(De=ot(),De.position={start:gi(ae.start),end:void 0},Ce.push(De)),this.stack.push(De)}function H(ae){const ve=this.stack.pop();ve.value+=this.sliceSerialize(ae),ve.position.end=gi(ae.end)}function q(ae){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ve.children[ve.children.length-1];Ce.position.end=gi(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&s.canContainEols.includes(ve.type)&&(z.call(this,ae),H.call(this,ae))}function V(){this.data.atHardBreak=!0}function I(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae}function G(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae}function K(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ae}function Y(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=ve,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function Z(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=ve,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function ee(ae){const ve=this.sliceSerialize(ae),Ce=this.stack[this.stack.length-2];Ce.label=D1(ve),Ce.identifier=_n(ve).toLowerCase()}function O(){const ae=this.stack[this.stack.length-1],ve=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const De=ae.children;Ce.children=De}else Ce.alt=ve}function M(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ae}function B(){const ae=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ae}function P(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function ie(ae){const ve=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ve,Ce.identifier=_n(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function fe(ae){this.data.characterReferenceType=ae.type}function de(ae){const ve=this.sliceSerialize(ae),Ce=this.data.characterReferenceType;let De;Ce?(De=$_(ve,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=yc(ve);const Oe=this.stack[this.stack.length-1];Oe.value+=De}function X(ae){const ve=this.stack.pop();ve.position.end=gi(ae.end)}function U(ae){H.call(this,ae);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(ae)}function le(ae){H.call(this,ae);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(ae)}function Q(){return{type:"blockquote",children:[]}}function pe(){return{type:"code",lang:null,meta:null,value:""}}function _e(){return{type:"inlineCode",value:""}}function Ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ce(){return{type:"emphasis",children:[]}}function be(){return{type:"heading",depth:0,children:[]}}function Ge(){return{type:"break"}}function we(){return{type:"html",value:""}}function mn(){return{type:"image",title:null,url:"",alt:null}}function gn(){return{type:"link",title:null,url:"",children:[]}}function vn(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function En(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function Yn(){return{type:"paragraph",children:[]}}function At(){return{type:"strong",children:[]}}function ot(){return{type:"text",value:""}}function Ot(){return{type:"thematicBreak"}}}function gi(n){return{line:n.line,column:n.column,offset:n.offset}}function am(n,s){let l=-1;for(;++l<s.length;){const o=s[l];Array.isArray(o)?am(n,o):O1(n,o)}}function O1(n,s){let l;for(l in s)if(lm.call(s,l))switch(l){case"canContainEols":{const o=s[l];o&&n[l].push(...o);break}case"transforms":{const o=s[l];o&&n[l].push(...o);break}case"enter":case"exit":{const o=s[l];o&&Object.assign(n[l],o);break}}}function u_(n,s){throw n?new Error("Cannot close `"+n.type+"` ("+Ds({start:n.start,end:n.end})+"): a different token (`"+s.type+"`, "+Ds({start:s.start,end:s.end})+") is open"):new Error("Cannot close document, a token (`"+s.type+"`, "+Ds({start:s.start,end:s.end})+") is still open")}function B1(n){const s=this;s.parser=l;function l(o){return L1(o,{...s.data("settings"),...n,extensions:s.data("micromarkExtensions")||[],mdastExtensions:s.data("fromMarkdownExtensions")||[]})}}function z1(n,s){const l={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(s),!0)};return n.patch(s,l),n.applyData(s,l)}function H1(n,s){const l={type:"element",tagName:"br",properties:{},children:[]};return n.patch(s,l),[n.applyData(s,l),{type:"text",value:`
|
|
62
|
+
`}]}function N1(n,s){const l=s.value?s.value+`
|
|
63
|
+
`:"",o={},S=s.lang?s.lang.split(/\s+/):[];S.length>0&&(o.className=["language-"+S[0]]);let C={type:"element",tagName:"code",properties:o,children:[{type:"text",value:l}]};return s.meta&&(C.data={meta:s.meta}),n.patch(s,C),C=n.applyData(s,C),C={type:"element",tagName:"pre",properties:{},children:[C]},n.patch(s,C),C}function j1(n,s){const l={type:"element",tagName:"del",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function U1(n,s){const l={type:"element",tagName:"em",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function I1(n,s){const l=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(s.identifier).toUpperCase(),S=Lr(o.toLowerCase()),C=n.footnoteOrder.indexOf(o);let g,a=n.footnoteCounts.get(o);a===void 0?(a=0,n.footnoteOrder.push(o),g=n.footnoteOrder.length):g=C+1,a+=1,n.footnoteCounts.set(o,a);const u={type:"element",tagName:"a",properties:{href:"#"+l+"fn-"+S,id:l+"fnref-"+S+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(g)}]};n.patch(s,u);const h={type:"element",tagName:"sup",properties:{},children:[u]};return n.patch(s,h),n.applyData(s,h)}function P1(n,s){const l={type:"element",tagName:"h"+s.depth,properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function F1(n,s){if(n.options.allowDangerousHtml){const l={type:"raw",value:s.value};return n.patch(s,l),n.applyData(s,l)}}function om(n,s){const l=s.referenceType;let o="]";if(l==="collapsed"?o+="[]":l==="full"&&(o+="["+(s.label||s.identifier)+"]"),s.type==="imageReference")return[{type:"text",value:"!["+s.alt+o}];const S=n.all(s),C=S[0];C&&C.type==="text"?C.value="["+C.value:S.unshift({type:"text",value:"["});const g=S[S.length-1];return g&&g.type==="text"?g.value+=o:S.push({type:"text",value:o}),S}function q1(n,s){const l=String(s.identifier).toUpperCase(),o=n.definitionById.get(l);if(!o)return om(n,s);const S={src:Lr(o.url||""),alt:s.alt};o.title!==null&&o.title!==void 0&&(S.title=o.title);const C={type:"element",tagName:"img",properties:S,children:[]};return n.patch(s,C),n.applyData(s,C)}function V1(n,s){const l={src:Lr(s.url)};s.alt!==null&&s.alt!==void 0&&(l.alt=s.alt),s.title!==null&&s.title!==void 0&&(l.title=s.title);const o={type:"element",tagName:"img",properties:l,children:[]};return n.patch(s,o),n.applyData(s,o)}function Y1(n,s){const l={type:"text",value:s.value.replace(/\r?\n|\r/g," ")};n.patch(s,l);const o={type:"element",tagName:"code",properties:{},children:[l]};return n.patch(s,o),n.applyData(s,o)}function G1(n,s){const l=String(s.identifier).toUpperCase(),o=n.definitionById.get(l);if(!o)return om(n,s);const S={href:Lr(o.url||"")};o.title!==null&&o.title!==void 0&&(S.title=o.title);const C={type:"element",tagName:"a",properties:S,children:n.all(s)};return n.patch(s,C),n.applyData(s,C)}function W1(n,s){const l={href:Lr(s.url)};s.title!==null&&s.title!==void 0&&(l.title=s.title);const o={type:"element",tagName:"a",properties:l,children:n.all(s)};return n.patch(s,o),n.applyData(s,o)}function K1(n,s,l){const o=n.all(s),S=l?X1(l):um(s),C={},g=[];if(typeof s.checked=="boolean"){const p=o[0];let c;p&&p.type==="element"&&p.tagName==="p"?c=p:(c={type:"element",tagName:"p",properties:{},children:[]},o.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:s.checked,disabled:!0},children:[]}),C.className=["task-list-item"]}let a=-1;for(;++a<o.length;){const p=o[a];(S||a!==0||p.type!=="element"||p.tagName!=="p")&&g.push({type:"text",value:`
|
|
64
|
+
`}),p.type==="element"&&p.tagName==="p"&&!S?g.push(...p.children):g.push(p)}const u=o[o.length-1];u&&(S||u.type!=="element"||u.tagName!=="p")&&g.push({type:"text",value:`
|
|
65
|
+
`});const h={type:"element",tagName:"li",properties:C,children:g};return n.patch(s,h),n.applyData(s,h)}function X1(n){let s=!1;if(n.type==="list"){s=n.spread||!1;const l=n.children;let o=-1;for(;!s&&++o<l.length;)s=um(l[o])}return s}function um(n){const s=n.spread;return s??n.children.length>1}function $1(n,s){const l={},o=n.all(s);let S=-1;for(typeof s.start=="number"&&s.start!==1&&(l.start=s.start);++S<o.length;){const g=o[S];if(g.type==="element"&&g.tagName==="li"&&g.properties&&Array.isArray(g.properties.className)&&g.properties.className.includes("task-list-item")){l.className=["contains-task-list"];break}}const C={type:"element",tagName:s.ordered?"ol":"ul",properties:l,children:n.wrap(o,!0)};return n.patch(s,C),n.applyData(s,C)}function Q1(n,s){const l={type:"element",tagName:"p",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function Z1(n,s){const l={type:"root",children:n.wrap(n.all(s))};return n.patch(s,l),n.applyData(s,l)}function J1(n,s){const l={type:"element",tagName:"strong",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function eb(n,s){const l=n.all(s),o=l.shift(),S=[];if(o){const g={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(s.children[0],g),S.push(g)}if(l.length>0){const g={type:"element",tagName:"tbody",properties:{},children:n.wrap(l,!0)},a=_c(s.children[1]),u=F_(s.children[s.children.length-1]);a&&u&&(g.position={start:a,end:u}),S.push(g)}const C={type:"element",tagName:"table",properties:{},children:n.wrap(S,!0)};return n.patch(s,C),n.applyData(s,C)}function tb(n,s,l){const o=l?l.children:void 0,C=(o?o.indexOf(s):1)===0?"th":"td",g=l&&l.type==="table"?l.align:void 0,a=g?g.length:s.children.length;let u=-1;const h=[];for(;++u<a;){const c=s.children[u],b={},w=g?g[u]:void 0;w&&(b.align=w);let k={type:"element",tagName:C,properties:b,children:[]};c&&(k.children=n.all(c),n.patch(c,k),k=n.applyData(c,k)),h.push(k)}const p={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(s,p),n.applyData(s,p)}function nb(n,s){const l={type:"element",tagName:"td",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}const c_=9,h_=32;function ib(n){const s=String(n),l=/\r?\n|\r/g;let o=l.exec(s),S=0;const C=[];for(;o;)C.push(f_(s.slice(S,o.index),S>0,!0),o[0]),S=o.index+o[0].length,o=l.exec(s);return C.push(f_(s.slice(S),S>0,!1)),C.join("")}function f_(n,s,l){let o=0,S=n.length;if(s){let C=n.codePointAt(o);for(;C===c_||C===h_;)o++,C=n.codePointAt(o)}if(l){let C=n.codePointAt(S-1);for(;C===c_||C===h_;)S--,C=n.codePointAt(S-1)}return S>o?n.slice(o,S):""}function rb(n,s){const l={type:"text",value:ib(String(s.value))};return n.patch(s,l),n.applyData(s,l)}function sb(n,s){const l={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(s,l),n.applyData(s,l)}const lb={blockquote:z1,break:H1,code:N1,delete:j1,emphasis:U1,footnoteReference:I1,heading:P1,html:F1,imageReference:q1,image:V1,inlineCode:Y1,linkReference:G1,link:W1,listItem:K1,list:$1,paragraph:Q1,root:Z1,strong:J1,table:eb,tableCell:nb,tableRow:tb,text:rb,thematicBreak:sb,toml:ea,yaml:ea,definition:ea,footnoteDefinition:ea};function ea(){}const cm=-1,fa=0,Ls=1,la=2,Cc=3,wc=4,xc=5,Ec=6,hm=7,fm=8,ab=typeof self=="object"?self:globalThis,d_=(n,s)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new ab[n](s)},ob=(n,s)=>{const l=(S,C)=>(n.set(C,S),S),o=S=>{if(n.has(S))return n.get(S);const[C,g]=s[S];switch(C){case fa:case cm:return l(g,S);case Ls:{const a=l([],S);for(const u of g)a.push(o(u));return a}case la:{const a=l({},S);for(const[u,h]of g)a[o(u)]=o(h);return a}case Cc:return l(new Date(g),S);case wc:{const{source:a,flags:u}=g;return l(new RegExp(a,u),S)}case xc:{const a=l(new Map,S);for(const[u,h]of g)a.set(o(u),o(h));return a}case Ec:{const a=l(new Set,S);for(const u of g)a.add(o(u));return a}case hm:{const{name:a,message:u}=g;return l(d_(a,u),S)}case fm:return l(BigInt(g),S);case"BigInt":return l(Object(BigInt(g)),S);case"ArrayBuffer":return l(new Uint8Array(g).buffer,g);case"DataView":{const{buffer:a}=new Uint8Array(g);return l(new DataView(a),g)}}return l(d_(C,g),S)};return o},p_=n=>ob(new Map,n)(0),kr="",{toString:ub}={},{keys:cb}=Object,Ts=n=>{const s=typeof n;if(s!=="object"||!n)return[fa,s];const l=ub.call(n).slice(8,-1);switch(l){case"Array":return[Ls,kr];case"Object":return[la,kr];case"Date":return[Cc,kr];case"RegExp":return[wc,kr];case"Map":return[xc,kr];case"Set":return[Ec,kr];case"DataView":return[Ls,l]}return l.includes("Array")?[Ls,l]:l.includes("Error")?[hm,l]:[la,l]},ta=([n,s])=>n===fa&&(s==="function"||s==="symbol"),hb=(n,s,l,o)=>{const S=(g,a)=>{const u=o.push(g)-1;return l.set(a,u),u},C=g=>{if(l.has(g))return l.get(g);let[a,u]=Ts(g);switch(a){case fa:{let p=g;switch(u){case"bigint":a=fm,p=g.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+u);p=null;break;case"undefined":return S([cm],g)}return S([a,p],g)}case Ls:{if(u){let b=g;return u==="DataView"?b=new Uint8Array(g.buffer):u==="ArrayBuffer"&&(b=new Uint8Array(g)),S([u,[...b]],g)}const p=[],c=S([a,p],g);for(const b of g)p.push(C(b));return c}case la:{if(u)switch(u){case"BigInt":return S([u,g.toString()],g);case"Boolean":case"Number":case"String":return S([u,g.valueOf()],g)}if(s&&"toJSON"in g)return C(g.toJSON());const p=[],c=S([a,p],g);for(const b of cb(g))(n||!ta(Ts(g[b])))&&p.push([C(b),C(g[b])]);return c}case Cc:return S([a,g.toISOString()],g);case wc:{const{source:p,flags:c}=g;return S([a,{source:p,flags:c}],g)}case xc:{const p=[],c=S([a,p],g);for(const[b,w]of g)(n||!(ta(Ts(b))||ta(Ts(w))))&&p.push([C(b),C(w)]);return c}case Ec:{const p=[],c=S([a,p],g);for(const b of g)(n||!ta(Ts(b)))&&p.push(C(b));return c}}const{message:h}=g;return S([a,{name:u,message:h}],g)};return C},__=(n,{json:s,lossy:l}={})=>{const o=[];return hb(!(s||l),!!s,new Map,o)(n),o},aa=typeof structuredClone=="function"?(n,s)=>s&&("json"in s||"lossy"in s)?p_(__(n,s)):structuredClone(n):(n,s)=>p_(__(n,s));function fb(n,s){const l=[{type:"text",value:"↩"}];return s>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(s)}]}),l}function db(n,s){return"Back to reference "+(n+1)+(s>1?"-"+s:"")}function pb(n){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",l=n.options.footnoteBackContent||fb,o=n.options.footnoteBackLabel||db,S=n.options.footnoteLabel||"Footnotes",C=n.options.footnoteLabelTagName||"h2",g=n.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[u]);if(!h)continue;const p=n.all(h),c=String(h.identifier).toUpperCase(),b=Lr(c.toLowerCase());let w=0;const k=[],x=n.footnoteCounts.get(c);for(;x!==void 0&&++w<=x;){k.length>0&&k.push({type:"text",value:" "});let d=typeof l=="string"?l:l(u,w);typeof d=="string"&&(d={type:"text",value:d}),k.push({type:"element",tagName:"a",properties:{href:"#"+s+"fnref-"+b+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(u,w),className:["data-footnote-backref"]},children:Array.isArray(d)?d:[d]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const d=v.children[v.children.length-1];d&&d.type==="text"?d.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...k)}else p.push(...k);const _={type:"element",tagName:"li",properties:{id:s+"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:C,properties:{...aa(g),id:"footnote-label"},children:[{type:"text",value:S}]},{type:"text",value:`
|
|
66
|
+
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(a,!0)},{type:"text",value:`
|
|
67
|
+
`}]}}const da=(function(n){if(n==null)return vb;if(typeof n=="function")return pa(n);if(typeof n=="object")return Array.isArray(n)?_b(n):mb(n);if(typeof n=="string")return gb(n);throw new Error("Expected function, string, or object as test")});function _b(n){const s=[];let l=-1;for(;++l<n.length;)s[l]=da(n[l]);return pa(o);function o(...S){let C=-1;for(;++C<s.length;)if(s[C].apply(this,S))return!0;return!1}}function mb(n){const s=n;return pa(l);function l(o){const S=o;let C;for(C in n)if(S[C]!==s[C])return!1;return!0}}function gb(n){return pa(s);function s(l){return l&&l.type===n}}function pa(n){return s;function s(l,o,S){return!!(Sb(l)&&n.call(this,l,typeof o=="number"?o:void 0,S||void 0))}}function vb(){return!0}function Sb(n){return n!==null&&typeof n=="object"&&"type"in n}const dm=[],yb=!0,lc=!1,bb="skip";function pm(n,s,l,o){let S;typeof s=="function"&&typeof l!="function"?(o=l,l=s):S=s;const C=da(S),g=o?-1:1;a(n,void 0,[])();function a(u,h,p){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const w=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(u.type+(w?"<"+w+">":""))+")"})}return b;function b(){let w=dm,k,x,v;if((!s||C(u,h,p[p.length-1]||void 0))&&(w=Cb(l(u,p)),w[0]===lc))return w;if("children"in u&&u.children){const _=u;if(_.children&&w[0]!==bb)for(x=(o?_.children.length:-1)+g,v=p.concat(_);x>-1&&x<_.children.length;){const d=_.children[x];if(k=a(d,x,v)(),k[0]===lc)return k;x=typeof k[1]=="number"?k[1]:x+g}}return w}}}function Cb(n){return Array.isArray(n)?n:typeof n=="number"?[yb,n]:n==null?dm:[n]}function kc(n,s,l,o){let S,C,g;typeof s=="function"&&typeof l!="function"?(C=void 0,g=s,S=l):(C=s,g=l,S=o),pm(n,C,a,S);function a(u,h){const p=h[h.length-1],c=p?p.children.indexOf(u):void 0;return g(u,c,p)}}const ac={}.hasOwnProperty,wb={};function xb(n,s){const l=s||wb,o=new Map,S=new Map,C=new Map,g={...lb,...l.handlers},a={all:h,applyData:kb,definitionById:o,footnoteById:S,footnoteCounts:C,footnoteOrder:[],handlers:g,one:u,options:l,patch:Eb,wrap:Tb};return kc(n,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const c=p.type==="definition"?o:S,b=String(p.identifier).toUpperCase();c.has(b)||c.set(b,p)}}),a;function u(p,c){const b=p.type,w=a.handlers[b];if(ac.call(a.handlers,b)&&w)return w(a,p,c);if(a.options.passThrough&&a.options.passThrough.includes(b)){if("children"in p){const{children:x,...v}=p,_=aa(v);return _.children=a.all(p),_}return aa(p)}return(a.options.unknownHandler||Ab)(a,p,c)}function h(p){const c=[];if("children"in p){const b=p.children;let w=-1;for(;++w<b.length;){const k=a.one(b[w],p);if(k){if(w&&b[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=m_(k.value)),!Array.isArray(k)&&k.type==="element")){const x=k.children[0];x&&x.type==="text"&&(x.value=m_(x.value))}Array.isArray(k)?c.push(...k):c.push(k)}}}return c}}function Eb(n,s){n.position&&(s.position=fS(n))}function kb(n,s){let l=s;if(n&&n.data){const o=n.data.hName,S=n.data.hChildren,C=n.data.hProperties;if(typeof o=="string")if(l.type==="element")l.tagName=o;else{const g="children"in l?l.children:[l];l={type:"element",tagName:o,properties:{},children:g}}l.type==="element"&&C&&Object.assign(l.properties,aa(C)),"children"in l&&l.children&&S!==null&&S!==void 0&&(l.children=S)}return l}function Ab(n,s){const l=s.data||{},o="value"in s&&!(ac.call(l,"hProperties")||ac.call(l,"hChildren"))?{type:"text",value:s.value}:{type:"element",tagName:"div",properties:{},children:n.all(s)};return n.patch(s,o),n.applyData(s,o)}function Tb(n,s){const l=[];let o=-1;for(s&&l.push({type:"text",value:`
|
|
68
|
+
`});++o<n.length;)o&&l.push({type:"text",value:`
|
|
69
|
+
`}),l.push(n[o]);return s&&n.length>0&&l.push({type:"text",value:`
|
|
70
|
+
`}),l}function m_(n){let s=0,l=n.charCodeAt(s);for(;l===9||l===32;)s++,l=n.charCodeAt(s);return n.slice(s)}function g_(n,s){const l=xb(n,s),o=l.one(n,void 0),S=pb(l),C=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return S&&C.children.push({type:"text",value:`
|
|
71
|
+
`},S),C}function Db(n,s){return n&&"run"in n?async function(l,o){const S=g_(l,{file:o,...s});await n.run(S,o)}:function(l,o){return g_(l,{file:o,...n||s})}}function v_(n){if(n)throw n}var Fu,S_;function Rb(){if(S_)return Fu;S_=1;var n=Object.prototype.hasOwnProperty,s=Object.prototype.toString,l=Object.defineProperty,o=Object.getOwnPropertyDescriptor,S=function(h){return typeof Array.isArray=="function"?Array.isArray(h):s.call(h)==="[object Array]"},C=function(h){if(!h||s.call(h)!=="[object Object]")return!1;var p=n.call(h,"constructor"),c=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!c)return!1;var b;for(b in h);return typeof b>"u"||n.call(h,b)},g=function(h,p){l&&p.name==="__proto__"?l(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 Fu=function u(){var h,p,c,b,w,k,x=arguments[0],v=1,_=arguments.length,d=!1;for(typeof x=="boolean"&&(d=x,x=arguments[1]||{},v=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});v<_;++v)if(h=arguments[v],h!=null)for(p in h)c=a(x,p),b=a(h,p),x!==b&&(d&&b&&(C(b)||(w=S(b)))?(w?(w=!1,k=c&&S(c)?c:[]):k=c&&C(c)?c:{},g(x,{name:p,newValue:u(d,k,b)})):typeof b<"u"&&g(x,{name:p,newValue:b}));return x},Fu}var Lb=Rb();const qu=M_(Lb);function oc(n){if(typeof n!="object"||n===null)return!1;const s=Object.getPrototypeOf(n);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function Mb(){const n=[],s={run:l,use:o};return s;function l(...S){let C=-1;const g=S.pop();if(typeof g!="function")throw new TypeError("Expected function as last argument, not "+g);a(null,...S);function a(u,...h){const p=n[++C];let c=-1;if(u){g(u);return}for(;++c<S.length;)(h[c]===null||h[c]===void 0)&&(h[c]=S[c]);S=h,p?Ob(p,a)(...h):g(null,...h)}}function o(S){if(typeof S!="function")throw new TypeError("Expected `middelware` to be a function, not "+S);return n.push(S),s}}function Ob(n,s){let l;return o;function o(...g){const a=n.length>g.length;let u;a&&g.push(S);try{u=n.apply(this,g)}catch(h){const p=h;if(a&&l)throw p;return S(p)}a||(u&&u.then&&typeof u.then=="function"?u.then(C,S):u instanceof Error?S(u):C(u))}function S(g,...a){l||(l=!0,s(g,...a))}function C(g){S(null,g)}}const wn={basename:Bb,dirname:zb,extname:Hb,join:Nb,sep:"/"};function Bb(n,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');Ns(n);let l=0,o=-1,S=n.length,C;if(s===void 0||s.length===0||s.length>n.length){for(;S--;)if(n.codePointAt(S)===47){if(C){l=S+1;break}}else o<0&&(C=!0,o=S+1);return o<0?"":n.slice(l,o)}if(s===n)return"";let g=-1,a=s.length-1;for(;S--;)if(n.codePointAt(S)===47){if(C){l=S+1;break}}else g<0&&(C=!0,g=S+1),a>-1&&(n.codePointAt(S)===s.codePointAt(a--)?a<0&&(o=S):(a=-1,o=g));return l===o?o=g:o<0&&(o=n.length),n.slice(l,o)}function zb(n){if(Ns(n),n.length===0)return".";let s=-1,l=n.length,o;for(;--l;)if(n.codePointAt(l)===47){if(o){s=l;break}}else o||(o=!0);return s<0?n.codePointAt(0)===47?"/":".":s===1&&n.codePointAt(0)===47?"//":n.slice(0,s)}function Hb(n){Ns(n);let s=n.length,l=-1,o=0,S=-1,C=0,g;for(;s--;){const a=n.codePointAt(s);if(a===47){if(g){o=s+1;break}continue}l<0&&(g=!0,l=s+1),a===46?S<0?S=s:C!==1&&(C=1):S>-1&&(C=-1)}return S<0||l<0||C===0||C===1&&S===l-1&&S===o+1?"":n.slice(S,l)}function Nb(...n){let s=-1,l;for(;++s<n.length;)Ns(n[s]),n[s]&&(l=l===void 0?n[s]:l+"/"+n[s]);return l===void 0?".":jb(l)}function jb(n){Ns(n);const s=n.codePointAt(0)===47;let l=Ub(n,!s);return l.length===0&&!s&&(l="."),l.length>0&&n.codePointAt(n.length-1)===47&&(l+="/"),s?"/"+l:l}function Ub(n,s){let l="",o=0,S=-1,C=0,g=-1,a,u;for(;++g<=n.length;){if(g<n.length)a=n.codePointAt(g);else{if(a===47)break;a=47}if(a===47){if(!(S===g-1||C===1))if(S!==g-1&&C===2){if(l.length<2||o!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(u=l.lastIndexOf("/"),u!==l.length-1){u<0?(l="",o=0):(l=l.slice(0,u),o=l.length-1-l.lastIndexOf("/")),S=g,C=0;continue}}else if(l.length>0){l="",o=0,S=g,C=0;continue}}s&&(l=l.length>0?l+"/..":"..",o=2)}else l.length>0?l+="/"+n.slice(S+1,g):l=n.slice(S+1,g),o=g-S-1;S=g,C=0}else a===46&&C>-1?C++:C=-1}return l}function Ns(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const Ib={cwd:Pb};function Pb(){return"/"}function uc(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function Fb(n){if(typeof n=="string")n=new URL(n);else if(!uc(n)){const s=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw s.code="ERR_INVALID_ARG_TYPE",s}if(n.protocol!=="file:"){const s=new TypeError("The URL must be of scheme file");throw s.code="ERR_INVALID_URL_SCHEME",s}return qb(n)}function qb(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 s=n.pathname;let l=-1;for(;++l<s.length;)if(s.codePointAt(l)===37&&s.codePointAt(l+1)===50){const o=s.codePointAt(l+2);if(o===70||o===102){const S=new TypeError("File URL path must not include encoded / characters");throw S.code="ERR_INVALID_FILE_URL_PATH",S}}return decodeURIComponent(s)}const Vu=["history","path","basename","stem","extname","dirname"];class _m{constructor(s){let l;s?uc(s)?l={path:s}:typeof s=="string"||Vb(s)?l={value:s}:l=s:l={},this.cwd="cwd"in l?"":Ib.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Vu.length;){const C=Vu[o];C in l&&l[C]!==void 0&&l[C]!==null&&(this[C]=C==="history"?[...l[C]]:l[C])}let S;for(S in l)Vu.includes(S)||(this[S]=l[S])}get basename(){return typeof this.path=="string"?wn.basename(this.path):void 0}set basename(s){Gu(s,"basename"),Yu(s,"basename"),this.path=wn.join(this.dirname||"",s)}get dirname(){return typeof this.path=="string"?wn.dirname(this.path):void 0}set dirname(s){y_(this.basename,"dirname"),this.path=wn.join(s||"",this.basename)}get extname(){return typeof this.path=="string"?wn.extname(this.path):void 0}set extname(s){if(Yu(s,"extname"),y_(this.dirname,"extname"),s){if(s.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(s.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=wn.join(this.dirname,this.stem+(s||""))}get path(){return this.history[this.history.length-1]}set path(s){uc(s)&&(s=Fb(s)),Gu(s,"path"),this.path!==s&&this.history.push(s)}get stem(){return typeof this.path=="string"?wn.basename(this.path,this.extname):void 0}set stem(s){Gu(s,"stem"),Yu(s,"stem"),this.path=wn.join(this.dirname||"",s+(this.extname||""))}fail(s,l,o){const S=this.message(s,l,o);throw S.fatal=!0,S}info(s,l,o){const S=this.message(s,l,o);return S.fatal=void 0,S}message(s,l,o){const S=new Rt(s,l,o);return this.path&&(S.name=this.path+":"+S.name,S.file=this.path),S.fatal=!1,this.messages.push(S),S}toString(s){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(s||void 0).decode(this.value)}}function Yu(n,s){if(n&&n.includes(wn.sep))throw new Error("`"+s+"` cannot be a path: did not expect `"+wn.sep+"`")}function Gu(n,s){if(!n)throw new Error("`"+s+"` cannot be empty")}function y_(n,s){if(!n)throw new Error("Setting `"+s+"` requires `path` to be set too")}function Vb(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Yb=(function(n){const o=this.constructor.prototype,S=o[n],C=function(){return S.apply(C,arguments)};return Object.setPrototypeOf(C,o),C}),Gb={}.hasOwnProperty;class Ac extends Yb{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=Mb()}copy(){const s=new Ac;let l=-1;for(;++l<this.attachers.length;){const o=this.attachers[l];s.use(...o)}return s.data(qu(!0,{},this.namespace)),s}data(s,l){return typeof s=="string"?arguments.length===2?(Xu("data",this.frozen),this.namespace[s]=l,this):Gb.call(this.namespace,s)&&this.namespace[s]||void 0:s?(Xu("data",this.frozen),this.namespace=s,this):this.namespace}freeze(){if(this.frozen)return this;const s=this;for(;++this.freezeIndex<this.attachers.length;){const[l,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const S=l.call(s,...o);typeof S=="function"&&this.transformers.use(S)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(s){this.freeze();const l=na(s),o=this.parser||this.Parser;return Wu("parse",o),o(String(l),l)}process(s,l){const o=this;return this.freeze(),Wu("process",this.parser||this.Parser),Ku("process",this.compiler||this.Compiler),l?S(void 0,l):new Promise(S);function S(C,g){const a=na(s),u=o.parse(a);o.run(u,a,function(p,c,b){if(p||!c||!b)return h(p);const w=c,k=o.stringify(w,b);Xb(k)?b.value=k:b.result=k,h(p,b)});function h(p,c){p||!c?g(p):C?C(c):l(void 0,c)}}}processSync(s){let l=!1,o;return this.freeze(),Wu("processSync",this.parser||this.Parser),Ku("processSync",this.compiler||this.Compiler),this.process(s,S),C_("processSync","process",l),o;function S(C,g){l=!0,v_(C),o=g}}run(s,l,o){b_(s),this.freeze();const S=this.transformers;return!o&&typeof l=="function"&&(o=l,l=void 0),o?C(void 0,o):new Promise(C);function C(g,a){const u=na(l);S.run(s,u,h);function h(p,c,b){const w=c||s;p?a(p):g?g(w):o(void 0,w,b)}}}runSync(s,l){let o=!1,S;return this.run(s,l,C),C_("runSync","run",o),S;function C(g,a){v_(g),S=a,o=!0}}stringify(s,l){this.freeze();const o=na(l),S=this.compiler||this.Compiler;return Ku("stringify",S),b_(s),S(s,o)}use(s,...l){const o=this.attachers,S=this.namespace;if(Xu("use",this.frozen),s!=null)if(typeof s=="function")u(s,l);else if(typeof s=="object")Array.isArray(s)?a(s):g(s);else throw new TypeError("Expected usable value, not `"+s+"`");return this;function C(h){if(typeof h=="function")u(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...c]=h;u(p,c)}else g(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function g(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&&(S.settings=qu(!0,S.settings,h.settings))}function a(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const c=h[p];C(c)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function u(h,p){let c=-1,b=-1;for(;++c<o.length;)if(o[c][0]===h){b=c;break}if(b===-1)o.push([h,...p]);else if(p.length>0){let[w,...k]=p;const x=o[b][1];oc(x)&&oc(w)&&(w=qu(!0,x,w)),o[b]=[h,w,...k]}}}}const Wb=new Ac().freeze();function Wu(n,s){if(typeof s!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Ku(n,s){if(typeof s!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function Xu(n,s){if(s)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function b_(n){if(!oc(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function C_(n,s,l){if(!l)throw new Error("`"+n+"` finished async. Use `"+s+"` instead")}function na(n){return Kb(n)?n:new _m(n)}function Kb(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function Xb(n){return typeof n=="string"||$b(n)}function $b(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Qb="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",w_=[],x_={allowDangerousHtml:!0},Zb=/^(https?|ircs?|mailto|xmpp)$/i,Jb=[{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 eC(n){const s=tC(n),l=nC(n);return iC(s.runSync(s.parse(l),l),n)}function tC(n){const s=n.rehypePlugins||w_,l=n.remarkPlugins||w_,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...x_}:x_;return Wb().use(B1).use(l).use(Db,o).use(s)}function nC(n){const s=n.children||"",l=new _m;return typeof s=="string"&&(l.value=s),l}function iC(n,s){const l=s.allowedElements,o=s.allowElement,S=s.components,C=s.disallowedElements,g=s.skipHtml,a=s.unwrapDisallowed,u=s.urlTransform||rC;for(const p of Jb)Object.hasOwn(s,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+Qb+p.id,void 0);return kc(n,h),gS(n,{Fragment:F.Fragment,components:S,ignoreInvalidStyle:!0,jsx:F.jsx,jsxs:F.jsxs,passKeys:!0,passNode:!0});function h(p,c,b){if(p.type==="raw"&&b&&typeof c=="number")return g?b.children.splice(c,1):b.children[c]={type:"text",value:p.value},c;if(p.type==="element"){let w;for(w in Uu)if(Object.hasOwn(Uu,w)&&Object.hasOwn(p.properties,w)){const k=p.properties[w],x=Uu[w];(x===null||x.includes(p.tagName))&&(p.properties[w]=u(String(k||""),w,p))}}if(p.type==="element"){let w=l?!l.includes(p.tagName):C?C.includes(p.tagName):!1;if(!w&&o&&typeof c=="number"&&(w=!o(p,c,b)),w&&b&&typeof c=="number")return a&&p.children?b.children.splice(c,1,...p.children):b.children.splice(c,1),c}}}function rC(n){const s=n.indexOf(":"),l=n.indexOf("?"),o=n.indexOf("#"),S=n.indexOf("/");return s===-1||S!==-1&&s>S||l!==-1&&s>l||o!==-1&&s>o||Zb.test(n.slice(0,s))?n:""}function E_(n,s){const l=String(n);if(typeof s!="string")throw new TypeError("Expected character");let o=0,S=l.indexOf(s);for(;S!==-1;)o++,S=l.indexOf(s,S+s.length);return o}function sC(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function lC(n,s,l){const S=da((l||{}).ignore||[]),C=aC(s);let g=-1;for(;++g<C.length;)pm(n,"text",a);function a(h,p){let c=-1,b;for(;++c<p.length;){const w=p[c],k=b?b.children:void 0;if(S(w,k?k.indexOf(w):void 0,b))return;b=w}if(b)return u(h,p)}function u(h,p){const c=p[p.length-1],b=C[g][0],w=C[g][1];let k=0;const v=c.children.indexOf(h);let _=!1,d=[];b.lastIndex=0;let m=b.exec(h.value);for(;m;){const E=m.index,R={index:m.index,input:m.input,stack:[...p,h]};let A=w(...m,R);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?b.lastIndex=E+1:(k!==E&&d.push({type:"text",value:h.value.slice(k,E)}),Array.isArray(A)?d.push(...A):A&&d.push(A),k=E+m[0].length,_=!0),!b.global)break;m=b.exec(h.value)}return _?(k<h.value.length&&d.push({type:"text",value:h.value.slice(k)}),c.children.splice(v,1,...d)):d=[h],v+d.length}}function aC(n){const s=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const l=!n[0]||Array.isArray(n[0])?n:[n];let o=-1;for(;++o<l.length;){const S=l[o];s.push([oC(S[0]),uC(S[1])])}return s}function oC(n){return typeof n=="string"?new RegExp(sC(n),"g"):n}function uC(n){return typeof n=="function"?n:function(){return n}}const $u="phrasing",Qu=["autolink","link","image","label"];function cC(){return{transforms:[gC],enter:{literalAutolink:fC,literalAutolinkEmail:Zu,literalAutolinkHttp:Zu,literalAutolinkWww:Zu},exit:{literalAutolink:mC,literalAutolinkEmail:_C,literalAutolinkHttp:dC,literalAutolinkWww:pC}}}function hC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:$u,notInConstruct:Qu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:$u,notInConstruct:Qu},{character:":",before:"[ps]",after:"\\/",inConstruct:$u,notInConstruct:Qu}]}}function fC(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function Zu(n){this.config.enter.autolinkProtocol.call(this,n)}function dC(n){this.config.exit.autolinkProtocol.call(this,n)}function pC(n){this.config.exit.data.call(this,n);const s=this.stack[this.stack.length-1];s.type,s.url="http://"+this.sliceSerialize(n)}function _C(n){this.config.exit.autolinkEmail.call(this,n)}function mC(n){this.exit(n)}function gC(n){lC(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),SC]],{ignore:["link","linkReference"]})}function vC(n,s,l,o,S){let C="";if(!mm(S)||(/^w/i.test(s)&&(l=s+l,s="",C="http://"),!yC(l)))return!1;const g=bC(l+o);if(!g[0])return!1;const a={type:"link",title:null,url:C+s+g[0],children:[{type:"text",value:s+g[0]}]};return g[1]?[a,{type:"text",value:g[1]}]:a}function SC(n,s,l,o){return!mm(o,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+s+"@"+l,children:[{type:"text",value:s+"@"+l}]}}function yC(n){const s=n.split(".");return!(s.length<2||s[s.length-1]&&(/_/.test(s[s.length-1])||!/[a-zA-Z\d]/.test(s[s.length-1]))||s[s.length-2]&&(/_/.test(s[s.length-2])||!/[a-zA-Z\d]/.test(s[s.length-2])))}function bC(n){const s=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!s)return[n,void 0];n=n.slice(0,s.index);let l=s[0],o=l.indexOf(")");const S=E_(n,"(");let C=E_(n,")");for(;o!==-1&&S>C;)n+=l.slice(0,o+1),l=l.slice(o+1),o=l.indexOf(")"),C++;return[n,l]}function mm(n,s){const l=n.input.charCodeAt(n.index-1);return(n.index===0||Ui(l)||ca(l))&&(!s||l!==47)}gm.peek=RC;function CC(){this.buffer()}function wC(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function xC(){this.buffer()}function EC(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function kC(n){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=_n(this.sliceSerialize(n)).toLowerCase(),l.label=s}function AC(n){this.exit(n)}function TC(n){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=_n(this.sliceSerialize(n)).toLowerCase(),l.label=s}function DC(n){this.exit(n)}function RC(){return"["}function gm(n,s,l,o){const S=l.createTracker(o);let C=S.move("[^");const g=l.enter("footnoteReference"),a=l.enter("reference");return C+=S.move(l.safe(l.associationId(n),{after:"]",before:C})),a(),g(),C+=S.move("]"),C}function LC(){return{enter:{gfmFootnoteCallString:CC,gfmFootnoteCall:wC,gfmFootnoteDefinitionLabelString:xC,gfmFootnoteDefinition:EC},exit:{gfmFootnoteCallString:kC,gfmFootnoteCall:AC,gfmFootnoteDefinitionLabelString:TC,gfmFootnoteDefinition:DC}}}function MC(n){let s=!1;return n&&n.firstLineBlank&&(s=!0),{handlers:{footnoteDefinition:l,footnoteReference:gm},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(o,S,C,g){const a=C.createTracker(g);let u=a.move("[^");const h=C.enter("footnoteDefinition"),p=C.enter("label");return u+=a.move(C.safe(C.associationId(o),{before:u,after:"]"})),p(),u+=a.move("]:"),o.children&&o.children.length>0&&(a.shift(4),u+=a.move((s?`
|
|
72
|
+
`:" ")+C.indentLines(C.containerFlow(o,a.current()),s?vm:OC))),h(),u}}function OC(n,s,l){return s===0?n:vm(n,s,l)}function vm(n,s,l){return(l?"":" ")+n}const BC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Sm.peek=UC;function zC(){return{canContainEols:["delete"],enter:{strikethrough:NC},exit:{strikethrough:jC}}}function HC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:BC}],handlers:{delete:Sm}}}function NC(n){this.enter({type:"delete",children:[]},n)}function jC(n){this.exit(n)}function Sm(n,s,l,o){const S=l.createTracker(o),C=l.enter("strikethrough");let g=S.move("~~");return g+=l.containerPhrasing(n,{...S.current(),before:g,after:"~"}),g+=S.move("~~"),C(),g}function UC(){return"~"}function IC(n){return n.length}function PC(n,s){const l=s||{},o=(l.align||[]).concat(),S=l.stringLength||IC,C=[],g=[],a=[],u=[];let h=0,p=-1;for(;++p<n.length;){const x=[],v=[];let _=-1;for(n[p].length>h&&(h=n[p].length);++_<n[p].length;){const d=FC(n[p][_]);if(l.alignDelimiters!==!1){const m=S(d);v[_]=m,(u[_]===void 0||m>u[_])&&(u[_]=m)}x.push(d)}g[p]=x,a[p]=v}let c=-1;if(typeof o=="object"&&"length"in o)for(;++c<h;)C[c]=k_(o[c]);else{const x=k_(o);for(;++c<h;)C[c]=x}c=-1;const b=[],w=[];for(;++c<h;){const x=C[c];let v="",_="";x===99?(v=":",_=":"):x===108?v=":":x===114&&(_=":");let d=l.alignDelimiters===!1?1:Math.max(1,u[c]-v.length-_.length);const m=v+"-".repeat(d)+_;l.alignDelimiters!==!1&&(d=v.length+d+_.length,d>u[c]&&(u[c]=d),w[c]=d),b[c]=m}g.splice(1,0,b),a.splice(1,0,w),p=-1;const k=[];for(;++p<g.length;){const x=g[p],v=a[p];c=-1;const _=[];for(;++c<h;){const d=x[c]||"";let m="",E="";if(l.alignDelimiters!==!1){const R=u[c]-(v[c]||0),A=C[c];A===114?m=" ".repeat(R):A===99?R%2?(m=" ".repeat(R/2+.5),E=" ".repeat(R/2-.5)):(m=" ".repeat(R/2),E=m):E=" ".repeat(R)}l.delimiterStart!==!1&&!c&&_.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&d==="")&&(l.delimiterStart!==!1||c)&&_.push(" "),l.alignDelimiters!==!1&&_.push(m),_.push(d),l.alignDelimiters!==!1&&_.push(E),l.padding!==!1&&_.push(" "),(l.delimiterEnd!==!1||c!==h-1)&&_.push("|")}k.push(l.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return k.join(`
|
|
73
|
+
`)}function FC(n){return n==null?"":String(n)}function k_(n){const s=typeof n=="string"?n.codePointAt(0):0;return s===67||s===99?99:s===76||s===108?108:s===82||s===114?114:0}function qC(n,s,l,o){const S=l.enter("blockquote"),C=l.createTracker(o);C.move("> "),C.shift(2);const g=l.indentLines(l.containerFlow(n,C.current()),VC);return S(),g}function VC(n,s,l){return">"+(l?"":" ")+n}function YC(n,s){return A_(n,s.inConstruct,!0)&&!A_(n,s.notInConstruct,!1)}function A_(n,s,l){if(typeof s=="string"&&(s=[s]),!s||s.length===0)return l;let o=-1;for(;++o<s.length;)if(n.includes(s[o]))return!0;return!1}function T_(n,s,l,o){let S=-1;for(;++S<l.unsafe.length;)if(l.unsafe[S].character===`
|
|
74
|
+
`&&YC(l.stack,l.unsafe[S]))return/[ \t]/.test(o.before)?"":" ";return`\\
|
|
75
|
+
`}function GC(n,s){const l=String(n);let o=l.indexOf(s),S=o,C=0,g=0;if(typeof s!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===S?++C>g&&(g=C):C=1,S=o+s.length,o=l.indexOf(s,S);return g}function WC(n,s){return!!(s.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function KC(n){const s=n.options.fence||"`";if(s!=="`"&&s!=="~")throw new Error("Cannot serialize code with `"+s+"` for `options.fence`, expected `` ` `` or `~`");return s}function XC(n,s,l,o){const S=KC(l),C=n.value||"",g=S==="`"?"GraveAccent":"Tilde";if(WC(n,l)){const c=l.enter("codeIndented"),b=l.indentLines(C,$C);return c(),b}const a=l.createTracker(o),u=S.repeat(Math.max(GC(C,S)+1,3)),h=l.enter("codeFenced");let p=a.move(u);if(n.lang){const c=l.enter(`codeFencedLang${g}`);p+=a.move(l.safe(n.lang,{before:p,after:" ",encode:["`"],...a.current()})),c()}if(n.lang&&n.meta){const c=l.enter(`codeFencedMeta${g}`);p+=a.move(" "),p+=a.move(l.safe(n.meta,{before:p,after:`
|
|
76
|
+
`,encode:["`"],...a.current()})),c()}return p+=a.move(`
|
|
77
|
+
`),C&&(p+=a.move(C+`
|
|
78
|
+
`)),p+=a.move(u),h(),p}function $C(n,s,l){return(l?"":" ")+n}function Tc(n){const s=n.options.quote||'"';if(s!=='"'&&s!=="'")throw new Error("Cannot serialize title with `"+s+"` for `options.quote`, expected `\"`, or `'`");return s}function QC(n,s,l,o){const S=Tc(l),C=S==='"'?"Quote":"Apostrophe",g=l.enter("definition");let a=l.enter("label");const u=l.createTracker(o);let h=u.move("[");return h+=u.move(l.safe(l.associationId(n),{before:h,after:"]",...u.current()})),h+=u.move("]: "),a(),!n.url||/[\0- \u007F]/.test(n.url)?(a=l.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(l.safe(n.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(a=l.enter("destinationRaw"),h+=u.move(l.safe(n.url,{before:h,after:n.title?" ":`
|
|
79
|
+
`,...u.current()}))),a(),n.title&&(a=l.enter(`title${C}`),h+=u.move(" "+S),h+=u.move(l.safe(n.title,{before:h,after:S,...u.current()})),h+=u.move(S),a()),g(),h}function ZC(n){const s=n.options.emphasis||"*";if(s!=="*"&&s!=="_")throw new Error("Cannot serialize emphasis with `"+s+"` for `options.emphasis`, expected `*`, or `_`");return s}function Os(n){return"&#x"+n.toString(16).toUpperCase()+";"}function oa(n,s,l){const o=Dr(n),S=Dr(s);return o===void 0?S===void 0?l==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:S===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?S===void 0?{inside:!1,outside:!1}:S===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:S===void 0?{inside:!1,outside:!1}:S===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ym.peek=JC;function ym(n,s,l,o){const S=ZC(l),C=l.enter("emphasis"),g=l.createTracker(o),a=g.move(S);let u=g.move(l.containerPhrasing(n,{after:S,before:a,...g.current()}));const h=u.charCodeAt(0),p=oa(o.before.charCodeAt(o.before.length-1),h,S);p.inside&&(u=Os(h)+u.slice(1));const c=u.charCodeAt(u.length-1),b=oa(o.after.charCodeAt(0),c,S);b.inside&&(u=u.slice(0,-1)+Os(c));const w=g.move(S);return C(),l.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},a+u+w}function JC(n,s,l){return l.options.emphasis||"*"}function ew(n,s){let l=!1;return kc(n,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return l=!0,lc}),!!((!n.depth||n.depth<3)&&Sc(n)&&(s.options.setext||l))}function tw(n,s,l,o){const S=Math.max(Math.min(6,n.depth||1),1),C=l.createTracker(o);if(ew(n,l)){const p=l.enter("headingSetext"),c=l.enter("phrasing"),b=l.containerPhrasing(n,{...C.current(),before:`
|
|
80
|
+
`,after:`
|
|
81
|
+
`});return c(),p(),b+`
|
|
82
|
+
`+(S===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
83
|
+
`))+1))}const g="#".repeat(S),a=l.enter("headingAtx"),u=l.enter("phrasing");C.move(g+" ");let h=l.containerPhrasing(n,{before:"# ",after:`
|
|
84
|
+
`,...C.current()});return/^[\t ]/.test(h)&&(h=Os(h.charCodeAt(0))+h.slice(1)),h=h?g+" "+h:g,l.options.closeAtx&&(h+=" "+g),u(),a(),h}bm.peek=nw;function bm(n){return n.value||""}function nw(){return"<"}Cm.peek=iw;function Cm(n,s,l,o){const S=Tc(l),C=S==='"'?"Quote":"Apostrophe",g=l.enter("image");let a=l.enter("label");const u=l.createTracker(o);let h=u.move("![");return h+=u.move(l.safe(n.alt,{before:h,after:"]",...u.current()})),h+=u.move("]("),a(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(a=l.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(l.safe(n.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(a=l.enter("destinationRaw"),h+=u.move(l.safe(n.url,{before:h,after:n.title?" ":")",...u.current()}))),a(),n.title&&(a=l.enter(`title${C}`),h+=u.move(" "+S),h+=u.move(l.safe(n.title,{before:h,after:S,...u.current()})),h+=u.move(S),a()),h+=u.move(")"),g(),h}function iw(){return"!"}wm.peek=rw;function wm(n,s,l,o){const S=n.referenceType,C=l.enter("imageReference");let g=l.enter("label");const a=l.createTracker(o);let u=a.move("![");const h=l.safe(n.alt,{before:u,after:"]",...a.current()});u+=a.move(h+"]["),g();const p=l.stack;l.stack=[],g=l.enter("reference");const c=l.safe(l.associationId(n),{before:u,after:"]",...a.current()});return g(),l.stack=p,C(),S==="full"||!h||h!==c?u+=a.move(c+"]"):S==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function rw(){return"!"}xm.peek=sw;function xm(n,s,l){let o=n.value||"",S="`",C=-1;for(;new RegExp("(^|[^`])"+S+"([^`]|$)").test(o);)S+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++C<l.unsafe.length;){const g=l.unsafe[C],a=l.compilePattern(g);let u;if(g.atBreak)for(;u=a.exec(o);){let h=u.index;o.charCodeAt(h)===10&&o.charCodeAt(h-1)===13&&h--,o=o.slice(0,h)+" "+o.slice(u.index+1)}}return S+o+S}function sw(){return"`"}function Em(n,s){const l=Sc(n);return!!(!s.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(l===n.url||"mailto:"+l===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}km.peek=lw;function km(n,s,l,o){const S=Tc(l),C=S==='"'?"Quote":"Apostrophe",g=l.createTracker(o);let a,u;if(Em(n,l)){const p=l.stack;l.stack=[],a=l.enter("autolink");let c=g.move("<");return c+=g.move(l.containerPhrasing(n,{before:c,after:">",...g.current()})),c+=g.move(">"),a(),l.stack=p,c}a=l.enter("link"),u=l.enter("label");let h=g.move("[");return h+=g.move(l.containerPhrasing(n,{before:h,after:"](",...g.current()})),h+=g.move("]("),u(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(u=l.enter("destinationLiteral"),h+=g.move("<"),h+=g.move(l.safe(n.url,{before:h,after:">",...g.current()})),h+=g.move(">")):(u=l.enter("destinationRaw"),h+=g.move(l.safe(n.url,{before:h,after:n.title?" ":")",...g.current()}))),u(),n.title&&(u=l.enter(`title${C}`),h+=g.move(" "+S),h+=g.move(l.safe(n.title,{before:h,after:S,...g.current()})),h+=g.move(S),u()),h+=g.move(")"),a(),h}function lw(n,s,l){return Em(n,l)?"<":"["}Am.peek=aw;function Am(n,s,l,o){const S=n.referenceType,C=l.enter("linkReference");let g=l.enter("label");const a=l.createTracker(o);let u=a.move("[");const h=l.containerPhrasing(n,{before:u,after:"]",...a.current()});u+=a.move(h+"]["),g();const p=l.stack;l.stack=[],g=l.enter("reference");const c=l.safe(l.associationId(n),{before:u,after:"]",...a.current()});return g(),l.stack=p,C(),S==="full"||!h||h!==c?u+=a.move(c+"]"):S==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function aw(){return"["}function Dc(n){const s=n.options.bullet||"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bullet`, expected `*`, `+`, or `-`");return s}function ow(n){const s=Dc(n),l=n.options.bulletOther;if(!l)return s==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===s)throw new Error("Expected `bullet` (`"+s+"`) and `bulletOther` (`"+l+"`) to be different");return l}function uw(n){const s=n.options.bulletOrdered||".";if(s!=="."&&s!==")")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOrdered`, expected `.` or `)`");return s}function Tm(n){const s=n.options.rule||"*";if(s!=="*"&&s!=="-"&&s!=="_")throw new Error("Cannot serialize rules with `"+s+"` for `options.rule`, expected `*`, `-`, or `_`");return s}function cw(n,s,l,o){const S=l.enter("list"),C=l.bulletCurrent;let g=n.ordered?uw(l):Dc(l);const a=n.ordered?g==="."?")":".":ow(l);let u=s&&l.bulletLastUsed?g===l.bulletLastUsed:!1;if(!n.ordered){const p=n.children?n.children[0]:void 0;if((g==="*"||g==="-")&&p&&(!p.children||!p.children[0])&&l.stack[l.stack.length-1]==="list"&&l.stack[l.stack.length-2]==="listItem"&&l.stack[l.stack.length-3]==="list"&&l.stack[l.stack.length-4]==="listItem"&&l.indexStack[l.indexStack.length-1]===0&&l.indexStack[l.indexStack.length-2]===0&&l.indexStack[l.indexStack.length-3]===0&&(u=!0),Tm(l)===g&&p){let c=-1;for(;++c<n.children.length;){const b=n.children[c];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(g=a),l.bulletCurrent=g;const h=l.containerFlow(n,o);return l.bulletLastUsed=g,l.bulletCurrent=C,S(),h}function hw(n){const s=n.options.listItemIndent||"one";if(s!=="tab"&&s!=="one"&&s!=="mixed")throw new Error("Cannot serialize items with `"+s+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return s}function fw(n,s,l,o){const S=hw(l);let C=l.bulletCurrent||Dc(l);s&&s.type==="list"&&s.ordered&&(C=(typeof s.start=="number"&&s.start>-1?s.start:1)+(l.options.incrementListMarker===!1?0:s.children.indexOf(n))+C);let g=C.length+1;(S==="tab"||S==="mixed"&&(s&&s.type==="list"&&s.spread||n.spread))&&(g=Math.ceil(g/4)*4);const a=l.createTracker(o);a.move(C+" ".repeat(g-C.length)),a.shift(g);const u=l.enter("listItem"),h=l.indentLines(l.containerFlow(n,a.current()),p);return u(),h;function p(c,b,w){return b?(w?"":" ".repeat(g))+c:(w?C:C+" ".repeat(g-C.length))+c}}function dw(n,s,l,o){const S=l.enter("paragraph"),C=l.enter("phrasing"),g=l.containerPhrasing(n,o);return C(),S(),g}const pw=da(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function _w(n,s,l,o){return(n.children.some(function(g){return pw(g)})?l.containerPhrasing:l.containerFlow).call(l,n,o)}function mw(n){const s=n.options.strong||"*";if(s!=="*"&&s!=="_")throw new Error("Cannot serialize strong with `"+s+"` for `options.strong`, expected `*`, or `_`");return s}Dm.peek=gw;function Dm(n,s,l,o){const S=mw(l),C=l.enter("strong"),g=l.createTracker(o),a=g.move(S+S);let u=g.move(l.containerPhrasing(n,{after:S,before:a,...g.current()}));const h=u.charCodeAt(0),p=oa(o.before.charCodeAt(o.before.length-1),h,S);p.inside&&(u=Os(h)+u.slice(1));const c=u.charCodeAt(u.length-1),b=oa(o.after.charCodeAt(0),c,S);b.inside&&(u=u.slice(0,-1)+Os(c));const w=g.move(S+S);return C(),l.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},a+u+w}function gw(n,s,l){return l.options.strong||"*"}function vw(n,s,l,o){return l.safe(n.value,o)}function Sw(n){const s=n.options.ruleRepetition||3;if(s<3)throw new Error("Cannot serialize rules with repetition `"+s+"` for `options.ruleRepetition`, expected `3` or more");return s}function yw(n,s,l){const o=(Tm(l)+(l.options.ruleSpaces?" ":"")).repeat(Sw(l));return l.options.ruleSpaces?o.slice(0,-1):o}const Rm={blockquote:qC,break:T_,code:XC,definition:QC,emphasis:ym,hardBreak:T_,heading:tw,html:bm,image:Cm,imageReference:wm,inlineCode:xm,link:km,linkReference:Am,list:cw,listItem:fw,paragraph:dw,root:_w,strong:Dm,text:vw,thematicBreak:yw};function bw(){return{enter:{table:Cw,tableData:D_,tableHeader:D_,tableRow:xw},exit:{codeText:Ew,table:ww,tableData:Ju,tableHeader:Ju,tableRow:Ju}}}function Cw(n){const s=n._align;this.enter({type:"table",align:s.map(function(l){return l==="none"?null:l}),children:[]},n),this.data.inTable=!0}function ww(n){this.exit(n),this.data.inTable=void 0}function xw(n){this.enter({type:"tableRow",children:[]},n)}function Ju(n){this.exit(n)}function D_(n){this.enter({type:"tableCell",children:[]},n)}function Ew(n){let s=this.resume();this.data.inTable&&(s=s.replace(/\\([\\|])/g,kw));const l=this.stack[this.stack.length-1];l.type,l.value=s,this.exit(n)}function kw(n,s){return s==="|"?s:n}function Aw(n){const s=n||{},l=s.tableCellPadding,o=s.tablePipeAlign,S=s.stringLength,C=l?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
85
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:g,tableCell:u,tableRow:a}};function g(w,k,x,v){return h(p(w,x,v),w.align)}function a(w,k,x,v){const _=c(w,x,v),d=h([_]);return d.slice(0,d.indexOf(`
|
|
86
|
+
`))}function u(w,k,x,v){const _=x.enter("tableCell"),d=x.enter("phrasing"),m=x.containerPhrasing(w,{...v,before:C,after:C});return d(),_(),m}function h(w,k){return PC(w,{align:k,alignDelimiters:o,padding:l,stringLength:S})}function p(w,k,x){const v=w.children;let _=-1;const d=[],m=k.enter("table");for(;++_<v.length;)d[_]=c(v[_],k,x);return m(),d}function c(w,k,x){const v=w.children;let _=-1;const d=[],m=k.enter("tableRow");for(;++_<v.length;)d[_]=u(v[_],w,k,x);return m(),d}function b(w,k,x){let v=Rm.inlineCode(w,k,x);return x.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function Tw(){return{exit:{taskListCheckValueChecked:R_,taskListCheckValueUnchecked:R_,paragraph:Rw}}}function Dw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Lw}}}function R_(n){const s=this.stack[this.stack.length-2];s.type,s.checked=n.type==="taskListCheckValueChecked"}function Rw(n){const s=this.stack[this.stack.length-2];if(s&&s.type==="listItem"&&typeof s.checked=="boolean"){const l=this.stack[this.stack.length-1];l.type;const o=l.children[0];if(o&&o.type==="text"){const S=s.children;let C=-1,g;for(;++C<S.length;){const a=S[C];if(a.type==="paragraph"){g=a;break}}g===l&&(o.value=o.value.slice(1),o.value.length===0?l.children.shift():l.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,l.position.start=Object.assign({},o.position.start)))}}this.exit(n)}function Lw(n,s,l,o){const S=n.children[0],C=typeof n.checked=="boolean"&&S&&S.type==="paragraph",g="["+(n.checked?"x":" ")+"] ",a=l.createTracker(o);C&&a.move(g);let u=Rm.listItem(n,s,l,{...o,...a.current()});return C&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),u;function h(p){return p+g}}function Mw(){return[cC(),LC(),zC(),bw(),Tw()]}function Ow(n){return{extensions:[hC(),MC(n),HC(),Aw(n),Dw()]}}const Bw={tokenize:Iw,partial:!0},Lm={tokenize:Pw,partial:!0},Mm={tokenize:Fw,partial:!0},Om={tokenize:qw,partial:!0},zw={tokenize:Vw,partial:!0},Bm={name:"wwwAutolink",tokenize:jw,previous:Hm},zm={name:"protocolAutolink",tokenize:Uw,previous:Nm},Vn={name:"emailAutolink",tokenize:Nw,previous:jm},xn={};function Hw(){return{text:xn}}let ji=48;for(;ji<123;)xn[ji]=Vn,ji++,ji===58?ji=65:ji===91&&(ji=97);xn[43]=Vn;xn[45]=Vn;xn[46]=Vn;xn[95]=Vn;xn[72]=[Vn,zm];xn[104]=[Vn,zm];xn[87]=[Vn,Bm];xn[119]=[Vn,Bm];function Nw(n,s,l){const o=this;let S,C;return g;function g(c){return!cc(c)||!jm.call(o,o.previous)||Rc(o.events)?l(c):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(c))}function a(c){return cc(c)?(n.consume(c),a):c===64?(n.consume(c),u):l(c)}function u(c){return c===46?n.check(zw,p,h)(c):c===45||c===95||Dt(c)?(C=!0,n.consume(c),u):p(c)}function h(c){return n.consume(c),S=!0,u}function p(c){return C&&S&&Mt(o.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),s(c)):l(c)}}function jw(n,s,l){const o=this;return S;function S(g){return g!==87&&g!==119||!Hm.call(o,o.previous)||Rc(o.events)?l(g):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(Bw,n.attempt(Lm,n.attempt(Mm,C),l),l)(g))}function C(g){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),s(g)}}function Uw(n,s,l){const o=this;let S="",C=!1;return g;function g(c){return(c===72||c===104)&&Nm.call(o,o.previous)&&!Rc(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),S+=String.fromCodePoint(c),n.consume(c),a):l(c)}function a(c){if(Mt(c)&&S.length<5)return S+=String.fromCodePoint(c),n.consume(c),a;if(c===58){const b=S.toLowerCase();if(b==="http"||b==="https")return n.consume(c),u}return l(c)}function u(c){return c===47?(n.consume(c),C?h:(C=!0,u)):l(c)}function h(c){return c===null||sa(c)||tt(c)||Ui(c)||ca(c)?l(c):n.attempt(Lm,n.attempt(Mm,p),l)(c)}function p(c){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),s(c)}}function Iw(n,s,l){let o=0;return S;function S(g){return(g===87||g===119)&&o<3?(o++,n.consume(g),S):g===46&&o===3?(n.consume(g),C):l(g)}function C(g){return g===null?l(g):s(g)}}function Pw(n,s,l){let o,S,C;return g;function g(h){return h===46||h===95?n.check(Om,u,a)(h):h===null||tt(h)||Ui(h)||h!==45&&ca(h)?u(h):(C=!0,n.consume(h),g)}function a(h){return h===95?o=!0:(S=o,o=void 0),n.consume(h),g}function u(h){return S||o||!C?l(h):s(h)}}function Fw(n,s){let l=0,o=0;return S;function S(g){return g===40?(l++,n.consume(g),S):g===41&&o<l?C(g):g===33||g===34||g===38||g===39||g===41||g===42||g===44||g===46||g===58||g===59||g===60||g===63||g===93||g===95||g===126?n.check(Om,s,C)(g):g===null||tt(g)||Ui(g)?s(g):(n.consume(g),S)}function C(g){return g===41&&o++,n.consume(g),S}}function qw(n,s,l){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),C):a===93?(n.consume(a),S):a===60||a===null||tt(a)||Ui(a)?s(a):l(a)}function S(a){return a===null||a===40||a===91||tt(a)||Ui(a)?s(a):o(a)}function C(a){return Mt(a)?g(a):l(a)}function g(a){return a===59?(n.consume(a),o):Mt(a)?(n.consume(a),g):l(a)}}function Vw(n,s,l){return o;function o(C){return n.consume(C),S}function S(C){return Dt(C)?l(C):s(C)}}function Hm(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||tt(n)}function Nm(n){return!Mt(n)}function jm(n){return!(n===47||cc(n))}function cc(n){return n===43||n===45||n===46||n===95||Dt(n)}function Rc(n){let s=n.length,l=!1;for(;s--;){const o=n[s][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){l=!0;break}if(o._gfmAutolinkLiteralWalkedInto){l=!1;break}}return n.length>0&&!l&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const Yw={tokenize:Jw,partial:!0};function Gw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:$w,continuation:{tokenize:Qw},exit:Zw}},text:{91:{name:"gfmFootnoteCall",tokenize:Xw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ww,resolveTo:Kw}}}}function Ww(n,s,l){const o=this;let S=o.events.length;const C=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let g;for(;S--;){const u=o.events[S][1];if(u.type==="labelImage"){g=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!g||!g._balanced)return l(u);const h=_n(o.sliceSerialize({start:g.end,end:o.now()}));return h.codePointAt(0)!==94||!C.includes(h.slice(1))?l(u):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),s(u))}}function Kw(n,s){let l=n.length;for(;l--;)if(n[l][1].type==="labelImage"&&n[l][0]==="enter"){n[l][1];break}n[l+1][1].type="data",n[l+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},n[l+3][1].start),end:Object.assign({},n[n.length-1][1].end)},S={type:"gfmFootnoteCallMarker",start:Object.assign({},n[l+3][1].end),end:Object.assign({},n[l+3][1].end)};S.end.column++,S.end.offset++,S.end._bufferIndex++;const C={type:"gfmFootnoteCallString",start:Object.assign({},S.end),end:Object.assign({},n[n.length-1][1].start)},g={type:"chunkString",contentType:"string",start:Object.assign({},C.start),end:Object.assign({},C.end)},a=[n[l+1],n[l+2],["enter",o,s],n[l+3],n[l+4],["enter",S,s],["exit",S,s],["enter",C,s],["enter",g,s],["exit",g,s],["exit",C,s],n[n.length-2],n[n.length-1],["exit",o,s]];return n.splice(l,n.length-l+1,...a),n}function Xw(n,s,l){const o=this,S=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let C=0,g;return a;function a(c){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?l(c):(n.enter("gfmFootnoteCallMarker"),n.consume(c),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(c){if(C>999||c===93&&!g||c===null||c===91||tt(c))return l(c);if(c===93){n.exit("chunkString");const b=n.exit("gfmFootnoteCallString");return S.includes(_n(o.sliceSerialize(b)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),s):l(c)}return tt(c)||(g=!0),C++,n.consume(c),c===92?p:h}function p(c){return c===91||c===92||c===93?(n.consume(c),C++,h):h(c)}}function $w(n,s,l){const o=this,S=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let C,g=0,a;return u;function u(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):l(k)}function p(k){if(g>999||k===93&&!a||k===null||k===91||tt(k))return l(k);if(k===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return C=_n(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),b}return tt(k)||(a=!0),g++,n.consume(k),k===92?c:p}function c(k){return k===91||k===92||k===93?(n.consume(k),g++,p):p(k)}function b(k){return k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),S.includes(C)||S.push(C),Fe(n,w,"gfmFootnoteDefinitionWhitespace")):l(k)}function w(k){return s(k)}}function Qw(n,s,l){return n.check(Hs,s,n.attempt(Yw,s,l))}function Zw(n){n.exit("gfmFootnoteDefinition")}function Jw(n,s,l){const o=this;return Fe(n,S,"gfmFootnoteDefinitionIndent",5);function S(C){const g=o.events[o.events.length-1];return g&&g[1].type==="gfmFootnoteDefinitionIndent"&&g[2].sliceSerialize(g[1],!0).length===4?s(C):l(C)}}function ex(n){let l=(n||{}).singleTilde;const o={name:"strikethrough",tokenize:C,resolveAll:S};return l==null&&(l=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function S(g,a){let u=-1;for(;++u<g.length;)if(g[u][0]==="enter"&&g[u][1].type==="strikethroughSequenceTemporary"&&g[u][1]._close){let h=u;for(;h--;)if(g[h][0]==="exit"&&g[h][1].type==="strikethroughSequenceTemporary"&&g[h][1]._open&&g[u][1].end.offset-g[u][1].start.offset===g[h][1].end.offset-g[h][1].start.offset){g[u][1].type="strikethroughSequence",g[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},g[h][1].start),end:Object.assign({},g[u][1].end)},c={type:"strikethroughText",start:Object.assign({},g[h][1].end),end:Object.assign({},g[u][1].start)},b=[["enter",p,a],["enter",g[h][1],a],["exit",g[h][1],a],["enter",c,a]],w=a.parser.constructs.insideSpan.null;w&&Zt(b,b.length,0,ha(w,g.slice(h+1,u),a)),Zt(b,b.length,0,[["exit",c,a],["enter",g[u][1],a],["exit",g[u][1],a],["exit",p,a]]),Zt(g,h-1,u-h+3,b),u=h+b.length-2;break}}for(u=-1;++u<g.length;)g[u][1].type==="strikethroughSequenceTemporary"&&(g[u][1].type="data");return g}function C(g,a,u){const h=this.previous,p=this.events;let c=0;return b;function b(k){return h===126&&p[p.length-1][1].type!=="characterEscape"?u(k):(g.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const x=Dr(h);if(k===126)return c>1?u(k):(g.consume(k),c++,w);if(c<2&&!l)return u(k);const v=g.exit("strikethroughSequenceTemporary"),_=Dr(k);return v._open=!_||_===2&&!!x,v._close=!x||x===2&&!!_,a(k)}}}class tx{constructor(){this.map=[]}add(s,l,o){nx(this,s,l,o)}consume(s){if(this.map.sort(function(C,g){return C[0]-g[0]}),this.map.length===0)return;let l=this.map.length;const o=[];for(;l>0;)l-=1,o.push(s.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),s.length=this.map[l][0];o.push(s.slice()),s.length=0;let S=o.pop();for(;S;){for(const C of S)s.push(C);S=o.pop()}this.map.length=0}}function nx(n,s,l,o){let S=0;if(!(l===0&&o.length===0)){for(;S<n.map.length;){if(n.map[S][0]===s){n.map[S][1]+=l,n.map[S][2].push(...o);return}S+=1}n.map.push([s,l,o])}}function ix(n,s){let l=!1;const o=[];for(;s<n.length;){const S=n[s];if(l){if(S[0]==="enter")S[1].type==="tableContent"&&o.push(n[s+1][1].type==="tableDelimiterMarker"?"left":"none");else if(S[1].type==="tableContent"){if(n[s-1][1].type==="tableDelimiterMarker"){const C=o.length-1;o[C]=o[C]==="left"?"center":"right"}}else if(S[1].type==="tableDelimiterRow")break}else S[0]==="enter"&&S[1].type==="tableDelimiterRow"&&(l=!0);s+=1}return o}function rx(){return{flow:{null:{name:"table",tokenize:sx,resolveAll:lx}}}}function sx(n,s,l){const o=this;let S=0,C=0,g;return a;function a(H){let q=o.events.length-1;for(;q>-1;){const G=o.events[q][1].type;if(G==="lineEnding"||G==="linePrefix")q--;else break}const V=q>-1?o.events[q][1].type:null,I=V==="tableHead"||V==="tableRow"?A:u;return I===A&&o.parser.lazy[o.now().line]?l(H):I(H)}function u(H){return n.enter("tableHead"),n.enter("tableRow"),h(H)}function h(H){return H===124||(g=!0,C+=1),p(H)}function p(H){return H===null?l(H):Ee(H)?C>1?(C=0,o.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(H),n.exit("lineEnding"),w):l(H):Ne(H)?Fe(n,p,"whitespace")(H):(C+=1,g&&(g=!1,S+=1),H===124?(n.enter("tableCellDivider"),n.consume(H),n.exit("tableCellDivider"),g=!0,p):(n.enter("data"),c(H)))}function c(H){return H===null||H===124||tt(H)?(n.exit("data"),p(H)):(n.consume(H),H===92?b:c)}function b(H){return H===92||H===124?(n.consume(H),c):c(H)}function w(H){return o.interrupt=!1,o.parser.lazy[o.now().line]?l(H):(n.enter("tableDelimiterRow"),g=!1,Ne(H)?Fe(n,k,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):k(H))}function k(H){return H===45||H===58?v(H):H===124?(g=!0,n.enter("tableCellDivider"),n.consume(H),n.exit("tableCellDivider"),x):R(H)}function x(H){return Ne(H)?Fe(n,v,"whitespace")(H):v(H)}function v(H){return H===58?(C+=1,g=!0,n.enter("tableDelimiterMarker"),n.consume(H),n.exit("tableDelimiterMarker"),_):H===45?(C+=1,_(H)):H===null||Ee(H)?E(H):R(H)}function _(H){return H===45?(n.enter("tableDelimiterFiller"),d(H)):R(H)}function d(H){return H===45?(n.consume(H),d):H===58?(g=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(H),n.exit("tableDelimiterMarker"),m):(n.exit("tableDelimiterFiller"),m(H))}function m(H){return Ne(H)?Fe(n,E,"whitespace")(H):E(H)}function E(H){return H===124?k(H):H===null||Ee(H)?!g||S!==C?R(H):(n.exit("tableDelimiterRow"),n.exit("tableHead"),s(H)):R(H)}function R(H){return l(H)}function A(H){return n.enter("tableRow"),L(H)}function L(H){return H===124?(n.enter("tableCellDivider"),n.consume(H),n.exit("tableCellDivider"),L):H===null||Ee(H)?(n.exit("tableRow"),s(H)):Ne(H)?Fe(n,L,"whitespace")(H):(n.enter("data"),T(H))}function T(H){return H===null||H===124||tt(H)?(n.exit("data"),L(H)):(n.consume(H),H===92?z:T)}function z(H){return H===92||H===124?(n.consume(H),T):T(H)}}function lx(n,s){let l=-1,o=!0,S=0,C=[0,0,0,0],g=[0,0,0,0],a=!1,u=0,h,p,c;const b=new tx;for(;++l<n.length;){const w=n[l],k=w[1];w[0]==="enter"?k.type==="tableHead"?(a=!1,u!==0&&(L_(b,s,u,h,p),p=void 0,u=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(l,0,[["enter",h,s]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(o=!0,c=void 0,C=[0,0,0,0],g=[0,l+1,0,0],a&&(a=!1,p={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(l,0,[["enter",p,s]])),S=k.type==="tableDelimiterRow"?2:p?3:1):S&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(o=!1,g[2]===0&&(C[1]!==0&&(g[0]=g[1],c=ia(b,s,C,S,void 0,c),C=[0,0,0,0]),g[2]=l)):k.type==="tableCellDivider"&&(o?o=!1:(C[1]!==0&&(g[0]=g[1],c=ia(b,s,C,S,void 0,c)),C=g,g=[C[1],l,0,0])):k.type==="tableHead"?(a=!0,u=l):k.type==="tableRow"||k.type==="tableDelimiterRow"?(u=l,C[1]!==0?(g[0]=g[1],c=ia(b,s,C,S,l,c)):g[1]!==0&&(c=ia(b,s,g,S,l,c)),S=0):S&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(g[3]=l)}for(u!==0&&L_(b,s,u,h,p),b.consume(s.events),l=-1;++l<s.events.length;){const w=s.events[l];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=ix(s.events,l))}return n}function ia(n,s,l,o,S,C){const g=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",a="tableContent";l[0]!==0&&(C.end=Object.assign({},Ar(s.events,l[0])),n.add(l[0],0,[["exit",C,s]]));const u=Ar(s.events,l[1]);if(C={type:g,start:Object.assign({},u),end:Object.assign({},u)},n.add(l[1],0,[["enter",C,s]]),l[2]!==0){const h=Ar(s.events,l[2]),p=Ar(s.events,l[3]),c={type:a,start:Object.assign({},h),end:Object.assign({},p)};if(n.add(l[2],0,[["enter",c,s]]),o!==2){const b=s.events[l[2]],w=s.events[l[3]];if(b[1].end=Object.assign({},w[1].end),b[1].type="chunkText",b[1].contentType="text",l[3]>l[2]+1){const k=l[2]+1,x=l[3]-l[2]-1;n.add(k,x,[])}}n.add(l[3]+1,0,[["exit",c,s]])}return S!==void 0&&(C.end=Object.assign({},Ar(s.events,S)),n.add(S,0,[["exit",C,s]]),C=void 0),C}function L_(n,s,l,o,S){const C=[],g=Ar(s.events,l);S&&(S.end=Object.assign({},g),C.push(["exit",S,s])),o.end=Object.assign({},g),C.push(["exit",o,s]),n.add(l+1,0,C)}function Ar(n,s){const l=n[s],o=l[0]==="enter"?"start":"end";return l[1][o]}const ax={name:"tasklistCheck",tokenize:ux};function ox(){return{text:{91:ax}}}function ux(n,s,l){const o=this;return S;function S(u){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?l(u):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),C)}function C(u){return tt(u)?(n.enter("taskListCheckValueUnchecked"),n.consume(u),n.exit("taskListCheckValueUnchecked"),g):u===88||u===120?(n.enter("taskListCheckValueChecked"),n.consume(u),n.exit("taskListCheckValueChecked"),g):l(u)}function g(u){return u===93?(n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),a):l(u)}function a(u){return Ee(u)?s(u):Ne(u)?n.check({tokenize:cx},s,l)(u):l(u)}}function cx(n,s,l){return Fe(n,o,"whitespace");function o(S){return S===null?l(S):s(S)}}function hx(n){return X_([Hw(),Gw(),ex(n),rx(),ox()])}const fx={};function dx(n){const s=this,l=n||fx,o=s.data(),S=o.micromarkExtensions||(o.micromarkExtensions=[]),C=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),g=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);S.push(hx(l)),C.push(Mw()),g.push(Ow(l))}function px({settings:n,busy:s=!1,promptPreviews:l,testResult:o,onSave:S,onTest:C,onClose:g}){const[a,u]=ge.useState(n),[h,p]=ge.useState(n.apiKey??"");return ge.useEffect(()=>{u(n),p(n.apiKey??"")},[n]),F.jsx("div",{className:"modal-backdrop",children:F.jsxs("section",{className:"translation-settings-modal",role:"dialog","aria-modal":"true","aria-label":"Translation Settings",children:[F.jsxs("header",{children:[F.jsxs("div",{children:[F.jsx("h2",{children:"Translation Settings"}),F.jsx("p",{children:"Use an OpenAI-compatible endpoint for the embedded translation panel."})]}),F.jsx("button",{type:"button",onClick:g,children:"Close"})]}),F.jsxs("div",{className:"translation-settings-grid",children:[F.jsxs("label",{children:[F.jsx("span",{children:"Base URL"}),F.jsx("input",{value:a.baseUrl,onChange:c=>u({...a,baseUrl:c.target.value}),placeholder:"https://api.openai.com/v1"})]}),F.jsxs("label",{children:[F.jsx("span",{children:"API key"}),F.jsx("input",{value:h,onChange:c=>p(c.target.value),placeholder:"API key",autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,type:"text"})]}),F.jsxs("label",{children:[F.jsx("span",{children:"Model"}),F.jsx("input",{value:a.model,onChange:c=>u({...a,model:c.target.value})})]}),F.jsxs("label",{children:[F.jsx("span",{children:"Target language"}),F.jsx("input",{value:a.targetLanguage,onChange:c=>u({...a,targetLanguage:c.target.value})})]}),F.jsxs("label",{children:[F.jsx("span",{children:"Use context"}),F.jsx("input",{checked:a.contextEnabled,type:"checkbox",onChange:c=>u({...a,contextEnabled:c.target.checked})})]}),F.jsxs("label",{children:[F.jsx("span",{children:"Timeout ms"}),F.jsx("input",{min:3e3,type:"number",value:a.requestTimeoutMs,onChange:c=>u({...a,requestTimeoutMs:Number(c.target.value)})})]}),F.jsxs("label",{children:[F.jsx("span",{children:"Temperature"}),F.jsx("input",{min:0,max:1,step:.1,type:"number",value:a.temperature,onChange:c=>u({...a,temperature:Number(c.target.value)})})]})]}),F.jsxs("section",{className:"translation-prompt-settings",children:[F.jsxs("header",{children:[F.jsxs("div",{children:[F.jsx("h3",{children:"Translation Prompts"}),F.jsx("p",{children:"Edit the three cc-pm style prompt slots directly."})]}),F.jsx("button",{type:"button",disabled:s,onClick:()=>u({...a,prompts:void 0}),children:"Reset prompts"})]}),F.jsx("div",{className:"translation-prompt-stack",children:l.map(c=>F.jsxs("label",{children:[F.jsx("span",{children:c.label}),F.jsx("textarea",{value:mx(a,c),onChange:b=>u({...a,prompts:_x(a.prompts,c.key,b.target.value,c.defaultPrompt)})})]},c.key))})]}),o?F.jsx("div",{className:o.ok?"translation-test-result is-ok":"translation-test-result is-error",children:o.ok?`Connection ok: ${o.model} in ${o.elapsedMs}ms`:o.error}):null,F.jsxs("footer",{children:[F.jsx("button",{type:"button",disabled:s,onClick:C,children:"Test Connection"}),F.jsx("button",{type:"button",disabled:s,onClick:()=>void S({...a,enabled:!0,translateOutput:!0,translateUserInput:!0,inputMode:"review-before-send"},h.trim()),children:"Save"})]})]})})}function _x(n,s,l,o){const S={...n??{}};return l.trim()&&l!==o?S[s]=l:delete S[s],Object.keys(S).length>0?S:void 0}function mx(n,s){var l;return((l=n.prompts)==null?void 0:l[s.key])??s.defaultPrompt}function gx({active:n=!0,taskSlug:s,role:l,sessionId:o}){const[S,C]=ge.useState(null),[g,a]=ge.useState([]),[u,h]=ge.useState(""),[p,c]=ge.useState(!1),[b,w]=ge.useState(!1),[k,x]=ge.useState(!1),[v,_]=ge.useState("ready"),[d,m]=ge.useState(""),[E,R]=ge.useState(Date.now()),[A,L]=ge.useState(!1),[T,z]=ge.useState(""),[H,q]=ge.useState(!1),[V,I]=ge.useState([]),[G,K]=ge.useState(),[Y,Z]=ge.useState(0),ee=ge.useRef(n),O=ge.useRef(1),M=ge.useRef(null);ge.useEffect(()=>{ee.current=n},[n]),ge.useEffect(()=>{Promise.all([Be.getTranslationSettings(),Be.getTranslationPrompts()]).then(([Q,pe])=>{C(Q),I(pe)}).catch(Q=>z(Q.message))},[]),ge.useEffect(()=>{a([]),z(""),_("ready"),m(""),O.current=1;let Q=!1,pe;const _e=()=>{Q||(pe=window.setTimeout(Ae,ee.current?200:1e3))},Ae=async()=>{if(!Q)try{const ce=await Be.pollTranslationSession(o,O.current);if(Q)return;N(ce.events),O.current=ce.nextCursor,_(ce.status),ee.current&&m(Ex(new Date().toISOString()))}catch(ce){Q||z(ce instanceof Error?ce.message:"Translation poll failed.")}finally{_e()}};return Be.startTranslationSession(s,l).then(ce=>{Q||(_(ce.status),O.current=ce.nextCursor,Ae())}).catch(ce=>{Q||z(ce instanceof Error?ce.message:"Translation start failed.")}),()=>{Q=!0,pe!==void 0&&window.clearTimeout(pe)}},[o,s,l,Y]),ge.useEffect(()=>{var Q;n&&((Q=M.current)==null||Q.scrollIntoView({block:"nearest"}))},[n,g.length]);const B=Sx(g);ge.useEffect(()=>{if(!B)return;R(Date.now());const Q=window.setInterval(()=>R(Date.now()),250);return()=>window.clearInterval(Q)},[B]);async function P(Q=!1){if(S){L(!0),z(""),c(!1);try{const pe=await Be.translateUserInput(s,l,{text:u,mode:Q?"auto-send":"review-before-send",useContext:S.contextEnabled,send:Q});x(pe.contextUsed),pe.sent?(h(""),c(!1)):(h(pe.englishPreview),c(!0))}catch(pe){z(pe instanceof Error?pe.message:"Translation failed.")}finally{L(!1)}}}function N(Q){if(Q.length===0)return;for(const _e of Q)_e.type==="status"?_(_e.status):_e.type==="error"&&z(_e.message);const pe=Q.filter(_e=>_e.type==="entry");pe.length>0&&a(_e=>pe.reduce((Ae,ce)=>wx(Ae,ce.entry),_e))}async function ie(){if(u.trim()){L(!0),z("");try{await Be.sendTranslatedInput(s,l,{englishText:u}),h(""),c(!1),x(!1)}catch(Q){z(Q instanceof Error?Q.message:"Failed to send English input.")}finally{L(!1)}}}function fe(Q){Q.key!=="Enter"||Q.shiftKey||Q.nativeEvent.isComposing||(Q.preventDefault(),!A&&u.trim()&&(p?ie():P(b)))}async function de(Q,pe){L(!0),z("");try{const _e=await Be.updateTranslationSettings({...Q,...pe!==void 0?{apiKey:pe}:{}}),Ae=await Be.getTranslationPrompts();C(_e),I(Ae),q(!1),Z(ce=>ce+1)}catch(_e){z(_e instanceof Error?_e.message:"Failed to save translation settings.")}finally{L(!1)}}async function X(){L(!0),z("");try{K(await Be.testTranslationProvider())}catch(Q){z(Q instanceof Error?Q.message:"Provider test failed.")}finally{L(!1)}}async function U(){a([]),O.current=1,await Be.clearTranslationSession(o).catch(Q=>z(Q.message))}if(!S)return F.jsx("aside",{className:"translation-panel",children:F.jsx("p",{className:"muted",children:"Loading translation settings..."})});const le=yx(g,v,E);return F.jsxs("aside",{className:"translation-panel",children:[F.jsxs("header",{className:"translation-panel-header",children:[F.jsxs("div",{className:"translation-panel-titlebar",children:[F.jsx("h2",{children:"Translation"}),F.jsxs("div",{className:"translation-panel-actions",children:[F.jsx("button",{"aria-pressed":b,className:`auto-send-toggle${b?" is-active":""}`,type:"button",onClick:()=>w(Q=>!Q),children:b?"✅ Auto-send":"× Auto-send"}),F.jsx("button",{type:"button",onClick:()=>q(!0),children:"Settings"}),F.jsx("button",{type:"button",onClick:()=>void U(),children:"Clear"})]})]}),F.jsxs("div",{className:"translation-status-row",children:[F.jsxs("p",{children:[S.model," · ",le,k?" · context used":""]}),F.jsx("p",{children:d?`poll ${d}`:"poll -"})]})]}),T?F.jsx("div",{className:"error-banner",children:T}):null,F.jsxs("div",{className:"translation-entry-list",children:[g.length===0?F.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,g.map(Q=>F.jsx(vx,{entry:Q},Q.id)),F.jsx("div",{ref:M})]}),F.jsx("div",{className:"translation-composer",children:F.jsxs("div",{className:"translation-composer-row",children:[F.jsx("textarea",{value:u,onChange:Q=>{h(Q.target.value),Q.target.value.trim()||c(!1)},onKeyDown:fe,placeholder:"输入中文,先翻译成英文工程指令..."}),F.jsx("div",{className:"translation-composer-actions",children:F.jsx("button",{type:"button",disabled:A||!p||!u.trim(),onClick:()=>void ie(),children:"Send English"})})]})}),H?F.jsx(px,{settings:S,busy:A,promptPreviews:V,testResult:G,onSave:de,onTest:X,onClose:()=>q(!1)}):null]})}function vx({entry:n}){const s=Cx(n),l=n.sourceKind==="tool-output",o=n.direction==="user-input-to-english",S=["translation-entry",`is-${n.sourceKind}`,o?"is-user-input":""].filter(Boolean).join(" ");return F.jsxs("article",{className:S,children:[l?F.jsx("pre",{children:s}):F.jsx("div",{className:"translation-markdown",children:F.jsx(eC,{remarkPlugins:[dx],children:s})}),n.warning?F.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?F.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function Sx(n){const s=n.find(Um);return(s==null?void 0:s.translationStartedAt)??(s==null?void 0:s.createdAt)}function yx(n,s,l){const o=n.find(Um);if(o)return`translating ${xx(Math.max(0,l-bx(o)))}`;const S=n.at(-1);return(S==null?void 0:S.status)==="failed"||s==="failed"?"error":s}function Um(n){return n.status==="queued"||n.status==="translating"}function bx(n){const s=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(s)?s:Date.now()}function Cx(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.translatedText:n.translatedText||n.sourceText}function wx(n,s){return n.findIndex(o=>o.id===s.id)===-1?[...n,s]:n.map(o=>o.id===s.id?s:o)}function xx(n){if(n<1e3)return`${Math.max(.1,n/1e3).toFixed(1)}s`;const s=n/1e3;if(s<60)return`${s.toFixed(1)}s`;const l=Math.floor(s/60),o=Math.floor(s%60).toString().padStart(2,"0");return`${l}:${o}`}function Ex(n){const s=new Date(n);return Number.isNaN(s.getTime())?n:s.toLocaleTimeString()}function kx({role:n,session:s,permissionMode:l,active:o=!0,busy:S,orchestrationMode:C,onPermissionModeChange:g,onOrchestrationModeChange:a,onStart:u,onResume:h,onStop:p,onRestart:c,onTerminalEvent:b}){const[w,k]=ge.useState(!1),x=C==="auto";return F.jsxs("section",{className:"session-console",children:[F.jsxs("div",{className:"session-console-top",children:[F.jsx(P0,{role:n,session:s,permissionMode:l,busy:S,onPermissionModeChange:g,onStart:u,onResume:h,onStop:p,onRestart:c}),F.jsxs("div",{className:"session-console-actions",children:[F.jsx("button",{"aria-label":`Auto orchestration is ${x?"on":"off"}`,"aria-pressed":x,className:`translation-toggle${x?" is-active":""}`,disabled:S,type:"button",onClick:()=>a(x?"manual":"auto"),children:x?"✅ Auto orchestration":"× Auto orchestration"}),F.jsx("button",{"aria-pressed":w,className:`translation-toggle${w?" is-active":""}`,type:"button",onClick:()=>k(v=>!v),children:w?"✅ Translate":"× Translate"})]})]}),(s==null?void 0:s.status)==="running"?F.jsx(Ax,{active:o,onTerminalEvent:b,role:n,session:s,taskSlug:s.taskSlug,translationEnabled:w}):F.jsxs("div",{className:"terminal-empty",children:[F.jsx("strong",{children:n}),F.jsx("span",{children:s!=null&&s.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]})}function Ax({active:n,onTerminalEvent:s,role:l,session:o,taskSlug:S,translationEnabled:C}){return F.jsxs("div",{className:C?"session-console-body has-translation":"session-console-body",children:[F.jsx("div",{className:"terminal-pane",children:F.jsx(z0,{sessionId:o.id,active:n,onEvent:s},o.id)}),C?F.jsx("div",{className:"translation-pane",children:F.jsx(gx,{active:n,taskSlug:S,role:l,sessionId:o.id},o.id)}):null]})}function Tx(n,s,l){var C;if(!n||l.mode!=="auto"||l.paused)return null;const o=new Map(n.map(g=>[g.id,g])),S=s.filter(g=>{var a;return g.status!=="delivered"?!1:((a=o.get(g.id))==null?void 0:a.status)!=="delivered"});return S.length===0?null:((C=S.sort(Dx)[S.length-1])==null?void 0:C.toRole)??null}function Dx(n,s){const l=n.deliveredAt??"",o=s.deliveredAt??"";return l!==o?l.localeCompare(o):n.createdAt.localeCompare(s.createdAt)}function Rx({task:n,activeRole:s,onTaskChanged:l,onActiveRoleChange:o,onWorkflowChanged:S,onMessagesChanged:C,onOrchestrationChanged:g,onRoundStateChanged:a,onEventsChanged:u}){const[h,p]=ge.useState(null),[c,b]=ge.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default"}),[w,k]=ge.useState(!1),[x,v]=ge.useState(""),[_,d]=ge.useState([]),[m,E]=ge.useState(null),R=ge.useRef(null),A=ge.useCallback((I,G,K,Y)=>{var O;const Z=((O=R.current)==null?void 0:O.taskSlug)===n.taskSlug?R.current.messages:null,ee=Tx(Z,G,K);R.current={taskSlug:n.taskSlug,messages:G},p(I),E(K),S==null||S(I.workflow),C==null||C(G),g==null||g(K),a==null||a(Y),ee&&(o(ee),H(`auto switched to ${ee} for delivered VCM message`))},[o,C,g,a,S,n.taskSlug]),L=ge.useCallback(async()=>{const[I,G,K,Y]=await Promise.all([Be.getTaskStatus(n.taskSlug),Be.listMessages(n.taskSlug),Be.getOrchestrationState(n.taskSlug),Be.getTaskRoundState(n.taskSlug)]);A(I,G,K,Y)},[A,n.taskSlug]);ge.useEffect(()=>{L().catch(I=>v(I.message))},[L]),ge.useEffect(()=>{d([]),u==null||u([])},[u,n.taskSlug]),ge.useEffect(()=>{b(I=>{let G=!1;const K={...I};for(const Y of(h==null?void 0:h.sessions)??[])K[Y.role]!==Y.permissionMode&&(K[Y.role]=Y.permissionMode,G=!0);return G?K:I})},[h==null?void 0:h.sessions]),ge.useEffect(()=>{const I=window.setInterval(()=>{Promise.all([Be.getTaskStatus(n.taskSlug),Be.listMessages(n.taskSlug),Be.getOrchestrationState(n.taskSlug),Be.getTaskRoundState(n.taskSlug)]).then(([G,K,Y,Z])=>{A(G,K,Y,Z)}).catch(G=>v(G.message))},3e3);return()=>window.clearInterval(I)},[A,n.taskSlug]);async function T(I){k(!0),v("");try{await I(),await L(),await l()}catch(G){v(G instanceof Error?G.message:"Action failed.")}finally{k(!1)}}async function z(){const I=n.worktreePath?[`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(`
|
|
87
|
+
`):[`Close task "${n.taskSlug}"?`,"","This task was created without a separate worktree/branch.","VCM will stop VCM-managed running role sessions for this task.","VCM will delete task/session/message/orchestration state only.","","VCM will not check running sessions or uncommitted changes before closing."].join(`
|
|
88
|
+
`);if(window.confirm(I)){k(!0),v("");try{await Be.cleanupTask(n.taskSlug,{force:!0,deleteBranch:!!n.worktreePath,forceDeleteBranch:!0}),H(`closed ${n.taskSlug}`),await l()}catch(K){v(K instanceof Error?K.message:"Close task failed.")}finally{k(!1)}}}function H(I){d(G=>{const K=[...G,`${new Date().toLocaleTimeString()} ${I}`];return u==null||u(K),K})}function q(I,G){b(K=>({...K,[I]:G}))}async function V(I){k(!0),v("");try{const G=await Be.updateOrchestrationState(n.taskSlug,{mode:I});E(G),g==null||g(G),H(`auto orchestration ${I==="auto"?"enabled":"disabled"}`)}catch(G){v(G instanceof Error?G.message:"Failed to update orchestration mode.")}finally{k(!1)}}return F.jsxs("div",{className:"task-workspace",children:[F.jsxs("header",{className:"workspace-header",children:[F.jsxs("div",{className:"workspace-title-line",children:[F.jsx("span",{className:"eyebrow",children:"Task Workspace"}),F.jsx("h1",{children:n.title||n.taskSlug}),F.jsx("span",{className:"workspace-branch",children:n.branch}),n.worktreePath?F.jsx("span",{className:"workspace-worktree",children:n.worktreePath}):null]}),F.jsx(A0,{activeRole:s,sessions:(h==null?void 0:h.sessions)??[],onSelect:o}),F.jsx("button",{type:"button",onClick:()=>void L(),children:"Refresh"}),F.jsx("button",{className:"danger-button",type:"button",disabled:w,onClick:()=>void z(),children:"Close Task"})]}),x?F.jsx("div",{className:"error-banner",children:x}):null,F.jsx("div",{className:"workspace-grid",children:F.jsx("div",{className:"workspace-main",children:F.jsx("div",{className:"role-console-stack",children:ua.map(I=>{const G=I.name,K=G===s,Y=O_((h==null?void 0:h.sessions)??[],G);return F.jsx("div",{className:K?"role-console-panel is-active":"role-console-panel","aria-hidden":!K,children:F.jsx(kx,{role:G,session:Y,permissionMode:c[G],active:K,busy:w,orchestrationMode:(m==null?void 0:m.mode)??"manual",onPermissionModeChange:Z=>q(G,Z),onOrchestrationModeChange:Z=>void V(Z),onStart:()=>void T(async()=>{await Be.startRoleSession(n.taskSlug,G,{cols:100,rows:28,permissionMode:c[G]}),H(`started ${G} with ${c[G]}`)}),onResume:()=>void T(async()=>{await Be.resumeRoleSession(n.taskSlug,G,{cols:100,rows:28,permissionMode:c[G]}),H(`resumed ${G} with ${c[G]}`)}),onStop:()=>void T(async()=>{await Be.stopRoleSession(n.taskSlug,G),H(`stopped ${G}`)}),onRestart:()=>void T(async()=>{await Be.restartRoleSession(n.taskSlug,G,{cols:100,rows:28,permissionMode:c[G]}),H(`restarted ${G} with ${c[G]}`)}),onTerminalEvent:Z=>H(`${I.label}: ${Z}`)})},G)})})})})]})}function Lx(){const[n,s]=ge.useState(null),[l,o]=ge.useState([]),[S,C]=ge.useState(null),[g,a]=ge.useState(null),[u,h]=ge.useState([]),[p,c]=ge.useState(null),[b,w]=ge.useState(null),[k,x]=ge.useState(null),[v,_]=ge.useState(null),[d,m]=ge.useState(null),[E,R]=ge.useState("project-manager"),[A,L]=ge.useState("system"),[T,z]=ge.useState(!0),[H,q]=ge.useState(null),[V,I]=ge.useState(!1),[G,K]=ge.useState(!1),[Y,Z]=ge.useState(""),ee=ge.useRef({}),O=ge.useMemo(()=>p0(u,p),[u,p]),M=ge.useCallback(ce=>{O!=null&&O.taskSlug&&w({taskSlug:O.taskSlug,workflow:ce})},[O==null?void 0:O.taskSlug]),B=ge.useCallback(ce=>{O!=null&&O.taskSlug&&x({taskSlug:O.taskSlug,messages:ce})},[O==null?void 0:O.taskSlug]),P=ge.useCallback(ce=>{O!=null&&O.taskSlug&&_({taskSlug:O.taskSlug,orchestration:ce})},[O==null?void 0:O.taskSlug]),N=ge.useCallback(ce=>{O!=null&&O.taskSlug&&m({taskSlug:O.taskSlug,events:ce})},[O==null?void 0:O.taskSlug]),ie=ge.useCallback(ce=>{if(!(O!=null&&O.taskSlug)||ce.taskSlug!==O.taskSlug||ce.status!=="completed"||!ce.completionId||ee.current[ce.taskSlug]===ce.completionId||(ee.current[ce.taskSlug]=ce.completionId,!T))return;const Ge=ce.activeRole??"role";q({id:ce.completionId,text:`Round complete: ${Ge} finished.`}),Mx(),window.setTimeout(()=>{q(we=>(we==null?void 0:we.id)===ce.completionId?null:we)},5e3)},[O==null?void 0:O.taskSlug,T]);async function fe(){const ce=await Be.listTasks();return h(ce),c(be=>{var Ge;return be&&ce.some(we=>we.taskSlug===be)?be:((Ge=ce[0])==null?void 0:Ge.taskSlug)??null}),ce}async function de(){const ce=await Be.getHarnessStatus();return C(ce),ce}async function X(){const ce=await Be.getRecentRepositoryPaths();return o(ce),ce}async function U(ce){const[be,Ge]=await Promise.all([Be.listMessages(ce),Be.getOrchestrationState(ce)]);x({taskSlug:ce,messages:be}),_({taskSlug:ce,orchestration:Ge})}ge.useEffect(()=>{Promise.all([Be.getCurrentProject(),Be.getRecentRepositoryPaths(),Be.getAppPreferences()]).then(async([ce,be,Ge])=>{s(ce),o(be),L(Ge.themeMode),z(Ge.roundCompletionAlerts),ce&&await Promise.all([fe(),de()])}).catch(ce=>Z(ce.message))},[]),ge.useEffect(()=>{const ce=window.matchMedia("(prefers-color-scheme: dark)"),be=()=>I(ce.matches);return be(),ce.addEventListener("change",be),()=>ce.removeEventListener("change",be)},[]),ge.useEffect(()=>{const ce=A==="system"?V?"dark":"light":A;document.documentElement.dataset.theme=ce,document.documentElement.dataset.themeMode=A},[V,A]);async function le(ce){K(!0),Z("");try{await ce()}catch(be){Z(be instanceof Error?be.message:"Action failed.")}finally{K(!1)}}const Q=b&&b.taskSlug===(O==null?void 0:O.taskSlug)?b.workflow:null,pe=k&&k.taskSlug===(O==null?void 0:O.taskSlug)?k.messages:[],_e=v&&v.taskSlug===(O==null?void 0:O.taskSlug)?v.orchestration:null,Ae=d&&d.taskSlug===(O==null?void 0:O.taskSlug)?d.events:[];return F.jsxs(d0,{sidebar:F.jsx(w0,{project:n,recentRepositoryPaths:l,tasks:u,activeTaskSlug:(O==null?void 0:O.taskSlug)??null,workflow:Q,messages:pe,orchestration:_e,events:Ae,harnessStatus:S,harnessApplyResult:g,busy:G,onConnect:ce=>le(async()=>{const be=await Be.connectProject({repoPath:ce});s(be),a(null),await Promise.all([fe(),de(),X()])}),onRefreshHarness:()=>le(async()=>{a(null),await de()}),onApplyHarness:()=>le(async()=>{const ce=await Be.applyHarness();a(ce),await de()}),onCreateTask:ce=>le(async()=>{const be=await Be.createTask(ce);await fe(),c(be.taskSlug)}),onSelectTask:c,themeMode:A,onThemeModeChange:ce=>{L(ce),le(async()=>{const be=await Be.updateAppPreferences({themeMode:ce});L(be.themeMode),z(be.roundCompletionAlerts)})},roundCompletionAlerts:T,onRoundCompletionAlertsChange:ce=>{z(ce),le(async()=>{const be=await Be.updateAppPreferences({roundCompletionAlerts:ce});L(be.themeMode),z(be.roundCompletionAlerts)})},onStageMessage:ce=>{le(async()=>{const be=await Be.stageMessage(ce.taskSlug,ce.id);R(be.toRole),await U(ce.taskSlug)})},onRejectMessage:ce=>{le(async()=>{await Be.rejectMessage(ce.taskSlug,ce.id),await U(ce.taskSlug)})},onOpenMessageRole:R}),children:[Y?F.jsx("div",{className:"error-banner",children:Y}):null,H?F.jsxs("div",{className:"round-notice",role:"status",children:[F.jsx("strong",{children:"Round complete"}),F.jsx("span",{children:H.text})]}):null,n&&O?F.jsx(Rx,{task:O,activeRole:E,onTaskChanged:async()=>{await fe()},onActiveRoleChange:R,onWorkflowChanged:M,onMessagesChanged:B,onOrchestrationChanged:P,onRoundStateChanged:ie,onEventsChanged:N}):F.jsxs("section",{className:"empty-workspace",children:[F.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),F.jsx("p",{children:n?"Tasks create local role commands, logs, and handoff artifacts for the selected repository.":"VibeCodingMaster will create a local task workspace, role sessions, logs, and handoff artifacts."})]})]})}function Mx(){const n=window.AudioContext??window.webkitAudioContext;if(n)try{const s=new n,l=s.createOscillator(),o=s.createGain();l.type="sine",l.frequency.setValueAtTime(740,s.currentTime),o.gain.setValueAtTime(1e-4,s.currentTime),o.gain.exponentialRampToValueAtTime(.08,s.currentTime+.02),o.gain.exponentialRampToValueAtTime(1e-4,s.currentTime+.28),l.connect(o),o.connect(s.destination),l.start(),l.stop(s.currentTime+.3),window.setTimeout(()=>{s.close().catch(()=>{})},500)}catch{}}const Im=document.getElementById("root");if(!Im)throw new Error("Missing #root element.");f0.createRoot(Im).render(F.jsx(ge.StrictMode,{children:F.jsx(Lx,{})}));
|