vibe-coding-master 0.0.9 → 0.0.10
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 +33 -23
- package/dist/backend/api/app-settings-routes.js +8 -0
- package/dist/backend/api/message-routes.js +3 -1
- package/dist/backend/api/session-routes.js +7 -1
- package/dist/backend/api/task-routes.js +3 -10
- package/dist/backend/api/translation-routes.js +21 -3
- package/dist/backend/runtime/terminal-submit.js +20 -0
- package/dist/backend/server.js +8 -4
- package/dist/backend/services/app-settings-service.js +28 -0
- package/dist/backend/services/claude-transcript-service.js +12 -8
- package/dist/backend/services/command-dispatcher.js +2 -1
- package/dist/backend/services/message-service.js +10 -6
- package/dist/backend/services/project-service.js +0 -3
- package/dist/backend/services/session-service.js +7 -4
- package/dist/backend/services/task-service.js +65 -56
- package/dist/backend/services/translation-service.js +264 -77
- package/dist/shared/types/app-settings.js +1 -0
- package/dist-frontend/assets/index-B1vIIwLq.js +88 -0
- package/dist-frontend/assets/index-DPyKuEOz.css +32 -0
- package/dist-frontend/index.html +2 -2
- package/docs/cc-best-practices.md +4 -4
- package/docs/product-design.md +64 -29
- package/docs/v1-architecture-design.md +82 -48
- package/docs/v1-implementation-plan.md +73 -53
- package/package.json +3 -1
- package/dist/backend/ws/translation-ws.js +0 -35
- package/dist-frontend/assets/index-CuiNNOzj.css +0 -32
- package/dist-frontend/assets/index-D59GuHCR.js +0 -58
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
var tS=Object.defineProperty;var iS=(i,s,l)=>s in i?tS(i,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[s]=l;var Tp=(i,s,l)=>iS(i,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 b of S)if(b.type==="childList")for(const _ of b.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&o(_)}).observe(document,{childList:!0,subtree:!0});function l(S){const b={};return S.integrity&&(b.integrity=S.integrity),S.referrerPolicy&&(b.referrerPolicy=S.referrerPolicy),S.crossOrigin==="use-credentials"?b.credentials="include":S.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function o(S){if(S.ep)return;S.ep=!0;const b=l(S);fetch(S.href,b)}})();function M_(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}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 nS(){if(Dp)return ws;Dp=1;var i=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function l(o,S,b){var _=null;if(b!==void 0&&(_=""+b),S.key!==void 0&&(_=""+S.key),"key"in S){b={};for(var a in S)a!=="key"&&(b[a]=S[a])}else b=S;return S=b.ref,{$$typeof:i,type:o,key:_,ref:S!==void 0?S:null,props:b}}return ws.Fragment=s,ws.jsx=l,ws.jsxs=l,ws}var Rp;function rS(){return Rp||(Rp=1,Tu.exports=nS()),Tu.exports}var F=rS(),Du={exports:{}},Ae={};/**
|
|
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 sS(){if(Lp)return Ae;Lp=1;var i=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"),b=Symbol.for("react.consumer"),_=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),C=Symbol.iterator;function w(B){return B===null||typeof B!="object"?null:(B=C&&B[C]||B["@@iterator"],typeof B=="function"?B:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function p(B,I,H){this.props=B,this.context=I,this.refs=v,this.updater=H||T}p.prototype.isReactComponent={},p.prototype.setState=function(B,I){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,I,"setState")},p.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function d(){}d.prototype=p.prototype;function m(B,I,H){this.props=B,this.context=I,this.refs=v,this.updater=H||T}var E=m.prototype=new d;E.constructor=m,x(E,p.prototype),E.isPureReactComponent=!0;var R=Array.isArray;function A(){}var L={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function O(B,I,H){var ie=H.ref;return{$$typeof:i,type:B,key:I,ref:ie!==void 0?ie:null,props:H}}function j(B,I){return O(B.type,I,B.props)}function P(B){return typeof B=="object"&&B!==null&&B.$$typeof===i}function V(B){var I={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(H){return I[H]})}var q=/\/+/g;function Y(B,I){return typeof B=="object"&&B!==null&&B.key!=null?V(""+B.key):I.toString(36)}function $(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(I){B.status==="pending"&&(B.status="fulfilled",B.value=I)},function(I){B.status==="pending"&&(B.status="rejected",B.reason=I)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function G(B,I,H,ie,he){var fe=typeof B;(fe==="undefined"||fe==="boolean")&&(B=null);var X=!1;if(B===null)X=!0;else switch(fe){case"bigint":case"string":case"number":X=!0;break;case"object":switch(B.$$typeof){case i:case s:X=!0;break;case g:return X=B._init,G(X(B._payload),I,H,ie,he)}}if(X)return he=he(B),X=ie===""?"."+Y(B,0):ie,R(he)?(H="",X!=null&&(H=X.replace(q,"$&/")+"/"),G(he,I,H,"",function(Q){return Q})):he!=null&&(P(he)&&(he=j(he,H+(he.key==null||B&&B.key===he.key?"":(""+he.key).replace(q,"$&/")+"/")+X)),I.push(he)),1;X=0;var N=ie===""?".":ie+":";if(R(B))for(var re=0;re<B.length;re++)ie=B[re],fe=N+Y(ie,re),X+=G(ie,I,H,fe,he);else if(re=w(B),typeof re=="function")for(B=re.call(B),re=0;!(ie=B.next()).done;)ie=ie.value,fe=N+Y(ie,re++),X+=G(ie,I,H,fe,he);else if(fe==="object"){if(typeof B.then=="function")return G($(B),I,H,ie,he);throw I=String(B),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return X}function J(B,I,H){if(B==null)return B;var ie=[],he=0;return G(B,ie,"","",function(fe){return I.call(H,fe,he++)}),ie}function ne(B){if(B._status===-1){var I=B._result;I=I(),I.then(function(H){(B._status===0||B._status===-1)&&(B._status=1,B._result=H)},function(H){(B._status===0||B._status===-1)&&(B._status=2,B._result=H)}),B._status===-1&&(B._status=0,B._result=I)}if(B._status===1)return B._result.default;throw B._result}var z=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=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(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},M={map:J,forEach:function(B,I,H){J(B,function(){I.apply(this,arguments)},H)},count:function(B){var I=0;return J(B,function(){I++}),I},toArray:function(B){return J(B,function(I){return I})||[]},only:function(B){if(!P(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return Ae.Activity=c,Ae.Children=M,Ae.Component=p,Ae.Fragment=l,Ae.Profiler=S,Ae.PureComponent=m,Ae.StrictMode=o,Ae.Suspense=u,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(B){return L.H.useMemoCache(B)}},Ae.cache=function(B){return function(){return B.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(B,I,H){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var ie=x({},B.props),he=B.key;if(I!=null)for(fe in I.key!==void 0&&(he=""+I.key),I)!k.call(I,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&I.ref===void 0||(ie[fe]=I[fe]);var fe=arguments.length-2;if(fe===1)ie.children=H;else if(1<fe){for(var X=Array(fe),N=0;N<fe;N++)X[N]=arguments[N+2];ie.children=X}return O(B.type,he,ie)},Ae.createContext=function(B){return B={$$typeof:_,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:b,_context:B},B},Ae.createElement=function(B,I,H){var ie,he={},fe=null;if(I!=null)for(ie in I.key!==void 0&&(fe=""+I.key),I)k.call(I,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(he[ie]=I[ie]);var X=arguments.length-2;if(X===1)he.children=H;else if(1<X){for(var N=Array(X),re=0;re<X;re++)N[re]=arguments[re+2];he.children=N}if(B&&B.defaultProps)for(ie in X=B.defaultProps,X)he[ie]===void 0&&(he[ie]=X[ie]);return O(B,fe,he)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(B){return{$$typeof:a,render:B}},Ae.isValidElement=P,Ae.lazy=function(B){return{$$typeof:g,_payload:{_status:-1,_result:B},_init:ne}},Ae.memo=function(B,I){return{$$typeof:h,type:B,compare:I===void 0?null:I}},Ae.startTransition=function(B){var I=L.T,H={};L.T=H;try{var ie=B(),he=L.S;he!==null&&he(H,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(A,z)}catch(fe){z(fe)}finally{I!==null&&H.types!==null&&(I.types=H.types),L.T=I}},Ae.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Ae.use=function(B){return L.H.use(B)},Ae.useActionState=function(B,I,H){return L.H.useActionState(B,I,H)},Ae.useCallback=function(B,I){return L.H.useCallback(B,I)},Ae.useContext=function(B){return L.H.useContext(B)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(B,I){return L.H.useDeferredValue(B,I)},Ae.useEffect=function(B,I){return L.H.useEffect(B,I)},Ae.useEffectEvent=function(B){return L.H.useEffectEvent(B)},Ae.useId=function(){return L.H.useId()},Ae.useImperativeHandle=function(B,I,H){return L.H.useImperativeHandle(B,I,H)},Ae.useInsertionEffect=function(B,I){return L.H.useInsertionEffect(B,I)},Ae.useLayoutEffect=function(B,I){return L.H.useLayoutEffect(B,I)},Ae.useMemo=function(B,I){return L.H.useMemo(B,I)},Ae.useOptimistic=function(B,I){return L.H.useOptimistic(B,I)},Ae.useReducer=function(B,I,H){return L.H.useReducer(B,I,H)},Ae.useRef=function(B){return L.H.useRef(B)},Ae.useState=function(B){return L.H.useState(B)},Ae.useSyncExternalStore=function(B,I,H){return L.H.useSyncExternalStore(B,I,H)},Ae.useTransition=function(){return L.H.useTransition()},Ae.version="19.2.6",Ae}var Mp;function hc(){return Mp||(Mp=1,Du.exports=sS()),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 lS(){return Op||(Op=1,(function(i){function s(G,J){var ne=G.length;G.push(J);e:for(;0<ne;){var z=ne-1>>>1,M=G[z];if(0<S(M,J))G[z]=J,G[ne]=M,ne=z;else break e}}function l(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var J=G[0],ne=G.pop();if(ne!==J){G[0]=ne;e:for(var z=0,M=G.length,B=M>>>1;z<B;){var I=2*(z+1)-1,H=G[I],ie=I+1,he=G[ie];if(0>S(H,ne))ie<M&&0>S(he,H)?(G[z]=he,G[ie]=ne,z=ie):(G[z]=H,G[I]=ne,z=I);else if(ie<M&&0>S(he,ne))G[z]=he,G[ie]=ne,z=ie;else break e}}return J}function S(G,J){var ne=G.sortIndex-J.sortIndex;return ne!==0?ne:G.id-J.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var b=performance;i.unstable_now=function(){return b.now()}}else{var _=Date,a=_.now();i.unstable_now=function(){return _.now()-a}}var u=[],h=[],g=1,c=null,C=3,w=!1,T=!1,x=!1,v=!1,p=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;function E(G){for(var J=l(h);J!==null;){if(J.callback===null)o(h);else if(J.startTime<=G)o(h),J.sortIndex=J.expirationTime,s(u,J);else break;J=l(h)}}function R(G){if(x=!1,E(G),!T)if(l(u)!==null)T=!0,A||(A=!0,V());else{var J=l(h);J!==null&&$(R,J.startTime-G)}}var A=!1,L=-1,k=5,O=-1;function j(){return v?!0:!(i.unstable_now()-O<k)}function P(){if(v=!1,A){var G=i.unstable_now();O=G;var J=!0;try{e:{T=!1,x&&(x=!1,d(L),L=-1),w=!0;var ne=C;try{t:{for(E(G),c=l(u);c!==null&&!(c.expirationTime>G&&j());){var z=c.callback;if(typeof z=="function"){c.callback=null,C=c.priorityLevel;var M=z(c.expirationTime<=G);if(G=i.unstable_now(),typeof M=="function"){c.callback=M,E(G),J=!0;break t}c===l(u)&&o(u),E(G)}else o(u);c=l(u)}if(c!==null)J=!0;else{var B=l(h);B!==null&&$(R,B.startTime-G),J=!1}}break e}finally{c=null,C=ne,w=!1}J=void 0}}finally{J?V():A=!1}}}var V;if(typeof m=="function")V=function(){m(P)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,Y=q.port2;q.port1.onmessage=P,V=function(){Y.postMessage(null)}}else V=function(){p(P,0)};function $(G,J){L=p(function(){G(i.unstable_now())},J)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(G){G.callback=null},i.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<G?Math.floor(1e3/G):5},i.unstable_getCurrentPriorityLevel=function(){return C},i.unstable_next=function(G){switch(C){case 1:case 2:case 3:var J=3;break;default:J=C}var ne=C;C=J;try{return G()}finally{C=ne}},i.unstable_requestPaint=function(){v=!0},i.unstable_runWithPriority=function(G,J){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var ne=C;C=G;try{return J()}finally{C=ne}},i.unstable_scheduleCallback=function(G,J,ne){var z=i.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?z+ne:z):ne=z,G){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=ne+M,G={id:g++,callback:J,priorityLevel:G,startTime:ne,expirationTime:M,sortIndex:-1},ne>z?(G.sortIndex=ne,s(h,G),l(u)===null&&G===l(h)&&(x?(d(L),L=-1):x=!0,$(R,ne-z))):(G.sortIndex=M,s(u,G),T||w||(T=!0,A||(A=!0,V()))),G},i.unstable_shouldYield=j,i.unstable_wrapCallback=function(G){var J=C;return function(){var ne=C;C=J;try{return G.apply(this,arguments)}finally{C=ne}}}})(Mu)),Mu}var Bp;function aS(){return Bp||(Bp=1,Lu.exports=lS()),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 oS(){if(zp)return Tt;zp=1;var i=hc();function s(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}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 b(u,h,g){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:g}}var _=i.__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 g=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 b(u,h,null,g)},Tt.flushSync=function(u){var h=_.T,g=o.p;try{if(_.T=null,o.p=2,u)return u()}finally{_.T=h,o.p=g,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 g=h.as,c=a(g,h.crossOrigin),C=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?o.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:c,integrity:C,fetchPriority:w}):g==="script"&&o.d.X(u,{crossOrigin:c,integrity:C,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 g=a(h.as,h.crossOrigin);o.d.M(u,{crossOrigin:g,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 g=h.as,c=a(g,h.crossOrigin);o.d.L(u,g,{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 g=a(h.as,h.crossOrigin);o.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,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,g){return _.H.useFormState(u,h,g)},Tt.useFormStatus=function(){return _.H.useHostTransitionStatus()},Tt.version="19.2.6",Tt}var Hp;function uS(){if(Hp)return Ou.exports;Hp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(s){console.error(s)}}return i(),Ou.exports=oS(),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 cS(){if(Np)return xs;Np=1;var i=aS(),s=hc(),l=uS();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 b(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function _(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(b(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=b(e),t===null)throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var f=n.return;if(f===null)break;var y=f.alternate;if(y===null){if(r=f.return,r!==null){n=r;continue}break}if(f.child===y.child){for(y=f.child;y;){if(y===n)return u(f),e;if(y===r)return u(f),t;y=y.sibling}throw Error(o(188))}if(n.return!==r.return)n=f,r=y;else{for(var D=!1,U=f.child;U;){if(U===n){D=!0,n=f,r=y;break}if(U===r){D=!0,r=f,n=y;break}U=U.sibling}if(!D){for(U=y.child;U;){if(U===n){D=!0,n=y,r=f;break}if(U===r){D=!0,r=y,n=f;break}U=U.sibling}if(!D)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var c=Object.assign,C=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),p=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"),k=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function V(e){return e===null||typeof e!="object"?null:(e=P&&e[P]||e["@@iterator"],typeof e=="function"?e:null)}var q=Symbol.for("react.client.reference");function Y(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case p:return"Profiler";case v:return"StrictMode";case R:return"Suspense";case A:return"SuspenseList";case O:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T: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:Y(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}var $=Array.isArray,G=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},z=[],M=-1;function B(e){return{current:e}}function I(e){0>M||(e.current=z[M],z[M]=null,M--)}function H(e,t){M++,z[M]=e.current,e.current=t}var ie=B(null),he=B(null),fe=B(null),X=B(null);function N(e,t){switch(H(fe,t),H(he,e),H(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}}I(ie),H(ie,e)}function re(){I(ie),I(he),I(fe)}function Q(e){e.memoizedState!==null&&H(X,e);var t=ie.current,n=Zd(t,e.type);t!==n&&(H(he,e),H(ie,n))}function de(e){he.current===e&&(I(ie),I(he)),X.current===e&&(I(X),Ss._currentValue=ne)}var pe,ke;function xe(e){if(pe===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||"",ke=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+pe+e+ke}var Ge=!1;function at(e,t){if(!e||Ge)return"";Ge=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(le){var se=le}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(le){se=le}e.call(ce.prototype)}}else{try{throw Error()}catch(le){se=le}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(le){if(le&&se&&typeof le.stack=="string")return[le.stack,se.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],U=y[1];if(D&&U){var K=D.split(`
|
|
44
|
+
`),te=U.split(`
|
|
45
|
+
`);for(f=r=0;r<K.length&&!K[r].includes("DetermineComponentFrameRoot");)r++;for(;f<te.length&&!te[f].includes("DetermineComponentFrameRoot");)f++;if(r===K.length||f===te.length)for(r=K.length-1,f=te.length-1;1<=r&&0<=f&&K[r]!==te[f];)f--;for(;1<=r&&0<=f;r--,f--)if(K[r]!==te[f]){if(r!==1||f!==1)do if(r--,f--,0>f||K[r]!==te[f]){var oe=`
|
|
46
|
+
`+K[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{Ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?xe(n):""}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe("Lazy");case 13:return e.child!==t&&t!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return at(e.type,!1);case 11:return at(e.type.render,!1);case 1:return at(e.type,!0);case 31:return xe("Activity");default:return""}}function _i(e){try{var t="",n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var mi=Object.prototype.hasOwnProperty,gi=i.unstable_scheduleCallback,xi=i.unstable_cancelCallback,Vi=i.unstable_shouldYield,At=i.unstable_requestPaint,ot=i.unstable_now,Ot=i.unstable_getCurrentPriorityLevel,ae=i.unstable_ImmediatePriority,me=i.unstable_UserBlockingPriority,ye=i.unstable_NormalPriority,Te=i.unstable_LowPriority,Me=i.unstable_IdlePriority,mt=i.log,Pe=i.unstable_setDisableYieldValue,bt=null,gt=null;function Bt(e){if(typeof mt=="function"&&Pe(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(bt,e)}catch{}}var Ze=Math.clz32?Math.clz32:Pm,Yi=Math.log,ci=Math.LN2;function Pm(e){return e>>>=0,e===0?32:31-(Yi(e)/ci|0)|0}var js=256,Us=262144,Is=4194304;function Sn(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,n){var r=e.pendingLanes;if(r===0)return 0;var f=0,y=e.suspendedLanes,D=e.pingedLanes;e=e.warmLanes;var U=r&134217727;return U!==0?(r=U&~y,r!==0?f=Sn(r):(D&=U,D!==0?f=Sn(D):n||(n=U&~e,n!==0&&(f=Sn(n))))):(U=r&~y,U!==0?f=Sn(U):D!==0?f=Sn(D):n||(n=r&~e,n!==0&&(f=Sn(n)))),f===0?0:t!==0&&t!==f&&(t&y)===0&&(y=f&-f,n=t&-t,y>=n||y===32&&(n&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=[],n=0;31>n;n++)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,n,r,f,y){var D=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var U=e.entanglements,K=e.expirationTimes,te=e.hiddenUpdates;for(n=D&~n;0<n;){var oe=31-Ze(n),ce=1<<oe;U[oe]=0,K[oe]=-1;var se=te[oe];if(se!==null)for(te[oe]=null,oe=0;oe<se.length;oe++){var le=se[oe];le!==null&&(le.lane&=-536870913)}n&=~ce}r!==0&&Mc(e,r,0),y!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=y&~(D&~t))}function Mc(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Oc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ze(n),f=1<<r;f&t|e[r]&t&&(e[r]|=t),n&=~f}}function Bc(e,t){var n=t&-t;return n=(n&42)!==0?1:ma(n),(n&(e.suspendedLanes|t))!==0?0:n}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=J.p;return e!==0?e:(e=window.event,e===void 0?32:bp(e.type))}function Hc(e,t){var n=J.p;try{return J.p=e,t()}finally{J.p=n}}var Gi=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Gi,zt="__reactProps$"+Gi,Pn="__reactContainer$"+Gi,va="__reactEvents$"+Gi,Vm="__reactListeners$"+Gi,Ym="__reactHandles$"+Gi,Nc="__reactResources$"+Gi,Br="__reactMarker$"+Gi;function Sa(e){delete e[Ct],delete e[zt],delete e[va],delete e[Vm],delete e[Ym]}function Fn(e){var t=e[Ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pn]||n[Ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=sp(e);e!==null;){if(n=e[Ct])return n;e=sp(e)}return t}e=n,n=e.parentNode}return null}function qn(e){if(e=e[Ct]||e[Pn]){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 Vn(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 yn(e,t){Yn(e,t),Yn(e+"Capture",t)}function Yn(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 Km(e){return mi.call(Pc,e)?!0:mi.call(Ic,e)?!1:Gm.test(e)?Pc[e]=!0:(Ic[e]=!0,!1)}function Fs(e,t,n){if(Km(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){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,""+n)}}function qs(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Ei(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+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 Xm(e,t,n){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){n=""+D,y.call(this,D)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(D){n=""+D},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ya(e){if(!e._valueTracker){var t=Fc(e)?"checked":"value";e._valueTracker=Xm(e,t,""+e[t])}}function qc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Fc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(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 Wm=/[\n"\\]/g;function ei(e){return e.replace(Wm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ba(e,t,n,r,f,y,D,U){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)):n!=null?Ca(e,D,Jt(n)):r!=null&&e.removeAttribute("value"),f==null&&y!=null&&(e.defaultChecked=!!y),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?e.name=""+Jt(U):e.removeAttribute("name")}function Vc(e,t,n,r,f,y,D,U){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.type=y),t!=null||n!=null){if(!(y!=="submit"&&y!=="reset"||t!=null)){ya(e);return}n=n!=null?""+Jt(n):"",t=t!=null?""+Jt(t):n,U||t===e.value||(e.value=t),e.defaultValue=t}r=r??f,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=U?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,n){t==="number"&&Vs(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Gn(e,t,n,r){if(e=e.options,t){t={};for(var f=0;f<n.length;f++)t["$"+n[f]]=!0;for(n=0;n<e.length;n++)f=t.hasOwnProperty("$"+e[n].value),e[n].selected!==f&&(e[n].selected=f),f&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Jt(n),t=null,f=0;f<e.length;f++){if(e[f].value===n){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,n){if(t!=null&&(t=""+Jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Jt(n):""}function Gc(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(o(92));if($(r)){if(1<r.length)throw Error(o(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),ya(e)}function Kn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.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 Kc(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||$m.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Xc(e,t,n){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,n!=null){for(var r in n)!n.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)&&n[f]!==r&&Kc(e,f,r)}else for(var y in t)t.hasOwnProperty(y)&&Kc(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 ki(){}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 Xn=null,Wn=null;function Wc(e){var t=qn(e);if(t&&(e=t.stateNode)){var n=e[zt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ba(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+ei(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[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<n.length;t++)r=n[t],r.form===e.form&&qc(r)}break e;case"textarea":Yc(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Gn(e,!!n.multiple,t,!1)}}}var ka=!1;function $c(e,t,n){if(ka)return e(t,n);ka=!0;try{var r=e(t);return r}finally{if(ka=!1,(Xn!==null||Wn!==null)&&(Ml(),Xn&&(t=Xn,e=Wn,Wn=Xn=null,Wc(t),e)))for(t=0;t<e.length;t++)Wc(e[t])}}function Hr(e,t){var n=e.stateNode;if(n===null)return null;var r=n[zt]||null;if(r===null)return null;n=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(n&&typeof n!="function")throw Error(o(231,t,typeof n));return n}var Ai=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Aa=!1;if(Ai)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 Ki=null,Ta=null,Gs=null;function Qc(){if(Gs)return Gs;var e,t=Ta,n=t.length,r,f="value"in Ki?Ki.value:Ki.textContent,y=f.length;for(e=0;e<n&&t[e]===f[e];e++);var D=n-e;for(r=1;r<=D&&t[n-r]===f[y-r];r++);return Gs=f.slice(e,1<r?1-r:void 0)}function Ks(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 Xs(){return!0}function Zc(){return!1}function Ht(e){function t(n,r,f,y,D){this._reactName=n,this._targetInst=f,this.type=r,this.nativeEvent=y,this.target=D,this.currentTarget=null;for(var U in e)e.hasOwnProperty(U)&&(n=e[U],this[U]=n?n(y):y[U]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Xs:Zc,this.isPropagationStopped=Zc,this}return c(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Xs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Xs)},persist:function(){},isPersistent:Xs}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ws=Ht(bn),jr=c({},bn,{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),ig=c({},jr,{relatedTarget:0}),La=Ht(ig),ng=c({},bn,{animationName:0,elapsedTime:0,pseudoElement:0}),rg=Ht(ng),sg=c({},bn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lg=Ht(sg),ag=c({},bn,{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=Ks(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"?Ks(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ks(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({},bn,{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({},bn,{newState:0,oldState:0}),Cg=Ht(bg),wg=[9,13,27,32],Oa=Ai&&"CompositionEvent"in window,Ir=null;Ai&&"documentMode"in document&&(Ir=document.documentMode);var xg=Ai&&"TextEvent"in window&&!Ir,ih=Ai&&(!Oa||Ir&&8<Ir&&11>=Ir),nh=" ",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 $n=!1;function Eg(e,t){switch(e){case"compositionend":return lh(t);case"keypress":return t.which!==32?null:(rh=!0,nh);case"textInput":return e=t.data,e===nh&&rh?null:e;default:return null}}function kg(e,t){if($n)return e==="compositionend"||!Oa&&sh(e,t)?(e=Qc(),Gs=Ta=Ki=null,$n=!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 ih&&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,n,r){Xn?Wn?Wn.push(r):Wn=[r]:Xn=r,t=Ul(t,"onChange"),0<t.length&&(n=new Ws("onChange","change",null,n,r),e.push({event:n,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(Ai){var Ba;if(Ai){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,n){e==="focusin"?(fh(),Pr=t,Fr=n,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 n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var f=n[r];if(!mi.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 n=ph(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ph(n)}}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 n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)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=Ai&&"documentMode"in document&&11>=document.documentMode,Qn=null,Na=null,Vr=null,ja=!1;function vh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ja||Qn==null||Qn!==Vs(r)||(r=Qn,"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 Ws("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Qn)))}function Cn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zn={animationend:Cn("Animation","AnimationEnd"),animationiteration:Cn("Animation","AnimationIteration"),animationstart:Cn("Animation","AnimationStart"),transitionrun:Cn("Transition","TransitionRun"),transitionstart:Cn("Transition","TransitionStart"),transitioncancel:Cn("Transition","TransitionCancel"),transitionend:Cn("Transition","TransitionEnd")},Ua={},Sh={};Ai&&(Sh=document.createElement("div").style,"AnimationEvent"in window||(delete Zn.animationend.animation,delete Zn.animationiteration.animation,delete Zn.animationstart.animation),"TransitionEvent"in window||delete Zn.transitionend.transition);function wn(e){if(Ua[e])return Ua[e];if(!Zn[e])return e;var t=Zn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Sh)return Ua[e]=t[n];return e}var yh=wn("animationend"),bh=wn("animationiteration"),Ch=wn("animationstart"),zg=wn("transitionrun"),Hg=wn("transitionstart"),Ng=wn("transitioncancel"),wh=wn("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 hi(e,t){xh.set(e,t),yn(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)},ti=[],Jn=0,Pa=0;function Js(){for(var e=Jn,t=Pa=Jn=0;t<e;){var n=ti[t];ti[t++]=null;var r=ti[t];ti[t++]=null;var f=ti[t];ti[t++]=null;var y=ti[t];if(ti[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(n,f,y)}}function el(e,t,n,r){ti[Jn++]=e,ti[Jn++]=t,ti[Jn++]=n,ti[Jn++]=r,Pa|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Fa(e,t,n,r){return el(e,t,n,r),tl(e)}function xn(e,t){return el(e,null,null,t),tl(e)}function Eh(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var f=!1,y=e.return;y!==null;)y.childLanes|=n,r=y.alternate,r!==null&&(r.childLanes|=n),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-Ze(n),e=y.hiddenUpdates,r=e[f],r===null?e[f]=[t]:r.push(t),t.lane=n|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,n,r){this.tag=e,this.key=n,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,n,r){return new jg(e,t,n,r)}function qa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ti(e,t){var n=e.alternate;return n===null?(n=Yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function kh(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function il(e,t,n,r,f,y){var D=0;if(r=e,typeof e=="function")qa(e)&&(D=1);else if(typeof e=="string")D=qv(e,n,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case O:return e=Yt(31,n,t,f),e.elementType=O,e.lanes=y,e;case x:return En(n.children,f,y,t);case v:D=8,f|=24;break;case p:return e=Yt(12,n,t,f|2),e.elementType=p,e.lanes=y,e;case R:return e=Yt(13,n,t,f),e.elementType=R,e.lanes=y,e;case A:return e=Yt(19,n,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 k:D=16,r=null;break e}D=29,n=Error(o(130,e===null?"null":typeof e,"")),r=null}return t=Yt(D,n,t,f),t.elementType=e,t.type=r,t.lanes=y,t}function En(e,t,n,r){return e=Yt(7,e,r,t),e.lanes=n,e}function Va(e,t,n){return e=Yt(6,e,null,t),e.lanes=n,e}function Ah(e){var t=Yt(18,null,null,0);return t.stateNode=e,t}function Ya(e,t,n){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Th=new WeakMap;function ii(e,t){if(typeof e=="object"&&e!==null){var n=Th.get(e);return n!==void 0?n:(t={value:e,source:t,stack:_i(t)},Th.set(e,t),t)}return{value:e,source:t,stack:_i(t)}}var tr=[],ir=0,nl=null,Yr=0,ni=[],ri=0,Xi=null,vi=1,Si="";function Di(e,t){tr[ir++]=Yr,tr[ir++]=nl,nl=e,Yr=t}function Dh(e,t,n){ni[ri++]=vi,ni[ri++]=Si,ni[ri++]=Xi,Xi=e;var r=vi;e=Si;var f=32-Ze(r)-1;r&=~(1<<f),n+=1;var y=32-Ze(t)+f;if(30<y){var D=f-f%5;y=(r&(1<<D)-1).toString(32),r>>=D,f-=D,vi=1<<32-Ze(t)+f|n<<f|r,Si=y+e}else vi=1<<y|n<<f|r,Si=e}function Ga(e){e.return!==null&&(Di(e,1),Dh(e,1,0))}function Ka(e){for(;e===nl;)nl=tr[--ir],tr[ir]=null,Yr=tr[--ir],tr[ir]=null;for(;e===Xi;)Xi=ni[--ri],ni[ri]=null,Si=ni[--ri],ni[ri]=null,vi=ni[--ri],ni[ri]=null}function Rh(e,t){ni[ri++]=vi,ni[ri++]=Si,ni[ri++]=Xi,vi=t.id,Si=t.overflow,Xi=e}var wt=null,it=null,Ue=!1,Wi=null,si=!1,Xa=Error(o(519));function $i(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gr(ii(t,e)),Xa}function Lh(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ct]=e,t[zt]=r,n){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(n=0;n<ps.length;n++)Be(ps[n],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),Vc(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("invalid",t),Gc(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||Wd(t.textContent,n)?(r.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),r.onScroll!=null&&Be("scroll",t),r.onScrollEnd!=null&&Be("scrollend",t),r.onClick!=null&&(t.onclick=ki),t=!0):t=!1,t||$i(e,!0)}function Mh(e){for(wt=e.return;wt;)switch(wt.tag){case 5:case 31:case 13:si=!1;return;case 27:case 3:si=!0;return;default:wt=wt.return}}function nr(e){if(e!==wt)return!1;if(!Ue)return Mh(e),Ue=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||du(e.type,e.memoizedProps)),n=!n),n&&it&&$i(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,hn(e.type)?(e=vu,vu=null,it=e):it=t):it=wt?ai(e.stateNode.nextSibling):null;return!0}function kn(){it=wt=null,Ue=!1}function Wa(){var e=Wi;return e!==null&&(It===null?It=e:It.push.apply(It,e),Wi=null),e}function Gr(e){Wi===null?Wi=[e]:Wi.push(e)}var $a=B(null),An=null,Ri=null;function Qi(e,t,n){H($a,t._currentValue),t._currentValue=n}function Li(e){e._currentValue=$a.current,I($a)}function Qa(e,t,n){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===n)break;e=e.return}}function Za(e,t,n,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 U=y;y=f;for(var K=0;K<t.length;K++)if(U.context===t[K]){y.lanes|=n,U=y.alternate,U!==null&&(U.lanes|=n),Qa(y.return,n,e),r||(D=null);break e}y=U.next}}else if(f.tag===18){if(D=f.return,D===null)throw Error(o(341));D.lanes|=n,y=D.alternate,y!==null&&(y.lanes|=n),Qa(D,n,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,n,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 U=f.type;Vt(f.pendingProps.value,D.value)||(e!==null?e.push(U):e=[U])}}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,n,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 Tn(e){An=e,Ri=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return Oh(An,e)}function sl(e,t){return An===null&&Tn(e),Oh(e,t)}function Oh(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ri===null){if(e===null)throw Error(o(308));Ri=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ri=Ri.next=t;return n}var Ug=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Ig=i.unstable_scheduleCallback,Pg=i.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 Kr(e){e.refCount--,e.refCount===0&&Ig(Pg,function(){e.controller.abort()})}var Xr=null,eo=0,sr=0,lr=null;function Fg(e,t){if(Xr===null){var n=Xr=[];eo=0,sr=ru(),lr={status:"pending",value:void 0,then:function(r){n.push(r)}}}return eo++,t.then(Bh,Bh),t}function Bh(){if(--eo===0&&Xr!==null){lr!==null&&(lr.status="fulfilled");var e=Xr;Xr=null,sr=0,lr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qg(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(f){n.push(f)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var f=0;f<n.length;f++)(0,n[f])(t)},function(f){for(r.status="rejected",r.reason=f,f=0;f<n.length;f++)(0,n[f])(void 0)}),r}var zh=G.S;G.S=function(e,t){Sd=ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fg(e,t),zh!==null&&zh(e,t)};var Dn=B(null);function to(){var e=Dn.current;return e!==null?e:Je.pooledCache}function ll(e,t){t===null?H(Dn,Dn.current):H(Dn,t.pool)}function Hh(){var e=to();return e===null?null:{parent:ht._currentValue,pool:e}}var ar=Error(o(460)),io=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,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ki,ki),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ih(e),e;default:if(typeof t.status=="string")t.then(ki,ki);else{if(e=Je,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 Ln=t,ar}}function Rn(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ln=n,ar):n}}var Ln=null;function Uh(){if(Ln===null)throw Error(o(459));var e=Ln;return Ln=null,e}function Ih(e){if(e===ar||e===al)throw Error(o(483))}var or=null,Wr=0;function ul(e){var t=Wr;return Wr+=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===C?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(Z,W){if(e){var ee=Z.deletions;ee===null?(Z.deletions=[W],Z.flags|=16):ee.push(W)}}function n(Z,W){if(!e)return null;for(;W!==null;)t(Z,W),W=W.sibling;return null}function r(Z){for(var W=new Map;Z!==null;)Z.key!==null?W.set(Z.key,Z):W.set(Z.index,Z),Z=Z.sibling;return W}function f(Z,W){return Z=Ti(Z,W),Z.index=0,Z.sibling=null,Z}function y(Z,W,ee){return Z.index=ee,e?(ee=Z.alternate,ee!==null?(ee=ee.index,ee<W?(Z.flags|=67108866,W):ee):(Z.flags|=67108866,W)):(Z.flags|=1048576,W)}function D(Z){return e&&Z.alternate===null&&(Z.flags|=67108866),Z}function U(Z,W,ee,ue){return W===null||W.tag!==6?(W=Va(ee,Z.mode,ue),W.return=Z,W):(W=f(W,ee),W.return=Z,W)}function K(Z,W,ee,ue){var be=ee.type;return be===x?oe(Z,W,ee.props.children,ue,ee.key):W!==null&&(W.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===k&&Rn(be)===W.type)?(W=f(W,ee.props),$r(W,ee),W.return=Z,W):(W=il(ee.type,ee.key,ee.props,null,Z.mode,ue),$r(W,ee),W.return=Z,W)}function te(Z,W,ee,ue){return W===null||W.tag!==4||W.stateNode.containerInfo!==ee.containerInfo||W.stateNode.implementation!==ee.implementation?(W=Ya(ee,Z.mode,ue),W.return=Z,W):(W=f(W,ee.children||[]),W.return=Z,W)}function oe(Z,W,ee,ue,be){return W===null||W.tag!==7?(W=En(ee,Z.mode,ue,be),W.return=Z,W):(W=f(W,ee),W.return=Z,W)}function ce(Z,W,ee){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=Va(""+W,Z.mode,ee),W.return=Z,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case w:return ee=il(W.type,W.key,W.props,null,Z.mode,ee),$r(ee,W),ee.return=Z,ee;case T:return W=Ya(W,Z.mode,ee),W.return=Z,W;case k:return W=Rn(W),ce(Z,W,ee)}if($(W)||V(W))return W=En(W,Z.mode,ee,null),W.return=Z,W;if(typeof W.then=="function")return ce(Z,ul(W),ee);if(W.$$typeof===m)return ce(Z,sl(Z,W),ee);cl(Z,W)}return null}function se(Z,W,ee,ue){var be=W!==null?W.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return be!==null?null:U(Z,W,""+ee,ue);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case w:return ee.key===be?K(Z,W,ee,ue):null;case T:return ee.key===be?te(Z,W,ee,ue):null;case k:return ee=Rn(ee),se(Z,W,ee,ue)}if($(ee)||V(ee))return be!==null?null:oe(Z,W,ee,ue,null);if(typeof ee.then=="function")return se(Z,W,ul(ee),ue);if(ee.$$typeof===m)return se(Z,W,sl(Z,ee),ue);cl(Z,ee)}return null}function le(Z,W,ee,ue,be){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Z=Z.get(ee)||null,U(W,Z,""+ue,be);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case w:return Z=Z.get(ue.key===null?ee:ue.key)||null,K(W,Z,ue,be);case T:return Z=Z.get(ue.key===null?ee:ue.key)||null,te(W,Z,ue,be);case k:return ue=Rn(ue),le(Z,W,ee,ue,be)}if($(ue)||V(ue))return Z=Z.get(ee)||null,oe(W,Z,ue,be,null);if(typeof ue.then=="function")return le(Z,W,ee,ul(ue),be);if(ue.$$typeof===m)return le(Z,W,ee,sl(W,ue),be);cl(W,ue)}return null}function ve(Z,W,ee,ue){for(var be=null,qe=null,Se=W,Re=W=0,Ne=null;Se!==null&&Re<ee.length;Re++){Se.index>Re?(Ne=Se,Se=null):Ne=Se.sibling;var Ve=se(Z,Se,ee[Re],ue);if(Ve===null){Se===null&&(Se=Ne);break}e&&Se&&Ve.alternate===null&&t(Z,Se),W=y(Ve,W,Re),qe===null?be=Ve:qe.sibling=Ve,qe=Ve,Se=Ne}if(Re===ee.length)return n(Z,Se),Ue&&Di(Z,Re),be;if(Se===null){for(;Re<ee.length;Re++)Se=ce(Z,ee[Re],ue),Se!==null&&(W=y(Se,W,Re),qe===null?be=Se:qe.sibling=Se,qe=Se);return Ue&&Di(Z,Re),be}for(Se=r(Se);Re<ee.length;Re++)Ne=le(Se,Z,Re,ee[Re],ue),Ne!==null&&(e&&Ne.alternate!==null&&Se.delete(Ne.key===null?Re:Ne.key),W=y(Ne,W,Re),qe===null?be=Ne:qe.sibling=Ne,qe=Ne);return e&&Se.forEach(function(mn){return t(Z,mn)}),Ue&&Di(Z,Re),be}function we(Z,W,ee,ue){if(ee==null)throw Error(o(151));for(var be=null,qe=null,Se=W,Re=W=0,Ne=null,Ve=ee.next();Se!==null&&!Ve.done;Re++,Ve=ee.next()){Se.index>Re?(Ne=Se,Se=null):Ne=Se.sibling;var mn=se(Z,Se,Ve.value,ue);if(mn===null){Se===null&&(Se=Ne);break}e&&Se&&mn.alternate===null&&t(Z,Se),W=y(mn,W,Re),qe===null?be=mn:qe.sibling=mn,qe=mn,Se=Ne}if(Ve.done)return n(Z,Se),Ue&&Di(Z,Re),be;if(Se===null){for(;!Ve.done;Re++,Ve=ee.next())Ve=ce(Z,Ve.value,ue),Ve!==null&&(W=y(Ve,W,Re),qe===null?be=Ve:qe.sibling=Ve,qe=Ve);return Ue&&Di(Z,Re),be}for(Se=r(Se);!Ve.done;Re++,Ve=ee.next())Ve=le(Se,Z,Re,Ve.value,ue),Ve!==null&&(e&&Ve.alternate!==null&&Se.delete(Ve.key===null?Re:Ve.key),W=y(Ve,W,Re),qe===null?be=Ve:qe.sibling=Ve,qe=Ve);return e&&Se.forEach(function(eS){return t(Z,eS)}),Ue&&Di(Z,Re),be}function Qe(Z,W,ee,ue){if(typeof ee=="object"&&ee!==null&&ee.type===x&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case w:e:{for(var be=ee.key;W!==null;){if(W.key===be){if(be=ee.type,be===x){if(W.tag===7){n(Z,W.sibling),ue=f(W,ee.props.children),ue.return=Z,Z=ue;break e}}else if(W.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===k&&Rn(be)===W.type){n(Z,W.sibling),ue=f(W,ee.props),$r(ue,ee),ue.return=Z,Z=ue;break e}n(Z,W);break}else t(Z,W);W=W.sibling}ee.type===x?(ue=En(ee.props.children,Z.mode,ue,ee.key),ue.return=Z,Z=ue):(ue=il(ee.type,ee.key,ee.props,null,Z.mode,ue),$r(ue,ee),ue.return=Z,Z=ue)}return D(Z);case T:e:{for(be=ee.key;W!==null;){if(W.key===be)if(W.tag===4&&W.stateNode.containerInfo===ee.containerInfo&&W.stateNode.implementation===ee.implementation){n(Z,W.sibling),ue=f(W,ee.children||[]),ue.return=Z,Z=ue;break e}else{n(Z,W);break}else t(Z,W);W=W.sibling}ue=Ya(ee,Z.mode,ue),ue.return=Z,Z=ue}return D(Z);case k:return ee=Rn(ee),Qe(Z,W,ee,ue)}if($(ee))return ve(Z,W,ee,ue);if(V(ee)){if(be=V(ee),typeof be!="function")throw Error(o(150));return ee=be.call(ee),we(Z,W,ee,ue)}if(typeof ee.then=="function")return Qe(Z,W,ul(ee),ue);if(ee.$$typeof===m)return Qe(Z,W,sl(Z,ee),ue);cl(Z,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,W!==null&&W.tag===6?(n(Z,W.sibling),ue=f(W,ee),ue.return=Z,Z=ue):(n(Z,W),ue=Va(ee,Z.mode,ue),ue.return=Z,Z=ue),D(Z)):n(Z,W)}return function(Z,W,ee,ue){try{Wr=0;var be=Qe(Z,W,ee,ue);return or=null,be}catch(Se){if(Se===ar||Se===al)throw Se;var qe=Yt(29,Se,null,Z.mode);return qe.lanes=ue,qe.return=Z,qe}finally{}}}var Mn=Ph(!0),Fh=Ph(!1),Zi=!1;function no(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 Ji(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function en(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ye&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,n),t}return el(e,r,t,n),tl(e)}function Qr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Oc(e,n)}}function so(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var f=null,y=null;if(n=n.firstBaseUpdate,n!==null){do{var D={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};y===null?f=y=D:y=y.next=D,n=n.next}while(n!==null);y===null?f=y=t:y=y.next=t}else f=y=t;n={baseState:r.baseState,firstBaseUpdate:f,lastBaseUpdate:y,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var lo=!1;function Zr(){if(lo){var e=lr;if(e!==null)throw e}}function Jr(e,t,n,r){lo=!1;var f=e.updateQueue;Zi=!1;var y=f.firstBaseUpdate,D=f.lastBaseUpdate,U=f.shared.pending;if(U!==null){f.shared.pending=null;var K=U,te=K.next;K.next=null,D===null?y=te:D.next=te,D=K;var oe=e.alternate;oe!==null&&(oe=oe.updateQueue,U=oe.lastBaseUpdate,U!==D&&(U===null?oe.firstBaseUpdate=te:U.next=te,oe.lastBaseUpdate=K))}if(y!==null){var ce=f.baseState;D=0,oe=te=K=null,U=y;do{var se=U.lane&-536870913,le=se!==U.lane;if(le?(He&se)===se:(r&se)===se){se!==0&&se===sr&&(lo=!0),oe!==null&&(oe=oe.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var ve=e,we=U;se=t;var Qe=n;switch(we.tag){case 1:if(ve=we.payload,typeof ve=="function"){ce=ve.call(Qe,ce,se);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=we.payload,se=typeof ve=="function"?ve.call(Qe,ce,se):ve,se==null)break e;ce=c({},ce,se);break e;case 2:Zi=!0}}se=U.callback,se!==null&&(e.flags|=64,le&&(e.flags|=8192),le=f.callbacks,le===null?f.callbacks=[se]:le.push(se))}else le={lane:se,tag:U.tag,payload:U.payload,callback:U.callback,next:null},oe===null?(te=oe=le,K=ce):oe=oe.next=le,D|=se;if(U=U.next,U===null){if(U=f.shared.pending,U===null)break;le=U,U=le.next,le.next=null,f.lastBaseUpdate=le,f.shared.pending=null}}while(!0);oe===null&&(K=ce),f.baseState=K,f.firstBaseUpdate=te,f.lastBaseUpdate=oe,y===null&&(f.shared.lanes=0),ln|=D,e.lanes=D,e.memoizedState=ce}}function qh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Vh(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qh(n[e],t)}var ur=B(null),hl=B(0);function Yh(e,t){e=Ii,H(hl,e),H(ur,t),Ii=e|t.baseLanes}function ao(){H(hl,Ii),H(ur,ur.current)}function oo(){Ii=hl.current,I(ur),I(hl)}var Gt=B(null),li=null;function tn(e){var t=e.alternate;H(ut,ut.current&1),H(Gt,e),li===null&&(t===null||ur.current!==null||t.memoizedState!==null)&&(li=e)}function uo(e){H(ut,ut.current),H(Gt,e),li===null&&(li=e)}function Gh(e){e.tag===22?(H(ut,ut.current),H(Gt,e),li===null&&(li=e)):nn()}function nn(){H(ut,ut.current),H(Gt,Gt.current)}function Kt(e){I(Gt),li===e&&(li=null),I(ut)}var ut=B(0);function fl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||mu(n)||gu(n)))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 Mi=0,De=null,We=null,ft=null,dl=!1,cr=!1,On=!1,pl=0,es=0,hr=null,Vg=0;function st(){throw Error(o(321))}function co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Vt(e[n],t[n]))return!1;return!0}function ho(e,t,n,r,f,y){return Mi=y,De=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Rf:Ao,On=!1,y=n(r,f),On=!1,cr&&(y=Xh(t,n,r,f)),Kh(e),y}function Kh(e){G.H=ns;var t=We!==null&&We.next!==null;if(Mi=0,ft=We=De=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 Xh(e,t,n,r){De=e;var f=0;do{if(cr&&(hr=null),es=0,cr=!1,25<=f)throw Error(o(301));if(f+=1,ft=We=null,e.updateQueue!=null){var y=e.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}G.H=Lf,y=t(n,r)}while(cr);return y}function Yg(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?ts(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(De.flags|=1024),t}function fo(){var e=pl!==0;return pl=0,e}function po(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}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}Mi=0,ft=We=De=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?De.memoizedState=ft=e:ft=ft.next=e,ft}function ct(){if(We===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=ft===null?De.memoizedState:ft.next;if(t!==null)ft=t,We=e;else{if(e===null)throw De.alternate===null?Error(o(467)):Error(o(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},ft===null?De.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=De,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,G.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,n=De.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=De.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}),n===null&&(n=_l(),De.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=j;return t.index++,n}function Oi(e,t){return typeof t=="function"?t(e):t}function gl(e){var t=ct();return go(t,We,e)}function go(e,t,n){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=n;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 U=D=null,K=null,te=t,oe=!1;do{var ce=te.lane&-536870913;if(ce!==te.lane?(He&ce)===ce:(Mi&ce)===ce){var se=te.revertLane;if(se===0)K!==null&&(K=K.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ce===sr&&(oe=!0);else if((Mi&se)===se){te=te.next,se===sr&&(oe=!0);continue}else ce={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},K===null?(U=K=ce,D=y):K=K.next=ce,De.lanes|=se,ln|=se;ce=te.action,On&&n(y,ce),y=te.hasEagerState?te.eagerState:n(y,ce)}else se={lane:ce,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},K===null?(U=K=se,D=y):K=K.next=se,De.lanes|=ce,ln|=ce;te=te.next}while(te!==null&&te!==t);if(K===null?D=y:K.next=U,!Vt(y,e.memoizedState)&&(dt=!0,oe&&(n=lr,n!==null)))throw n;e.memoizedState=y,e.baseState=D,e.baseQueue=K,r.lastRenderedState=y}return f===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function vo(e){var t=ct(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,f=n.pending,y=t.memoizedState;if(f!==null){n.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),n.lastRenderedState=y}return[y,r]}function Wh(e,t,n){var r=De,f=ct(),y=Ue;if(y){if(n===void 0)throw Error(o(407));n=n()}else n=t();var D=!Vt((We||f).memoizedState,n);if(D&&(f.memoizedState=n,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,n,t),null),Je===null)throw Error(o(349));y||(Mi&127)!==0||$h(r,t,n)}return n}function $h(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=De.updateQueue,t===null?(t=_l(),De.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Qh(e,t,n,r){t.value=n,t.getSnapshot=r,Jh(t)&&ef(e)}function Zh(e,t,n){return n(function(){Jh(t)&&ef(e)})}function Jh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Vt(e,n)}catch{return!0}}function ef(e){var t=xn(e,2);t!==null&&Pt(t,e,2)}function So(e){var t=Lt();if(typeof e=="function"){var n=e;if(e=n(),On){Bt(!0);try{n()}finally{Bt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:e},t}function tf(e,t,n,r){return e.baseState=n,go(e,We,typeof r=="function"?r:Oi)}function Gg(e,t,n,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)}};G.T!==null?n(!0):y.isTransition=!1,r(y),n=t.pending,n===null?(y.next=t.pending=y,nf(t,y)):(y.next=n.next,t.pending=n.next=y)}}function nf(e,t){var n=t.action,r=t.payload,f=e.state;if(t.isTransition){var y=G.T,D={};G.T=D;try{var U=n(f,r),K=G.S;K!==null&&K(D,U),rf(e,t,U)}catch(te){yo(e,t,te)}finally{y!==null&&D.types!==null&&(y.types=D.types),G.T=y}}else try{y=n(f,r),rf(e,t,y)}catch(te){yo(e,t,te)}}function rf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){sf(e,t,r)},function(r){return yo(e,t,r)}):sf(e,t,n)}function sf(e,t,n){t.status="fulfilled",t.value=n,lf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,nf(e,n)))}function yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,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(Ue){var n=Je.formState;if(n!==null){e:{var r=De;if(Ue){if(it){t:{for(var f=it,y=si;f.nodeType!==8;){if(!y){f=null;break t}if(f=ai(f.nextSibling),f===null){f=null;break t}}y=f.data,f=y==="F!"||y==="F"?f:null}if(f){it=ai(f.nextSibling),r=f.data==="F!";break e}}$i(r)}r=!1}r&&(t=n[0])}}return n=Lt(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:af,lastRenderedState:t},n.queue=r,n=Af.bind(null,De,r),r.dispatch=n,r=So(!1),y=ko.bind(null,De,!1,r.queue),r=Lt(),f={state:t,dispatch:null,action:e,pending:null},r.queue=f,n=Gg.bind(null,De,f,y,n),f.dispatch=n,r.memoizedState=e,[t,n,!1]}function uf(e){var t=ct();return cf(t,We,e)}function cf(e,t,n){if(t=go(e,t,af)[0],e=gl(Oi)[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 n!==t.memoizedState&&(De.flags|=2048,fr(9,{destroy:void 0},Kg.bind(null,f,n),null)),[r,y,e]}function Kg(e,t){e.action=t}function hf(e){var t=ct(),n=We;if(n!==null)return cf(t,n,e);ct(),t=t.memoizedState,n=ct();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function fr(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=De.updateQueue,t===null&&(t=_l(),De.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ff(){return ct().memoizedState}function vl(e,t,n,r){var f=Lt();De.flags|=e,f.memoizedState=fr(1|t,{destroy:void 0},n,r===void 0?null:r)}function Sl(e,t,n,r){var f=ct();r=r===void 0?null:r;var y=f.memoizedState.inst;We!==null&&r!==null&&co(r,We.memoizedState.deps)?f.memoizedState=fr(t,y,n,r):(De.flags|=e,f.memoizedState=fr(1|t,y,n,r))}function df(e,t){vl(8390656,8,e,t)}function bo(e,t){Sl(2048,8,e,t)}function Xg(e){De.flags|=4;var t=De.updateQueue;if(t===null)t=_l(),De.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function pf(e){var t=ct().memoizedState;return Xg({ref:t,nextImpl:e}),function(){if((Ye&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 n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vf(e,t,n){n=n!=null?n.concat([e]):null,Sl(4,4,gf.bind(null,t,e),n)}function Co(){}function Sf(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function yf(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&co(t,r[1]))return r[0];if(r=e(),On){Bt(!0);try{e()}finally{Bt(!1)}}return n.memoizedState=[r,t],r}function wo(e,t,n){return n===void 0||(Mi&1073741824)!==0&&(He&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=bd(),De.lanes|=e,ln|=e,n)}function bf(e,t,n,r){return Vt(n,t)?n:ur.current!==null?(e=wo(e,n,r),Vt(e,t)||(dt=!0),e):(Mi&42)===0||(Mi&1073741824)!==0&&(He&261930)===0?(dt=!0,e.memoizedState=n):(e=bd(),De.lanes|=e,ln|=e,t)}function Cf(e,t,n,r,f){var y=J.p;J.p=y!==0&&8>y?y:8;var D=G.T,U={};G.T=U,ko(e,!1,t,n);try{var K=f(),te=G.S;if(te!==null&&te(U,K),K!==null&&typeof K=="object"&&typeof K.then=="function"){var oe=qg(K,r);is(e,t,oe,$t(e))}else is(e,t,r,$t(e))}catch(ce){is(e,t,{then:function(){},status:"rejected",reason:ce},$t())}finally{J.p=y,D!==null&&U.types!==null&&(D.types=U.types),G.T=D}}function Wg(){}function xo(e,t,n,r){if(e.tag!==5)throw Error(o(476));var f=wf(e).queue;Cf(e,f,t,ne,n===null?Wg:function(){return xf(e),n(r)})}function wf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:n},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),is(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 n=$t();e=Ji(n);var r=en(t,e,n);r!==null&&(Pt(r,t,n),Qr(r,t,n)),t={cache:Ja()},e.payload=t;return}t=t.return}}function Qg(e,t,n){var r=$t();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},yl(e)?Tf(t,n):(n=Fa(e,t,n,r),n!==null&&(Pt(n,e,r),Df(n,t,r)))}function Af(e,t,n){var r=$t();is(e,t,n,r)}function is(e,t,n,r){var f={lane:r,revertLane:0,gesture:null,action:n,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,U=y(D,n);if(f.hasEagerState=!0,f.eagerState=U,Vt(U,D))return el(e,t,f,0),Je===null&&Js(),!1}catch{}finally{}if(n=Fa(e,t,f,r),n!==null)return Pt(n,e,r),Df(n,t,r),!0}return!1}function ko(e,t,n,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,n,r,2),t!==null&&Pt(t,e,2)}function yl(e){var t=e.alternate;return e===De||t!==null&&t===De}function Tf(e,t){cr=dl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Df(e,t,n){if((n&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Oc(e,n)}}var ns={readContext:xt,use:ml,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};ns.useEffectEvent=st;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,n){n=n!=null?n.concat([e]):null,vl(4194308,4,gf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vl(4194308,4,e,t)},useInsertionEffect:function(e,t){vl(4,2,e,t)},useMemo:function(e,t){var n=Lt();t=t===void 0?null:t;var r=e();if(On){Bt(!0);try{e()}finally{Bt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Lt();if(n!==void 0){var f=n(t);if(On){Bt(!0);try{n(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,De,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,n=Af.bind(null,De,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Co,useDeferredValue:function(e,t){var n=Lt();return wo(n,e,t)},useTransition:function(){var e=So(!1);return e=Cf.bind(null,De,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=De,f=Lt();if(Ue){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Je===null)throw Error(o(349));(He&127)!==0||$h(r,t,n)}f.memoizedState=n;var y={value:n,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,n,t),null),n},useId:function(){var e=Lt(),t=Je.identifierPrefix;if(Ue){var n=Si,r=vi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=pl++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Vg++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Eo,useFormState:of,useActionState:of,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ko.bind(null,De,!0,n),n.dispatch=t,[e,t]},useMemoCache:mo,useCacheRefresh:function(){return Lt().memoizedState=$g.bind(null,De)},useEffectEvent:function(e){var t=Lt(),n={impl:e};return t.memoizedState=n,function(){if((Ye&2)!==0)throw Error(o(440));return n.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(Oi)},useDebugValue:Co,useDeferredValue:function(e,t){var n=ct();return bf(n,We.memoizedState,e,t)},useTransition:function(){var e=gl(Oi)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:ts(e),t]},useSyncExternalStore:Wh,useId:Ef,useHostTransitionStatus:Eo,useFormState:uf,useActionState:uf,useOptimistic:function(e,t){var n=ct();return tf(n,We,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(Oi)},useDebugValue:Co,useDeferredValue:function(e,t){var n=ct();return We===null?wo(n,e,t):bf(n,We.memoizedState,e,t)},useTransition:function(){var e=vo(Oi)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:ts(e),t]},useSyncExternalStore:Wh,useId:Ef,useHostTransitionStatus:Eo,useFormState:hf,useActionState:hf,useOptimistic:function(e,t){var n=ct();return We!==null?tf(n,We,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:mo,useCacheRefresh:kf};Lf.useEffectEvent=pf;function To(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:c({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Do={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=$t(),f=Ji(r);f.payload=t,n!=null&&(f.callback=n),t=en(e,f,r),t!==null&&(Pt(t,e,r),Qr(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=$t(),f=Ji(r);f.tag=1,f.payload=t,n!=null&&(f.callback=n),t=en(e,f,r),t!==null&&(Pt(t,e,r),Qr(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=$t(),r=Ji(n);r.tag=2,t!=null&&(r.callback=t),t=en(e,r,n),t!==null&&(Pt(t,e,n),Qr(t,e,n))}};function Mf(e,t,n,r,f,y,D){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,y,D):t.prototype&&t.prototype.isPureReactComponent?!qr(n,r)||!qr(f,y):!0}function Of(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Do.enqueueReplaceState(t,t.state,null)}function Bn(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=c({},n));for(var f in e)n[f]===void 0&&(n[f]=e[f])}return n}function Bf(e){Zs(e)}function zf(e){console.error(e)}function Hf(e){Zs(e)}function bl(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Nf(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Ro(e,t,n){return n=Ji(n),n.tag=3,n.payload={element:null},n.callback=function(){bl(e,t)},n}function jf(e){return e=Ji(e),e.tag=3,e}function Uf(e,t,n,r){var f=n.type.getDerivedStateFromError;if(typeof f=="function"){var y=r.value;e.payload=function(){return f(y)},e.callback=function(){Nf(t,n,r)}}var D=n.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(e.callback=function(){Nf(t,n,r),typeof f!="function"&&(an===null?an=new Set([this]):an.add(this));var U=r.stack;this.componentDidCatch(r.value,{componentStack:U!==null?U:""})})}function Zg(e,t,n,r,f){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&rr(t,n,f,!0),n=Gt.current,n!==null){switch(n.tag){case 31:case 13:return li===null?Ol():n.alternate===null&<===0&&(lt=3),n.flags&=-257,n.flags|=65536,n.lanes=f,r===ol?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),tu(e,r,f)),!1;case 22:return n.flags|=65536,r===ol?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),tu(e,r,f)),!1}throw Error(o(435,n.tag))}return tu(e,r,f),Ol(),!1}if(Ue)return t=Gt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,r!==Xa&&(e=Error(o(422),{cause:r}),Gr(ii(e,n)))):(r!==Xa&&(t=Error(o(423),{cause:r}),Gr(ii(t,n))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,r=ii(r,n),f=Ro(e.stateNode,r,f),so(e,f),lt!==4&&(lt=2)),!1;var y=Error(o(520),{cause:r});if(y=ii(y,n),hs===null?hs=[y]:hs.push(y),lt!==4&&(lt=2),t===null)return!0;r=ii(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=f&-f,n.lanes|=e,e=Ro(n.stateNode,r,e),so(n,e),!1;case 1:if(t=n.type,y=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(an===null||!an.has(y))))return n.flags|=65536,f&=-f,n.lanes|=f,f=jf(f),Uf(f,e,n,r),so(n,f),!1}n=n.return}while(n!==null);return!1}var Lo=Error(o(461)),dt=!1;function Et(e,t,n,r){t.child=e===null?Fh(t,null,n,r):Mn(t,e.child,n,r)}function If(e,t,n,r,f){n=n.render;var y=t.ref;if("ref"in r){var D={};for(var U in r)U!=="ref"&&(D[U]=r[U])}else D=r;return Tn(t),r=ho(e,t,n,D,y,f),U=fo(),e!==null&&!dt?(po(e,t,f),Bi(e,t,f)):(Ue&&U&&Ga(t),t.flags|=1,Et(e,t,r,f),t.child)}function Pf(e,t,n,r,f){if(e===null){var y=n.type;return typeof y=="function"&&!qa(y)&&y.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=y,Ff(e,t,y,r,f)):(e=il(n.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(n=n.compare,n=n!==null?n:qr,n(D,r)&&e.ref===t.ref)return Bi(e,t,f)}return t.flags|=1,e=Ti(y,r),e.ref=t.ref,e.return=t,t.child=e}function Ff(e,t,n,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,Bi(e,t,f)}return Mo(e,t,n,r,f)}function qf(e,t,n,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|n:n,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,n,r)}if((n&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|n:n,n,r)}else y!==null?(ll(t,y.cachePool),Yh(t,y),nn(),t.memoizedState=null):(e!==null&&ll(t,null),ao(),nn());return Et(e,t,f,n),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,n,r,f){var y=to();return y=y===null?null:{parent:ht._currentValue,pool:y},t.memoizedState={baseLanes:n,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,n){return Mn(t,e.child,null,n),e=Cl(t,t.pendingProps),e.flags|=2,Kt(t),t.memoizedState=null,e}function Jg(e,t,n){var r=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ue){if(r.mode==="hidden")return e=Cl(t,r),t.lanes=536870912,rs(null,e);if(uo(t),(e=it)?(e=np(e,si),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi!==null?{id:vi,overflow:Si}:null,retryLane:536870912,hydrationErrors:null},n=Ah(e),n.return=t,t.child=n,wt=t,it=null)):e=null,e===null)throw $i(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,n);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,n,!1),f=(n&e.childLanes)!==0,dt||f){if(r=Je,r!==null&&(D=Bc(r,n),D!==0&&D!==y.retryLane))throw y.retryLane=D,xn(e,D),Pt(r,e,D),Lo;Ol(),t=Yf(e,t,n)}else e=y.treeContext,it=ai(D.nextSibling),wt=t,Ue=!0,Wi=null,si=!1,e!==null&&Rh(t,e),t=Cl(t,r),t.flags|=4096;return t}return e=Ti(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function wl(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Mo(e,t,n,r,f){return Tn(t),n=ho(e,t,n,r,void 0,f),r=fo(),e!==null&&!dt?(po(e,t,f),Bi(e,t,f)):(Ue&&r&&Ga(t),t.flags|=1,Et(e,t,n,f),t.child)}function Gf(e,t,n,r,f,y){return Tn(t),t.updateQueue=null,n=Xh(t,r,n,f),Kh(e),r=fo(),e!==null&&!dt?(po(e,t,y),Bi(e,t,y)):(Ue&&r&&Ga(t),t.flags|=1,Et(e,t,n,y),t.child)}function Kf(e,t,n,r,f){if(Tn(t),t.stateNode===null){var y=er,D=n.contextType;typeof D=="object"&&D!==null&&(y=xt(D)),y=new n(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={},no(t),D=n.contextType,y.context=typeof D=="object"&&D!==null?xt(D):er,y.state=t.memoizedState,D=n.getDerivedStateFromProps,typeof D=="function"&&(To(t,n,D,r),y.state=t.memoizedState),typeof n.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 U=t.memoizedProps,K=Bn(n,U);y.props=K;var te=y.context,oe=n.contextType;D=er,typeof oe=="object"&&oe!==null&&(D=xt(oe));var ce=n.getDerivedStateFromProps;oe=typeof ce=="function"||typeof y.getSnapshotBeforeUpdate=="function",U=t.pendingProps!==U,oe||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(U||te!==D)&&Of(t,y,r,D),Zi=!1;var se=t.memoizedState;y.state=se,Jr(t,r,y,f),Zr(),te=t.memoizedState,U||se!==te||Zi?(typeof ce=="function"&&(To(t,n,ce,r),te=t.memoizedState),(K=Zi||Mf(t,n,K,r,se,te,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=te),y.props=r,y.state=te,y.context=D,r=K):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{y=t.stateNode,ro(e,t),D=t.memoizedProps,oe=Bn(n,D),y.props=oe,ce=t.pendingProps,se=y.context,te=n.contextType,K=er,typeof te=="object"&&te!==null&&(K=xt(te)),U=n.getDerivedStateFromProps,(te=typeof U=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(D!==ce||se!==K)&&Of(t,y,r,K),Zi=!1,se=t.memoizedState,y.state=se,Jr(t,r,y,f),Zr();var le=t.memoizedState;D!==ce||se!==le||Zi||e!==null&&e.dependencies!==null&&rl(e.dependencies)?(typeof U=="function"&&(To(t,n,U,r),le=t.memoizedState),(oe=Zi||Mf(t,n,oe,r,se,le,K)||e!==null&&e.dependencies!==null&&rl(e.dependencies))?(te||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(r,le,K),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(r,le,K)),typeof y.componentDidUpdate=="function"&&(t.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof y.componentDidUpdate!="function"||D===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=le),y.props=r,y.state=le,y.context=K,r=oe):(typeof y.componentDidUpdate!="function"||D===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),r=!1)}return y=r,wl(e,t),r=(t.flags&128)!==0,y||r?(y=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:y.render(),t.flags|=1,e!==null&&r?(t.child=Mn(t,e.child,null,f),t.child=Mn(t,null,n,f)):Et(e,t,n,f),t.memoizedState=y.state,e=t.child):e=Bi(e,t,f),e}function Xf(e,t,n,r){return kn(),t.flags|=256,Et(e,t,n,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,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Wt),e}function Wf(e,t,n){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(Ue){if(f?tn(t):nn(),(e=it)?(e=np(e,si),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi!==null?{id:vi,overflow:Si}:null,retryLane:536870912,hydrationErrors:null},n=Ah(e),n.return=t,t.child=n,wt=t,it=null)):e=null,e===null)throw $i(t);return gu(e)?t.lanes=32:t.lanes=536870912,null}var U=r.children;return r=r.fallback,f?(nn(),f=t.mode,U=xl({mode:"hidden",children:U},f),r=En(r,f,n,null),U.return=t,r.return=t,U.sibling=r,t.child=U,r=t.child,r.memoizedState=Bo(n),r.childLanes=zo(e,D,n),t.memoizedState=Oo,rs(null,r)):(tn(t),Ho(t,U))}var K=e.memoizedState;if(K!==null&&(U=K.dehydrated,U!==null)){if(y)t.flags&256?(tn(t),t.flags&=-257,t=No(e,t,n)):t.memoizedState!==null?(nn(),t.child=e.child,t.flags|=128,t=null):(nn(),U=r.fallback,f=t.mode,r=xl({mode:"visible",children:r.children},f),U=En(U,f,n,null),U.flags|=2,r.return=t,U.return=t,r.sibling=U,t.child=r,Mn(t,e.child,null,n),r=t.child,r.memoizedState=Bo(n),r.childLanes=zo(e,D,n),t.memoizedState=Oo,t=rs(null,r));else if(tn(t),gu(U)){if(D=U.nextSibling&&U.nextSibling.dataset,D)var te=D.dgst;D=te,r=Error(o(419)),r.stack="",r.digest=D,Gr({value:r,source:null,stack:null}),t=No(e,t,n)}else if(dt||rr(e,t,n,!1),D=(n&e.childLanes)!==0,dt||D){if(D=Je,D!==null&&(r=Bc(D,n),r!==0&&r!==K.retryLane))throw K.retryLane=r,xn(e,r),Pt(D,e,r),Lo;mu(U)||Ol(),t=No(e,t,n)}else mu(U)?(t.flags|=192,t.child=e.child,t=null):(e=K.treeContext,it=ai(U.nextSibling),wt=t,Ue=!0,Wi=null,si=!1,e!==null&&Rh(t,e),t=Ho(t,r.children),t.flags|=4096);return t}return f?(nn(),U=r.fallback,f=t.mode,K=e.child,te=K.sibling,r=Ti(K,{mode:"hidden",children:r.children}),r.subtreeFlags=K.subtreeFlags&65011712,te!==null?U=Ti(te,U):(U=En(U,f,n,null),U.flags|=2),U.return=t,r.return=t,r.sibling=U,t.child=r,rs(null,r),r=t.child,U=e.child.memoizedState,U===null?U=Bo(n):(f=U.cachePool,f!==null?(K=ht._currentValue,f=f.parent!==K?{parent:K,pool:K}:f):f=Hh(),U={baseLanes:U.baseLanes|n,cachePool:f}),r.memoizedState=U,r.childLanes=zo(e,D,n),t.memoizedState=Oo,rs(e.child,r)):(tn(t),n=e.child,e=n.sibling,n=Ti(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(D=t.deletions,D===null?(t.deletions=[e],t.flags|=16):D.push(e)),t.child=n,t.memoizedState=null,n)}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,n){return Mn(t,e.child,null,n),e=Ho(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $f(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qa(e.return,t,n)}function jo(e,t,n,r,f,y){var D=e.memoizedState;D===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:f,treeForkCount:y}:(D.isBackwards=t,D.rendering=null,D.renderingStartTime=0,D.last=r,D.tail=n,D.tailMode=f,D.treeForkCount=y)}function Qf(e,t,n){var r=t.pendingProps,f=r.revealOrder,y=r.tail;r=r.children;var D=ut.current,U=(D&2)!==0;if(U?(D=D&1|2,t.flags|=128):D&=1,H(ut,D),Et(e,t,r,n),r=Ue?Yr:0,!U&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$f(e,n,t);else if(e.tag===19)$f(e,n,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(n=t.child,f=null;n!==null;)e=n.alternate,e!==null&&fl(e)===null&&(f=n),n=n.sibling;n=f,n===null?(f=t.child,t.child=null):(f=n.sibling,n.sibling=null),jo(t,!1,f,n,y,r);break;case"backwards":case"unstable_legacy-backwards":for(n=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=n,n=f,f=e}jo(t,!0,n,null,y,r);break;case"together":jo(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Bi(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ln|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(rr(e,t,n,!1),(n&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,n=Ti(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ti(e,e.pendingProps),n.return=t;n.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,n){switch(t.tag){case 3:N(t,t.stateNode.containerInfo),Qi(t,ht,e.memoizedState.cache),kn();break;case 27:case 5:Q(t);break;case 4:N(t,t.stateNode.containerInfo);break;case 10:Qi(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?(tn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Wf(e,t,n):(tn(t),e=Bi(e,t,n),e!==null?e.sibling:null);tn(t);break;case 19:var f=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(rr(e,t,n,!1),r=(n&t.childLanes)!==0),f){if(r)return Qf(e,t,n);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),H(ut,ut.current),r)break;return null;case 22:return t.lanes=0,qf(e,t,n,t.pendingProps);case 24:Qi(t,ht,e.memoizedState.cache)}return Bi(e,t,n)}function Zf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)dt=!0;else{if(!Uo(e,n)&&(t.flags&128)===0)return dt=!1,ev(e,t,n);dt=(e.flags&131072)!==0}else dt=!1,Ue&&(t.flags&1048576)!==0&&Dh(t,Yr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Rn(t.elementType),t.type=e,typeof e=="function")qa(e)?(r=Bn(e,r),t.tag=1,t=Kf(null,t,e,r,n)):(t.tag=0,t=Mo(null,t,e,r,n));else{if(e!=null){var f=e.$$typeof;if(f===E){t.tag=11,t=If(null,t,e,r,n);break e}else if(f===L){t.tag=14,t=Pf(null,t,e,r,n);break e}}throw t=Y(e)||e,Error(o(306,t,""))}}return t;case 0:return Mo(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,f=Bn(r,t.pendingProps),Kf(e,t,r,f,n);case 3:e:{if(N(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,n);var D=t.memoizedState;if(r=D.cache,Qi(t,ht,r),r!==y.cache&&Za(t,[ht],n,!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=Xf(e,t,r,n);break e}else if(r!==f){f=ii(Error(o(424)),t),Gr(f),t=Xf(e,t,r,n);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=ai(e.firstChild),wt=t,Ue=!0,Wi=null,si=!0,n=Fh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(kn(),r===f){t=Bi(e,t,n);break e}Et(e,t,r,n)}t=t.child}return t;case 26:return wl(e,t),e===null?(n=up(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ue||(n=t.type,e=t.pendingProps,r=Il(fe.current).createElement(n),r[Ct]=t,r[zt]=e,kt(r,n,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&&Ue&&(r=t.stateNode=lp(t.type,t.pendingProps,fe.current),wt=t,si=!0,f=it,hn(t.type)?(vu=f,it=ai(r.firstChild)):it=f),Et(e,t,t.pendingProps.children,n),wl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ue&&((f=r=it)&&(r=Rv(r,t.type,t.pendingProps,si),r!==null?(t.stateNode=r,wt=t,it=ai(r.firstChild),si=!1,f=!0):f=!1),f||$i(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,n),Ss._currentValue=f),wl(e,t),Et(e,t,r,n),t.child;case 6:return e===null&&Ue&&((e=n=it)&&(n=Lv(n,t.pendingProps,si),n!==null?(t.stateNode=n,wt=t,it=null,e=!0):e=!1),e||$i(t)),null;case 13:return Wf(e,t,n);case 4:return N(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Mn(t,null,r,n):Et(e,t,r,n),t.child;case 11:return If(e,t,t.type,t.pendingProps,n);case 7:return Et(e,t,t.pendingProps,n),t.child;case 8:return Et(e,t,t.pendingProps.children,n),t.child;case 12:return Et(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Qi(t,t.type,r.value),Et(e,t,r.children,n),t.child;case 9:return f=t.type._context,r=t.pendingProps.children,Tn(t),f=xt(f),r=r(f),t.flags|=1,Et(e,t,r,n),t.child;case 14:return Pf(e,t,t.type,t.pendingProps,n);case 15:return Ff(e,t,t.type,t.pendingProps,n);case 19:return Qf(e,t,n);case 31:return Jg(e,t,n);case 22:return qf(e,t,n,t.pendingProps);case 24:return Tn(t),r=xt(ht),e===null?(f=to(),f===null&&(f=Je,y=Ja(),f.pooledCache=y,y.refCount++,y!==null&&(f.pooledCacheLanes|=n),f=y),t.memoizedState={parent:r,cache:f},no(t),Qi(t,ht,f)):((e.lanes&n)!==0&&(ro(e,t),Jr(t,null,null,n),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),Qi(t,ht,r)):(r=y.cache,Qi(t,ht,r),r!==f.cache&&Za(t,[ht],n,!0))),Et(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function zi(e){e.flags|=4}function Io(e,t,n,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 Ln=ol,io}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 Ln=ol,io}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(!Ue)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var f=e.child;f!==null;)n|=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;)n|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function tv(e,t,n){var r=t.pendingProps;switch(Ka(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(t),null;case 1:return nt(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Li(ht),re(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(nr(t)?zi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Wa())),nt(t),null;case 26:var f=t.type,y=t.memoizedState;return e===null?(zi(t),y!==null?(nt(t),Jf(t,y)):(nt(t),Io(t,f,null,r,n))):y?y!==e.memoizedState?(zi(t),nt(t),Jf(t,y)):(nt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&zi(t),nt(t),Io(t,f,e,r,n)),null;case 27:if(de(t),n=fe.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&zi(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return nt(t),null}e=ie.current,nr(t)?Lh(t):(e=lp(f,r,n),t.stateNode=e,zi(t))}return nt(t),null;case 5:if(de(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&zi(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return nt(t),null}if(y=ie.current,nr(t))Lh(t);else{var D=Il(fe.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&&zi(t)}}return nt(t),Io(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&zi(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(o(166));if(e=fe.current,nr(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,f=wt,f!==null)switch(f.tag){case 27:case 5:r=f.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||Wd(e.nodeValue,n)),e||$i(t,!0)}else e=Il(e).createTextNode(r),e[Ct]=t,t.stateNode=e}return nt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=nr(t),n!==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 kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),e=!1}else n=Wa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Kt(t),t):(Kt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return nt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=nr(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 kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),f=!1}else f=Wa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(Kt(t),t):(Kt(t),null)}return Kt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(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)),n!==e&&n&&(t.child.flags|=8192),El(t,t.updateQueue),nt(t),null);case 4:return re(),e===null&&ou(t.stateNode.containerInfo),nt(t),null;case 10:return Li(t.type),nt(t),null;case 19:if(I(ut),r=t.memoizedState,r===null)return nt(t),null;if(f=(t.flags&128)!==0,y=r.rendering,y===null)if(f)ss(r,!1);else{if(lt!==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=n,n=t.child;n!==null;)kh(n,e),n=n.sibling;return H(ut,ut.current&1|2),Ue&&Di(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&&!Ue)return nt(t),null}else 2*ot()-r.renderingStartTime>Rl&&n!==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,n=ut.current,H(ut,f?n&1|2:n&1),Ue&&Di(t,r.treeForkCount),e):(nt(t),null);case 22:case 23:return Kt(t),oo(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(n&536870912)!==0&&(t.flags&128)===0&&(nt(t),t.subtreeFlags&6&&(t.flags|=8192)):nt(t),n=t.updateQueue,n!==null&&El(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&I(Dn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Li(ht),nt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function iv(e,t){switch(Ka(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Li(ht),re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(Kt(t),t.alternate===null)throw Error(o(340));kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(ut),null;case 4:return re(),null;case 10:return Li(t.type),null;case 22:case 23:return Kt(t),oo(),e!==null&&I(Dn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Li(ht),null;case 25:return null;default:return null}}function ed(e,t){switch(Ka(t),t.tag){case 3:Li(ht),re();break;case 26:case 27:case 5:de(t);break;case 4:re();break;case 31:t.memoizedState!==null&&Kt(t);break;case 13:Kt(t);break;case 19:I(ut);break;case 10:Li(t.type);break;case 22:case 23:Kt(t),oo(),e!==null&&I(Dn);break;case 24:Li(ht)}}function ls(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var f=r.next;n=f;do{if((n.tag&e)===e){r=void 0;var y=n.create,D=n.inst;r=y(),D.destroy=r}n=n.next}while(n!==f)}}catch(U){Xe(t,t.return,U)}}function rn(e,t,n){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,U=D.destroy;if(U!==void 0){D.destroy=void 0,f=t;var K=n,te=U;try{te()}catch(oe){Xe(f,K,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 n=e.stateNode;try{Vh(t,n)}catch(r){Xe(e,e.return,r)}}}function id(e,t,n){n.props=Bn(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Xe(e,t,r)}}function as(e,t){try{var n=e.ref;if(n!==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 n=="function"?e.refCleanup=n(r):n.current=r}}catch(f){Xe(e,t,f)}}function yi(e,t){var n=e.ref,r=e.refCleanup;if(n!==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 n=="function")try{n(null)}catch(f){Xe(e,t,f)}else n.current=null}function nd(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(f){Xe(e,e.return,f)}}function Po(e,t,n){try{var r=e.stateNode;xv(r,e.type,n,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&&hn(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&&hn(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,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ki));else if(r!==4&&(r===27&&hn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qo(e,t,n),e=e.sibling;e!==null;)qo(e,t,n),e=e.sibling}function kl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&hn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(kl(e,t,n),e=e.sibling;e!==null;)kl(e,t,n),e=e.sibling}function sd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);kt(t,r,n),t[Ct]=e,t[zt]=n}catch(y){Xe(e,e.return,y)}}var Hi=!1,pt=!1,Vo=!1,ld=typeof WeakSet=="function"?WeakSet:Set,yt=null;function nv(e,t){if(e=e.containerInfo,hu=Kl,e=gh(e),Ha(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var f=r.anchorOffset,y=r.focusNode;r=r.focusOffset;try{n.nodeType,y.nodeType}catch{n=null;break e}var D=0,U=-1,K=-1,te=0,oe=0,ce=e,se=null;t:for(;;){for(var le;ce!==n||f!==0&&ce.nodeType!==3||(U=D+f),ce!==y||r!==0&&ce.nodeType!==3||(K=D+r),ce.nodeType===3&&(D+=ce.nodeValue.length),(le=ce.firstChild)!==null;)se=ce,ce=le;for(;;){if(ce===e)break t;if(se===n&&++te===f&&(U=D),se===y&&++oe===r&&(K=D),(le=ce.nextSibling)!==null)break;ce=se,se=ce.parentNode}ce=le}n=U===-1||K===-1?null:{start:U,end:K}}else n=null}n=n||{start:0,end:0}}else n=null;for(fu={focusedElem:e,selectionRange:n},Kl=!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(n=0;n<e.length;n++)f=e[n],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&y!==null){e=void 0,n=t,f=y.memoizedProps,y=y.memoizedState,r=n.stateNode;try{var ve=Bn(n.type,f);e=r.getSnapshotBeforeUpdate(ve,y),r.__reactInternalSnapshotBeforeUpdate=e}catch(we){Xe(n,n.return,we)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)_u(e);else if(n===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,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ji(e,n),r&4&&ls(5,n);break;case 1:if(ji(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(D){Xe(n,n.return,D)}else{var f=Bn(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(D){Xe(n,n.return,D)}}r&64&&td(n),r&512&&as(n,n.return);break;case 3:if(ji(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Vh(e,t)}catch(D){Xe(n,n.return,D)}}break;case 27:t===null&&r&4&&sd(n);case 26:case 5:ji(e,n),t===null&&r&4&&nd(n),r&512&&as(n,n.return);break;case 12:ji(e,n);break;case 31:ji(e,n),r&4&&cd(e,n);break;case 13:ji(e,n),r&4&&hd(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=fv.bind(null,n),Mv(e,n))));break;case 22:if(r=n.memoizedState!==null||Hi,!r){t=t!==null&&t.memoizedState!==null||pt,f=Hi;var y=pt;Hi=r,(pt=t)&&!y?Ui(e,n,(n.subtreeFlags&8772)!==0):ji(e,n),Hi=f,pt=y}break;case 30:break;default:ji(e,n)}}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 rt=null,Nt=!1;function Ni(e,t,n){for(n=n.child;n!==null;)ud(e,t,n),n=n.sibling}function ud(e,t,n){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(bt,n)}catch{}switch(n.tag){case 26:pt||yi(n,t),Ni(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:pt||yi(n,t);var r=rt,f=Nt;hn(n.type)&&(rt=n.stateNode,Nt=!1),Ni(e,t,n),ms(n.stateNode),rt=r,Nt=f;break;case 5:pt||yi(n,t);case 6:if(r=rt,f=Nt,rt=null,Ni(e,t,n),rt=r,Nt=f,rt!==null)if(Nt)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(n.stateNode)}catch(y){Xe(n,t,y)}else try{rt.removeChild(n.stateNode)}catch(y){Xe(n,t,y)}break;case 18:rt!==null&&(Nt?(e=rt,tp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),xr(e)):tp(rt,n.stateNode));break;case 4:r=rt,f=Nt,rt=n.stateNode.containerInfo,Nt=!0,Ni(e,t,n),rt=r,Nt=f;break;case 0:case 11:case 14:case 15:rn(2,n,t),pt||rn(4,n,t),Ni(e,t,n);break;case 1:pt||(yi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&id(n,t,r)),Ni(e,t,n);break;case 21:Ni(e,t,n);break;case 22:pt=(r=pt)||n.memoizedState!==null,Ni(e,t,n),pt=r;break;default:Ni(e,t,n)}}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(n){Xe(t,t.return,n)}}}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(n){Xe(t,t.return,n)}}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 n=rv(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var f=dv.bind(null,e,r);r.then(f,f)}})}function jt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var f=n[r],y=e,D=t,U=D;e:for(;U!==null;){switch(U.tag){case 27:if(hn(U.type)){rt=U.stateNode,Nt=!1;break e}break;case 5:rt=U.stateNode,Nt=!1;break e;case 3:case 4:rt=U.stateNode.containerInfo,Nt=!0;break e}U=U.return}if(rt===null)throw Error(o(160));ud(y,D,f),rt=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 fi=null;function fd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:jt(t,e),Ut(e),r&4&&(rn(3,e,e.return),ls(3,e),rn(5,e,e.return));break;case 1:jt(t,e),Ut(e),r&512&&(pt||n===null||yi(n,n.return)),r&64&&Hi&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var f=fi;if(jt(t,e),Ut(e),r&512&&(pt||n===null||yi(n,n.return)),r&4){var y=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=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,n),y[Ct]=e,St(y),r=y;break e;case"link":var D=fp("link","href",f).get(r+(n.href||""));if(D){for(var U=0;U<D.length;U++)if(y=D[U],y.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&y.getAttribute("rel")===(n.rel==null?null:n.rel)&&y.getAttribute("title")===(n.title==null?null:n.title)&&y.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){D.splice(U,1);break t}}y=f.createElement(r),kt(y,r,n),f.head.appendChild(y);break;case"meta":if(D=fp("meta","content",f).get(r+(n.content||""))){for(U=0;U<D.length;U++)if(y=D[U],y.getAttribute("content")===(n.content==null?null:""+n.content)&&y.getAttribute("name")===(n.name==null?null:n.name)&&y.getAttribute("property")===(n.property==null?null:n.property)&&y.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&y.getAttribute("charset")===(n.charSet==null?null:n.charSet)){D.splice(U,1);break t}}y=f.createElement(r),kt(y,r,n),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?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):y.count--,r===null?dp(f,e.type,e.stateNode):hp(f,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Po(e,e.memoizedProps,n.memoizedProps)}break;case 27:jt(t,e),Ut(e),r&512&&(pt||n===null||yi(n,n.return)),n!==null&&r&4&&Po(e,e.memoizedProps,n.memoizedProps);break;case 5:if(jt(t,e),Ut(e),r&512&&(pt||n===null||yi(n,n.return)),e.flags&32){f=e.stateNode;try{Kn(f,"")}catch(ve){Xe(e,e.return,ve)}}r&4&&e.stateNode!=null&&(f=e.memoizedProps,Po(e,f,n!==null?n.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,n=e.stateNode;try{n.nodeValue=r}catch(ve){Xe(e,e.return,ve)}}break;case 3:if(ql=null,f=fi,fi=Pl(t.containerInfo),jt(t,e),fi=f,Ut(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{xr(t.containerInfo)}catch(ve){Xe(e,e.return,ve)}Vo&&(Vo=!1,dd(e));break;case 4:r=fi,fi=Pl(e.stateNode.containerInfo),jt(t,e),Ut(e),fi=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!=(n!==null&&n.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 K=n!==null&&n.memoizedState!==null,te=Hi,oe=pt;if(Hi=te||f,pt=oe||K,jt(t,e),pt=oe,Hi=te,Ut(e),r&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(n===null||K||Hi||pt||zn(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){K=n=t;try{if(y=K.stateNode,f)D=y.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{U=K.stateNode;var ce=K.memoizedProps.style,se=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;U.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(ve){Xe(K,K.return,ve)}}}else if(t.tag===6){if(n===null){K=t;try{K.stateNode.nodeValue=f?"":K.memoizedProps}catch(ve){Xe(K,K.return,ve)}}}else if(t.tag===18){if(n===null){K=t;try{var le=K.stateNode;f?ip(le,!0):ip(K.stateNode,!1)}catch(ve){Xe(K,K.return,ve)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Al(e,n))));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 n,r=e.return;r!==null;){if(rd(r)){n=r;break}r=r.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var f=n.stateNode,y=Fo(e);kl(e,y,f);break;case 5:var D=n.stateNode;n.flags&32&&(Kn(D,""),n.flags&=-33);var U=Fo(e);kl(e,U,D);break;case 3:case 4:var K=n.stateNode.containerInfo,te=Fo(e);qo(e,te,K);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 ji(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ad(e,t.alternate,t),t=t.sibling}function zn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:rn(4,t,t.return),zn(t);break;case 1:yi(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&id(t,t.return,n),zn(t);break;case 27:ms(t.stateNode);case 26:case 5:yi(t,t.return),zn(t);break;case 22:t.memoizedState===null&&zn(t);break;case 30:zn(t);break;default:zn(t)}e=e.sibling}}function Ui(e,t,n){for(n=n&&(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:Ui(f,y,n),ls(4,y);break;case 1:if(Ui(f,y,n),r=y,f=r.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(te){Xe(r,r.return,te)}if(r=y,f=r.updateQueue,f!==null){var U=r.stateNode;try{var K=f.shared.hiddenCallbacks;if(K!==null)for(f.shared.hiddenCallbacks=null,f=0;f<K.length;f++)qh(K[f],U)}catch(te){Xe(r,r.return,te)}}n&&D&64&&td(y),as(y,y.return);break;case 27:sd(y);case 26:case 5:Ui(f,y,n),n&&r===null&&D&4&&nd(y),as(y,y.return);break;case 12:Ui(f,y,n);break;case 31:Ui(f,y,n),n&&D&4&&cd(f,y);break;case 13:Ui(f,y,n),n&&D&4&&hd(f,y);break;case 22:y.memoizedState===null&&Ui(f,y,n),as(y,y.return);break;case 30:break;default:Ui(f,y,n)}t=t.sibling}}function Yo(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Kr(n))}function Go(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Kr(e))}function di(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)pd(e,t,n,r),t=t.sibling}function pd(e,t,n,r){var f=t.flags;switch(t.tag){case 0:case 11:case 15:di(e,t,n,r),f&2048&&ls(9,t);break;case 1:di(e,t,n,r);break;case 3:di(e,t,n,r),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Kr(e)));break;case 12:if(f&2048){di(e,t,n,r),e=t.stateNode;try{var y=t.memoizedProps,D=y.id,U=y.onPostCommit;typeof U=="function"&&U(D,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(K){Xe(t,t.return,K)}}else di(e,t,n,r);break;case 31:di(e,t,n,r);break;case 13:di(e,t,n,r);break;case 23:break;case 22:y=t.stateNode,D=t.alternate,t.memoizedState!==null?y._visibility&2?di(e,t,n,r):os(e,t):y._visibility&2?di(e,t,n,r):(y._visibility|=2,dr(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),f&2048&&Yo(D,t);break;case 24:di(e,t,n,r),f&2048&&Go(t.alternate,t);break;default:di(e,t,n,r)}}function dr(e,t,n,r,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var y=e,D=t,U=n,K=r,te=D.flags;switch(D.tag){case 0:case 11:case 15:dr(y,D,U,K,f),ls(8,D);break;case 23:break;case 22:var oe=D.stateNode;D.memoizedState!==null?oe._visibility&2?dr(y,D,U,K,f):os(y,D):(oe._visibility|=2,dr(y,D,U,K,f)),f&&te&2048&&Yo(D.alternate,D);break;case 24:dr(y,D,U,K,f),f&&te&2048&&Go(D.alternate,D);break;default:dr(y,D,U,K,f)}t=t.sibling}}function os(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,f=r.flags;switch(r.tag){case 22:os(n,r),f&2048&&Yo(r.alternate,r);break;case 24:os(n,r),f&2048&&Go(r.alternate,r);break;default:os(n,r)}t=t.sibling}}var us=8192;function pr(e,t,n){if(e.subtreeFlags&us)for(e=e.child;e!==null;)_d(e,t,n),e=e.sibling}function _d(e,t,n){switch(e.tag){case 26:pr(e,t,n),e.flags&us&&e.memoizedState!==null&&Vv(n,fi,e.memoizedState,e.memoizedProps);break;case 5:pr(e,t,n);break;case 3:case 4:var r=fi;fi=Pl(e.stateNode.containerInfo),pr(e,t,n),fi=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=us,us=16777216,pr(e,t,n),us=r):pr(e,t,n));break;default:pr(e,t,n)}}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 n=0;n<t.length;n++){var r=t[n];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&&rn(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 n=0;n<t.length;n++){var r=t[n];yt=r,vd(r,e)}md(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:rn(8,t,t.return),Tl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Tl(t));break;default:Tl(t)}e=e.sibling}}function vd(e,t){for(;yt!==null;){var n=yt;switch(n.tag){case 0:case 11:case 15:rn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Kr(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,yt=r;else e:for(n=e;yt!==null;){r=yt;var f=r.sibling,y=r.return;if(od(r),r===n){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),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return xt(ht).controller.signal}},lv=typeof WeakMap=="function"?WeakMap:Map,Ye=0,Je=null,Oe=null,He=0,Ke=0,Xt=null,sn=!1,_r=!1,Ko=!1,Ii=0,lt=0,ln=0,Hn=0,Xo=0,Wt=0,mr=0,hs=null,It=null,Wo=!1,Dl=0,Sd=0,Rl=1/0,Ll=null,an=null,vt=0,on=null,gr=null,Pi=0,$o=0,Qo=null,yd=null,fs=0,Zo=null;function $t(){return(Ye&2)!==0&&He!==0?He&-He:G.T!==null?ru():zc()}function bd(){if(Wt===0)if((He&536870912)===0||Ue){var e=Us;Us<<=1,(Us&3932160)===0&&(Us=262144),Wt=e}else Wt=536870912;return e=Gt.current,e!==null&&(e.flags|=32),Wt}function Pt(e,t,n){(e===Je&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(vr(e,0),un(e,He,Wt,!1)),Or(e,n),((Ye&2)===0||e!==Je)&&(e===Je&&((Ye&2)===0&&(Hn|=n),lt===4&&un(e,He,Wt,!1)),bi(e))}function Cd(e,t,n){if((Ye&6)!==0)throw Error(o(327));var r=!n&&(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&&un(e,t,0,!1);break}else{if(n=e.current.alternate,y&&!av(n)){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 U=e;f=hs;var K=U.current.memoizedState.isDehydrated;if(K&&(vr(U,D).flags|=256),D=eu(U,D,!1),D!==2){if(Ko&&!K){U.errorRecoveryDisabledLanes|=y,Hn|=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),un(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:un(r,t,Wt,!sn);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(un(r,t,Wt,!sn),Ps(r,0,!0)!==0)break e;Pi=t,r.timeoutHandle=Jd(wd.bind(null,r,n,It,Ll,Wo,t,Wt,Hn,mr,sn,y,"Throttled",-0,0),f);break e}wd(r,n,It,Ll,Wo,t,Wt,Hn,mr,sn,y,null,-0,0)}}break}while(!0);bi(e)}function wd(e,t,n,r,f,y,D,U,K,te,oe,ce,se,le){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ki},_d(t,y,ce);var ve=(y&62914560)===y?Dl-ot():(y&4194048)===y?Sd-ot():0;if(ve=Yv(ce,ve),ve!==null){Pi=y,e.cancelPendingCommit=ve(Ld.bind(null,e,t,y,n,r,f,D,U,K,oe,ce,null,se,le)),un(e,y,D,!te);return}}Ld(e,t,y,n,r,f,D,U,K)}function av(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var f=n[r],y=f.getSnapshot;f=f.value;try{if(!Vt(y(),f))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 un(e,t,n,r){t&=~Xo,t&=~Hn,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var f=t;0<f;){var y=31-Ze(f),D=1<<y;r[y]=-1,f&=~D}n!==0&&Mc(e,n,t)}function Ml(){return(Ye&6)===0?(ds(0),!1):!0}function Jo(){if(Oe!==null){if(Ke===0)var e=Oe.return;else e=Oe,Ri=An=null,_o(e),or=null,Wr=0,e=Oe;for(;e!==null;)ed(e.alternate,e),e=e.return;Oe=null}}function vr(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Av(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Pi=0,Jo(),Je=e,Oe=n=Ti(e.current,null),He=t,Ke=0,Xt=null,sn=!1,_r=Mr(e,t),Ko=!1,mr=Wt=Xo=Hn=ln=lt=0,It=hs=null,Wo=!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-Ze(r),y=1<<f;t|=e[f],r&=~y}return Ii=t,Js(),n}function xd(e,t){De=null,G.H=ns,t===ar||t===al?(t=Uh(),Ke=3):t===io?(t=Uh(),Ke=4):Ke=t===Lo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Xt=t,Oe===null&&(lt=1,bl(e,ii(t,e.current)))}function Ed(){var e=Gt.current;return e===null?!0:(He&4194048)===He?li===null:(He&62914560)===He||(He&536870912)!==0?e===li:!1}function kd(){var e=G.H;return G.H=ns,e===null?ns:e}function Ad(){var e=G.A;return G.A=sv,e}function Ol(){lt=4,sn||(He&4194048)!==He&&Gt.current!==null||(_r=!0),(ln&134217727)===0&&(Hn&134217727)===0||Je===null||un(Je,He,Wt,!1)}function eu(e,t,n){var r=Ye;Ye|=2;var f=kd(),y=Ad();(Je!==e||He!==t)&&(Ll=null,vr(e,t)),t=!1;var D=lt;e:do try{if(Ke!==0&&Oe!==null){var U=Oe,K=Xt;switch(Ke){case 8:Jo(),D=6;break e;case 3:case 2:case 9:case 6:Gt.current===null&&(t=!0);var te=Ke;if(Ke=0,Xt=null,Sr(e,U,K,te),n&&_r){D=0;break e}break;default:te=Ke,Ke=0,Xt=null,Sr(e,U,K,te)}}ov(),D=lt;break}catch(oe){xd(e,oe)}while(!0);return t&&e.shellSuspendCounter++,Ri=An=null,Ye=r,G.H=f,G.A=y,Oe===null&&(Je=null,He=0,Js()),D}function ov(){for(;Oe!==null;)Td(Oe)}function uv(e,t){var n=Ye;Ye|=2;var r=kd(),f=Ad();Je!==e||He!==t?(Ll=null,Rl=ot()+500,vr(e,t)):_r=Mr(e,t);e:do try{if(Ke!==0&&Oe!==null){t=Oe;var y=Xt;t:switch(Ke){case 1:Ke=0,Xt=null,Sr(e,t,y,1);break;case 2:case 9:if(Nh(y)){Ke=0,Xt=null,Dd(t);break}t=function(){Ke!==2&&Ke!==9||Je!==e||(Ke=7),bi(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,Xt=null,Dd(t)):(Ke=0,Xt=null,Sr(e,t,y,7));break;case 5:var D=null;switch(Oe.tag){case 26:D=Oe.memoizedState;case 5:case 27:var U=Oe;if(D?pp(D):U.stateNode.complete){Ke=0,Xt=null;var K=U.sibling;if(K!==null)Oe=K;else{var te=U.return;te!==null?(Oe=te,Bl(te)):Oe=null}break t}}Ke=0,Xt=null,Sr(e,t,y,5);break;case 6:Ke=0,Xt=null,Sr(e,t,y,6);break;case 8:Jo(),lt=6;break e;default:throw Error(o(462))}}cv();break}catch(oe){xd(e,oe)}while(!0);return Ri=An=null,G.H=r,G.A=f,Ye=n,Oe!==null?0:(Je=null,He=0,Js(),lt)}function cv(){for(;Oe!==null&&!Vi();)Td(Oe)}function Td(e){var t=Zf(e.alternate,e,Ii);e.memoizedProps=e.pendingProps,t===null?Bl(e):Oe=t}function Dd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Gf(n,t,t.pendingProps,t.type,void 0,He);break;case 11:t=Gf(n,t,t.pendingProps,t.type.render,t.ref,He);break;case 5:_o(t);default:ed(n,t),t=Oe=kh(t,Ii),t=Zf(n,t,Ii)}e.memoizedProps=e.pendingProps,t===null?Bl(e):Oe=t}function Sr(e,t,n,r){Ri=An=null,_o(t),or=null,Wr=0;var f=t.return;try{if(Zg(e,f,t,n,He)){lt=1,bl(e,ii(n,e.current)),Oe=null;return}}catch(y){if(f!==null)throw Oe=f,y;lt=1,bl(e,ii(n,e.current)),Oe=null;return}t.flags&32768?(Ue||r===1?e=!0:_r||(He&536870912)!==0?e=!1:(sn=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,sn);return}e=t.return;var n=tv(t.alternate,t,Ii);if(n!==null){Oe=n;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);lt===0&&(lt=5)}function Rd(e,t){do{var n=iv(e.alternate,e);if(n!==null){n.flags&=32767,Oe=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Oe=e;return}Oe=e=n}while(e!==null);lt=6,Oe=null}function Ld(e,t,n,r,f,y,D,U,K){e.cancelPendingCommit=null;do zl();while(vt!==0);if((Ye&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,n,y,D,U,K),e===Je&&(Oe=Je=null,He=0),gr=t,on=e,Pi=n,$o=y,Qo=f,yd=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,pv(ye,function(){return Hd(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=G.T,G.T=null,f=J.p,J.p=2,D=Ye,Ye|=4;try{nv(e,t,n)}finally{Ye=D,J.p=f,G.T=r}}vt=1,Md(),Od(),Bd()}}function Md(){if(vt===1){vt=0;var e=on,t=gr,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=G.T,G.T=null;var r=J.p;J.p=2;var f=Ye;Ye|=4;try{fd(t,e);var y=fu,D=gh(e.containerInfo),U=y.focusedElem,K=y.selectionRange;if(D!==U&&U&&U.ownerDocument&&mh(U.ownerDocument.documentElement,U)){if(K!==null&&Ha(U)){var te=K.start,oe=K.end;if(oe===void 0&&(oe=te),"selectionStart"in U)U.selectionStart=te,U.selectionEnd=Math.min(oe,U.value.length);else{var ce=U.ownerDocument||document,se=ce&&ce.defaultView||window;if(se.getSelection){var le=se.getSelection(),ve=U.textContent.length,we=Math.min(K.start,ve),Qe=K.end===void 0?we:Math.min(K.end,ve);!le.extend&&we>Qe&&(D=Qe,Qe=we,we=D);var Z=_h(U,we),W=_h(U,Qe);if(Z&&W&&(le.rangeCount!==1||le.anchorNode!==Z.node||le.anchorOffset!==Z.offset||le.focusNode!==W.node||le.focusOffset!==W.offset)){var ee=ce.createRange();ee.setStart(Z.node,Z.offset),le.removeAllRanges(),we>Qe?(le.addRange(ee),le.extend(W.node,W.offset)):(ee.setEnd(W.node,W.offset),le.addRange(ee))}}}}for(ce=[],le=U;le=le.parentNode;)le.nodeType===1&&ce.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<ce.length;U++){var ue=ce[U];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Kl=!!hu,fu=hu=null}finally{Ye=f,J.p=r,G.T=n}}e.current=t,vt=2}}function Od(){if(vt===2){vt=0;var e=on,t=gr,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=G.T,G.T=null;var r=J.p;J.p=2;var f=Ye;Ye|=4;try{ad(e,t.alternate,t)}finally{Ye=f,J.p=r,G.T=n}}vt=3}}function Bd(){if(vt===4||vt===3){vt=0,At();var e=on,t=gr,n=Pi,r=yd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,gr=on=null,zd(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(an=null),ga(n),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=G.T,f=J.p,J.p=2,G.T=null;try{for(var y=e.onRecoverableError,D=0;D<r.length;D++){var U=r[D];y(U.value,{componentStack:U.stack})}}finally{G.T=t,J.p=f}}(Pi&3)!==0&&zl(),bi(e),f=e.pendingLanes,(n&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,Kr(t)))}function zl(){return Md(),Od(),Bd(),Hd()}function Hd(){if(vt!==5)return!1;var e=on,t=$o;$o=0;var n=ga(Pi),r=G.T,f=J.p;try{J.p=32>n?32:n,G.T=null,n=Qo,Qo=null;var y=on,D=Pi;if(vt=0,gr=on=null,Pi=0,(Ye&6)!==0)throw Error(o(331));var U=Ye;if(Ye|=4,gd(y.current),pd(y,y.current,D,n),Ye=U,ds(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(bt,y)}catch{}return!0}finally{J.p=f,G.T=r,zd(e,t)}}function Nd(e,t,n){t=ii(n,t),t=Ro(e.stateNode,t,2),e=en(e,t,2),e!==null&&(Or(e,2),bi(e))}function Xe(e,t,n){if(e.tag===3)Nd(e,e,n);else for(;t!==null;){if(t.tag===3){Nd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(an===null||!an.has(r))){e=ii(n,e),n=jf(2),r=en(t,n,2),r!==null&&(Uf(n,r,t,e),Or(r,2),bi(r));break}}t=t.return}}function tu(e,t,n){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(n)||(Ko=!0,f.add(n),e=hv.bind(null,e,t,n),t.then(e,e))}function hv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Je===e&&(He&n)===n&&(lt===4||lt===3&&(He&62914560)===He&&300>ot()-Dl?(Ye&2)===0&&vr(e,0):Xo|=n,mr===He&&(mr=0)),bi(e)}function jd(e,t){t===0&&(t=Lc()),e=xn(e,t),e!==null&&(Or(e,t),bi(e))}function fv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),jd(e,n)}function dv(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,f=e.memoizedState;f!==null&&(n=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,n)}function pv(e,t){return gi(e,t)}var Hl=null,yr=null,iu=!1,Nl=!1,nu=!1,cn=0;function bi(e){e!==yr&&e.next===null&&(yr===null?Hl=yr=e:yr=yr.next=e),Nl=!0,iu||(iu=!0,mv())}function ds(e,t){if(!nu&&Nl){nu=!0;do for(var n=!1,r=Hl;r!==null;){if(e!==0){var f=r.pendingLanes;if(f===0)var y=0;else{var D=r.suspendedLanes,U=r.pingedLanes;y=(1<<31-Ze(42|e)+1)-1,y&=f&~(D&~U),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(n=!0,Fd(r,y))}else y=He,y=Ps(r,r===Je?y:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(y&3)===0||Mr(r,y)||(n=!0,Fd(r,y));r=r.next}while(n);nu=!1}}function _v(){Ud()}function Ud(){Nl=iu=!1;var e=0;cn!==0&&kv()&&(e=cn);for(var t=ot(),n=null,r=Hl;r!==null;){var f=r.next,y=Id(r,t);y===0?(r.next=null,n===null?Hl=f:n.next=f,f===null&&(yr=n)):(n=r,(e!==0||(y&3)!==0)&&(Nl=!0)),r=f}vt!==0&&vt!==5||ds(e),cn!==0&&(cn=0)}function Id(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,f=e.expirationTimes,y=e.pendingLanes&-62914561;0<y;){var D=31-Ze(y),U=1<<D,K=f[D];K===-1?((U&n)===0||(U&r)!==0)&&(f[D]=Fm(U,t)):K<=t&&(e.expiredLanes|=U),y&=~U}if(t=Je,n=He,n=Ps(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xi(r),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Mr(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xi(r),ga(n)){case 2:case 8:n=me;break;case 32:n=ye;break;case 268435456:n=Me;break;default:n=ye}return r=Pd.bind(null,e),n=gi(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xi(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 n=e.callbackNode;if(zl()&&e.callbackNode!==n)return null;var r=He;return r=Ps(e,e===Je?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Cd(e,r,t),Id(e,ot()),e.callbackNode!=null&&e.callbackNode===n?Pd.bind(null,e):null)}function Fd(e,t){if(zl())return null;Cd(e,t,!0)}function mv(){Tv(function(){(Ye&6)!==0?gi(ae,_v):Ud()})}function ru(){if(cn===0){var e=sr;e===0&&(e=js,js<<=1,(js&261888)===0&&(js=256)),cn=e}return cn}function qd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ys(""+e)}function Vd(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function gv(e,t,n,r,f){if(t==="submit"&&n&&n.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 U=new Ws("action","action",null,r,f);e.push({event:U,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(cn!==0){var K=D?Vd(f,D):new FormData(f);xo(n,{pending:!0,data:K,method:f.method,action:y},null,K)}}else typeof y=="function"&&(U.preventDefault(),K=D?Vd(f,D):new FormData(f),xo(n,{pending:!0,data:K,method:f.method,action:y},y,K))},currentTarget:f}]})}}for(var su=0;su<Ia.length;su++){var lu=Ia[su],vv=lu.toLowerCase(),Sv=lu[0].toUpperCase()+lu.slice(1);hi(vv,"on"+Sv)}hi(yh,"onAnimationEnd"),hi(bh,"onAnimationIteration"),hi(Ch,"onAnimationStart"),hi("dblclick","onDoubleClick"),hi("focusin","onFocus"),hi("focusout","onBlur"),hi(zg,"onTransitionRun"),hi(Hg,"onTransitionStart"),hi(Ng,"onTransitionCancel"),hi(wh,"onTransitionEnd"),Yn("onMouseEnter",["mouseout","mouseover"]),Yn("onMouseLeave",["mouseout","mouseover"]),Yn("onPointerEnter",["pointerout","pointerover"]),Yn("onPointerLeave",["pointerout","pointerover"]),yn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),yn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),yn("onBeforeInput",["compositionend","keypress","textInput","paste"]),yn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),yn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),yn("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 n=0;n<e.length;n++){var r=e[n],f=r.event;r=r.listeners;e:{var y=void 0;if(t)for(var D=r.length-1;0<=D;D--){var U=r[D],K=U.instance,te=U.currentTarget;if(U=U.listener,K!==y&&f.isPropagationStopped())break e;y=U,f.currentTarget=te;try{y(f)}catch(oe){Zs(oe)}f.currentTarget=null,y=K}else for(D=0;D<r.length;D++){if(U=r[D],K=U.instance,te=U.currentTarget,U=U.listener,K!==y&&f.isPropagationStopped())break e;y=U,f.currentTarget=te;try{y(f)}catch(oe){Zs(oe)}f.currentTarget=null,y=K}}}}function Be(e,t){var n=t[va];n===void 0&&(n=t[va]=new Set);var r=e+"__bubble";n.has(r)||(Gd(t,e,2,!1),n.add(r))}function au(e,t,n){var r=0;t&&(r|=4),Gd(n,e,r,t)}var jl="_reactListening"+Math.random().toString(36).slice(2);function ou(e){if(!e[jl]){e[jl]=!0,jc.forEach(function(n){n!=="selectionchange"&&(yv.has(n)||au(n,!1,e),au(n,!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,n,r){switch(bp(t)){case 2:var f=Xv;break;case 8:f=Wv;break;default:f=wu}n=f.bind(null,t,n,e),f=void 0,!Aa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),r?f!==void 0?e.addEventListener(t,n,{capture:!0,passive:f}):e.addEventListener(t,n,!0):f!==void 0?e.addEventListener(t,n,{passive:f}):e.addEventListener(t,n,!1)}function uu(e,t,n,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 U=r.stateNode.containerInfo;if(U===f)break;if(D===4)for(D=r.return;D!==null;){var K=D.tag;if((K===3||K===4)&&D.stateNode.containerInfo===f)return;D=D.return}for(;U!==null;){if(D=Fn(U),D===null)return;if(K=D.tag,K===5||K===6||K===26||K===27){r=y=D;continue e}U=U.parentNode}}r=r.return}$c(function(){var te=y,oe=Ea(n),ce=[];e:{var se=xh.get(e);if(se!==void 0){var le=Ws,ve=e;switch(e){case"keypress":if(Ks(n)===0)break e;case"keydown":case"keyup":le=dg;break;case"focusin":ve="focus",le=La;break;case"focusout":ve="blur",le=La;break;case"beforeblur":case"afterblur":le=La;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=Jc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=tg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=mg;break;case yh:case bh:case Ch:le=rg;break;case wh:le=vg;break;case"scroll":case"scrollend":le=Jm;break;case"wheel":le=yg;break;case"copy":case"cut":case"paste":le=lg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=th;break;case"toggle":case"beforetoggle":le=Cg}var we=(t&4)!==0,Qe=!we&&(e==="scroll"||e==="scrollend"),Z=we?se!==null?se+"Capture":null:se;we=[];for(var W=te,ee;W!==null;){var ue=W;if(ee=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||ee===null||Z===null||(ue=Hr(W,Z),ue!=null&&we.push(_s(W,ue,ee))),Qe)break;W=W.return}0<we.length&&(se=new le(se,ve,null,n,oe),ce.push({event:se,listeners:we}))}}if((t&7)===0){e:{if(se=e==="mouseover"||e==="pointerover",le=e==="mouseout"||e==="pointerout",se&&n!==xa&&(ve=n.relatedTarget||n.fromElement)&&(Fn(ve)||ve[Pn]))break e;if((le||se)&&(se=oe.window===oe?oe:(se=oe.ownerDocument)?se.defaultView||se.parentWindow:window,le?(ve=n.relatedTarget||n.toElement,le=te,ve=ve?Fn(ve):null,ve!==null&&(Qe=b(ve),we=ve.tag,ve!==Qe||we!==5&&we!==27&&we!==6)&&(ve=null)):(le=null,ve=te),le!==ve)){if(we=Jc,ue="onMouseLeave",Z="onMouseEnter",W="mouse",(e==="pointerout"||e==="pointerover")&&(we=th,ue="onPointerLeave",Z="onPointerEnter",W="pointer"),Qe=le==null?se:zr(le),ee=ve==null?se:zr(ve),se=new we(ue,W+"leave",le,n,oe),se.target=Qe,se.relatedTarget=ee,ue=null,Fn(oe)===te&&(we=new we(Z,W+"enter",ve,n,oe),we.target=ee,we.relatedTarget=Qe,ue=we),Qe=ue,le&&ve)t:{for(we=bv,Z=le,W=ve,ee=0,ue=Z;ue;ue=we(ue))ee++;ue=0;for(var be=W;be;be=we(be))ue++;for(;0<ee-ue;)Z=we(Z),ee--;for(;0<ue-ee;)W=we(W),ue--;for(;ee--;){if(Z===W||W!==null&&Z===W.alternate){we=Z;break t}Z=we(Z),W=we(W)}we=null}else we=null;le!==null&&Kd(ce,se,le,we,!1),ve!==null&&Qe!==null&&Kd(ce,Qe,ve,we,!0)}}e:{if(se=te?zr(te):window,le=se.nodeName&&se.nodeName.toLowerCase(),le==="select"||le==="input"&&se.type==="file")var qe=uh;else if(ah(se))if(ch)qe=Mg;else{qe=Rg;var Se=Dg}else le=se.nodeName,!le||le.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?te&&wa(te.elementType)&&(qe=uh):qe=Lg;if(qe&&(qe=qe(e,te))){oh(ce,qe,n,oe);break e}Se&&Se(e,se,te),e==="focusout"&&te&&se.type==="number"&&te.memoizedProps.value!=null&&Ca(se,"number",se.value)}switch(Se=te?zr(te):window,e){case"focusin":(ah(Se)||Se.contentEditable==="true")&&(Qn=Se,Na=te,Vr=null);break;case"focusout":Vr=Na=Qn=null;break;case"mousedown":ja=!0;break;case"contextmenu":case"mouseup":case"dragend":ja=!1,vh(ce,n,oe);break;case"selectionchange":if(Bg)break;case"keydown":case"keyup":vh(ce,n,oe)}var Re;if(Oa)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else $n?sh(e,n)&&(Ne="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ne="onCompositionStart");Ne&&(ih&&n.locale!=="ko"&&($n||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&$n&&(Re=Qc()):(Ki=oe,Ta="value"in Ki?Ki.value:Ki.textContent,$n=!0)),Se=Ul(te,Ne),0<Se.length&&(Ne=new eh(Ne,e,null,n,oe),ce.push({event:Ne,listeners:Se}),Re?Ne.data=Re:(Re=lh(n),Re!==null&&(Ne.data=Re)))),(Re=xg?Eg(e,n):kg(e,n))&&(Ne=Ul(te,"onBeforeInput"),0<Ne.length&&(Se=new eh("onBeforeInput","beforeinput",null,n,oe),ce.push({event:Se,listeners:Ne}),Se.data=Re)),gv(ce,e,te,n,oe)}Yd(ce,t)})}function _s(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ul(e,t){for(var n=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,n),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 Kd(e,t,n,r,f){for(var y=t._reactName,D=[];n!==null&&n!==r;){var U=n,K=U.alternate,te=U.stateNode;if(U=U.tag,K!==null&&K===r)break;U!==5&&U!==26&&U!==27||te===null||(K=te,f?(te=Hr(n,y),te!=null&&D.unshift(_s(n,te,K))):f||(te=Hr(n,y),te!=null&&D.push(_s(n,te,K)))),n=n.return}D.length!==0&&e.push({event:t,listeners:D})}var Cv=/\r\n?/g,wv=/\u0000|\uFFFD/g;function Xd(e){return(typeof e=="string"?e:""+e).replace(Cv,`
|
|
49
|
+
`).replace(wv,"")}function Wd(e,t){return t=Xd(t),Xd(e)===t}function $e(e,t,n,r,f,y){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Kn(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Kn(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,n,r);break;case"style":Xc(e,r,y);break;case"data":if(t!=="object"){qs(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Ys(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"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"&&(n==="formAction"?(t!=="input"&&$e(e,t,"name",f.name,f,null),$e(e,t,"formEncType",f.formEncType,f,null),$e(e,t,"formMethod",f.formMethod,f,null),$e(e,t,"formTarget",f.formTarget,f,null)):($e(e,t,"encType",f.encType,f,null),$e(e,t,"method",f.method,f,null),$e(e,t,"target",f.target,f,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Ys(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=ki);break;case"onScroll":r!=null&&Be("scroll",e);break;case"onScrollEnd":r!=null&&Be("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(n=r.__html,n!=null){if(f.children!=null)throw Error(o(60));e.innerHTML=n}}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}n=Ys(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);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(n,""+r):e.removeAttribute(n);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(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Be("beforetoggle",e),Be("toggle",e),Fs(e,"popover",r);break;case"xlinkActuate":Ei(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Ei(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Ei(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Ei(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Ei(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Ei(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Ei(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Ei(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Ei(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<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Qm.get(n)||n,Fs(e,n,r))}}function cu(e,t,n,r,f,y){switch(n){case"style":Xc(e,r,y);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(n=r.__html,n!=null){if(f.children!=null)throw Error(o(60));e.innerHTML=n}}break;case"children":typeof r=="string"?Kn(e,r):(typeof r=="number"||typeof r=="bigint")&&Kn(e,""+r);break;case"onScroll":r!=null&&Be("scroll",e);break;case"onScrollEnd":r!=null&&Be("scrollend",e);break;case"onClick":r!=null&&(e.onclick=ki);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Uc.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(f=n.endsWith("Capture"),t=n.slice(2,f?n.length-7:void 0),y=e[zt]||null,y=y!=null?y[n]:null,typeof y=="function"&&e.removeEventListener(t,y,f),typeof r=="function")){typeof y!="function"&&y!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,f);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):Fs(e,n,r)}}}function kt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("load",e);var r=!1,f=!1,y;for(y in n)if(n.hasOwnProperty(y)){var D=n[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:$e(e,t,y,D,n,null)}}f&&$e(e,t,"srcSet",n.srcSet,n,null),r&&$e(e,t,"src",n.src,n,null);return;case"input":Be("invalid",e);var U=y=D=f=null,K=null,te=null;for(r in n)if(n.hasOwnProperty(r)){var oe=n[r];if(oe!=null)switch(r){case"name":f=oe;break;case"type":D=oe;break;case"checked":K=oe;break;case"defaultChecked":te=oe;break;case"value":y=oe;break;case"defaultValue":U=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,t));break;default:$e(e,t,r,oe,n,null)}}Vc(e,y,U,K,te,D,f,!1);return;case"select":Be("invalid",e),r=D=y=null;for(f in n)if(n.hasOwnProperty(f)&&(U=n[f],U!=null))switch(f){case"value":y=U;break;case"defaultValue":D=U;break;case"multiple":r=U;default:$e(e,t,f,U,n,null)}t=y,n=D,e.multiple=!!r,t!=null?Gn(e,!!r,t,!1):n!=null&&Gn(e,!!r,n,!0);return;case"textarea":Be("invalid",e),y=f=r=null;for(D in n)if(n.hasOwnProperty(D)&&(U=n[D],U!=null))switch(D){case"value":r=U;break;case"defaultValue":f=U;break;case"children":y=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(91));break;default:$e(e,t,D,U,n,null)}Gc(e,r,f,y);return;case"option":for(K in n)if(n.hasOwnProperty(K)&&(r=n[K],r!=null))switch(K){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:$e(e,t,K,r,n,null)}return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(r=0;r<ps.length;r++)Be(ps[r],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("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(te in n)if(n.hasOwnProperty(te)&&(r=n[te],r!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:$e(e,t,te,r,n,null)}return;default:if(wa(t)){for(oe in n)n.hasOwnProperty(oe)&&(r=n[oe],r!==void 0&&cu(e,t,oe,r,n,void 0));return}}for(U in n)n.hasOwnProperty(U)&&(r=n[U],r!=null&&$e(e,t,U,r,n,null))}function xv(e,t,n,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,U=null,K=null,te=null,oe=null;for(le in n){var ce=n[le];if(n.hasOwnProperty(le)&&ce!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":K=ce;default:r.hasOwnProperty(le)||$e(e,t,le,null,r,ce)}}for(var se in r){var le=r[se];if(ce=n[se],r.hasOwnProperty(se)&&(le!=null||ce!=null))switch(se){case"type":y=le;break;case"name":f=le;break;case"checked":te=le;break;case"defaultChecked":oe=le;break;case"value":D=le;break;case"defaultValue":U=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,t));break;default:le!==ce&&$e(e,t,se,le,r,ce)}}ba(e,D,U,K,te,oe,y,f);return;case"select":le=D=U=se=null;for(y in n)if(K=n[y],n.hasOwnProperty(y)&&K!=null)switch(y){case"value":break;case"multiple":le=K;default:r.hasOwnProperty(y)||$e(e,t,y,null,r,K)}for(f in r)if(y=r[f],K=n[f],r.hasOwnProperty(f)&&(y!=null||K!=null))switch(f){case"value":se=y;break;case"defaultValue":U=y;break;case"multiple":D=y;default:y!==K&&$e(e,t,f,y,r,K)}t=U,n=D,r=le,se!=null?Gn(e,!!n,se,!1):!!r!=!!n&&(t!=null?Gn(e,!!n,t,!0):Gn(e,!!n,n?[]:"",!1));return;case"textarea":le=se=null;for(U in n)if(f=n[U],n.hasOwnProperty(U)&&f!=null&&!r.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:$e(e,t,U,null,r,f)}for(D in r)if(f=r[D],y=n[D],r.hasOwnProperty(D)&&(f!=null||y!=null))switch(D){case"value":se=f;break;case"defaultValue":le=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:f!==y&&$e(e,t,D,f,r,y)}Yc(e,se,le);return;case"option":for(var ve in n)if(se=n[ve],n.hasOwnProperty(ve)&&se!=null&&!r.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:$e(e,t,ve,null,r,se)}for(K in r)if(se=r[K],le=n[K],r.hasOwnProperty(K)&&se!==le&&(se!=null||le!=null))switch(K){case"selected":e.selected=se&&typeof se!="function"&&typeof se!="symbol";break;default:$e(e,t,K,se,r,le)}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 we in n)se=n[we],n.hasOwnProperty(we)&&se!=null&&!r.hasOwnProperty(we)&&$e(e,t,we,null,r,se);for(te in r)if(se=r[te],le=n[te],r.hasOwnProperty(te)&&se!==le&&(se!=null||le!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,t));break;default:$e(e,t,te,se,r,le)}return;default:if(wa(t)){for(var Qe in n)se=n[Qe],n.hasOwnProperty(Qe)&&se!==void 0&&!r.hasOwnProperty(Qe)&&cu(e,t,Qe,void 0,r,se);for(oe in r)se=r[oe],le=n[oe],!r.hasOwnProperty(oe)||se===le||se===void 0&&le===void 0||cu(e,t,oe,se,r,le);return}}for(var Z in n)se=n[Z],n.hasOwnProperty(Z)&&se!=null&&!r.hasOwnProperty(Z)&&$e(e,t,Z,null,r,se);for(ce in r)se=r[ce],le=n[ce],!r.hasOwnProperty(ce)||se===le||se==null&&le==null||$e(e,t,ce,se,r,le)}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,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var f=n[r],y=f.transferSize,D=f.initiatorType,U=f.duration;if(y&&U&&$d(D)){for(D=0,U=f.responseEnd,r+=1;r<n.length;r++){var K=n[r],te=K.startTime;if(te>U)break;var oe=K.transferSize,ce=K.initiatorType;oe&&$d(ce)&&(K=K.responseEnd,D+=oe*(K<U?1:(U-te)/(K-te)))}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 hn(e){return e==="head"}function tp(e,t){var n=t,r=0;do{var f=n.nextSibling;if(e.removeChild(n),f&&f.nodeType===8)if(n=f.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(f),xr(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")ms(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ms(n);for(var y=n.firstChild;y;){var D=y.nextSibling,U=y.nodeName;y[Br]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&y.rel.toLowerCase()==="stylesheet"||n.removeChild(y),y=D}}else n==="body"&&ms(e.ownerDocument.body);n=f}while(n);xr(t)}function ip(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function _u(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":_u(n),Sa(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Rv(e,t,n,r){for(;e.nodeType===1;){var f=n;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=ai(e.nextSibling),e===null)break}return null}function Lv(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=ai(e.nextSibling),e===null))return null;return e}function np(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ai(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 n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function ai(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 n=e.data;if(n==="/$"||n==="/&"){if(t===0)return ai(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function sp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function lp(e,t,n){switch(t=Il(n),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 oi=new Map,ap=new Set;function Pl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Fi=J.d;J.d={f:Ov,r:Bv,D:zv,C:Hv,L:Nv,m:jv,X:Iv,S:Uv,M:Pv};function Ov(){var e=Fi.f(),t=Ml();return e||t}function Bv(e){var t=qn(e);t!==null&&t.tag===5&&t.type==="form"?xf(t):Fi.r(e)}var br=typeof document>"u"?null:document;function op(e,t,n){var r=br;if(r&&typeof t=="string"&&t){var f=ei(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof n=="string"&&(f+='[crossorigin="'+n+'"]'),ap.has(f)||(ap.add(f),e={rel:e,crossOrigin:n,href:t},r.querySelector(f)===null&&(t=r.createElement("link"),kt(t,"link",e),St(t),r.head.appendChild(t)))}}function zv(e){Fi.D(e),op("dns-prefetch",e,null)}function Hv(e,t){Fi.C(e,t),op("preconnect",e,t)}function Nv(e,t,n){Fi.L(e,t,n);var r=br;if(r&&e&&t){var f='link[rel="preload"][as="'+ei(t)+'"]';t==="image"&&n&&n.imageSrcSet?(f+='[imagesrcset="'+ei(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(f+='[imagesizes="'+ei(n.imageSizes)+'"]')):f+='[href="'+ei(e)+'"]';var y=f;switch(t){case"style":y=Cr(e);break;case"script":y=wr(e)}oi.has(y)||(e=c({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),oi.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){Fi.m(e,t);var n=br;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+ei(r)+'"][href="'+ei(e)+'"]',y=f;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=wr(e)}if(!oi.has(y)&&(e=c({rel:"modulepreload",href:e},t),oi.set(y,e),n.querySelector(f)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(vs(y)))return}r=n.createElement("link"),kt(r,"link",e),St(r),n.head.appendChild(r)}}}function Uv(e,t,n){Fi.S(e,t,n);var r=br;if(r&&e){var f=Vn(r).hoistableStyles,y=Cr(e);t=t||"default";var D=f.get(y);if(!D){var U={loading:0,preload:null};if(D=r.querySelector(gs(y)))U.loading=5;else{e=c({rel:"stylesheet",href:e,"data-precedence":t},n),(n=oi.get(y))&&Su(e,n);var K=D=r.createElement("link");St(K),kt(K,"link",e),K._p=new Promise(function(te,oe){K.onload=te,K.onerror=oe}),K.addEventListener("load",function(){U.loading|=1}),K.addEventListener("error",function(){U.loading|=2}),U.loading|=4,Fl(D,t,r)}D={type:"stylesheet",instance:D,count:1,state:U},f.set(y,D)}}}function Iv(e,t){Fi.X(e,t);var n=br;if(n&&e){var r=Vn(n).hoistableScripts,f=wr(e),y=r.get(f);y||(y=n.querySelector(vs(f)),y||(e=c({src:e,async:!0},t),(t=oi.get(f))&&yu(e,t),y=n.createElement("script"),St(y),kt(y,"link",e),n.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function Pv(e,t){Fi.M(e,t);var n=br;if(n&&e){var r=Vn(n).hoistableScripts,f=wr(e),y=r.get(f);y||(y=n.querySelector(vs(f)),y||(e=c({src:e,async:!0,type:"module"},t),(t=oi.get(f))&&yu(e,t),y=n.createElement("script"),St(y),kt(y,"link",e),n.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function up(e,t,n,r){var f=(f=fe.current)?Pl(f):null;if(!f)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Cr(n.href),n=Vn(f).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Cr(n.href);var y=Vn(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),oi.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},oi.set(e,n),y||Fv(f,e,n,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=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=wr(n),n=Vn(f).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Cr(e){return'href="'+ei(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,n,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",n),St(t),e.head.appendChild(t))}function wr(e){return'[src="'+ei(e)+'"]'}function vs(e){return"script[async]"+e}function hp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+ei(n.href)+'"]');if(r)return t.instance=r,St(r),r;var f=c({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),St(r),kt(r,"style",f),Fl(r,n.precedence,e),t.instance=r;case"stylesheet":f=Cr(n.href);var y=e.querySelector(gs(f));if(y)return t.state.loading|=4,t.instance=y,St(y),y;r=cp(n),(f=oi.get(f))&&Su(r,f),y=(e.ownerDocument||e).createElement("link"),St(y);var D=y;return D._p=new Promise(function(U,K){D.onload=U,D.onerror=K}),kt(y,"link",r),t.state.loading|=4,Fl(y,n.precedence,e),t.instance=y;case"script":return y=wr(n.src),(f=e.querySelector(vs(y)))?(t.instance=f,St(f),f):(r=n,(f=oi.get(y))&&(r=c({},n),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,n.precedence,e));return t.instance}function Fl(e,t,n){for(var r=n.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 U=r[D];if(U.dataset.precedence===t)y=U;else if(y!==f)break}y?y.parentNode.insertBefore(e,y.nextSibling):(t=n.nodeType===9?n.head:n,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,n){if(ql===null){var r=new Map,f=ql=new Map;f.set(n,r)}else f=ql,r=f.get(n),r||(r=new Map,f.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),f=0;f<n.length;f++){var y=n[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 U=r.get(D);U?U.push(y):r.set(D,[y])}}return r}function dp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function qv(e,t,n){if(n===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,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&4)===0){if(n.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)),n.state.loading|=4,n.instance=y,St(y);return}y=t.ownerDocument||t,r=cp(r),(f=oi.get(f))&&Su(r,f),y=y.createElement("link"),St(y);var D=y;D._p=new Promise(function(U,K){D.onload=U,D.onerror=K}),kt(y,"link",r),n.instance=y}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Vl.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var bu=0;function Yv(e,t){return e.stylesheets&&e.count===0&&Gl(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){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=n,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 n=Yl.get(e);if(n)var r=n.get(null);else{n=new Map,Yl.set(e,n);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")&&(n.set(D.dataset.precedence,D),r=D)}r&&n.set(null,r)}f=t.instance,D=f.getAttribute("data-precedence"),y=n.get(D)||r,y===r&&n.set(null,f),n.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:ne,_currentValue2:ne,_threadCount:0};function Kv(e,t,n,r,f,y,D,U,K){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=K,this.incompleteTransitions=new Map}function _p(e,t,n,r,f,y,D,U,K,te,oe,ce){return e=new Kv(e,t,n,D,K,te,oe,ce,U),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:n,cache:t},no(y),e}function mp(e){return e?(e=er,e):er}function gp(e,t,n,r,f,y){f=mp(f),r.context===null?r.context=f:r.pendingContext=f,r=Ji(t),r.payload={element:n},y=y===void 0?null:y,y!==null&&(r.callback=y),n=en(e,r,t),n!==null&&(Pt(n,e,t),Qr(n,e,t))}function vp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n: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=xn(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 n=xn(e,t);n!==null&&Pt(n,e,t),Cu(e,t)}}var Kl=!0;function Xv(e,t,n,r){var f=G.T;G.T=null;var y=J.p;try{J.p=2,wu(e,t,n,r)}finally{J.p=y,G.T=f}}function Wv(e,t,n,r){var f=G.T;G.T=null;var y=J.p;try{J.p=8,wu(e,t,n,r)}finally{J.p=y,G.T=f}}function wu(e,t,n,r){if(Kl){var f=xu(r);if(f===null)uu(e,t,r,Xl,n),Cp(e,r);else if(Qv(f,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<$v.indexOf(e)){for(;f!==null;){var y=qn(f);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var D=Sn(y.pendingLanes);if(D!==0){var U=y;for(U.pendingLanes|=2,U.entangledLanes|=2;D;){var K=1<<31-Ze(D);U.entanglements[1]|=K,D&=~K}bi(y),(Ye&6)===0&&(Rl=ot()+500,ds(0))}}break;case 31:case 13:U=xn(y,2),U!==null&&Pt(U,y,2),Ml(),Cu(y,2)}if(y=xu(r),y===null&&uu(e,t,r,Xl,n),y===f)break;f=y}f!==null&&r.stopPropagation()}else uu(e,t,r,null,n)}}function xu(e){return e=Ea(e),Eu(e)}var Xl=null;function Eu(e){if(Xl=null,e=Fn(e),e!==null){var t=b(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=_(t),e!==null)return e;e=null}else if(n===31){if(e=a(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Xl=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 me:return 8;case ye:case Te:return 32;case Me:return 268435456;default:return 32}default:return 32}}var ku=!1,fn=null,dn=null,pn=null,ys=new Map,bs=new Map,_n=[],$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":fn=null;break;case"dragenter":case"dragleave":dn=null;break;case"mouseover":case"mouseout":pn=null;break;case"pointerover":case"pointerout":ys.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bs.delete(t.pointerId)}}function Cs(e,t,n,r,f,y){return e===null||e.nativeEvent!==y?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:y,targetContainers:[f]},t!==null&&(t=qn(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,n,r,f){switch(t){case"focusin":return fn=Cs(fn,e,t,n,r,f),!0;case"dragenter":return dn=Cs(dn,e,t,n,r,f),!0;case"mouseover":return pn=Cs(pn,e,t,n,r,f),!0;case"pointerover":var y=f.pointerId;return ys.set(y,Cs(ys.get(y)||null,e,t,n,r,f)),!0;case"gotpointercapture":return y=f.pointerId,bs.set(y,Cs(bs.get(y)||null,e,t,n,r,f)),!0}return!1}function wp(e){var t=Fn(e.target);if(t!==null){var n=b(t);if(n!==null){if(t=n.tag,t===13){if(t=_(n),t!==null){e.blockedOn=t,Hc(e.priority,function(){yp(n)});return}}else if(t===31){if(t=a(n),t!==null){e.blockedOn=t,Hc(e.priority,function(){yp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Wl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xu(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xa=r,n.target.dispatchEvent(r),xa=null}else return t=qn(n),t!==null&&Sp(t),e.blockedOn=n,!1;t.shift()}return!0}function xp(e,t,n){Wl(e)&&n.delete(t)}function Zv(){ku=!1,fn!==null&&Wl(fn)&&(fn=null),dn!==null&&Wl(dn)&&(dn=null),pn!==null&&Wl(pn)&&(pn=null),ys.forEach(xp),bs.forEach(xp)}function $l(e,t){e.blockedOn===t&&(e.blockedOn=null,ku||(ku=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Zv)))}var Ql=null;function Ep(e){Ql!==e&&(Ql=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Ql===e&&(Ql=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],f=e[t+2];if(typeof r!="function"){if(Eu(r||n)===null)continue;break}var y=qn(n);y!==null&&(e.splice(t,3),t-=3,xo(y,{pending:!0,data:f,method:n.method,action:r},r,f))}}))}function xr(e){function t(K){return $l(K,e)}fn!==null&&$l(fn,e),dn!==null&&$l(dn,e),pn!==null&&$l(pn,e),ys.forEach(t),bs.forEach(t);for(var n=0;n<_n.length;n++){var r=_n[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<_n.length&&(n=_n[0],n.blockedOn===null);)wp(n),n.blockedOn===null&&_n.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var f=n[r],y=n[r+1],D=f[zt]||null;if(typeof y=="function")D||Ep(n);else if(D){var U=null;if(y&&y.hasAttribute("formAction")){if(f=y,D=y[zt]||null)U=D.formAction;else if(Eu(f)!==null)continue}else U=D.action;typeof U=="function"?n[r+1]=U:(n.splice(r,3),r-=3),Ep(n)}}}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(n,20)}function n(){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(n,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 n=t.current,r=$t();gp(n,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[Pn]=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 n=0;n<_n.length&&t!==0&&t<_n[n].priority;n++);_n.splice(n,0,e),n===0&&wp(e)}};var Ap=s.version;if(Ap!=="19.2.6")throw Error(o(527,Ap,"19.2.6"));J.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?g(e):null,e=e===null?null:e.stateNode,e};var Jv={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:G,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 n=!1,r="",f=Bf,y=zf,D=Hf;return t!=null&&(t.unstable_strictMode===!0&&(n=!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,n,r,null,f,y,D,kp),e[Pn]=t.current,ou(e),new Au(t)},xs.hydrateRoot=function(e,t,n){if(!S(e))throw Error(o(299));var r=!1,f="",y=Bf,D=zf,U=Hf,K=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(f=n.identifierPrefix),n.onUncaughtError!==void 0&&(y=n.onUncaughtError),n.onCaughtError!==void 0&&(D=n.onCaughtError),n.onRecoverableError!==void 0&&(U=n.onRecoverableError),n.formState!==void 0&&(K=n.formState)),t=_p(e,1,!0,t,n??null,r,f,K,y,D,U,kp),t.context=mp(null),n=t.current,r=$t(),r=ma(r),f=Ji(r),f.callback=null,en(n,f,r),n=r,t.current.lanes=n,Or(t,n),bi(t),e[Pn]=t.current,ou(e),new Zl(t)},xs.version="19.2.6",xs}var jp;function hS(){if(jp)return Ru.exports;jp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(s){console.error(s)}}return i(),Ru.exports=cS(),Ru.exports}var fS=hS();function dS({sidebar:i,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:i})]}),F.jsx("main",{className:"app-main",children:s})]})}function pS(i,s){return i.find(l=>l.taskSlug===s)??i[0]??null}const je={getAppPreferences(){return Fe("/api/settings/preferences")},updateAppPreferences(i){return Fe("/api/settings/preferences",{method:"PUT",body:JSON.stringify(i)})},getCurrentProject(){return Fe("/api/projects/current")},getRecentRepositoryPaths(){return Fe("/api/projects/recent")},connectProject(i){return Fe("/api/projects/connect",{method:"POST",body:JSON.stringify(i)})},listTasks(){return Fe("/api/tasks")},createTask(i){return Fe("/api/tasks",{method:"POST",body:JSON.stringify(i)})},cleanupTask(i,s={}){return Fe(`/api/tasks/${encodeURIComponent(i)}/cleanup`,{method:"POST",body:JSON.stringify(s)})},getHarnessStatus(){return Fe("/api/projects/harness")},applyHarness(){return Fe("/api/projects/harness/apply",{method:"POST"})},getTaskStatus(i){return Fe(`/api/tasks/${encodeURIComponent(i)}/status`)},listSessions(i){return Fe(`/api/tasks/${encodeURIComponent(i)}/sessions`)},startRoleSession(i,s,l={}){return Fe(`/api/tasks/${encodeURIComponent(i)}/sessions/${s}/start`,{method:"POST",body:JSON.stringify(l)})},stopRoleSession(i,s){return Fe(`/api/tasks/${encodeURIComponent(i)}/sessions/${s}/stop`,{method:"POST"})},restartRoleSession(i,s,l={}){return Fe(`/api/tasks/${encodeURIComponent(i)}/sessions/${s}/restart`,{method:"POST",body:JSON.stringify(l)})},resumeRoleSession(i,s,l={}){return Fe(`/api/tasks/${encodeURIComponent(i)}/sessions/${s}/resume`,{method:"POST",body:JSON.stringify(l)})},dispatchRoleCommand(i,s){return Fe(`/api/tasks/${encodeURIComponent(i)}/sessions/${s}/dispatch`,{method:"POST"})},listMessages(i){return Fe(`/api/tasks/${encodeURIComponent(i)}/messages`)},sendRoleMessage(i,s){return Fe(`/api/tasks/${encodeURIComponent(i)}/messages`,{method:"POST",body:JSON.stringify(s)})},stageMessage(i,s){return Fe(`/api/tasks/${encodeURIComponent(i)}/messages/${s}/stage`,{method:"POST"})},rejectMessage(i,s){return Fe(`/api/tasks/${encodeURIComponent(i)}/messages/${s}/reject`,{method:"POST"})},getOrchestrationState(i){return Fe(`/api/tasks/${encodeURIComponent(i)}/orchestration`)},updateOrchestrationState(i,s){return Fe(`/api/tasks/${encodeURIComponent(i)}/orchestration`,{method:"PUT",body:JSON.stringify(s)})},getTranslationSettings(){return Fe("/api/translation/settings")},updateTranslationSettings(i){return Fe("/api/translation/settings",{method:"PUT",body:JSON.stringify(i)})},getTranslationPrompts(){return Fe("/api/translation/prompts")},testTranslationProvider(){return Fe("/api/translation/test",{method:"POST"})},startTranslationSession(i,s){return Fe(`/api/tasks/${encodeURIComponent(i)}/sessions/${s}/translation/start`,{method:"POST"})},pollTranslationSession(i,s,l){const o=new URLSearchParams({after:String(s)});return l!==void 0&&o.set("limit",String(l)),Fe(`/api/translation/sessions/${encodeURIComponent(i)}/events?${o.toString()}`)},translateUserInput(i,s,l){return Fe(`/api/tasks/${encodeURIComponent(i)}/sessions/${s}/translation/input`,{method:"POST",body:JSON.stringify(l)})},sendTranslatedInput(i,s,l){return Fe(`/api/tasks/${encodeURIComponent(i)}/sessions/${s}/translation/send`,{method:"POST",body:JSON.stringify(l)})},clearTranslationSession(i){return Fe(`/api/translation/sessions/${encodeURIComponent(i)}/clear`,{method:"POST"})},retryTranslation(i,s){return Fe(`/api/translation/sessions/${encodeURIComponent(i)}/retry/${encodeURIComponent(s)}`,{method:"POST"})}};async function Fe(i,s={}){var S,b;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(i,{...s,headers:l});if(!o.ok){const _=await o.json().catch(()=>null),a=(S=_==null?void 0:_.error)!=null&&S.hint?`${_.error.message} ${_.error.hint}`:((b=_==null?void 0:_.error)==null?void 0:b.message)??`Request failed: ${o.status}`;throw new Error(a)}return o.json()}function _S({events:i,maxEvents:s=8,showHeader:l=!0}){const o=s===null?i:i.slice(-s);return F.jsxs("section",{className:"event-log",children:[l?F.jsx("h2",{children:"Events"}):null,i.length===0?F.jsx("p",{className:"muted",children:"No terminal events yet."}):F.jsx("ol",{children:o.map((S,b)=>F.jsx("li",{children:S},`${S}-${b}`))})]})}function Bs({status:i}){return F.jsx("span",{className:`status-badge status-${i}`,children:i.replaceAll("_"," ")})}function mS({status:i,applyResult:s,busy:l=!1,onRefresh:o,onApply:S}){return i?F.jsxs("section",{className:"harness-panel",children:[F.jsxs("div",{className:"harness-panel-header",children:[F.jsx("p",{className:"muted",children:i.needsApply?`${i.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||!i.needsApply,onClick:()=>void S(),children:"Install / Update"})]})]}),F.jsx("ol",{className:"harness-file-list",children:i.files.map(b=>F.jsxs("li",{children:[F.jsx("span",{children:b.path}),F.jsx(Bs,{status:b.action})]},b.path))}),i.plannedChanges.length>0?F.jsxs("div",{className:"harness-changes",children:[F.jsx("h3",{children:"Planned Changes"}),F.jsx("ul",{children:i.plannedChanges.map(b=>F.jsxs("li",{children:[F.jsx("strong",{children:b.action})," ",b.path]},`${b.path}:${b.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(b=>F.jsxs("li",{children:[F.jsx("strong",{children:b.action})," ",b.path]},`${b.path}:${b.action}`))}):null]}):null,i.warnings.length>0?F.jsx("ul",{className:"warnings",children:i.warnings.map(b=>F.jsx("li",{children:b},b))}):null]}):null}function fc(i){return{pending:i.filter(s=>s.status==="pending_approval").length,queued:i.filter(s=>s.status==="queued").length,delivered:i.filter(s=>s.status==="delivered"||s.status==="staged").length}}function gS({messages:i,orchestration:s,busy:l,maxMessages:o=6,showControls:S=!0,showHeader:b=!0,onModeChange:_,onPausedChange:a}){const[u,h]=ge.useState(null),g=fc(i),c=(s==null?void 0:s.mode)??"manual",C=o===null?i:i.slice(-o),w=o===null?0:Math.max(0,i.length-o);async function T(x){await SS(x.body),h(x.id),window.setTimeout(()=>h(v=>v===x.id?null:v),1200)}return F.jsxs("section",{className:"message-panel",children:[b?F.jsxs("div",{className:"message-panel-header",children:[F.jsxs("div",{children:[F.jsx("h2",{children:"Messages"}),F.jsxs("p",{className:"muted",children:[g.pending," pending / ",g.queued," queued / ",g.delivered," delivered"]})]}),S&&_&&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=>_(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,i.length===0?F.jsx("p",{className:"muted",children:"No role messages yet."}):F.jsx("ol",{className:"message-list",children:C.map((x,v)=>{const p=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:["#",p]}),F.jsx("time",{dateTime:x.createdAt,children:vS(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.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 T(x),children:u===x.id?"Copied":"Copy"})})]},x.id)})})]})}function vS(i){const s=new Date(i);return Number.isNaN(s.getTime())?i:s.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}async function SS(i){var l;if((l=navigator.clipboard)!=null&&l.writeText){await navigator.clipboard.writeText(i);return}const s=document.createElement("textarea");s.value=i,s.setAttribute("readonly","true"),s.style.position="fixed",s.style.left="-9999px",document.body.appendChild(s),s.select(),document.execCommand("copy"),s.remove()}function yS({defaultPath:i="",recentPaths:s=[],busy:l=!1,onConnect:o}){const[S,b]=ge.useState(i);ge.useEffect(()=>{i&&b(i)},[i]);async function _(a){a.preventDefault(),await o(S)}return F.jsx("form",{className:"repo-connect",onSubmit:_,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=>b(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&&b(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 bS({tasks:i,activeTaskSlug:s,onSelect:l}){return F.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:i.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 CS({workflow:i}){return i?F.jsxs("section",{className:"workflow-panel",children:[F.jsx("div",{className:"workflow-summary",children:F.jsx("p",{children:i.nextAction})}),F.jsx("ol",{className:"workflow-steps",children:i.steps.map(s=>F.jsxs("li",{className:s.id===i.currentStepId?"is-current":void 0,children:[F.jsx("span",{children:s.label}),F.jsx(Bs,{status:s.status})]},s.id))})]}):null}function wS({project:i,recentRepositoryPaths:s,tasks:l,activeTaskSlug:o,workflow:S,messages:b,orchestration:_,events:a,harnessStatus:u,harnessApplyResult:h,busy:g,onConnect:c,onRefreshHarness:C,onApplyHarness:w,onCreateTask:T,onSelectTask:x,onOrchestrationModeChange:v,themeMode:p,onThemeModeChange:d,onStageMessage:m,onRejectMessage:E,onOpenMessageRole:R}){const[A,L]=ge.useState(""),[k,O]=ge.useState(!0),[j,P]=ge.useState(!1),[V,q]=ge.useState(!1),Y=fc(b),$=(_==null?void 0:_.mode)??"manual",G=A.trim();async function J(ne){ne.preventDefault(),await T({taskSlug:G,createWorktree:k}),L(""),O(!0)}return F.jsxs("div",{className:"project-dashboard",children:[F.jsx("header",{className:"brand-header",children:F.jsx("strong",{children:"VibeCodingMaster"})}),F.jsx(Nn,{title:"Repository Path",defaultOpen:!o,children:F.jsx(yS,{defaultPath:(i==null?void 0:i.repoRoot)??"",recentPaths:s,busy:g,onConnect:c})}),i?F.jsx(Nn,{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:i.repoRoot})]}),F.jsxs("div",{children:[F.jsx("dt",{children:"Branch"}),F.jsx("dd",{children:i.branch})]}),F.jsxs("div",{children:[F.jsx("dt",{children:"Working tree"}),F.jsx("dd",{children:i.isDirty?"uncommitted changes":"clean"})]})]}),i.warnings.length>0?F.jsx("ul",{className:"warnings",children:i.warnings.map(ne=>F.jsx("li",{children:ne},ne))}):null]})}):null,o?F.jsx(Nn,{title:"Workflow",children:S?F.jsx(CS,{workflow:S}):F.jsx("p",{className:"muted",children:"Loading workflow..."})}):null,F.jsx(Nn,{title:"Settings",children:F.jsxs("div",{className:"sidebar-settings",children:[F.jsxs("button",{"aria-label":`Theme mode: ${Up(p)}`,className:"settings-toggle theme-mode-toggle",disabled:g,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>d(xS(p)),children:[F.jsx("span",{children:"Theme"}),F.jsx("span",{children:Up(p)})]}),o?F.jsxs(F.Fragment,{children:[F.jsxs("button",{type:"button",onClick:()=>P(!0),children:[F.jsx("span",{children:"Messages"}),F.jsxs("span",{className:"muted",children:[Y.pending," pending / ",Y.queued," queued"]})]}),F.jsxs("button",{type:"button",onClick:()=>q(!0),children:[F.jsx("span",{children:"Events"}),F.jsxs("span",{className:"muted",children:[a.length," total"]})]}),F.jsxs("button",{"aria-pressed":$==="auto",className:$==="auto"?"settings-toggle is-active":"settings-toggle",disabled:g,type:"button",onClick:()=>v($==="auto"?"manual":"auto"),children:[F.jsx("span",{children:"Auto orchestration"}),F.jsx("span",{children:$==="auto"?"on":"off"})]})]}):null]})}),i?F.jsx(Nn,{title:"VCM Harness",children:F.jsx(mS,{status:u,applyResult:h,busy:g,onRefresh:C,onApply:w})}):null,i?F.jsx(Nn,{title:"New Task",children:F.jsx("div",{className:"task-create",children:F.jsxs("form",{onSubmit:J,children:[F.jsx("input",{value:A,onChange:ne=>L(ne.target.value),placeholder:"task name"}),F.jsxs("label",{className:"task-create-option",children:[F.jsx("input",{type:"checkbox",checked:k,onChange:ne=>O(ne.target.checked)}),F.jsx("span",{children:"Create worktree and branch"})]}),k?F.jsxs("div",{className:"task-create-preview",children:[F.jsxs("small",{children:["branch: ",G?`feature/${G}`:"feature/<task>"]}),F.jsxs("small",{children:["worktree: ",G?`.ai/vcm/worktrees/${G}`:".ai/vcm/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:g||!G,children:"Create"})]})})}):null,l.length>0?F.jsx(Nn,{title:"Tasks",children:F.jsx(bS,{tasks:l,activeTaskSlug:o,onSelect:x})}):null,j?F.jsx(kS,{busy:g,messages:b,orchestration:_,onClose:()=>P(!1),onOpenRole:R,onReject:E,onStage:m}):null,V?F.jsx(ES,{events:a,onClose:()=>q(!1)}):null]})}function xS(i){return i==="system"?"light":i==="light"?"dark":"system"}function Up(i){return i==="system"?"System":i==="light"?"Light":"Dark"}function ES({events:i,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:[i.length," total"]})]}),F.jsx("button",{type:"button",onClick:s,children:"Close"})]}),F.jsx(_S,{events:i,maxEvents:null,showHeader:!1})]})})}function kS({busy:i,messages:s,orchestration:l,onClose:o,onOpenRole:S,onReject:b,onStage:_}){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(gS,{busy:i,maxMessages:null,messages:s,orchestration:l,showControls:!1,showHeader:!1,onOpenRole:S,onReject:b,onStage:_})]})})}function Nn({children:i,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(b=>!b),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:i}):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(i=>i.name);ua.filter(i=>i.dispatchable).map(i=>i.name);function O_(i,s){return i.find(l=>l.role===s)}function AS({activeRole:i,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===i?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":o.name===i,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 TS(){return Ip||(Ip=1,(function(i,s){(function(l,o){i.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 b=this._terminal._core;this._terminal.rows===S.rows&&this._terminal.cols===S.cols||(b._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,b=S._renderService.dimensions;if(b.css.cell.width===0||b.css.cell.height===0)return;const _=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"))),g=window.getComputedStyle(this._terminal.element),c=u-(parseInt(g.getPropertyValue("padding-top"))+parseInt(g.getPropertyValue("padding-bottom"))),C=h-(parseInt(g.getPropertyValue("padding-right"))+parseInt(g.getPropertyValue("padding-left")))-_;return{cols:Math.max(2,Math.floor(C/b.css.cell.width)),rows:Math.max(1,Math.floor(c/b.css.cell.height))}}}})(),l})()))})(Bu)),Bu.exports}var DS=TS(),zu={exports:{}},Pp;function RS(){return Pp||(Pp=1,(function(i,s){(function(l,o){i.exports=o()})(self,(()=>(()=>{var l={6:(_,a)=>{function u(g){try{const c=new URL(g),C=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 g.toLocaleLowerCase().startsWith(C.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(g,c,C,w={}){this._terminal=g,this._regex=c,this._handler=C,this._options=w}provideLinks(g,c){const C=h.computeLink(g,this._regex,this._terminal,this._handler);c(this._addCallbacks(C))}_addCallbacks(g){return g.map((c=>(c.leave=this._options.leave,c.hover=(C,w)=>{if(this._options.hover){const{range:T}=c;this._options.hover(C,w,T)}},c)))}};class h{static computeLink(c,C,w,T){const x=new RegExp(C.source,(C.flags||"")+"g"),[v,p]=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,p,0,m.index),[k,O]=h._mapStrIdx(w,A,L,R.length);if(A===-1||L===-1||k===-1||O===-1)continue;const j={start:{x:L+1,y:A+1},end:{x:O,y:k+1}};E.push({range:j,text:R,activate:T})}return E}static _getWindowedLineStrings(c,C){let w,T=c,x=c,v=0,p="";const d=[];if(w=C.buffer.active.getLine(c)){const m=w.translateToString(!0);if(w.isWrapped&&m[0]!==" "){for(v=0;(w=C.buffer.active.getLine(--T))&&v<2048&&(p=w.translateToString(!0),v+=p.length,d.push(p),w.isWrapped&&p.indexOf(" ")===-1););d.reverse()}for(d.push(m),v=0;(w=C.buffer.active.getLine(++x))&&w.isWrapped&&v<2048&&(p=w.translateToString(!0),v+=p.length,d.push(p),p.indexOf(" ")===-1););}return[d,T]}static _mapStrIdx(c,C,w,T){const x=c.buffer.active,v=x.getNullCell();let p=w;for(;T;){const d=x.getLine(C);if(!d)return[-1,-1];for(let m=p;m<d.length;++m){d.getCell(m,v);const E=v.getChars();if(v.getWidth()&&(T-=E.length||1,m===d.length-1&&E==="")){const R=x.getLine(C+1);R&&R.isWrapped&&(R.getCell(0,v),v.getWidth()===2&&(T+=1))}if(T<0)return[C,m]}C++,p=0}return[C,p]}}a.LinkComputer=h}},o={};function S(_){var a=o[_];if(a!==void 0)return a.exports;var u=o[_]={exports:{}};return l[_](u,u.exports,S),u.exports}var b={};return(()=>{var _=b;Object.defineProperty(_,"__esModule",{value:!0}),_.WebLinksAddon=void 0;const a=S(6),u=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(g,c){const C=window.open();if(C){try{C.opener=null}catch{}C.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}_.WebLinksAddon=class{constructor(g=h,c={}){this._handler=g,this._options=c}activate(g){this._terminal=g;const c=this._options,C=c.urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,C,this._handler,c))}dispose(){var g;(g=this._linkProvider)==null||g.dispose()}}})(),b})()))})(zu)),zu.exports}var LS=RS(),Hu={exports:{}},Fp;function MS(){return Fp||(Fp=1,(function(i,s){(function(l,o){i.exports=o()})(globalThis,(()=>(()=>{var l={4567:function(_,a,u){var h=this&&this.__decorate||function(d,m,E,R){var A,L=arguments.length,k=L<3?m:R===null?R=Object.getOwnPropertyDescriptor(m,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(d,m,E,R);else for(var O=d.length-1;O>=0;O--)(A=d[O])&&(k=(L<3?A(k):L>3?A(m,E,k):A(m,E))||k);return L>3&&k&&Object.defineProperty(m,E,k),k},g=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),C=u(9924),w=u(844),T=u(4725),x=u(2585),v=u(3656);let p=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 C.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),k=[],O=(L==null?void 0:L.translateToString(!0,void 0,void 0,k))||"",j=(E.ydisp+A+1).toString(),P=this._rowElements[A];P&&(O.length===0?(P.innerText=" ",this._rowColumns.set(P,[0,1])):(P.textContent=O,this._rowColumns.set(P,k)),P.setAttribute("aria-posinset",j),P.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 k=this._createAccessibilityTreeNode();this._rowElements.unshift(k),this._rowContainer.insertAdjacentElement("afterbegin",k)}else{const k=this._createAccessibilityTreeNode();this._rowElements.push(k),this._rowContainer.appendChild(k)}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 O;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:((O=R.textContent)==null?void 0:O.length)??0}),!this._rowContainer.contains(E.node))return;const A=({node:j,offset:P})=>{const V=j instanceof Text?j.parentNode:j;let q=parseInt(V==null?void 0:V.getAttribute("aria-posinset"),10)-1;if(isNaN(q))return console.warn("row is invalid. Race condition?"),null;const Y=this._rowColumns.get(V);if(!Y)return console.warn("columns is null. Race condition?"),null;let $=P<Y.length?Y[P]:Y.slice(-1)[0]+1;return $>=this._terminal.cols&&(++q,$=0),{row:q,column:$}},L=A(m),k=A(E);if(L&&k){if(L.row>k.row||L.row===k.row&&L.column>=k.column)throw new Error("invalid range");this._terminal.select(L.column,L.row,(k.row-L.row)*this._terminal.cols-L.column+k.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=p=h([g(1,x.IInstantiationService),g(2,T.ICoreBrowserService),g(3,T.IRenderService)],p)},3614:(_,a)=>{function u(C){return C.replace(/\r?\n/g,"\r")}function h(C,w){return w?"\x1B[200~"+C+"\x1B[201~":C}function g(C,w,T,x){C=h(C=u(C),T.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),T.triggerDataEvent(C,!0),w.value=""}function c(C,w,T){const x=T.getBoundingClientRect(),v=C.clientX-x.left-10,p=C.clientY-x.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${v}px`,w.style.top=`${p}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(C,w){C.clipboardData&&C.clipboardData.setData("text/plain",w.selectionText),C.preventDefault()},a.handlePasteEvent=function(C,w,T,x){C.stopPropagation(),C.clipboardData&&g(C.clipboardData.getData("text/plain"),w,T,x)},a.paste=g,a.moveTextAreaUnderMouseCursor=c,a.rightClickHandler=function(C,w,T,x,v){c(C,w,T),v&&x.rightClickSelect(C),w.value=x.selectionText,w.select()}},7239:(_,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(g,c,C){this._css.set(g,c,C)}getCss(g,c){return this._css.get(g,c)}setColor(g,c,C){this._color.set(g,c,C)}getColor(g,c){return this._color.get(g,c)}clear(){this._color.clear(),this._css.clear()}}},3656:(_,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,h,g,c){u.addEventListener(h,g,c);let C=!1;return{dispose:()=>{C||(C=!0,u.removeEventListener(h,g,c))}}}},3551:function(_,a,u){var h=this&&this.__decorate||function(p,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(p,d,m,E);else for(var k=p.length-1;k>=0;k--)(R=p[k])&&(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},g=this&&this.__param||function(p,d){return function(m,E){d(m,E,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const c=u(3656),C=u(8460),w=u(844),T=u(2585),x=u(4725);let v=a.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(p,d,m,E,R){super(),this._element=p,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 C.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new C.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(p){this._lastMouseEvent=p;const d=this._positionFromMouseEvent(p,this._element,this._mouseService);if(!d)return;this._isMouseOut=!1;const m=p.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(p){if(this._activeLine!==p.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(p,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,p)||(this._clearCurrentLink(),this._askForLink(p,!0))}_askForLink(p,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=p.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,p,m)):L.provideLinks(p.y,(k=>{var j,P;if(this._isMouseOut)return;const O=k==null?void 0:k.map((V=>({link:V})));(j=this._activeProviderReplies)==null||j.set(A,O),m=this._checkLinkProviderResult(A,p,m),((P=this._activeProviderReplies)==null?void 0:P.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(p.y,this._activeProviderReplies)}))}_removeIntersectingLinks(p,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],k=L.link.range.start.y<p?0:L.link.range.start.x,O=L.link.range.end.y>p?this._bufferService.cols:L.link.range.end.x;for(let j=k;j<=O;j++){if(m.has(j)){R.splice(A--,1);break}m.add(j)}}}}_checkLinkProviderResult(p,d,m){var A;if(!this._activeProviderReplies)return m;const E=this._activeProviderReplies.get(p);let R=!1;for(let L=0;L<p;L++)this._activeProviderReplies.has(L)&&!this._activeProviderReplies.get(L)||(R=!0);if(!R&&E){const L=E.find((k=>this._linkAtPosition(k.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 k=(A=this._activeProviderReplies.get(L))==null?void 0:A.find((O=>this._linkAtPosition(O.link,d)));if(k){m=!0,this._handleNewLink(k);break}}return m}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(p){if(!this._currentLink)return;const d=this._positionFromMouseEvent(p,this._element,this._mouseService);d&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,d)&&this._currentLink.link.activate(p,this._currentLink.link.text)}_clearCurrentLink(p,d){this._currentLink&&this._lastMouseEvent&&(!p||!d||this._currentLink.link.range.start.y>=p&&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(p){if(!this._lastMouseEvent)return;const d=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);d&&this._linkAtPosition(p.link,d)&&(this._currentLink=p,this._currentLink.state={decorations:{underline:p.link.decorations===void 0||p.link.decorations.underline,pointerCursor:p.link.decorations===void 0||p.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,p.link,this._lastMouseEvent),p.link.decorations={},Object.defineProperties(p.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(p.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(p,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&&p.classList.add("xterm-cursor-pointer")),d.hover&&d.hover(m,d.text)}_fireUnderlineEvent(p,d){const m=p.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(p,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&&p.classList.remove("xterm-cursor-pointer")),d.leave&&d.leave(m,d.text)}_linkAtPosition(p,d){const m=p.range.start.y*this._bufferService.cols+p.range.start.x,E=p.range.end.y*this._bufferService.cols+p.range.end.x,R=d.y*this._bufferService.cols+d.x;return m<=R&&R<=E}_positionFromMouseEvent(p,d,m){const E=m.getCoords(p,d,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(p,d,m,E,R){return{x1:p,y1:d,x2:m,y2:E,cols:this._bufferService.cols,fg:R}}};a.Linkifier=v=h([g(1,x.IMouseService),g(2,x.IRenderService),g(3,T.IBufferService),g(4,x.ILinkProviderService)],v)},9042:(_,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(_,a,u){var h=this&&this.__decorate||function(x,v,p,d){var m,E=arguments.length,R=E<3?v:d===null?d=Object.getOwnPropertyDescriptor(v,p):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,v,p,d);else for(var A=x.length-1;A>=0;A--)(m=x[A])&&(R=(E<3?m(R):E>3?m(v,p,R):m(v,p))||R);return E>3&&R&&Object.defineProperty(v,p,R),R},g=this&&this.__param||function(x,v){return function(p,d){v(p,d,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const c=u(511),C=u(2585);let w=a.OscLinkProvider=class{constructor(x,v,p){this._bufferService=x,this._optionsService=v,this._oscLinkService=p}provideLinks(x,v){var O;const p=this._bufferService.buffer.lines.get(x-1);if(!p)return void v(void 0);const d=[],m=this._optionsService.rawOptions.linkHandler,E=new c.CellData,R=p.getTrimmedLength();let A=-1,L=-1,k=!1;for(let j=0;j<R;j++)if(L!==-1||p.hasContent(j)){if(p.loadCell(j,E),E.hasExtendedAttrs()&&E.extended.urlId){if(L===-1){L=j,A=E.extended.urlId;continue}k=E.extended.urlId!==A}else L!==-1&&(k=!0);if(k||L!==-1&&j===R-1){const P=(O=this._oscLinkService.getLinkData(A))==null?void 0:O.uri;if(P){const V={start:{x:L+1,y:x},end:{x:j+(k||j!==R-1?0:1),y:x}};let q=!1;if(!(m!=null&&m.allowNonHttpProtocols))try{const Y=new URL(P);["http:","https:"].includes(Y.protocol)||(q=!0)}catch{q=!0}q||d.push({text:P,range:V,activate:(Y,$)=>m?m.activate(Y,$,V):T(0,$),hover:(Y,$)=>{var G;return(G=m==null?void 0:m.hover)==null?void 0:G.call(m,Y,$,V)},leave:(Y,$)=>{var G;return(G=m==null?void 0:m.leave)==null?void 0:G.call(m,Y,$,V)}})}k=!1,E.hasExtendedAttrs()&&E.extended.urlId?(L=j,A=E.extended.urlId):(L=-1,A=-1)}}v(d)}};function T(x,v){if(confirm(`Do you want to navigate to ${v}?
|
|
52
|
+
|
|
53
|
+
WARNING: This link could potentially be dangerous`)){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=w=h([g(0,C.IBufferService),g(1,C.IOptionsService),g(2,C.IOscLinkService)],w)},6193:(_,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,g){this._rowCount=g,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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const h=u(3614),g=u(3656),c=u(3551),C=u(9042),w=u(3730),T=u(1680),x=u(3107),v=u(5744),p=u(2950),d=u(1296),m=u(428),E=u(4269),R=u(5114),A=u(8934),L=u(3230),k=u(9312),O=u(4725),j=u(6731),P=u(8055),V=u(8969),q=u(8460),Y=u(844),$=u(6114),G=u(8437),J=u(2584),ne=u(7399),z=u(5941),M=u(9074),B=u(2585),I=u(5435),H=u(4567),ie=u(779);class he 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=$,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Y.MutableDisposable),this._onCursorMove=this.register(new q.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new q.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new q.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new q.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new q.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new q.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new q.EventEmitter),this._onBlur=this.register(new q.EventEmitter),this._onA11yCharEmitter=this.register(new q.EventEmitter),this._onA11yTabEmitter=this.register(new q.EventEmitter),this._onWillOpen=this.register(new q.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(O.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((N,re)=>this.refresh(N,re)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((N=>this._reportWindowsOptions(N)))),this.register(this._inputHandler.onColor((N=>this._handleColorEvent(N)))),this.register((0,q.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,q.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((N=>this._afterResize(N.cols,N.rows)))),this.register((0,Y.toDisposable)((()=>{var N,re;this._customKeyEventHandler=void 0,(re=(N=this.element)==null?void 0:N.parentNode)==null||re.removeChild(this.element)})))}_handleColorEvent(X){if(this._themeService)for(const N of X){let re,Q="";switch(N.index){case 256:re="foreground",Q="10";break;case 257:re="background",Q="11";break;case 258:re="cursor",Q="12";break;default:re="ansi",Q="4;"+N.index}switch(N.type){case 0:const de=P.color.toColorRGB(re==="ansi"?this._themeService.colors.ansi[N.index]:this._themeService.colors[re]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${Q};${(0,z.toRgbString)(de)}${J.C1_ESCAPED.ST}`);break;case 1:if(re==="ansi")this._themeService.modifyColors((pe=>pe.ansi[N.index]=P.channels.toColor(...N.color)));else{const pe=re;this._themeService.modifyColors((ke=>ke[pe]=P.channels.toColor(...N.color)))}break;case 2:this._themeService.restoreColor(N.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(H.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(X){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.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(J.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,N=this.buffer.lines.get(X);if(!N)return;const re=Math.min(this.buffer.x,this.cols-1),Q=this._renderService.dimensions.css.cell.height,de=N.getWidth(re),pe=this._renderService.dimensions.css.cell.width*de,ke=this.buffer.y*this._renderService.dimensions.css.cell.height,xe=re*this._renderService.dimensions.css.cell.width;this.textarea.style.left=xe+"px",this.textarea.style.top=ke+"px",this.textarea.style.width=pe+"px",this.textarea.style.height=Q+"px",this.textarea.style.lineHeight=Q+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,g.addDisposableDomListener)(this.element,"copy",(N=>{this.hasSelection()&&(0,h.copyHandler)(N,this._selectionService)})));const X=N=>(0,h.handlePasteEvent)(N,this.textarea,this.coreService,this.optionsService);this.register((0,g.addDisposableDomListener)(this.textarea,"paste",X)),this.register((0,g.addDisposableDomListener)(this.element,"paste",X)),$.isFirefox?this.register((0,g.addDisposableDomListener)(this.element,"mousedown",(N=>{N.button===2&&(0,h.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,g.addDisposableDomListener)(this.element,"contextmenu",(N=>{(0,h.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),$.isLinux&&this.register((0,g.addDisposableDomListener)(this.element,"auxclick",(N=>{N.button===1&&(0,h.moveTextAreaUnderMouseCursor)(N,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,g.addDisposableDomListener)(this.textarea,"keyup",(X=>this._keyUp(X)),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keydown",(X=>this._keyDown(X)),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keypress",(X=>this._keyPress(X)),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionupdate",(X=>this._compositionHelper.compositionupdate(X)))),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,g.addDisposableDomListener)(this.textarea,"input",(X=>this._inputEvent(X)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(X){var re;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"),((re=this.element)==null?void 0:re.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 N=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),N.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,g.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),N.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",C.promptLabel),$.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(O.ICoreBrowserService,this._coreBrowserService),this.register((0,g.addDisposableDomListener)(this.textarea,"focus",(Q=>this._handleTextAreaFocus(Q)))),this.register((0,g.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(O.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(j.ThemeService),this._instantiationService.setService(O.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(O.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(L.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(O.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(p.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(O.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(c.Linkifier,this.screenElement)),this.element.appendChild(N);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(T.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(k.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(O.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,g.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,g.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(H.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,N=this.element;function re(pe){const ke=X._mouseService.getMouseReportCoords(pe,X.screenElement);if(!ke)return!1;let xe,Ge;switch(pe.overrideType||pe.type){case"mousemove":Ge=32,pe.buttons===void 0?(xe=3,pe.button!==void 0&&(xe=pe.button<3?pe.button:3)):xe=1&pe.buttons?0:4&pe.buttons?1:2&pe.buttons?2:3;break;case"mouseup":Ge=0,xe=pe.button<3?pe.button:3;break;case"mousedown":Ge=1,xe=pe.button<3?pe.button:3;break;case"wheel":if(X._customWheelEventHandler&&X._customWheelEventHandler(pe)===!1||X.viewport.getLinesScrolled(pe)===0)return!1;Ge=pe.deltaY<0?0:1,xe=4;break;default:return!1}return!(Ge===void 0||xe===void 0||xe>4)&&X.coreMouseService.triggerMouseEvent({col:ke.col,row:ke.row,x:ke.x,y:ke.y,button:xe,action:Ge,ctrl:pe.ctrlKey,alt:pe.altKey,shift:pe.shiftKey})}const Q={mouseup:null,wheel:null,mousedrag:null,mousemove:null},de={mouseup:pe=>(re(pe),pe.buttons||(this._document.removeEventListener("mouseup",Q.mouseup),Q.mousedrag&&this._document.removeEventListener("mousemove",Q.mousedrag)),this.cancel(pe)),wheel:pe=>(re(pe),this.cancel(pe,!0)),mousedrag:pe=>{pe.buttons&&re(pe)},mousemove:pe=>{pe.buttons||re(pe)}};this.register(this.coreMouseService.onProtocolChange((pe=>{pe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(pe)),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&pe?Q.mousemove||(N.addEventListener("mousemove",de.mousemove),Q.mousemove=de.mousemove):(N.removeEventListener("mousemove",Q.mousemove),Q.mousemove=null),16&pe?Q.wheel||(N.addEventListener("wheel",de.wheel,{passive:!1}),Q.wheel=de.wheel):(N.removeEventListener("wheel",Q.wheel),Q.wheel=null),2&pe?Q.mouseup||(Q.mouseup=de.mouseup):(this._document.removeEventListener("mouseup",Q.mouseup),Q.mouseup=null),4&pe?Q.mousedrag||(Q.mousedrag=de.mousedrag):(this._document.removeEventListener("mousemove",Q.mousedrag),Q.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,g.addDisposableDomListener)(N,"mousedown",(pe=>{if(pe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(pe))return re(pe),Q.mouseup&&this._document.addEventListener("mouseup",Q.mouseup),Q.mousedrag&&this._document.addEventListener("mousemove",Q.mousedrag),this.cancel(pe)}))),this.register((0,g.addDisposableDomListener)(N,"wheel",(pe=>{if(!Q.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(pe)===!1)return!1;if(!this.buffer.hasScrollback){const ke=this.viewport.getLinesScrolled(pe);if(ke===0)return;const xe=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(pe.deltaY<0?"A":"B");let Ge="";for(let at=0;at<Math.abs(ke);at++)Ge+=xe;return this.coreService.triggerDataEvent(Ge,!0),this.cancel(pe,!0)}return this.viewport.handleWheel(pe)?this.cancel(pe):void 0}}),{passive:!1})),this.register((0,g.addDisposableDomListener)(N,"touchstart",(pe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(pe),this.cancel(pe)}),{passive:!0})),this.register((0,g.addDisposableDomListener)(N,"touchmove",(pe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(pe)?void 0:this.cancel(pe)}),{passive:!1}))}refresh(X,N){var re;(re=this._renderService)==null||re.refreshRows(X,N)}updateCursorStyle(X){var N;(N=this._selectionService)!=null&&N.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,N,re=0){var Q;re===1?(super.scrollLines(X,N,re),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 N=this._characterJoinerService.register(X);return this.refresh(0,this.rows-1),N}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,N,re){this._selectionService.setSelection(X,N,re)}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,N){var re;(re=this._selectionService)==null||re.selectLines(X,N)}_keyDown(X){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;const N=this.browser.isMac&&this.options.macOptionIsMeta&&X.altKey;if(!N&&!this._compositionHelper.keydown(X))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;N||X.key!=="Dead"&&X.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const re=(0,ne.evaluateKeyboardEvent)(X,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(X),re.type===3||re.type===2){const Q=this.rows-1;return this.scrollLines(re.type===2?-Q:Q),this.cancel(X,!0)}return re.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,X)||(re.cancel&&this.cancel(X,!0),!re.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):(re.key!==J.C0.ETX&&re.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:re.key,domEvent:X}),this._showCursor(),this.coreService.triggerDataEvent(re.key,!0),!this.optionsService.rawOptions.screenReaderMode||X.altKey||X.ctrlKey?this.cancel(X,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(X,N){const re=X.isMac&&!this.options.macOptionIsMeta&&N.altKey&&!N.ctrlKey&&!N.metaKey||X.isWindows&&N.altKey&&N.ctrlKey&&!N.metaKey||X.isWindows&&N.getModifierState("AltGraph");return N.type==="keypress"?re:re&&(!N.keyCode||N.keyCode>47)}_keyUp(X){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1||((function(N){return N.keyCode===16||N.keyCode===17||N.keyCode===18})(X)||this.focus(),this.updateCursorStyle(X),this._keyPressHandled=!1)}_keyPress(X){let N;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;if(this.cancel(X),X.charCode)N=X.charCode;else if(X.which===null||X.which===void 0)N=X.keyCode;else{if(X.which===0||X.charCode===0)return!1;N=X.which}return!(!N||(X.altKey||X.ctrlKey||X.metaKey)&&!this._isThirdLevelShift(this.browser,X)||(N=String.fromCharCode(N),this._onKey.fire({key:N,domEvent:X}),this._showCursor(),this.coreService.triggerDataEvent(N,!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 N=X.data;return this.coreService.triggerDataEvent(N,!0),this.cancel(X),!0}return!1}resize(X,N){X!==this.cols||N!==this.rows?super.resize(X,N):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(X,N){var re,Q;(re=this._charSizeService)==null||re.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 N=1;N<this.rows;N++)this.buffer.lines.push(this.buffer.getBlankLine(G.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 N,re;this.options.rows=this.rows,this.options.cols=this.cols;const X=this._customKeyEventHandler;this._setup(),super.reset(),(N=this._selectionService)==null||N.reset(),this._decorationService.reset(),(re=this.viewport)==null||re.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(J.C0.ESC+"[I"):this.coreService.triggerDataEvent(J.C0.ESC+"[O")}_reportWindowsOptions(X){if(this._renderService)switch(X){case I.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const N=this._renderService.dimensions.css.canvas.width.toFixed(0),re=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[4;${re};${N}t`);break;case I.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const Q=this._renderService.dimensions.css.cell.width.toFixed(0),de=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[6;${de};${Q}t`)}}cancel(X,N){if(this.options.cancelEvents||N)return X.preventDefault(),X.stopPropagation(),!1}}a.Terminal=he},9924:(_,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,g){this._rowCount=g,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 C=c-this._lastRefreshMs,w=this._debounceThresholdMS-C;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(_,a,u){var h=this&&this.__decorate||function(p,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(p,d,m,E);else for(var k=p.length-1;k>=0;k--)(R=p[k])&&(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},g=this&&this.__param||function(p,d){return function(m,E){d(m,E,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const c=u(3656),C=u(4725),w=u(8460),T=u(844),x=u(2585);let v=a.Viewport=class extends T.Disposable{constructor(p,d,m,E,R,A,L,k){super(),this._viewportElement=p,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((O=>this._activeBuffer=O.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((O=>this._renderDimensions=O))),this._handleThemeChange(k.colors),this.register(k.onChangeColors((O=>this._handleThemeChange(O)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(p){this._viewportElement.style.backgroundColor=p.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(p){if(p)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 p=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==p&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=p),this._refreshAnimationFrame=null}syncScrollArea(p=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(p);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(p)}_handleScroll(p){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 p=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(p*(this._smoothScrollState.target-this._smoothScrollState.origin)),p<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(p,d){const m=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(d<0&&this._viewportElement.scrollTop!==0||d>0&&m<this._lastRecordedBufferHeight)||(p.cancelable&&p.preventDefault(),!1)}handleWheel(p){const d=this._getPixelsScrolled(p);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(p,d))}scrollLines(p){if(p!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const d=p*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:p,suppressScrollEvent:!1})}_getPixelsScrolled(p){if(p.deltaY===0||p.shiftKey)return 0;let d=this._applyScrollModifier(p.deltaY,p);return p.deltaMode===WheelEvent.DOM_DELTA_LINE?d*=this._currentRowHeight:p.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(d*=this._currentRowHeight*this._bufferService.rows),d}getBufferElements(p,d){var k;let m,E="";const R=[],A=d??this._bufferService.buffer.lines.length,L=this._bufferService.buffer.lines;for(let O=p;O<A;O++){const j=L.get(O);if(!j)continue;const P=(k=L.get(O+1))==null?void 0:k.isWrapped;if(E+=j.translateToString(!P),!P||O===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(p){if(p.deltaY===0||p.shiftKey)return 0;let d=this._applyScrollModifier(p.deltaY,p);return p.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):p.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(d*=this._bufferService.rows),d}_applyScrollModifier(p,d){const m=this._optionsService.rawOptions.fastScrollModifier;return m==="alt"&&d.altKey||m==="ctrl"&&d.ctrlKey||m==="shift"&&d.shiftKey?p*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:p*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(p){this._lastTouchY=p.touches[0].pageY}handleTouchMove(p){const d=this._lastTouchY-p.touches[0].pageY;return this._lastTouchY=p.touches[0].pageY,d!==0&&(this._viewportElement.scrollTop+=d,this._bubbleScroll(p,d))}};a.Viewport=v=h([g(2,x.IBufferService),g(3,x.IOptionsService),g(4,C.ICharSizeService),g(5,C.IRenderService),g(6,C.ICoreBrowserService),g(7,C.IThemeService)],v)},3107:function(_,a,u){var h=this&&this.__decorate||function(x,v,p,d){var m,E=arguments.length,R=E<3?v:d===null?d=Object.getOwnPropertyDescriptor(v,p):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,v,p,d);else for(var A=x.length-1;A>=0;A--)(m=x[A])&&(R=(E<3?m(R):E>3?m(v,p,R):m(v,p))||R);return E>3&&R&&Object.defineProperty(v,p,R),R},g=this&&this.__param||function(x,v){return function(p,d){v(p,d,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const c=u(4725),C=u(844),w=u(2585);let T=a.BufferDecorationRenderer=class extends C.Disposable{constructor(x,v,p,d,m){super(),this._screenElement=x,this._bufferService=v,this._coreBrowserService=p,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,C.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 p=x.options.x??0;return p&&p>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 p=this._decorationElements.get(x);p||(p=this._createElement(x),x.element=p,this._decorationElements.set(x,p),this._container.appendChild(p),x.onDispose((()=>{this._decorationElements.delete(x),p.remove()}))),p.style.top=v*this._renderService.dimensions.css.cell.height+"px",p.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(p)}}_refreshXPosition(x,v=x.element){if(!v)return;const p=x.options.x??0;(x.options.anchor||"left")==="right"?v.style.right=p?p*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=p?p*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=T=h([g(1,w.IBufferService),g(2,c.ICoreBrowserService),g(3,w.IDecorationService),g(4,c.IRenderService)],T)},5871:(_,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,g){return h>=u.startBufferLine-this._linePadding[g||"full"]&&h<=u.endBufferLine+this._linePadding[g||"full"]}_addLineToZone(u,h){u.startBufferLine=Math.min(u.startBufferLine,h),u.endBufferLine=Math.max(u.endBufferLine,h)}}},5744:function(_,a,u){var h=this&&this.__decorate||function(m,E,R,A){var L,k=arguments.length,O=k<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,R):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(m,E,R,A);else for(var j=m.length-1;j>=0;j--)(L=m[j])&&(O=(k<3?L(O):k>3?L(E,R,O):L(E,R))||O);return k>3&&O&&Object.defineProperty(E,R,O),O},g=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),C=u(4725),w=u(844),T=u(2585),x={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},p={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,k,O){var P;super(),this._viewportElement=m,this._screenElement=E,this._bufferService=R,this._decorationService=A,this._renderService=L,this._optionsService=k,this._coreBrowserService=O,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(),(P=this._viewportElement.parentElement)==null||P.insertBefore(this._canvas,this._viewportElement);const j=this._canvas.getContext("2d");if(!j)throw new Error("Ctx cannot be null");this._ctx=j,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(),p.full=0,p.left=0,p.center=v.left,p.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(p[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([g(2,T.IBufferService),g(3,T.IDecorationService),g(4,C.IRenderService),g(5,T.IOptionsService),g(6,C.ICoreBrowserService)],d)},2950:function(_,a,u){var h=this&&this.__decorate||function(x,v,p,d){var m,E=arguments.length,R=E<3?v:d===null?d=Object.getOwnPropertyDescriptor(v,p):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(x,v,p,d);else for(var A=x.length-1;A>=0;A--)(m=x[A])&&(R=(E<3?m(R):E>3?m(v,p,R):m(v,p))||R);return E>3&&R&&Object.defineProperty(v,p,R),R},g=this&&this.__param||function(x,v){return function(p,d){v(p,d,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const c=u(4725),C=u(2585),w=u(2584);let T=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,v,p,d,m,E){this._textarea=x,this._compositionView=v,this._bufferService=p,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 p;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,p=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),p.length>0&&this._coreService.triggerDataEvent(p,!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,p=v.replace(x,"");this._dataAlreadySent=p,v.length>x.length?this._coreService.triggerDataEvent(p,!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),p=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=p+"px",this._compositionView.style.lineHeight=p+"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=T=h([g(2,C.IBufferService),g(3,C.IOptionsService),g(4,C.ICoreService),g(5,c.IRenderService)],T)},9806:(_,a)=>{function u(h,g,c){const C=c.getBoundingClientRect(),w=h.getComputedStyle(c),T=parseInt(w.getPropertyValue("padding-left")),x=parseInt(w.getPropertyValue("padding-top"));return[g.clientX-C.left-T,g.clientY-C.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=u,a.getCoords=function(h,g,c,C,w,T,x,v,p){if(!T)return;const d=u(h,g,c);return d?(d[0]=Math.ceil((d[0]+(p?x/2:0))/x),d[1]=Math.ceil(d[1]/v),d[0]=Math.min(Math.max(d[0],1),C+(p?1:0)),d[1]=Math.min(Math.max(d[1],1),w),d):void 0}},9504:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const h=u(2584);function g(v,p,d,m){const E=v-c(v,d),R=p-c(p,d),A=Math.abs(E-R)-(function(L,k,O){let j=0;const P=L-c(L,O),V=k-c(k,O);for(let q=0;q<Math.abs(P-V);q++){const Y=C(L,k)==="A"?-1:1,$=O.buffer.lines.get(P+Y*q);$!=null&&$.isWrapped&&j++}return j})(v,p,d);return x(A,T(C(v,p),m))}function c(v,p){let d=0,m=p.buffer.lines.get(v),E=m==null?void 0:m.isWrapped;for(;E&&v>=0&&v<p.rows;)d++,m=p.buffer.lines.get(--v),E=m==null?void 0:m.isWrapped;return d}function C(v,p){return v>p?"A":"B"}function w(v,p,d,m,E,R){let A=v,L=p,k="";for(;A!==d||L!==m;)A+=E?1:-1,E&&A>R.cols-1?(k+=R.buffer.translateBufferLineToString(L,!1,v,A),A=0,v=0,L++):!E&&A<0&&(k+=R.buffer.translateBufferLineToString(L,!1,0,v+1),A=R.cols-1,v=A,L--);return k+R.buffer.translateBufferLineToString(L,!1,v,A)}function T(v,p){const d=p?"O":"[";return h.C0.ESC+d+v}function x(v,p){v=Math.floor(v);let d="";for(let m=0;m<v;m++)d+=p;return d}a.moveToCellSequence=function(v,p,d,m){const E=d.buffer.x,R=d.buffer.y;if(!d.buffer.hasScrollback)return(function(k,O,j,P,V,q){return g(O,P,V,q).length===0?"":x(w(k,O,k,O-c(O,V),!1,V).length,T("D",q))})(E,R,0,p,d,m)+g(R,p,d,m)+(function(k,O,j,P,V,q){let Y;Y=g(O,P,V,q).length>0?P-c(P,V):O;const $=P,G=(function(J,ne,z,M,B,I){let H;return H=g(z,M,B,I).length>0?M-c(M,B):ne,J<z&&H<=M||J>=z&&H<M?"C":"D"})(k,O,j,P,V,q);return x(w(k,Y,j,$,G==="C",V).length,T(G,q))})(E,R,v,p,d,m);let A;if(R===p)return A=E>v?"D":"C",x(Math.abs(E-v),T(A,m));A=R>p?"D":"C";const L=Math.abs(R-p);return x((function(k,O){return O.cols-k})(R>p?v:E,d)+(L-1)*d.cols+1+((R>p?E:v)-1),T(A,m))}},1296:function(_,a,u){var h=this&&this.__decorate||function(q,Y,$,G){var J,ne=arguments.length,z=ne<3?Y:G===null?G=Object.getOwnPropertyDescriptor(Y,$):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(q,Y,$,G);else for(var M=q.length-1;M>=0;M--)(J=q[M])&&(z=(ne<3?J(z):ne>3?J(Y,$,z):J(Y,$))||z);return ne>3&&z&&Object.defineProperty(Y,$,z),z},g=this&&this.__param||function(q,Y){return function($,G){Y($,G,q)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const c=u(3787),C=u(2550),w=u(2223),T=u(6171),x=u(6052),v=u(4725),p=u(8055),d=u(8460),m=u(844),E=u(2585),R="xterm-dom-renderer-owner-",A="xterm-rows",L="xterm-fg-",k="xterm-bg-",O="xterm-focus",j="xterm-selection";let P=1,V=a.DomRenderer=class extends m.Disposable{constructor(q,Y,$,G,J,ne,z,M,B,I,H,ie,he){super(),this._terminal=q,this._document=Y,this._element=$,this._screenElement=G,this._viewportElement=J,this._helperContainer=ne,this._linkifier2=z,this._charSizeService=B,this._optionsService=I,this._bufferService=H,this._coreBrowserService=ie,this._themeService=he,this._terminalClass=P++,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(j),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,T.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((fe=>this._injectCss(fe)))),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((fe=>this._handleLinkHover(fe)))),this.register(this._linkifier2.onHideLinkUnderline((fe=>this._handleLinkLeave(fe)))),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 C.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 q=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*q,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*q),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/q),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/q),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 $ of this._rowElements)$.style.width=`${this.dimensions.css.canvas.width}px`,$.style.height=`${this.dimensions.css.cell.height}px`,$.style.lineHeight=`${this.dimensions.css.cell.height}px`,$.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Y=`${this._terminalSelector} .${A} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Y,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(q){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Y=`${this._terminalSelector} .${A} { color: ${q.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Y+=`${this._terminalSelector} .${A} .xterm-dim { color: ${p.color.multiplyOpacity(q.foreground,.5).css};}`,Y+=`${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 $=`blink_underline_${this._terminalClass}`,G=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;Y+=`@keyframes ${$} { 50% { border-bottom-style: hidden; }}`,Y+=`@keyframes ${G} { 50% { box-shadow: none; }}`,Y+=`@keyframes ${J} { 0% { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css}; } 50% { background-color: inherit; color: ${q.cursor.css}; }}`,Y+=`${this._terminalSelector} .${A}.${O} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${A}.${O} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${G} 1s step-end infinite;}${this._terminalSelector} .${A}.${O} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css};}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${q.cursor.css} !important; color: ${q.cursorAccent.css} !important;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${q.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${q.cursor.css} inset;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${q.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Y+=`${this._terminalSelector} .${j} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${j} div { position: absolute; background-color: ${q.selectionBackgroundOpaque.css};}${this._terminalSelector} .${j} div { position: absolute; background-color: ${q.selectionInactiveBackgroundOpaque.css};}`;for(const[ne,z]of q.ansi.entries())Y+=`${this._terminalSelector} .${L}${ne} { color: ${z.css}; }${this._terminalSelector} .${L}${ne}.xterm-dim { color: ${p.color.multiplyOpacity(z,.5).css}; }${this._terminalSelector} .${k}${ne} { background-color: ${z.css}; }`;Y+=`${this._terminalSelector} .${L}${w.INVERTED_DEFAULT_COLOR} { color: ${p.color.opaque(q.background).css}; }${this._terminalSelector} .${L}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${p.color.multiplyOpacity(p.color.opaque(q.background),.5).css}; }${this._terminalSelector} .${k}${w.INVERTED_DEFAULT_COLOR} { background-color: ${q.foreground.css}; }`,this._themeStyleElement.textContent=Y}_setDefaultSpacing(){const q=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${q}px`,this._rowFactory.defaultSpacing=q}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(q,Y){for(let $=this._rowElements.length;$<=Y;$++){const G=this._document.createElement("div");this._rowContainer.appendChild(G),this._rowElements.push(G)}for(;this._rowElements.length>Y;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(q,Y){this._refreshRowElements(q,Y),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(O),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(O),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(q,Y,$){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(q,Y,$),this.renderRows(0,this._bufferService.rows-1),!q||!Y)return;this._selectionRenderModel.update(this._terminal,q,Y,$);const G=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,ne=this._selectionRenderModel.viewportCappedStartRow,z=this._selectionRenderModel.viewportCappedEndRow;if(ne>=this._bufferService.rows||z<0)return;const M=this._document.createDocumentFragment();if($){const B=q[0]>Y[0];M.appendChild(this._createSelectionElement(ne,B?Y[0]:q[0],B?q[0]:Y[0],z-ne+1))}else{const B=G===ne?q[0]:0,I=ne===J?Y[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(ne,B,I));const H=z-ne-1;if(M.appendChild(this._createSelectionElement(ne+1,0,this._bufferService.cols,H)),ne!==z){const ie=J===z?Y[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(z,0,ie))}}this._selectionContainer.appendChild(M)}_createSelectionElement(q,Y,$,G=1){const J=this._document.createElement("div"),ne=Y*this.dimensions.css.cell.width;let z=this.dimensions.css.cell.width*($-Y);return ne+z>this.dimensions.css.canvas.width&&(z=this.dimensions.css.canvas.width-ne),J.style.height=G*this.dimensions.css.cell.height+"px",J.style.top=q*this.dimensions.css.cell.height+"px",J.style.left=`${ne}px`,J.style.width=`${z}px`,J}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 q of this._rowElements)q.replaceChildren()}renderRows(q,Y){const $=this._bufferService.buffer,G=$.ybase+$.y,J=Math.min($.x,this._bufferService.cols-1),ne=this._optionsService.rawOptions.cursorBlink,z=this._optionsService.rawOptions.cursorStyle,M=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=q;B<=Y;B++){const I=B+$.ydisp,H=this._rowElements[B],ie=$.lines.get(I);if(!H||!ie)break;H.replaceChildren(...this._rowFactory.createRow(ie,I,I===G,z,M,J,ne,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${R}${this._terminalClass}`}_handleLinkHover(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!0)}_handleLinkLeave(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!1)}_setCellUnderline(q,Y,$,G,J,ne){$<0&&(q=0),G<0&&(Y=0);const z=this._bufferService.rows-1;$=Math.max(Math.min($,z),0),G=Math.max(Math.min(G,z),0),J=Math.min(J,this._bufferService.cols);const M=this._bufferService.buffer,B=M.ybase+M.y,I=Math.min(M.x,J-1),H=this._optionsService.rawOptions.cursorBlink,ie=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let fe=$;fe<=G;++fe){const X=fe+M.ydisp,N=this._rowElements[fe],re=M.lines.get(X);if(!N||!re)break;N.replaceChildren(...this._rowFactory.createRow(re,X,X===B,ie,he,I,H,this.dimensions.css.cell.width,this._widthCache,ne?fe===$?q:0:-1,ne?(fe===G?Y:J)-1:-1))}}};a.DomRenderer=V=h([g(7,E.IInstantiationService),g(8,v.ICharSizeService),g(9,E.IOptionsService),g(10,E.IBufferService),g(11,v.ICoreBrowserService),g(12,v.IThemeService)],V)},3787:function(_,a,u){var h=this&&this.__decorate||function(A,L,k,O){var j,P=arguments.length,V=P<3?L:O===null?O=Object.getOwnPropertyDescriptor(L,k):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(A,L,k,O);else for(var q=A.length-1;q>=0;q--)(j=A[q])&&(V=(P<3?j(V):P>3?j(L,k,V):j(L,k))||V);return P>3&&V&&Object.defineProperty(L,k,V),V},g=this&&this.__param||function(A,L){return function(k,O){L(k,O,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const c=u(2223),C=u(643),w=u(511),T=u(2585),x=u(8055),v=u(4725),p=u(4269),d=u(6171),m=u(3734);let E=a.DomRendererRowFactory=class{constructor(A,L,k,O,j,P,V){this._document=A,this._characterJoinerService=L,this._optionsService=k,this._coreBrowserService=O,this._coreService=j,this._decorationService=P,this._themeService=V,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(A,L,k){this._selectionStart=A,this._selectionEnd=L,this._columnSelectMode=k}createRow(A,L,k,O,j,P,V,q,Y,$,G){const J=[],ne=this._characterJoinerService.getJoinedCharacters(L),z=this._themeService.colors;let M,B=A.getNoBgTrimmedLength();k&&B<P+1&&(B=P+1);let I=0,H="",ie=0,he=0,fe=0,X=!1,N=0,re=!1,Q=0;const de=[],pe=$!==-1&&G!==-1;for(let ke=0;ke<B;ke++){A.loadCell(ke,this._workCell);let xe=this._workCell.getWidth();if(xe===0)continue;let Ge=!1,at=ke,Ee=this._workCell;if(ne.length>0&&ke===ne[0][0]){Ge=!0;const Pe=ne.shift();Ee=new p.JoinedCellData(this._workCell,A.translateToString(!0,Pe[0],Pe[1]),Pe[1]-Pe[0]),at=Pe[1]-1,xe=Ee.getWidth()}const _i=this._isCellInSelection(ke,L),mi=k&&ke===P,gi=pe&&ke>=$&&ke<=G;let xi=!1;this._decorationService.forEachDecorationAtCell(ke,L,void 0,(Pe=>{xi=!0}));let Vi=Ee.getChars()||C.WHITESPACE_CELL_CHAR;if(Vi===" "&&(Ee.isUnderline()||Ee.isOverline())&&(Vi=" "),Q=xe*q-Y.get(Vi,Ee.isBold(),Ee.isItalic()),M){if(I&&(_i&&re||!_i&&!re&&Ee.bg===ie)&&(_i&&re&&z.selectionForeground||Ee.fg===he)&&Ee.extended.ext===fe&&gi===X&&Q===N&&!mi&&!Ge&&!xi){Ee.isInvisible()?H+=C.WHITESPACE_CELL_CHAR:H+=Vi,I++;continue}I&&(M.textContent=H),M=this._document.createElement("span"),I=0,H=""}else M=this._document.createElement("span");if(ie=Ee.bg,he=Ee.fg,fe=Ee.extended.ext,X=gi,N=Q,re=_i,Ge&&P>=ke&&P<=at&&(P=ke),!this._coreService.isCursorHidden&&mi&&this._coreService.isCursorInitialized){if(de.push("xterm-cursor"),this._coreBrowserService.isFocused)V&&de.push("xterm-cursor-blink"),de.push(O==="bar"?"xterm-cursor-bar":O==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(j)switch(j){case"outline":de.push("xterm-cursor-outline");break;case"block":de.push("xterm-cursor-block");break;case"bar":de.push("xterm-cursor-bar");break;case"underline":de.push("xterm-cursor-underline")}}if(Ee.isBold()&&de.push("xterm-bold"),Ee.isItalic()&&de.push("xterm-italic"),Ee.isDim()&&de.push("xterm-dim"),H=Ee.isInvisible()?C.WHITESPACE_CELL_CHAR:Ee.getChars()||C.WHITESPACE_CELL_CHAR,Ee.isUnderline()&&(de.push(`xterm-underline-${Ee.extended.underlineStyle}`),H===" "&&(H=" "),!Ee.isUnderlineColorDefault()))if(Ee.isUnderlineColorRGB())M.style.textDecorationColor=`rgb(${m.AttributeData.toColorRGB(Ee.getUnderlineColor()).join(",")})`;else{let Pe=Ee.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ee.isBold()&&Pe<8&&(Pe+=8),M.style.textDecorationColor=z.ansi[Pe].css}Ee.isOverline()&&(de.push("xterm-overline"),H===" "&&(H=" ")),Ee.isStrikethrough()&&de.push("xterm-strikethrough"),gi&&(M.style.textDecoration="underline");let At=Ee.getFgColor(),ot=Ee.getFgColorMode(),Ot=Ee.getBgColor(),ae=Ee.getBgColorMode();const me=!!Ee.isInverse();if(me){const Pe=At;At=Ot,Ot=Pe;const bt=ot;ot=ae,ae=bt}let ye,Te,Me,mt=!1;switch(this._decorationService.forEachDecorationAtCell(ke,L,void 0,(Pe=>{Pe.options.layer!=="top"&&mt||(Pe.backgroundColorRGB&&(ae=50331648,Ot=Pe.backgroundColorRGB.rgba>>8&16777215,ye=Pe.backgroundColorRGB),Pe.foregroundColorRGB&&(ot=50331648,At=Pe.foregroundColorRGB.rgba>>8&16777215,Te=Pe.foregroundColorRGB),mt=Pe.options.layer==="top")})),!mt&&_i&&(ye=this._coreBrowserService.isFocused?z.selectionBackgroundOpaque:z.selectionInactiveBackgroundOpaque,Ot=ye.rgba>>8&16777215,ae=50331648,mt=!0,z.selectionForeground&&(ot=50331648,At=z.selectionForeground.rgba>>8&16777215,Te=z.selectionForeground)),mt&&de.push("xterm-decoration-top"),ae){case 16777216:case 33554432:Me=z.ansi[Ot],de.push(`xterm-bg-${Ot}`);break;case 50331648:Me=x.channels.toColor(Ot>>16,Ot>>8&255,255&Ot),this._addStyle(M,`background-color:#${R((Ot>>>0).toString(16),"0",6)}`);break;default:me?(Me=z.foreground,de.push(`xterm-bg-${c.INVERTED_DEFAULT_COLOR}`)):Me=z.background}switch(ye||Ee.isDim()&&(ye=x.color.multiplyOpacity(Me,.5)),ot){case 16777216:case 33554432:Ee.isBold()&&At<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(At+=8),this._applyMinimumContrast(M,Me,z.ansi[At],Ee,ye,void 0)||de.push(`xterm-fg-${At}`);break;case 50331648:const Pe=x.channels.toColor(At>>16&255,At>>8&255,255&At);this._applyMinimumContrast(M,Me,Pe,Ee,ye,Te)||this._addStyle(M,`color:#${R(At.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(M,Me,z.foreground,Ee,ye,Te)||me&&de.push(`xterm-fg-${c.INVERTED_DEFAULT_COLOR}`)}de.length&&(M.className=de.join(" "),de.length=0),mi||Ge||xi?M.textContent=H:I++,Q!==this.defaultSpacing&&(M.style.letterSpacing=`${Q}px`),J.push(M),ke=at}return M&&I&&(M.textContent=H),J}_applyMinimumContrast(A,L,k,O,j,P){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,d.treatGlyphAsBackgroundColor)(O.getCode()))return!1;const V=this._getContrastCache(O);let q;if(j||P||(q=V.getColor(L.rgba,k.rgba)),q===void 0){const Y=this._optionsService.rawOptions.minimumContrastRatio/(O.isDim()?2:1);q=x.color.ensureContrastRatio(j||L,P||k,Y),V.setColor((j||L).rgba,(P||k).rgba,q??null)}return!!q&&(this._addStyle(A,`color:${q.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 k=this._selectionStart,O=this._selectionEnd;return!(!k||!O)&&(this._columnSelectMode?k[0]<=O[0]?A>=k[0]&&L>=k[1]&&A<O[0]&&L<=O[1]:A<k[0]&&L>=k[1]&&A>=O[0]&&L<=O[1]:L>k[1]&&L<O[1]||k[1]===O[1]&&L===k[1]&&A>=k[0]&&A<O[0]||k[1]<O[1]&&L===O[1]&&A<O[0]||k[1]<O[1]&&L===k[1]&&A>=k[0])}};function R(A,L,k){for(;A.length<k;)A=L+A;return A}a.DomRendererRowFactory=E=h([g(1,v.ICharacterJoinerService),g(2,T.IOptionsService),g(3,v.ICoreBrowserService),g(4,T.ICoreService),g(5,T.IDecorationService),g(6,v.IThemeService)],E)},2550:(_,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 g=u.createElement("span");g.classList.add("xterm-char-measure-element");const c=u.createElement("span");c.classList.add("xterm-char-measure-element"),c.style.fontWeight="bold";const C=u.createElement("span");C.classList.add("xterm-char-measure-element"),C.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=[g,c,C,w],this._container.appendChild(g),this._container.appendChild(c),this._container.appendChild(C),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,g,c){u===this._font&&h===this._fontSize&&g===this._weight&&c===this._weightBold||(this._font=u,this._fontSize=h,this._weight=g,this._weightBold=c,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${g}`,this._measureElements[1].style.fontWeight=`${c}`,this._measureElements[2].style.fontWeight=`${g}`,this._measureElements[3].style.fontWeight=`${c}`,this.clear())}get(u,h,g){let c=0;if(!h&&!g&&u.length===1&&(c=u.charCodeAt(0))<256){if(this._flat[c]!==-9999)return this._flat[c];const T=this._measure(u,0);return T>0&&(this._flat[c]=T),T}let C=u;h&&(C+="B"),g&&(C+="I");let w=this._holey.get(C);if(w===void 0){let T=0;h&&(T|=1),g&&(T|=2),w=this._measure(u,T),w>0&&this._holey.set(C,w)}return w}_measure(u,h){const g=this._measureElements[h];return g.textContent=u.repeat(32),g.offsetWidth/32}}},2223:(_,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:(_,a)=>{function u(g){return 57508<=g&&g<=57558}function h(g){return g>=128512&&g<=128591||g>=127744&&g<=128511||g>=128640&&g<=128767||g>=9728&&g<=9983||g>=9984&&g<=10175||g>=65024&&g<=65039||g>=129280&&g<=129535||g>=127462&&g<=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(g){if(!g)throw new Error("value must not be falsy");return g},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(g){return 57520<=g&&g<=57527},a.isEmoji=h,a.allowRescaling=function(g,c,C,w){return c===1&&C>Math.ceil(1.5*w)&&g!==void 0&&g>255&&!h(g)&&!u(g)&&!(function(T){return 57344<=T&&T<=63743})(g)},a.treatGlyphAsBackgroundColor=function(g){return u(g)||(function(c){return 9472<=c&&c<=9631})(g)},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(g,c,C=0){return(g-(2*Math.round(c)-C))%(2*Math.round(c))}},6052:(_,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(g,c,C,w=!1){if(this.selectionStart=c,this.selectionEnd=C,!c||!C||c[0]===C[0]&&c[1]===C[1])return void this.clear();const T=g.buffers.active.ydisp,x=c[1]-T,v=C[1]-T,p=Math.max(x,0),d=Math.min(v,g.rows-1);p>=g.rows||d<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=x,this.viewportEndRow=v,this.viewportCappedStartRow=p,this.viewportCappedEndRow=d,this.startCol=c[0],this.endCol=C[0])}isCellSelected(g,c,C){return!!this.hasSelection&&(C-=g.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?c>=this.startCol&&C>=this.viewportCappedStartRow&&c<this.endCol&&C<=this.viewportCappedEndRow:c<this.startCol&&C>=this.viewportCappedStartRow&&c>=this.endCol&&C<=this.viewportCappedEndRow:C>this.viewportStartRow&&C<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&C===this.viewportStartRow&&c>=this.startCol&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&C===this.viewportEndRow&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&C===this.viewportStartRow&&c>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},456:(_,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(_,a,u){var h=this&&this.__decorate||function(d,m,E,R){var A,L=arguments.length,k=L<3?m:R===null?R=Object.getOwnPropertyDescriptor(m,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(d,m,E,R);else for(var O=d.length-1;O>=0;O--)(A=d[O])&&(k=(L<3?A(k):L>3?A(m,E,k):A(m,E))||k);return L>3&&k&&Object.defineProperty(m,E,k),k},g=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),C=u(8460),w=u(844);let T=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 C.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new p(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=T=h([g(2,c.IOptionsService)],T);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 p 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(_,a,u){var h=this&&this.__decorate||function(p,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(p,d,m,E);else for(var k=p.length-1;k>=0;k--)(R=p[k])&&(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},g=this&&this.__param||function(p,d){return function(m,E){d(m,E,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const c=u(3734),C=u(643),w=u(511),T=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,k=0,O=m.getFg(0),j=m.getBg(0);for(let P=0;P<m.getTrimmedLength();P++)if(m.loadCell(P,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==O||this._workCell.bg!==j){if(P-A>1){const V=this._getJoinedRanges(R,k,L,m,A);for(let q=0;q<V.length;q++)E.push(V[q])}A=P,k=L,O=this._workCell.fg,j=this._workCell.bg}L+=this._workCell.getChars().length||C.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-A>1){const P=this._getJoinedRanges(R,k,L,m,A);for(let V=0;V<P.length;V++)E.push(P[V])}return E}_getJoinedRanges(d,m,E,R,A){const L=d.substring(m,E);let k=[];try{k=this._characterJoiners[0].handler(L)}catch(O){console.error(O)}for(let O=1;O<this._characterJoiners.length;O++)try{const j=this._characterJoiners[O].handler(L);for(let P=0;P<j.length;P++)B_._mergeRanges(k,j[P])}catch(j){console.error(j)}return this._stringRangesToCellRanges(k,R,A),k}_stringRangesToCellRanges(d,m,E){let R=0,A=!1,L=0,k=d[R];if(k){for(let O=E;O<this._bufferService.cols;O++){const j=m.getWidth(O),P=m.getString(O).length||C.WHITESPACE_CELL_CHAR.length;if(j!==0){if(!A&&k[0]<=L&&(k[0]=O,A=!0),k[1]<=L){if(k[1]=O,k=d[++R],!k)break;k[0]<=L?(k[0]=O,A=!0):A=!1}L+=P}}k&&(k[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([g(0,T.IBufferService)],v)},5114:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=u(844),g=u(8460),c=u(3656);class C extends h.Disposable{constructor(x,v,p){super(),this._textarea=x,this._window=v,this.mainDocument=p,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new g.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new g.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((d=>this._screenDprMonitor.setWindow(d)))),this.register((0,g.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=C;class w extends h.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new h.MutableDisposable),this._onDprChange=this.register(new g.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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const h=u(844);class g extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(C){return this.linkProviders.push(C),{dispose:()=>{const w=this.linkProviders.indexOf(C);w!==-1&&this.linkProviders.splice(w,1)}}}}a.LinkProviderService=g},8934:function(_,a,u){var h=this&&this.__decorate||function(T,x,v,p){var d,m=arguments.length,E=m<3?x:p===null?p=Object.getOwnPropertyDescriptor(x,v):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(T,x,v,p);else for(var R=T.length-1;R>=0;R--)(d=T[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},g=this&&this.__param||function(T,x){return function(v,p){x(v,p,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const c=u(4725),C=u(9806);let w=a.MouseService=class{constructor(T,x){this._renderService=T,this._charSizeService=x}getCoords(T,x,v,p,d){return(0,C.getCoords)(window,T,x,v,p,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,d)}getMouseReportCoords(T,x){const v=(0,C.getCoordsRelativeToElement)(window,T,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([g(0,c.IRenderService),g(1,c.ICharSizeService)],w)},3230:function(_,a,u){var h=this&&this.__decorate||function(d,m,E,R){var A,L=arguments.length,k=L<3?m:R===null?R=Object.getOwnPropertyDescriptor(m,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(d,m,E,R);else for(var O=d.length-1;O>=0;O--)(A=d[O])&&(k=(L<3?A(k):L>3?A(m,E,k):A(m,E))||k);return L>3&&k&&Object.defineProperty(m,E,k),k},g=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),C=u(4725),w=u(8460),T=u(844),x=u(7226),v=u(2585);let p=a.RenderService=class extends T.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(d,m,E,R,A,L,k,O){super(),this._rowCount=d,this._charSizeService=R,this._renderer=this.register(new T.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new T.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(((j,P)=>this._renderRows(j,P)),k),this.register(this._renderDebouncer),this.register(k.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(L.onResize((()=>this._fullRefresh()))),this.register(L.buffers.onBufferActivate((()=>{var j;return(j=this._renderer.value)==null?void 0:j.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(O.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(k.window,m),this.register(k.onWindowChange((j=>this._registerIntersectionObserver(j,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,T.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=p=h([g(2,v.IOptionsService),g(3,C.ICharSizeService),g(4,v.IDecorationService),g(5,v.IBufferService),g(6,C.ICoreBrowserService),g(7,C.IThemeService)],p)},9312:function(_,a,u){var h=this&&this.__decorate||function(k,O,j,P){var V,q=arguments.length,Y=q<3?O:P===null?P=Object.getOwnPropertyDescriptor(O,j):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(k,O,j,P);else for(var $=k.length-1;$>=0;$--)(V=k[$])&&(Y=(q<3?V(Y):q>3?V(O,j,Y):V(O,j))||Y);return q>3&&Y&&Object.defineProperty(O,j,Y),Y},g=this&&this.__param||function(k,O){return function(j,P){O(j,P,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const c=u(9806),C=u(9504),w=u(456),T=u(4725),x=u(8460),v=u(844),p=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(k,O,j,P,V,q,Y,$,G){super(),this._element=k,this._screenElement=O,this._linkifier=j,this._bufferService=P,this._coreService=V,this._mouseService=q,this._optionsService=Y,this._renderService=$,this._coreBrowserService=G,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=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),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 k=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;return!(!k||!O||k[0]===O[0]&&k[1]===O[1])}get selectionText(){const k=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;if(!k||!O)return"";const j=this._bufferService.buffer,P=[];if(this._activeSelectionMode===3){if(k[0]===O[0])return"";const V=k[0]<O[0]?k[0]:O[0],q=k[0]<O[0]?O[0]:k[0];for(let Y=k[1];Y<=O[1];Y++){const $=j.translateBufferLineToString(Y,!0,V,q);P.push($)}}else{const V=k[1]===O[1]?O[0]:void 0;P.push(j.translateBufferLineToString(k[1],!0,k[0],V));for(let q=k[1]+1;q<=O[1]-1;q++){const Y=j.lines.get(q),$=j.translateBufferLineToString(q,!0);Y!=null&&Y.isWrapped?P[P.length-1]+=$:P.push($)}if(k[1]!==O[1]){const q=j.lines.get(O[1]),Y=j.translateBufferLineToString(O[1],!0,0,O[0]);q&&q.isWrapped?P[P.length-1]+=Y:P.push(Y)}}return P.map((V=>V.replace(A," "))).join(p.isWindows?`\r
|
|
54
|
+
`:`
|
|
55
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(k){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),p.isLinux&&k&&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(k){const O=this._getMouseBufferCoords(k),j=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!!(j&&P&&O)&&this._areCoordsInSelection(O,j,P)}isCellInSelection(k,O){const j=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!(!j||!P)&&this._areCoordsInSelection([k,O],j,P)}_areCoordsInSelection(k,O,j){return k[1]>O[1]&&k[1]<j[1]||O[1]===j[1]&&k[1]===O[1]&&k[0]>=O[0]&&k[0]<j[0]||O[1]<j[1]&&k[1]===j[1]&&k[0]<j[0]||O[1]<j[1]&&k[1]===O[1]&&k[0]>=O[0]}_selectWordAtCursor(k,O){var V,q;const j=(q=(V=this._linkifier.currentLink)==null?void 0:V.link)==null?void 0:q.range;if(j)return this._model.selectionStart=[j.start.x-1,j.start.y-1],this._model.selectionStartLength=(0,d.getRangeLength)(j,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const P=this._getMouseBufferCoords(k);return!!P&&(this._selectWordAt(P,O),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(k,O){this._model.clearSelection(),k=Math.max(k,0),O=Math.min(O,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,k],this._model.selectionEnd=[this._bufferService.cols,O],this.refresh(),this._onSelectionChange.fire()}_handleTrim(k){this._model.handleTrim(k)&&this.refresh()}_getMouseBufferCoords(k){const O=this._mouseService.getCoords(k,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(O)return O[0]--,O[1]--,O[1]+=this._bufferService.buffer.ydisp,O}_getMouseEventScrollAmount(k){let O=(0,c.getCoordsRelativeToElement)(this._coreBrowserService.window,k,this._screenElement)[1];const j=this._renderService.dimensions.css.canvas.height;return O>=0&&O<=j?0:(O>j&&(O-=j),O=Math.min(Math.max(O,-50),50),O/=50,O/Math.abs(O)+Math.round(14*O))}shouldForceSelection(k){return p.isMac?k.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:k.shiftKey}handleMouseDown(k){if(this._mouseDownTimeStamp=k.timeStamp,(k.button!==2||!this.hasSelection)&&k.button===0){if(!this._enabled){if(!this.shouldForceSelection(k))return;k.stopPropagation()}k.preventDefault(),this._dragScrollAmount=0,this._enabled&&k.shiftKey?this._handleIncrementalClick(k):k.detail===1?this._handleSingleClick(k):k.detail===2?this._handleDoubleClick(k):k.detail===3&&this._handleTripleClick(k),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(k){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(k))}_handleSingleClick(k){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(k)?3:0,this._model.selectionStart=this._getMouseBufferCoords(k),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const O=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);O&&O.length!==this._model.selectionStart[0]&&O.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(k){this._selectWordAtCursor(k,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(k){const O=this._getMouseBufferCoords(k);O&&(this._activeSelectionMode=2,this._selectLineAt(O[1]))}shouldColumnSelect(k){return k.altKey&&!(p.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(k){if(k.stopImmediatePropagation(),!this._model.selectionStart)return;const O=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(k),!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(k),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const j=this._bufferService.buffer;if(this._model.selectionEnd[1]<j.lines.length){const P=j.lines.get(this._model.selectionEnd[1]);P&&P.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}O&&O[0]===this._model.selectionEnd[0]&&O[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 k=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(k.ydisp+this._bufferService.rows,k.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=k.ydisp),this.refresh()}}_handleMouseUp(k){const O=k.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&O<500&&k.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const j=this._mouseService.getCoords(k,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(j&&j[0]!==void 0&&j[1]!==void 0){const P=(0,C.moveToCellSequence)(j[0]-1,j[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(P,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const k=this._model.finalSelectionStart,O=this._model.finalSelectionEnd,j=!(!k||!O||k[0]===O[0]&&k[1]===O[1]);j?k&&O&&(this._oldSelectionStart&&this._oldSelectionEnd&&k[0]===this._oldSelectionStart[0]&&k[1]===this._oldSelectionStart[1]&&O[0]===this._oldSelectionEnd[0]&&O[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(k,O,j)):this._oldHasSelection&&this._fireOnSelectionChange(k,O,j)}_fireOnSelectionChange(k,O,j){this._oldSelectionStart=k,this._oldSelectionEnd=O,this._oldHasSelection=j,this._onSelectionChange.fire()}_handleBufferActivate(k){this.clearSelection(),this._trimListener.dispose(),this._trimListener=k.activeBuffer.lines.onTrim((O=>this._handleTrim(O)))}_convertViewportColToCharacterIndex(k,O){let j=O;for(let P=0;O>=P;P++){const V=k.loadCell(P,this._workCell).getChars().length;this._workCell.getWidth()===0?j--:V>1&&O!==P&&(j+=V-1)}return j}setSelection(k,O,j){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[k,O],this._model.selectionStartLength=j,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(k){this._isClickInSelection(k)||(this._selectWordAtCursor(k,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(k,O,j=!0,P=!0){if(k[0]>=this._bufferService.cols)return;const V=this._bufferService.buffer,q=V.lines.get(k[1]);if(!q)return;const Y=V.translateBufferLineToString(k[1],!1);let $=this._convertViewportColToCharacterIndex(q,k[0]),G=$;const J=k[0]-$;let ne=0,z=0,M=0,B=0;if(Y.charAt($)===" "){for(;$>0&&Y.charAt($-1)===" ";)$--;for(;G<Y.length&&Y.charAt(G+1)===" ";)G++}else{let ie=k[0],he=k[0];q.getWidth(ie)===0&&(ne++,ie--),q.getWidth(he)===2&&(z++,he++);const fe=q.getString(he).length;for(fe>1&&(B+=fe-1,G+=fe-1);ie>0&&$>0&&!this._isCharWordSeparator(q.loadCell(ie-1,this._workCell));){q.loadCell(ie-1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===0?(ne++,ie--):X>1&&(M+=X-1,$-=X-1),$--,ie--}for(;he<q.length&&G+1<Y.length&&!this._isCharWordSeparator(q.loadCell(he+1,this._workCell));){q.loadCell(he+1,this._workCell);const X=this._workCell.getChars().length;this._workCell.getWidth()===2?(z++,he++):X>1&&(B+=X-1,G+=X-1),G++,he++}}G++;let I=$+J-ne+M,H=Math.min(this._bufferService.cols,G-$+ne+z-M-B);if(O||Y.slice($,G).trim()!==""){if(j&&I===0&&q.getCodePoint(0)!==32){const ie=V.lines.get(k[1]-1);if(ie&&q.isWrapped&&ie.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,k[1]-1],!1,!0,!1);if(he){const fe=this._bufferService.cols-he.start;I-=fe,H+=fe}}}if(P&&I+H===this._bufferService.cols&&q.getCodePoint(this._bufferService.cols-1)!==32){const ie=V.lines.get(k[1]+1);if(ie!=null&&ie.isWrapped&&ie.getCodePoint(0)!==32){const he=this._getWordAt([0,k[1]+1],!1,!1,!0);he&&(H+=he.length)}}return{start:I,length:H}}}_selectWordAt(k,O){const j=this._getWordAt(k,O);if(j){for(;j.start<0;)j.start+=this._bufferService.cols,k[1]--;this._model.selectionStart=[j.start,k[1]],this._model.selectionStartLength=j.length}}_selectToWordAt(k){const O=this._getWordAt(k,!0);if(O){let j=k[1];for(;O.start<0;)O.start+=this._bufferService.cols,j--;if(!this._model.areSelectionValuesReversed())for(;O.start+O.length>this._bufferService.cols;)O.length-=this._bufferService.cols,j++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?O.start:O.start+O.length,j]}}_isCharWordSeparator(k){return k.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(k.getChars())>=0}_selectLineAt(k){const O=this._bufferService.buffer.getWrappedRangeForLine(k),j={start:{x:0,y:O.first},end:{x:this._bufferService.cols-1,y:O.last}};this._model.selectionStart=[0,O.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,d.getRangeLength)(j,this._bufferService.cols)}};a.SelectionService=L=h([g(3,E.IBufferService),g(4,E.ICoreService),g(5,T.IMouseService),g(6,E.IOptionsService),g(7,T.IRenderService),g(8,T.ICoreBrowserService)],L)},4725:(_,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(_,a,u){var h=this&&this.__decorate||function(L,k,O,j){var P,V=arguments.length,q=V<3?k:j===null?j=Object.getOwnPropertyDescriptor(k,O):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(L,k,O,j);else for(var Y=L.length-1;Y>=0;Y--)(P=L[Y])&&(q=(V<3?P(q):V>3?P(k,O,q):P(k,O))||q);return V>3&&q&&Object.defineProperty(k,O,q),q},g=this&&this.__param||function(L,k){return function(O,j){k(O,j,L)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const c=u(7239),C=u(8055),w=u(8460),T=u(844),x=u(2585),v=C.css.toColor("#ffffff"),p=C.css.toColor("#000000"),d=C.css.toColor("#ffffff"),m=C.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const L=[C.css.toColor("#2e3436"),C.css.toColor("#cc0000"),C.css.toColor("#4e9a06"),C.css.toColor("#c4a000"),C.css.toColor("#3465a4"),C.css.toColor("#75507b"),C.css.toColor("#06989a"),C.css.toColor("#d3d7cf"),C.css.toColor("#555753"),C.css.toColor("#ef2929"),C.css.toColor("#8ae234"),C.css.toColor("#fce94f"),C.css.toColor("#729fcf"),C.css.toColor("#ad7fa8"),C.css.toColor("#34e2e2"),C.css.toColor("#eeeeec")],k=[0,95,135,175,215,255];for(let O=0;O<216;O++){const j=k[O/36%6|0],P=k[O/6%6|0],V=k[O%6];L.push({css:C.channels.toCss(j,P,V),rgba:C.channels.toRgba(j,P,V)})}for(let O=0;O<24;O++){const j=8+10*O;L.push({css:C.channels.toCss(j,j,j),rgba:C.channels.toRgba(j,j,j)})}return L})());let R=a.ThemeService=class extends T.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:p,cursor:d,cursorAccent:m,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:C.color.blend(p,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:C.color.blend(p,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 k=this._colors;if(k.foreground=A(L.foreground,v),k.background=A(L.background,p),k.cursor=A(L.cursor,d),k.cursorAccent=A(L.cursorAccent,m),k.selectionBackgroundTransparent=A(L.selectionBackground,E),k.selectionBackgroundOpaque=C.color.blend(k.background,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundTransparent=A(L.selectionInactiveBackground,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundOpaque=C.color.blend(k.background,k.selectionInactiveBackgroundTransparent),k.selectionForeground=L.selectionForeground?A(L.selectionForeground,C.NULL_COLOR):void 0,k.selectionForeground===C.NULL_COLOR&&(k.selectionForeground=void 0),C.color.isOpaque(k.selectionBackgroundTransparent)&&(k.selectionBackgroundTransparent=C.color.opacity(k.selectionBackgroundTransparent,.3)),C.color.isOpaque(k.selectionInactiveBackgroundTransparent)&&(k.selectionInactiveBackgroundTransparent=C.color.opacity(k.selectionInactiveBackgroundTransparent,.3)),k.ansi=a.DEFAULT_ANSI_COLORS.slice(),k.ansi[0]=A(L.black,a.DEFAULT_ANSI_COLORS[0]),k.ansi[1]=A(L.red,a.DEFAULT_ANSI_COLORS[1]),k.ansi[2]=A(L.green,a.DEFAULT_ANSI_COLORS[2]),k.ansi[3]=A(L.yellow,a.DEFAULT_ANSI_COLORS[3]),k.ansi[4]=A(L.blue,a.DEFAULT_ANSI_COLORS[4]),k.ansi[5]=A(L.magenta,a.DEFAULT_ANSI_COLORS[5]),k.ansi[6]=A(L.cyan,a.DEFAULT_ANSI_COLORS[6]),k.ansi[7]=A(L.white,a.DEFAULT_ANSI_COLORS[7]),k.ansi[8]=A(L.brightBlack,a.DEFAULT_ANSI_COLORS[8]),k.ansi[9]=A(L.brightRed,a.DEFAULT_ANSI_COLORS[9]),k.ansi[10]=A(L.brightGreen,a.DEFAULT_ANSI_COLORS[10]),k.ansi[11]=A(L.brightYellow,a.DEFAULT_ANSI_COLORS[11]),k.ansi[12]=A(L.brightBlue,a.DEFAULT_ANSI_COLORS[12]),k.ansi[13]=A(L.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),k.ansi[14]=A(L.brightCyan,a.DEFAULT_ANSI_COLORS[14]),k.ansi[15]=A(L.brightWhite,a.DEFAULT_ANSI_COLORS[15]),L.extendedAnsi){const O=Math.min(k.ansi.length-16,L.extendedAnsi.length);for(let j=0;j<O;j++)k.ansi[j+16]=A(L.extendedAnsi[j],a.DEFAULT_ANSI_COLORS[j+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 k=0;k<this._restoreColors.ansi.length;++k)this._colors.ansi[k]=this._restoreColors.ansi[k]}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,k){if(L!==void 0)try{return C.css.toColor(L)}catch{}return k}a.ThemeService=R=h([g(0,x.IOptionsService)],R)},6349:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=u(8460),g=u(844);class c extends g.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 T=new Array(w);for(let x=0;x<Math.min(w,this.length);x++)T[x]=this._array[this._getCyclicIndex(x)];this._array=T,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let T=this._length;T<w;T++)this._array[T]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,T){this._array[this._getCyclicIndex(w)]=T}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,T,...x){if(T){for(let v=w;v<this._length-T;v++)this._array[this._getCyclicIndex(v)]=this._array[this._getCyclicIndex(v+T)];this._length-=T,this.onDeleteEmitter.fire({index:w,amount:T})}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,T,x){if(!(T<=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 p=T-1;p>=0;p--)this.set(w+p+x,this.get(w+p));const v=w+T+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<T;v++)this.set(w+v+x,this.get(w+v))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}a.CircularList=c},1439:(_,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function u(h,g=5){if(typeof h!="object")return h;const c=Array.isArray(h)?[]:{};for(const C in h)c[C]=g<=1?h[C]:h[C]&&u(h[C],g-1);return c}},8055:(_,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,g=0,c=0;var C,w,T,x,v;function p(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?`#${p(E)}${p(R)}${p(A)}${p(L)}`:`#${p(E)}${p(R)}${p(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)}}})(C||(a.channels=C={})),(function(m){function E(R,A){return c=Math.round(255*A),[u,h,g]=v.toChannels(R.rgba),{css:C.toCss(u,h,g,c),rgba:C.toRgba(u,h,g,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,k=A.rgba>>16&255,O=A.rgba>>8&255,j=R.rgba>>24&255,P=R.rgba>>16&255,V=R.rgba>>8&255;return u=j+Math.round((L-j)*c),h=P+Math.round((k-P)*c),g=V+Math.round((O-V)*c),{css:C.toCss(u,h,g),rgba:C.toRgba(u,h,g)}},m.isOpaque=function(R){return(255&R.rgba)==255},m.ensureContrastRatio=function(R,A,L){const k=v.ensureContrastRatio(R.rgba,A.rgba,L);if(k)return C.toColor(k>>24&255,k>>16&255,k>>8&255)},m.opaque=function(R){const A=(255|R.rgba)>>>0;return[u,h,g]=v.toChannels(A),{css:C.toCss(u,h,g),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),g=parseInt(A.slice(3,4).repeat(2),16),C.toColor(u,h,g);case 5:return u=parseInt(A.slice(1,2).repeat(2),16),h=parseInt(A.slice(2,3).repeat(2),16),g=parseInt(A.slice(3,4).repeat(2),16),c=parseInt(A.slice(4,5).repeat(2),16),C.toColor(u,h,g,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]),g=parseInt(L[3]),c=Math.round(255*(L[5]===void 0?1:parseFloat(L[5]))),C.toColor(u,h,g,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,g,c]=E.getImageData(0,0,1,1).data,c!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:C.toRgba(u,h,g,c),css:A}}})(T||(a.css=T={})),(function(m){function E(R,A,L){const k=R/255,O=A/255,j=L/255;return .2126*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.7152*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))+.0722*(j<=.03928?j/12.92:Math.pow((j+.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,k){const O=A>>24&255,j=A>>16&255,P=A>>8&255;let V=L>>24&255,q=L>>16&255,Y=L>>8&255,$=d(x.relativeLuminance2(V,q,Y),x.relativeLuminance2(O,j,P));for(;$<k&&(V>0||q>0||Y>0);)V-=Math.max(0,Math.ceil(.1*V)),q-=Math.max(0,Math.ceil(.1*q)),Y-=Math.max(0,Math.ceil(.1*Y)),$=d(x.relativeLuminance2(V,q,Y),x.relativeLuminance2(O,j,P));return(V<<24|q<<16|Y<<8|255)>>>0}function R(A,L,k){const O=A>>24&255,j=A>>16&255,P=A>>8&255;let V=L>>24&255,q=L>>16&255,Y=L>>8&255,$=d(x.relativeLuminance2(V,q,Y),x.relativeLuminance2(O,j,P));for(;$<k&&(V<255||q<255||Y<255);)V=Math.min(255,V+Math.ceil(.1*(255-V))),q=Math.min(255,q+Math.ceil(.1*(255-q))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),$=d(x.relativeLuminance2(V,q,Y),x.relativeLuminance2(O,j,P));return(V<<24|q<<16|Y<<8|255)>>>0}m.blend=function(A,L){if(c=(255&L)/255,c===1)return L;const k=L>>24&255,O=L>>16&255,j=L>>8&255,P=A>>24&255,V=A>>16&255,q=A>>8&255;return u=P+Math.round((k-P)*c),h=V+Math.round((O-V)*c),g=q+Math.round((j-q)*c),C.toRgba(u,h,g)},m.ensureContrastRatio=function(A,L,k){const O=x.relativeLuminance(A>>8),j=x.relativeLuminance(L>>8);if(d(O,j)<k){if(j<O){const q=E(A,L,k),Y=d(O,x.relativeLuminance(q>>8));if(Y<k){const $=R(A,L,k);return Y>d(O,x.relativeLuminance($>>8))?q:$}return q}const P=R(A,L,k),V=d(O,x.relativeLuminance(P>>8));if(V<k){const q=E(A,L,k);return V>d(O,x.relativeLuminance(q>>8))?P:q}return P}},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=p,a.contrastRatio=d},8969:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=u(844),g=u(2585),c=u(4348),C=u(7866),w=u(744),T=u(7302),x=u(6975),v=u(8460),p=u(1753),d=u(1480),m=u(7994),E=u(9282),R=u(5435),A=u(5981),L=u(2660);let k=!1;class O extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((P=>{var V;(V=this._onScrollApi)==null||V.fire(P.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(P){for(const V in P)this.optionsService.options[V]=P[V]}constructor(P){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 T.OptionsService(P)),this._instantiationService.setService(g.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(g.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(C.LogService)),this._instantiationService.setService(g.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(g.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(p.CoreMouseService)),this._instantiationService.setService(g.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(d.UnicodeService)),this._instantiationService.setService(g.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(m.CharsetService),this._instantiationService.setService(g.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(L.OscLinkService),this._instantiationService.setService(g.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,q)=>this._inputHandler.parse(V,q)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(P,V){this._writeBuffer.write(P,V)}writeSync(P,V){this._logService.logLevel<=g.LogLevelEnum.WARN&&!k&&(this._logService.warn("writeSync is unreliable and will be removed soon."),k=!0),this._writeBuffer.writeSync(P,V)}input(P,V=!0){this.coreService.triggerDataEvent(P,V)}resize(P,V){isNaN(P)||isNaN(V)||(P=Math.max(P,w.MINIMUM_COLS),V=Math.max(V,w.MINIMUM_ROWS),this._bufferService.resize(P,V))}scroll(P,V=!1){this._bufferService.scroll(P,V)}scrollLines(P,V,q){this._bufferService.scrollLines(P,V,q)}scrollPages(P){this.scrollLines(P*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(P){const V=P-this._bufferService.buffer.ydisp;V!==0&&this.scrollLines(V)}registerEscHandler(P,V){return this._inputHandler.registerEscHandler(P,V)}registerDcsHandler(P,V){return this._inputHandler.registerDcsHandler(P,V)}registerCsiHandler(P,V){return this._inputHandler.registerCsiHandler(P,V)}registerOscHandler(P,V){return this._inputHandler.registerOscHandler(P,V)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let P=!1;const V=this.optionsService.rawOptions.windowsPty;V&&V.buildNumber!==void 0&&V.buildNumber!==void 0?P=V.backend==="conpty"&&V.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(P=!0),P?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const P=[];P.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),P.push(this.registerCsiHandler({final:"H"},(()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const V of P)V.dispose()}))}}}a.CoreTerminal=O},8460:(_,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 g=[];for(let c=0;c<this._listeners.length;c++)g.push(this._listeners[c]);for(let c=0;c<g.length;c++)g[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((g=>h.fire(g)))},a.runAndSubscribe=function(u,h){return h(void 0),u((g=>h(g)))}},5435:function(_,a,u){var h=this&&this.__decorate||function(ne,z,M,B){var I,H=arguments.length,ie=H<3?z:B===null?B=Object.getOwnPropertyDescriptor(z,M):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(ne,z,M,B);else for(var he=ne.length-1;he>=0;he--)(I=ne[he])&&(ie=(H<3?I(ie):H>3?I(z,M,ie):I(z,M))||ie);return H>3&&ie&&Object.defineProperty(z,M,ie),ie},g=this&&this.__param||function(ne,z){return function(M,B){z(M,B,ne)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const c=u(2584),C=u(7116),w=u(2015),T=u(844),x=u(482),v=u(8437),p=u(8460),d=u(643),m=u(511),E=u(3734),R=u(2585),A=u(1480),L=u(6242),k=u(6351),O=u(5941),j={"(":0,")":1,"*":2,"+":3,"-":1,".":2},P=131072;function V(ne,z){if(ne>24)return z.setWinLines||!1;switch(ne){case 1:return!!z.restoreWin;case 2:return!!z.minimizeWin;case 3:return!!z.setWinPosition;case 4:return!!z.setWinSizePixels;case 5:return!!z.raiseWin;case 6:return!!z.lowerWin;case 7:return!!z.refreshWin;case 8:return!!z.setWinSizeChars;case 9:return!!z.maximizeWin;case 10:return!!z.fullscreenWin;case 11:return!!z.getWinState;case 13:return!!z.getWinPosition;case 14:return!!z.getWinSizePixels;case 15:return!!z.getScreenSizePixels;case 16:return!!z.getCellSizePixels;case 18:return!!z.getWinSizeChars;case 19:return!!z.getScreenSizeChars;case 20:return!!z.getIconTitle;case 21:return!!z.getWinTitle;case 22:return!!z.pushTitle;case 23:return!!z.popTitle;case 24:return!!z.setWinLines}return!1}var q;(function(ne){ne[ne.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ne[ne.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(q||(a.WindowsOptionsReportType=q={}));let Y=0;class $ extends T.Disposable{getAttrData(){return this._curAttrData}constructor(z,M,B,I,H,ie,he,fe,X=new w.EscapeSequenceParser){super(),this._bufferService=z,this._charsetService=M,this._coreService=B,this._logService=I,this._optionsService=H,this._oscLinkService=ie,this._coreMouseService=he,this._unicodeService=fe,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 p.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new p.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new p.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new p.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new p.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new p.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new p.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new p.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new p.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new p.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new p.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new p.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new p.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 G(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((N=>this._activeBuffer=N.activeBuffer))),this._parser.setCsiHandlerFallback(((N,re)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(N),params:re.toArray()})})),this._parser.setEscHandlerFallback((N=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(N)})})),this._parser.setExecuteHandlerFallback((N=>{this._logService.debug("Unknown EXECUTE code: ",{code:N})})),this._parser.setOscHandlerFallback(((N,re,Q)=>{this._logService.debug("Unknown OSC code: ",{identifier:N,action:re,data:Q})})),this._parser.setDcsHandlerFallback(((N,re,Q)=>{re==="HOOK"&&(Q=Q.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(N),action:re,payload:Q})})),this._parser.setPrintHandler(((N,re,Q)=>this.print(N,re,Q))),this._parser.registerCsiHandler({final:"@"},(N=>this.insertChars(N))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(N=>this.scrollLeft(N))),this._parser.registerCsiHandler({final:"A"},(N=>this.cursorUp(N))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(N=>this.scrollRight(N))),this._parser.registerCsiHandler({final:"B"},(N=>this.cursorDown(N))),this._parser.registerCsiHandler({final:"C"},(N=>this.cursorForward(N))),this._parser.registerCsiHandler({final:"D"},(N=>this.cursorBackward(N))),this._parser.registerCsiHandler({final:"E"},(N=>this.cursorNextLine(N))),this._parser.registerCsiHandler({final:"F"},(N=>this.cursorPrecedingLine(N))),this._parser.registerCsiHandler({final:"G"},(N=>this.cursorCharAbsolute(N))),this._parser.registerCsiHandler({final:"H"},(N=>this.cursorPosition(N))),this._parser.registerCsiHandler({final:"I"},(N=>this.cursorForwardTab(N))),this._parser.registerCsiHandler({final:"J"},(N=>this.eraseInDisplay(N,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(N=>this.eraseInDisplay(N,!0))),this._parser.registerCsiHandler({final:"K"},(N=>this.eraseInLine(N,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(N=>this.eraseInLine(N,!0))),this._parser.registerCsiHandler({final:"L"},(N=>this.insertLines(N))),this._parser.registerCsiHandler({final:"M"},(N=>this.deleteLines(N))),this._parser.registerCsiHandler({final:"P"},(N=>this.deleteChars(N))),this._parser.registerCsiHandler({final:"S"},(N=>this.scrollUp(N))),this._parser.registerCsiHandler({final:"T"},(N=>this.scrollDown(N))),this._parser.registerCsiHandler({final:"X"},(N=>this.eraseChars(N))),this._parser.registerCsiHandler({final:"Z"},(N=>this.cursorBackwardTab(N))),this._parser.registerCsiHandler({final:"`"},(N=>this.charPosAbsolute(N))),this._parser.registerCsiHandler({final:"a"},(N=>this.hPositionRelative(N))),this._parser.registerCsiHandler({final:"b"},(N=>this.repeatPrecedingCharacter(N))),this._parser.registerCsiHandler({final:"c"},(N=>this.sendDeviceAttributesPrimary(N))),this._parser.registerCsiHandler({prefix:">",final:"c"},(N=>this.sendDeviceAttributesSecondary(N))),this._parser.registerCsiHandler({final:"d"},(N=>this.linePosAbsolute(N))),this._parser.registerCsiHandler({final:"e"},(N=>this.vPositionRelative(N))),this._parser.registerCsiHandler({final:"f"},(N=>this.hVPosition(N))),this._parser.registerCsiHandler({final:"g"},(N=>this.tabClear(N))),this._parser.registerCsiHandler({final:"h"},(N=>this.setMode(N))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(N=>this.setModePrivate(N))),this._parser.registerCsiHandler({final:"l"},(N=>this.resetMode(N))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(N=>this.resetModePrivate(N))),this._parser.registerCsiHandler({final:"m"},(N=>this.charAttributes(N))),this._parser.registerCsiHandler({final:"n"},(N=>this.deviceStatus(N))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(N=>this.deviceStatusPrivate(N))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(N=>this.softReset(N))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(N=>this.setCursorStyle(N))),this._parser.registerCsiHandler({final:"r"},(N=>this.setScrollRegion(N))),this._parser.registerCsiHandler({final:"s"},(N=>this.saveCursor(N))),this._parser.registerCsiHandler({final:"t"},(N=>this.windowOptions(N))),this._parser.registerCsiHandler({final:"u"},(N=>this.restoreCursor(N))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(N=>this.insertColumns(N))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(N=>this.deleteColumns(N))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(N=>this.selectProtected(N))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(N=>this.requestMode(N,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(N=>this.requestMode(N,!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((N=>(this.setTitle(N),this.setIconName(N),!0)))),this._parser.registerOscHandler(1,new L.OscHandler((N=>this.setIconName(N)))),this._parser.registerOscHandler(2,new L.OscHandler((N=>this.setTitle(N)))),this._parser.registerOscHandler(4,new L.OscHandler((N=>this.setOrReportIndexedColor(N)))),this._parser.registerOscHandler(8,new L.OscHandler((N=>this.setHyperlink(N)))),this._parser.registerOscHandler(10,new L.OscHandler((N=>this.setOrReportFgColor(N)))),this._parser.registerOscHandler(11,new L.OscHandler((N=>this.setOrReportBgColor(N)))),this._parser.registerOscHandler(12,new L.OscHandler((N=>this.setOrReportCursorColor(N)))),this._parser.registerOscHandler(104,new L.OscHandler((N=>this.restoreIndexedColor(N)))),this._parser.registerOscHandler(110,new L.OscHandler((N=>this.restoreFgColor(N)))),this._parser.registerOscHandler(111,new L.OscHandler((N=>this.restoreBgColor(N)))),this._parser.registerOscHandler(112,new L.OscHandler((N=>this.restoreCursorColor(N)))),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 N in C.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:N},(()=>this.selectCharset("("+N))),this._parser.registerEscHandler({intermediates:")",final:N},(()=>this.selectCharset(")"+N))),this._parser.registerEscHandler({intermediates:"*",final:N},(()=>this.selectCharset("*"+N))),this._parser.registerEscHandler({intermediates:"+",final:N},(()=>this.selectCharset("+"+N))),this._parser.registerEscHandler({intermediates:"-",final:N},(()=>this.selectCharset("-"+N))),this._parser.registerEscHandler({intermediates:".",final:N},(()=>this.selectCharset("."+N))),this._parser.registerEscHandler({intermediates:"/",final:N},(()=>this.selectCharset("/"+N)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((N=>(this._logService.error("Parsing error: ",N),N))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new k.DcsHandler(((N,re)=>this.requestStatusString(N,re))))}_preserveStack(z,M,B,I){this._parseStack.paused=!0,this._parseStack.cursorStartX=z,this._parseStack.cursorStartY=M,this._parseStack.decodedLength=B,this._parseStack.position=I}_logSlowResolvingAsync(z){this._logService.logLevel<=R.LogLevelEnum.WARN&&Promise.race([z,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(z,M){let B,I=this._activeBuffer.x,H=this._activeBuffer.y,ie=0;const he=this._parseStack.paused;if(he){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,M))return this._logSlowResolvingAsync(B),B;I=this._parseStack.cursorStartX,H=this._parseStack.cursorStartY,this._parseStack.paused=!1,z.length>P&&(ie=this._parseStack.position+P)}if(this._logService.logLevel<=R.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof z=="string"?` "${z}"`:` "${Array.prototype.map.call(z,(N=>String.fromCharCode(N))).join("")}"`),typeof z=="string"?z.split("").map((N=>N.charCodeAt(0))):z),this._parseBuffer.length<z.length&&this._parseBuffer.length<P&&(this._parseBuffer=new Uint32Array(Math.min(z.length,P))),he||this._dirtyRowTracker.clearRange(),z.length>P)for(let N=ie;N<z.length;N+=P){const re=N+P<z.length?N+P:z.length,Q=typeof z=="string"?this._stringDecoder.decode(z.substring(N,re),this._parseBuffer):this._utf8Decoder.decode(z.subarray(N,re),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,Q))return this._preserveStack(I,H,Q,N),this._logSlowResolvingAsync(B),B}else if(!he){const N=typeof z=="string"?this._stringDecoder.decode(z,this._parseBuffer):this._utf8Decoder.decode(z,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,N))return this._preserveStack(I,H,N,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===I&&this._activeBuffer.y===H||this._onCursorMove.fire();const fe=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(fe,this._bufferService.rows-1))}print(z,M,B){let I,H;const ie=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,fe=this._bufferService.cols,X=this._coreService.decPrivateModes.wraparound,N=this._coreService.modes.insertMode,re=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,re);let de=this._parser.precedingJoinState;for(let pe=M;pe<B;++pe){if(I=z[pe],I<127&&ie){const at=ie[String.fromCharCode(I)];at&&(I=at.charCodeAt(0))}const ke=this._unicodeService.charProperties(I,de);H=A.UnicodeService.extractWidth(ke);const xe=A.UnicodeService.extractShouldJoin(ke),Ge=xe?A.UnicodeService.extractWidth(de):0;if(de=ke,he&&this._onA11yChar.fire((0,x.stringFromCodePoint)(I)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+H-Ge>fe){if(X){const at=Q;let Ee=this._activeBuffer.x-Ge;for(this._activeBuffer.x=Ge,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),Ge>0&&Q instanceof v.BufferLine&&Q.copyCellsFrom(at,Ee,0,Ge,!1);Ee<fe;)at.setCellFromCodepoint(Ee++,0,1,re)}else if(this._activeBuffer.x=fe-1,H===2)continue}if(xe&&this._activeBuffer.x){const at=Q.getWidth(this._activeBuffer.x-1)?1:2;Q.addCodepointToCell(this._activeBuffer.x-at,I,H);for(let Ee=H-Ge;--Ee>=0;)Q.setCellFromCodepoint(this._activeBuffer.x++,0,0,re)}else if(N&&(Q.insertCells(this._activeBuffer.x,H-Ge,this._activeBuffer.getNullCell(re)),Q.getWidth(fe-1)===2&&Q.setCellFromCodepoint(fe-1,d.NULL_CELL_CODE,d.NULL_CELL_WIDTH,re)),Q.setCellFromCodepoint(this._activeBuffer.x++,I,H,re),H>0)for(;--H;)Q.setCellFromCodepoint(this._activeBuffer.x++,0,0,re)}this._parser.precedingJoinState=de,this._activeBuffer.x<fe&&B-M>0&&Q.getWidth(this._activeBuffer.x)===0&&!Q.hasContent(this._activeBuffer.x)&&Q.setCellFromCodepoint(this._activeBuffer.x,0,1,re),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(z,M){return z.final!=="t"||z.prefix||z.intermediates?this._parser.registerCsiHandler(z,M):this._parser.registerCsiHandler(z,(B=>!V(B.params[0],this._optionsService.rawOptions.windowOptions)||M(B)))}registerDcsHandler(z,M){return this._parser.registerDcsHandler(z,new k.DcsHandler(M))}registerEscHandler(z,M){return this._parser.registerEscHandler(z,M)}registerOscHandler(z,M){return this._parser.registerOscHandler(z,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 z;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&z.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const 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 z=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-z),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(z=this._bufferService.cols-1){this._activeBuffer.x=Math.min(z,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(z,M){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=z,this._activeBuffer.y=this._activeBuffer.scrollTop+M):(this._activeBuffer.x=z,this._activeBuffer.y=M),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(z,M){this._restrictCursor(),this._setCursor(this._activeBuffer.x+z,this._activeBuffer.y+M)}cursorUp(z){const M=this._activeBuffer.y-this._activeBuffer.scrollTop;return M>=0?this._moveCursor(0,-Math.min(M,z.params[0]||1)):this._moveCursor(0,-(z.params[0]||1)),!0}cursorDown(z){const M=this._activeBuffer.scrollBottom-this._activeBuffer.y;return M>=0?this._moveCursor(0,Math.min(M,z.params[0]||1)):this._moveCursor(0,z.params[0]||1),!0}cursorForward(z){return this._moveCursor(z.params[0]||1,0),!0}cursorBackward(z){return this._moveCursor(-(z.params[0]||1),0),!0}cursorNextLine(z){return this.cursorDown(z),this._activeBuffer.x=0,!0}cursorPrecedingLine(z){return this.cursorUp(z),this._activeBuffer.x=0,!0}cursorCharAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(z){return this._setCursor(z.length>=2?(z.params[1]||1)-1:0,(z.params[0]||1)-1),!0}charPosAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(z){return this._moveCursor(z.params[0]||1,0),!0}linePosAbsolute(z){return this._setCursor(this._activeBuffer.x,(z.params[0]||1)-1),!0}vPositionRelative(z){return this._moveCursor(0,z.params[0]||1),!0}hVPosition(z){return this.cursorPosition(z),!0}tabClear(z){const M=z.params[0];return M===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:M===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=z.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=z.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(z){const M=z.params[0];return M===1&&(this._curAttrData.bg|=536870912),M!==2&&M!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(z,M,B,I=!1,H=!1){const ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);ie.replaceCells(M,B,this._activeBuffer.getNullCell(this._eraseAttrData()),H),I&&(ie.isWrapped=!1)}_resetBufferLine(z,M=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),M),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+z),B.isWrapped=!1)}eraseInDisplay(z,M=!1){let B;switch(this._restrictCursor(this._bufferService.cols),z.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 I=this._activeBuffer.lines.length-this._bufferService.rows;I>0&&(this._activeBuffer.lines.trimStart(I),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-I,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-I,0),this._onScroll.fire(0))}return!0}eraseInLine(z,M=!1){switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,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(z){this._restrictCursor();let M=z.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,I=this._bufferService.rows-1-this._activeBuffer.scrollBottom,H=this._bufferService.rows-1+this._activeBuffer.ybase-I+1;for(;M--;)this._activeBuffer.lines.splice(H-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(z){this._restrictCursor();let M=z.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 I;for(I=this._bufferService.rows-1-this._activeBuffer.scrollBottom,I=this._bufferService.rows-1+this._activeBuffer.ybase-I;M--;)this._activeBuffer.lines.splice(B,1),this._activeBuffer.lines.splice(I,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(z){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.insertCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(z){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.deleteCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(z){let M=z.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(z){let M=z.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(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=z.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);I.deleteCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=z.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);I.insertCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=z.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);I.insertCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=z.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);I.deleteCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),I.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(z){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(z.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(z){const M=this._parser.precedingJoinState;if(!M)return!0;const B=z.params[0]||1,I=A.UnicodeService.extractWidth(M),H=this._activeBuffer.x-I,ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(H),he=new Uint32Array(ie.length*B);let fe=0;for(let N=0;N<ie.length;){const re=ie.codePointAt(N)||0;he[fe++]=re,N+=re>65535?2:1}let X=fe;for(let N=1;N<B;++N)he.copyWithin(X,0,fe),X+=fe;return this.print(he,0,X),!0}sendDeviceAttributesPrimary(z){return z.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(c.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(c.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(z){return z.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(z.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(c.C0.ESC+"[>83;40003;0c")),!0}_is(z){return(this._optionsService.rawOptions.termName+"").indexOf(z)===0}setMode(z){for(let M=0;M<z.length;M++)switch(z.params[M]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(z){for(let M=0;M<z.length;M++)switch(z.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,C.DEFAULT_CHARSET),this._charsetService.setgCharset(1,C.DEFAULT_CHARSET),this._charsetService.setgCharset(2,C.DEFAULT_CHARSET),this._charsetService.setgCharset(3,C.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(z){for(let M=0;M<z.length;M++)switch(z.params[M]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(z){for(let M=0;M<z.length;M++)switch(z.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(),z.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(z,M){const B=this._coreService.decPrivateModes,{activeProtocol:I,activeEncoding:H}=this._coreMouseService,ie=this._coreService,{buffers:he,cols:fe}=this._bufferService,{active:X,alt:N}=he,re=this._optionsService.rawOptions,Q=xe=>xe?1:2,de=z.params[0];return pe=de,ke=M?de===2?4:de===4?Q(ie.modes.insertMode):de===12?3:de===20?Q(re.convertEol):0:de===1?Q(B.applicationCursorKeys):de===3?re.windowOptions.setWinLines?fe===80?2:fe===132?1:0:0:de===6?Q(B.origin):de===7?Q(B.wraparound):de===8?3:de===9?Q(I==="X10"):de===12?Q(re.cursorBlink):de===25?Q(!ie.isCursorHidden):de===45?Q(B.reverseWraparound):de===66?Q(B.applicationKeypad):de===67?4:de===1e3?Q(I==="VT200"):de===1002?Q(I==="DRAG"):de===1003?Q(I==="ANY"):de===1004?Q(B.sendFocus):de===1005?4:de===1006?Q(H==="SGR"):de===1015?4:de===1016?Q(H==="SGR_PIXELS"):de===1048?1:de===47||de===1047||de===1049?Q(X===N):de===2004?Q(B.bracketedPasteMode):0,ie.triggerDataEvent(`${c.C0.ESC}[${M?"":"?"}${pe};${ke}$y`),!0;var pe,ke}_updateAttrColor(z,M,B,I,H){return M===2?(z|=50331648,z&=-16777216,z|=E.AttributeData.fromColorRGB([B,I,H])):M===5&&(z&=-50331904,z|=33554432|255&B),z}_extractColor(z,M,B){const I=[0,0,-1,0,0,0];let H=0,ie=0;do{if(I[ie+H]=z.params[M+ie],z.hasSubParams(M+ie)){const he=z.getSubParams(M+ie);let fe=0;do I[1]===5&&(H=1),I[ie+fe+1+H]=he[fe];while(++fe<he.length&&fe+ie+1+H<I.length);break}if(I[1]===5&&ie+H>=2||I[1]===2&&ie+H>=5)break;I[1]&&(H=1)}while(++ie+M<z.length&&ie+H<I.length);for(let he=2;he<I.length;++he)I[he]===-1&&(I[he]=0);switch(I[0]){case 38:B.fg=this._updateAttrColor(B.fg,I[1],I[3],I[4],I[5]);break;case 48:B.bg=this._updateAttrColor(B.bg,I[1],I[3],I[4],I[5]);break;case 58:B.extended=B.extended.clone(),B.extended.underlineColor=this._updateAttrColor(B.extended.underlineColor,I[1],I[3],I[4],I[5])}return ie}_processUnderline(z,M){M.extended=M.extended.clone(),(!~z||z>5)&&(z=1),M.extended.underlineStyle=z,M.fg|=268435456,z===0&&(M.fg&=-268435457),M.updateExtended()}_processSGR0(z){z.fg=v.DEFAULT_ATTR_DATA.fg,z.bg=v.DEFAULT_ATTR_DATA.bg,z.extended=z.extended.clone(),z.extended.underlineStyle=0,z.extended.underlineColor&=-67108864,z.updateExtended()}charAttributes(z){if(z.length===1&&z.params[0]===0)return this._processSGR0(this._curAttrData),!0;const M=z.length;let B;const I=this._curAttrData;for(let H=0;H<M;H++)B=z.params[H],B>=30&&B<=37?(I.fg&=-50331904,I.fg|=16777216|B-30):B>=40&&B<=47?(I.bg&=-50331904,I.bg|=16777216|B-40):B>=90&&B<=97?(I.fg&=-50331904,I.fg|=16777224|B-90):B>=100&&B<=107?(I.bg&=-50331904,I.bg|=16777224|B-100):B===0?this._processSGR0(I):B===1?I.fg|=134217728:B===3?I.bg|=67108864:B===4?(I.fg|=268435456,this._processUnderline(z.hasSubParams(H)?z.getSubParams(H)[0]:1,I)):B===5?I.fg|=536870912:B===7?I.fg|=67108864:B===8?I.fg|=1073741824:B===9?I.fg|=2147483648:B===2?I.bg|=134217728:B===21?this._processUnderline(2,I):B===22?(I.fg&=-134217729,I.bg&=-134217729):B===23?I.bg&=-67108865:B===24?(I.fg&=-268435457,this._processUnderline(0,I)):B===25?I.fg&=-536870913:B===27?I.fg&=-67108865:B===28?I.fg&=-1073741825:B===29?I.fg&=2147483647:B===39?(I.fg&=-67108864,I.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):B===49?(I.bg&=-67108864,I.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?H+=this._extractColor(z,H,I):B===53?I.bg|=1073741824:B===55?I.bg&=-1073741825:B===59?(I.extended=I.extended.clone(),I.extended.underlineColor=-1,I.updateExtended()):B===100?(I.fg&=-67108864,I.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,I.bg&=-67108864,I.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus(z){switch(z.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(z){if(z.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(z){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(z){const M=z.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(z){const M=z.params[0]||1;let B;return(z.length<2||(B=z.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(z){if(!V(z.params[0],this._optionsService.rawOptions.windowOptions))return!0;const M=z.length>1?z.params[1]:0;switch(z.params[0]){case 14:M!==2&&this._onRequestWindowsOptionsReport.fire(q.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(q.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(z){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(z){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(z){return this._windowTitle=z,this._onTitleChange.fire(z),!0}setIconName(z){return this._iconName=z,!0}setOrReportIndexedColor(z){const M=[],B=z.split(";");for(;B.length>1;){const I=B.shift(),H=B.shift();if(/^\d+$/.exec(I)){const ie=parseInt(I);if(J(ie))if(H==="?")M.push({type:0,index:ie});else{const he=(0,O.parseColor)(H);he&&M.push({type:1,index:ie,color:he})}}}return M.length&&this._onColor.fire(M),!0}setHyperlink(z){const M=z.split(";");return!(M.length<2)&&(M[1]?this._createHyperlink(M[0],M[1]):!M[0]&&this._finishHyperlink())}_createHyperlink(z,M){this._getCurrentLinkId()&&this._finishHyperlink();const B=z.split(":");let I;const H=B.findIndex((ie=>ie.startsWith("id=")));return H!==-1&&(I=B[H].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:I,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(z,M){const B=z.split(";");for(let I=0;I<B.length&&!(M>=this._specialColors.length);++I,++M)if(B[I]==="?")this._onColor.fire([{type:0,index:this._specialColors[M]}]);else{const H=(0,O.parseColor)(B[I]);H&&this._onColor.fire([{type:1,index:this._specialColors[M],color:H}])}return!0}setOrReportFgColor(z){return this._setOrReportSpecialColor(z,0)}setOrReportBgColor(z){return this._setOrReportSpecialColor(z,1)}setOrReportCursorColor(z){return this._setOrReportSpecialColor(z,2)}restoreIndexedColor(z){if(!z)return this._onColor.fire([{type:2}]),!0;const M=[],B=z.split(";");for(let I=0;I<B.length;++I)if(/^\d+$/.exec(B[I])){const H=parseInt(B[I]);J(H)&&M.push({type:2,index:H})}return M.length&&this._onColor.fire(M),!0}restoreFgColor(z){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(z){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(z){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,C.DEFAULT_CHARSET),!0}selectCharset(z){return z.length!==2?(this.selectDefaultCharset(),!0):(z[0]==="/"||this._charsetService.setgCharset(j[z[0]],C.CHARSETS[z[1]]||C.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const z=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,z,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=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(z){return this._charsetService.setgLevel(z),!0}screenAlignmentPattern(){const z=new m.CellData;z.content=4194373,z.fg=this._curAttrData.fg,z.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,I=this._activeBuffer.lines.get(B);I&&(I.fill(z),I.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(z,M){const B=this._bufferService.buffer,I=this._optionsService.rawOptions;return(H=>(this._coreService.triggerDataEvent(`${c.C0.ESC}${H}${c.C0.ESC}\\`),!0))(z==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:z==='"p'?'P1$r61;1"p':z==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:z==="m"?"P1$r0m":z===" q"?`P1$r${{block:2,underline:4,bar:6}[I.cursorStyle]-(I.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(z,M){this._dirtyRowTracker.markRangeDirty(z,M)}}a.InputHandler=$;let G=class{constructor(ne){this._bufferService=ne,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ne){ne<this.start?this.start=ne:ne>this.end&&(this.end=ne)}markRangeDirty(ne,z){ne>z&&(Y=ne,ne=z,z=Y),ne<this.start&&(this.start=ne),z>this.end&&(this.end=z)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(ne){return 0<=ne&&ne<256}G=h([g(0,R.IBufferService)],G)},844:(_,a)=>{function u(h){for(const g of h)g.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 g=this._disposables.indexOf(h);g!==-1&&this._disposables.splice(g,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var g;this._isDisposed||h===this._value||((g=this._value)==null||g.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:(_,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(g,c,C){this._data[g]||(this._data[g]={}),this._data[g][c]=C}get(g,c){return this._data[g]?this._data[g][c]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(h,g,c,C,w){this._data.get(h,g)||this._data.set(h,g,new u),this._data.get(h,g).set(c,C,w)}get(h,g,c,C){var w;return(w=this._data.get(h,g))==null?void 0:w.get(c,C)}clear(){this._data.clear()}}},6114:(_,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 g=u.match(/Version\/(\d+)/);return g===null||g.length<2?0:parseInt(g[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:(_,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 g=this._getKey(h);if(g===void 0||(u=this._search(g),u===-1)||this._getKey(this._array[u])!==g)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])===g);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,g){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do g(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===h)}values(){return[...this._array].values()}_search(h){let g=0,c=this._array.length-1;for(;c>=g;){let C=g+c>>1;const w=this._getKey(this._array[C]);if(w>h)c=C-1;else{if(!(w<h)){for(;C>0&&this._getKey(this._array[C-1])===h;)C--;return C}g=C+1}}return g}}},7226:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=u(6114);class g{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 T=0,x=0,v=w.timeRemaining(),p=0;for(;this._i<this._tasks.length;){if(T=Date.now(),this._tasks[this._i]()||this._i++,T=Math.max(1,Date.now()-T),x=Math.max(T,x),p=w.timeRemaining(),1.5*x>p)return v-T<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-T))}ms`),void this._start();v=p}this.clear()}}class c extends g{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const T=Date.now()+w;return{timeRemaining:()=>Math.max(0,T-Date.now())}}}a.PriorityTaskQueue=c,a.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends g{_requestCallback(C){return requestIdleCallback(C)}_cancelCallback(C){cancelIdleCallback(C)}}:c,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(C){this._queue.clear(),this._queue.enqueue(C)}flush(){this._queue.flush()}}},9282:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const h=u(643);a.updateWindowsModeWrappedState=function(g){const c=g.buffer.lines.get(g.buffer.ybase+g.buffer.y-1),C=c==null?void 0:c.get(g.cols-1),w=g.buffer.lines.get(g.buffer.ybase+g.buffer.y);w&&C&&(w.isWrapped=C[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&C[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(_,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,C=0){this._ext=0,this._urlId=0,this._ext=c,this._urlId=C}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=h},9092:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const h=u(6349),g=u(7226),c=u(3734),C=u(8437),w=u(4634),T=u(511),x=u(643),v=u(4863),p=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=C.DEFAULT_ATTR_DATA.clone(),this.savedCharset=p.DEFAULT_CHARSET,this.markers=[],this._nullCell=T.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=T.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new g.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 C.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=C.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(C.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 k=0;k<this.lines.length;k++)R+=+this.lines.get(k).resize(d,E);let L=0;if(this._rows<m)for(let k=this._rows;k<m;k++)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 C.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 C.BufferLine(d,E)));else for(let k=this._rows;k>m;k--)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 k=this.lines.length-A;k>0&&(this.lines.trimStart(k),this.ybase=Math.max(this.ybase-k,0),this.ydisp=Math.max(this.ydisp-k,0),this.savedY=Math.max(this.savedY-k,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(C.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(C.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 C.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(C.DEFAULT_ATTR_DATA),R=[];let A=0;for(let L=this.lines.length-1;L>=0;L--){let k=this.lines.get(L);if(!k||!k.isWrapped&&k.getTrimmedLength()<=d)continue;const O=[k];for(;k.isWrapped&&L>0;)k=this.lines.get(--L),O.unshift(k);const j=this.ybase+this.y;if(j>=L&&j<L+O.length)continue;const P=O[O.length-1].getTrimmedLength(),V=(0,w.reflowSmallerGetNewLineLengths)(O,this._cols,d),q=V.length-O.length;let Y;Y=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+q):Math.max(0,this.lines.length-this.lines.maxLength+q);const $=[];for(let B=0;B<q;B++){const I=this.getBlankLine(C.DEFAULT_ATTR_DATA,!0);$.push(I)}$.length>0&&(R.push({start:L+O.length+A,newLines:$}),A+=$.length),O.push(...$);let G=V.length-1,J=V[G];J===0&&(G--,J=V[G]);let ne=O.length-q-1,z=P;for(;ne>=0;){const B=Math.min(z,J);if(O[G]===void 0)break;if(O[G].copyCellsFrom(O[ne],z-B,J-B,B,!0),J-=B,J===0&&(G--,J=V[G]),z-=B,z===0){ne--;const I=Math.max(ne,0);z=(0,w.getWrappedLineTrimmedLength)(O,I,this._cols)}}for(let B=0;B<O.length;B++)V[B]<d&&O[B].setCell(V[B],E);let M=q-Y;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+q,this.ybase+m-1)}if(R.length>0){const L=[],k=[];for(let G=0;G<this.lines.length;G++)k.push(this.lines.get(G));const O=this.lines.length;let j=O-1,P=0,V=R[P];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+A);let q=0;for(let G=Math.min(this.lines.maxLength-1,O+A-1);G>=0;G--)if(V&&V.start>j+q){for(let J=V.newLines.length-1;J>=0;J--)this.lines.set(G--,V.newLines[J]);G++,L.push({index:j+1,amount:V.newLines.length}),q+=V.newLines.length,V=R[++P]}else this.lines.set(G,k[j--]);let Y=0;for(let G=L.length-1;G>=0;G--)L[G].index+=Y,this.lines.onInsertEmitter.fire(L[G]),Y+=L[G].amount;const $=Math.max(0,O+A-this.lines.maxLength);$>0&&this.lines.onTrimEmitter.fire($)}}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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const h=u(3734),g=u(511),c=u(643),C=u(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let w=0;class T{constructor(v,p,d=!1){this.isWrapped=d,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const m=p||g.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 p=this._data[3*v+0],d=2097151&p;return[this._data[3*v+1],2097152&p?this._combined[v]:d?(0,C.stringFromCodePoint)(d):"",p>>22,2097152&p?this._combined[v].charCodeAt(this._combined[v].length-1):d]}set(v,p){this._data[3*v+1]=p[c.CHAR_DATA_ATTR_INDEX],p[c.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=p[1],this._data[3*v+0]=2097152|v|p[c.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=p[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|p[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 p=this._data[3*v+0];return 2097152&p?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&p}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const p=this._data[3*v+0];return 2097152&p?this._combined[v]:2097151&p?(0,C.stringFromCodePoint)(2097151&p):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,p){return w=3*v,p.content=this._data[w+0],p.fg=this._data[w+1],p.bg=this._data[w+2],2097152&p.content&&(p.combinedData=this._combined[v]),268435456&p.bg&&(p.extended=this._extendedAttrs[v]),p}setCell(v,p){2097152&p.content&&(this._combined[v]=p.combinedData),268435456&p.bg&&(this._extendedAttrs[v]=p.extended),this._data[3*v+0]=p.content,this._data[3*v+1]=p.fg,this._data[3*v+2]=p.bg}setCellFromCodepoint(v,p,d,m){268435456&m.bg&&(this._extendedAttrs[v]=m.extended),this._data[3*v+0]=p|d<<22,this._data[3*v+1]=m.fg,this._data[3*v+2]=m.bg}addCodepointToCell(v,p,d){let m=this._data[3*v+0];2097152&m?this._combined[v]+=(0,C.stringFromCodePoint)(p):2097151&m?(this._combined[v]=(0,C.stringFromCodePoint)(2097151&m)+(0,C.stringFromCodePoint)(p),m&=-2097152,m|=2097152):m=p|4194304,d&&(m&=-12582913,m|=d<<22),this._data[3*v+0]=m}insertCells(v,p,d){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,d),p<this.length-v){const m=new g.CellData;for(let E=this.length-v-p-1;E>=0;--E)this.setCell(v+p+E,this.loadCell(v+E,m));for(let E=0;E<p;++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,p,d){if(v%=this.length,p<this.length-v){const m=new g.CellData;for(let E=0;E<this.length-v-p;++E)this.setCell(v+E,this.loadCell(v+p+E,m));for(let E=this.length-p;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,p,d,m=!1){if(m)for(v&&this.getWidth(v-1)===2&&!this.isProtected(v-1)&&this.setCellFromCodepoint(v-1,0,1,d),p<this.length&&this.getWidth(p-1)===2&&!this.isProtected(p)&&this.setCellFromCodepoint(p,0,1,d);v<p&&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),p<this.length&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p,0,1,d);v<p&&v<this.length;)this.setCell(v++,d)}resize(v,p){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,p)}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,p=!1){if(p)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 p in v._combined)this._combined[p]=v._combined[p];this._extendedAttrs={};for(const p in v._extendedAttrs)this._extendedAttrs[p]=v._extendedAttrs[p];this.isWrapped=v.isWrapped}clone(){const v=new T(0);v._data=new Uint32Array(this._data),v.length=this.length;for(const p in this._combined)v._combined[p]=this._combined[p];for(const p in this._extendedAttrs)v._extendedAttrs[p]=this._extendedAttrs[p];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,p,d,m,E){const R=v._data;if(E)for(let L=m-1;L>=0;L--){for(let k=0;k<3;k++)this._data[3*(d+L)+k]=R[3*(p+L)+k];268435456&R[3*(p+L)+2]&&(this._extendedAttrs[d+L]=v._extendedAttrs[p+L])}else for(let L=0;L<m;L++){for(let k=0;k<3;k++)this._data[3*(d+L)+k]=R[3*(p+L)+k];268435456&R[3*(p+L)+2]&&(this._extendedAttrs[d+L]=v._extendedAttrs[p+L])}const A=Object.keys(v._combined);for(let L=0;L<A.length;L++){const k=parseInt(A[L],10);k>=p&&(this._combined[k-p+d]=v._combined[k])}}translateToString(v,p,d,m){p=p??0,d=d??this.length,v&&(d=Math.min(d,this.getTrimmedLength())),m&&(m.length=0);let E="";for(;p<d;){const R=this._data[3*p+0],A=2097151&R,L=2097152&R?this._combined[p]:A?(0,C.stringFromCodePoint)(A):c.WHITESPACE_CELL_CHAR;if(E+=L,m)for(let k=0;k<L.length;++k)m.push(p);p+=R>>22||1}return m&&m.push(p),E}}a.BufferLine=T},4841:(_,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:(_,a)=>{function u(h,g,c){if(g===h.length-1)return h[g].getTrimmedLength();const C=!h[g].hasContent(c-1)&&h[g].getWidth(c-1)===1,w=h[g+1].getWidth(0)===2;return C&&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,g,c,C,w){const T=[];for(let x=0;x<h.length-1;x++){let v=x,p=h.get(++v);if(!p.isWrapped)continue;const d=[h.get(x)];for(;v<h.length&&p.isWrapped;)d.push(p),p=h.get(++v);if(C>=x&&C<v){x+=d.length-1;continue}let m=0,E=u(d,m,g),R=1,A=0;for(;R<d.length;){const k=u(d,R,g),O=k-A,j=c-E,P=Math.min(O,j);d[m].copyCellsFrom(d[R],A,E,P,!1),E+=P,E===c&&(m++,E=0),A+=P,A===k&&(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 k=d.length-1;k>0&&(k>m||d[k].getTrimmedLength()===0);k--)L++;L>0&&(T.push(x+d.length-L),T.push(L)),x+=d.length-1}return T},a.reflowLargerCreateNewLayout=function(h,g){const c=[];let C=0,w=g[C],T=0;for(let x=0;x<h.length;x++)if(w===x){const v=g[++C];h.onDeleteEmitter.fire({index:x-T,amount:v}),x+=v-1,T+=v,w=g[++C]}else c.push(x);return{layout:c,countRemoved:T}},a.reflowLargerApplyNewLayout=function(h,g){const c=[];for(let C=0;C<g.length;C++)c.push(h.get(g[C]));for(let C=0;C<c.length;C++)h.set(C,c[C]);h.length=g.length},a.reflowSmallerGetNewLineLengths=function(h,g,c){const C=[],w=h.map(((p,d)=>u(h,d,g))).reduce(((p,d)=>p+d));let T=0,x=0,v=0;for(;v<w;){if(w-v<c){C.push(w-v);break}T+=c;const p=u(h,x,g);T>p&&(T-=p,x++);const d=h[x].getWidth(T-1)===2;d&&T--;const m=d?c-1:c;C.push(m),v+=m}return C},a.getWrappedLineTrimmedLength=u},5295:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const h=u(8460),g=u(844),c=u(9092);class C extends g.Disposable{constructor(T,x){super(),this._optionsService=T,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(T){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(T),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(T,x){this._normal.resize(T,x),this._alt.resize(T,x),this.setupTabStops(T)}setupTabStops(T){this._normal.setupTabStops(T),this._alt.setupTabStops(T)}}a.BufferSet=C},511:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=u(482),g=u(643),c=u(3734);class C extends c.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new c.ExtendedAttrs,this.combinedData=""}static fromCharData(T){const x=new C;return x.setFromCharData(T),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(T){this.fg=T[g.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(T[g.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(T[g.CHAR_DATA_CHAR_INDEX].length===2){const v=T[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const p=T[g.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=p&&p<=57343?this.content=1024*(v-55296)+p-56320+65536|T[g.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=T[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|T[g.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=T[g.CHAR_DATA_CHAR_INDEX],this.content=2097152|T[g.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=C},643:(_,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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const h=u(8460),g=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,g.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}a.Marker=c,c._nextId=1},7116:(_,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:(_,a)=>{var u,h,g;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}\\`})(g||(a.C1_ESCAPED=g={}))},7399:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=u(2584),g={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,C,w,T){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=C?h.C0.ESC+"OA":h.C0.ESC+"[A":c.key==="UIKeyInputLeftArrow"?x.key=C?h.C0.ESC+"OD":h.C0.ESC+"[D":c.key==="UIKeyInputRightArrow"?x.key=C?h.C0.ESC+"OC":h.C0.ESC+"[C":c.key==="UIKeyInputDownArrow"&&(x.key=C?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=C?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=C?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=C?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=C?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":C?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:x.key=v?h.C0.ESC+"[1;"+(v+1)+"F":C?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&&!T||!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=g[c.keyCode],d=p==null?void 0:p[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:(_,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,g=u.length){let c="";for(let C=h;C<g;++C){let w=u[C];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 g=u.length;if(!g)return 0;let c=0,C=0;if(this._interim){const w=u.charCodeAt(C++);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=C;w<g;++w){const T=u.charCodeAt(w);if(55296<=T&&T<=56319){if(++w>=g)return this._interim=T,c;const x=u.charCodeAt(w);56320<=x&&x<=57343?h[c++]=1024*(T-55296)+x-56320+65536:(h[c++]=T,h[c++]=x)}else T!==65279&&(h[c++]=T)}return c}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,h){const g=u.length;if(!g)return 0;let c,C,w,T,x=0,v=0,p=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 k=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,O=k-L;for(;p<O;){if(p>=g)return 0;if(A=u[p++],(192&A)!=128){p--,E=!0;break}this.interim[L++]=A,R<<=6,R|=63&A}E||(k===2?R<128?p--:h[x++]=R:k===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=g-4;let m=p;for(;m<g;){for(;!(!(m<d)||128&(c=u[m])||128&(C=u[m+1])||128&(w=u[m+2])||128&(T=u[m+3]));)h[x++]=c,h[x++]=C,h[x++]=w,h[x++]=T,m+=4;if(c=u[m++],c<128)h[x++]=c;else if((224&c)==192){if(m>=g)return this.interim[0]=c,x;if(C=u[m++],(192&C)!=128){m--;continue}if(v=(31&c)<<6|63&C,v<128){m--;continue}h[x++]=v}else if((240&c)==224){if(m>=g)return this.interim[0]=c,x;if(C=u[m++],(192&C)!=128){m--;continue}if(m>=g)return this.interim[0]=c,this.interim[1]=C,x;if(w=u[m++],(192&w)!=128){m--;continue}if(v=(15&c)<<12|(63&C)<<6|63&w,v<2048||v>=55296&&v<=57343||v===65279)continue;h[x++]=v}else if((248&c)==240){if(m>=g)return this.interim[0]=c,x;if(C=u[m++],(192&C)!=128){m--;continue}if(m>=g)return this.interim[0]=c,this.interim[1]=C,x;if(w=u[m++],(192&w)!=128){m--;continue}if(m>=g)return this.interim[0]=c,this.interim[1]=C,this.interim[2]=w,x;if(T=u[m++],(192&T)!=128){m--;continue}if(v=(7&c)<<18|(63&C)<<12|(63&w)<<6|63&T,v<65536||v>1114111)continue;h[x++]=v}}return x}}},225:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const h=u(1480),g=[[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 C;a.UnicodeV6=class{constructor(){if(this.version="6",!C){C=new Uint8Array(65536),C.fill(1),C[0]=0,C.fill(0,1,32),C.fill(0,127,160),C.fill(2,4352,4448),C[9001]=2,C[9002]=2,C.fill(2,11904,42192),C[12351]=1,C.fill(2,44032,55204),C.fill(2,63744,64256),C.fill(2,65040,65050),C.fill(2,65072,65136),C.fill(2,65280,65377),C.fill(2,65504,65511);for(let w=0;w<g.length;++w)C.fill(0,g[w][0],g[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?C[w]:(function(T,x){let v,p=0,d=x.length-1;if(T<x[0][0]||T>x[d][1])return!1;for(;d>=p;)if(v=p+d>>1,T>x[v][1])p=v+1;else{if(!(T<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,T){let x=this.wcwidth(w),v=x===0&&T!==0;if(v){const p=h.UnicodeService.extractWidth(T);p===0?v=!1:p>x&&(x=p)}return h.UnicodeService.createPropertyValue(0,x,v)}}},5981:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const h=u(8460),g=u(844);class c extends g.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,T){if(T!==void 0&&this._syncCalls>T)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,T){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(T),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(T)}_innerWrite(w=0,T=!0){const x=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],p=this._action(v,T);if(p){const m=E=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,E))):this._innerWrite(x,E);return void p.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:(_,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 g(c,C){const w=c.toString(16),T=w.length<2?"0"+w:w;switch(C){case 4:return w[0];case 8:return T;case 12:return(T+T).slice(0,3);default:return T+T}}a.parseColor=function(c){if(!c)return;let C=c.toLowerCase();if(C.indexOf("rgb:")===0){C=C.slice(4);const w=u.exec(C);if(w){const T=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/T*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/T*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/T*255)]}}else if(C.indexOf("#")===0&&(C=C.slice(1),h.exec(C)&&[3,6,9,12].includes(C.length))){const w=C.length/3,T=[0,0,0];for(let x=0;x<3;++x){const v=parseInt(C.slice(w*x,w*x+w),16);T[x]=w===1?v<<4:w===2?v:w===3?v>>4:v>>8}return T}},a.toRgbString=function(c,C=16){const[w,T,x]=c;return`rgb:${g(w,C)}/${g(T,C)}/${g(x,C)}`}},5770:(_,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const h=u(482),g=u(8742),c=u(5770),C=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=C,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=C}registerHandler(T,x){this._handlers[T]===void 0&&(this._handlers[T]=[]);const v=this._handlers[T];return v.push(x),{dispose:()=>{const p=v.indexOf(x);p!==-1&&v.splice(p,1)}}}clearHandler(T){this._handlers[T]&&delete this._handlers[T]}setHandlerFallback(T){this._handlerFb=T}reset(){if(this._active.length)for(let T=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;T>=0;--T)this._active[T].unhook(!1);this._stack.paused=!1,this._active=C,this._ident=0}hook(T,x){if(this.reset(),this._ident=T,this._active=this._handlers[T]||C,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(T,x,v){if(this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].put(T,x,v);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(T,x,v))}unhook(T,x=!0){if(this._active.length){let v=!1,p=this._active.length-1,d=!1;if(this._stack.paused&&(p=this._stack.loopPosition-1,v=x,d=this._stack.fallThrough,this._stack.paused=!1),!d&&v===!1){for(;p>=0&&(v=this._active[p].unhook(T),v!==!0);p--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!1,v;p--}for(;p>=0;p--)if(v=this._active[p].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",T);this._active=C,this._ident=0}};const w=new g.Params;w.addParam(0),a.DcsHandler=class{constructor(T){this._handler=T,this._data="",this._params=w,this._hitLimit=!1}hook(T){this._params=T.length>1||T.params[0]?T.clone():w,this._data="",this._hitLimit=!1}put(T,x,v){this._hitLimit||(this._data+=(0,h.utf32ToString)(T,x,v),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(T){let x=!1;if(this._hitLimit)x=!1;else if(T&&(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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const h=u(844),g=u(8742),c=u(6242),C=u(6351);class w{constructor(p){this.table=new Uint8Array(p)}setDefault(p,d){this.table.fill(p<<4|d)}add(p,d,m,E){this.table[d<<8|p]=m<<4|E}addMany(p,d,m,E){for(let R=0;R<p.length;R++)this.table[d<<8|p[R]]=m<<4|E}}a.TransitionTable=w;const T=160;a.VT500_TRANSITION_TABLE=(function(){const v=new w(4095),p=Array.apply(null,Array(256)).map(((L,k)=>k)),d=(L,k)=>p.slice(L,k),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(T,0,2,0),v.add(T,8,5,8),v.add(T,6,0,6),v.add(T,11,0,11),v.add(T,13,13,13),v})();class x extends h.Disposable{constructor(p=a.VT500_TRANSITION_TABLE){super(),this._transitions=p,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new g.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 C.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(p,d=[64,126]){let m=0;if(p.prefix){if(p.prefix.length>1)throw new Error("only one byte as prefix supported");if(m=p.prefix.charCodeAt(0),m&&60>m||m>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(p.intermediates){if(p.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let R=0;R<p.intermediates.length;++R){const A=p.intermediates.charCodeAt(R);if(32>A||A>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");m<<=8,m|=A}}if(p.final.length!==1)throw new Error("final must be a single byte");const E=p.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(p){const d=[];for(;p;)d.push(String.fromCharCode(255&p)),p>>=8;return d.reverse().join("")}setPrintHandler(p){this._printHandler=p}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(p,d){const m=this._identifier(p,[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(p){this._escHandlers[this._identifier(p,[48,126])]&&delete this._escHandlers[this._identifier(p,[48,126])]}setEscHandlerFallback(p){this._escHandlerFb=p}setExecuteHandler(p,d){this._executeHandlers[p.charCodeAt(0)]=d}clearExecuteHandler(p){this._executeHandlers[p.charCodeAt(0)]&&delete this._executeHandlers[p.charCodeAt(0)]}setExecuteHandlerFallback(p){this._executeHandlerFb=p}registerCsiHandler(p,d){const m=this._identifier(p);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(p){this._csiHandlers[this._identifier(p)]&&delete this._csiHandlers[this._identifier(p)]}setCsiHandlerFallback(p){this._csiHandlerFb=p}registerDcsHandler(p,d){return this._dcsParser.registerHandler(this._identifier(p),d)}clearDcsHandler(p){this._dcsParser.clearHandler(this._identifier(p))}setDcsHandlerFallback(p){this._dcsParser.setHandlerFallback(p)}registerOscHandler(p,d){return this._oscParser.registerHandler(p,d)}clearOscHandler(p){this._oscParser.clearHandler(p)}setOscHandlerFallback(p){this._oscParser.setHandlerFallback(p)}setErrorHandler(p){this._errorHandler=p}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(p,d,m,E,R){this._parseStack.state=p,this._parseStack.handlers=d,this._parseStack.handlerPos=m,this._parseStack.transition=E,this._parseStack.chunkPos=R}parse(p,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 k=this._parseStack.handlers;let O=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(m===!1&&O>-1){for(;O>=0&&(E=k[O](this._params),E!==!0);O--)if(E instanceof Promise)return this._parseStack.handlerPos=O,E}this._parseStack.handlers=[];break;case 4:if(m===!1&&O>-1){for(;O>=0&&(E=k[O](),E!==!0);O--)if(E instanceof Promise)return this._parseStack.handlerPos=O,E}this._parseStack.handlers=[];break;case 6:if(R=p[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=p[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 k=L;k<d;++k){switch(R=p[k],A=this._transitions.table[this.currentState<<8|(R<160?R:T)],A>>4){case 2:for(let q=k+1;;++q){if(q>=d||(R=p[q])<32||R>126&&R<T){this._printHandler(p,k,q),k=q-1;break}if(++q>=d||(R=p[q])<32||R>126&&R<T){this._printHandler(p,k,q),k=q-1;break}if(++q>=d||(R=p[q])<32||R>126&&R<T){this._printHandler(p,k,q),k=q-1;break}if(++q>=d||(R=p[q])<32||R>126&&R<T){this._printHandler(p,k,q),k=q-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:k,code:R,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const O=this._csiHandlers[this._collect<<8|R];let j=O?O.length-1:-1;for(;j>=0&&(E=O[j](this._params),E!==!0);j--)if(E instanceof Promise)return this._preserveStack(3,O,j,A,k),E;j<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(++k<d&&(R=p[k])>47&&R<60);k--;break;case 9:this._collect<<=8,this._collect|=R;break;case 10:const P=this._escHandlers[this._collect<<8|R];let V=P?P.length-1:-1;for(;V>=0&&(E=P[V](),E!==!0);V--)if(E instanceof Promise)return this._preserveStack(4,P,V,A,k),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 q=k+1;;++q)if(q>=d||(R=p[q])===24||R===26||R===27||R>127&&R<T){this._dcsParser.put(p,k,q),k=q-1;break}break;case 14:if(E=this._dcsParser.unhook(R!==24&&R!==26),E)return this._preserveStack(6,[],0,A,k),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 q=k+1;;q++)if(q>=d||(R=p[q])<32||R>127&&R<T){this._oscParser.put(p,k,q),k=q-1;break}break;case 6:if(E=this._oscParser.end(R!==24&&R!==26),E)return this._preserveStack(5,[],0,A,k),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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const h=u(5770),g=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(C,w){this._handlers[C]===void 0&&(this._handlers[C]=[]);const T=this._handlers[C];return T.push(w),{dispose:()=>{const x=T.indexOf(w);x!==-1&&T.splice(x,1)}}}clearHandler(C){this._handlers[C]&&delete this._handlers[C]}setHandlerFallback(C){this._handlerFb=C}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=c}reset(){if(this._state===2)for(let C=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;C>=0;--C)this._active[C].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 C=this._active.length-1;C>=0;C--)this._active[C].start();else this._handlerFb(this._id,"START")}_put(C,w,T){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(C,w,T);else this._handlerFb(this._id,"PUT",(0,g.utf32ToString)(C,w,T))}start(){this.reset(),this._state=1}put(C,w,T){if(this._state!==3){if(this._state===1)for(;w<T;){const x=C[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&&T-w>0&&this._put(C,w,T)}}end(C,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let T=!1,x=this._active.length-1,v=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,T=w,v=this._stack.fallThrough,this._stack.paused=!1),!v&&T===!1){for(;x>=0&&(T=this._active[x].end(C),T!==!0);x--)if(T instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,T;x--}for(;x>=0;x--)if(T=this._active[x].end(!1),T instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,T}else this._handlerFb(this._id,"END",C);this._active=c,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(C){this._handler=C,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(C,w,T){this._hitLimit||(this._data+=(0,g.utf32ToString)(C,w,T),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(C){let w=!1;if(this._hitLimit)w=!1;else if(C&&(w=this._handler(this._data),w instanceof Promise))return w.then((T=>(this._data="",this._hitLimit=!1,T)));return this._data="",this._hitLimit=!1,w}}},8742:(_,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const u=2147483647;class h{static fromArray(c){const C=new h;if(!c.length)return C;for(let w=Array.isArray(c[0])?1:0;w<c.length;++w){const T=c[w];if(Array.isArray(T))for(let x=0;x<T.length;++x)C.addSubParam(T[x]);else C.addParam(T)}return C}constructor(c=32,C=32){if(this.maxLength=c,this.maxSubParamsLength=C,C>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(c),this.length=0,this._subParams=new Int32Array(C),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 C=0;C<this.length;++C){c.push(this.params[C]);const w=this._subParamsIdx[C]>>8,T=255&this._subParamsIdx[C];T-w>0&&c.push(Array.prototype.slice.call(this._subParams,w,T))}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 C=this._subParamsIdx[c]>>8,w=255&this._subParamsIdx[c];return w-C>0?this._subParams.subarray(C,w):null}getSubParamsAll(){const c={};for(let C=0;C<this.length;++C){const w=this._subParamsIdx[C]>>8,T=255&this._subParamsIdx[C];T-w>0&&(c[C]=this._subParams.slice(w,T))}return c}addDigit(c){let C;if(this._rejectDigits||!(C=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,T=w[C-1];w[C-1]=~T?Math.min(10*T+c,u):c}}a.Params=h},5741:(_,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 g={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(g),h.dispose=()=>this._wrappedAddonDispose(g),h.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let h=-1;for(let g=0;g<this._addons.length;g++)if(this._addons[g]===u){h=g;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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const h=u(3785),g=u(511);a.BufferApiView=class{constructor(c,C){this._buffer=c,this.type=C}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 C=this._buffer.lines.get(c);if(C)return new h.BufferLineApiView(C)}getNullCell(){return new g.CellData}}},3785:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=u(511);a.BufferLineApiView=class{constructor(g){this._line=g}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(g,c){if(!(g<0||g>=this._line.length))return c?(this._line.loadCell(g,c),c):this._line.loadCell(g,new h.CellData)}translateToString(g,c,C){return this._line.translateToString(g,c,C)}}},8285:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=u(8771),g=u(8460),c=u(844);class C extends c.Disposable{constructor(T){super(),this._core=T,this._onBufferChange=this.register(new g.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=C},7975:(_,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,(g=>h(g.toArray())))}addCsiHandler(u,h){return this.registerCsiHandler(u,h)}registerDcsHandler(u,h){return this._core.registerDcsHandler(u,((g,c)=>h(g,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:(_,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(_,a,u){var h=this&&this.__decorate||function(v,p,d,m){var E,R=arguments.length,A=R<3?p:m===null?m=Object.getOwnPropertyDescriptor(p,d):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(v,p,d,m);else for(var L=v.length-1;L>=0;L--)(E=v[L])&&(A=(R<3?E(A):R>3?E(p,d,A):E(p,d))||A);return R>3&&A&&Object.defineProperty(p,d,A),A},g=this&&this.__param||function(v,p){return function(d,m){p(d,m,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const c=u(8460),C=u(844),w=u(5295),T=u(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends C.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,p){this.cols=v,this.rows=p,this.buffers.resize(v,p),this._onResize.fire({cols:v,rows:p})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,p=!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,p),this._cachedBlankLine=m),m.isWrapped=p;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,p,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&&(p||this._onScroll.fire(m.ydisp))}};a.BufferService=x=h([g(0,T.IOptionsService)],x)},7994:(_,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(_,a,u){var h=this&&this.__decorate||function(m,E,R,A){var L,k=arguments.length,O=k<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,R):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(m,E,R,A);else for(var j=m.length-1;j>=0;j--)(L=m[j])&&(O=(k<3?L(O):k>3?L(E,R,O):L(E,R))||O);return k>3&&O&&Object.defineProperty(E,R,O),O},g=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),C=u(8460),w=u(844),T={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,p={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 C.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const R of Object.keys(T))this.addProtocol(R,T[R]);for(const R of Object.keys(p))this.addEncoding(R,p[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([g(0,c.IBufferService),g(1,c.ICoreService)],d)},6975:function(_,a,u){var h=this&&this.__decorate||function(d,m,E,R){var A,L=arguments.length,k=L<3?m:R===null?R=Object.getOwnPropertyDescriptor(m,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(d,m,E,R);else for(var O=d.length-1;O>=0;O--)(A=d[O])&&(k=(L<3?A(k):L>3?A(m,E,k):A(m,E))||k);return L>3&&k&&Object.defineProperty(m,E,k),k},g=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),C=u(8460),w=u(844),T=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 p=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 C.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new C.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new C.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new C.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=p=h([g(0,T.IBufferService),g(1,T.ILogService),g(2,T.IOptionsService)],p)},9074:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=u(8055),g=u(8460),c=u(844),C=u(6106);let w=0,T=0;class x extends c.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new C.SortedList((d=>d==null?void 0:d.marker.line)),this._onDecorationRegistered=this.register(new g.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new g.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,T=w+(A.options.width??1),d>=w&&d<T&&(!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 g.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new g.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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const h=u(2585),g=u(8343);class c{constructor(...w){this._entries=new Map;for(const[T,x]of w)this.set(T,x)}set(w,T){const x=this._entries.get(w);return this._entries.set(w,T),x}forEach(w){for(const[T,x]of this._entries.entries())w(T,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(C,w){this._services.set(C,w)}getService(C){return this._services.get(C)}createInstance(C,...w){const T=(0,g.getServiceDependencies)(C).sort(((p,d)=>p.index-d.index)),x=[];for(const p of T){const d=this._services.get(p.id);if(!d)throw new Error(`[createInstance] ${C.name} depends on UNKNOWN service ${p.id}.`);x.push(d)}const v=T.length>0?T[0].index:w.length;if(w.length!==v)throw new Error(`[createInstance] First service dependency of ${C.name} at position ${v+1} conflicts with ${w.length} static arguments`);return new C(...w,...x)}}},7866:function(_,a,u){var h=this&&this.__decorate||function(v,p,d,m){var E,R=arguments.length,A=R<3?p:m===null?m=Object.getOwnPropertyDescriptor(p,d):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(v,p,d,m);else for(var L=v.length-1;L>=0;L--)(E=v[L])&&(A=(R<3?E(A):R>3?E(p,d,A):E(p,d))||A);return R>3&&A&&Object.defineProperty(p,d,A),A},g=this&&this.__param||function(v,p){return function(d,m){p(d,m,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const c=u(844),C=u(2585),w={trace:C.LogLevelEnum.TRACE,debug:C.LogLevelEnum.DEBUG,info:C.LogLevelEnum.INFO,warn:C.LogLevelEnum.WARN,error:C.LogLevelEnum.ERROR,off:C.LogLevelEnum.OFF};let T,x=a.LogService=class extends c.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=C.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),T=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let p=0;p<v.length;p++)typeof v[p]=="function"&&(v[p]=v[p]())}_log(v,p,d){this._evalLazyOptionalParams(d),v.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+p,...d)}trace(v,...p){var d;this._logLevel<=C.LogLevelEnum.TRACE&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.trace.bind(this._optionsService.options.logger))??console.log,v,p)}debug(v,...p){var d;this._logLevel<=C.LogLevelEnum.DEBUG&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.debug.bind(this._optionsService.options.logger))??console.log,v,p)}info(v,...p){var d;this._logLevel<=C.LogLevelEnum.INFO&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.info.bind(this._optionsService.options.logger))??console.info,v,p)}warn(v,...p){var d;this._logLevel<=C.LogLevelEnum.WARN&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.warn.bind(this._optionsService.options.logger))??console.warn,v,p)}error(v,...p){var d;this._logLevel<=C.LogLevelEnum.ERROR&&this._log(((d=this._optionsService.options.logger)==null?void 0:d.error.bind(this._optionsService.options.logger))??console.error,v,p)}};a.LogService=x=h([g(0,C.IOptionsService)],x),a.setTraceLogger=function(v){T=v},a.traceCall=function(v,p,d){if(typeof d.value!="function")throw new Error("not supported");const m=d.value;d.value=function(...E){if(T.logLevel!==C.LogLevelEnum.TRACE)return m.apply(this,E);T.trace(`GlyphRenderer#${m.name}(${E.map((A=>JSON.stringify(A))).join(", ")})`);const R=m.apply(this,E);return T.trace(`GlyphRenderer#${m.name} return`,R),R}}},7302:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const h=u(8460),g=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 C=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends g.Disposable{constructor(x){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...a.DEFAULT_OPTIONS};for(const p in x)if(p in v)try{const d=x[p];v[p]=this._sanitizeAndValidateOption(p,d)}catch(d){console.error(d)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,g.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,v){return this.onOptionChange((p=>{p===x&&v(this.rawOptions[x])}))}onMultipleOptionChange(x,v){return this.onOptionChange((p=>{x.indexOf(p)!==-1&&v()}))}_setupOptions(){const x=p=>{if(!(p in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${p}"`);return this.rawOptions[p]},v=(p,d)=>{if(!(p in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${p}"`);d=this._sanitizeAndValidateOption(p,d),this.rawOptions[p]!==d&&(this.rawOptions[p]=d,this._onOptionChange.fire(p))};for(const p in this.rawOptions){const d={get:x.bind(this,p),set:v.bind(this,p)};Object.defineProperty(this.options,p,d)}}_sanitizeAndValidateOption(x,v){switch(x){case"cursorStyle":if(v||(v=a.DEFAULT_OPTIONS[x]),!(function(p){return p==="block"||p==="underline"||p==="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=C.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(_,a,u){var h=this&&this.__decorate||function(w,T,x,v){var p,d=arguments.length,m=d<3?T:v===null?v=Object.getOwnPropertyDescriptor(T,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(w,T,x,v);else for(var E=w.length-1;E>=0;E--)(p=w[E])&&(m=(d<3?p(m):d>3?p(T,x,m):p(T,x))||m);return d>3&&m&&Object.defineProperty(T,x,m),m},g=this&&this.__param||function(w,T){return function(x,v){T(x,v,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const c=u(2585);let C=a.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const T=this._bufferService.buffer;if(w.id===void 0){const E=T.addMarker(T.ybase+T.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),p=this._entriesWithId.get(v);if(p)return this.addLineToLink(p.id,T.ybase+T.y),p.id;const d=T.addMarker(T.ybase+T.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,T){const x=this._dataByLinkId.get(w);if(x&&x.lines.every((v=>v.line!==T))){const v=this._bufferService.buffer.addMarker(T);x.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(x,v)))}}getLinkData(w){var T;return(T=this._dataByLinkId.get(w))==null?void 0:T.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,T){const x=w.lines.indexOf(T);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=C=h([g(0,c.IBufferService)],C)},8343:(_,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(g){return g[h]||[]},a.createDecorator=function(g){if(a.serviceRegistry.has(g))return a.serviceRegistry.get(g);const c=function(C,w,T){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,v,p){v[u]===v?v[h].push({id:x,index:p}):(v[h]=[{id:x,index:p}],v[u]=v)})(c,C,T)};return c.toString=()=>g,a.serviceRegistry.set(g,c),c}},2585:(_,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 g;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"})(g||(a.LogLevelEnum=g={})),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:(_,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const h=u(8460),g=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,T,x=!1){return(16777215&w)<<3|(3&T)<<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 g.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 T=0,x=0;const v=w.length;for(let p=0;p<v;++p){let d=w.charCodeAt(p);if(55296<=d&&d<=56319){if(++p>=v)return T+this.wcwidth(d);const R=w.charCodeAt(p);56320<=R&&R<=57343?d=1024*(d-55296)+R-56320+65536:T+=this.wcwidth(R)}const m=this.charProperties(d,x);let E=c.extractWidth(m);c.extractShouldJoin(m)&&(E-=c.extractWidth(x)),T+=E,x=m}return T}charProperties(w,T){return this._activeProvider.charProperties(w,T)}}a.UnicodeService=c}},o={};function S(_){var a=o[_];if(a!==void 0)return a.exports;var u=o[_]={exports:{}};return l[_].call(u.exports,u,u.exports,S),u.exports}var b={};return(()=>{var _=b;Object.defineProperty(_,"__esModule",{value:!0}),_.Terminal=void 0;const a=S(9042),u=S(3236),h=S(844),g=S(5741),c=S(8285),C=S(7975),w=S(7090),T=["cols","rows"];class x extends h.Disposable{constructor(p){super(),this._core=this.register(new u.Terminal(p)),this._addonManager=this.register(new g.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(p){if(T.includes(p))throw new Error(`Option "${p}" 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 C.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 p=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:p.applicationCursorKeys,applicationKeypadMode:p.applicationKeypad,bracketedPasteMode:p.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:d,originMode:p.origin,reverseWraparoundMode:p.reverseWraparound,sendFocusMode:p.sendFocus,wraparoundMode:p.wraparound}}get options(){return this._publicOptions}set options(p){for(const d in p)this._publicOptions[d]=p[d]}blur(){this._core.blur()}focus(){this._core.focus()}input(p,d=!0){this._core.input(p,d)}resize(p,d){this._verifyIntegers(p,d),this._core.resize(p,d)}open(p){this._core.open(p)}attachCustomKeyEventHandler(p){this._core.attachCustomKeyEventHandler(p)}attachCustomWheelEventHandler(p){this._core.attachCustomWheelEventHandler(p)}registerLinkProvider(p){return this._core.registerLinkProvider(p)}registerCharacterJoiner(p){return this._checkProposedApi(),this._core.registerCharacterJoiner(p)}deregisterCharacterJoiner(p){this._checkProposedApi(),this._core.deregisterCharacterJoiner(p)}registerMarker(p=0){return this._verifyIntegers(p),this._core.registerMarker(p)}registerDecoration(p){return this._checkProposedApi(),this._verifyPositiveIntegers(p.x??0,p.width??0,p.height??0),this._core.registerDecoration(p)}hasSelection(){return this._core.hasSelection()}select(p,d,m){this._verifyIntegers(p,d,m),this._core.select(p,d,m)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(p,d){this._verifyIntegers(p,d),this._core.selectLines(p,d)}dispose(){super.dispose()}scrollLines(p){this._verifyIntegers(p),this._core.scrollLines(p)}scrollPages(p){this._verifyIntegers(p),this._core.scrollPages(p)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(p){this._verifyIntegers(p),this._core.scrollToLine(p)}clear(){this._core.clear()}write(p,d){this._core.write(p,d)}writeln(p,d){this._core.write(p),this._core.write(`\r
|
|
57
|
+
`,d)}paste(p){this._core.paste(p)}refresh(p,d){this._verifyIntegers(p,d),this._core.refresh(p,d)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(p){this._addonManager.loadAddon(this,p)}static get strings(){return a}_verifyIntegers(...p){for(const d of p)if(d===1/0||isNaN(d)||d%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...p){for(const d of p)if(d&&(d===1/0||isNaN(d)||d%1!=0||d<0))throw new Error("This API only accepts positive integers")}}_.Terminal=x})(),b})()))})(Hu)),Hu.exports}var OS=MS();class BS{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 _,a;const b=JSON.parse(S.data);b.type==="output"?l.onOutput(b.data):b.type==="error"?(_=l.onError)==null||_.call(l,b.message):(a=l.onStatus)==null||a.call(l,b)}),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 zS({sessionId:i,active:s=!0,onEvent:l}){const o=ge.useRef(null),S=ge.useRef(null),b=ge.useRef(null),_=ge.useRef(l);return ge.useEffect(()=>{_.current=l},[l]),ge.useEffect(()=>{if(!o.current)return;const a=new OS.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:HS}),u=new DS.FitAddon;a.loadAddon(u),a.loadAddon(new LS.WebLinksAddon),a.open(o.current),b.current=a,S.current=u,u.fit(),a.focus();const h=new BS(i,{onOutput(C){a.write(C)},onStatus(C){var w;(w=_.current)==null||w.call(_,C.type)},onError(C){var w;a.writeln(`\r
|
|
58
|
+
[VCM] ${C}`),(w=_.current)==null||w.call(_,C)}}),g=a.onData(C=>{h.sendInput(C)}),c=new ResizeObserver(()=>{u.fit(),h.resize(a.cols,a.rows)});return c.observe(o.current),h.resize(a.cols,a.rows),()=>{c.disconnect(),g.dispose(),h.close(),a.dispose(),b.current=null,S.current=null}},[i]),ge.useEffect(()=>{if(!s)return;const a=window.requestAnimationFrame(()=>{const u=b.current,h=S.current;!u||!h||(h.fit(),u.focus())});return()=>window.cancelAnimationFrame(a)},[s]),F.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var a;return(a=b.current)==null?void 0:a.focus()}})}const HS={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 NS({role:i,session:s,permissionMode:l,busy:o=!1,onPermissionModeChange:S,onStart:b,onResume:_,onStop:a,onRestart:u}){const h=(s==null?void 0:s.status)==="running",g=!!(s!=null&&s.claudeSessionId&&!h),c=!h&&!(s!=null&&s.claudeSessionId),C=!!(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: ${jS(s.permissionMode)}${C?" / 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:b,children:"Start"}),F.jsx("button",{type:"button",disabled:o||!g,onClick:_,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 jS(i){return i==="dangerously-skip-permissions"?"--dangerously-skip-permissions":i}function US(i,s){const l={};return(i[i.length-1]===""?[...i,""]:i).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const IS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,PS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FS={};function qp(i,s){return(FS.jsx?PS:IS).test(i)}const qS=/[ \t\n\f\r]/g;function VS(i){return typeof i=="object"?i.type==="text"?Vp(i.value):!1:Vp(i)}function Vp(i){return i.replace(qS,"")===""}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_(i,s){const l={},o={};for(const S of i)Object.assign(l,S.property),Object.assign(o,S.normal);return new zs(l,o,s)}function ec(i){return i.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 YS=0;const Le=In(),_t=In(),tc=In(),_e=In(),tt=In(),Tr=In(),Qt=In();function In(){return 2**++YS}const ic=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:_t,commaOrSpaceSeparated:Qt,commaSeparated:Tr,number:_e,overloadedBoolean:tc,spaceSeparated:tt},Symbol.toStringTag,{value:"Module"})),Nu=Object.keys(ic);class dc extends qt{constructor(s,l,o,S){let b=-1;if(super(s,l),Yp(this,"space",S),typeof o=="number")for(;++b<Nu.length;){const _=Nu[b];Yp(this,Nu[b],(o&ic[_])===ic[_])}}}dc.prototype.defined=!0;function Yp(i,s,l){l&&(i[s]=l)}function Rr(i){const s={},l={};for(const[o,S]of Object.entries(i.properties)){const b=new dc(o,i.transform(i.attributes||{},o),S,i.space);i.mustUseProperty&&i.mustUseProperty.includes(o)&&(b.mustUseProperty=!0),s[o]=b,l[ec(o)]=o,l[ec(b.attribute)]=o}return new zs(s,l,i.space)}const H_=Rr({properties:{ariaActiveDescendant:null,ariaAtomic:_t,ariaAutoComplete:null,ariaBusy:_t,ariaChecked:_t,ariaColCount:_e,ariaColIndex:_e,ariaColSpan:_e,ariaControls:tt,ariaCurrent:null,ariaDescribedBy:tt,ariaDetails:null,ariaDisabled:_t,ariaDropEffect:tt,ariaErrorMessage:null,ariaExpanded:_t,ariaFlowTo:tt,ariaGrabbed:_t,ariaHasPopup:null,ariaHidden:_t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tt,ariaLevel:_e,ariaLive:null,ariaModal:_t,ariaMultiLine:_t,ariaMultiSelectable:_t,ariaOrientation:null,ariaOwns:tt,ariaPlaceholder:null,ariaPosInSet:_e,ariaPressed:_t,ariaReadOnly:_t,ariaRelevant:null,ariaRequired:_t,ariaRoleDescription:tt,ariaRowCount:_e,ariaRowIndex:_e,ariaRowSpan:_e,ariaSelected:_t,ariaSetSize:_e,ariaSort:null,ariaValueMax:_e,ariaValueMin:_e,ariaValueNow:_e,ariaValueText:null,role:null},transform(i,s){return s==="role"?s:"aria-"+s.slice(4).toLowerCase()}});function N_(i,s){return s in i?i[s]:s}function j_(i,s){return N_(i,s.toLowerCase())}const GS=Rr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Tr,acceptCharset:tt,accessKey:tt,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:tt,autoFocus:Le,autoPlay:Le,blocking:tt,capture:null,charSet:null,checked:Le,cite:null,className:tt,cols:_e,colSpan:null,content:null,contentEditable:_t,controls:Le,controlsList:tt,coords:_e|Tr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:tc,draggable:_t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:tt,height:_e,hidden:tc,high:_e,href:null,hrefLang:null,htmlFor:tt,httpEquiv:tt,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:tt,itemRef:tt,itemScope:Le,itemType:tt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:_e,manifest:null,max:null,maxLength:_e,media:null,method:null,min:null,minLength:_e,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,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:Le,optimum:_e,pattern:null,ping:tt,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:tt,required:Le,reversed:Le,rows:_e,rowSpan:_e,sandbox:tt,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:_e,sizes:null,slot:null,span:_e,spellCheck:_t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_e,step:null,style:null,tabIndex:_e,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:_t,width:_e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tt,axis:null,background:null,bgColor:null,border:_e,borderColor:null,bottomMargin:_e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:_e,leftMargin:_e,link:null,longDesc:null,lowSrc:null,marginHeight:_e,marginWidth:_e,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:_e,rules:null,scheme:null,scrolling:_t,standby:null,summary:null,text:null,topMargin:_e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_e,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Le,disableRemotePlayback:Le,prefix:null,property:null,results:_e,security:null,unselectable:null},space:"html",transform:j_}),KS=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:_e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_e,amplitude:_e,arabicForm:null,ascent:_e,attributeName:null,attributeType:null,azimuth:_e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_e,by:null,calcMode:null,capHeight:_e,className:tt,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:_e,diffuseConstant:_e,direction:null,display:null,dur:null,divisor:_e,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:_e,enableBackground:null,end:null,event:null,exponent:_e,externalResourcesRequired:null,fill:null,fillOpacity:_e,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:_e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_e,horizOriginX:_e,horizOriginY:_e,id:null,ideographic:_e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_e,k:_e,k1:_e,k2:_e,k3:_e,k4:_e,kernelMatrix:Qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_e,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:_e,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:_e,overlineThickness:_e,paintOrder:null,panose1:null,path:null,pathLength:_e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_e,pointsAtY:_e,pointsAtZ:_e,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:_e,specularExponent:_e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_e,strikethroughThickness:_e,string:null,stroke:null,strokeDashArray:Qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_e,strokeOpacity:_e,strokeWidth:null,style:null,surfaceScale:_e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qt,tabIndex:_e,tableValues:null,target:null,targetX:_e,targetY:_e,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:_e,underlineThickness:_e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_e,values:null,vAlphabetic:_e,vMathematical:_e,vectorEffect:null,vHanging:_e,vIdeographic:_e,version:null,vertAdvY:_e,vertOriginX:_e,vertOriginY:_e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_e,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(i,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(i,s){return"xml:"+s.slice(3).toLowerCase()}}),XS={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"},WS=/[A-Z]/g,Gp=/-[a-z]/g,$S=/^data[-\w.:]+$/i;function QS(i,s){const l=ec(s);let o=s,S=qt;if(l in i.normal)return i.property[i.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&$S.test(s)){if(s.charAt(4)==="-"){const b=s.slice(5).replace(Gp,JS);o="data"+b.charAt(0).toUpperCase()+b.slice(1)}else{const b=s.slice(4);if(!Gp.test(b)){let _=b.replace(WS,ZS);_.charAt(0)!=="-"&&(_="-"+_),s="data"+_}}S=dc}return new S(o,s)}function ZS(i){return"-"+i.toLowerCase()}function JS(i){return i.charAt(1).toUpperCase()}const e0=z_([H_,GS,U_,I_,P_],"html"),pc=z_([H_,KS,U_,I_,P_],"svg");function t0(i){return i.join(" ").trim()}var Er={},ju,Kp;function i0(){if(Kp)return ju;Kp=1;var i=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,s=/\n/g,l=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,S=/^:\s*/,b=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,_=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
|
|
59
|
+
`,h="/",g="*",c="",C="comment",w="declaration";function T(v,p){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];p=p||{};var d=1,m=1;function E(Y){var $=Y.match(s);$&&(d+=$.length);var G=Y.lastIndexOf(u);m=~G?Y.length-G:m+Y.length}function R(){var Y={line:d,column:m};return function($){return $.position=new A(Y),O(),$}}function A(Y){this.start=Y,this.end={line:d,column:m},this.source=p.source}A.prototype.content=v;function L(Y){var $=new Error(p.source+":"+d+":"+m+": "+Y);if($.reason=Y,$.filename=p.source,$.line=d,$.column=m,$.source=v,!p.silent)throw $}function k(Y){var $=Y.exec(v);if($){var G=$[0];return E(G),v=v.slice(G.length),$}}function O(){k(l)}function j(Y){var $;for(Y=Y||[];$=P();)$!==!1&&Y.push($);return Y}function P(){var Y=R();if(!(h!=v.charAt(0)||g!=v.charAt(1))){for(var $=2;c!=v.charAt($)&&(g!=v.charAt($)||h!=v.charAt($+1));)++$;if($+=2,c===v.charAt($-1))return L("End of comment missing");var G=v.slice(2,$-2);return m+=2,E(G),v=v.slice($),m+=2,Y({type:C,comment:G})}}function V(){var Y=R(),$=k(o);if($){if(P(),!k(S))return L("property missing ':'");var G=k(b),J=Y({type:w,property:x($[0].replace(i,c)),value:G?x(G[0].replace(i,c)):c});return k(_),J}}function q(){var Y=[];j(Y);for(var $;$=V();)$!==!1&&(Y.push($),j(Y));return Y}return O(),q()}function x(v){return v?v.replace(a,c):c}return ju=T,ju}var Xp;function n0(){if(Xp)return Er;Xp=1;var i=Er&&Er.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Er,"__esModule",{value:!0}),Er.default=l;const s=i(i0());function l(o,S){let b=null;if(!o||typeof o!="string")return b;const _=(0,s.default)(o),a=typeof S=="function";return _.forEach(u=>{if(u.type!=="declaration")return;const{property:h,value:g}=u;a?S(h,g,u):g&&(b=b||{},b[h]=g)}),b}return Er}var Es={},Wp;function r0(){if(Wp)return Es;Wp=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.camelCase=void 0;var i=/^--[a-zA-Z0-9_-]+$/,s=/-([a-z])/g,l=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,S=/^-(ms)-/,b=function(h){return!h||l.test(h)||i.test(h)},_=function(h,g){return g.toUpperCase()},a=function(h,g){return"".concat(g,"-")},u=function(h,g){return g===void 0&&(g={}),b(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(S,a):h=h.replace(o,a),h.replace(s,_))};return Es.camelCase=u,Es}var ks,$p;function s0(){if($p)return ks;$p=1;var i=ks&&ks.__importDefault||function(S){return S&&S.__esModule?S:{default:S}},s=i(n0()),l=r0();function o(S,b){var _={};return!S||typeof S!="string"||(0,s.default)(S,function(a,u){a&&u&&(_[(0,l.camelCase)(a,b)]=u)}),_}return o.default=o,ks=o,ks}var l0=s0();const a0=M_(l0),F_=q_("end"),_c=q_("start");function q_(i){return s;function s(l){const o=l&&l.position&&l.position[i]||{};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 o0(i){const s=_c(i),l=F_(i);if(s&&l)return{start:s,end:l}}function Ds(i){return!i||typeof i!="object"?"":"position"in i||"type"in i?Qp(i.position):"start"in i||"end"in i?Qp(i):"line"in i||"column"in i?nc(i):""}function nc(i){return Zp(i&&i.line)+":"+Zp(i&&i.column)}function Qp(i){return nc(i&&i.start)+"-"+nc(i&&i.end)}function Zp(i){return i&&typeof i=="number"?i:1}class Rt extends Error{constructor(s,l,o){super(),typeof l=="string"&&(o=l,l=void 0);let S="",b={},_=!1;if(l&&("line"in l&&"column"in l?b={place:l}:"start"in l&&"end"in l?b={place:l}:"type"in l?b={ancestors:[l],place:l.position}:b={...l}),typeof s=="string"?S=s:!b.cause&&s&&(_=!0,S=s.message,b.cause=s),!b.ruleId&&!b.source&&typeof o=="string"){const u=o.indexOf(":");u===-1?b.ruleId=o:(b.source=o.slice(0,u),b.ruleId=o.slice(u+1))}if(!b.place&&b.ancestors&&b.ancestors){const u=b.ancestors[b.ancestors.length-1];u&&(b.place=u.position)}const a=b.place&&"start"in b.place?b.place.start:b.place;this.ancestors=b.ancestors||void 0,this.cause=b.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(b.place)||"1:1",this.place=b.place||void 0,this.reason=this.message,this.ruleId=b.ruleId||void 0,this.source=b.source||void 0,this.stack=_&&b.cause&&typeof b.cause.stack=="string"?b.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,u0=new Map,c0=/[A-Z]/g,h0=new Set(["table","tbody","thead","tfoot","tr"]),f0=new Set(["td","th"]),V_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function d0(i,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=b0(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=y0(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:e0,stylePropertyNameCase:s.stylePropertyNameCase||"dom",tableCellAlignToStyle:s.tableCellAlignToStyle!==!1},b=Y_(S,i,void 0);return b&&typeof b!="string"?b:S.create(i,S.Fragment,{children:b||void 0},void 0)}function Y_(i,s,l){if(s.type==="element")return p0(i,s,l);if(s.type==="mdxFlowExpression"||s.type==="mdxTextExpression")return _0(i,s);if(s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement")return g0(i,s,l);if(s.type==="mdxjsEsm")return m0(i,s);if(s.type==="root")return v0(i,s,l);if(s.type==="text")return S0(i,s)}function p0(i,s,l){const o=i.schema;let S=o;s.tagName.toLowerCase()==="svg"&&o.space==="html"&&(S=pc,i.schema=S),i.ancestors.push(s);const b=K_(i,s.tagName,!1),_=C0(i,s);let a=vc(i,s);return h0.has(s.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!VS(u):!0})),G_(i,_,b,s),gc(_,a),i.ancestors.pop(),i.schema=o,i.create(s,b,_,l)}function _0(i,s){if(s.data&&s.data.estree&&i.evaluater){const o=s.data.estree.body[0];return o.type,i.evaluater.evaluateExpression(o.expression)}Ms(i,s.position)}function m0(i,s){if(s.data&&s.data.estree&&i.evaluater)return i.evaluater.evaluateProgram(s.data.estree);Ms(i,s.position)}function g0(i,s,l){const o=i.schema;let S=o;s.name==="svg"&&o.space==="html"&&(S=pc,i.schema=S),i.ancestors.push(s);const b=s.name===null?i.Fragment:K_(i,s.name,!0),_=w0(i,s),a=vc(i,s);return G_(i,_,b,s),gc(_,a),i.ancestors.pop(),i.schema=o,i.create(s,b,_,l)}function v0(i,s,l){const o={};return gc(o,vc(i,s)),i.create(s,i.Fragment,o,l)}function S0(i,s){return s.value}function G_(i,s,l,o){typeof l!="string"&&l!==i.Fragment&&i.passNode&&(s.node=o)}function gc(i,s){if(s.length>0){const l=s.length>1?s:s[0];l&&(i.children=l)}}function y0(i,s,l){return o;function o(S,b,_,a){const h=Array.isArray(_.children)?l:s;return a?h(b,_,a):h(b,_)}}function b0(i,s){return l;function l(o,S,b,_){const a=Array.isArray(b.children),u=_c(o);return s(S,b,_,a,{columnNumber:u?u.column-1:void 0,fileName:i,lineNumber:u?u.line:void 0},void 0)}}function C0(i,s){const l={};let o,S;for(S in s.properties)if(S!=="children"&&mc.call(s.properties,S)){const b=x0(i,S,s.properties[S]);if(b){const[_,a]=b;i.tableCellAlignToStyle&&_==="align"&&typeof a=="string"&&f0.has(s.tagName)?o=a:l[_]=a}}if(o){const b=l.style||(l.style={});b[i.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return l}function w0(i,s){const l={};for(const o of s.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&i.evaluater){const b=o.data.estree.body[0];b.type;const _=b.expression;_.type;const a=_.properties[0];a.type,Object.assign(l,i.evaluater.evaluateExpression(a.argument))}else Ms(i,s.position);else{const S=o.name;let b;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&i.evaluater){const a=o.value.data.estree.body[0];a.type,b=i.evaluater.evaluateExpression(a.expression)}else Ms(i,s.position);else b=o.value===null?!0:o.value;l[S]=b}return l}function vc(i,s){const l=[];let o=-1;const S=i.passKeys?new Map:u0;for(;++o<s.children.length;){const b=s.children[o];let _;if(i.passKeys){const u=b.type==="element"?b.tagName:b.type==="mdxJsxFlowElement"||b.type==="mdxJsxTextElement"?b.name:void 0;if(u){const h=S.get(u)||0;_=u+"-"+h,S.set(u,h+1)}}const a=Y_(i,b,_);a!==void 0&&l.push(a)}return l}function x0(i,s,l){const o=QS(i.schema,s);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=o.commaSeparated?US(l):t0(l)),o.property==="style"){let S=typeof l=="object"?l:E0(i,String(l));return i.stylePropertyNameCase==="css"&&(S=k0(S)),["style",S]}return[i.elementAttributeNameCase==="react"&&o.space?XS[o.property]||o.property:o.attribute,l]}}function E0(i,s){try{return a0(s,{reactCompat:!0})}catch(l){if(i.ignoreInvalidStyle)return{};const o=l,S=new Rt("Cannot parse `style` attribute",{ancestors:i.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw S.file=i.filePath||void 0,S.url=V_+"#cannot-parse-style-attribute",S}}function K_(i,s,l){let o;if(!l)o={type:"Literal",value:s};else if(s.includes(".")){const S=s.split(".");let b=-1,_;for(;++b<S.length;){const a=qp(S[b])?{type:"Identifier",name:S[b]}:{type:"Literal",value:S[b]};_=_?{type:"MemberExpression",object:_,property:a,computed:!!(b&&a.type==="Literal"),optional:!1}:a}o=_}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(i.components,S)?i.components[S]:S}if(i.evaluater)return i.evaluater.evaluateExpression(o);Ms(i)}function Ms(i,s){const l=new Rt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:i.ancestors,place:s,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=i.filePath||void 0,l.url=V_+"#cannot-handle-mdx-estrees-without-createevaluater",l}function k0(i){const s={};let l;for(l in i)mc.call(i,l)&&(s[A0(l)]=i[l]);return s}function A0(i){let s=i.replace(c0,T0);return s.slice(0,3)==="ms-"&&(s="-"+s),s}function T0(i){return"-"+i.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"]},D0={};function Sc(i,s){const l=D0,o=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,S=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return X_(i,o,S)}function X_(i,s,l){if(R0(i)){if("value"in i)return i.type==="html"&&!l?"":i.value;if(s&&"alt"in i&&i.alt)return i.alt;if("children"in i)return Jp(i.children,s,l)}return Array.isArray(i)?Jp(i,s,l):""}function Jp(i,s,l){const o=[];let S=-1;for(;++S<i.length;)o[S]=X_(i[S],s,l);return o.join("")}function R0(i){return!!(i&&typeof i=="object")}const e_=document.createElement("i");function yc(i){const s="&"+i+";";e_.innerHTML=s;const l=e_.textContent;return l.charCodeAt(l.length-1)===59&&i!=="semi"||l===s?!1:l}function Zt(i,s,l,o){const S=i.length;let b=0,_;if(s<0?s=-s>S?0:S+s:s=s>S?S:s,l=l>0?l:0,o.length<1e4)_=Array.from(o),_.unshift(s,l),i.splice(..._);else for(l&&i.splice(s,l);b<o.length;)_=o.slice(b,b+1e4),_.unshift(s,0),i.splice(..._),b+=1e4,s+=1e4}function ui(i,s){return i.length>0?(Zt(i,i.length,0,s),i):s}const t_={}.hasOwnProperty;function W_(i){const s={};let l=-1;for(;++l<i.length;)L0(s,i[l]);return s}function L0(i,s){let l;for(l in s){const S=(t_.call(i,l)?i[l]:void 0)||(i[l]={}),b=s[l];let _;if(b)for(_ in b){t_.call(S,_)||(S[_]=[]);const a=b[_];M0(S[_],Array.isArray(a)?a:a?[a]:[])}}}function M0(i,s){let l=-1;const o=[];for(;++l<s.length;)(s[l].add==="after"?i:o).push(s[l]);Zt(i,0,0,o)}function $_(i,s){const l=Number.parseInt(i,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 pi(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mt=vn(/[A-Za-z]/),Dt=vn(/[\dA-Za-z]/),O0=vn(/[#-'*+\--9=?A-Z^-~]/);function sa(i){return i!==null&&(i<32||i===127)}const rc=vn(/\d/),B0=vn(/[\dA-Fa-f]/),z0=vn(/[!-/:-@[-`{-~]/);function Ce(i){return i!==null&&i<-2}function et(i){return i!==null&&(i<0||i===32)}function ze(i){return i===-2||i===-1||i===32}const ca=vn(new RegExp("\\p{P}|\\p{S}","u")),Un=vn(/\s/);function vn(i){return s;function s(l){return l!==null&&l>-1&&i.test(String.fromCharCode(l))}}function Lr(i){const s=[];let l=-1,o=0,S=0;for(;++l<i.length;){const b=i.charCodeAt(l);let _="";if(b===37&&Dt(i.charCodeAt(l+1))&&Dt(i.charCodeAt(l+2)))S=2;else if(b<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(b))||(_=String.fromCharCode(b));else if(b>55295&&b<57344){const a=i.charCodeAt(l+1);b<56320&&a>56319&&a<57344?(_=String.fromCharCode(b,a),S=1):_="�"}else _=String.fromCharCode(b);_&&(s.push(i.slice(o,l),encodeURIComponent(_)),o=l+S+1,_=""),S&&(l+=S,S=0)}return s.join("")+i.slice(o)}function Ie(i,s,l,o){const S=o?o-1:Number.POSITIVE_INFINITY;let b=0;return _;function _(u){return ze(u)?(i.enter(l),a(u)):s(u)}function a(u){return ze(u)&&b++<S?(i.consume(u),a):(i.exit(l),s(u))}}const H0={tokenize:N0};function N0(i){const s=i.attempt(this.parser.constructs.contentInitial,o,S);let l;return s;function o(a){if(a===null){i.consume(a);return}return i.enter("lineEnding"),i.consume(a),i.exit("lineEnding"),Ie(i,s,"linePrefix")}function S(a){return i.enter("paragraph"),b(a)}function b(a){const u=i.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=u),l=u,_(a)}function _(a){if(a===null){i.exit("chunkText"),i.exit("paragraph"),i.consume(a);return}return Ce(a)?(i.consume(a),i.exit("chunkText"),b):(i.consume(a),_)}}const j0={tokenize:U0},i_={tokenize:I0};function U0(i){const s=this,l=[];let o=0,S,b,_;return a;function a(m){if(o<l.length){const E=l[o];return s.containerState=E[1],i.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}p(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 C(m);if(S.currentConstruct&&S.currentConstruct.concrete)return T(m);s.interrupt=!!(S.currentConstruct&&!S._gfmTableDynamicInterruptHack)}return s.containerState={},i.check(i_,g,c)(m)}function g(m){return S&&d(),p(o),C(m)}function c(m){return s.parser.lazy[s.now().line]=o!==l.length,_=s.now().offset,T(m)}function C(m){return s.containerState={},i.attempt(i_,w,T)(m)}function w(m){return o++,l.push([s.currentConstruct,s.containerState]),C(m)}function T(m){if(m===null){S&&d(),p(0),i.consume(m);return}return S=S||s.parser.flow(s.now()),i.enter("chunkFlow",{_tokenizer:S,contentType:"flow",previous:b}),x(m)}function x(m){if(m===null){v(i.exit("chunkFlow"),!0),p(0),i.consume(m);return}return Ce(m)?(i.consume(m),v(i.exit("chunkFlow")),o=0,s.interrupt=void 0,a):(i.consume(m),x)}function v(m,E){const R=s.sliceStream(m);if(E&&R.push(null),m.previous=b,b&&(b.next=m),b=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<_&&(!S.events[A][1].end||S.events[A][1].end.offset>_))return;const L=s.events.length;let k=L,O,j;for(;k--;)if(s.events[k][0]==="exit"&&s.events[k][1].type==="chunkFlow"){if(O){j=s.events[k][1].end;break}O=!0}for(p(o),A=L;A<s.events.length;)s.events[A][1].end={...j},A++;Zt(s.events,k+1,0,s.events.slice(L)),s.events.length=A}}function p(m){let E=l.length;for(;E-- >m;){const R=l[E];s.containerState=R[1],R[0].exit.call(s,i)}l.length=m}function d(){S.write([null]),b=void 0,S=void 0,s.containerState._closeFlow=void 0}}function I0(i,s,l){return Ie(i,i.attempt(this.parser.constructs.document,s,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Dr(i){if(i===null||et(i)||Un(i))return 1;if(ca(i))return 2}function ha(i,s,l){const o=[];let S=-1;for(;++S<i.length;){const b=i[S].resolveAll;b&&!o.includes(b)&&(s=b(s,l),o.push(b))}return s}const sc={name:"attention",resolveAll:P0,tokenize:F0};function P0(i,s){let l=-1,o,S,b,_,a,u,h,g;for(;++l<i.length;)if(i[l][0]==="enter"&&i[l][1].type==="attentionSequence"&&i[l][1]._close){for(o=l;o--;)if(i[o][0]==="exit"&&i[o][1].type==="attentionSequence"&&i[o][1]._open&&s.sliceSerialize(i[o][1]).charCodeAt(0)===s.sliceSerialize(i[l][1]).charCodeAt(0)){if((i[o][1]._close||i[l][1]._open)&&(i[l][1].end.offset-i[l][1].start.offset)%3&&!((i[o][1].end.offset-i[o][1].start.offset+i[l][1].end.offset-i[l][1].start.offset)%3))continue;u=i[o][1].end.offset-i[o][1].start.offset>1&&i[l][1].end.offset-i[l][1].start.offset>1?2:1;const c={...i[o][1].end},C={...i[l][1].start};n_(c,-u),n_(C,u),_={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...i[o][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...i[l][1].start},end:C},b={type:u>1?"strongText":"emphasisText",start:{...i[o][1].end},end:{...i[l][1].start}},S={type:u>1?"strong":"emphasis",start:{..._.start},end:{...a.end}},i[o][1].end={..._.start},i[l][1].start={...a.end},h=[],i[o][1].end.offset-i[o][1].start.offset&&(h=ui(h,[["enter",i[o][1],s],["exit",i[o][1],s]])),h=ui(h,[["enter",S,s],["enter",_,s],["exit",_,s],["enter",b,s]]),h=ui(h,ha(s.parser.constructs.insideSpan.null,i.slice(o+1,l),s)),h=ui(h,[["exit",b,s],["enter",a,s],["exit",a,s],["exit",S,s]]),i[l][1].end.offset-i[l][1].start.offset?(g=2,h=ui(h,[["enter",i[l][1],s],["exit",i[l][1],s]])):g=0,Zt(i,o-1,l-o+3,h),l=o+h.length-g-2;break}}for(l=-1;++l<i.length;)i[l][1].type==="attentionSequence"&&(i[l][1].type="data");return i}function F0(i,s){const l=this.parser.constructs.attentionMarkers.null,o=this.previous,S=Dr(o);let b;return _;function _(u){return b=u,i.enter("attentionSequence"),a(u)}function a(u){if(u===b)return i.consume(u),a;const h=i.exit("attentionSequence"),g=Dr(u),c=!g||g===2&&S||l.includes(u),C=!S||S===2&&g||l.includes(o);return h._open=!!(b===42?c:c&&(S||!C)),h._close=!!(b===42?C:C&&(g||!c)),s(u)}}function n_(i,s){i.column+=s,i.offset+=s,i._bufferIndex+=s}const q0={name:"autolink",tokenize:V0};function V0(i,s,l){let o=0;return S;function S(w){return i.enter("autolink"),i.enter("autolinkMarker"),i.consume(w),i.exit("autolinkMarker"),i.enter("autolinkProtocol"),b}function b(w){return Mt(w)?(i.consume(w),_):w===64?l(w):h(w)}function _(w){return w===43||w===45||w===46||Dt(w)?(o=1,a(w)):h(w)}function a(w){return w===58?(i.consume(w),o=0,u):(w===43||w===45||w===46||Dt(w))&&o++<32?(i.consume(w),a):(o=0,h(w))}function u(w){return w===62?(i.exit("autolinkProtocol"),i.enter("autolinkMarker"),i.consume(w),i.exit("autolinkMarker"),i.exit("autolink"),s):w===null||w===32||w===60||sa(w)?l(w):(i.consume(w),u)}function h(w){return w===64?(i.consume(w),g):O0(w)?(i.consume(w),h):l(w)}function g(w){return Dt(w)?c(w):l(w)}function c(w){return w===46?(i.consume(w),o=0,g):w===62?(i.exit("autolinkProtocol").type="autolinkEmail",i.enter("autolinkMarker"),i.consume(w),i.exit("autolinkMarker"),i.exit("autolink"),s):C(w)}function C(w){if((w===45||Dt(w))&&o++<63){const T=w===45?C:c;return i.consume(w),T}return l(w)}}const Hs={partial:!0,tokenize:Y0};function Y0(i,s,l){return o;function o(b){return ze(b)?Ie(i,S,"linePrefix")(b):S(b)}function S(b){return b===null||Ce(b)?s(b):l(b)}}const Q_={continuation:{tokenize:K0},exit:X0,name:"blockQuote",tokenize:G0};function G0(i,s,l){const o=this;return S;function S(_){if(_===62){const a=o.containerState;return a.open||(i.enter("blockQuote",{_container:!0}),a.open=!0),i.enter("blockQuotePrefix"),i.enter("blockQuoteMarker"),i.consume(_),i.exit("blockQuoteMarker"),b}return l(_)}function b(_){return ze(_)?(i.enter("blockQuotePrefixWhitespace"),i.consume(_),i.exit("blockQuotePrefixWhitespace"),i.exit("blockQuotePrefix"),s):(i.exit("blockQuotePrefix"),s(_))}}function K0(i,s,l){const o=this;return S;function S(_){return ze(_)?Ie(i,b,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):b(_)}function b(_){return i.attempt(Q_,s,l)(_)}}function X0(i){i.exit("blockQuote")}const Z_={name:"characterEscape",tokenize:W0};function W0(i,s,l){return o;function o(b){return i.enter("characterEscape"),i.enter("escapeMarker"),i.consume(b),i.exit("escapeMarker"),S}function S(b){return z0(b)?(i.enter("characterEscapeValue"),i.consume(b),i.exit("characterEscapeValue"),i.exit("characterEscape"),s):l(b)}}const J_={name:"characterReference",tokenize:$0};function $0(i,s,l){const o=this;let S=0,b,_;return a;function a(c){return i.enter("characterReference"),i.enter("characterReferenceMarker"),i.consume(c),i.exit("characterReferenceMarker"),u}function u(c){return c===35?(i.enter("characterReferenceMarkerNumeric"),i.consume(c),i.exit("characterReferenceMarkerNumeric"),h):(i.enter("characterReferenceValue"),b=31,_=Dt,g(c))}function h(c){return c===88||c===120?(i.enter("characterReferenceMarkerHexadecimal"),i.consume(c),i.exit("characterReferenceMarkerHexadecimal"),i.enter("characterReferenceValue"),b=6,_=B0,g):(i.enter("characterReferenceValue"),b=7,_=rc,g(c))}function g(c){if(c===59&&S){const C=i.exit("characterReferenceValue");return _===Dt&&!yc(o.sliceSerialize(C))?l(c):(i.enter("characterReferenceMarker"),i.consume(c),i.exit("characterReferenceMarker"),i.exit("characterReference"),s)}return _(c)&&S++<b?(i.consume(c),g):l(c)}}const r_={partial:!0,tokenize:Z0},s_={concrete:!0,name:"codeFenced",tokenize:Q0};function Q0(i,s,l){const o=this,S={partial:!0,tokenize:R};let b=0,_=0,a;return u;function u(A){return h(A)}function h(A){const L=o.events[o.events.length-1];return b=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,a=A,i.enter("codeFenced"),i.enter("codeFencedFence"),i.enter("codeFencedFenceSequence"),g(A)}function g(A){return A===a?(_++,i.consume(A),g):_<3?l(A):(i.exit("codeFencedFenceSequence"),ze(A)?Ie(i,c,"whitespace")(A):c(A))}function c(A){return A===null||Ce(A)?(i.exit("codeFencedFence"),o.interrupt?s(A):i.check(r_,x,E)(A)):(i.enter("codeFencedFenceInfo"),i.enter("chunkString",{contentType:"string"}),C(A))}function C(A){return A===null||Ce(A)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),c(A)):ze(A)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),Ie(i,w,"whitespace")(A)):A===96&&A===a?l(A):(i.consume(A),C)}function w(A){return A===null||Ce(A)?c(A):(i.enter("codeFencedFenceMeta"),i.enter("chunkString",{contentType:"string"}),T(A))}function T(A){return A===null||Ce(A)?(i.exit("chunkString"),i.exit("codeFencedFenceMeta"),c(A)):A===96&&A===a?l(A):(i.consume(A),T)}function x(A){return i.attempt(S,E,v)(A)}function v(A){return i.enter("lineEnding"),i.consume(A),i.exit("lineEnding"),p}function p(A){return b>0&&ze(A)?Ie(i,d,"linePrefix",b+1)(A):d(A)}function d(A){return A===null||Ce(A)?i.check(r_,x,E)(A):(i.enter("codeFlowValue"),m(A))}function m(A){return A===null||Ce(A)?(i.exit("codeFlowValue"),d(A)):(i.consume(A),m)}function E(A){return i.exit("codeFenced"),s(A)}function R(A,L,k){let O=0;return j;function j($){return A.enter("lineEnding"),A.consume($),A.exit("lineEnding"),P}function P($){return A.enter("codeFencedFence"),ze($)?Ie(A,V,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):V($)}function V($){return $===a?(A.enter("codeFencedFenceSequence"),q($)):k($)}function q($){return $===a?(O++,A.consume($),q):O>=_?(A.exit("codeFencedFenceSequence"),ze($)?Ie(A,Y,"whitespace")($):Y($)):k($)}function Y($){return $===null||Ce($)?(A.exit("codeFencedFence"),L($)):k($)}}}function Z0(i,s,l){const o=this;return S;function S(_){return _===null?l(_):(i.enter("lineEnding"),i.consume(_),i.exit("lineEnding"),b)}function b(_){return o.parser.lazy[o.now().line]?l(_):s(_)}}const Iu={name:"codeIndented",tokenize:ey},J0={partial:!0,tokenize:ty};function ey(i,s,l){const o=this;return S;function S(h){return i.enter("codeIndented"),Ie(i,b,"linePrefix",5)(h)}function b(h){const g=o.events[o.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?_(h):l(h)}function _(h){return h===null?u(h):Ce(h)?i.attempt(J0,_,u)(h):(i.enter("codeFlowValue"),a(h))}function a(h){return h===null||Ce(h)?(i.exit("codeFlowValue"),_(h)):(i.consume(h),a)}function u(h){return i.exit("codeIndented"),s(h)}}function ty(i,s,l){const o=this;return S;function S(_){return o.parser.lazy[o.now().line]?l(_):Ce(_)?(i.enter("lineEnding"),i.consume(_),i.exit("lineEnding"),S):Ie(i,b,"linePrefix",5)(_)}function b(_){const a=o.events[o.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?s(_):Ce(_)?S(_):l(_)}}const iy={name:"codeText",previous:ry,resolve:ny,tokenize:sy};function ny(i){let s=i.length-4,l=3,o,S;if((i[l][1].type==="lineEnding"||i[l][1].type==="space")&&(i[s][1].type==="lineEnding"||i[s][1].type==="space")){for(o=l;++o<s;)if(i[o][1].type==="codeTextData"){i[l][1].type="codeTextPadding",i[s][1].type="codeTextPadding",l+=2,s-=2;break}}for(o=l-1,s++;++o<=s;)S===void 0?o!==s&&i[o][1].type!=="lineEnding"&&(S=o):(o===s||i[o][1].type==="lineEnding")&&(i[S][1].type="codeTextData",o!==S+2&&(i[S][1].end=i[o-1][1].end,i.splice(S+2,o-S-2),s-=o-S-2,o=S+2),S=void 0);return i}function ry(i){return i!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sy(i,s,l){let o=0,S,b;return _;function _(c){return i.enter("codeText"),i.enter("codeTextSequence"),a(c)}function a(c){return c===96?(i.consume(c),o++,a):(i.exit("codeTextSequence"),u(c))}function u(c){return c===null?l(c):c===32?(i.enter("space"),i.consume(c),i.exit("space"),u):c===96?(b=i.enter("codeTextSequence"),S=0,g(c)):Ce(c)?(i.enter("lineEnding"),i.consume(c),i.exit("lineEnding"),u):(i.enter("codeTextData"),h(c))}function h(c){return c===null||c===32||c===96||Ce(c)?(i.exit("codeTextData"),u(c)):(i.consume(c),h)}function g(c){return c===96?(i.consume(c),S++,g):S===o?(i.exit("codeTextSequence"),i.exit("codeText"),s(c)):(b.type="codeTextData",h(c))}}class ly{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 b=this.right.splice(this.right.length-S,Number.POSITIVE_INFINITY);return o&&As(this.left,o),b.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(i,s){let l=0;if(s.length<1e4)i.push(...s);else for(;l<s.length;)i.push(...s.slice(l,l+1e4)),l+=1e4}function em(i){const s={};let l=-1,o,S,b,_,a,u,h;const g=new ly(i);for(;++l<g.length;){for(;l in s;)l=s[l];if(o=g.get(l),l&&o[1].type==="chunkFlow"&&g.get(l-1)[1].type==="listItemPrefix"&&(u=o[1]._tokenizer.events,b=0,b<u.length&&u[b][1].type==="lineEndingBlank"&&(b+=2),b<u.length&&u[b][1].type==="content"))for(;++b<u.length&&u[b][1].type!=="content";)u[b][1].type==="chunkText"&&(u[b][1]._isInFirstContentOfListItem=!0,b++);if(o[0]==="enter")o[1].contentType&&(Object.assign(s,ay(g,l)),l=s[l],h=!0);else if(o[1]._container){for(b=l,S=void 0;b--;)if(_=g.get(b),_[1].type==="lineEnding"||_[1].type==="lineEndingBlank")_[0]==="enter"&&(S&&(g.get(S)[1].type="lineEndingBlank"),_[1].type="lineEnding",S=b);else if(!(_[1].type==="linePrefix"||_[1].type==="listItemIndent"))break;S&&(o[1].end={...g.get(S)[1].start},a=g.slice(S,l),a.unshift(o),g.splice(S,l-S+1,a))}}return Zt(i,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function ay(i,s){const l=i.get(s)[1],o=i.get(s)[2];let S=s-1;const b=[];let _=l._tokenizer;_||(_=o.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(_._contentTypeTextTrailing=!0));const a=_.events,u=[],h={};let g,c,C=-1,w=l,T=0,x=0;const v=[x];for(;w;){for(;i.get(++S)[1]!==w;);b.push(S),w._tokenizer||(g=o.sliceStream(w),w.next||g.push(null),c&&_.defineSkip(w.start),w._isInFirstContentOfListItem&&(_._gfmTasklistFirstContentOfListItem=!0),_.write(g),w._isInFirstContentOfListItem&&(_._gfmTasklistFirstContentOfListItem=void 0)),c=w,w=w.next}for(w=l;++C<a.length;)a[C][0]==="exit"&&a[C-1][0]==="enter"&&a[C][1].type===a[C-1][1].type&&a[C][1].start.line!==a[C][1].end.line&&(x=C+1,v.push(x),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(_.events=[],w?(w._tokenizer=void 0,w.previous=void 0):v.pop(),C=v.length;C--;){const p=a.slice(v[C],v[C+1]),d=b.pop();u.push([d,d+p.length-1]),i.splice(d,2,p)}for(u.reverse(),C=-1;++C<u.length;)h[T+u[C][0]]=T+u[C][1],T+=u[C][1]-u[C][0]-1;return h}const oy={resolve:cy,tokenize:hy},uy={partial:!0,tokenize:fy};function cy(i){return em(i),i}function hy(i,s){let l;return o;function o(a){return i.enter("content"),l=i.enter("chunkContent",{contentType:"content"}),S(a)}function S(a){return a===null?b(a):Ce(a)?i.check(uy,_,b)(a):(i.consume(a),S)}function b(a){return i.exit("chunkContent"),i.exit("content"),s(a)}function _(a){return i.consume(a),i.exit("chunkContent"),l.next=i.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,S}}function fy(i,s,l){const o=this;return S;function S(_){return i.exit("chunkContent"),i.enter("lineEnding"),i.consume(_),i.exit("lineEnding"),Ie(i,b,"linePrefix")}function b(_){if(_===null||Ce(_))return l(_);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(_):i.interrupt(o.parser.constructs.flow,l,s)(_)}}function tm(i,s,l,o,S,b,_,a,u){const h=u||Number.POSITIVE_INFINITY;let g=0;return c;function c(p){return p===60?(i.enter(o),i.enter(S),i.enter(b),i.consume(p),i.exit(b),C):p===null||p===32||p===41||sa(p)?l(p):(i.enter(o),i.enter(_),i.enter(a),i.enter("chunkString",{contentType:"string"}),x(p))}function C(p){return p===62?(i.enter(b),i.consume(p),i.exit(b),i.exit(S),i.exit(o),s):(i.enter(a),i.enter("chunkString",{contentType:"string"}),w(p))}function w(p){return p===62?(i.exit("chunkString"),i.exit(a),C(p)):p===null||p===60||Ce(p)?l(p):(i.consume(p),p===92?T:w)}function T(p){return p===60||p===62||p===92?(i.consume(p),w):w(p)}function x(p){return!g&&(p===null||p===41||et(p))?(i.exit("chunkString"),i.exit(a),i.exit(_),i.exit(o),s(p)):g<h&&p===40?(i.consume(p),g++,x):p===41?(i.consume(p),g--,x):p===null||p===32||p===40||sa(p)?l(p):(i.consume(p),p===92?v:x)}function v(p){return p===40||p===41||p===92?(i.consume(p),x):x(p)}}function im(i,s,l,o,S,b){const _=this;let a=0,u;return h;function h(w){return i.enter(o),i.enter(S),i.consume(w),i.exit(S),i.enter(b),g}function g(w){return a>999||w===null||w===91||w===93&&!u||w===94&&!a&&"_hiddenFootnoteSupport"in _.parser.constructs?l(w):w===93?(i.exit(b),i.enter(S),i.consume(w),i.exit(S),i.exit(o),s):Ce(w)?(i.enter("lineEnding"),i.consume(w),i.exit("lineEnding"),g):(i.enter("chunkString",{contentType:"string"}),c(w))}function c(w){return w===null||w===91||w===93||Ce(w)||a++>999?(i.exit("chunkString"),g(w)):(i.consume(w),u||(u=!ze(w)),w===92?C:c)}function C(w){return w===91||w===92||w===93?(i.consume(w),a++,c):c(w)}}function nm(i,s,l,o,S,b){let _;return a;function a(C){return C===34||C===39||C===40?(i.enter(o),i.enter(S),i.consume(C),i.exit(S),_=C===40?41:C,u):l(C)}function u(C){return C===_?(i.enter(S),i.consume(C),i.exit(S),i.exit(o),s):(i.enter(b),h(C))}function h(C){return C===_?(i.exit(b),u(_)):C===null?l(C):Ce(C)?(i.enter("lineEnding"),i.consume(C),i.exit("lineEnding"),Ie(i,h,"linePrefix")):(i.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===_||C===null||Ce(C)?(i.exit("chunkString"),h(C)):(i.consume(C),C===92?c:g)}function c(C){return C===_||C===92?(i.consume(C),g):g(C)}}function Rs(i,s){let l;return o;function o(S){return Ce(S)?(i.enter("lineEnding"),i.consume(S),i.exit("lineEnding"),l=!0,o):ze(S)?Ie(i,o,l?"linePrefix":"lineSuffix")(S):s(S)}}const dy={name:"definition",tokenize:_y},py={partial:!0,tokenize:my};function _y(i,s,l){const o=this;let S;return b;function b(w){return i.enter("definition"),_(w)}function _(w){return im.call(o,i,a,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function a(w){return S=pi(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),w===58?(i.enter("definitionMarker"),i.consume(w),i.exit("definitionMarker"),u):l(w)}function u(w){return et(w)?Rs(i,h)(w):h(w)}function h(w){return tm(i,g,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function g(w){return i.attempt(py,c,c)(w)}function c(w){return ze(w)?Ie(i,C,"whitespace")(w):C(w)}function C(w){return w===null||Ce(w)?(i.exit("definition"),o.parser.defined.push(S),s(w)):l(w)}}function my(i,s,l){return o;function o(a){return et(a)?Rs(i,S)(a):l(a)}function S(a){return nm(i,b,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function b(a){return ze(a)?Ie(i,_,"whitespace")(a):_(a)}function _(a){return a===null||Ce(a)?s(a):l(a)}}const gy={name:"hardBreakEscape",tokenize:vy};function vy(i,s,l){return o;function o(b){return i.enter("hardBreakEscape"),i.consume(b),S}function S(b){return Ce(b)?(i.exit("hardBreakEscape"),s(b)):l(b)}}const Sy={name:"headingAtx",resolve:yy,tokenize:by};function yy(i,s){let l=i.length-2,o=3,S,b;return i[o][1].type==="whitespace"&&(o+=2),l-2>o&&i[l][1].type==="whitespace"&&(l-=2),i[l][1].type==="atxHeadingSequence"&&(o===l-1||l-4>o&&i[l-2][1].type==="whitespace")&&(l-=o+1===l?2:4),l>o&&(S={type:"atxHeadingText",start:i[o][1].start,end:i[l][1].end},b={type:"chunkText",start:i[o][1].start,end:i[l][1].end,contentType:"text"},Zt(i,o,l-o+1,[["enter",S,s],["enter",b,s],["exit",b,s],["exit",S,s]])),i}function by(i,s,l){let o=0;return S;function S(g){return i.enter("atxHeading"),b(g)}function b(g){return i.enter("atxHeadingSequence"),_(g)}function _(g){return g===35&&o++<6?(i.consume(g),_):g===null||et(g)?(i.exit("atxHeadingSequence"),a(g)):l(g)}function a(g){return g===35?(i.enter("atxHeadingSequence"),u(g)):g===null||Ce(g)?(i.exit("atxHeading"),s(g)):ze(g)?Ie(i,a,"whitespace")(g):(i.enter("atxHeadingText"),h(g))}function u(g){return g===35?(i.consume(g),u):(i.exit("atxHeadingSequence"),a(g))}function h(g){return g===null||g===35||et(g)?(i.exit("atxHeadingText"),a(g)):(i.consume(g),h)}}const Cy=["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"],wy={concrete:!0,name:"htmlFlow",resolveTo:ky,tokenize:Ay},xy={partial:!0,tokenize:Dy},Ey={partial:!0,tokenize:Ty};function ky(i){let s=i.length;for(;s--&&!(i[s][0]==="enter"&&i[s][1].type==="htmlFlow"););return s>1&&i[s-2][1].type==="linePrefix"&&(i[s][1].start=i[s-2][1].start,i[s+1][1].start=i[s-2][1].start,i.splice(s-2,2)),i}function Ay(i,s,l){const o=this;let S,b,_,a,u;return h;function h(H){return g(H)}function g(H){return i.enter("htmlFlow"),i.enter("htmlFlowData"),i.consume(H),c}function c(H){return H===33?(i.consume(H),C):H===47?(i.consume(H),b=!0,x):H===63?(i.consume(H),S=3,o.interrupt?s:M):Mt(H)?(i.consume(H),_=String.fromCharCode(H),v):l(H)}function C(H){return H===45?(i.consume(H),S=2,w):H===91?(i.consume(H),S=5,a=0,T):Mt(H)?(i.consume(H),S=4,o.interrupt?s:M):l(H)}function w(H){return H===45?(i.consume(H),o.interrupt?s:M):l(H)}function T(H){const ie="CDATA[";return H===ie.charCodeAt(a++)?(i.consume(H),a===ie.length?o.interrupt?s:V:T):l(H)}function x(H){return Mt(H)?(i.consume(H),_=String.fromCharCode(H),v):l(H)}function v(H){if(H===null||H===47||H===62||et(H)){const ie=H===47,he=_.toLowerCase();return!ie&&!b&&l_.includes(he)?(S=1,o.interrupt?s(H):V(H)):Cy.includes(_.toLowerCase())?(S=6,ie?(i.consume(H),p):o.interrupt?s(H):V(H)):(S=7,o.interrupt&&!o.parser.lazy[o.now().line]?l(H):b?d(H):m(H))}return H===45||Dt(H)?(i.consume(H),_+=String.fromCharCode(H),v):l(H)}function p(H){return H===62?(i.consume(H),o.interrupt?s:V):l(H)}function d(H){return ze(H)?(i.consume(H),d):j(H)}function m(H){return H===47?(i.consume(H),j):H===58||H===95||Mt(H)?(i.consume(H),E):ze(H)?(i.consume(H),m):j(H)}function E(H){return H===45||H===46||H===58||H===95||Dt(H)?(i.consume(H),E):R(H)}function R(H){return H===61?(i.consume(H),A):ze(H)?(i.consume(H),R):m(H)}function A(H){return H===null||H===60||H===61||H===62||H===96?l(H):H===34||H===39?(i.consume(H),u=H,L):ze(H)?(i.consume(H),A):k(H)}function L(H){return H===u?(i.consume(H),u=null,O):H===null||Ce(H)?l(H):(i.consume(H),L)}function k(H){return H===null||H===34||H===39||H===47||H===60||H===61||H===62||H===96||et(H)?R(H):(i.consume(H),k)}function O(H){return H===47||H===62||ze(H)?m(H):l(H)}function j(H){return H===62?(i.consume(H),P):l(H)}function P(H){return H===null||Ce(H)?V(H):ze(H)?(i.consume(H),P):l(H)}function V(H){return H===45&&S===2?(i.consume(H),G):H===60&&S===1?(i.consume(H),J):H===62&&S===4?(i.consume(H),B):H===63&&S===3?(i.consume(H),M):H===93&&S===5?(i.consume(H),z):Ce(H)&&(S===6||S===7)?(i.exit("htmlFlowData"),i.check(xy,I,q)(H)):H===null||Ce(H)?(i.exit("htmlFlowData"),q(H)):(i.consume(H),V)}function q(H){return i.check(Ey,Y,I)(H)}function Y(H){return i.enter("lineEnding"),i.consume(H),i.exit("lineEnding"),$}function $(H){return H===null||Ce(H)?q(H):(i.enter("htmlFlowData"),V(H))}function G(H){return H===45?(i.consume(H),M):V(H)}function J(H){return H===47?(i.consume(H),_="",ne):V(H)}function ne(H){if(H===62){const ie=_.toLowerCase();return l_.includes(ie)?(i.consume(H),B):V(H)}return Mt(H)&&_.length<8?(i.consume(H),_+=String.fromCharCode(H),ne):V(H)}function z(H){return H===93?(i.consume(H),M):V(H)}function M(H){return H===62?(i.consume(H),B):H===45&&S===2?(i.consume(H),M):V(H)}function B(H){return H===null||Ce(H)?(i.exit("htmlFlowData"),I(H)):(i.consume(H),B)}function I(H){return i.exit("htmlFlow"),s(H)}}function Ty(i,s,l){const o=this;return S;function S(_){return Ce(_)?(i.enter("lineEnding"),i.consume(_),i.exit("lineEnding"),b):l(_)}function b(_){return o.parser.lazy[o.now().line]?l(_):s(_)}}function Dy(i,s,l){return o;function o(S){return i.enter("lineEnding"),i.consume(S),i.exit("lineEnding"),i.attempt(Hs,s,l)}}const Ry={name:"htmlText",tokenize:Ly};function Ly(i,s,l){const o=this;let S,b,_;return a;function a(M){return i.enter("htmlText"),i.enter("htmlTextData"),i.consume(M),u}function u(M){return M===33?(i.consume(M),h):M===47?(i.consume(M),R):M===63?(i.consume(M),m):Mt(M)?(i.consume(M),k):l(M)}function h(M){return M===45?(i.consume(M),g):M===91?(i.consume(M),b=0,T):Mt(M)?(i.consume(M),d):l(M)}function g(M){return M===45?(i.consume(M),w):l(M)}function c(M){return M===null?l(M):M===45?(i.consume(M),C):Ce(M)?(_=c,J(M)):(i.consume(M),c)}function C(M){return M===45?(i.consume(M),w):c(M)}function w(M){return M===62?G(M):M===45?C(M):c(M)}function T(M){const B="CDATA[";return M===B.charCodeAt(b++)?(i.consume(M),b===B.length?x:T):l(M)}function x(M){return M===null?l(M):M===93?(i.consume(M),v):Ce(M)?(_=x,J(M)):(i.consume(M),x)}function v(M){return M===93?(i.consume(M),p):x(M)}function p(M){return M===62?G(M):M===93?(i.consume(M),p):x(M)}function d(M){return M===null||M===62?G(M):Ce(M)?(_=d,J(M)):(i.consume(M),d)}function m(M){return M===null?l(M):M===63?(i.consume(M),E):Ce(M)?(_=m,J(M)):(i.consume(M),m)}function E(M){return M===62?G(M):m(M)}function R(M){return Mt(M)?(i.consume(M),A):l(M)}function A(M){return M===45||Dt(M)?(i.consume(M),A):L(M)}function L(M){return Ce(M)?(_=L,J(M)):ze(M)?(i.consume(M),L):G(M)}function k(M){return M===45||Dt(M)?(i.consume(M),k):M===47||M===62||et(M)?O(M):l(M)}function O(M){return M===47?(i.consume(M),G):M===58||M===95||Mt(M)?(i.consume(M),j):Ce(M)?(_=O,J(M)):ze(M)?(i.consume(M),O):G(M)}function j(M){return M===45||M===46||M===58||M===95||Dt(M)?(i.consume(M),j):P(M)}function P(M){return M===61?(i.consume(M),V):Ce(M)?(_=P,J(M)):ze(M)?(i.consume(M),P):O(M)}function V(M){return M===null||M===60||M===61||M===62||M===96?l(M):M===34||M===39?(i.consume(M),S=M,q):Ce(M)?(_=V,J(M)):ze(M)?(i.consume(M),V):(i.consume(M),Y)}function q(M){return M===S?(i.consume(M),S=void 0,$):M===null?l(M):Ce(M)?(_=q,J(M)):(i.consume(M),q)}function Y(M){return M===null||M===34||M===39||M===60||M===61||M===96?l(M):M===47||M===62||et(M)?O(M):(i.consume(M),Y)}function $(M){return M===47||M===62||et(M)?O(M):l(M)}function G(M){return M===62?(i.consume(M),i.exit("htmlTextData"),i.exit("htmlText"),s):l(M)}function J(M){return i.exit("htmlTextData"),i.enter("lineEnding"),i.consume(M),i.exit("lineEnding"),ne}function ne(M){return ze(M)?Ie(i,z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):z(M)}function z(M){return i.enter("htmlTextData"),_(M)}}const bc={name:"labelEnd",resolveAll:zy,resolveTo:Hy,tokenize:Ny},My={tokenize:jy},Oy={tokenize:Uy},By={tokenize:Iy};function zy(i){let s=-1;const l=[];for(;++s<i.length;){const o=i[s][1];if(l.push(i[s]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const S=o.type==="labelImage"?4:2;o.type="data",s+=S}}return i.length!==l.length&&Zt(i,0,i.length,l),i}function Hy(i,s){let l=i.length,o=0,S,b,_,a;for(;l--;)if(S=i[l][1],b){if(S.type==="link"||S.type==="labelLink"&&S._inactive)break;i[l][0]==="enter"&&S.type==="labelLink"&&(S._inactive=!0)}else if(_){if(i[l][0]==="enter"&&(S.type==="labelImage"||S.type==="labelLink")&&!S._balanced&&(b=l,S.type!=="labelLink")){o=2;break}}else S.type==="labelEnd"&&(_=l);const u={type:i[b][1].type==="labelLink"?"link":"image",start:{...i[b][1].start},end:{...i[i.length-1][1].end}},h={type:"label",start:{...i[b][1].start},end:{...i[_][1].end}},g={type:"labelText",start:{...i[b+o+2][1].end},end:{...i[_-2][1].start}};return a=[["enter",u,s],["enter",h,s]],a=ui(a,i.slice(b+1,b+o+3)),a=ui(a,[["enter",g,s]]),a=ui(a,ha(s.parser.constructs.insideSpan.null,i.slice(b+o+4,_-3),s)),a=ui(a,[["exit",g,s],i[_-2],i[_-1],["exit",h,s]]),a=ui(a,i.slice(_+1)),a=ui(a,[["exit",u,s]]),Zt(i,b,i.length,a),i}function Ny(i,s,l){const o=this;let S=o.events.length,b,_;for(;S--;)if((o.events[S][1].type==="labelImage"||o.events[S][1].type==="labelLink")&&!o.events[S][1]._balanced){b=o.events[S][1];break}return a;function a(C){return b?b._inactive?c(C):(_=o.parser.defined.includes(pi(o.sliceSerialize({start:b.end,end:o.now()}))),i.enter("labelEnd"),i.enter("labelMarker"),i.consume(C),i.exit("labelMarker"),i.exit("labelEnd"),u):l(C)}function u(C){return C===40?i.attempt(My,g,_?g:c)(C):C===91?i.attempt(Oy,g,_?h:c)(C):_?g(C):c(C)}function h(C){return i.attempt(By,g,c)(C)}function g(C){return s(C)}function c(C){return b._balanced=!0,l(C)}}function jy(i,s,l){return o;function o(c){return i.enter("resource"),i.enter("resourceMarker"),i.consume(c),i.exit("resourceMarker"),S}function S(c){return et(c)?Rs(i,b)(c):b(c)}function b(c){return c===41?g(c):tm(i,_,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function _(c){return et(c)?Rs(i,u)(c):g(c)}function a(c){return l(c)}function u(c){return c===34||c===39||c===40?nm(i,h,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):g(c)}function h(c){return et(c)?Rs(i,g)(c):g(c)}function g(c){return c===41?(i.enter("resourceMarker"),i.consume(c),i.exit("resourceMarker"),i.exit("resource"),s):l(c)}}function Uy(i,s,l){const o=this;return S;function S(a){return im.call(o,i,b,_,"reference","referenceMarker","referenceString")(a)}function b(a){return o.parser.defined.includes(pi(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?s(a):l(a)}function _(a){return l(a)}}function Iy(i,s,l){return o;function o(b){return i.enter("reference"),i.enter("referenceMarker"),i.consume(b),i.exit("referenceMarker"),S}function S(b){return b===93?(i.enter("referenceMarker"),i.consume(b),i.exit("referenceMarker"),i.exit("reference"),s):l(b)}}const Py={name:"labelStartImage",resolveAll:bc.resolveAll,tokenize:Fy};function Fy(i,s,l){const o=this;return S;function S(a){return i.enter("labelImage"),i.enter("labelImageMarker"),i.consume(a),i.exit("labelImageMarker"),b}function b(a){return a===91?(i.enter("labelMarker"),i.consume(a),i.exit("labelMarker"),i.exit("labelImage"),_):l(a)}function _(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?l(a):s(a)}}const qy={name:"labelStartLink",resolveAll:bc.resolveAll,tokenize:Vy};function Vy(i,s,l){const o=this;return S;function S(_){return i.enter("labelLink"),i.enter("labelMarker"),i.consume(_),i.exit("labelMarker"),i.exit("labelLink"),b}function b(_){return _===94&&"_hiddenFootnoteSupport"in o.parser.constructs?l(_):s(_)}}const Pu={name:"lineEnding",tokenize:Yy};function Yy(i,s){return l;function l(o){return i.enter("lineEnding"),i.consume(o),i.exit("lineEnding"),Ie(i,s,"linePrefix")}}const ra={name:"thematicBreak",tokenize:Gy};function Gy(i,s,l){let o=0,S;return b;function b(h){return i.enter("thematicBreak"),_(h)}function _(h){return S=h,a(h)}function a(h){return h===S?(i.enter("thematicBreakSequence"),u(h)):o>=3&&(h===null||Ce(h))?(i.exit("thematicBreak"),s(h)):l(h)}function u(h){return h===S?(i.consume(h),o++,u):(i.exit("thematicBreakSequence"),ze(h)?Ie(i,a,"whitespace")(h):a(h))}}const Ft={continuation:{tokenize:$y},exit:Zy,name:"list",tokenize:Wy},Ky={partial:!0,tokenize:Jy},Xy={partial:!0,tokenize:Qy};function Wy(i,s,l){const o=this,S=o.events[o.events.length-1];let b=S&&S[1].type==="linePrefix"?S[2].sliceSerialize(S[1],!0).length:0,_=0;return a;function a(w){const T=o.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!o.containerState.marker||w===o.containerState.marker:rc(w)){if(o.containerState.type||(o.containerState.type=T,i.enter(T,{_container:!0})),T==="listUnordered")return i.enter("listItemPrefix"),w===42||w===45?i.check(ra,l,h)(w):h(w);if(!o.interrupt||w===49)return i.enter("listItemPrefix"),i.enter("listItemValue"),u(w)}return l(w)}function u(w){return rc(w)&&++_<10?(i.consume(w),u):(!o.interrupt||_<2)&&(o.containerState.marker?w===o.containerState.marker:w===41||w===46)?(i.exit("listItemValue"),h(w)):l(w)}function h(w){return i.enter("listItemMarker"),i.consume(w),i.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||w,i.check(Hs,o.interrupt?l:g,i.attempt(Ky,C,c))}function g(w){return o.containerState.initialBlankLine=!0,b++,C(w)}function c(w){return ze(w)?(i.enter("listItemPrefixWhitespace"),i.consume(w),i.exit("listItemPrefixWhitespace"),C):l(w)}function C(w){return o.containerState.size=b+o.sliceSerialize(i.exit("listItemPrefix"),!0).length,s(w)}}function $y(i,s,l){const o=this;return o.containerState._closeFlow=void 0,i.check(Hs,S,b);function S(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ie(i,s,"listItemIndent",o.containerState.size+1)(a)}function b(a){return o.containerState.furtherBlankLines||!ze(a)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,_(a)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,i.attempt(Xy,s,_)(a))}function _(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ie(i,i.attempt(Ft,s,l),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Qy(i,s,l){const o=this;return Ie(i,S,"listItemIndent",o.containerState.size+1);function S(b){const _=o.events[o.events.length-1];return _&&_[1].type==="listItemIndent"&&_[2].sliceSerialize(_[1],!0).length===o.containerState.size?s(b):l(b)}}function Zy(i){i.exit(this.containerState.type)}function Jy(i,s,l){const o=this;return Ie(i,S,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function S(b){const _=o.events[o.events.length-1];return!ze(b)&&_&&_[1].type==="listItemPrefixWhitespace"?s(b):l(b)}}const a_={name:"setextUnderline",resolveTo:e1,tokenize:t1};function e1(i,s){let l=i.length,o,S,b;for(;l--;)if(i[l][0]==="enter"){if(i[l][1].type==="content"){o=l;break}i[l][1].type==="paragraph"&&(S=l)}else i[l][1].type==="content"&&i.splice(l,1),!b&&i[l][1].type==="definition"&&(b=l);const _={type:"setextHeading",start:{...i[o][1].start},end:{...i[i.length-1][1].end}};return i[S][1].type="setextHeadingText",b?(i.splice(S,0,["enter",_,s]),i.splice(b+1,0,["exit",i[o][1],s]),i[o][1].end={...i[b][1].end}):i[o][1]=_,i.push(["exit",_,s]),i}function t1(i,s,l){const o=this;let S;return b;function b(h){let g=o.events.length,c;for(;g--;)if(o.events[g][1].type!=="lineEnding"&&o.events[g][1].type!=="linePrefix"&&o.events[g][1].type!=="content"){c=o.events[g][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||c)?(i.enter("setextHeadingLine"),S=h,_(h)):l(h)}function _(h){return i.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===S?(i.consume(h),a):(i.exit("setextHeadingLineSequence"),ze(h)?Ie(i,u,"lineSuffix")(h):u(h))}function u(h){return h===null||Ce(h)?(i.exit("setextHeadingLine"),s(h)):l(h)}}const i1={tokenize:n1};function n1(i){const s=this,l=i.attempt(Hs,o,i.attempt(this.parser.constructs.flowInitial,S,Ie(i,i.attempt(this.parser.constructs.flow,S,i.attempt(oy,S)),"linePrefix")));return l;function o(b){if(b===null){i.consume(b);return}return i.enter("lineEndingBlank"),i.consume(b),i.exit("lineEndingBlank"),s.currentConstruct=void 0,l}function S(b){if(b===null){i.consume(b);return}return i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),s.currentConstruct=void 0,l}}const r1={resolveAll:sm()},s1=rm("string"),l1=rm("text");function rm(i){return{resolveAll:sm(i==="text"?a1:void 0),tokenize:s};function s(l){const o=this,S=this.parser.constructs[i],b=l.attempt(S,_,a);return _;function _(g){return h(g)?b(g):a(g)}function a(g){if(g===null){l.consume(g);return}return l.enter("data"),l.consume(g),u}function u(g){return h(g)?(l.exit("data"),b(g)):(l.consume(g),u)}function h(g){if(g===null)return!0;const c=S[g];let C=-1;if(c)for(;++C<c.length;){const w=c[C];if(!w.previous||w.previous.call(o,o.previous))return!0}return!1}}}function sm(i){return s;function s(l,o){let S=-1,b;for(;++S<=l.length;)b===void 0?l[S]&&l[S][1].type==="data"&&(b=S,S++):(!l[S]||l[S][1].type!=="data")&&(S!==b+2&&(l[b][1].end=l[S-1][1].end,l.splice(b+2,S-b-2),S=b+2),b=void 0);return i?i(l,o):l}}function a1(i,s){let l=0;for(;++l<=i.length;)if((l===i.length||i[l][1].type==="lineEnding")&&i[l-1][1].type==="data"){const o=i[l-1][1],S=s.sliceStream(o);let b=S.length,_=-1,a=0,u;for(;b--;){const h=S[b];if(typeof h=="string"){for(_=h.length;h.charCodeAt(_-1)===32;)a++,_--;if(_)break;_=-1}else if(h===-2)u=!0,a++;else if(h!==-1){b++;break}}if(s._contentTypeTextTrailing&&l===i.length&&(a=0),a){const h={type:l===i.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:b?_:o.start._bufferIndex+_,_index:o.start._index+b,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):(i.splice(l,0,["enter",h,s],["exit",h,s]),l+=2)}l++}return i}const o1={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_},u1={91:dy},c1={[-2]:Iu,[-1]:Iu,32:Iu},h1={35:Sy,42:ra,45:[a_,ra],60:wy,61:a_,95:ra,96:s_,126:s_},f1={38:J_,92:Z_},d1={[-5]:Pu,[-4]:Pu,[-3]:Pu,33:Py,38:J_,42:sc,60:[q0,Ry],91:qy,92:[gy,Z_],93:bc,95:sc,96:iy},p1={null:[sc,r1]},_1={null:[42,95]},m1={null:[]},g1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:_1,contentInitial:u1,disable:m1,document:o1,flow:h1,flowInitial:c1,insideSpan:p1,string:f1,text:d1},Symbol.toStringTag,{value:"Module"}));function v1(i,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={},b=[];let _=[],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:T,parser:i,previous:null,sliceSerialize:C,sliceStream:w,write:c};let g=s.tokenize.call(h,u);return s.resolveAll&&b.push(s),h;function c(P){return _=ui(_,P),v(),_[_.length-1]!==null?[]:(k(s,0),h.events=ha(b,h.events,h),h.events)}function C(P,V){return y1(w(P),V)}function w(P){return S1(_,P)}function T(){const{_bufferIndex:P,_index:V,line:q,column:Y,offset:$}=o;return{_bufferIndex:P,_index:V,line:q,column:Y,offset:$}}function x(P){S[P.line]=P.column,j()}function v(){let P;for(;o._index<_.length;){const V=_[o._index];if(typeof V=="string")for(P=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===P&&o._bufferIndex<V.length;)p(V.charCodeAt(o._bufferIndex));else p(V)}}function p(P){g=g(P)}function d(P){Ce(P)?(o.line++,o.column=1,o.offset+=P===-3?2:1,j()):P!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===_[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=P}function m(P,V){const q=V||{};return q.type=P,q.start=T(),h.events.push(["enter",q,h]),a.push(q),q}function E(P){const V=a.pop();return V.end=T(),h.events.push(["exit",V,h]),V}function R(P,V){k(P,V.from)}function A(P,V){V.restore()}function L(P,V){return q;function q(Y,$,G){let J,ne,z,M;return Array.isArray(Y)?I(Y):"tokenize"in Y?I([Y]):B(Y);function B(fe){return X;function X(N){const re=N!==null&&fe[N],Q=N!==null&&fe.null,de=[...Array.isArray(re)?re:re?[re]:[],...Array.isArray(Q)?Q:Q?[Q]:[]];return I(de)(N)}}function I(fe){return J=fe,ne=0,fe.length===0?G:H(fe[ne])}function H(fe){return X;function X(N){return M=O(),z=fe,fe.partial||(h.currentConstruct=fe),fe.name&&h.parser.constructs.disable.null.includes(fe.name)?he():fe.tokenize.call(V?Object.assign(Object.create(h),V):h,u,ie,he)(N)}}function ie(fe){return P(z,M),$}function he(fe){return M.restore(),++ne<J.length?H(J[ne]):G}}}function k(P,V){P.resolveAll&&!b.includes(P)&&b.push(P),P.resolve&&Zt(h.events,V,h.events.length-V,P.resolve(h.events.slice(V),h)),P.resolveTo&&(h.events=P.resolveTo(h.events,h))}function O(){const P=T(),V=h.previous,q=h.currentConstruct,Y=h.events.length,$=Array.from(a);return{from:Y,restore:G};function G(){o=P,h.previous=V,h.currentConstruct=q,h.events.length=Y,a=$,j()}}function j(){o.line in S&&o.column<2&&(o.column=S[o.line],o.offset+=S[o.line]-1)}}function S1(i,s){const l=s.start._index,o=s.start._bufferIndex,S=s.end._index,b=s.end._bufferIndex;let _;if(l===S)_=[i[l].slice(o,b)];else{if(_=i.slice(l,S),o>-1){const a=_[0];typeof a=="string"?_[0]=a.slice(o):_.shift()}b>0&&_.push(i[S].slice(0,b))}return _}function y1(i,s){let l=-1;const o=[];let S;for(;++l<i.length;){const b=i[l];let _;if(typeof b=="string")_=b;else switch(b){case-5:{_="\r";break}case-4:{_=`
|
|
60
|
+
`;break}case-3:{_=`\r
|
|
61
|
+
`;break}case-2:{_=s?" ":" ";break}case-1:{if(!s&&S)continue;_=" ";break}default:_=String.fromCharCode(b)}S=b===-2,o.push(_)}return o.join("")}function b1(i){const o={constructs:W_([g1,...(i||{}).extensions||[]]),content:S(H0),defined:[],document:S(j0),flow:S(i1),lazy:{},string:S(s1),text:S(l1)};return o;function S(b){return _;function _(a){return v1(o,b,a)}}}function C1(i){for(;!em(i););return i}const o_=/[\0\t\n\r]/g;function w1(){let i=1,s="",l=!0,o;return S;function S(b,_,a){const u=[];let h,g,c,C,w;for(b=s+(typeof b=="string"?b.toString():new TextDecoder(_||void 0).decode(b)),c=0,s="",l&&(b.charCodeAt(0)===65279&&c++,l=void 0);c<b.length;){if(o_.lastIndex=c,h=o_.exec(b),C=h&&h.index!==void 0?h.index:b.length,w=b.charCodeAt(C),!h){s=b.slice(c);break}if(w===10&&c===C&&o)u.push(-3),o=void 0;else switch(o&&(u.push(-5),o=void 0),c<C&&(u.push(b.slice(c,C)),i+=C-c),w){case 0:{u.push(65533),i++;break}case 9:{for(g=Math.ceil(i/4)*4,u.push(-2);i++<g;)u.push(-1);break}case 10:{u.push(-4),i=1;break}default:o=!0,i=1}c=C+1}return a&&(o&&u.push(-5),s&&u.push(s),u.push(null)),u}}const x1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function E1(i){return i.replace(x1,k1)}function k1(i,s,l){if(s)return s;if(l.charCodeAt(0)===35){const S=l.charCodeAt(1),b=S===120||S===88;return $_(l.slice(b?2:1),b?16:10)}return yc(l)||i}const lm={}.hasOwnProperty;function A1(i,s,l){return s&&typeof s=="object"&&(l=s,s=void 0),T1(l)(C1(b1(l).document().write(w1()(i,s,!0))))}function T1(i){const s={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:b(mi),autolinkProtocol:O,autolinkEmail:O,atxHeading:b(Ge),blockQuote:b(Q),characterEscape:O,characterReference:O,codeFenced:b(de),codeFencedFenceInfo:_,codeFencedFenceMeta:_,codeIndented:b(de,_),codeText:b(pe,_),codeTextData:O,data:O,codeFlowValue:O,definition:b(ke),definitionDestinationString:_,definitionLabelString:_,definitionTitleString:_,emphasis:b(xe),hardBreakEscape:b(at),hardBreakTrailing:b(at),htmlFlow:b(Ee,_),htmlFlowData:O,htmlText:b(Ee,_),htmlTextData:O,image:b(_i),label:_,link:b(mi),listItem:b(xi),listItemValue:C,listOrdered:b(gi,c),listUnordered:b(gi),paragraph:b(Vi),reference:H,referenceString:_,resourceDestinationString:_,resourceTitleString:_,setextHeading:b(Ge),strong:b(At),thematicBreak:b(Ot)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:re,autolinkProtocol:N,blockQuote:u(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:fe,characterReference:X,codeFenced:u(v),codeFencedFence:x,codeFencedFenceInfo:w,codeFencedFenceMeta:T,codeFlowValue:j,codeIndented:u(p),codeText:u($),codeTextData:j,data:j,definition:u(),definitionDestinationString:E,definitionLabelString:d,definitionTitleString:m,emphasis:u(),hardBreakEscape:u(V),hardBreakTrailing:u(V),htmlFlow:u(q),htmlFlowData:j,htmlText:u(Y),htmlTextData:j,image:u(J),label:z,labelText:ne,lineEnding:P,link:u(G),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ie,resourceDestinationString:M,resourceTitleString:B,resource:I,setextHeading:u(k),setextHeadingLineSequence:L,setextHeadingText:A,strong:u(),thematicBreak:u()}};am(s,(i||{}).mdastExtensions||[]);const l={};return o;function o(ae){let me={type:"root",children:[]};const ye={stack:[me],tokenStack:[],config:s,enter:a,exit:h,buffer:_,resume:g,data:l},Te=[];let Me=-1;for(;++Me<ae.length;)if(ae[Me][1].type==="listOrdered"||ae[Me][1].type==="listUnordered")if(ae[Me][0]==="enter")Te.push(Me);else{const mt=Te.pop();Me=S(ae,mt,Me)}for(Me=-1;++Me<ae.length;){const mt=s[ae[Me][0]];lm.call(mt,ae[Me][1].type)&&mt[ae[Me][1].type].call(Object.assign({sliceSerialize:ae[Me][2].sliceSerialize},ye),ae[Me][1])}if(ye.tokenStack.length>0){const mt=ye.tokenStack[ye.tokenStack.length-1];(mt[1]||u_).call(ye,void 0,mt[0])}for(me.position={start:gn(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:gn(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},Me=-1;++Me<s.transforms.length;)me=s.transforms[Me](me)||me;return me}function S(ae,me,ye){let Te=me-1,Me=-1,mt=!1,Pe,bt,gt,Bt;for(;++Te<=ye;){const Ze=ae[Te];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Me++:Me--,Bt=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Pe&&!Bt&&!Me&&!gt&&(gt=Te),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!Me&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Me===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Pe){let Yi=Te;for(bt=void 0;Yi--;){const ci=ae[Yi];if(ci[1].type==="lineEnding"||ci[1].type==="lineEndingBlank"){if(ci[0]==="exit")continue;bt&&(ae[bt][1].type="lineEndingBlank",mt=!0),ci[1].type="lineEnding",bt=Yi}else if(!(ci[1].type==="linePrefix"||ci[1].type==="blockQuotePrefix"||ci[1].type==="blockQuotePrefixWhitespace"||ci[1].type==="blockQuoteMarker"||ci[1].type==="listItemIndent"))break}gt&&(!bt||gt<bt)&&(Pe._spread=!0),Pe.end=Object.assign({},bt?ae[bt][1].start:Ze[1].end),ae.splice(bt||Te,0,["exit",Pe,Ze[2]]),Te++,ye++}if(Ze[1].type==="listItemPrefix"){const Yi={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Pe=Yi,ae.splice(Te,0,["enter",Yi,Ze[2]]),Te++,ye++,gt=void 0,Bt=!0}}}return ae[me][1]._spread=mt,ye}function b(ae,me){return ye;function ye(Te){a.call(this,ae(Te),Te),me&&me.call(this,Te)}}function _(){this.stack.push({type:"fragment",children:[]})}function a(ae,me,ye){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([me,ye||void 0]),ae.position={start:gn(me.start),end:void 0}}function u(ae){return me;function me(ye){ae&&ae.call(this,ye),h.call(this,ye)}}function h(ae,me){const ye=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==ae.type&&(me?me.call(this,ae,Te[0]):(Te[1]||u_).call(this,ae,Te[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Ds({start:ae.start,end:ae.end})+"): it’s not open");ye.position.end=gn(ae.end)}function g(){return Sc(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function C(ae){if(this.data.expectingFirstListItemValue){const me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function w(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.lang=ae}function T(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.meta=ae}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function p(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.value=ae.replace(/(\r?\n|\r)$/g,"")}function d(ae){const me=this.resume(),ye=this.stack[this.stack.length-1];ye.label=me,ye.identifier=pi(this.sliceSerialize(ae)).toLowerCase()}function m(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.title=ae}function E(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.url=ae}function R(ae){const me=this.stack[this.stack.length-1];if(!me.depth){const ye=this.sliceSerialize(ae).length;me.depth=ye}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function L(ae){const me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function O(ae){const ye=this.stack[this.stack.length-1].children;let Te=ye[ye.length-1];(!Te||Te.type!=="text")&&(Te=ot(),Te.position={start:gn(ae.start),end:void 0},ye.push(Te)),this.stack.push(Te)}function j(ae){const me=this.stack.pop();me.value+=this.sliceSerialize(ae),me.position.end=gn(ae.end)}function P(ae){const me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ye=me.children[me.children.length-1];ye.position.end=gn(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&s.canContainEols.includes(me.type)&&(O.call(this,ae),j.call(this,ae))}function V(){this.data.atHardBreak=!0}function q(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.value=ae}function Y(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.value=ae}function $(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.value=ae}function G(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=me,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function J(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=me,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function ne(ae){const me=this.sliceSerialize(ae),ye=this.stack[this.stack.length-2];ye.label=E1(me),ye.identifier=pi(me).toLowerCase()}function z(){const ae=this.stack[this.stack.length-1],me=this.resume(),ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,ye.type==="link"){const Te=ae.children;ye.children=Te}else ye.alt=me}function M(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.url=ae}function B(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.title=ae}function I(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function ie(ae){const me=this.resume(),ye=this.stack[this.stack.length-1];ye.label=me,ye.identifier=pi(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function he(ae){this.data.characterReferenceType=ae.type}function fe(ae){const me=this.sliceSerialize(ae),ye=this.data.characterReferenceType;let Te;ye?(Te=$_(me,ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=yc(me);const Me=this.stack[this.stack.length-1];Me.value+=Te}function X(ae){const me=this.stack.pop();me.position.end=gn(ae.end)}function N(ae){j.call(this,ae);const me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(ae)}function re(ae){j.call(this,ae);const me=this.stack[this.stack.length-1];me.url="mailto:"+this.sliceSerialize(ae)}function Q(){return{type:"blockquote",children:[]}}function de(){return{type:"code",lang:null,meta:null,value:""}}function pe(){return{type:"inlineCode",value:""}}function ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xe(){return{type:"emphasis",children:[]}}function Ge(){return{type:"heading",depth:0,children:[]}}function at(){return{type:"break"}}function Ee(){return{type:"html",value:""}}function _i(){return{type:"image",title:null,url:"",alt:null}}function mi(){return{type:"link",title:null,url:"",children:[]}}function gi(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function xi(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function Vi(){return{type:"paragraph",children:[]}}function At(){return{type:"strong",children:[]}}function ot(){return{type:"text",value:""}}function Ot(){return{type:"thematicBreak"}}}function gn(i){return{line:i.line,column:i.column,offset:i.offset}}function am(i,s){let l=-1;for(;++l<s.length;){const o=s[l];Array.isArray(o)?am(i,o):D1(i,o)}}function D1(i,s){let l;for(l in s)if(lm.call(s,l))switch(l){case"canContainEols":{const o=s[l];o&&i[l].push(...o);break}case"transforms":{const o=s[l];o&&i[l].push(...o);break}case"enter":case"exit":{const o=s[l];o&&Object.assign(i[l],o);break}}}function u_(i,s){throw i?new Error("Cannot close `"+i.type+"` ("+Ds({start:i.start,end:i.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 R1(i){const s=this;s.parser=l;function l(o){return A1(o,{...s.data("settings"),...i,extensions:s.data("micromarkExtensions")||[],mdastExtensions:s.data("fromMarkdownExtensions")||[]})}}function L1(i,s){const l={type:"element",tagName:"blockquote",properties:{},children:i.wrap(i.all(s),!0)};return i.patch(s,l),i.applyData(s,l)}function M1(i,s){const l={type:"element",tagName:"br",properties:{},children:[]};return i.patch(s,l),[i.applyData(s,l),{type:"text",value:`
|
|
62
|
+
`}]}function O1(i,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 b={type:"element",tagName:"code",properties:o,children:[{type:"text",value:l}]};return s.meta&&(b.data={meta:s.meta}),i.patch(s,b),b=i.applyData(s,b),b={type:"element",tagName:"pre",properties:{},children:[b]},i.patch(s,b),b}function B1(i,s){const l={type:"element",tagName:"del",properties:{},children:i.all(s)};return i.patch(s,l),i.applyData(s,l)}function z1(i,s){const l={type:"element",tagName:"em",properties:{},children:i.all(s)};return i.patch(s,l),i.applyData(s,l)}function H1(i,s){const l=typeof i.options.clobberPrefix=="string"?i.options.clobberPrefix:"user-content-",o=String(s.identifier).toUpperCase(),S=Lr(o.toLowerCase()),b=i.footnoteOrder.indexOf(o);let _,a=i.footnoteCounts.get(o);a===void 0?(a=0,i.footnoteOrder.push(o),_=i.footnoteOrder.length):_=b+1,a+=1,i.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(_)}]};i.patch(s,u);const h={type:"element",tagName:"sup",properties:{},children:[u]};return i.patch(s,h),i.applyData(s,h)}function N1(i,s){const l={type:"element",tagName:"h"+s.depth,properties:{},children:i.all(s)};return i.patch(s,l),i.applyData(s,l)}function j1(i,s){if(i.options.allowDangerousHtml){const l={type:"raw",value:s.value};return i.patch(s,l),i.applyData(s,l)}}function om(i,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=i.all(s),b=S[0];b&&b.type==="text"?b.value="["+b.value:S.unshift({type:"text",value:"["});const _=S[S.length-1];return _&&_.type==="text"?_.value+=o:S.push({type:"text",value:o}),S}function U1(i,s){const l=String(s.identifier).toUpperCase(),o=i.definitionById.get(l);if(!o)return om(i,s);const S={src:Lr(o.url||""),alt:s.alt};o.title!==null&&o.title!==void 0&&(S.title=o.title);const b={type:"element",tagName:"img",properties:S,children:[]};return i.patch(s,b),i.applyData(s,b)}function I1(i,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 i.patch(s,o),i.applyData(s,o)}function P1(i,s){const l={type:"text",value:s.value.replace(/\r?\n|\r/g," ")};i.patch(s,l);const o={type:"element",tagName:"code",properties:{},children:[l]};return i.patch(s,o),i.applyData(s,o)}function F1(i,s){const l=String(s.identifier).toUpperCase(),o=i.definitionById.get(l);if(!o)return om(i,s);const S={href:Lr(o.url||"")};o.title!==null&&o.title!==void 0&&(S.title=o.title);const b={type:"element",tagName:"a",properties:S,children:i.all(s)};return i.patch(s,b),i.applyData(s,b)}function q1(i,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:i.all(s)};return i.patch(s,o),i.applyData(s,o)}function V1(i,s,l){const o=i.all(s),S=l?Y1(l):um(s),b={},_=[];if(typeof s.checked=="boolean"){const g=o[0];let c;g&&g.type==="element"&&g.tagName==="p"?c=g:(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:[]}),b.className=["task-list-item"]}let a=-1;for(;++a<o.length;){const g=o[a];(S||a!==0||g.type!=="element"||g.tagName!=="p")&&_.push({type:"text",value:`
|
|
64
|
+
`}),g.type==="element"&&g.tagName==="p"&&!S?_.push(...g.children):_.push(g)}const u=o[o.length-1];u&&(S||u.type!=="element"||u.tagName!=="p")&&_.push({type:"text",value:`
|
|
65
|
+
`});const h={type:"element",tagName:"li",properties:b,children:_};return i.patch(s,h),i.applyData(s,h)}function Y1(i){let s=!1;if(i.type==="list"){s=i.spread||!1;const l=i.children;let o=-1;for(;!s&&++o<l.length;)s=um(l[o])}return s}function um(i){const s=i.spread;return s??i.children.length>1}function G1(i,s){const l={},o=i.all(s);let S=-1;for(typeof s.start=="number"&&s.start!==1&&(l.start=s.start);++S<o.length;){const _=o[S];if(_.type==="element"&&_.tagName==="li"&&_.properties&&Array.isArray(_.properties.className)&&_.properties.className.includes("task-list-item")){l.className=["contains-task-list"];break}}const b={type:"element",tagName:s.ordered?"ol":"ul",properties:l,children:i.wrap(o,!0)};return i.patch(s,b),i.applyData(s,b)}function K1(i,s){const l={type:"element",tagName:"p",properties:{},children:i.all(s)};return i.patch(s,l),i.applyData(s,l)}function X1(i,s){const l={type:"root",children:i.wrap(i.all(s))};return i.patch(s,l),i.applyData(s,l)}function W1(i,s){const l={type:"element",tagName:"strong",properties:{},children:i.all(s)};return i.patch(s,l),i.applyData(s,l)}function $1(i,s){const l=i.all(s),o=l.shift(),S=[];if(o){const _={type:"element",tagName:"thead",properties:{},children:i.wrap([o],!0)};i.patch(s.children[0],_),S.push(_)}if(l.length>0){const _={type:"element",tagName:"tbody",properties:{},children:i.wrap(l,!0)},a=_c(s.children[1]),u=F_(s.children[s.children.length-1]);a&&u&&(_.position={start:a,end:u}),S.push(_)}const b={type:"element",tagName:"table",properties:{},children:i.wrap(S,!0)};return i.patch(s,b),i.applyData(s,b)}function Q1(i,s,l){const o=l?l.children:void 0,b=(o?o.indexOf(s):1)===0?"th":"td",_=l&&l.type==="table"?l.align:void 0,a=_?_.length:s.children.length;let u=-1;const h=[];for(;++u<a;){const c=s.children[u],C={},w=_?_[u]:void 0;w&&(C.align=w);let T={type:"element",tagName:b,properties:C,children:[]};c&&(T.children=i.all(c),i.patch(c,T),T=i.applyData(c,T)),h.push(T)}const g={type:"element",tagName:"tr",properties:{},children:i.wrap(h,!0)};return i.patch(s,g),i.applyData(s,g)}function Z1(i,s){const l={type:"element",tagName:"td",properties:{},children:i.all(s)};return i.patch(s,l),i.applyData(s,l)}const c_=9,h_=32;function J1(i){const s=String(i),l=/\r?\n|\r/g;let o=l.exec(s),S=0;const b=[];for(;o;)b.push(f_(s.slice(S,o.index),S>0,!0),o[0]),S=o.index+o[0].length,o=l.exec(s);return b.push(f_(s.slice(S),S>0,!1)),b.join("")}function f_(i,s,l){let o=0,S=i.length;if(s){let b=i.codePointAt(o);for(;b===c_||b===h_;)o++,b=i.codePointAt(o)}if(l){let b=i.codePointAt(S-1);for(;b===c_||b===h_;)S--,b=i.codePointAt(S-1)}return S>o?i.slice(o,S):""}function eb(i,s){const l={type:"text",value:J1(String(s.value))};return i.patch(s,l),i.applyData(s,l)}function tb(i,s){const l={type:"element",tagName:"hr",properties:{},children:[]};return i.patch(s,l),i.applyData(s,l)}const ib={blockquote:L1,break:M1,code:O1,delete:B1,emphasis:z1,footnoteReference:H1,heading:N1,html:j1,imageReference:U1,image:I1,inlineCode:P1,linkReference:F1,link:q1,listItem:V1,list:G1,paragraph:K1,root:X1,strong:W1,table:$1,tableCell:Z1,tableRow:Q1,text:eb,thematicBreak:tb,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,nb=typeof self=="object"?self:globalThis,d_=(i,s)=>{switch(i){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+i)}return new nb[i](s)},rb=(i,s)=>{const l=(S,b)=>(i.set(b,S),S),o=S=>{if(i.has(S))return i.get(S);const[b,_]=s[S];switch(b){case fa:case cm:return l(_,S);case Ls:{const a=l([],S);for(const u of _)a.push(o(u));return a}case la:{const a=l({},S);for(const[u,h]of _)a[o(u)]=o(h);return a}case Cc:return l(new Date(_),S);case wc:{const{source:a,flags:u}=_;return l(new RegExp(a,u),S)}case xc:{const a=l(new Map,S);for(const[u,h]of _)a.set(o(u),o(h));return a}case Ec:{const a=l(new Set,S);for(const u of _)a.add(o(u));return a}case hm:{const{name:a,message:u}=_;return l(d_(a,u),S)}case fm:return l(BigInt(_),S);case"BigInt":return l(Object(BigInt(_)),S);case"ArrayBuffer":return l(new Uint8Array(_).buffer,_);case"DataView":{const{buffer:a}=new Uint8Array(_);return l(new DataView(a),_)}}return l(d_(b,_),S)};return o},p_=i=>rb(new Map,i)(0),kr="",{toString:sb}={},{keys:lb}=Object,Ts=i=>{const s=typeof i;if(s!=="object"||!i)return[fa,s];const l=sb.call(i).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=([i,s])=>i===fa&&(s==="function"||s==="symbol"),ab=(i,s,l,o)=>{const S=(_,a)=>{const u=o.push(_)-1;return l.set(a,u),u},b=_=>{if(l.has(_))return l.get(_);let[a,u]=Ts(_);switch(a){case fa:{let g=_;switch(u){case"bigint":a=fm,g=_.toString();break;case"function":case"symbol":if(i)throw new TypeError("unable to serialize "+u);g=null;break;case"undefined":return S([cm],_)}return S([a,g],_)}case Ls:{if(u){let C=_;return u==="DataView"?C=new Uint8Array(_.buffer):u==="ArrayBuffer"&&(C=new Uint8Array(_)),S([u,[...C]],_)}const g=[],c=S([a,g],_);for(const C of _)g.push(b(C));return c}case la:{if(u)switch(u){case"BigInt":return S([u,_.toString()],_);case"Boolean":case"Number":case"String":return S([u,_.valueOf()],_)}if(s&&"toJSON"in _)return b(_.toJSON());const g=[],c=S([a,g],_);for(const C of lb(_))(i||!ta(Ts(_[C])))&&g.push([b(C),b(_[C])]);return c}case Cc:return S([a,_.toISOString()],_);case wc:{const{source:g,flags:c}=_;return S([a,{source:g,flags:c}],_)}case xc:{const g=[],c=S([a,g],_);for(const[C,w]of _)(i||!(ta(Ts(C))||ta(Ts(w))))&&g.push([b(C),b(w)]);return c}case Ec:{const g=[],c=S([a,g],_);for(const C of _)(i||!ta(Ts(C)))&&g.push(b(C));return c}}const{message:h}=_;return S([a,{name:u,message:h}],_)};return b},__=(i,{json:s,lossy:l}={})=>{const o=[];return ab(!(s||l),!!s,new Map,o)(i),o},aa=typeof structuredClone=="function"?(i,s)=>s&&("json"in s||"lossy"in s)?p_(__(i,s)):structuredClone(i):(i,s)=>p_(__(i,s));function ob(i,s){const l=[{type:"text",value:"↩"}];return s>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(s)}]}),l}function ub(i,s){return"Back to reference "+(i+1)+(s>1?"-"+s:"")}function cb(i){const s=typeof i.options.clobberPrefix=="string"?i.options.clobberPrefix:"user-content-",l=i.options.footnoteBackContent||ob,o=i.options.footnoteBackLabel||ub,S=i.options.footnoteLabel||"Footnotes",b=i.options.footnoteLabelTagName||"h2",_=i.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<i.footnoteOrder.length;){const h=i.footnoteById.get(i.footnoteOrder[u]);if(!h)continue;const g=i.all(h),c=String(h.identifier).toUpperCase(),C=Lr(c.toLowerCase());let w=0;const T=[],x=i.footnoteCounts.get(c);for(;x!==void 0&&++w<=x;){T.length>0&&T.push({type:"text",value:" "});let d=typeof l=="string"?l:l(u,w);typeof d=="string"&&(d={type:"text",value:d}),T.push({type:"element",tagName:"a",properties:{href:"#"+s+"fnref-"+C+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(u,w),className:["data-footnote-backref"]},children:Array.isArray(d)?d:[d]})}const v=g[g.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(...T)}else g.push(...T);const p={type:"element",tagName:"li",properties:{id:s+"fn-"+C},children:i.wrap(g,!0)};i.patch(h,p),a.push(p)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:b,properties:{...aa(_),id:"footnote-label"},children:[{type:"text",value:S}]},{type:"text",value:`
|
|
66
|
+
`},{type:"element",tagName:"ol",properties:{},children:i.wrap(a,!0)},{type:"text",value:`
|
|
67
|
+
`}]}}const da=(function(i){if(i==null)return pb;if(typeof i=="function")return pa(i);if(typeof i=="object")return Array.isArray(i)?hb(i):fb(i);if(typeof i=="string")return db(i);throw new Error("Expected function, string, or object as test")});function hb(i){const s=[];let l=-1;for(;++l<i.length;)s[l]=da(i[l]);return pa(o);function o(...S){let b=-1;for(;++b<s.length;)if(s[b].apply(this,S))return!0;return!1}}function fb(i){const s=i;return pa(l);function l(o){const S=o;let b;for(b in i)if(S[b]!==s[b])return!1;return!0}}function db(i){return pa(s);function s(l){return l&&l.type===i}}function pa(i){return s;function s(l,o,S){return!!(_b(l)&&i.call(this,l,typeof o=="number"?o:void 0,S||void 0))}}function pb(){return!0}function _b(i){return i!==null&&typeof i=="object"&&"type"in i}const dm=[],mb=!0,lc=!1,gb="skip";function pm(i,s,l,o){let S;typeof s=="function"&&typeof l!="function"?(o=l,l=s):S=s;const b=da(S),_=o?-1:1;a(i,void 0,[])();function a(u,h,g){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(C,"name",{value:"node ("+(u.type+(w?"<"+w+">":""))+")"})}return C;function C(){let w=dm,T,x,v;if((!s||b(u,h,g[g.length-1]||void 0))&&(w=vb(l(u,g)),w[0]===lc))return w;if("children"in u&&u.children){const p=u;if(p.children&&w[0]!==gb)for(x=(o?p.children.length:-1)+_,v=g.concat(p);x>-1&&x<p.children.length;){const d=p.children[x];if(T=a(d,x,v)(),T[0]===lc)return T;x=typeof T[1]=="number"?T[1]:x+_}}return w}}}function vb(i){return Array.isArray(i)?i:typeof i=="number"?[mb,i]:i==null?dm:[i]}function kc(i,s,l,o){let S,b,_;typeof s=="function"&&typeof l!="function"?(b=void 0,_=s,S=l):(b=s,_=l,S=o),pm(i,b,a,S);function a(u,h){const g=h[h.length-1],c=g?g.children.indexOf(u):void 0;return _(u,c,g)}}const ac={}.hasOwnProperty,Sb={};function yb(i,s){const l=s||Sb,o=new Map,S=new Map,b=new Map,_={...ib,...l.handlers},a={all:h,applyData:Cb,definitionById:o,footnoteById:S,footnoteCounts:b,footnoteOrder:[],handlers:_,one:u,options:l,patch:bb,wrap:xb};return kc(i,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const c=g.type==="definition"?o:S,C=String(g.identifier).toUpperCase();c.has(C)||c.set(C,g)}}),a;function u(g,c){const C=g.type,w=a.handlers[C];if(ac.call(a.handlers,C)&&w)return w(a,g,c);if(a.options.passThrough&&a.options.passThrough.includes(C)){if("children"in g){const{children:x,...v}=g,p=aa(v);return p.children=a.all(g),p}return aa(g)}return(a.options.unknownHandler||wb)(a,g,c)}function h(g){const c=[];if("children"in g){const C=g.children;let w=-1;for(;++w<C.length;){const T=a.one(C[w],g);if(T){if(w&&C[w-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=m_(T.value)),!Array.isArray(T)&&T.type==="element")){const x=T.children[0];x&&x.type==="text"&&(x.value=m_(x.value))}Array.isArray(T)?c.push(...T):c.push(T)}}}return c}}function bb(i,s){i.position&&(s.position=o0(i))}function Cb(i,s){let l=s;if(i&&i.data){const o=i.data.hName,S=i.data.hChildren,b=i.data.hProperties;if(typeof o=="string")if(l.type==="element")l.tagName=o;else{const _="children"in l?l.children:[l];l={type:"element",tagName:o,properties:{},children:_}}l.type==="element"&&b&&Object.assign(l.properties,aa(b)),"children"in l&&l.children&&S!==null&&S!==void 0&&(l.children=S)}return l}function wb(i,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:i.all(s)};return i.patch(s,o),i.applyData(s,o)}function xb(i,s){const l=[];let o=-1;for(s&&l.push({type:"text",value:`
|
|
68
|
+
`});++o<i.length;)o&&l.push({type:"text",value:`
|
|
69
|
+
`}),l.push(i[o]);return s&&i.length>0&&l.push({type:"text",value:`
|
|
70
|
+
`}),l}function m_(i){let s=0,l=i.charCodeAt(s);for(;l===9||l===32;)s++,l=i.charCodeAt(s);return i.slice(s)}function g_(i,s){const l=yb(i,s),o=l.one(i,void 0),S=cb(l),b=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return S&&b.children.push({type:"text",value:`
|
|
71
|
+
`},S),b}function Eb(i,s){return i&&"run"in i?async function(l,o){const S=g_(l,{file:o,...s});await i.run(S,o)}:function(l,o){return g_(l,{file:o,...i||s})}}function v_(i){if(i)throw i}var Fu,S_;function kb(){if(S_)return Fu;S_=1;var i=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]"},b=function(h){if(!h||s.call(h)!=="[object Object]")return!1;var g=i.call(h,"constructor"),c=h.constructor&&h.constructor.prototype&&i.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!c)return!1;var C;for(C in h);return typeof C>"u"||i.call(h,C)},_=function(h,g){l&&g.name==="__proto__"?l(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},a=function(h,g){if(g==="__proto__")if(i.call(h,g)){if(o)return o(h,g).value}else return;return h[g]};return Fu=function u(){var h,g,c,C,w,T,x=arguments[0],v=1,p=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<p;++v)if(h=arguments[v],h!=null)for(g in h)c=a(x,g),C=a(h,g),x!==C&&(d&&C&&(b(C)||(w=S(C)))?(w?(w=!1,T=c&&S(c)?c:[]):T=c&&b(c)?c:{},_(x,{name:g,newValue:u(d,T,C)})):typeof C<"u"&&_(x,{name:g,newValue:C}));return x},Fu}var Ab=kb();const qu=M_(Ab);function oc(i){if(typeof i!="object"||i===null)return!1;const s=Object.getPrototypeOf(i);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)}function Tb(){const i=[],s={run:l,use:o};return s;function l(...S){let b=-1;const _=S.pop();if(typeof _!="function")throw new TypeError("Expected function as last argument, not "+_);a(null,...S);function a(u,...h){const g=i[++b];let c=-1;if(u){_(u);return}for(;++c<S.length;)(h[c]===null||h[c]===void 0)&&(h[c]=S[c]);S=h,g?Db(g,a)(...h):_(null,...h)}}function o(S){if(typeof S!="function")throw new TypeError("Expected `middelware` to be a function, not "+S);return i.push(S),s}}function Db(i,s){let l;return o;function o(..._){const a=i.length>_.length;let u;a&&_.push(S);try{u=i.apply(this,_)}catch(h){const g=h;if(a&&l)throw g;return S(g)}a||(u&&u.then&&typeof u.then=="function"?u.then(b,S):u instanceof Error?S(u):b(u))}function S(_,...a){l||(l=!0,s(_,...a))}function b(_){S(null,_)}}const Ci={basename:Rb,dirname:Lb,extname:Mb,join:Ob,sep:"/"};function Rb(i,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');Ns(i);let l=0,o=-1,S=i.length,b;if(s===void 0||s.length===0||s.length>i.length){for(;S--;)if(i.codePointAt(S)===47){if(b){l=S+1;break}}else o<0&&(b=!0,o=S+1);return o<0?"":i.slice(l,o)}if(s===i)return"";let _=-1,a=s.length-1;for(;S--;)if(i.codePointAt(S)===47){if(b){l=S+1;break}}else _<0&&(b=!0,_=S+1),a>-1&&(i.codePointAt(S)===s.codePointAt(a--)?a<0&&(o=S):(a=-1,o=_));return l===o?o=_:o<0&&(o=i.length),i.slice(l,o)}function Lb(i){if(Ns(i),i.length===0)return".";let s=-1,l=i.length,o;for(;--l;)if(i.codePointAt(l)===47){if(o){s=l;break}}else o||(o=!0);return s<0?i.codePointAt(0)===47?"/":".":s===1&&i.codePointAt(0)===47?"//":i.slice(0,s)}function Mb(i){Ns(i);let s=i.length,l=-1,o=0,S=-1,b=0,_;for(;s--;){const a=i.codePointAt(s);if(a===47){if(_){o=s+1;break}continue}l<0&&(_=!0,l=s+1),a===46?S<0?S=s:b!==1&&(b=1):S>-1&&(b=-1)}return S<0||l<0||b===0||b===1&&S===l-1&&S===o+1?"":i.slice(S,l)}function Ob(...i){let s=-1,l;for(;++s<i.length;)Ns(i[s]),i[s]&&(l=l===void 0?i[s]:l+"/"+i[s]);return l===void 0?".":Bb(l)}function Bb(i){Ns(i);const s=i.codePointAt(0)===47;let l=zb(i,!s);return l.length===0&&!s&&(l="."),l.length>0&&i.codePointAt(i.length-1)===47&&(l+="/"),s?"/"+l:l}function zb(i,s){let l="",o=0,S=-1,b=0,_=-1,a,u;for(;++_<=i.length;){if(_<i.length)a=i.codePointAt(_);else{if(a===47)break;a=47}if(a===47){if(!(S===_-1||b===1))if(S!==_-1&&b===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=_,b=0;continue}}else if(l.length>0){l="",o=0,S=_,b=0;continue}}s&&(l=l.length>0?l+"/..":"..",o=2)}else l.length>0?l+="/"+i.slice(S+1,_):l=i.slice(S+1,_),o=_-S-1;S=_,b=0}else a===46&&b>-1?b++:b=-1}return l}function Ns(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}const Hb={cwd:Nb};function Nb(){return"/"}function uc(i){return!!(i!==null&&typeof i=="object"&&"href"in i&&i.href&&"protocol"in i&&i.protocol&&i.auth===void 0)}function jb(i){if(typeof i=="string")i=new URL(i);else if(!uc(i)){const s=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+i+"`");throw s.code="ERR_INVALID_ARG_TYPE",s}if(i.protocol!=="file:"){const s=new TypeError("The URL must be of scheme file");throw s.code="ERR_INVALID_URL_SCHEME",s}return Ub(i)}function Ub(i){if(i.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=i.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"||Ib(s)?l={value:s}:l=s:l={},this.cwd="cwd"in l?"":Hb.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Vu.length;){const b=Vu[o];b in l&&l[b]!==void 0&&l[b]!==null&&(this[b]=b==="history"?[...l[b]]:l[b])}let S;for(S in l)Vu.includes(S)||(this[S]=l[S])}get basename(){return typeof this.path=="string"?Ci.basename(this.path):void 0}set basename(s){Gu(s,"basename"),Yu(s,"basename"),this.path=Ci.join(this.dirname||"",s)}get dirname(){return typeof this.path=="string"?Ci.dirname(this.path):void 0}set dirname(s){y_(this.basename,"dirname"),this.path=Ci.join(s||"",this.basename)}get extname(){return typeof this.path=="string"?Ci.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=Ci.join(this.dirname,this.stem+(s||""))}get path(){return this.history[this.history.length-1]}set path(s){uc(s)&&(s=jb(s)),Gu(s,"path"),this.path!==s&&this.history.push(s)}get stem(){return typeof this.path=="string"?Ci.basename(this.path,this.extname):void 0}set stem(s){Gu(s,"stem"),Yu(s,"stem"),this.path=Ci.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(i,s){if(i&&i.includes(Ci.sep))throw new Error("`"+s+"` cannot be a path: did not expect `"+Ci.sep+"`")}function Gu(i,s){if(!i)throw new Error("`"+s+"` cannot be empty")}function y_(i,s){if(!i)throw new Error("Setting `"+s+"` requires `path` to be set too")}function Ib(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}const Pb=(function(i){const o=this.constructor.prototype,S=o[i],b=function(){return S.apply(b,arguments)};return Object.setPrototypeOf(b,o),b}),Fb={}.hasOwnProperty;class Ac extends Pb{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=Tb()}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?(Wu("data",this.frozen),this.namespace[s]=l,this):Fb.call(this.namespace,s)&&this.namespace[s]||void 0:s?(Wu("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=ia(s),o=this.parser||this.Parser;return Ku("parse",o),o(String(l),l)}process(s,l){const o=this;return this.freeze(),Ku("process",this.parser||this.Parser),Xu("process",this.compiler||this.Compiler),l?S(void 0,l):new Promise(S);function S(b,_){const a=ia(s),u=o.parse(a);o.run(u,a,function(g,c,C){if(g||!c||!C)return h(g);const w=c,T=o.stringify(w,C);Yb(T)?C.value=T:C.result=T,h(g,C)});function h(g,c){g||!c?_(g):b?b(c):l(void 0,c)}}}processSync(s){let l=!1,o;return this.freeze(),Ku("processSync",this.parser||this.Parser),Xu("processSync",this.compiler||this.Compiler),this.process(s,S),C_("processSync","process",l),o;function S(b,_){l=!0,v_(b),o=_}}run(s,l,o){b_(s),this.freeze();const S=this.transformers;return!o&&typeof l=="function"&&(o=l,l=void 0),o?b(void 0,o):new Promise(b);function b(_,a){const u=ia(l);S.run(s,u,h);function h(g,c,C){const w=c||s;g?a(g):_?_(w):o(void 0,w,C)}}}runSync(s,l){let o=!1,S;return this.run(s,l,b),C_("runSync","run",o),S;function b(_,a){v_(_),S=a,o=!0}}stringify(s,l){this.freeze();const o=ia(l),S=this.compiler||this.Compiler;return Xu("stringify",S),b_(s),S(s,o)}use(s,...l){const o=this.attachers,S=this.namespace;if(Wu("use",this.frozen),s!=null)if(typeof s=="function")u(s,l);else if(typeof s=="object")Array.isArray(s)?a(s):_(s);else throw new TypeError("Expected usable value, not `"+s+"`");return this;function b(h){if(typeof h=="function")u(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...c]=h;u(g,c)}else _(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function _(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 g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const c=h[g];b(c)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function u(h,g){let c=-1,C=-1;for(;++c<o.length;)if(o[c][0]===h){C=c;break}if(C===-1)o.push([h,...g]);else if(g.length>0){let[w,...T]=g;const x=o[C][1];oc(x)&&oc(w)&&(w=qu(!0,x,w)),o[C]=[h,w,...T]}}}}const qb=new Ac().freeze();function Ku(i,s){if(typeof s!="function")throw new TypeError("Cannot `"+i+"` without `parser`")}function Xu(i,s){if(typeof s!="function")throw new TypeError("Cannot `"+i+"` without `compiler`")}function Wu(i,s){if(s)throw new Error("Cannot call `"+i+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function b_(i){if(!oc(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function C_(i,s,l){if(!l)throw new Error("`"+i+"` finished async. Use `"+s+"` instead")}function ia(i){return Vb(i)?i:new _m(i)}function Vb(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function Yb(i){return typeof i=="string"||Gb(i)}function Gb(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}const Kb="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",w_=[],x_={allowDangerousHtml:!0},Xb=/^(https?|ircs?|mailto|xmpp)$/i,Wb=[{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 $b(i){const s=Qb(i),l=Zb(i);return Jb(s.runSync(s.parse(l),l),i)}function Qb(i){const s=i.rehypePlugins||w_,l=i.remarkPlugins||w_,o=i.remarkRehypeOptions?{...i.remarkRehypeOptions,...x_}:x_;return qb().use(R1).use(l).use(Eb,o).use(s)}function Zb(i){const s=i.children||"",l=new _m;return typeof s=="string"&&(l.value=s),l}function Jb(i,s){const l=s.allowedElements,o=s.allowElement,S=s.components,b=s.disallowedElements,_=s.skipHtml,a=s.unwrapDisallowed,u=s.urlTransform||eC;for(const g of Wb)Object.hasOwn(s,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+Kb+g.id,void 0);return kc(i,h),d0(i,{Fragment:F.Fragment,components:S,ignoreInvalidStyle:!0,jsx:F.jsx,jsxs:F.jsxs,passKeys:!0,passNode:!0});function h(g,c,C){if(g.type==="raw"&&C&&typeof c=="number")return _?C.children.splice(c,1):C.children[c]={type:"text",value:g.value},c;if(g.type==="element"){let w;for(w in Uu)if(Object.hasOwn(Uu,w)&&Object.hasOwn(g.properties,w)){const T=g.properties[w],x=Uu[w];(x===null||x.includes(g.tagName))&&(g.properties[w]=u(String(T||""),w,g))}}if(g.type==="element"){let w=l?!l.includes(g.tagName):b?b.includes(g.tagName):!1;if(!w&&o&&typeof c=="number"&&(w=!o(g,c,C)),w&&C&&typeof c=="number")return a&&g.children?C.children.splice(c,1,...g.children):C.children.splice(c,1),c}}}function eC(i){const s=i.indexOf(":"),l=i.indexOf("?"),o=i.indexOf("#"),S=i.indexOf("/");return s===-1||S!==-1&&s>S||l!==-1&&s>l||o!==-1&&s>o||Xb.test(i.slice(0,s))?i:""}function E_(i,s){const l=String(i);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 tC(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function iC(i,s,l){const S=da((l||{}).ignore||[]),b=nC(s);let _=-1;for(;++_<b.length;)pm(i,"text",a);function a(h,g){let c=-1,C;for(;++c<g.length;){const w=g[c],T=C?C.children:void 0;if(S(w,T?T.indexOf(w):void 0,C))return;C=w}if(C)return u(h,g)}function u(h,g){const c=g[g.length-1],C=b[_][0],w=b[_][1];let T=0;const v=c.children.indexOf(h);let p=!1,d=[];C.lastIndex=0;let m=C.exec(h.value);for(;m;){const E=m.index,R={index:m.index,input:m.input,stack:[...g,h]};let A=w(...m,R);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?C.lastIndex=E+1:(T!==E&&d.push({type:"text",value:h.value.slice(T,E)}),Array.isArray(A)?d.push(...A):A&&d.push(A),T=E+m[0].length,p=!0),!C.global)break;m=C.exec(h.value)}return p?(T<h.value.length&&d.push({type:"text",value:h.value.slice(T)}),c.children.splice(v,1,...d)):d=[h],v+d.length}}function nC(i){const s=[];if(!Array.isArray(i))throw new TypeError("Expected find and replace tuple or list of tuples");const l=!i[0]||Array.isArray(i[0])?i:[i];let o=-1;for(;++o<l.length;){const S=l[o];s.push([rC(S[0]),sC(S[1])])}return s}function rC(i){return typeof i=="string"?new RegExp(tC(i),"g"):i}function sC(i){return typeof i=="function"?i:function(){return i}}const $u="phrasing",Qu=["autolink","link","image","label"];function lC(){return{transforms:[dC],enter:{literalAutolink:oC,literalAutolinkEmail:Zu,literalAutolinkHttp:Zu,literalAutolinkWww:Zu},exit:{literalAutolink:fC,literalAutolinkEmail:hC,literalAutolinkHttp:uC,literalAutolinkWww:cC}}}function aC(){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 oC(i){this.enter({type:"link",title:null,url:"",children:[]},i)}function Zu(i){this.config.enter.autolinkProtocol.call(this,i)}function uC(i){this.config.exit.autolinkProtocol.call(this,i)}function cC(i){this.config.exit.data.call(this,i);const s=this.stack[this.stack.length-1];s.type,s.url="http://"+this.sliceSerialize(i)}function hC(i){this.config.exit.autolinkEmail.call(this,i)}function fC(i){this.exit(i)}function dC(i){iC(i,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,pC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),_C]],{ignore:["link","linkReference"]})}function pC(i,s,l,o,S){let b="";if(!mm(S)||(/^w/i.test(s)&&(l=s+l,s="",b="http://"),!mC(l)))return!1;const _=gC(l+o);if(!_[0])return!1;const a={type:"link",title:null,url:b+s+_[0],children:[{type:"text",value:s+_[0]}]};return _[1]?[a,{type:"text",value:_[1]}]:a}function _C(i,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 mC(i){const s=i.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 gC(i){const s=/[!"&'),.:;<>?\]}]+$/.exec(i);if(!s)return[i,void 0];i=i.slice(0,s.index);let l=s[0],o=l.indexOf(")");const S=E_(i,"(");let b=E_(i,")");for(;o!==-1&&S>b;)i+=l.slice(0,o+1),l=l.slice(o+1),o=l.indexOf(")"),b++;return[i,l]}function mm(i,s){const l=i.input.charCodeAt(i.index-1);return(i.index===0||Un(l)||ca(l))&&(!s||l!==47)}gm.peek=kC;function vC(){this.buffer()}function SC(i){this.enter({type:"footnoteReference",identifier:"",label:""},i)}function yC(){this.buffer()}function bC(i){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},i)}function CC(i){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=pi(this.sliceSerialize(i)).toLowerCase(),l.label=s}function wC(i){this.exit(i)}function xC(i){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=pi(this.sliceSerialize(i)).toLowerCase(),l.label=s}function EC(i){this.exit(i)}function kC(){return"["}function gm(i,s,l,o){const S=l.createTracker(o);let b=S.move("[^");const _=l.enter("footnoteReference"),a=l.enter("reference");return b+=S.move(l.safe(l.associationId(i),{after:"]",before:b})),a(),_(),b+=S.move("]"),b}function AC(){return{enter:{gfmFootnoteCallString:vC,gfmFootnoteCall:SC,gfmFootnoteDefinitionLabelString:yC,gfmFootnoteDefinition:bC},exit:{gfmFootnoteCallString:CC,gfmFootnoteCall:wC,gfmFootnoteDefinitionLabelString:xC,gfmFootnoteDefinition:EC}}}function TC(i){let s=!1;return i&&i.firstLineBlank&&(s=!0),{handlers:{footnoteDefinition:l,footnoteReference:gm},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(o,S,b,_){const a=b.createTracker(_);let u=a.move("[^");const h=b.enter("footnoteDefinition"),g=b.enter("label");return u+=a.move(b.safe(b.associationId(o),{before:u,after:"]"})),g(),u+=a.move("]:"),o.children&&o.children.length>0&&(a.shift(4),u+=a.move((s?`
|
|
72
|
+
`:" ")+b.indentLines(b.containerFlow(o,a.current()),s?vm:DC))),h(),u}}function DC(i,s,l){return s===0?i:vm(i,s,l)}function vm(i,s,l){return(l?"":" ")+i}const RC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Sm.peek=zC;function LC(){return{canContainEols:["delete"],enter:{strikethrough:OC},exit:{strikethrough:BC}}}function MC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:RC}],handlers:{delete:Sm}}}function OC(i){this.enter({type:"delete",children:[]},i)}function BC(i){this.exit(i)}function Sm(i,s,l,o){const S=l.createTracker(o),b=l.enter("strikethrough");let _=S.move("~~");return _+=l.containerPhrasing(i,{...S.current(),before:_,after:"~"}),_+=S.move("~~"),b(),_}function zC(){return"~"}function HC(i){return i.length}function NC(i,s){const l=s||{},o=(l.align||[]).concat(),S=l.stringLength||HC,b=[],_=[],a=[],u=[];let h=0,g=-1;for(;++g<i.length;){const x=[],v=[];let p=-1;for(i[g].length>h&&(h=i[g].length);++p<i[g].length;){const d=jC(i[g][p]);if(l.alignDelimiters!==!1){const m=S(d);v[p]=m,(u[p]===void 0||m>u[p])&&(u[p]=m)}x.push(d)}_[g]=x,a[g]=v}let c=-1;if(typeof o=="object"&&"length"in o)for(;++c<h;)b[c]=k_(o[c]);else{const x=k_(o);for(;++c<h;)b[c]=x}c=-1;const C=[],w=[];for(;++c<h;){const x=b[c];let v="",p="";x===99?(v=":",p=":"):x===108?v=":":x===114&&(p=":");let d=l.alignDelimiters===!1?1:Math.max(1,u[c]-v.length-p.length);const m=v+"-".repeat(d)+p;l.alignDelimiters!==!1&&(d=v.length+d+p.length,d>u[c]&&(u[c]=d),w[c]=d),C[c]=m}_.splice(1,0,C),a.splice(1,0,w),g=-1;const T=[];for(;++g<_.length;){const x=_[g],v=a[g];c=-1;const p=[];for(;++c<h;){const d=x[c]||"";let m="",E="";if(l.alignDelimiters!==!1){const R=u[c]-(v[c]||0),A=b[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&&p.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&d==="")&&(l.delimiterStart!==!1||c)&&p.push(" "),l.alignDelimiters!==!1&&p.push(m),p.push(d),l.alignDelimiters!==!1&&p.push(E),l.padding!==!1&&p.push(" "),(l.delimiterEnd!==!1||c!==h-1)&&p.push("|")}T.push(l.delimiterEnd===!1?p.join("").replace(/ +$/,""):p.join(""))}return T.join(`
|
|
73
|
+
`)}function jC(i){return i==null?"":String(i)}function k_(i){const s=typeof i=="string"?i.codePointAt(0):0;return s===67||s===99?99:s===76||s===108?108:s===82||s===114?114:0}function UC(i,s,l,o){const S=l.enter("blockquote"),b=l.createTracker(o);b.move("> "),b.shift(2);const _=l.indentLines(l.containerFlow(i,b.current()),IC);return S(),_}function IC(i,s,l){return">"+(l?"":" ")+i}function PC(i,s){return A_(i,s.inConstruct,!0)&&!A_(i,s.notInConstruct,!1)}function A_(i,s,l){if(typeof s=="string"&&(s=[s]),!s||s.length===0)return l;let o=-1;for(;++o<s.length;)if(i.includes(s[o]))return!0;return!1}function T_(i,s,l,o){let S=-1;for(;++S<l.unsafe.length;)if(l.unsafe[S].character===`
|
|
74
|
+
`&&PC(l.stack,l.unsafe[S]))return/[ \t]/.test(o.before)?"":" ";return`\\
|
|
75
|
+
`}function FC(i,s){const l=String(i);let o=l.indexOf(s),S=o,b=0,_=0;if(typeof s!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===S?++b>_&&(_=b):b=1,S=o+s.length,o=l.indexOf(s,S);return _}function qC(i,s){return!!(s.options.fences===!1&&i.value&&!i.lang&&/[^ \r\n]/.test(i.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(i.value))}function VC(i){const s=i.options.fence||"`";if(s!=="`"&&s!=="~")throw new Error("Cannot serialize code with `"+s+"` for `options.fence`, expected `` ` `` or `~`");return s}function YC(i,s,l,o){const S=VC(l),b=i.value||"",_=S==="`"?"GraveAccent":"Tilde";if(qC(i,l)){const c=l.enter("codeIndented"),C=l.indentLines(b,GC);return c(),C}const a=l.createTracker(o),u=S.repeat(Math.max(FC(b,S)+1,3)),h=l.enter("codeFenced");let g=a.move(u);if(i.lang){const c=l.enter(`codeFencedLang${_}`);g+=a.move(l.safe(i.lang,{before:g,after:" ",encode:["`"],...a.current()})),c()}if(i.lang&&i.meta){const c=l.enter(`codeFencedMeta${_}`);g+=a.move(" "),g+=a.move(l.safe(i.meta,{before:g,after:`
|
|
76
|
+
`,encode:["`"],...a.current()})),c()}return g+=a.move(`
|
|
77
|
+
`),b&&(g+=a.move(b+`
|
|
78
|
+
`)),g+=a.move(u),h(),g}function GC(i,s,l){return(l?"":" ")+i}function Tc(i){const s=i.options.quote||'"';if(s!=='"'&&s!=="'")throw new Error("Cannot serialize title with `"+s+"` for `options.quote`, expected `\"`, or `'`");return s}function KC(i,s,l,o){const S=Tc(l),b=S==='"'?"Quote":"Apostrophe",_=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(i),{before:h,after:"]",...u.current()})),h+=u.move("]: "),a(),!i.url||/[\0- \u007F]/.test(i.url)?(a=l.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(l.safe(i.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(a=l.enter("destinationRaw"),h+=u.move(l.safe(i.url,{before:h,after:i.title?" ":`
|
|
79
|
+
`,...u.current()}))),a(),i.title&&(a=l.enter(`title${b}`),h+=u.move(" "+S),h+=u.move(l.safe(i.title,{before:h,after:S,...u.current()})),h+=u.move(S),a()),_(),h}function XC(i){const s=i.options.emphasis||"*";if(s!=="*"&&s!=="_")throw new Error("Cannot serialize emphasis with `"+s+"` for `options.emphasis`, expected `*`, or `_`");return s}function Os(i){return"&#x"+i.toString(16).toUpperCase()+";"}function oa(i,s,l){const o=Dr(i),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=WC;function ym(i,s,l,o){const S=XC(l),b=l.enter("emphasis"),_=l.createTracker(o),a=_.move(S);let u=_.move(l.containerPhrasing(i,{after:S,before:a,..._.current()}));const h=u.charCodeAt(0),g=oa(o.before.charCodeAt(o.before.length-1),h,S);g.inside&&(u=Os(h)+u.slice(1));const c=u.charCodeAt(u.length-1),C=oa(o.after.charCodeAt(0),c,S);C.inside&&(u=u.slice(0,-1)+Os(c));const w=_.move(S);return b(),l.attentionEncodeSurroundingInfo={after:C.outside,before:g.outside},a+u+w}function WC(i,s,l){return l.options.emphasis||"*"}function $C(i,s){let l=!1;return kc(i,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return l=!0,lc}),!!((!i.depth||i.depth<3)&&Sc(i)&&(s.options.setext||l))}function QC(i,s,l,o){const S=Math.max(Math.min(6,i.depth||1),1),b=l.createTracker(o);if($C(i,l)){const g=l.enter("headingSetext"),c=l.enter("phrasing"),C=l.containerPhrasing(i,{...b.current(),before:`
|
|
80
|
+
`,after:`
|
|
81
|
+
`});return c(),g(),C+`
|
|
82
|
+
`+(S===1?"=":"-").repeat(C.length-(Math.max(C.lastIndexOf("\r"),C.lastIndexOf(`
|
|
83
|
+
`))+1))}const _="#".repeat(S),a=l.enter("headingAtx"),u=l.enter("phrasing");b.move(_+" ");let h=l.containerPhrasing(i,{before:"# ",after:`
|
|
84
|
+
`,...b.current()});return/^[\t ]/.test(h)&&(h=Os(h.charCodeAt(0))+h.slice(1)),h=h?_+" "+h:_,l.options.closeAtx&&(h+=" "+_),u(),a(),h}bm.peek=ZC;function bm(i){return i.value||""}function ZC(){return"<"}Cm.peek=JC;function Cm(i,s,l,o){const S=Tc(l),b=S==='"'?"Quote":"Apostrophe",_=l.enter("image");let a=l.enter("label");const u=l.createTracker(o);let h=u.move("![");return h+=u.move(l.safe(i.alt,{before:h,after:"]",...u.current()})),h+=u.move("]("),a(),!i.url&&i.title||/[\0- \u007F]/.test(i.url)?(a=l.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(l.safe(i.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(a=l.enter("destinationRaw"),h+=u.move(l.safe(i.url,{before:h,after:i.title?" ":")",...u.current()}))),a(),i.title&&(a=l.enter(`title${b}`),h+=u.move(" "+S),h+=u.move(l.safe(i.title,{before:h,after:S,...u.current()})),h+=u.move(S),a()),h+=u.move(")"),_(),h}function JC(){return"!"}wm.peek=ew;function wm(i,s,l,o){const S=i.referenceType,b=l.enter("imageReference");let _=l.enter("label");const a=l.createTracker(o);let u=a.move("![");const h=l.safe(i.alt,{before:u,after:"]",...a.current()});u+=a.move(h+"]["),_();const g=l.stack;l.stack=[],_=l.enter("reference");const c=l.safe(l.associationId(i),{before:u,after:"]",...a.current()});return _(),l.stack=g,b(),S==="full"||!h||h!==c?u+=a.move(c+"]"):S==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function ew(){return"!"}xm.peek=tw;function xm(i,s,l){let o=i.value||"",S="`",b=-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+" ");++b<l.unsafe.length;){const _=l.unsafe[b],a=l.compilePattern(_);let u;if(_.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 tw(){return"`"}function Em(i,s){const l=Sc(i);return!!(!s.options.resourceLink&&i.url&&!i.title&&i.children&&i.children.length===1&&i.children[0].type==="text"&&(l===i.url||"mailto:"+l===i.url)&&/^[a-z][a-z+.-]+:/i.test(i.url)&&!/[\0- <>\u007F]/.test(i.url))}km.peek=iw;function km(i,s,l,o){const S=Tc(l),b=S==='"'?"Quote":"Apostrophe",_=l.createTracker(o);let a,u;if(Em(i,l)){const g=l.stack;l.stack=[],a=l.enter("autolink");let c=_.move("<");return c+=_.move(l.containerPhrasing(i,{before:c,after:">",..._.current()})),c+=_.move(">"),a(),l.stack=g,c}a=l.enter("link"),u=l.enter("label");let h=_.move("[");return h+=_.move(l.containerPhrasing(i,{before:h,after:"](",..._.current()})),h+=_.move("]("),u(),!i.url&&i.title||/[\0- \u007F]/.test(i.url)?(u=l.enter("destinationLiteral"),h+=_.move("<"),h+=_.move(l.safe(i.url,{before:h,after:">",..._.current()})),h+=_.move(">")):(u=l.enter("destinationRaw"),h+=_.move(l.safe(i.url,{before:h,after:i.title?" ":")",..._.current()}))),u(),i.title&&(u=l.enter(`title${b}`),h+=_.move(" "+S),h+=_.move(l.safe(i.title,{before:h,after:S,..._.current()})),h+=_.move(S),u()),h+=_.move(")"),a(),h}function iw(i,s,l){return Em(i,l)?"<":"["}Am.peek=nw;function Am(i,s,l,o){const S=i.referenceType,b=l.enter("linkReference");let _=l.enter("label");const a=l.createTracker(o);let u=a.move("[");const h=l.containerPhrasing(i,{before:u,after:"]",...a.current()});u+=a.move(h+"]["),_();const g=l.stack;l.stack=[],_=l.enter("reference");const c=l.safe(l.associationId(i),{before:u,after:"]",...a.current()});return _(),l.stack=g,b(),S==="full"||!h||h!==c?u+=a.move(c+"]"):S==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function nw(){return"["}function Dc(i){const s=i.options.bullet||"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bullet`, expected `*`, `+`, or `-`");return s}function rw(i){const s=Dc(i),l=i.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 sw(i){const s=i.options.bulletOrdered||".";if(s!=="."&&s!==")")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOrdered`, expected `.` or `)`");return s}function Tm(i){const s=i.options.rule||"*";if(s!=="*"&&s!=="-"&&s!=="_")throw new Error("Cannot serialize rules with `"+s+"` for `options.rule`, expected `*`, `-`, or `_`");return s}function lw(i,s,l,o){const S=l.enter("list"),b=l.bulletCurrent;let _=i.ordered?sw(l):Dc(l);const a=i.ordered?_==="."?")":".":rw(l);let u=s&&l.bulletLastUsed?_===l.bulletLastUsed:!1;if(!i.ordered){const g=i.children?i.children[0]:void 0;if((_==="*"||_==="-")&&g&&(!g.children||!g.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){let c=-1;for(;++c<i.children.length;){const C=i.children[c];if(C&&C.type==="listItem"&&C.children&&C.children[0]&&C.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(_=a),l.bulletCurrent=_;const h=l.containerFlow(i,o);return l.bulletLastUsed=_,l.bulletCurrent=b,S(),h}function aw(i){const s=i.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 ow(i,s,l,o){const S=aw(l);let b=l.bulletCurrent||Dc(l);s&&s.type==="list"&&s.ordered&&(b=(typeof s.start=="number"&&s.start>-1?s.start:1)+(l.options.incrementListMarker===!1?0:s.children.indexOf(i))+b);let _=b.length+1;(S==="tab"||S==="mixed"&&(s&&s.type==="list"&&s.spread||i.spread))&&(_=Math.ceil(_/4)*4);const a=l.createTracker(o);a.move(b+" ".repeat(_-b.length)),a.shift(_);const u=l.enter("listItem"),h=l.indentLines(l.containerFlow(i,a.current()),g);return u(),h;function g(c,C,w){return C?(w?"":" ".repeat(_))+c:(w?b:b+" ".repeat(_-b.length))+c}}function uw(i,s,l,o){const S=l.enter("paragraph"),b=l.enter("phrasing"),_=l.containerPhrasing(i,o);return b(),S(),_}const cw=da(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function hw(i,s,l,o){return(i.children.some(function(_){return cw(_)})?l.containerPhrasing:l.containerFlow).call(l,i,o)}function fw(i){const s=i.options.strong||"*";if(s!=="*"&&s!=="_")throw new Error("Cannot serialize strong with `"+s+"` for `options.strong`, expected `*`, or `_`");return s}Dm.peek=dw;function Dm(i,s,l,o){const S=fw(l),b=l.enter("strong"),_=l.createTracker(o),a=_.move(S+S);let u=_.move(l.containerPhrasing(i,{after:S,before:a,..._.current()}));const h=u.charCodeAt(0),g=oa(o.before.charCodeAt(o.before.length-1),h,S);g.inside&&(u=Os(h)+u.slice(1));const c=u.charCodeAt(u.length-1),C=oa(o.after.charCodeAt(0),c,S);C.inside&&(u=u.slice(0,-1)+Os(c));const w=_.move(S+S);return b(),l.attentionEncodeSurroundingInfo={after:C.outside,before:g.outside},a+u+w}function dw(i,s,l){return l.options.strong||"*"}function pw(i,s,l,o){return l.safe(i.value,o)}function _w(i){const s=i.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 mw(i,s,l){const o=(Tm(l)+(l.options.ruleSpaces?" ":"")).repeat(_w(l));return l.options.ruleSpaces?o.slice(0,-1):o}const Rm={blockquote:UC,break:T_,code:YC,definition:KC,emphasis:ym,hardBreak:T_,heading:QC,html:bm,image:Cm,imageReference:wm,inlineCode:xm,link:km,linkReference:Am,list:lw,listItem:ow,paragraph:uw,root:hw,strong:Dm,text:pw,thematicBreak:mw};function gw(){return{enter:{table:vw,tableData:D_,tableHeader:D_,tableRow:yw},exit:{codeText:bw,table:Sw,tableData:Ju,tableHeader:Ju,tableRow:Ju}}}function vw(i){const s=i._align;this.enter({type:"table",align:s.map(function(l){return l==="none"?null:l}),children:[]},i),this.data.inTable=!0}function Sw(i){this.exit(i),this.data.inTable=void 0}function yw(i){this.enter({type:"tableRow",children:[]},i)}function Ju(i){this.exit(i)}function D_(i){this.enter({type:"tableCell",children:[]},i)}function bw(i){let s=this.resume();this.data.inTable&&(s=s.replace(/\\([\\|])/g,Cw));const l=this.stack[this.stack.length-1];l.type,l.value=s,this.exit(i)}function Cw(i,s){return s==="|"?s:i}function ww(i){const s=i||{},l=s.tableCellPadding,o=s.tablePipeAlign,S=s.stringLength,b=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:C,table:_,tableCell:u,tableRow:a}};function _(w,T,x,v){return h(g(w,x,v),w.align)}function a(w,T,x,v){const p=c(w,x,v),d=h([p]);return d.slice(0,d.indexOf(`
|
|
86
|
+
`))}function u(w,T,x,v){const p=x.enter("tableCell"),d=x.enter("phrasing"),m=x.containerPhrasing(w,{...v,before:b,after:b});return d(),p(),m}function h(w,T){return NC(w,{align:T,alignDelimiters:o,padding:l,stringLength:S})}function g(w,T,x){const v=w.children;let p=-1;const d=[],m=T.enter("table");for(;++p<v.length;)d[p]=c(v[p],T,x);return m(),d}function c(w,T,x){const v=w.children;let p=-1;const d=[],m=T.enter("tableRow");for(;++p<v.length;)d[p]=u(v[p],w,T,x);return m(),d}function C(w,T,x){let v=Rm.inlineCode(w,T,x);return x.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function xw(){return{exit:{taskListCheckValueChecked:R_,taskListCheckValueUnchecked:R_,paragraph:kw}}}function Ew(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Aw}}}function R_(i){const s=this.stack[this.stack.length-2];s.type,s.checked=i.type==="taskListCheckValueChecked"}function kw(i){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 b=-1,_;for(;++b<S.length;){const a=S[b];if(a.type==="paragraph"){_=a;break}}_===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(i)}function Aw(i,s,l,o){const S=i.children[0],b=typeof i.checked=="boolean"&&S&&S.type==="paragraph",_="["+(i.checked?"x":" ")+"] ",a=l.createTracker(o);b&&a.move(_);let u=Rm.listItem(i,s,l,{...o,...a.current()});return b&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),u;function h(g){return g+_}}function Tw(){return[lC(),AC(),LC(),gw(),xw()]}function Dw(i){return{extensions:[aC(),TC(i),MC(),ww(i),Ew()]}}const Rw={tokenize:Hw,partial:!0},Lm={tokenize:Nw,partial:!0},Mm={tokenize:jw,partial:!0},Om={tokenize:Uw,partial:!0},Lw={tokenize:Iw,partial:!0},Bm={name:"wwwAutolink",tokenize:Bw,previous:Hm},zm={name:"protocolAutolink",tokenize:zw,previous:Nm},qi={name:"emailAutolink",tokenize:Ow,previous:jm},wi={};function Mw(){return{text:wi}}let jn=48;for(;jn<123;)wi[jn]=qi,jn++,jn===58?jn=65:jn===91&&(jn=97);wi[43]=qi;wi[45]=qi;wi[46]=qi;wi[95]=qi;wi[72]=[qi,zm];wi[104]=[qi,zm];wi[87]=[qi,Bm];wi[119]=[qi,Bm];function Ow(i,s,l){const o=this;let S,b;return _;function _(c){return!cc(c)||!jm.call(o,o.previous)||Rc(o.events)?l(c):(i.enter("literalAutolink"),i.enter("literalAutolinkEmail"),a(c))}function a(c){return cc(c)?(i.consume(c),a):c===64?(i.consume(c),u):l(c)}function u(c){return c===46?i.check(Lw,g,h)(c):c===45||c===95||Dt(c)?(b=!0,i.consume(c),u):g(c)}function h(c){return i.consume(c),S=!0,u}function g(c){return b&&S&&Mt(o.previous)?(i.exit("literalAutolinkEmail"),i.exit("literalAutolink"),s(c)):l(c)}}function Bw(i,s,l){const o=this;return S;function S(_){return _!==87&&_!==119||!Hm.call(o,o.previous)||Rc(o.events)?l(_):(i.enter("literalAutolink"),i.enter("literalAutolinkWww"),i.check(Rw,i.attempt(Lm,i.attempt(Mm,b),l),l)(_))}function b(_){return i.exit("literalAutolinkWww"),i.exit("literalAutolink"),s(_)}}function zw(i,s,l){const o=this;let S="",b=!1;return _;function _(c){return(c===72||c===104)&&Nm.call(o,o.previous)&&!Rc(o.events)?(i.enter("literalAutolink"),i.enter("literalAutolinkHttp"),S+=String.fromCodePoint(c),i.consume(c),a):l(c)}function a(c){if(Mt(c)&&S.length<5)return S+=String.fromCodePoint(c),i.consume(c),a;if(c===58){const C=S.toLowerCase();if(C==="http"||C==="https")return i.consume(c),u}return l(c)}function u(c){return c===47?(i.consume(c),b?h:(b=!0,u)):l(c)}function h(c){return c===null||sa(c)||et(c)||Un(c)||ca(c)?l(c):i.attempt(Lm,i.attempt(Mm,g),l)(c)}function g(c){return i.exit("literalAutolinkHttp"),i.exit("literalAutolink"),s(c)}}function Hw(i,s,l){let o=0;return S;function S(_){return(_===87||_===119)&&o<3?(o++,i.consume(_),S):_===46&&o===3?(i.consume(_),b):l(_)}function b(_){return _===null?l(_):s(_)}}function Nw(i,s,l){let o,S,b;return _;function _(h){return h===46||h===95?i.check(Om,u,a)(h):h===null||et(h)||Un(h)||h!==45&&ca(h)?u(h):(b=!0,i.consume(h),_)}function a(h){return h===95?o=!0:(S=o,o=void 0),i.consume(h),_}function u(h){return S||o||!b?l(h):s(h)}}function jw(i,s){let l=0,o=0;return S;function S(_){return _===40?(l++,i.consume(_),S):_===41&&o<l?b(_):_===33||_===34||_===38||_===39||_===41||_===42||_===44||_===46||_===58||_===59||_===60||_===63||_===93||_===95||_===126?i.check(Om,s,b)(_):_===null||et(_)||Un(_)?s(_):(i.consume(_),S)}function b(_){return _===41&&o++,i.consume(_),S}}function Uw(i,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?(i.consume(a),o):a===38?(i.consume(a),b):a===93?(i.consume(a),S):a===60||a===null||et(a)||Un(a)?s(a):l(a)}function S(a){return a===null||a===40||a===91||et(a)||Un(a)?s(a):o(a)}function b(a){return Mt(a)?_(a):l(a)}function _(a){return a===59?(i.consume(a),o):Mt(a)?(i.consume(a),_):l(a)}}function Iw(i,s,l){return o;function o(b){return i.consume(b),S}function S(b){return Dt(b)?l(b):s(b)}}function Hm(i){return i===null||i===40||i===42||i===95||i===91||i===93||i===126||et(i)}function Nm(i){return!Mt(i)}function jm(i){return!(i===47||cc(i))}function cc(i){return i===43||i===45||i===46||i===95||Dt(i)}function Rc(i){let s=i.length,l=!1;for(;s--;){const o=i[s][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){l=!0;break}if(o._gfmAutolinkLiteralWalkedInto){l=!1;break}}return i.length>0&&!l&&(i[i.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const Pw={tokenize:Ww,partial:!0};function Fw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gw,continuation:{tokenize:Kw},exit:Xw}},text:{91:{name:"gfmFootnoteCall",tokenize:Yw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:qw,resolveTo:Vw}}}}function qw(i,s,l){const o=this;let S=o.events.length;const b=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let _;for(;S--;){const u=o.events[S][1];if(u.type==="labelImage"){_=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(!_||!_._balanced)return l(u);const h=pi(o.sliceSerialize({start:_.end,end:o.now()}));return h.codePointAt(0)!==94||!b.includes(h.slice(1))?l(u):(i.enter("gfmFootnoteCallLabelMarker"),i.consume(u),i.exit("gfmFootnoteCallLabelMarker"),s(u))}}function Vw(i,s){let l=i.length;for(;l--;)if(i[l][1].type==="labelImage"&&i[l][0]==="enter"){i[l][1];break}i[l+1][1].type="data",i[l+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},i[l+3][1].start),end:Object.assign({},i[i.length-1][1].end)},S={type:"gfmFootnoteCallMarker",start:Object.assign({},i[l+3][1].end),end:Object.assign({},i[l+3][1].end)};S.end.column++,S.end.offset++,S.end._bufferIndex++;const b={type:"gfmFootnoteCallString",start:Object.assign({},S.end),end:Object.assign({},i[i.length-1][1].start)},_={type:"chunkString",contentType:"string",start:Object.assign({},b.start),end:Object.assign({},b.end)},a=[i[l+1],i[l+2],["enter",o,s],i[l+3],i[l+4],["enter",S,s],["exit",S,s],["enter",b,s],["enter",_,s],["exit",_,s],["exit",b,s],i[i.length-2],i[i.length-1],["exit",o,s]];return i.splice(l,i.length-l+1,...a),i}function Yw(i,s,l){const o=this,S=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let b=0,_;return a;function a(c){return i.enter("gfmFootnoteCall"),i.enter("gfmFootnoteCallLabelMarker"),i.consume(c),i.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?l(c):(i.enter("gfmFootnoteCallMarker"),i.consume(c),i.exit("gfmFootnoteCallMarker"),i.enter("gfmFootnoteCallString"),i.enter("chunkString").contentType="string",h)}function h(c){if(b>999||c===93&&!_||c===null||c===91||et(c))return l(c);if(c===93){i.exit("chunkString");const C=i.exit("gfmFootnoteCallString");return S.includes(pi(o.sliceSerialize(C)))?(i.enter("gfmFootnoteCallLabelMarker"),i.consume(c),i.exit("gfmFootnoteCallLabelMarker"),i.exit("gfmFootnoteCall"),s):l(c)}return et(c)||(_=!0),b++,i.consume(c),c===92?g:h}function g(c){return c===91||c===92||c===93?(i.consume(c),b++,h):h(c)}}function Gw(i,s,l){const o=this,S=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let b,_=0,a;return u;function u(T){return i.enter("gfmFootnoteDefinition")._container=!0,i.enter("gfmFootnoteDefinitionLabel"),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(T),i.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(T){return T===94?(i.enter("gfmFootnoteDefinitionMarker"),i.consume(T),i.exit("gfmFootnoteDefinitionMarker"),i.enter("gfmFootnoteDefinitionLabelString"),i.enter("chunkString").contentType="string",g):l(T)}function g(T){if(_>999||T===93&&!a||T===null||T===91||et(T))return l(T);if(T===93){i.exit("chunkString");const x=i.exit("gfmFootnoteDefinitionLabelString");return b=pi(o.sliceSerialize(x)),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(T),i.exit("gfmFootnoteDefinitionLabelMarker"),i.exit("gfmFootnoteDefinitionLabel"),C}return et(T)||(a=!0),_++,i.consume(T),T===92?c:g}function c(T){return T===91||T===92||T===93?(i.consume(T),_++,g):g(T)}function C(T){return T===58?(i.enter("definitionMarker"),i.consume(T),i.exit("definitionMarker"),S.includes(b)||S.push(b),Ie(i,w,"gfmFootnoteDefinitionWhitespace")):l(T)}function w(T){return s(T)}}function Kw(i,s,l){return i.check(Hs,s,i.attempt(Pw,s,l))}function Xw(i){i.exit("gfmFootnoteDefinition")}function Ww(i,s,l){const o=this;return Ie(i,S,"gfmFootnoteDefinitionIndent",5);function S(b){const _=o.events[o.events.length-1];return _&&_[1].type==="gfmFootnoteDefinitionIndent"&&_[2].sliceSerialize(_[1],!0).length===4?s(b):l(b)}}function $w(i){let l=(i||{}).singleTilde;const o={name:"strikethrough",tokenize:b,resolveAll:S};return l==null&&(l=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function S(_,a){let u=-1;for(;++u<_.length;)if(_[u][0]==="enter"&&_[u][1].type==="strikethroughSequenceTemporary"&&_[u][1]._close){let h=u;for(;h--;)if(_[h][0]==="exit"&&_[h][1].type==="strikethroughSequenceTemporary"&&_[h][1]._open&&_[u][1].end.offset-_[u][1].start.offset===_[h][1].end.offset-_[h][1].start.offset){_[u][1].type="strikethroughSequence",_[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},_[h][1].start),end:Object.assign({},_[u][1].end)},c={type:"strikethroughText",start:Object.assign({},_[h][1].end),end:Object.assign({},_[u][1].start)},C=[["enter",g,a],["enter",_[h][1],a],["exit",_[h][1],a],["enter",c,a]],w=a.parser.constructs.insideSpan.null;w&&Zt(C,C.length,0,ha(w,_.slice(h+1,u),a)),Zt(C,C.length,0,[["exit",c,a],["enter",_[u][1],a],["exit",_[u][1],a],["exit",g,a]]),Zt(_,h-1,u-h+3,C),u=h+C.length-2;break}}for(u=-1;++u<_.length;)_[u][1].type==="strikethroughSequenceTemporary"&&(_[u][1].type="data");return _}function b(_,a,u){const h=this.previous,g=this.events;let c=0;return C;function C(T){return h===126&&g[g.length-1][1].type!=="characterEscape"?u(T):(_.enter("strikethroughSequenceTemporary"),w(T))}function w(T){const x=Dr(h);if(T===126)return c>1?u(T):(_.consume(T),c++,w);if(c<2&&!l)return u(T);const v=_.exit("strikethroughSequenceTemporary"),p=Dr(T);return v._open=!p||p===2&&!!x,v._close=!x||x===2&&!!p,a(T)}}}class Qw{constructor(){this.map=[]}add(s,l,o){Zw(this,s,l,o)}consume(s){if(this.map.sort(function(b,_){return b[0]-_[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 b of S)s.push(b);S=o.pop()}this.map.length=0}}function Zw(i,s,l,o){let S=0;if(!(l===0&&o.length===0)){for(;S<i.map.length;){if(i.map[S][0]===s){i.map[S][1]+=l,i.map[S][2].push(...o);return}S+=1}i.map.push([s,l,o])}}function Jw(i,s){let l=!1;const o=[];for(;s<i.length;){const S=i[s];if(l){if(S[0]==="enter")S[1].type==="tableContent"&&o.push(i[s+1][1].type==="tableDelimiterMarker"?"left":"none");else if(S[1].type==="tableContent"){if(i[s-1][1].type==="tableDelimiterMarker"){const b=o.length-1;o[b]=o[b]==="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 ex(){return{flow:{null:{name:"table",tokenize:tx,resolveAll:ix}}}}function tx(i,s,l){const o=this;let S=0,b=0,_;return a;function a(j){let P=o.events.length-1;for(;P>-1;){const Y=o.events[P][1].type;if(Y==="lineEnding"||Y==="linePrefix")P--;else break}const V=P>-1?o.events[P][1].type:null,q=V==="tableHead"||V==="tableRow"?A:u;return q===A&&o.parser.lazy[o.now().line]?l(j):q(j)}function u(j){return i.enter("tableHead"),i.enter("tableRow"),h(j)}function h(j){return j===124||(_=!0,b+=1),g(j)}function g(j){return j===null?l(j):Ce(j)?b>1?(b=0,o.interrupt=!0,i.exit("tableRow"),i.enter("lineEnding"),i.consume(j),i.exit("lineEnding"),w):l(j):ze(j)?Ie(i,g,"whitespace")(j):(b+=1,_&&(_=!1,S+=1),j===124?(i.enter("tableCellDivider"),i.consume(j),i.exit("tableCellDivider"),_=!0,g):(i.enter("data"),c(j)))}function c(j){return j===null||j===124||et(j)?(i.exit("data"),g(j)):(i.consume(j),j===92?C:c)}function C(j){return j===92||j===124?(i.consume(j),c):c(j)}function w(j){return o.interrupt=!1,o.parser.lazy[o.now().line]?l(j):(i.enter("tableDelimiterRow"),_=!1,ze(j)?Ie(i,T,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):T(j))}function T(j){return j===45||j===58?v(j):j===124?(_=!0,i.enter("tableCellDivider"),i.consume(j),i.exit("tableCellDivider"),x):R(j)}function x(j){return ze(j)?Ie(i,v,"whitespace")(j):v(j)}function v(j){return j===58?(b+=1,_=!0,i.enter("tableDelimiterMarker"),i.consume(j),i.exit("tableDelimiterMarker"),p):j===45?(b+=1,p(j)):j===null||Ce(j)?E(j):R(j)}function p(j){return j===45?(i.enter("tableDelimiterFiller"),d(j)):R(j)}function d(j){return j===45?(i.consume(j),d):j===58?(_=!0,i.exit("tableDelimiterFiller"),i.enter("tableDelimiterMarker"),i.consume(j),i.exit("tableDelimiterMarker"),m):(i.exit("tableDelimiterFiller"),m(j))}function m(j){return ze(j)?Ie(i,E,"whitespace")(j):E(j)}function E(j){return j===124?T(j):j===null||Ce(j)?!_||S!==b?R(j):(i.exit("tableDelimiterRow"),i.exit("tableHead"),s(j)):R(j)}function R(j){return l(j)}function A(j){return i.enter("tableRow"),L(j)}function L(j){return j===124?(i.enter("tableCellDivider"),i.consume(j),i.exit("tableCellDivider"),L):j===null||Ce(j)?(i.exit("tableRow"),s(j)):ze(j)?Ie(i,L,"whitespace")(j):(i.enter("data"),k(j))}function k(j){return j===null||j===124||et(j)?(i.exit("data"),L(j)):(i.consume(j),j===92?O:k)}function O(j){return j===92||j===124?(i.consume(j),k):k(j)}}function ix(i,s){let l=-1,o=!0,S=0,b=[0,0,0,0],_=[0,0,0,0],a=!1,u=0,h,g,c;const C=new Qw;for(;++l<i.length;){const w=i[l],T=w[1];w[0]==="enter"?T.type==="tableHead"?(a=!1,u!==0&&(L_(C,s,u,h,g),g=void 0,u=0),h={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},C.add(l,0,[["enter",h,s]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(o=!0,c=void 0,b=[0,0,0,0],_=[0,l+1,0,0],a&&(a=!1,g={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},C.add(l,0,[["enter",g,s]])),S=T.type==="tableDelimiterRow"?2:g?3:1):S&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(o=!1,_[2]===0&&(b[1]!==0&&(_[0]=_[1],c=na(C,s,b,S,void 0,c),b=[0,0,0,0]),_[2]=l)):T.type==="tableCellDivider"&&(o?o=!1:(b[1]!==0&&(_[0]=_[1],c=na(C,s,b,S,void 0,c)),b=_,_=[b[1],l,0,0])):T.type==="tableHead"?(a=!0,u=l):T.type==="tableRow"||T.type==="tableDelimiterRow"?(u=l,b[1]!==0?(_[0]=_[1],c=na(C,s,b,S,l,c)):_[1]!==0&&(c=na(C,s,_,S,l,c)),S=0):S&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(_[3]=l)}for(u!==0&&L_(C,s,u,h,g),C.consume(s.events),l=-1;++l<s.events.length;){const w=s.events[l];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=Jw(s.events,l))}return i}function na(i,s,l,o,S,b){const _=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",a="tableContent";l[0]!==0&&(b.end=Object.assign({},Ar(s.events,l[0])),i.add(l[0],0,[["exit",b,s]]));const u=Ar(s.events,l[1]);if(b={type:_,start:Object.assign({},u),end:Object.assign({},u)},i.add(l[1],0,[["enter",b,s]]),l[2]!==0){const h=Ar(s.events,l[2]),g=Ar(s.events,l[3]),c={type:a,start:Object.assign({},h),end:Object.assign({},g)};if(i.add(l[2],0,[["enter",c,s]]),o!==2){const C=s.events[l[2]],w=s.events[l[3]];if(C[1].end=Object.assign({},w[1].end),C[1].type="chunkText",C[1].contentType="text",l[3]>l[2]+1){const T=l[2]+1,x=l[3]-l[2]-1;i.add(T,x,[])}}i.add(l[3]+1,0,[["exit",c,s]])}return S!==void 0&&(b.end=Object.assign({},Ar(s.events,S)),i.add(S,0,[["exit",b,s]]),b=void 0),b}function L_(i,s,l,o,S){const b=[],_=Ar(s.events,l);S&&(S.end=Object.assign({},_),b.push(["exit",S,s])),o.end=Object.assign({},_),b.push(["exit",o,s]),i.add(l+1,0,b)}function Ar(i,s){const l=i[s],o=l[0]==="enter"?"start":"end";return l[1][o]}const nx={name:"tasklistCheck",tokenize:sx};function rx(){return{text:{91:nx}}}function sx(i,s,l){const o=this;return S;function S(u){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?l(u):(i.enter("taskListCheck"),i.enter("taskListCheckMarker"),i.consume(u),i.exit("taskListCheckMarker"),b)}function b(u){return et(u)?(i.enter("taskListCheckValueUnchecked"),i.consume(u),i.exit("taskListCheckValueUnchecked"),_):u===88||u===120?(i.enter("taskListCheckValueChecked"),i.consume(u),i.exit("taskListCheckValueChecked"),_):l(u)}function _(u){return u===93?(i.enter("taskListCheckMarker"),i.consume(u),i.exit("taskListCheckMarker"),i.exit("taskListCheck"),a):l(u)}function a(u){return Ce(u)?s(u):ze(u)?i.check({tokenize:lx},s,l)(u):l(u)}}function lx(i,s,l){return Ie(i,o,"whitespace");function o(S){return S===null?l(S):s(S)}}function ax(i){return W_([Mw(),Fw(),$w(i),ex(),rx()])}const ox={};function ux(i){const s=this,l=i||ox,o=s.data(),S=o.micromarkExtensions||(o.micromarkExtensions=[]),b=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),_=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);S.push(ax(l)),b.push(Tw()),_.push(Dw(l))}function cx({settings:i,busy:s=!1,promptPreviews:l,testResult:o,onSave:S,onTest:b,onClose:_}){const[a,u]=ge.useState(i),[h,g]=ge.useState(i.apiKey??"");return ge.useEffect(()=>{u(i),g(i.apiKey??"")},[i]),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:_,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=>g(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:fx(a,c),onChange:C=>u({...a,prompts:hx(a.prompts,c.key,C.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:b,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 hx(i,s,l,o){const S={...i??{}};return l.trim()&&l!==o?S[s]=l:delete S[s],Object.keys(S).length>0?S:void 0}function fx(i,s){var l;return((l=i.prompts)==null?void 0:l[s.key])??s.defaultPrompt}function dx({active:i=!0,taskSlug:s,role:l,sessionId:o}){const[S,b]=ge.useState(null),[_,a]=ge.useState([]),[u,h]=ge.useState(""),[g,c]=ge.useState(!1),[C,w]=ge.useState(!1),[T,x]=ge.useState(!1),[v,p]=ge.useState("ready"),[d,m]=ge.useState(""),[E,R]=ge.useState(Date.now()),[A,L]=ge.useState(!1),[k,O]=ge.useState(""),[j,P]=ge.useState(!1),[V,q]=ge.useState([]),[Y,$]=ge.useState(),[G,J]=ge.useState(0),ne=ge.useRef(i),z=ge.useRef(1),M=ge.useRef(null);ge.useEffect(()=>{ne.current=i},[i]),ge.useEffect(()=>{Promise.all([je.getTranslationSettings(),je.getTranslationPrompts()]).then(([Q,de])=>{b(Q),q(de)}).catch(Q=>O(Q.message))},[]),ge.useEffect(()=>{a([]),O(""),p("ready"),m(""),z.current=1;let Q=!1,de;const pe=()=>{Q||(de=window.setTimeout(ke,ne.current?200:1e3))},ke=async()=>{if(!Q)try{const xe=await je.pollTranslationSession(o,z.current);if(Q)return;H(xe.events),z.current=xe.nextCursor,p(xe.status),ne.current&&m(bx(new Date().toISOString()))}catch(xe){Q||O(xe instanceof Error?xe.message:"Translation poll failed.")}finally{pe()}};return je.startTranslationSession(s,l).then(xe=>{Q||(p(xe.status),z.current=xe.nextCursor,ke())}).catch(xe=>{Q||O(xe instanceof Error?xe.message:"Translation start failed.")}),()=>{Q=!0,de!==void 0&&window.clearTimeout(de)}},[o,s,l,G]),ge.useEffect(()=>{var Q;i&&((Q=M.current)==null||Q.scrollIntoView({block:"nearest"}))},[i,_.length]);const B=_x(_);ge.useEffect(()=>{if(!B)return;R(Date.now());const Q=window.setInterval(()=>R(Date.now()),250);return()=>window.clearInterval(Q)},[B]);async function I(Q=!1){if(S){L(!0),O(""),c(!1);try{const de=await je.translateUserInput(s,l,{text:u,mode:Q?"auto-send":"review-before-send",useContext:S.contextEnabled,send:Q});x(de.contextUsed),de.sent?(h(""),c(!1)):(h(de.englishPreview),c(!0))}catch(de){O(de instanceof Error?de.message:"Translation failed.")}finally{L(!1)}}}function H(Q){if(Q.length===0)return;for(const pe of Q)pe.type==="status"?p(pe.status):pe.type==="error"&&O(pe.message);const de=Q.filter(pe=>pe.type==="entry");de.length>0&&a(pe=>de.reduce((ke,xe)=>Sx(ke,xe.entry),pe))}async function ie(){if(u.trim()){L(!0),O("");try{await je.sendTranslatedInput(s,l,{englishText:u}),h(""),c(!1),x(!1)}catch(Q){O(Q instanceof Error?Q.message:"Failed to send English input.")}finally{L(!1)}}}function he(Q){Q.key!=="Enter"||Q.shiftKey||Q.nativeEvent.isComposing||(Q.preventDefault(),!A&&u.trim()&&(g?ie():I(C)))}async function fe(Q,de){L(!0),O("");try{const pe=await je.updateTranslationSettings({...Q,...de!==void 0?{apiKey:de}:{}}),ke=await je.getTranslationPrompts();b(pe),q(ke),P(!1),J(xe=>xe+1)}catch(pe){O(pe instanceof Error?pe.message:"Failed to save translation settings.")}finally{L(!1)}}async function X(){L(!0),O("");try{$(await je.testTranslationProvider())}catch(Q){O(Q instanceof Error?Q.message:"Provider test failed.")}finally{L(!1)}}async function N(){a([]),z.current=1,await je.clearTranslationSession(o).catch(Q=>O(Q.message))}if(!S)return F.jsx("aside",{className:"translation-panel",children:F.jsx("p",{className:"muted",children:"Loading translation settings..."})});const re=mx(_,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":C,className:`auto-send-toggle${C?" is-active":""}`,type:"button",onClick:()=>w(Q=>!Q),children:C?"✅ Auto-send":"× Auto-send"}),F.jsx("button",{type:"button",onClick:()=>P(!0),children:"Settings"}),F.jsx("button",{type:"button",onClick:()=>void N(),children:"Clear"})]})]}),F.jsxs("div",{className:"translation-status-row",children:[F.jsxs("p",{children:[S.model," · ",re,T?" · context used":""]}),F.jsx("p",{children:d?`poll ${d}`:"poll -"})]})]}),k?F.jsx("div",{className:"error-banner",children:k}):null,F.jsxs("div",{className:"translation-entry-list",children:[_.length===0?F.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,_.map(Q=>F.jsx(px,{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:he,placeholder:"输入中文,先翻译成英文工程指令..."}),F.jsx("div",{className:"translation-composer-actions",children:F.jsx("button",{type:"button",disabled:A||!g||!u.trim(),onClick:()=>void ie(),children:"Send English"})})]})}),j?F.jsx(cx,{settings:S,busy:A,promptPreviews:V,testResult:Y,onSave:fe,onTest:X,onClose:()=>P(!1)}):null]})}function px({entry:i}){const s=vx(i),l=i.sourceKind==="tool-output";return F.jsxs("article",{className:`translation-entry is-${i.sourceKind}`,children:[l?F.jsx("pre",{children:s}):F.jsx("div",{className:"translation-markdown",children:F.jsx($b,{remarkPlugins:[ux],children:s})}),i.warning?F.jsx("p",{className:"translation-entry-note",children:i.warning}):null,i.error?F.jsx("p",{className:"translation-entry-note is-error",children:i.error}):null]})}function _x(i){const s=i.find(Um);return(s==null?void 0:s.translationStartedAt)??(s==null?void 0:s.createdAt)}function mx(i,s,l){const o=i.find(Um);if(o)return`translating ${yx(Math.max(0,l-gx(o)))}`;const S=i.at(-1);return(S==null?void 0:S.status)==="failed"||s==="failed"?"error":s}function Um(i){return i.status==="queued"||i.status==="translating"}function gx(i){const s=Date.parse(i.translationStartedAt??i.createdAt);return Number.isFinite(s)?s:Date.now()}function vx(i){return i.status==="queued"||i.status==="translating"?i.sourceText:i.status==="translated"?i.translatedText:i.translatedText||i.sourceText}function Sx(i,s){return i.findIndex(o=>o.id===s.id)===-1?[...i,s]:i.map(o=>o.id===s.id?s:o)}function yx(i){if(i<1e3)return`${Math.max(.1,i/1e3).toFixed(1)}s`;const s=i/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 bx(i){const s=new Date(i);return Number.isNaN(s.getTime())?i:s.toLocaleTimeString()}function Cx({role:i,session:s,permissionMode:l,active:o=!0,busy:S,onPermissionModeChange:b,onStart:_,onResume:a,onStop:u,onRestart:h,onTerminalEvent:g}){const[c,C]=ge.useState(!1);return F.jsxs("section",{className:"session-console",children:[F.jsxs("div",{className:"session-console-top",children:[F.jsx(NS,{role:i,session:s,permissionMode:l,busy:S,onPermissionModeChange:b,onStart:_,onResume:a,onStop:u,onRestart:h}),F.jsx("button",{"aria-pressed":c,className:`translation-toggle${c?" is-active":""}`,type:"button",onClick:()=>C(w=>!w),children:c?"✅ Translate":"× Translate"})]}),(s==null?void 0:s.status)==="running"?F.jsx(wx,{active:o,onTerminalEvent:g,role:i,session:s,taskSlug:s.taskSlug,translationEnabled:c}):F.jsxs("div",{className:"terminal-empty",children:[F.jsx("strong",{children:i}),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 wx({active:i,onTerminalEvent:s,role:l,session:o,taskSlug:S,translationEnabled:b}){return F.jsxs("div",{className:b?"session-console-body has-translation":"session-console-body",children:[F.jsx("div",{className:"terminal-pane",children:F.jsx(zS,{sessionId:o.id,active:i,onEvent:s},o.id)}),b?F.jsx("div",{className:"translation-pane",children:F.jsx(dx,{active:i,taskSlug:S,role:l,sessionId:o.id},o.id)}):null]})}function xx({task:i,activeRole:s,onTaskChanged:l,onActiveRoleChange:o,onWorkflowChanged:S,onMessagesChanged:b,onOrchestrationChanged:_,onEventsChanged:a}){const[u,h]=ge.useState(null),[g,c]=ge.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default"}),[C,w]=ge.useState(!1),[T,x]=ge.useState(""),[v,p]=ge.useState([]),d=ge.useCallback(async()=>{const[L,k,O]=await Promise.all([je.getTaskStatus(i.taskSlug),je.listMessages(i.taskSlug),je.getOrchestrationState(i.taskSlug)]);h(L),S==null||S(L.workflow),b==null||b(k),_==null||_(O)},[b,_,S,i.taskSlug]);ge.useEffect(()=>{d().catch(L=>x(L.message))},[d]),ge.useEffect(()=>{p([]),a==null||a([])},[a,i.taskSlug]),ge.useEffect(()=>{c(L=>{let k=!1;const O={...L};for(const j of(u==null?void 0:u.sessions)??[])O[j.role]!==j.permissionMode&&(O[j.role]=j.permissionMode,k=!0);return k?O:L})},[u==null?void 0:u.sessions]),ge.useEffect(()=>{const L=window.setInterval(()=>{Promise.all([je.getTaskStatus(i.taskSlug),je.listMessages(i.taskSlug),je.getOrchestrationState(i.taskSlug)]).then(([k,O,j])=>{h(k),S==null||S(k.workflow),b==null||b(O),_==null||_(j)}).catch(k=>x(k.message))},3e3);return()=>window.clearInterval(L)},[b,_,S,i.taskSlug]);async function m(L){w(!0),x("");try{await L(),await d(),await l()}catch(k){x(k instanceof Error?k.message:"Action failed.")}finally{w(!1)}}async function E(){const L=i.worktreePath?[`Close task "${i.taskSlug}"?`,"","This is destructive:",`- deletes the task worktree: ${i.worktreePath}`,`- deletes the Git branch: ${i.branch}`,"- deletes VCM task/session/message/orchestration state","","VCM will not check running sessions or uncommitted changes before closing."].join(`
|
|
87
|
+
`):[`Close task "${i.taskSlug}"?`,"","This task was created without a separate worktree/branch.","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(L)){w(!0),x("");try{await je.cleanupTask(i.taskSlug,{force:!0,deleteBranch:!!i.worktreePath,forceDeleteBranch:!0}),R(`closed ${i.taskSlug}`),await l()}catch(O){x(O instanceof Error?O.message:"Close task failed.")}finally{w(!1)}}}function R(L){p(k=>{const O=[...k,`${new Date().toLocaleTimeString()} ${L}`];return a==null||a(O),O})}function A(L,k){c(O=>({...O,[L]:k}))}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:i.title||i.taskSlug}),F.jsx("span",{className:"workspace-branch",children:i.branch}),i.worktreePath?F.jsx("span",{className:"workspace-worktree",children:i.worktreePath}):null]}),F.jsx(AS,{activeRole:s,sessions:(u==null?void 0:u.sessions)??[],onSelect:o}),F.jsx("button",{type:"button",onClick:()=>void d(),children:"Refresh"}),F.jsx("button",{className:"danger-button",type:"button",disabled:C,onClick:()=>void E(),children:"Close Task"})]}),T?F.jsx("div",{className:"error-banner",children:T}):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(L=>{const k=L.name,O=k===s,j=O_((u==null?void 0:u.sessions)??[],k);return F.jsx("div",{className:O?"role-console-panel is-active":"role-console-panel","aria-hidden":!O,children:F.jsx(Cx,{role:k,session:j,permissionMode:g[k],active:O,busy:C,onPermissionModeChange:P=>A(k,P),onStart:()=>void m(async()=>{await je.startRoleSession(i.taskSlug,k,{cols:100,rows:28,permissionMode:g[k]}),R(`started ${k} with ${g[k]}`)}),onResume:()=>void m(async()=>{await je.resumeRoleSession(i.taskSlug,k,{cols:100,rows:28,permissionMode:g[k]}),R(`resumed ${k} with ${g[k]}`)}),onStop:()=>void m(async()=>{await je.stopRoleSession(i.taskSlug,k),R(`stopped ${k}`)}),onRestart:()=>void m(async()=>{await je.restartRoleSession(i.taskSlug,k,{cols:100,rows:28,permissionMode:g[k]}),R(`restarted ${k} with ${g[k]}`)}),onTerminalEvent:P=>R(`${L.label}: ${P}`)})},k)})})})})]})}function Ex(){const[i,s]=ge.useState(null),[l,o]=ge.useState([]),[S,b]=ge.useState(null),[_,a]=ge.useState(null),[u,h]=ge.useState([]),[g,c]=ge.useState(null),[C,w]=ge.useState(null),[T,x]=ge.useState(null),[v,p]=ge.useState(null),[d,m]=ge.useState(null),[E,R]=ge.useState("project-manager"),[A,L]=ge.useState("system"),[k,O]=ge.useState(!1),[j,P]=ge.useState(!1),[V,q]=ge.useState(""),Y=ge.useMemo(()=>pS(u,g),[u,g]),$=ge.useCallback(N=>{Y!=null&&Y.taskSlug&&w({taskSlug:Y.taskSlug,workflow:N})},[Y==null?void 0:Y.taskSlug]),G=ge.useCallback(N=>{Y!=null&&Y.taskSlug&&x({taskSlug:Y.taskSlug,messages:N})},[Y==null?void 0:Y.taskSlug]),J=ge.useCallback(N=>{Y!=null&&Y.taskSlug&&p({taskSlug:Y.taskSlug,orchestration:N})},[Y==null?void 0:Y.taskSlug]),ne=ge.useCallback(N=>{Y!=null&&Y.taskSlug&&m({taskSlug:Y.taskSlug,events:N})},[Y==null?void 0:Y.taskSlug]);async function z(){const N=await je.listTasks();return h(N),c(re=>{var Q;return re&&N.some(de=>de.taskSlug===re)?re:((Q=N[0])==null?void 0:Q.taskSlug)??null}),N}async function M(){const N=await je.getHarnessStatus();return b(N),N}async function B(){const N=await je.getRecentRepositoryPaths();return o(N),N}async function I(N){const[re,Q]=await Promise.all([je.listMessages(N),je.getOrchestrationState(N)]);x({taskSlug:N,messages:re}),p({taskSlug:N,orchestration:Q})}ge.useEffect(()=>{Promise.all([je.getCurrentProject(),je.getRecentRepositoryPaths(),je.getAppPreferences()]).then(async([N,re,Q])=>{s(N),o(re),L(Q.themeMode),N&&await Promise.all([z(),M()])}).catch(N=>q(N.message))},[]),ge.useEffect(()=>{const N=window.matchMedia("(prefers-color-scheme: dark)"),re=()=>O(N.matches);return re(),N.addEventListener("change",re),()=>N.removeEventListener("change",re)},[]),ge.useEffect(()=>{const N=A==="system"?k?"dark":"light":A;document.documentElement.dataset.theme=N,document.documentElement.dataset.themeMode=A},[k,A]);async function H(N){P(!0),q("");try{await N()}catch(re){q(re instanceof Error?re.message:"Action failed.")}finally{P(!1)}}const ie=C&&C.taskSlug===(Y==null?void 0:Y.taskSlug)?C.workflow:null,he=T&&T.taskSlug===(Y==null?void 0:Y.taskSlug)?T.messages:[],fe=v&&v.taskSlug===(Y==null?void 0:Y.taskSlug)?v.orchestration:null,X=d&&d.taskSlug===(Y==null?void 0:Y.taskSlug)?d.events:[];return F.jsxs(dS,{sidebar:F.jsx(wS,{project:i,recentRepositoryPaths:l,tasks:u,activeTaskSlug:(Y==null?void 0:Y.taskSlug)??null,workflow:ie,messages:he,orchestration:fe,events:X,harnessStatus:S,harnessApplyResult:_,busy:j,onConnect:N=>H(async()=>{const re=await je.connectProject({repoPath:N});s(re),a(null),await Promise.all([z(),M(),B()])}),onRefreshHarness:()=>H(async()=>{a(null),await M()}),onApplyHarness:()=>H(async()=>{const N=await je.applyHarness();a(N),await M()}),onCreateTask:N=>H(async()=>{const re=await je.createTask(N);await z(),c(re.taskSlug)}),onSelectTask:c,onOrchestrationModeChange:N=>{Y&&H(async()=>{const re=await je.updateOrchestrationState(Y.taskSlug,{mode:N});p({taskSlug:Y.taskSlug,orchestration:re})})},themeMode:A,onThemeModeChange:N=>{L(N),H(async()=>{const re=await je.updateAppPreferences({themeMode:N});L(re.themeMode)})},onStageMessage:N=>{H(async()=>{const re=await je.stageMessage(N.taskSlug,N.id);R(re.toRole),await I(N.taskSlug)})},onRejectMessage:N=>{H(async()=>{await je.rejectMessage(N.taskSlug,N.id),await I(N.taskSlug)})},onOpenMessageRole:R}),children:[V?F.jsx("div",{className:"error-banner",children:V}):null,i&&Y?F.jsx(xx,{task:Y,activeRole:E,onTaskChanged:async()=>{await z()},onActiveRoleChange:R,onWorkflowChanged:$,onMessagesChanged:G,onOrchestrationChanged:J,onEventsChanged:ne}):F.jsxs("section",{className:"empty-workspace",children:[F.jsx("h1",{children:i?"Create a task to open the workspace":"Connect a repository to begin"}),F.jsx("p",{children:i?"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."})]})]})}const Im=document.getElementById("root");if(!Im)throw new Error("Missing #root element.");fS.createRoot(Im).render(F.jsx(ge.StrictMode,{children:F.jsx(Ex,{})}));
|