termbeam 1.11.1 → 1.12.0
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/package.json +4 -3
- package/public-react/assets/index-CTOb8Hzh.js +108 -0
- package/public-react/assets/index-DCDkIi8X.css +32 -0
- package/public-react/index.html +27 -0
- package/public-react/manifest.webmanifest +1 -0
- package/public-react/registerSW.js +1 -0
- package/public-react/sw.js +2 -0
- package/src/routes.js +24 -22
- package/src/websocket.js +19 -1
- package/public/css/themes.css +0 -217
- package/public/index.html +0 -1521
- package/public/js/keybar.js +0 -180
- package/public/js/search.js +0 -95
- package/public/js/shared.js +0 -39
- package/public/js/terminal-themes.js +0 -291
- package/public/js/themes.js +0 -54
- package/public/manifest.json +0 -14
- package/public/sw.js +0 -88
- package/public/terminal.html +0 -4837
- /package/{public → public-react}/icons/icon-192.png +0 -0
- /package/{public → public-react}/icons/icon-512.png +0 -0
- /package/{public → public-react}/icons/icon.svg +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
function z0(r,f){for(var m=0;m<f.length;m++){const x=f[m];if(typeof x!="string"&&!Array.isArray(x)){for(const M in x)if(M!=="default"&&!(M in r)){const B=Object.getOwnPropertyDescriptor(x,M);B&&Object.defineProperty(r,M,B.get?B:{enumerable:!0,get:()=>x[M]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const f=document.createElement("link").relList;if(f&&f.supports&&f.supports("modulepreload"))return;for(const M of document.querySelectorAll('link[rel="modulepreload"]'))x(M);new MutationObserver(M=>{for(const B of M)if(B.type==="childList")for(const A of B.addedNodes)A.tagName==="LINK"&&A.rel==="modulepreload"&&x(A)}).observe(document,{childList:!0,subtree:!0});function m(M){const B={};return M.integrity&&(B.integrity=M.integrity),M.referrerPolicy&&(B.referrerPolicy=M.referrerPolicy),M.crossOrigin==="use-credentials"?B.credentials="include":M.crossOrigin==="anonymous"?B.credentials="omit":B.credentials="same-origin",B}function x(M){if(M.ep)return;M.ep=!0;const B=m(M);fetch(M.href,B)}})();function eh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var _u={exports:{}},Qn={};/**
|
|
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 uv;function I0(){if(uv)return Qn;uv=1;var r=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function m(x,M,B){var A=null;if(B!==void 0&&(A=""+B),M.key!==void 0&&(A=""+M.key),"key"in M){B={};for(var n in M)n!=="key"&&(B[n]=M[n])}else B=M;return M=B.ref,{$$typeof:r,type:x,key:A,ref:M!==void 0?M:null,props:B}}return Qn.Fragment=f,Qn.jsx=m,Qn.jsxs=m,Qn}var hv;function U0(){return hv||(hv=1,_u.exports=I0()),_u.exports}var O=U0(),vu={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 dv;function P0(){if(dv)return Ae;dv=1;var r=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),A=Symbol.for("react.context"),n=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),l=Symbol.for("react.activity"),g=Symbol.iterator;function C(j){return j===null||typeof j!="object"?null:(j=g&&j[g]||j["@@iterator"],typeof j=="function"?j:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,a={};function c(j,F,V){this.props=j,this.context=F,this.refs=a,this.updater=V||L}c.prototype.isReactComponent={},c.prototype.setState=function(j,F){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,F,"setState")},c.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function o(){}o.prototype=c.prototype;function u(j,F,V){this.props=j,this.context=F,this.refs=a,this.updater=V||L}var S=u.prototype=new o;S.constructor=u,_(S,c.prototype),S.isPureReactComponent=!0;var D=Array.isArray;function b(){}var E={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function R(j,F,V){var ee=V.ref;return{$$typeof:r,type:j,key:F,ref:ee!==void 0?ee:null,props:V}}function N(j,F){return R(j.type,F,j.props)}function z(j){return typeof j=="object"&&j!==null&&j.$$typeof===r}function I(j){var F={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(V){return F[V]})}var U=/\/+/g;function Y(j,F){return typeof j=="object"&&j!==null&&j.key!=null?I(""+j.key):F.toString(36)}function X(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(b,b):(j.status="pending",j.then(function(F){j.status==="pending"&&(j.status="fulfilled",j.value=F)},function(F){j.status==="pending"&&(j.status="rejected",j.reason=F)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function q(j,F,V,ee,le){var ue=typeof j;(ue==="undefined"||ue==="boolean")&&(j=null);var Z=!1;if(j===null)Z=!0;else switch(ue){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(j.$$typeof){case r:case f:Z=!0;break;case p:return Z=j._init,q(Z(j._payload),F,V,ee,le)}}if(Z)return le=le(j),Z=ee===""?"."+Y(j,0):ee,D(le)?(V="",Z!=null&&(V=Z.replace(U,"$&/")+"/"),q(le,F,V,"",function(ie){return ie})):le!=null&&(z(le)&&(le=N(le,V+(le.key==null||j&&j.key===le.key?"":(""+le.key).replace(U,"$&/")+"/")+Z)),F.push(le)),1;Z=0;var P=ee===""?".":ee+":";if(D(j))for(var ae=0;ae<j.length;ae++)ee=j[ae],ue=P+Y(ee,ae),Z+=q(ee,F,V,ue,le);else if(ae=C(j),typeof ae=="function")for(j=ae.call(j),ae=0;!(ee=j.next()).done;)ee=ee.value,ue=P+Y(ee,ae++),Z+=q(ee,F,V,ue,le);else if(ue==="object"){if(typeof j.then=="function")return q(X(j),F,V,ee,le);throw F=String(j),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return Z}function G(j,F,V){if(j==null)return j;var ee=[],le=0;return q(j,ee,"","",function(ue){return F.call(V,ue,le++)}),ee}function K(j){if(j._status===-1){var F=j._result;F=F(),F.then(function(V){(j._status===0||j._status===-1)&&(j._status=1,j._result=V)},function(V){(j._status===0||j._status===-1)&&(j._status=2,j._result=V)}),j._status===-1&&(j._status=0,j._result=F)}if(j._status===1)return j._result.default;throw j._result}var H=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},W={map:G,forEach:function(j,F,V){G(j,function(){F.apply(this,arguments)},V)},count:function(j){var F=0;return G(j,function(){F++}),F},toArray:function(j){return G(j,function(F){return F})||[]},only:function(j){if(!z(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Ae.Activity=l,Ae.Children=W,Ae.Component=c,Ae.Fragment=m,Ae.Profiler=M,Ae.PureComponent=u,Ae.StrictMode=x,Ae.Suspense=h,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(j){return E.H.useMemoCache(j)}},Ae.cache=function(j){return function(){return j.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(j,F,V){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ee=_({},j.props),le=j.key;if(F!=null)for(ue in F.key!==void 0&&(le=""+F.key),F)!w.call(F,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&F.ref===void 0||(ee[ue]=F[ue]);var ue=arguments.length-2;if(ue===1)ee.children=V;else if(1<ue){for(var Z=Array(ue),P=0;P<ue;P++)Z[P]=arguments[P+2];ee.children=Z}return R(j.type,le,ee)},Ae.createContext=function(j){return j={$$typeof:A,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:B,_context:j},j},Ae.createElement=function(j,F,V){var ee,le={},ue=null;if(F!=null)for(ee in F.key!==void 0&&(ue=""+F.key),F)w.call(F,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(le[ee]=F[ee]);var Z=arguments.length-2;if(Z===1)le.children=V;else if(1<Z){for(var P=Array(Z),ae=0;ae<Z;ae++)P[ae]=arguments[ae+2];le.children=P}if(j&&j.defaultProps)for(ee in Z=j.defaultProps,Z)le[ee]===void 0&&(le[ee]=Z[ee]);return R(j,ue,le)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(j){return{$$typeof:n,render:j}},Ae.isValidElement=z,Ae.lazy=function(j){return{$$typeof:p,_payload:{_status:-1,_result:j},_init:K}},Ae.memo=function(j,F){return{$$typeof:d,type:j,compare:F===void 0?null:F}},Ae.startTransition=function(j){var F=E.T,V={};E.T=V;try{var ee=j(),le=E.S;le!==null&&le(V,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(b,H)}catch(ue){H(ue)}finally{F!==null&&V.types!==null&&(F.types=V.types),E.T=F}},Ae.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},Ae.use=function(j){return E.H.use(j)},Ae.useActionState=function(j,F,V){return E.H.useActionState(j,F,V)},Ae.useCallback=function(j,F){return E.H.useCallback(j,F)},Ae.useContext=function(j){return E.H.useContext(j)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(j,F){return E.H.useDeferredValue(j,F)},Ae.useEffect=function(j,F){return E.H.useEffect(j,F)},Ae.useEffectEvent=function(j){return E.H.useEffectEvent(j)},Ae.useId=function(){return E.H.useId()},Ae.useImperativeHandle=function(j,F,V){return E.H.useImperativeHandle(j,F,V)},Ae.useInsertionEffect=function(j,F){return E.H.useInsertionEffect(j,F)},Ae.useLayoutEffect=function(j,F){return E.H.useLayoutEffect(j,F)},Ae.useMemo=function(j,F){return E.H.useMemo(j,F)},Ae.useOptimistic=function(j,F){return E.H.useOptimistic(j,F)},Ae.useReducer=function(j,F,V){return E.H.useReducer(j,F,V)},Ae.useRef=function(j){return E.H.useRef(j)},Ae.useState=function(j){return E.H.useState(j)},Ae.useSyncExternalStore=function(j,F,V){return E.H.useSyncExternalStore(j,F,V)},Ae.useTransition=function(){return E.H.useTransition()},Ae.version="19.2.4",Ae}var fv;function th(){return fv||(fv=1,vu.exports=P0()),vu.exports}var k=th();const fe=eh(k),cg=z0({__proto__:null,default:fe},[k]);var gu={exports:{}},Jn={},pu={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 _v;function $0(){return _v||(_v=1,(function(r){function f(q,G){var K=q.length;q.push(G);e:for(;0<K;){var H=K-1>>>1,W=q[H];if(0<M(W,G))q[H]=G,q[K]=W,K=H;else break e}}function m(q){return q.length===0?null:q[0]}function x(q){if(q.length===0)return null;var G=q[0],K=q.pop();if(K!==G){q[0]=K;e:for(var H=0,W=q.length,j=W>>>1;H<j;){var F=2*(H+1)-1,V=q[F],ee=F+1,le=q[ee];if(0>M(V,K))ee<W&&0>M(le,V)?(q[H]=le,q[ee]=K,H=ee):(q[H]=V,q[F]=K,H=F);else if(ee<W&&0>M(le,K))q[H]=le,q[ee]=K,H=ee;else break e}}return G}function M(q,G){var K=q.sortIndex-G.sortIndex;return K!==0?K:q.id-G.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var B=performance;r.unstable_now=function(){return B.now()}}else{var A=Date,n=A.now();r.unstable_now=function(){return A.now()-n}}var h=[],d=[],p=1,l=null,g=3,C=!1,L=!1,_=!1,a=!1,c=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,u=typeof setImmediate<"u"?setImmediate:null;function S(q){for(var G=m(d);G!==null;){if(G.callback===null)x(d);else if(G.startTime<=q)x(d),G.sortIndex=G.expirationTime,f(h,G);else break;G=m(d)}}function D(q){if(_=!1,S(q),!L)if(m(h)!==null)L=!0,b||(b=!0,I());else{var G=m(d);G!==null&&X(D,G.startTime-q)}}var b=!1,E=-1,w=5,R=-1;function N(){return a?!0:!(r.unstable_now()-R<w)}function z(){if(a=!1,b){var q=r.unstable_now();R=q;var G=!0;try{e:{L=!1,_&&(_=!1,o(E),E=-1),C=!0;var K=g;try{t:{for(S(q),l=m(h);l!==null&&!(l.expirationTime>q&&N());){var H=l.callback;if(typeof H=="function"){l.callback=null,g=l.priorityLevel;var W=H(l.expirationTime<=q);if(q=r.unstable_now(),typeof W=="function"){l.callback=W,S(q),G=!0;break t}l===m(h)&&x(h),S(q)}else x(h);l=m(h)}if(l!==null)G=!0;else{var j=m(d);j!==null&&X(D,j.startTime-q),G=!1}}break e}finally{l=null,g=K,C=!1}G=void 0}}finally{G?I():b=!1}}}var I;if(typeof u=="function")I=function(){u(z)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,Y=U.port2;U.port1.onmessage=z,I=function(){Y.postMessage(null)}}else I=function(){c(z,0)};function X(q,G){E=c(function(){q(r.unstable_now())},G)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(q){q.callback=null},r.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):w=0<q?Math.floor(1e3/q):5},r.unstable_getCurrentPriorityLevel=function(){return g},r.unstable_next=function(q){switch(g){case 1:case 2:case 3:var G=3;break;default:G=g}var K=g;g=G;try{return q()}finally{g=K}},r.unstable_requestPaint=function(){a=!0},r.unstable_runWithPriority=function(q,G){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var K=g;g=q;try{return G()}finally{g=K}},r.unstable_scheduleCallback=function(q,G,K){var H=r.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?H+K:H):K=H,q){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=K+W,q={id:p++,callback:G,priorityLevel:q,startTime:K,expirationTime:W,sortIndex:-1},K>H?(q.sortIndex=K,f(d,q),m(h)===null&&q===m(d)&&(_?(o(E),E=-1):_=!0,X(D,K-H))):(q.sortIndex=W,f(h,q),L||C||(L=!0,b||(b=!0,I()))),q},r.unstable_shouldYield=N,r.unstable_wrapCallback=function(q){var G=g;return function(){var K=g;g=G;try{return q.apply(this,arguments)}finally{g=K}}}})(mu)),mu}var vv;function W0(){return vv||(vv=1,pu.exports=$0()),pu.exports}var bu={exports:{}},Qt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var gv;function F0(){if(gv)return Qt;gv=1;var r=th();function f(h){var d="https://react.dev/errors/"+h;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(){}var x={d:{f:m,r:function(){throw Error(f(522))},D:m,C:m,L:m,m,X:m,S:m,M:m},p:0,findDOMNode:null},M=Symbol.for("react.portal");function B(h,d,p){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:l==null?null:""+l,children:h,containerInfo:d,implementation:p}}var A=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function n(h,d){if(h==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,Qt.createPortal=function(h,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(f(299));return B(h,d,null,p)},Qt.flushSync=function(h){var d=A.T,p=x.p;try{if(A.T=null,x.p=2,h)return h()}finally{A.T=d,x.p=p,x.d.f()}},Qt.preconnect=function(h,d){typeof h=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,x.d.C(h,d))},Qt.prefetchDNS=function(h){typeof h=="string"&&x.d.D(h)},Qt.preinit=function(h,d){if(typeof h=="string"&&d&&typeof d.as=="string"){var p=d.as,l=n(p,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,C=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;p==="style"?x.d.S(h,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:l,integrity:g,fetchPriority:C}):p==="script"&&x.d.X(h,{crossOrigin:l,integrity:g,fetchPriority:C,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Qt.preinitModule=function(h,d){if(typeof h=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var p=n(d.as,d.crossOrigin);x.d.M(h,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&x.d.M(h)},Qt.preload=function(h,d){if(typeof h=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var p=d.as,l=n(p,d.crossOrigin);x.d.L(h,p,{crossOrigin:l,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Qt.preloadModule=function(h,d){if(typeof h=="string")if(d){var p=n(d.as,d.crossOrigin);x.d.m(h,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else x.d.m(h)},Qt.requestFormReset=function(h){x.d.r(h)},Qt.unstable_batchedUpdates=function(h,d){return h(d)},Qt.useFormState=function(h,d,p){return A.H.useFormState(h,d,p)},Qt.useFormStatus=function(){return A.H.useHostTransitionStatus()},Qt.version="19.2.4",Qt}var pv;function ug(){if(pv)return bu.exports;pv=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(f){console.error(f)}}return r(),bu.exports=F0(),bu.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 mv;function q0(){if(mv)return Jn;mv=1;var r=W0(),f=th(),m=ug();function x(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function M(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function B(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function A(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 n(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 h(e){if(B(e)!==e)throw Error(x(188))}function d(e){var t=e.alternate;if(!t){if(t=B(e),t===null)throw Error(x(188));return t!==e?null:e}for(var i=e,s=t;;){var v=i.return;if(v===null)break;var y=v.alternate;if(y===null){if(s=v.return,s!==null){i=s;continue}break}if(v.child===y.child){for(y=v.child;y;){if(y===i)return h(v),e;if(y===s)return h(v),t;y=y.sibling}throw Error(x(188))}if(i.return!==s.return)i=v,s=y;else{for(var T=!1,$=v.child;$;){if($===i){T=!0,i=v,s=y;break}if($===s){T=!0,s=v,i=y;break}$=$.sibling}if(!T){for($=y.child;$;){if($===i){T=!0,i=y,s=v;break}if($===s){T=!0,s=y,i=v;break}$=$.sibling}if(!T)throw Error(x(189))}}if(i.alternate!==s)throw Error(x(190))}if(i.tag!==3)throw Error(x(188));return i.stateNode.current===i?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var l=Object.assign,g=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),N=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function I(e){return e===null||typeof e!="object"?null:(e=z&&e[z]||e["@@iterator"],typeof e=="function"?e:null)}var U=Symbol.for("react.client.reference");function Y(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===U?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case c:return"Profiler";case a:return"StrictMode";case D:return"Suspense";case b:return"SuspenseList";case R:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case u:return e.displayName||"Context";case o:return(e._context.displayName||"Context")+".Consumer";case S:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case E:return t=e.displayName||null,t!==null?t:Y(e.type)||"Memo";case w:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}var X=Array.isArray,q=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=m.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},H=[],W=-1;function j(e){return{current:e}}function F(e){0>W||(e.current=H[W],H[W]=null,W--)}function V(e,t){W++,H[W]=e.current,e.current=t}var ee=j(null),le=j(null),ue=j(null),Z=j(null);function P(e,t){switch(V(ue,t),V(le,e),V(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?O_(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=O_(t),e=k_(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(ee),V(ee,e)}function ae(){F(ee),F(le),F(ue)}function ie(e){e.memoizedState!==null&&V(Z,e);var t=ee.current,i=k_(t,e.type);t!==i&&(V(le,e),V(ee,i))}function ve(e){le.current===e&&(F(ee),F(le)),Z.current===e&&(F(Z),Xn._currentValue=K)}var _e,Ee;function pe(e){if(_e===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);_e=t&&t[1]||"",Ee=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+_e+e+Ee}var ke=!1;function $e(e,t){if(!e||ke)return"";ke=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(oe){var ne=oe}Reflect.construct(e,[],de)}else{try{de.call()}catch(oe){ne=oe}e.call(de.prototype)}}else{try{throw Error()}catch(oe){ne=oe}(de=e())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(oe){if(oe&&ne&&typeof oe.stack=="string")return[oe.stack,ne.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=s.DetermineComponentFrameRoot(),T=y[0],$=y[1];if(T&&$){var Q=T.split(`
|
|
44
|
+
`),re=$.split(`
|
|
45
|
+
`);for(v=s=0;s<Q.length&&!Q[s].includes("DetermineComponentFrameRoot");)s++;for(;v<re.length&&!re[v].includes("DetermineComponentFrameRoot");)v++;if(s===Q.length||v===re.length)for(s=Q.length-1,v=re.length-1;1<=s&&0<=v&&Q[s]!==re[v];)v--;for(;1<=s&&0<=v;s--,v--)if(Q[s]!==re[v]){if(s!==1||v!==1)do if(s--,v--,0>v||Q[s]!==re[v]){var ce=`
|
|
46
|
+
`+Q[s].replace(" at new "," at ");return e.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",e.displayName)),ce}while(1<=s&&0<=v);break}}}finally{ke=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?pe(i):""}function be(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe("Lazy");case 13:return e.child!==t&&t!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return $e(e.type,!1);case 11:return $e(e.type.render,!1);case 1:return $e(e.type,!0);case 31:return pe("Activity");default:return""}}function Ht(e){try{var t="",i=null;do t+=be(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var pt=Object.prototype.hasOwnProperty,Re=r.unstable_scheduleCallback,Me=r.unstable_cancelCallback,Ce=r.unstable_shouldYield,ge=r.unstable_requestPaint,xe=r.unstable_now,nt=r.unstable_getCurrentPriorityLevel,Ue=r.unstable_ImmediatePriority,Dt=r.unstable_UserBlockingPriority,tt=r.unstable_NormalPriority,mt=r.unstable_LowPriority,Fe=r.unstable_IdlePriority,Ne=r.log,Le=r.unstable_setDisableYieldValue,ei=null,Ct=null;function At(e){if(typeof Ne=="function"&&Le(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(ei,e)}catch{}}var wt=Math.clz32?Math.clz32:ii,Fi=Math.log,qi=Math.LN2;function ii(e){return e>>>=0,e===0?32:31-(Fi(e)/qi|0)|0}var Si=256,Hi=262144,ut=4194304;function dt(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 ye(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var v=0,y=e.suspendedLanes,T=e.pingedLanes;e=e.warmLanes;var $=s&134217727;return $!==0?(s=$&~y,s!==0?v=dt(s):(T&=$,T!==0?v=dt(T):i||(i=$&~e,i!==0&&(v=dt(i))))):($=s&~y,$!==0?v=dt($):T!==0?v=dt(T):i||(i=s&~e,i!==0&&(v=dt(i)))),v===0?0:t!==0&&t!==v&&(t&y)===0&&(y=v&-v,i=t&-t,y>=i||y===32&&(i&4194048)!==0)?t:v}function qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ve(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 Je(){var e=ut;return ut<<=1,(ut&62914560)===0&&(ut=4194304),e}function jt(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function et(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ge(e,t,i,s,v,y){var T=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var $=e.entanglements,Q=e.expirationTimes,re=e.hiddenUpdates;for(i=T&~i;0<i;){var ce=31-wt(i),de=1<<ce;$[ce]=0,Q[ce]=-1;var ne=re[ce];if(ne!==null)for(re[ce]=null,ce=0;ce<ne.length;ce++){var oe=ne[ce];oe!==null&&(oe.lane&=-536870913)}i&=~de}s!==0&&Zt(e,s,0),y!==0&&v===0&&e.tag!==0&&(e.suspendedLanes|=y&~(T&~t))}function Zt(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-wt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function _t(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-wt(i),v=1<<s;v&t|e[s]&t&&(e[s]|=t),i&=~v}}function bt(e,t){var i=t&-t;return i=(i&42)!==0?1:yi(i),(i&(e.suspendedLanes|t))!==0?0:i}function yi(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 Ft(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ci(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:sv(e.type))}function bs(e,t){var i=G.p;try{return G.p=e,t()}finally{G.p=i}}var wi=Math.random().toString(36).slice(2),qt="__reactFiber$"+wi,si="__reactProps$"+wi,vr="__reactContainer$"+wi,nl="__reactEvents$"+wi,Lp="__reactListeners$"+wi,Rp="__reactHandles$"+wi,bh="__reactResources$"+wi,cn="__reactMarker$"+wi;function al(e){delete e[qt],delete e[si],delete e[nl],delete e[Lp],delete e[Rp]}function gr(e){var t=e[qt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[vr]||i[qt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=P_(e);e!==null;){if(i=e[qt])return i;e=P_(e)}return t}e=i,i=e.parentNode}return null}function pr(e){if(e=e[qt]||e[vr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function un(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(x(33))}function mr(e){var t=e[bh];return t||(t=e[bh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ut(e){e[cn]=!0}var Sh=new Set,yh={};function Xs(e,t){br(e,t),br(e+"Capture",t)}function br(e,t){for(yh[e]=t,e=0;e<t.length;e++)Sh.add(t[e])}var Mp=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]*$"),Ch={},wh={};function Ap(e){return pt.call(wh,e)?!0:pt.call(Ch,e)?!1:Mp.test(e)?wh[e]=!0:(Ch[e]=!0,!1)}function ga(e,t,i){if(Ap(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function pa(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Ji(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function xi(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Tp(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var v=s.get,y=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return v.call(this)},set:function(T){i=""+T,y.call(this,T)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(T){i=""+T},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ol(e){if(!e._valueTracker){var t=xh(e)?"checked":"value";e._valueTracker=Tp(e,t,""+e[t])}}function Eh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=xh(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function ma(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 Bp=/[\n"\\]/g;function Ei(e){return e.replace(Bp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ll(e,t,i,s,v,y,T,$){e.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.type=T:e.removeAttribute("type"),t!=null?T==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+xi(t)):e.value!==""+xi(t)&&(e.value=""+xi(t)):T!=="submit"&&T!=="reset"||e.removeAttribute("value"),t!=null?cl(e,T,xi(t)):i!=null?cl(e,T,xi(i)):s!=null&&e.removeAttribute("value"),v==null&&y!=null&&(e.defaultChecked=!!y),v!=null&&(e.checked=v&&typeof v!="function"&&typeof v!="symbol"),$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?e.name=""+xi($):e.removeAttribute("name")}function Dh(e,t,i,s,v,y,T,$){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.type=y),t!=null||i!=null){if(!(y!=="submit"&&y!=="reset"||t!=null)){ol(e);return}i=i!=null?""+xi(i):"",t=t!=null?""+xi(t):i,$||t===e.value||(e.value=t),e.defaultValue=t}s=s??v,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=$?e.checked:!!s,e.defaultChecked=!!s,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(e.name=T),ol(e)}function cl(e,t,i){t==="number"&&ma(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Sr(e,t,i,s){if(e=e.options,t){t={};for(var v=0;v<i.length;v++)t["$"+i[v]]=!0;for(i=0;i<e.length;i++)v=t.hasOwnProperty("$"+e[i].value),e[i].selected!==v&&(e[i].selected=v),v&&s&&(e[i].defaultSelected=!0)}else{for(i=""+xi(i),t=null,v=0;v<e.length;v++){if(e[v].value===i){e[v].selected=!0,s&&(e[v].defaultSelected=!0);return}t!==null||e[v].disabled||(t=e[v])}t!==null&&(t.selected=!0)}}function Lh(e,t,i){if(t!=null&&(t=""+xi(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+xi(i):""}function Rh(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(x(92));if(X(s)){if(1<s.length)throw Error(x(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=xi(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),ol(e)}function yr(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Op=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 Mh(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||Op.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Ah(e,t,i){if(t!=null&&typeof t!="object")throw Error(x(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var v in t)s=t[v],t.hasOwnProperty(v)&&i[v]!==s&&Mh(e,v,s)}else for(var y in t)t.hasOwnProperty(y)&&Mh(e,y,t[y])}function ul(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 kp=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"]]),Np=/^[\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 ba(e){return Np.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function es(){}var hl=null;function dl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cr=null,wr=null;function Th(e){var t=pr(e);if(t&&(e=t.stateNode)){var i=e[si]||null;e:switch(e=t.stateNode,t.type){case"input":if(ll(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ei(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var v=s[si]||null;if(!v)throw Error(x(90));ll(s,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Eh(s)}break e;case"textarea":Lh(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Sr(e,!!i.multiple,t,!1)}}}var fl=!1;function Bh(e,t,i){if(fl)return e(t,i);fl=!0;try{var s=e(t);return s}finally{if(fl=!1,(Cr!==null||wr!==null)&&(ao(),Cr&&(t=Cr,e=wr,wr=Cr=null,Th(t),e)))for(t=0;t<e.length;t++)Th(e[t])}}function hn(e,t){var i=e.stateNode;if(i===null)return null;var s=i[si]||null;if(s===null)return null;i=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(x(231,t,typeof i));return i}var ts=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_l=!1;if(ts)try{var dn={};Object.defineProperty(dn,"passive",{get:function(){_l=!0}}),window.addEventListener("test",dn,dn),window.removeEventListener("test",dn,dn)}catch{_l=!1}var Ss=null,vl=null,Sa=null;function Oh(){if(Sa)return Sa;var e,t=vl,i=t.length,s,v="value"in Ss?Ss.value:Ss.textContent,y=v.length;for(e=0;e<i&&t[e]===v[e];e++);var T=i-e;for(s=1;s<=T&&t[i-s]===v[y-s];s++);return Sa=v.slice(e,1<s?1-s:void 0)}function ya(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 Ca(){return!0}function kh(){return!1}function ri(e){function t(i,s,v,y,T){this._reactName=i,this._targetInst=v,this.type=s,this.nativeEvent=y,this.target=T,this.currentTarget=null;for(var $ in e)e.hasOwnProperty($)&&(i=e[$],this[$]=i?i(y):y[$]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Ca:kh,this.isPropagationStopped=kh,this}return l(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Ca)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Ca)},persist:function(){},isPersistent:Ca}),t}var Vs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wa=ri(Vs),fn=l({},Vs,{view:0,detail:0}),Hp=ri(fn),gl,pl,_n,xa=l({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bl,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!==_n&&(_n&&e.type==="mousemove"?(gl=e.screenX-_n.screenX,pl=e.screenY-_n.screenY):pl=gl=0,_n=e),gl)},movementY:function(e){return"movementY"in e?e.movementY:pl}}),Nh=ri(xa),jp=l({},xa,{dataTransfer:0}),zp=ri(jp),Ip=l({},fn,{relatedTarget:0}),ml=ri(Ip),Up=l({},Vs,{animationName:0,elapsedTime:0,pseudoElement:0}),Pp=ri(Up),$p=l({},Vs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Wp=ri($p),Fp=l({},Vs,{data:0}),Hh=ri(Fp),qp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gp={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"},Yp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yp[e])?!!t[e]:!1}function bl(){return Xp}var Vp=l({},fn,{key:function(e){if(e.key){var t=qp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ya(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Gp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bl,charCode:function(e){return e.type==="keypress"?ya(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ya(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Kp=ri(Vp),Zp=l({},xa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jh=ri(Zp),Qp=l({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bl}),Jp=ri(Qp),em=l({},Vs,{propertyName:0,elapsedTime:0,pseudoElement:0}),tm=ri(em),im=l({},xa,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),sm=ri(im),rm=l({},Vs,{newState:0,oldState:0}),nm=ri(rm),am=[9,13,27,32],Sl=ts&&"CompositionEvent"in window,vn=null;ts&&"documentMode"in document&&(vn=document.documentMode);var om=ts&&"TextEvent"in window&&!vn,zh=ts&&(!Sl||vn&&8<vn&&11>=vn),Ih=" ",Uh=!1;function Ph(e,t){switch(e){case"keyup":return am.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $h(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xr=!1;function lm(e,t){switch(e){case"compositionend":return $h(t);case"keypress":return t.which!==32?null:(Uh=!0,Ih);case"textInput":return e=t.data,e===Ih&&Uh?null:e;default:return null}}function cm(e,t){if(xr)return e==="compositionend"||!Sl&&Ph(e,t)?(e=Oh(),Sa=vl=Ss=null,xr=!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 zh&&t.locale!=="ko"?null:t.data;default:return null}}var um={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 Wh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!um[e.type]:t==="textarea"}function Fh(e,t,i,s){Cr?wr?wr.push(s):wr=[s]:Cr=s,t=_o(t,"onChange"),0<t.length&&(i=new wa("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var gn=null,pn=null;function hm(e){L_(e,0)}function Ea(e){var t=un(e);if(Eh(t))return e}function qh(e,t){if(e==="change")return t}var Gh=!1;if(ts){var yl;if(ts){var Cl="oninput"in document;if(!Cl){var Yh=document.createElement("div");Yh.setAttribute("oninput","return;"),Cl=typeof Yh.oninput=="function"}yl=Cl}else yl=!1;Gh=yl&&(!document.documentMode||9<document.documentMode)}function Xh(){gn&&(gn.detachEvent("onpropertychange",Vh),pn=gn=null)}function Vh(e){if(e.propertyName==="value"&&Ea(pn)){var t=[];Fh(t,pn,e,dl(e)),Bh(hm,t)}}function dm(e,t,i){e==="focusin"?(Xh(),gn=t,pn=i,gn.attachEvent("onpropertychange",Vh)):e==="focusout"&&Xh()}function fm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ea(pn)}function _m(e,t){if(e==="click")return Ea(t)}function vm(e,t){if(e==="input"||e==="change")return Ea(t)}function gm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fi=typeof Object.is=="function"?Object.is:gm;function mn(e,t){if(fi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var v=i[s];if(!pt.call(t,v)||!fi(e[v],t[v]))return!1}return!0}function Kh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zh(e,t){var i=Kh(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Kh(i)}}function Qh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ma(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=ma(e.document)}return t}function wl(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 pm=ts&&"documentMode"in document&&11>=document.documentMode,Er=null,xl=null,bn=null,El=!1;function ed(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;El||Er==null||Er!==ma(s)||(s=Er,"selectionStart"in s&&wl(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),bn&&mn(bn,s)||(bn=s,s=_o(xl,"onSelect"),0<s.length&&(t=new wa("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Er)))}function Ks(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Dr={animationend:Ks("Animation","AnimationEnd"),animationiteration:Ks("Animation","AnimationIteration"),animationstart:Ks("Animation","AnimationStart"),transitionrun:Ks("Transition","TransitionRun"),transitionstart:Ks("Transition","TransitionStart"),transitioncancel:Ks("Transition","TransitionCancel"),transitionend:Ks("Transition","TransitionEnd")},Dl={},td={};ts&&(td=document.createElement("div").style,"AnimationEvent"in window||(delete Dr.animationend.animation,delete Dr.animationiteration.animation,delete Dr.animationstart.animation),"TransitionEvent"in window||delete Dr.transitionend.transition);function Zs(e){if(Dl[e])return Dl[e];if(!Dr[e])return e;var t=Dr[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in td)return Dl[e]=t[i];return e}var id=Zs("animationend"),sd=Zs("animationiteration"),rd=Zs("animationstart"),mm=Zs("transitionrun"),bm=Zs("transitionstart"),Sm=Zs("transitioncancel"),nd=Zs("transitionend"),ad=new Map,Ll="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(" ");Ll.push("scrollEnd");function ji(e,t){ad.set(e,t),Xs(t,[e])}var Da=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)},Di=[],Lr=0,Rl=0;function La(){for(var e=Lr,t=Rl=Lr=0;t<e;){var i=Di[t];Di[t++]=null;var s=Di[t];Di[t++]=null;var v=Di[t];Di[t++]=null;var y=Di[t];if(Di[t++]=null,s!==null&&v!==null){var T=s.pending;T===null?v.next=v:(v.next=T.next,T.next=v),s.pending=v}y!==0&&od(i,v,y)}}function Ra(e,t,i,s){Di[Lr++]=e,Di[Lr++]=t,Di[Lr++]=i,Di[Lr++]=s,Rl|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Ml(e,t,i,s){return Ra(e,t,i,s),Ma(e)}function Qs(e,t){return Ra(e,null,null,t),Ma(e)}function od(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var v=!1,y=e.return;y!==null;)y.childLanes|=i,s=y.alternate,s!==null&&(s.childLanes|=i),y.tag===22&&(e=y.stateNode,e===null||e._visibility&1||(v=!0)),e=y,y=y.return;return e.tag===3?(y=e.stateNode,v&&t!==null&&(v=31-wt(i),e=y.hiddenUpdates,s=e[v],s===null?e[v]=[t]:s.push(t),t.lane=i|536870912),y):null}function Ma(e){if(50<Pn)throw Pn=0,zc=null,Error(x(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rr={};function ym(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _i(e,t,i,s){return new ym(e,t,i,s)}function Al(e){return e=e.prototype,!(!e||!e.isReactComponent)}function is(e,t){var i=e.alternate;return i===null?(i=_i(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function ld(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Aa(e,t,i,s,v,y){var T=0;if(s=e,typeof e=="function")Al(e)&&(T=1);else if(typeof e=="string")T=D0(e,i,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=_i(31,i,t,v),e.elementType=R,e.lanes=y,e;case _:return Js(i.children,v,y,t);case a:T=8,v|=24;break;case c:return e=_i(12,i,t,v|2),e.elementType=c,e.lanes=y,e;case D:return e=_i(13,i,t,v),e.elementType=D,e.lanes=y,e;case b:return e=_i(19,i,t,v),e.elementType=b,e.lanes=y,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case u:T=10;break e;case o:T=9;break e;case S:T=11;break e;case E:T=14;break e;case w:T=16,s=null;break e}T=29,i=Error(x(130,e===null?"null":typeof e,"")),s=null}return t=_i(T,i,t,v),t.elementType=e,t.type=s,t.lanes=y,t}function Js(e,t,i,s){return e=_i(7,e,s,t),e.lanes=i,e}function Tl(e,t,i){return e=_i(6,e,null,t),e.lanes=i,e}function cd(e){var t=_i(18,null,null,0);return t.stateNode=e,t}function Bl(e,t,i){return t=_i(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ud=new WeakMap;function Li(e,t){if(typeof e=="object"&&e!==null){var i=ud.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Ht(t)},ud.set(e,t),t)}return{value:e,source:t,stack:Ht(t)}}var Mr=[],Ar=0,Ta=null,Sn=0,Ri=[],Mi=0,ys=null,Gi=1,Yi="";function ss(e,t){Mr[Ar++]=Sn,Mr[Ar++]=Ta,Ta=e,Sn=t}function hd(e,t,i){Ri[Mi++]=Gi,Ri[Mi++]=Yi,Ri[Mi++]=ys,ys=e;var s=Gi;e=Yi;var v=32-wt(s)-1;s&=~(1<<v),i+=1;var y=32-wt(t)+v;if(30<y){var T=v-v%5;y=(s&(1<<T)-1).toString(32),s>>=T,v-=T,Gi=1<<32-wt(t)+v|i<<v|s,Yi=y+e}else Gi=1<<y|i<<v|s,Yi=e}function Ol(e){e.return!==null&&(ss(e,1),hd(e,1,0))}function kl(e){for(;e===Ta;)Ta=Mr[--Ar],Mr[Ar]=null,Sn=Mr[--Ar],Mr[Ar]=null;for(;e===ys;)ys=Ri[--Mi],Ri[Mi]=null,Yi=Ri[--Mi],Ri[Mi]=null,Gi=Ri[--Mi],Ri[Mi]=null}function dd(e,t){Ri[Mi++]=Gi,Ri[Mi++]=Yi,Ri[Mi++]=ys,Gi=t.id,Yi=t.overflow,ys=e}var Gt=null,vt=null,Pe=!1,Cs=null,Ai=!1,Nl=Error(x(519));function ws(e){var t=Error(x(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw yn(Li(t,e)),Nl}function fd(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[qt]=e,t[si]=s,i){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(i=0;i<Wn.length;i++)je(Wn[i],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),Dh(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),Rh(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||T_(t.textContent,i)?(s.popover!=null&&(je("beforetoggle",t),je("toggle",t)),s.onScroll!=null&&je("scroll",t),s.onScrollEnd!=null&&je("scrollend",t),s.onClick!=null&&(t.onclick=es),t=!0):t=!1,t||ws(e,!0)}function _d(e){for(Gt=e.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:Ai=!1;return;case 27:case 3:Ai=!0;return;default:Gt=Gt.return}}function Tr(e){if(e!==Gt)return!1;if(!Pe)return _d(e),Pe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Jc(e.type,e.memoizedProps)),i=!i),i&&vt&&ws(e),_d(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(x(317));vt=U_(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(x(317));vt=U_(e)}else t===27?(t=vt,js(e.type)?(e=ru,ru=null,vt=e):vt=t):vt=Gt?Bi(e.stateNode.nextSibling):null;return!0}function er(){vt=Gt=null,Pe=!1}function Hl(){var e=Cs;return e!==null&&(li===null?li=e:li.push.apply(li,e),Cs=null),e}function yn(e){Cs===null?Cs=[e]:Cs.push(e)}var jl=j(null),tr=null,rs=null;function xs(e,t,i){V(jl,t._currentValue),t._currentValue=i}function ns(e){e._currentValue=jl.current,F(jl)}function zl(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Il(e,t,i,s){var v=e.child;for(v!==null&&(v.return=e);v!==null;){var y=v.dependencies;if(y!==null){var T=v.child;y=y.firstContext;e:for(;y!==null;){var $=y;y=v;for(var Q=0;Q<t.length;Q++)if($.context===t[Q]){y.lanes|=i,$=y.alternate,$!==null&&($.lanes|=i),zl(y.return,i,e),s||(T=null);break e}y=$.next}}else if(v.tag===18){if(T=v.return,T===null)throw Error(x(341));T.lanes|=i,y=T.alternate,y!==null&&(y.lanes|=i),zl(T,i,e),T=null}else T=v.child;if(T!==null)T.return=v;else for(T=v;T!==null;){if(T===e){T=null;break}if(v=T.sibling,v!==null){v.return=T.return,T=v;break}T=T.return}v=T}}function Br(e,t,i,s){e=null;for(var v=t,y=!1;v!==null;){if(!y){if((v.flags&524288)!==0)y=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var T=v.alternate;if(T===null)throw Error(x(387));if(T=T.memoizedProps,T!==null){var $=v.type;fi(v.pendingProps.value,T.value)||(e!==null?e.push($):e=[$])}}else if(v===Z.current){if(T=v.alternate,T===null)throw Error(x(387));T.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(e!==null?e.push(Xn):e=[Xn])}v=v.return}e!==null&&Il(t,e,i,s),t.flags|=262144}function Ba(e){for(e=e.firstContext;e!==null;){if(!fi(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ir(e){tr=e,rs=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Yt(e){return vd(tr,e)}function Oa(e,t){return tr===null&&ir(e),vd(e,t)}function vd(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},rs===null){if(e===null)throw Error(x(308));rs=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else rs=rs.next=t;return i}var Cm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},wm=r.unstable_scheduleCallback,xm=r.unstable_NormalPriority,Tt={$$typeof:u,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ul(){return{controller:new Cm,data:new Map,refCount:0}}function Cn(e){e.refCount--,e.refCount===0&&wm(xm,function(){e.controller.abort()})}var wn=null,Pl=0,Or=0,kr=null;function Em(e,t){if(wn===null){var i=wn=[];Pl=0,Or=Fc(),kr={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Pl++,t.then(gd,gd),t}function gd(){if(--Pl===0&&wn!==null){kr!==null&&(kr.status="fulfilled");var e=wn;wn=null,Or=0,kr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Dm(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(v){i.push(v)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var v=0;v<i.length;v++)(0,i[v])(t)},function(v){for(s.status="rejected",s.reason=v,v=0;v<i.length;v++)(0,i[v])(void 0)}),s}var pd=q.S;q.S=function(e,t){t_=xe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Em(e,t),pd!==null&&pd(e,t)};var sr=j(null);function $l(){var e=sr.current;return e!==null?e:ht.pooledCache}function ka(e,t){t===null?V(sr,sr.current):V(sr,t.pool)}function md(){var e=$l();return e===null?null:{parent:Tt._currentValue,pool:e}}var Nr=Error(x(460)),Wl=Error(x(474)),Na=Error(x(542)),Ha={then:function(){}};function bd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sd(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(es,es),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Cd(e),e;default:if(typeof t.status=="string")t.then(es,es);else{if(e=ht,e!==null&&100<e.shellSuspendCounter)throw Error(x(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var v=t;v.status="fulfilled",v.value=s}},function(s){if(t.status==="pending"){var v=t;v.status="rejected",v.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Cd(e),e}throw nr=t,Nr}}function rr(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(nr=i,Nr):i}}var nr=null;function yd(){if(nr===null)throw Error(x(459));var e=nr;return nr=null,e}function Cd(e){if(e===Nr||e===Na)throw Error(x(483))}var Hr=null,xn=0;function ja(e){var t=xn;return xn+=1,Hr===null&&(Hr=[]),Sd(Hr,e,t)}function En(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function za(e,t){throw t.$$typeof===g?Error(x(525)):(e=Object.prototype.toString.call(t),Error(x(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function wd(e){function t(te,J){if(e){var se=te.deletions;se===null?(te.deletions=[J],te.flags|=16):se.push(J)}}function i(te,J){if(!e)return null;for(;J!==null;)t(te,J),J=J.sibling;return null}function s(te){for(var J=new Map;te!==null;)te.key!==null?J.set(te.key,te):J.set(te.index,te),te=te.sibling;return J}function v(te,J){return te=is(te,J),te.index=0,te.sibling=null,te}function y(te,J,se){return te.index=se,e?(se=te.alternate,se!==null?(se=se.index,se<J?(te.flags|=67108866,J):se):(te.flags|=67108866,J)):(te.flags|=1048576,J)}function T(te){return e&&te.alternate===null&&(te.flags|=67108866),te}function $(te,J,se,he){return J===null||J.tag!==6?(J=Tl(se,te.mode,he),J.return=te,J):(J=v(J,se),J.return=te,J)}function Q(te,J,se,he){var we=se.type;return we===_?ce(te,J,se.props.children,he,se.key):J!==null&&(J.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===w&&rr(we)===J.type)?(J=v(J,se.props),En(J,se),J.return=te,J):(J=Aa(se.type,se.key,se.props,null,te.mode,he),En(J,se),J.return=te,J)}function re(te,J,se,he){return J===null||J.tag!==4||J.stateNode.containerInfo!==se.containerInfo||J.stateNode.implementation!==se.implementation?(J=Bl(se,te.mode,he),J.return=te,J):(J=v(J,se.children||[]),J.return=te,J)}function ce(te,J,se,he,we){return J===null||J.tag!==7?(J=Js(se,te.mode,he,we),J.return=te,J):(J=v(J,se),J.return=te,J)}function de(te,J,se){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=Tl(""+J,te.mode,se),J.return=te,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case C:return se=Aa(J.type,J.key,J.props,null,te.mode,se),En(se,J),se.return=te,se;case L:return J=Bl(J,te.mode,se),J.return=te,J;case w:return J=rr(J),de(te,J,se)}if(X(J)||I(J))return J=Js(J,te.mode,se,null),J.return=te,J;if(typeof J.then=="function")return de(te,ja(J),se);if(J.$$typeof===u)return de(te,Oa(te,J),se);za(te,J)}return null}function ne(te,J,se,he){var we=J!==null?J.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return we!==null?null:$(te,J,""+se,he);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case C:return se.key===we?Q(te,J,se,he):null;case L:return se.key===we?re(te,J,se,he):null;case w:return se=rr(se),ne(te,J,se,he)}if(X(se)||I(se))return we!==null?null:ce(te,J,se,he,null);if(typeof se.then=="function")return ne(te,J,ja(se),he);if(se.$$typeof===u)return ne(te,J,Oa(te,se),he);za(te,se)}return null}function oe(te,J,se,he,we){if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return te=te.get(se)||null,$(J,te,""+he,we);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case C:return te=te.get(he.key===null?se:he.key)||null,Q(J,te,he,we);case L:return te=te.get(he.key===null?se:he.key)||null,re(J,te,he,we);case w:return he=rr(he),oe(te,J,se,he,we)}if(X(he)||I(he))return te=te.get(se)||null,ce(J,te,he,we,null);if(typeof he.then=="function")return oe(te,J,se,ja(he),we);if(he.$$typeof===u)return oe(te,J,se,Oa(J,he),we);za(J,he)}return null}function me(te,J,se,he){for(var we=null,Ye=null,Se=J,Oe=J=0,Ie=null;Se!==null&&Oe<se.length;Oe++){Se.index>Oe?(Ie=Se,Se=null):Ie=Se.sibling;var Xe=ne(te,Se,se[Oe],he);if(Xe===null){Se===null&&(Se=Ie);break}e&&Se&&Xe.alternate===null&&t(te,Se),J=y(Xe,J,Oe),Ye===null?we=Xe:Ye.sibling=Xe,Ye=Xe,Se=Ie}if(Oe===se.length)return i(te,Se),Pe&&ss(te,Oe),we;if(Se===null){for(;Oe<se.length;Oe++)Se=de(te,se[Oe],he),Se!==null&&(J=y(Se,J,Oe),Ye===null?we=Se:Ye.sibling=Se,Ye=Se);return Pe&&ss(te,Oe),we}for(Se=s(Se);Oe<se.length;Oe++)Ie=oe(Se,te,Oe,se[Oe],he),Ie!==null&&(e&&Ie.alternate!==null&&Se.delete(Ie.key===null?Oe:Ie.key),J=y(Ie,J,Oe),Ye===null?we=Ie:Ye.sibling=Ie,Ye=Ie);return e&&Se.forEach(function($s){return t(te,$s)}),Pe&&ss(te,Oe),we}function De(te,J,se,he){if(se==null)throw Error(x(151));for(var we=null,Ye=null,Se=J,Oe=J=0,Ie=null,Xe=se.next();Se!==null&&!Xe.done;Oe++,Xe=se.next()){Se.index>Oe?(Ie=Se,Se=null):Ie=Se.sibling;var $s=ne(te,Se,Xe.value,he);if($s===null){Se===null&&(Se=Ie);break}e&&Se&&$s.alternate===null&&t(te,Se),J=y($s,J,Oe),Ye===null?we=$s:Ye.sibling=$s,Ye=$s,Se=Ie}if(Xe.done)return i(te,Se),Pe&&ss(te,Oe),we;if(Se===null){for(;!Xe.done;Oe++,Xe=se.next())Xe=de(te,Xe.value,he),Xe!==null&&(J=y(Xe,J,Oe),Ye===null?we=Xe:Ye.sibling=Xe,Ye=Xe);return Pe&&ss(te,Oe),we}for(Se=s(Se);!Xe.done;Oe++,Xe=se.next())Xe=oe(Se,te,Oe,Xe.value,he),Xe!==null&&(e&&Xe.alternate!==null&&Se.delete(Xe.key===null?Oe:Xe.key),J=y(Xe,J,Oe),Ye===null?we=Xe:Ye.sibling=Xe,Ye=Xe);return e&&Se.forEach(function(j0){return t(te,j0)}),Pe&&ss(te,Oe),we}function lt(te,J,se,he){if(typeof se=="object"&&se!==null&&se.type===_&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case C:e:{for(var we=se.key;J!==null;){if(J.key===we){if(we=se.type,we===_){if(J.tag===7){i(te,J.sibling),he=v(J,se.props.children),he.return=te,te=he;break e}}else if(J.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===w&&rr(we)===J.type){i(te,J.sibling),he=v(J,se.props),En(he,se),he.return=te,te=he;break e}i(te,J);break}else t(te,J);J=J.sibling}se.type===_?(he=Js(se.props.children,te.mode,he,se.key),he.return=te,te=he):(he=Aa(se.type,se.key,se.props,null,te.mode,he),En(he,se),he.return=te,te=he)}return T(te);case L:e:{for(we=se.key;J!==null;){if(J.key===we)if(J.tag===4&&J.stateNode.containerInfo===se.containerInfo&&J.stateNode.implementation===se.implementation){i(te,J.sibling),he=v(J,se.children||[]),he.return=te,te=he;break e}else{i(te,J);break}else t(te,J);J=J.sibling}he=Bl(se,te.mode,he),he.return=te,te=he}return T(te);case w:return se=rr(se),lt(te,J,se,he)}if(X(se))return me(te,J,se,he);if(I(se)){if(we=I(se),typeof we!="function")throw Error(x(150));return se=we.call(se),De(te,J,se,he)}if(typeof se.then=="function")return lt(te,J,ja(se),he);if(se.$$typeof===u)return lt(te,J,Oa(te,se),he);za(te,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,J!==null&&J.tag===6?(i(te,J.sibling),he=v(J,se),he.return=te,te=he):(i(te,J),he=Tl(se,te.mode,he),he.return=te,te=he),T(te)):i(te,J)}return function(te,J,se,he){try{xn=0;var we=lt(te,J,se,he);return Hr=null,we}catch(Se){if(Se===Nr||Se===Na)throw Se;var Ye=_i(29,Se,null,te.mode);return Ye.lanes=he,Ye.return=te,Ye}finally{}}}var ar=wd(!0),xd=wd(!1),Es=!1;function Fl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ql(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 Ds(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ls(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ke&2)!==0){var v=s.pending;return v===null?t.next=t:(t.next=v.next,v.next=t),s.pending=t,t=Ma(e),od(e,null,i),t}return Ra(e,s,t,i),Ma(e)}function Dn(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,_t(e,i)}}function Gl(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var v=null,y=null;if(i=i.firstBaseUpdate,i!==null){do{var T={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};y===null?v=y=T:y=y.next=T,i=i.next}while(i!==null);y===null?v=y=t:y=y.next=t}else v=y=t;i={baseState:s.baseState,firstBaseUpdate:v,lastBaseUpdate:y,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Yl=!1;function Ln(){if(Yl){var e=kr;if(e!==null)throw e}}function Rn(e,t,i,s){Yl=!1;var v=e.updateQueue;Es=!1;var y=v.firstBaseUpdate,T=v.lastBaseUpdate,$=v.shared.pending;if($!==null){v.shared.pending=null;var Q=$,re=Q.next;Q.next=null,T===null?y=re:T.next=re,T=Q;var ce=e.alternate;ce!==null&&(ce=ce.updateQueue,$=ce.lastBaseUpdate,$!==T&&($===null?ce.firstBaseUpdate=re:$.next=re,ce.lastBaseUpdate=Q))}if(y!==null){var de=v.baseState;T=0,ce=re=Q=null,$=y;do{var ne=$.lane&-536870913,oe=ne!==$.lane;if(oe?(ze&ne)===ne:(s&ne)===ne){ne!==0&&ne===Or&&(Yl=!0),ce!==null&&(ce=ce.next={lane:0,tag:$.tag,payload:$.payload,callback:null,next:null});e:{var me=e,De=$;ne=t;var lt=i;switch(De.tag){case 1:if(me=De.payload,typeof me=="function"){de=me.call(lt,de,ne);break e}de=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=De.payload,ne=typeof me=="function"?me.call(lt,de,ne):me,ne==null)break e;de=l({},de,ne);break e;case 2:Es=!0}}ne=$.callback,ne!==null&&(e.flags|=64,oe&&(e.flags|=8192),oe=v.callbacks,oe===null?v.callbacks=[ne]:oe.push(ne))}else oe={lane:ne,tag:$.tag,payload:$.payload,callback:$.callback,next:null},ce===null?(re=ce=oe,Q=de):ce=ce.next=oe,T|=ne;if($=$.next,$===null){if($=v.shared.pending,$===null)break;oe=$,$=oe.next,oe.next=null,v.lastBaseUpdate=oe,v.shared.pending=null}}while(!0);ce===null&&(Q=de),v.baseState=Q,v.firstBaseUpdate=re,v.lastBaseUpdate=ce,y===null&&(v.shared.lanes=0),Bs|=T,e.lanes=T,e.memoizedState=de}}function Ed(e,t){if(typeof e!="function")throw Error(x(191,e));e.call(t)}function Dd(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Ed(i[e],t)}var jr=j(null),Ia=j(0);function Ld(e,t){e=_s,V(Ia,e),V(jr,t),_s=e|t.baseLanes}function Xl(){V(Ia,_s),V(jr,jr.current)}function Vl(){_s=Ia.current,F(jr),F(Ia)}var vi=j(null),Ti=null;function Rs(e){var t=e.alternate;V(Lt,Lt.current&1),V(vi,e),Ti===null&&(t===null||jr.current!==null||t.memoizedState!==null)&&(Ti=e)}function Kl(e){V(Lt,Lt.current),V(vi,e),Ti===null&&(Ti=e)}function Rd(e){e.tag===22?(V(Lt,Lt.current),V(vi,e),Ti===null&&(Ti=e)):Ms()}function Ms(){V(Lt,Lt.current),V(vi,vi.current)}function gi(e){F(vi),Ti===e&&(Ti=null),F(Lt)}var Lt=j(0);function Ua(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||iu(i)||su(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var as=0,Be=null,at=null,Bt=null,Pa=!1,zr=!1,or=!1,$a=0,Mn=0,Ir=null,Lm=0;function xt(){throw Error(x(321))}function Zl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!fi(e[i],t[i]))return!1;return!0}function Ql(e,t,i,s,v,y){return as=y,Be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?df:fc,or=!1,y=i(s,v),or=!1,zr&&(y=Ad(t,i,s,v)),Md(e),y}function Md(e){q.H=Bn;var t=at!==null&&at.next!==null;if(as=0,Bt=at=Be=null,Pa=!1,Mn=0,Ir=null,t)throw Error(x(300));e===null||Ot||(e=e.dependencies,e!==null&&Ba(e)&&(Ot=!0))}function Ad(e,t,i,s){Be=e;var v=0;do{if(zr&&(Ir=null),Mn=0,zr=!1,25<=v)throw Error(x(301));if(v+=1,Bt=at=null,e.updateQueue!=null){var y=e.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}q.H=ff,y=t(i,s)}while(zr);return y}function Rm(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?An(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Be.flags|=1024),t}function Jl(){var e=$a!==0;return $a=0,e}function ec(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function tc(e){if(Pa){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pa=!1}as=0,Bt=at=Be=null,zr=!1,Mn=$a=0,Ir=null}function ti(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?Be.memoizedState=Bt=e:Bt=Bt.next=e,Bt}function Rt(){if(at===null){var e=Be.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=Bt===null?Be.memoizedState:Bt.next;if(t!==null)Bt=t,at=e;else{if(e===null)throw Be.alternate===null?Error(x(467)):Error(x(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Bt===null?Be.memoizedState=Bt=e:Bt=Bt.next=e}return Bt}function Wa(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function An(e){var t=Mn;return Mn+=1,Ir===null&&(Ir=[]),e=Sd(Ir,e,t),t=Be,(Bt===null?t.memoizedState:Bt.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?df:fc),e}function Fa(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return An(e);if(e.$$typeof===u)return Yt(e)}throw Error(x(438,String(e)))}function ic(e){var t=null,i=Be.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Be.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(v){return v.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Wa(),Be.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=N;return t.index++,i}function os(e,t){return typeof t=="function"?t(e):t}function qa(e){var t=Rt();return sc(t,at,e)}function sc(e,t,i){var s=e.queue;if(s===null)throw Error(x(311));s.lastRenderedReducer=i;var v=e.baseQueue,y=s.pending;if(y!==null){if(v!==null){var T=v.next;v.next=y.next,y.next=T}t.baseQueue=v=y,s.pending=null}if(y=e.baseState,v===null)e.memoizedState=y;else{t=v.next;var $=T=null,Q=null,re=t,ce=!1;do{var de=re.lane&-536870913;if(de!==re.lane?(ze&de)===de:(as&de)===de){var ne=re.revertLane;if(ne===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),de===Or&&(ce=!0);else if((as&ne)===ne){re=re.next,ne===Or&&(ce=!0);continue}else de={lane:0,revertLane:re.revertLane,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},Q===null?($=Q=de,T=y):Q=Q.next=de,Be.lanes|=ne,Bs|=ne;de=re.action,or&&i(y,de),y=re.hasEagerState?re.eagerState:i(y,de)}else ne={lane:de,revertLane:re.revertLane,gesture:re.gesture,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},Q===null?($=Q=ne,T=y):Q=Q.next=ne,Be.lanes|=de,Bs|=de;re=re.next}while(re!==null&&re!==t);if(Q===null?T=y:Q.next=$,!fi(y,e.memoizedState)&&(Ot=!0,ce&&(i=kr,i!==null)))throw i;e.memoizedState=y,e.baseState=T,e.baseQueue=Q,s.lastRenderedState=y}return v===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function rc(e){var t=Rt(),i=t.queue;if(i===null)throw Error(x(311));i.lastRenderedReducer=e;var s=i.dispatch,v=i.pending,y=t.memoizedState;if(v!==null){i.pending=null;var T=v=v.next;do y=e(y,T.action),T=T.next;while(T!==v);fi(y,t.memoizedState)||(Ot=!0),t.memoizedState=y,t.baseQueue===null&&(t.baseState=y),i.lastRenderedState=y}return[y,s]}function Td(e,t,i){var s=Be,v=Rt(),y=Pe;if(y){if(i===void 0)throw Error(x(407));i=i()}else i=t();var T=!fi((at||v).memoizedState,i);if(T&&(v.memoizedState=i,Ot=!0),v=v.queue,oc(kd.bind(null,s,v,e),[e]),v.getSnapshot!==t||T||Bt!==null&&Bt.memoizedState.tag&1){if(s.flags|=2048,Ur(9,{destroy:void 0},Od.bind(null,s,v,i,t),null),ht===null)throw Error(x(349));y||(as&127)!==0||Bd(s,t,i)}return i}function Bd(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Be.updateQueue,t===null?(t=Wa(),Be.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Od(e,t,i,s){t.value=i,t.getSnapshot=s,Nd(t)&&Hd(e)}function kd(e,t,i){return i(function(){Nd(t)&&Hd(e)})}function Nd(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!fi(e,i)}catch{return!0}}function Hd(e){var t=Qs(e,2);t!==null&&ci(t,e,2)}function nc(e){var t=ti();if(typeof e=="function"){var i=e;if(e=i(),or){At(!0);try{i()}finally{At(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:e},t}function jd(e,t,i,s){return e.baseState=i,sc(e,at,typeof s=="function"?s:os)}function Mm(e,t,i,s,v){if(Xa(e))throw Error(x(485));if(e=t.action,e!==null){var y={payload:v,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){y.listeners.push(T)}};q.T!==null?i(!0):y.isTransition=!1,s(y),i=t.pending,i===null?(y.next=t.pending=y,zd(t,y)):(y.next=i.next,t.pending=i.next=y)}}function zd(e,t){var i=t.action,s=t.payload,v=e.state;if(t.isTransition){var y=q.T,T={};q.T=T;try{var $=i(v,s),Q=q.S;Q!==null&&Q(T,$),Id(e,t,$)}catch(re){ac(e,t,re)}finally{y!==null&&T.types!==null&&(y.types=T.types),q.T=y}}else try{y=i(v,s),Id(e,t,y)}catch(re){ac(e,t,re)}}function Id(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Ud(e,t,s)},function(s){return ac(e,t,s)}):Ud(e,t,i)}function Ud(e,t,i){t.status="fulfilled",t.value=i,Pd(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,zd(e,i)))}function ac(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,Pd(t),t=t.next;while(t!==s)}e.action=null}function Pd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $d(e,t){return t}function Wd(e,t){if(Pe){var i=ht.formState;if(i!==null){e:{var s=Be;if(Pe){if(vt){t:{for(var v=vt,y=Ai;v.nodeType!==8;){if(!y){v=null;break t}if(v=Bi(v.nextSibling),v===null){v=null;break t}}y=v.data,v=y==="F!"||y==="F"?v:null}if(v){vt=Bi(v.nextSibling),s=v.data==="F!";break e}}ws(s)}s=!1}s&&(t=i[0])}}return i=ti(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$d,lastRenderedState:t},i.queue=s,i=cf.bind(null,Be,s),s.dispatch=i,s=nc(!1),y=dc.bind(null,Be,!1,s.queue),s=ti(),v={state:t,dispatch:null,action:e,pending:null},s.queue=v,i=Mm.bind(null,Be,v,y,i),v.dispatch=i,s.memoizedState=e,[t,i,!1]}function Fd(e){var t=Rt();return qd(t,at,e)}function qd(e,t,i){if(t=sc(e,t,$d)[0],e=qa(os)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=An(t)}catch(T){throw T===Nr?Na:T}else s=t;t=Rt();var v=t.queue,y=v.dispatch;return i!==t.memoizedState&&(Be.flags|=2048,Ur(9,{destroy:void 0},Am.bind(null,v,i),null)),[s,y,e]}function Am(e,t){e.action=t}function Gd(e){var t=Rt(),i=at;if(i!==null)return qd(t,i,e);Rt(),t=t.memoizedState,i=Rt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Ur(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Be.updateQueue,t===null&&(t=Wa(),Be.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Yd(){return Rt().memoizedState}function Ga(e,t,i,s){var v=ti();Be.flags|=e,v.memoizedState=Ur(1|t,{destroy:void 0},i,s===void 0?null:s)}function Ya(e,t,i,s){var v=Rt();s=s===void 0?null:s;var y=v.memoizedState.inst;at!==null&&s!==null&&Zl(s,at.memoizedState.deps)?v.memoizedState=Ur(t,y,i,s):(Be.flags|=e,v.memoizedState=Ur(1|t,y,i,s))}function Xd(e,t){Ga(8390656,8,e,t)}function oc(e,t){Ya(2048,8,e,t)}function Tm(e){Be.flags|=4;var t=Be.updateQueue;if(t===null)t=Wa(),Be.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Vd(e){var t=Rt().memoizedState;return Tm({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(x(440));return t.impl.apply(void 0,arguments)}}function Kd(e,t){return Ya(4,2,e,t)}function Zd(e,t){return Ya(4,4,e,t)}function Qd(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Jd(e,t,i){i=i!=null?i.concat([e]):null,Ya(4,4,Qd.bind(null,t,e),i)}function lc(){}function ef(e,t){var i=Rt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&Zl(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function tf(e,t){var i=Rt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&Zl(t,s[1]))return s[0];if(s=e(),or){At(!0);try{e()}finally{At(!1)}}return i.memoizedState=[s,t],s}function cc(e,t,i){return i===void 0||(as&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=s_(),Be.lanes|=e,Bs|=e,i)}function sf(e,t,i,s){return fi(i,t)?i:jr.current!==null?(e=cc(e,i,s),fi(e,t)||(Ot=!0),e):(as&42)===0||(as&1073741824)!==0&&(ze&261930)===0?(Ot=!0,e.memoizedState=i):(e=s_(),Be.lanes|=e,Bs|=e,t)}function rf(e,t,i,s,v){var y=G.p;G.p=y!==0&&8>y?y:8;var T=q.T,$={};q.T=$,dc(e,!1,t,i);try{var Q=v(),re=q.S;if(re!==null&&re($,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var ce=Dm(Q,s);Tn(e,t,ce,bi(e))}else Tn(e,t,s,bi(e))}catch(de){Tn(e,t,{then:function(){},status:"rejected",reason:de},bi())}finally{G.p=y,T!==null&&$.types!==null&&(T.types=$.types),q.T=T}}function Bm(){}function uc(e,t,i,s){if(e.tag!==5)throw Error(x(476));var v=nf(e).queue;rf(e,v,t,K,i===null?Bm:function(){return af(e),i(s)})}function nf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:K},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function af(e){var t=nf(e);t.next===null&&(t=e.alternate.memoizedState),Tn(e,t.next.queue,{},bi())}function hc(){return Yt(Xn)}function of(){return Rt().memoizedState}function lf(){return Rt().memoizedState}function Om(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=bi();e=Ds(i);var s=Ls(t,e,i);s!==null&&(ci(s,t,i),Dn(s,t,i)),t={cache:Ul()},e.payload=t;return}t=t.return}}function km(e,t,i){var s=bi();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Xa(e)?uf(t,i):(i=Ml(e,t,i,s),i!==null&&(ci(i,e,s),hf(i,t,s)))}function cf(e,t,i){var s=bi();Tn(e,t,i,s)}function Tn(e,t,i,s){var v={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Xa(e))uf(t,v);else{var y=e.alternate;if(e.lanes===0&&(y===null||y.lanes===0)&&(y=t.lastRenderedReducer,y!==null))try{var T=t.lastRenderedState,$=y(T,i);if(v.hasEagerState=!0,v.eagerState=$,fi($,T))return Ra(e,t,v,0),ht===null&&La(),!1}catch{}finally{}if(i=Ml(e,t,v,s),i!==null)return ci(i,e,s),hf(i,t,s),!0}return!1}function dc(e,t,i,s){if(s={lane:2,revertLane:Fc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Xa(e)){if(t)throw Error(x(479))}else t=Ml(e,i,s,2),t!==null&&ci(t,e,2)}function Xa(e){var t=e.alternate;return e===Be||t!==null&&t===Be}function uf(e,t){zr=Pa=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function hf(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,_t(e,i)}}var Bn={readContext:Yt,use:Fa,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};Bn.useEffectEvent=xt;var df={readContext:Yt,use:Fa,useCallback:function(e,t){return ti().memoizedState=[e,t===void 0?null:t],e},useContext:Yt,useEffect:Xd,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Ga(4194308,4,Qd.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Ga(4194308,4,e,t)},useInsertionEffect:function(e,t){Ga(4,2,e,t)},useMemo:function(e,t){var i=ti();t=t===void 0?null:t;var s=e();if(or){At(!0);try{e()}finally{At(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=ti();if(i!==void 0){var v=i(t);if(or){At(!0);try{i(t)}finally{At(!1)}}}else v=t;return s.memoizedState=s.baseState=v,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:v},s.queue=e,e=e.dispatch=km.bind(null,Be,e),[s.memoizedState,e]},useRef:function(e){var t=ti();return e={current:e},t.memoizedState=e},useState:function(e){e=nc(e);var t=e.queue,i=cf.bind(null,Be,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:lc,useDeferredValue:function(e,t){var i=ti();return cc(i,e,t)},useTransition:function(){var e=nc(!1);return e=rf.bind(null,Be,e.queue,!0,!1),ti().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Be,v=ti();if(Pe){if(i===void 0)throw Error(x(407));i=i()}else{if(i=t(),ht===null)throw Error(x(349));(ze&127)!==0||Bd(s,t,i)}v.memoizedState=i;var y={value:i,getSnapshot:t};return v.queue=y,Xd(kd.bind(null,s,y,e),[e]),s.flags|=2048,Ur(9,{destroy:void 0},Od.bind(null,s,y,i,t),null),i},useId:function(){var e=ti(),t=ht.identifierPrefix;if(Pe){var i=Yi,s=Gi;i=(s&~(1<<32-wt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=$a++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Lm++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:hc,useFormState:Wd,useActionState:Wd,useOptimistic:function(e){var t=ti();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=dc.bind(null,Be,!0,i),i.dispatch=t,[e,t]},useMemoCache:ic,useCacheRefresh:function(){return ti().memoizedState=Om.bind(null,Be)},useEffectEvent:function(e){var t=ti(),i={impl:e};return t.memoizedState=i,function(){if((Ke&2)!==0)throw Error(x(440));return i.impl.apply(void 0,arguments)}}},fc={readContext:Yt,use:Fa,useCallback:ef,useContext:Yt,useEffect:oc,useImperativeHandle:Jd,useInsertionEffect:Kd,useLayoutEffect:Zd,useMemo:tf,useReducer:qa,useRef:Yd,useState:function(){return qa(os)},useDebugValue:lc,useDeferredValue:function(e,t){var i=Rt();return sf(i,at.memoizedState,e,t)},useTransition:function(){var e=qa(os)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:An(e),t]},useSyncExternalStore:Td,useId:of,useHostTransitionStatus:hc,useFormState:Fd,useActionState:Fd,useOptimistic:function(e,t){var i=Rt();return jd(i,at,e,t)},useMemoCache:ic,useCacheRefresh:lf};fc.useEffectEvent=Vd;var ff={readContext:Yt,use:Fa,useCallback:ef,useContext:Yt,useEffect:oc,useImperativeHandle:Jd,useInsertionEffect:Kd,useLayoutEffect:Zd,useMemo:tf,useReducer:rc,useRef:Yd,useState:function(){return rc(os)},useDebugValue:lc,useDeferredValue:function(e,t){var i=Rt();return at===null?cc(i,e,t):sf(i,at.memoizedState,e,t)},useTransition:function(){var e=rc(os)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:An(e),t]},useSyncExternalStore:Td,useId:of,useHostTransitionStatus:hc,useFormState:Gd,useActionState:Gd,useOptimistic:function(e,t){var i=Rt();return at!==null?jd(i,at,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:ic,useCacheRefresh:lf};ff.useEffectEvent=Vd;function _c(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:l({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var vc={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=bi(),v=Ds(s);v.payload=t,i!=null&&(v.callback=i),t=Ls(e,v,s),t!==null&&(ci(t,e,s),Dn(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=bi(),v=Ds(s);v.tag=1,v.payload=t,i!=null&&(v.callback=i),t=Ls(e,v,s),t!==null&&(ci(t,e,s),Dn(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=bi(),s=Ds(i);s.tag=2,t!=null&&(s.callback=t),t=Ls(e,s,i),t!==null&&(ci(t,e,i),Dn(t,e,i))}};function _f(e,t,i,s,v,y,T){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,y,T):t.prototype&&t.prototype.isPureReactComponent?!mn(i,s)||!mn(v,y):!0}function vf(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&vc.enqueueReplaceState(t,t.state,null)}function lr(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=l({},i));for(var v in e)i[v]===void 0&&(i[v]=e[v])}return i}function gf(e){Da(e)}function pf(e){console.error(e)}function mf(e){Da(e)}function Va(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function bf(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function gc(e,t,i){return i=Ds(i),i.tag=3,i.payload={element:null},i.callback=function(){Va(e,t)},i}function Sf(e){return e=Ds(e),e.tag=3,e}function yf(e,t,i,s){var v=i.type.getDerivedStateFromError;if(typeof v=="function"){var y=s.value;e.payload=function(){return v(y)},e.callback=function(){bf(t,i,s)}}var T=i.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(e.callback=function(){bf(t,i,s),typeof v!="function"&&(Os===null?Os=new Set([this]):Os.add(this));var $=s.stack;this.componentDidCatch(s.value,{componentStack:$!==null?$:""})})}function Nm(e,t,i,s,v){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Br(t,i,v,!0),i=vi.current,i!==null){switch(i.tag){case 31:case 13:return Ti===null?oo():i.alternate===null&&Et===0&&(Et=3),i.flags&=-257,i.flags|=65536,i.lanes=v,s===Ha?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Pc(e,s,v)),!1;case 22:return i.flags|=65536,s===Ha?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Pc(e,s,v)),!1}throw Error(x(435,i.tag))}return Pc(e,s,v),oo(),!1}if(Pe)return t=vi.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=v,s!==Nl&&(e=Error(x(422),{cause:s}),yn(Li(e,i)))):(s!==Nl&&(t=Error(x(423),{cause:s}),yn(Li(t,i))),e=e.current.alternate,e.flags|=65536,v&=-v,e.lanes|=v,s=Li(s,i),v=gc(e.stateNode,s,v),Gl(e,v),Et!==4&&(Et=2)),!1;var y=Error(x(520),{cause:s});if(y=Li(y,i),Un===null?Un=[y]:Un.push(y),Et!==4&&(Et=2),t===null)return!0;s=Li(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=v&-v,i.lanes|=e,e=gc(i.stateNode,s,e),Gl(i,e),!1;case 1:if(t=i.type,y=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Os===null||!Os.has(y))))return i.flags|=65536,v&=-v,i.lanes|=v,v=Sf(v),yf(v,e,i,s),Gl(i,v),!1}i=i.return}while(i!==null);return!1}var pc=Error(x(461)),Ot=!1;function Xt(e,t,i,s){t.child=e===null?xd(t,null,i,s):ar(t,e.child,i,s)}function Cf(e,t,i,s,v){i=i.render;var y=t.ref;if("ref"in s){var T={};for(var $ in s)$!=="ref"&&(T[$]=s[$])}else T=s;return ir(t),s=Ql(e,t,i,T,y,v),$=Jl(),e!==null&&!Ot?(ec(e,t,v),ls(e,t,v)):(Pe&&$&&Ol(t),t.flags|=1,Xt(e,t,s,v),t.child)}function wf(e,t,i,s,v){if(e===null){var y=i.type;return typeof y=="function"&&!Al(y)&&y.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=y,xf(e,t,y,s,v)):(e=Aa(i.type,null,s,t,t.mode,v),e.ref=t.ref,e.return=t,t.child=e)}if(y=e.child,!Ec(e,v)){var T=y.memoizedProps;if(i=i.compare,i=i!==null?i:mn,i(T,s)&&e.ref===t.ref)return ls(e,t,v)}return t.flags|=1,e=is(y,s),e.ref=t.ref,e.return=t,t.child=e}function xf(e,t,i,s,v){if(e!==null){var y=e.memoizedProps;if(mn(y,s)&&e.ref===t.ref)if(Ot=!1,t.pendingProps=s=y,Ec(e,v))(e.flags&131072)!==0&&(Ot=!0);else return t.lanes=e.lanes,ls(e,t,v)}return mc(e,t,i,s,v)}function Ef(e,t,i,s){var v=s.children,y=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(y=y!==null?y.baseLanes|i:i,e!==null){for(s=t.child=e.child,v=0;s!==null;)v=v|s.lanes|s.childLanes,s=s.sibling;s=v&~y}else s=0,t.child=null;return Df(e,t,y,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ka(t,y!==null?y.cachePool:null),y!==null?Ld(t,y):Xl(),Rd(t);else return s=t.lanes=536870912,Df(e,t,y!==null?y.baseLanes|i:i,i,s)}else y!==null?(ka(t,y.cachePool),Ld(t,y),Ms(),t.memoizedState=null):(e!==null&&ka(t,null),Xl(),Ms());return Xt(e,t,v,i),t.child}function On(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Df(e,t,i,s,v){var y=$l();return y=y===null?null:{parent:Tt._currentValue,pool:y},t.memoizedState={baseLanes:i,cachePool:y},e!==null&&ka(t,null),Xl(),Rd(t),e!==null&&Br(e,t,s,!0),t.childLanes=v,null}function Ka(e,t){return t=Qa({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Lf(e,t,i){return ar(t,e.child,null,i),e=Ka(t,t.pendingProps),e.flags|=2,gi(t),t.memoizedState=null,e}function Hm(e,t,i){var s=t.pendingProps,v=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(s.mode==="hidden")return e=Ka(t,s),t.lanes=536870912,On(null,e);if(Kl(t),(e=vt)?(e=I_(e,Ai),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ys!==null?{id:Gi,overflow:Yi}:null,retryLane:536870912,hydrationErrors:null},i=cd(e),i.return=t,t.child=i,Gt=t,vt=null)):e=null,e===null)throw ws(t);return t.lanes=536870912,null}return Ka(t,s)}var y=e.memoizedState;if(y!==null){var T=y.dehydrated;if(Kl(t),v)if(t.flags&256)t.flags&=-257,t=Lf(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(x(558));else if(Ot||Br(e,t,i,!1),v=(i&e.childLanes)!==0,Ot||v){if(s=ht,s!==null&&(T=bt(s,i),T!==0&&T!==y.retryLane))throw y.retryLane=T,Qs(e,T),ci(s,e,T),pc;oo(),t=Lf(e,t,i)}else e=y.treeContext,vt=Bi(T.nextSibling),Gt=t,Pe=!0,Cs=null,Ai=!1,e!==null&&dd(t,e),t=Ka(t,s),t.flags|=4096;return t}return e=is(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Za(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(x(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function mc(e,t,i,s,v){return ir(t),i=Ql(e,t,i,s,void 0,v),s=Jl(),e!==null&&!Ot?(ec(e,t,v),ls(e,t,v)):(Pe&&s&&Ol(t),t.flags|=1,Xt(e,t,i,v),t.child)}function Rf(e,t,i,s,v,y){return ir(t),t.updateQueue=null,i=Ad(t,s,i,v),Md(e),s=Jl(),e!==null&&!Ot?(ec(e,t,y),ls(e,t,y)):(Pe&&s&&Ol(t),t.flags|=1,Xt(e,t,i,y),t.child)}function Mf(e,t,i,s,v){if(ir(t),t.stateNode===null){var y=Rr,T=i.contextType;typeof T=="object"&&T!==null&&(y=Yt(T)),y=new i(s,y),t.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=vc,t.stateNode=y,y._reactInternals=t,y=t.stateNode,y.props=s,y.state=t.memoizedState,y.refs={},Fl(t),T=i.contextType,y.context=typeof T=="object"&&T!==null?Yt(T):Rr,y.state=t.memoizedState,T=i.getDerivedStateFromProps,typeof T=="function"&&(_c(t,i,T,s),y.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(T=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),T!==y.state&&vc.enqueueReplaceState(y,y.state,null),Rn(t,s,y,v),Ln(),y.state=t.memoizedState),typeof y.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){y=t.stateNode;var $=t.memoizedProps,Q=lr(i,$);y.props=Q;var re=y.context,ce=i.contextType;T=Rr,typeof ce=="object"&&ce!==null&&(T=Yt(ce));var de=i.getDerivedStateFromProps;ce=typeof de=="function"||typeof y.getSnapshotBeforeUpdate=="function",$=t.pendingProps!==$,ce||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||($||re!==T)&&vf(t,y,s,T),Es=!1;var ne=t.memoizedState;y.state=ne,Rn(t,s,y,v),Ln(),re=t.memoizedState,$||ne!==re||Es?(typeof de=="function"&&(_c(t,i,de,s),re=t.memoizedState),(Q=Es||_f(t,i,Q,s,ne,re,T))?(ce||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=s,t.memoizedState=re),y.props=s,y.state=re,y.context=T,s=Q):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{y=t.stateNode,ql(e,t),T=t.memoizedProps,ce=lr(i,T),y.props=ce,de=t.pendingProps,ne=y.context,re=i.contextType,Q=Rr,typeof re=="object"&&re!==null&&(Q=Yt(re)),$=i.getDerivedStateFromProps,(re=typeof $=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(T!==de||ne!==Q)&&vf(t,y,s,Q),Es=!1,ne=t.memoizedState,y.state=ne,Rn(t,s,y,v),Ln();var oe=t.memoizedState;T!==de||ne!==oe||Es||e!==null&&e.dependencies!==null&&Ba(e.dependencies)?(typeof $=="function"&&(_c(t,i,$,s),oe=t.memoizedState),(ce=Es||_f(t,i,ce,s,ne,oe,Q)||e!==null&&e.dependencies!==null&&Ba(e.dependencies))?(re||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(s,oe,Q),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(s,oe,Q)),typeof y.componentDidUpdate=="function"&&(t.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof y.componentDidUpdate!="function"||T===e.memoizedProps&&ne===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&ne===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=oe),y.props=s,y.state=oe,y.context=Q,s=ce):(typeof y.componentDidUpdate!="function"||T===e.memoizedProps&&ne===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&ne===e.memoizedState||(t.flags|=1024),s=!1)}return y=s,Za(e,t),s=(t.flags&128)!==0,y||s?(y=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:y.render(),t.flags|=1,e!==null&&s?(t.child=ar(t,e.child,null,v),t.child=ar(t,null,i,v)):Xt(e,t,i,v),t.memoizedState=y.state,e=t.child):e=ls(e,t,v),e}function Af(e,t,i,s){return er(),t.flags|=256,Xt(e,t,i,s),t.child}var bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:md()}}function yc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=mi),e}function Tf(e,t,i){var s=t.pendingProps,v=!1,y=(t.flags&128)!==0,T;if((T=y)||(T=e!==null&&e.memoizedState===null?!1:(Lt.current&2)!==0),T&&(v=!0,t.flags&=-129),T=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(v?Rs(t):Ms(),(e=vt)?(e=I_(e,Ai),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ys!==null?{id:Gi,overflow:Yi}:null,retryLane:536870912,hydrationErrors:null},i=cd(e),i.return=t,t.child=i,Gt=t,vt=null)):e=null,e===null)throw ws(t);return su(e)?t.lanes=32:t.lanes=536870912,null}var $=s.children;return s=s.fallback,v?(Ms(),v=t.mode,$=Qa({mode:"hidden",children:$},v),s=Js(s,v,i,null),$.return=t,s.return=t,$.sibling=s,t.child=$,s=t.child,s.memoizedState=Sc(i),s.childLanes=yc(e,T,i),t.memoizedState=bc,On(null,s)):(Rs(t),Cc(t,$))}var Q=e.memoizedState;if(Q!==null&&($=Q.dehydrated,$!==null)){if(y)t.flags&256?(Rs(t),t.flags&=-257,t=wc(e,t,i)):t.memoizedState!==null?(Ms(),t.child=e.child,t.flags|=128,t=null):(Ms(),$=s.fallback,v=t.mode,s=Qa({mode:"visible",children:s.children},v),$=Js($,v,i,null),$.flags|=2,s.return=t,$.return=t,s.sibling=$,t.child=s,ar(t,e.child,null,i),s=t.child,s.memoizedState=Sc(i),s.childLanes=yc(e,T,i),t.memoizedState=bc,t=On(null,s));else if(Rs(t),su($)){if(T=$.nextSibling&&$.nextSibling.dataset,T)var re=T.dgst;T=re,s=Error(x(419)),s.stack="",s.digest=T,yn({value:s,source:null,stack:null}),t=wc(e,t,i)}else if(Ot||Br(e,t,i,!1),T=(i&e.childLanes)!==0,Ot||T){if(T=ht,T!==null&&(s=bt(T,i),s!==0&&s!==Q.retryLane))throw Q.retryLane=s,Qs(e,s),ci(T,e,s),pc;iu($)||oo(),t=wc(e,t,i)}else iu($)?(t.flags|=192,t.child=e.child,t=null):(e=Q.treeContext,vt=Bi($.nextSibling),Gt=t,Pe=!0,Cs=null,Ai=!1,e!==null&&dd(t,e),t=Cc(t,s.children),t.flags|=4096);return t}return v?(Ms(),$=s.fallback,v=t.mode,Q=e.child,re=Q.sibling,s=is(Q,{mode:"hidden",children:s.children}),s.subtreeFlags=Q.subtreeFlags&65011712,re!==null?$=is(re,$):($=Js($,v,i,null),$.flags|=2),$.return=t,s.return=t,s.sibling=$,t.child=s,On(null,s),s=t.child,$=e.child.memoizedState,$===null?$=Sc(i):(v=$.cachePool,v!==null?(Q=Tt._currentValue,v=v.parent!==Q?{parent:Q,pool:Q}:v):v=md(),$={baseLanes:$.baseLanes|i,cachePool:v}),s.memoizedState=$,s.childLanes=yc(e,T,i),t.memoizedState=bc,On(e.child,s)):(Rs(t),i=e.child,e=i.sibling,i=is(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(T=t.deletions,T===null?(t.deletions=[e],t.flags|=16):T.push(e)),t.child=i,t.memoizedState=null,i)}function Cc(e,t){return t=Qa({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Qa(e,t){return e=_i(22,e,null,t),e.lanes=0,e}function wc(e,t,i){return ar(t,e.child,null,i),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Bf(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),zl(e.return,t,i)}function xc(e,t,i,s,v,y){var T=e.memoizedState;T===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:v,treeForkCount:y}:(T.isBackwards=t,T.rendering=null,T.renderingStartTime=0,T.last=s,T.tail=i,T.tailMode=v,T.treeForkCount=y)}function Of(e,t,i){var s=t.pendingProps,v=s.revealOrder,y=s.tail;s=s.children;var T=Lt.current,$=(T&2)!==0;if($?(T=T&1|2,t.flags|=128):T&=1,V(Lt,T),Xt(e,t,s,i),s=Pe?Sn:0,!$&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bf(e,i,t);else if(e.tag===19)Bf(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(v){case"forwards":for(i=t.child,v=null;i!==null;)e=i.alternate,e!==null&&Ua(e)===null&&(v=i),i=i.sibling;i=v,i===null?(v=t.child,t.child=null):(v=i.sibling,i.sibling=null),xc(t,!1,v,i,y,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,v=t.child,t.child=null;v!==null;){if(e=v.alternate,e!==null&&Ua(e)===null){t.child=v;break}e=v.sibling,v.sibling=i,i=v,v=e}xc(t,!0,i,null,y,s);break;case"together":xc(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function ls(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Bs|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Br(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(x(153));if(t.child!==null){for(e=t.child,i=is(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=is(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ba(e)))}function jm(e,t,i){switch(t.tag){case 3:P(t,t.stateNode.containerInfo),xs(t,Tt,e.memoizedState.cache),er();break;case 27:case 5:ie(t);break;case 4:P(t,t.stateNode.containerInfo);break;case 10:xs(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Kl(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Rs(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Tf(e,t,i):(Rs(t),e=ls(e,t,i),e!==null?e.sibling:null);Rs(t);break;case 19:var v=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Br(e,t,i,!1),s=(i&t.childLanes)!==0),v){if(s)return Of(e,t,i);t.flags|=128}if(v=t.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),V(Lt,Lt.current),s)break;return null;case 22:return t.lanes=0,Ef(e,t,i,t.pendingProps);case 24:xs(t,Tt,e.memoizedState.cache)}return ls(e,t,i)}function kf(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ot=!0;else{if(!Ec(e,i)&&(t.flags&128)===0)return Ot=!1,jm(e,t,i);Ot=(e.flags&131072)!==0}else Ot=!1,Pe&&(t.flags&1048576)!==0&&hd(t,Sn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=rr(t.elementType),t.type=e,typeof e=="function")Al(e)?(s=lr(e,s),t.tag=1,t=Mf(null,t,e,s,i)):(t.tag=0,t=mc(null,t,e,s,i));else{if(e!=null){var v=e.$$typeof;if(v===S){t.tag=11,t=Cf(null,t,e,s,i);break e}else if(v===E){t.tag=14,t=wf(null,t,e,s,i);break e}}throw t=Y(e)||e,Error(x(306,t,""))}}return t;case 0:return mc(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,v=lr(s,t.pendingProps),Mf(e,t,s,v,i);case 3:e:{if(P(t,t.stateNode.containerInfo),e===null)throw Error(x(387));s=t.pendingProps;var y=t.memoizedState;v=y.element,ql(e,t),Rn(t,s,null,i);var T=t.memoizedState;if(s=T.cache,xs(t,Tt,s),s!==y.cache&&Il(t,[Tt],i,!0),Ln(),s=T.element,y.isDehydrated)if(y={element:s,isDehydrated:!1,cache:T.cache},t.updateQueue.baseState=y,t.memoizedState=y,t.flags&256){t=Af(e,t,s,i);break e}else if(s!==v){v=Li(Error(x(424)),t),yn(v),t=Af(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(vt=Bi(e.firstChild),Gt=t,Pe=!0,Cs=null,Ai=!0,i=xd(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(er(),s===v){t=ls(e,t,i);break e}Xt(e,t,s,i)}t=t.child}return t;case 26:return Za(e,t),e===null?(i=q_(t.type,null,t.pendingProps,null))?t.memoizedState=i:Pe||(i=t.type,e=t.pendingProps,s=vo(ue.current).createElement(i),s[qt]=t,s[si]=e,Vt(s,i,e),Ut(s),t.stateNode=s):t.memoizedState=q_(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ie(t),e===null&&Pe&&(s=t.stateNode=$_(t.type,t.pendingProps,ue.current),Gt=t,Ai=!0,v=vt,js(t.type)?(ru=v,vt=Bi(s.firstChild)):vt=v),Xt(e,t,t.pendingProps.children,i),Za(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((v=s=vt)&&(s=f0(s,t.type,t.pendingProps,Ai),s!==null?(t.stateNode=s,Gt=t,vt=Bi(s.firstChild),Ai=!1,v=!0):v=!1),v||ws(t)),ie(t),v=t.type,y=t.pendingProps,T=e!==null?e.memoizedProps:null,s=y.children,Jc(v,y)?s=null:T!==null&&Jc(v,T)&&(t.flags|=32),t.memoizedState!==null&&(v=Ql(e,t,Rm,null,null,i),Xn._currentValue=v),Za(e,t),Xt(e,t,s,i),t.child;case 6:return e===null&&Pe&&((e=i=vt)&&(i=_0(i,t.pendingProps,Ai),i!==null?(t.stateNode=i,Gt=t,vt=null,e=!0):e=!1),e||ws(t)),null;case 13:return Tf(e,t,i);case 4:return P(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ar(t,null,s,i):Xt(e,t,s,i),t.child;case 11:return Cf(e,t,t.type,t.pendingProps,i);case 7:return Xt(e,t,t.pendingProps,i),t.child;case 8:return Xt(e,t,t.pendingProps.children,i),t.child;case 12:return Xt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,xs(t,t.type,s.value),Xt(e,t,s.children,i),t.child;case 9:return v=t.type._context,s=t.pendingProps.children,ir(t),v=Yt(v),s=s(v),t.flags|=1,Xt(e,t,s,i),t.child;case 14:return wf(e,t,t.type,t.pendingProps,i);case 15:return xf(e,t,t.type,t.pendingProps,i);case 19:return Of(e,t,i);case 31:return Hm(e,t,i);case 22:return Ef(e,t,i,t.pendingProps);case 24:return ir(t),s=Yt(Tt),e===null?(v=$l(),v===null&&(v=ht,y=Ul(),v.pooledCache=y,y.refCount++,y!==null&&(v.pooledCacheLanes|=i),v=y),t.memoizedState={parent:s,cache:v},Fl(t),xs(t,Tt,v)):((e.lanes&i)!==0&&(ql(e,t),Rn(t,null,null,i),Ln()),v=e.memoizedState,y=t.memoizedState,v.parent!==s?(v={parent:s,cache:s},t.memoizedState=v,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=v),xs(t,Tt,s)):(s=y.cache,xs(t,Tt,s),s!==v.cache&&Il(t,[Tt],i,!0))),Xt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(x(156,t.tag))}function cs(e){e.flags|=4}function Dc(e,t,i,s,v){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(v&335544128)===v)if(e.stateNode.complete)e.flags|=8192;else if(o_())e.flags|=8192;else throw nr=Ha,Wl}else e.flags&=-16777217}function Nf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!K_(t))if(o_())e.flags|=8192;else throw nr=Ha,Wl}function Ja(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Je():536870912,e.lanes|=t,Fr|=t)}function kn(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function gt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var v=e.child;v!==null;)i|=v.lanes|v.childLanes,s|=v.subtreeFlags&65011712,s|=v.flags&65011712,v.return=e,v=v.sibling;else for(v=e.child;v!==null;)i|=v.lanes|v.childLanes,s|=v.subtreeFlags,s|=v.flags,v.return=e,v=v.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function zm(e,t,i){var s=t.pendingProps;switch(kl(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(t),null;case 1:return gt(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ns(Tt),ae(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Tr(t)?cs(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Hl())),gt(t),null;case 26:var v=t.type,y=t.memoizedState;return e===null?(cs(t),y!==null?(gt(t),Nf(t,y)):(gt(t),Dc(t,v,null,s,i))):y?y!==e.memoizedState?(cs(t),gt(t),Nf(t,y)):(gt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&cs(t),gt(t),Dc(t,v,e,s,i)),null;case 27:if(ve(t),i=ue.current,v=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&cs(t);else{if(!s){if(t.stateNode===null)throw Error(x(166));return gt(t),null}e=ee.current,Tr(t)?fd(t):(e=$_(v,s,i),t.stateNode=e,cs(t))}return gt(t),null;case 5:if(ve(t),v=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&cs(t);else{if(!s){if(t.stateNode===null)throw Error(x(166));return gt(t),null}if(y=ee.current,Tr(t))fd(t);else{var T=vo(ue.current);switch(y){case 1:y=T.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:y=T.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":y=T.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":y=T.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":y=T.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof s.is=="string"?T.createElement("select",{is:s.is}):T.createElement("select"),s.multiple?y.multiple=!0:s.size&&(y.size=s.size);break;default:y=typeof s.is=="string"?T.createElement(v,{is:s.is}):T.createElement(v)}}y[qt]=t,y[si]=s;e:for(T=t.child;T!==null;){if(T.tag===5||T.tag===6)y.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===t)break e;for(;T.sibling===null;){if(T.return===null||T.return===t)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}t.stateNode=y;e:switch(Vt(y,v,s),v){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&cs(t)}}return gt(t),Dc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&cs(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(x(166));if(e=ue.current,Tr(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,v=Gt,v!==null)switch(v.tag){case 27:case 5:s=v.memoizedProps}e[qt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||T_(e.nodeValue,i)),e||ws(t,!0)}else e=vo(e).createTextNode(s),e[qt]=t,t.stateNode=e}return gt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Tr(t),i!==null){if(e===null){if(!s)throw Error(x(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(x(557));e[qt]=t}else er(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;gt(t),e=!1}else i=Hl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(gi(t),t):(gi(t),null);if((t.flags&128)!==0)throw Error(x(558))}return gt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(v=Tr(t),s!==null&&s.dehydrated!==null){if(e===null){if(!v)throw Error(x(318));if(v=t.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(x(317));v[qt]=t}else er(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;gt(t),v=!1}else v=Hl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=v),v=!0;if(!v)return t.flags&256?(gi(t),t):(gi(t),null)}return gi(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,v=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(v=s.alternate.memoizedState.cachePool.pool),y=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(y=s.memoizedState.cachePool.pool),y!==v&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Ja(t,t.updateQueue),gt(t),null);case 4:return ae(),e===null&&Xc(t.stateNode.containerInfo),gt(t),null;case 10:return ns(t.type),gt(t),null;case 19:if(F(Lt),s=t.memoizedState,s===null)return gt(t),null;if(v=(t.flags&128)!==0,y=s.rendering,y===null)if(v)kn(s,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(y=Ua(e),y!==null){for(t.flags|=128,kn(s,!1),e=y.updateQueue,t.updateQueue=e,Ja(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)ld(i,e),i=i.sibling;return V(Lt,Lt.current&1|2),Pe&&ss(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&xe()>ro&&(t.flags|=128,v=!0,kn(s,!1),t.lanes=4194304)}else{if(!v)if(e=Ua(y),e!==null){if(t.flags|=128,v=!0,e=e.updateQueue,t.updateQueue=e,Ja(t,e),kn(s,!0),s.tail===null&&s.tailMode==="hidden"&&!y.alternate&&!Pe)return gt(t),null}else 2*xe()-s.renderingStartTime>ro&&i!==536870912&&(t.flags|=128,v=!0,kn(s,!1),t.lanes=4194304);s.isBackwards?(y.sibling=t.child,t.child=y):(e=s.last,e!==null?e.sibling=y:t.child=y,s.last=y)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=xe(),e.sibling=null,i=Lt.current,V(Lt,v?i&1|2:i&1),Pe&&ss(t,s.treeForkCount),e):(gt(t),null);case 22:case 23:return gi(t),Vl(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(gt(t),t.subtreeFlags&6&&(t.flags|=8192)):gt(t),i=t.updateQueue,i!==null&&Ja(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&F(sr),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ns(Tt),gt(t),null;case 25:return null;case 30:return null}throw Error(x(156,t.tag))}function Im(e,t){switch(kl(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ns(Tt),ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(gi(t),t.alternate===null)throw Error(x(340));er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(gi(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(x(340));er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(Lt),null;case 4:return ae(),null;case 10:return ns(t.type),null;case 22:case 23:return gi(t),Vl(),e!==null&&F(sr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ns(Tt),null;case 25:return null;default:return null}}function Hf(e,t){switch(kl(t),t.tag){case 3:ns(Tt),ae();break;case 26:case 27:case 5:ve(t);break;case 4:ae();break;case 31:t.memoizedState!==null&&gi(t);break;case 13:gi(t);break;case 19:F(Lt);break;case 10:ns(t.type);break;case 22:case 23:gi(t),Vl(),e!==null&&F(sr);break;case 24:ns(Tt)}}function Nn(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var v=s.next;i=v;do{if((i.tag&e)===e){s=void 0;var y=i.create,T=i.inst;s=y(),T.destroy=s}i=i.next}while(i!==v)}}catch($){st(t,t.return,$)}}function As(e,t,i){try{var s=t.updateQueue,v=s!==null?s.lastEffect:null;if(v!==null){var y=v.next;s=y;do{if((s.tag&e)===e){var T=s.inst,$=T.destroy;if($!==void 0){T.destroy=void 0,v=t;var Q=i,re=$;try{re()}catch(ce){st(v,Q,ce)}}}s=s.next}while(s!==y)}}catch(ce){st(t,t.return,ce)}}function jf(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Dd(t,i)}catch(s){st(e,e.return,s)}}}function zf(e,t,i){i.props=lr(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){st(e,t,s)}}function Hn(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(v){st(e,t,v)}}function Xi(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(v){st(e,t,v)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(v){st(e,t,v)}else i.current=null}function If(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(v){st(e,e.return,v)}}function Lc(e,t,i){try{var s=e.stateNode;o0(s,e.type,i,t),s[si]=t}catch(v){st(e,e.return,v)}}function Uf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&js(e.type)||e.tag===4}function Rc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Uf(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&&js(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 Mc(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=es));else if(s!==4&&(s===27&&js(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Mc(e,t,i),e=e.sibling;e!==null;)Mc(e,t,i),e=e.sibling}function eo(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&js(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(eo(e,t,i),e=e.sibling;e!==null;)eo(e,t,i),e=e.sibling}function Pf(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,v=t.attributes;v.length;)t.removeAttributeNode(v[0]);Vt(t,s,i),t[qt]=e,t[si]=i}catch(y){st(e,e.return,y)}}var us=!1,kt=!1,Ac=!1,$f=typeof WeakSet=="function"?WeakSet:Set,Pt=null;function Um(e,t){if(e=e.containerInfo,Zc=Co,e=Jh(e),wl(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var v=s.anchorOffset,y=s.focusNode;s=s.focusOffset;try{i.nodeType,y.nodeType}catch{i=null;break e}var T=0,$=-1,Q=-1,re=0,ce=0,de=e,ne=null;t:for(;;){for(var oe;de!==i||v!==0&&de.nodeType!==3||($=T+v),de!==y||s!==0&&de.nodeType!==3||(Q=T+s),de.nodeType===3&&(T+=de.nodeValue.length),(oe=de.firstChild)!==null;)ne=de,de=oe;for(;;){if(de===e)break t;if(ne===i&&++re===v&&($=T),ne===y&&++ce===s&&(Q=T),(oe=de.nextSibling)!==null)break;de=ne,ne=de.parentNode}de=oe}i=$===-1||Q===-1?null:{start:$,end:Q}}else i=null}i=i||{start:0,end:0}}else i=null;for(Qc={focusedElem:e,selectionRange:i},Co=!1,Pt=t;Pt!==null;)if(t=Pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Pt=e;else for(;Pt!==null;){switch(t=Pt,y=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)v=e[i],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&y!==null){e=void 0,i=t,v=y.memoizedProps,y=y.memoizedState,s=i.stateNode;try{var me=lr(i.type,v);e=s.getSnapshotBeforeUpdate(me,y),s.__reactInternalSnapshotBeforeUpdate=e}catch(De){st(i,i.return,De)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)tu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":tu(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(x(163))}if(e=t.sibling,e!==null){e.return=t.return,Pt=e;break}Pt=t.return}}function Wf(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:ds(e,i),s&4&&Nn(5,i);break;case 1:if(ds(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(T){st(i,i.return,T)}else{var v=lr(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(v,t,e.__reactInternalSnapshotBeforeUpdate)}catch(T){st(i,i.return,T)}}s&64&&jf(i),s&512&&Hn(i,i.return);break;case 3:if(ds(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Dd(e,t)}catch(T){st(i,i.return,T)}}break;case 27:t===null&&s&4&&Pf(i);case 26:case 5:ds(e,i),t===null&&s&4&&If(i),s&512&&Hn(i,i.return);break;case 12:ds(e,i);break;case 31:ds(e,i),s&4&&Gf(e,i);break;case 13:ds(e,i),s&4&&Yf(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Vm.bind(null,i),v0(e,i))));break;case 22:if(s=i.memoizedState!==null||us,!s){t=t!==null&&t.memoizedState!==null||kt,v=us;var y=kt;us=s,(kt=t)&&!y?fs(e,i,(i.subtreeFlags&8772)!==0):ds(e,i),us=v,kt=y}break;case 30:break;default:ds(e,i)}}function Ff(e){var t=e.alternate;t!==null&&(e.alternate=null,Ff(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&al(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var St=null,ni=!1;function hs(e,t,i){for(i=i.child;i!==null;)qf(e,t,i),i=i.sibling}function qf(e,t,i){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(ei,i)}catch{}switch(i.tag){case 26:kt||Xi(i,t),hs(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:kt||Xi(i,t);var s=St,v=ni;js(i.type)&&(St=i.stateNode,ni=!1),hs(e,t,i),qn(i.stateNode),St=s,ni=v;break;case 5:kt||Xi(i,t);case 6:if(s=St,v=ni,St=null,hs(e,t,i),St=s,ni=v,St!==null)if(ni)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(i.stateNode)}catch(y){st(i,t,y)}else try{St.removeChild(i.stateNode)}catch(y){st(i,t,y)}break;case 18:St!==null&&(ni?(e=St,j_(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Qr(e)):j_(St,i.stateNode));break;case 4:s=St,v=ni,St=i.stateNode.containerInfo,ni=!0,hs(e,t,i),St=s,ni=v;break;case 0:case 11:case 14:case 15:As(2,i,t),kt||As(4,i,t),hs(e,t,i);break;case 1:kt||(Xi(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&zf(i,t,s)),hs(e,t,i);break;case 21:hs(e,t,i);break;case 22:kt=(s=kt)||i.memoizedState!==null,hs(e,t,i),kt=s;break;default:hs(e,t,i)}}function Gf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qr(e)}catch(i){st(t,t.return,i)}}}function Yf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qr(e)}catch(i){st(t,t.return,i)}}function Pm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $f),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $f),t;default:throw Error(x(435,e.tag))}}function to(e,t){var i=Pm(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var v=Km.bind(null,e,s);s.then(v,v)}})}function ai(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var v=i[s],y=e,T=t,$=T;e:for(;$!==null;){switch($.tag){case 27:if(js($.type)){St=$.stateNode,ni=!1;break e}break;case 5:St=$.stateNode,ni=!1;break e;case 3:case 4:St=$.stateNode.containerInfo,ni=!0;break e}$=$.return}if(St===null)throw Error(x(160));qf(y,T,v),St=null,ni=!1,y=v.alternate,y!==null&&(y.return=null),v.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Xf(t,e),t=t.sibling}var zi=null;function Xf(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ai(t,e),oi(e),s&4&&(As(3,e,e.return),Nn(3,e),As(5,e,e.return));break;case 1:ai(t,e),oi(e),s&512&&(kt||i===null||Xi(i,i.return)),s&64&&us&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var v=zi;if(ai(t,e),oi(e),s&512&&(kt||i===null||Xi(i,i.return)),s&4){var y=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,v=v.ownerDocument||v;t:switch(s){case"title":y=v.getElementsByTagName("title")[0],(!y||y[cn]||y[qt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=v.createElement(s),v.head.insertBefore(y,v.querySelector("head > title"))),Vt(y,s,i),y[qt]=e,Ut(y),s=y;break e;case"link":var T=X_("link","href",v).get(s+(i.href||""));if(T){for(var $=0;$<T.length;$++)if(y=T[$],y.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&y.getAttribute("rel")===(i.rel==null?null:i.rel)&&y.getAttribute("title")===(i.title==null?null:i.title)&&y.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){T.splice($,1);break t}}y=v.createElement(s),Vt(y,s,i),v.head.appendChild(y);break;case"meta":if(T=X_("meta","content",v).get(s+(i.content||""))){for($=0;$<T.length;$++)if(y=T[$],y.getAttribute("content")===(i.content==null?null:""+i.content)&&y.getAttribute("name")===(i.name==null?null:i.name)&&y.getAttribute("property")===(i.property==null?null:i.property)&&y.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&y.getAttribute("charset")===(i.charSet==null?null:i.charSet)){T.splice($,1);break t}}y=v.createElement(s),Vt(y,s,i),v.head.appendChild(y);break;default:throw Error(x(468,s))}y[qt]=e,Ut(y),s=y}e.stateNode=s}else V_(v,e.type,e.stateNode);else e.stateNode=Y_(v,s,e.memoizedProps);else y!==s?(y===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):y.count--,s===null?V_(v,e.type,e.stateNode):Y_(v,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Lc(e,e.memoizedProps,i.memoizedProps)}break;case 27:ai(t,e),oi(e),s&512&&(kt||i===null||Xi(i,i.return)),i!==null&&s&4&&Lc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(ai(t,e),oi(e),s&512&&(kt||i===null||Xi(i,i.return)),e.flags&32){v=e.stateNode;try{yr(v,"")}catch(me){st(e,e.return,me)}}s&4&&e.stateNode!=null&&(v=e.memoizedProps,Lc(e,v,i!==null?i.memoizedProps:v)),s&1024&&(Ac=!0);break;case 6:if(ai(t,e),oi(e),s&4){if(e.stateNode===null)throw Error(x(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(me){st(e,e.return,me)}}break;case 3:if(mo=null,v=zi,zi=go(t.containerInfo),ai(t,e),zi=v,oi(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Qr(t.containerInfo)}catch(me){st(e,e.return,me)}Ac&&(Ac=!1,Vf(e));break;case 4:s=zi,zi=go(e.stateNode.containerInfo),ai(t,e),oi(e),zi=s;break;case 12:ai(t,e),oi(e);break;case 31:ai(t,e),oi(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,to(e,s)));break;case 13:ai(t,e),oi(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(so=xe()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,to(e,s)));break;case 22:v=e.memoizedState!==null;var Q=i!==null&&i.memoizedState!==null,re=us,ce=kt;if(us=re||v,kt=ce||Q,ai(t,e),kt=ce,us=re,oi(e),s&8192)e:for(t=e.stateNode,t._visibility=v?t._visibility&-2:t._visibility|1,v&&(i===null||Q||us||kt||cr(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){Q=i=t;try{if(y=Q.stateNode,v)T=y.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{$=Q.stateNode;var de=Q.memoizedProps.style,ne=de!=null&&de.hasOwnProperty("display")?de.display:null;$.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(me){st(Q,Q.return,me)}}}else if(t.tag===6){if(i===null){Q=t;try{Q.stateNode.nodeValue=v?"":Q.memoizedProps}catch(me){st(Q,Q.return,me)}}}else if(t.tag===18){if(i===null){Q=t;try{var oe=Q.stateNode;v?z_(oe,!0):z_(Q.stateNode,!1)}catch(me){st(Q,Q.return,me)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,to(e,i))));break;case 19:ai(t,e),oi(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,to(e,s)));break;case 30:break;case 21:break;default:ai(t,e),oi(e)}}function oi(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(Uf(s)){i=s;break}s=s.return}if(i==null)throw Error(x(160));switch(i.tag){case 27:var v=i.stateNode,y=Rc(e);eo(e,y,v);break;case 5:var T=i.stateNode;i.flags&32&&(yr(T,""),i.flags&=-33);var $=Rc(e);eo(e,$,T);break;case 3:case 4:var Q=i.stateNode.containerInfo,re=Rc(e);Mc(e,re,Q);break;default:throw Error(x(161))}}catch(ce){st(e,e.return,ce)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ds(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wf(e,t.alternate,t),t=t.sibling}function cr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:As(4,t,t.return),cr(t);break;case 1:Xi(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&zf(t,t.return,i),cr(t);break;case 27:qn(t.stateNode);case 26:case 5:Xi(t,t.return),cr(t);break;case 22:t.memoizedState===null&&cr(t);break;case 30:cr(t);break;default:cr(t)}e=e.sibling}}function fs(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,v=e,y=t,T=y.flags;switch(y.tag){case 0:case 11:case 15:fs(v,y,i),Nn(4,y);break;case 1:if(fs(v,y,i),s=y,v=s.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(re){st(s,s.return,re)}if(s=y,v=s.updateQueue,v!==null){var $=s.stateNode;try{var Q=v.shared.hiddenCallbacks;if(Q!==null)for(v.shared.hiddenCallbacks=null,v=0;v<Q.length;v++)Ed(Q[v],$)}catch(re){st(s,s.return,re)}}i&&T&64&&jf(y),Hn(y,y.return);break;case 27:Pf(y);case 26:case 5:fs(v,y,i),i&&s===null&&T&4&&If(y),Hn(y,y.return);break;case 12:fs(v,y,i);break;case 31:fs(v,y,i),i&&T&4&&Gf(v,y);break;case 13:fs(v,y,i),i&&T&4&&Yf(v,y);break;case 22:y.memoizedState===null&&fs(v,y,i),Hn(y,y.return);break;case 30:break;default:fs(v,y,i)}t=t.sibling}}function Tc(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Cn(i))}function Bc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cn(e))}function Ii(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Kf(e,t,i,s),t=t.sibling}function Kf(e,t,i,s){var v=t.flags;switch(t.tag){case 0:case 11:case 15:Ii(e,t,i,s),v&2048&&Nn(9,t);break;case 1:Ii(e,t,i,s);break;case 3:Ii(e,t,i,s),v&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cn(e)));break;case 12:if(v&2048){Ii(e,t,i,s),e=t.stateNode;try{var y=t.memoizedProps,T=y.id,$=y.onPostCommit;typeof $=="function"&&$(T,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Q){st(t,t.return,Q)}}else Ii(e,t,i,s);break;case 31:Ii(e,t,i,s);break;case 13:Ii(e,t,i,s);break;case 23:break;case 22:y=t.stateNode,T=t.alternate,t.memoizedState!==null?y._visibility&2?Ii(e,t,i,s):jn(e,t):y._visibility&2?Ii(e,t,i,s):(y._visibility|=2,Pr(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),v&2048&&Tc(T,t);break;case 24:Ii(e,t,i,s),v&2048&&Bc(t.alternate,t);break;default:Ii(e,t,i,s)}}function Pr(e,t,i,s,v){for(v=v&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var y=e,T=t,$=i,Q=s,re=T.flags;switch(T.tag){case 0:case 11:case 15:Pr(y,T,$,Q,v),Nn(8,T);break;case 23:break;case 22:var ce=T.stateNode;T.memoizedState!==null?ce._visibility&2?Pr(y,T,$,Q,v):jn(y,T):(ce._visibility|=2,Pr(y,T,$,Q,v)),v&&re&2048&&Tc(T.alternate,T);break;case 24:Pr(y,T,$,Q,v),v&&re&2048&&Bc(T.alternate,T);break;default:Pr(y,T,$,Q,v)}t=t.sibling}}function jn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,v=s.flags;switch(s.tag){case 22:jn(i,s),v&2048&&Tc(s.alternate,s);break;case 24:jn(i,s),v&2048&&Bc(s.alternate,s);break;default:jn(i,s)}t=t.sibling}}var zn=8192;function $r(e,t,i){if(e.subtreeFlags&zn)for(e=e.child;e!==null;)Zf(e,t,i),e=e.sibling}function Zf(e,t,i){switch(e.tag){case 26:$r(e,t,i),e.flags&zn&&e.memoizedState!==null&&L0(i,zi,e.memoizedState,e.memoizedProps);break;case 5:$r(e,t,i);break;case 3:case 4:var s=zi;zi=go(e.stateNode.containerInfo),$r(e,t,i),zi=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=zn,zn=16777216,$r(e,t,i),zn=s):$r(e,t,i));break;default:$r(e,t,i)}}function Qf(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 In(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Pt=s,e_(s,e)}Qf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Jf(e),e=e.sibling}function Jf(e){switch(e.tag){case 0:case 11:case 15:In(e),e.flags&2048&&As(9,e,e.return);break;case 3:In(e);break;case 12:In(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,io(e)):In(e);break;default:In(e)}}function io(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Pt=s,e_(s,e)}Qf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:As(8,t,t.return),io(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,io(t));break;default:io(t)}e=e.sibling}}function e_(e,t){for(;Pt!==null;){var i=Pt;switch(i.tag){case 0:case 11:case 15:As(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Cn(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,Pt=s;else e:for(i=e;Pt!==null;){s=Pt;var v=s.sibling,y=s.return;if(Ff(s),s===i){Pt=null;break e}if(v!==null){v.return=y,Pt=v;break e}Pt=y}}}var $m={getCacheForType:function(e){var t=Yt(Tt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Yt(Tt).controller.signal}},Wm=typeof WeakMap=="function"?WeakMap:Map,Ke=0,ht=null,He=null,ze=0,it=0,pi=null,Ts=!1,Wr=!1,Oc=!1,_s=0,Et=0,Bs=0,ur=0,kc=0,mi=0,Fr=0,Un=null,li=null,Nc=!1,so=0,t_=0,ro=1/0,no=null,Os=null,zt=0,ks=null,qr=null,vs=0,Hc=0,jc=null,i_=null,Pn=0,zc=null;function bi(){return(Ke&2)!==0&&ze!==0?ze&-ze:q.T!==null?Fc():Ci()}function s_(){if(mi===0)if((ze&536870912)===0||Pe){var e=Hi;Hi<<=1,(Hi&3932160)===0&&(Hi=262144),mi=e}else mi=536870912;return e=vi.current,e!==null&&(e.flags|=32),mi}function ci(e,t,i){(e===ht&&(it===2||it===9)||e.cancelPendingCommit!==null)&&(Gr(e,0),Ns(e,ze,mi,!1)),et(e,i),((Ke&2)===0||e!==ht)&&(e===ht&&((Ke&2)===0&&(ur|=i),Et===4&&Ns(e,ze,mi,!1)),Vi(e))}function r_(e,t,i){if((Ke&6)!==0)throw Error(x(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||qe(e,t),v=s?Gm(e,t):Uc(e,t,!0),y=s;do{if(v===0){Wr&&!s&&Ns(e,t,0,!1);break}else{if(i=e.current.alternate,y&&!Fm(i)){v=Uc(e,t,!1),y=!1;continue}if(v===2){if(y=t,e.errorRecoveryDisabledLanes&y)var T=0;else T=e.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){t=T;e:{var $=e;v=Un;var Q=$.current.memoizedState.isDehydrated;if(Q&&(Gr($,T).flags|=256),T=Uc($,T,!1),T!==2){if(Oc&&!Q){$.errorRecoveryDisabledLanes|=y,ur|=y,v=4;break e}y=li,li=v,y!==null&&(li===null?li=y:li.push.apply(li,y))}v=T}if(y=!1,v!==2)continue}}if(v===1){Gr(e,0),Ns(e,t,0,!0);break}e:{switch(s=e,y=v,y){case 0:case 1:throw Error(x(345));case 4:if((t&4194048)!==t)break;case 6:Ns(s,t,mi,!Ts);break e;case 2:li=null;break;case 3:case 5:break;default:throw Error(x(329))}if((t&62914560)===t&&(v=so+300-xe(),10<v)){if(Ns(s,t,mi,!Ts),ye(s,0,!0)!==0)break e;vs=t,s.timeoutHandle=N_(n_.bind(null,s,i,li,no,Nc,t,mi,ur,Fr,Ts,y,"Throttled",-0,0),v);break e}n_(s,i,li,no,Nc,t,mi,ur,Fr,Ts,y,null,-0,0)}}break}while(!0);Vi(e)}function n_(e,t,i,s,v,y,T,$,Q,re,ce,de,ne,oe){if(e.timeoutHandle=-1,de=t.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:es},Zf(t,y,de);var me=(y&62914560)===y?so-xe():(y&4194048)===y?t_-xe():0;if(me=R0(de,me),me!==null){vs=y,e.cancelPendingCommit=me(f_.bind(null,e,t,y,i,s,v,T,$,Q,ce,de,null,ne,oe)),Ns(e,y,T,!re);return}}f_(e,t,y,i,s,v,T,$,Q)}function Fm(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var v=i[s],y=v.getSnapshot;v=v.value;try{if(!fi(y(),v))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ns(e,t,i,s){t&=~kc,t&=~ur,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var v=t;0<v;){var y=31-wt(v),T=1<<y;s[y]=-1,v&=~T}i!==0&&Zt(e,i,t)}function ao(){return(Ke&6)===0?($n(0),!1):!0}function Ic(){if(He!==null){if(it===0)var e=He.return;else e=He,rs=tr=null,tc(e),Hr=null,xn=0,e=He;for(;e!==null;)Hf(e.alternate,e),e=e.return;He=null}}function Gr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,u0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),vs=0,Ic(),ht=e,He=i=is(e.current,null),ze=t,it=0,pi=null,Ts=!1,Wr=qe(e,t),Oc=!1,Fr=mi=kc=ur=Bs=Et=0,li=Un=null,Nc=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var v=31-wt(s),y=1<<v;t|=e[v],s&=~y}return _s=t,La(),i}function a_(e,t){Be=null,q.H=Bn,t===Nr||t===Na?(t=yd(),it=3):t===Wl?(t=yd(),it=4):it=t===pc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pi=t,He===null&&(Et=1,Va(e,Li(t,e.current)))}function o_(){var e=vi.current;return e===null?!0:(ze&4194048)===ze?Ti===null:(ze&62914560)===ze||(ze&536870912)!==0?e===Ti:!1}function l_(){var e=q.H;return q.H=Bn,e===null?Bn:e}function c_(){var e=q.A;return q.A=$m,e}function oo(){Et=4,Ts||(ze&4194048)!==ze&&vi.current!==null||(Wr=!0),(Bs&134217727)===0&&(ur&134217727)===0||ht===null||Ns(ht,ze,mi,!1)}function Uc(e,t,i){var s=Ke;Ke|=2;var v=l_(),y=c_();(ht!==e||ze!==t)&&(no=null,Gr(e,t)),t=!1;var T=Et;e:do try{if(it!==0&&He!==null){var $=He,Q=pi;switch(it){case 8:Ic(),T=6;break e;case 3:case 2:case 9:case 6:vi.current===null&&(t=!0);var re=it;if(it=0,pi=null,Yr(e,$,Q,re),i&&Wr){T=0;break e}break;default:re=it,it=0,pi=null,Yr(e,$,Q,re)}}qm(),T=Et;break}catch(ce){a_(e,ce)}while(!0);return t&&e.shellSuspendCounter++,rs=tr=null,Ke=s,q.H=v,q.A=y,He===null&&(ht=null,ze=0,La()),T}function qm(){for(;He!==null;)u_(He)}function Gm(e,t){var i=Ke;Ke|=2;var s=l_(),v=c_();ht!==e||ze!==t?(no=null,ro=xe()+500,Gr(e,t)):Wr=qe(e,t);e:do try{if(it!==0&&He!==null){t=He;var y=pi;t:switch(it){case 1:it=0,pi=null,Yr(e,t,y,1);break;case 2:case 9:if(bd(y)){it=0,pi=null,h_(t);break}t=function(){it!==2&&it!==9||ht!==e||(it=7),Vi(e)},y.then(t,t);break e;case 3:it=7;break e;case 4:it=5;break e;case 7:bd(y)?(it=0,pi=null,h_(t)):(it=0,pi=null,Yr(e,t,y,7));break;case 5:var T=null;switch(He.tag){case 26:T=He.memoizedState;case 5:case 27:var $=He;if(T?K_(T):$.stateNode.complete){it=0,pi=null;var Q=$.sibling;if(Q!==null)He=Q;else{var re=$.return;re!==null?(He=re,lo(re)):He=null}break t}}it=0,pi=null,Yr(e,t,y,5);break;case 6:it=0,pi=null,Yr(e,t,y,6);break;case 8:Ic(),Et=6;break e;default:throw Error(x(462))}}Ym();break}catch(ce){a_(e,ce)}while(!0);return rs=tr=null,q.H=s,q.A=v,Ke=i,He!==null?0:(ht=null,ze=0,La(),Et)}function Ym(){for(;He!==null&&!Ce();)u_(He)}function u_(e){var t=kf(e.alternate,e,_s);e.memoizedProps=e.pendingProps,t===null?lo(e):He=t}function h_(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Rf(i,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=Rf(i,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:tc(t);default:Hf(i,t),t=He=ld(t,_s),t=kf(i,t,_s)}e.memoizedProps=e.pendingProps,t===null?lo(e):He=t}function Yr(e,t,i,s){rs=tr=null,tc(t),Hr=null,xn=0;var v=t.return;try{if(Nm(e,v,t,i,ze)){Et=1,Va(e,Li(i,e.current)),He=null;return}}catch(y){if(v!==null)throw He=v,y;Et=1,Va(e,Li(i,e.current)),He=null;return}t.flags&32768?(Pe||s===1?e=!0:Wr||(ze&536870912)!==0?e=!1:(Ts=e=!0,(s===2||s===9||s===3||s===6)&&(s=vi.current,s!==null&&s.tag===13&&(s.flags|=16384))),d_(t,e)):lo(t)}function lo(e){var t=e;do{if((t.flags&32768)!==0){d_(t,Ts);return}e=t.return;var i=zm(t.alternate,t,_s);if(i!==null){He=i;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);Et===0&&(Et=5)}function d_(e,t){do{var i=Im(e.alternate,e);if(i!==null){i.flags&=32767,He=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=i}while(e!==null);Et=6,He=null}function f_(e,t,i,s,v,y,T,$,Q){e.cancelPendingCommit=null;do co();while(zt!==0);if((Ke&6)!==0)throw Error(x(327));if(t!==null){if(t===e.current)throw Error(x(177));if(y=t.lanes|t.childLanes,y|=Rl,Ge(e,i,y,T,$,Q),e===ht&&(He=ht=null,ze=0),qr=t,ks=e,vs=i,Hc=y,jc=v,i_=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Zm(tt,function(){return m_(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=q.T,q.T=null,v=G.p,G.p=2,T=Ke,Ke|=4;try{Um(e,t,i)}finally{Ke=T,G.p=v,q.T=s}}zt=1,__(),v_(),g_()}}function __(){if(zt===1){zt=0;var e=ks,t=qr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=q.T,q.T=null;var s=G.p;G.p=2;var v=Ke;Ke|=4;try{Xf(t,e);var y=Qc,T=Jh(e.containerInfo),$=y.focusedElem,Q=y.selectionRange;if(T!==$&&$&&$.ownerDocument&&Qh($.ownerDocument.documentElement,$)){if(Q!==null&&wl($)){var re=Q.start,ce=Q.end;if(ce===void 0&&(ce=re),"selectionStart"in $)$.selectionStart=re,$.selectionEnd=Math.min(ce,$.value.length);else{var de=$.ownerDocument||document,ne=de&&de.defaultView||window;if(ne.getSelection){var oe=ne.getSelection(),me=$.textContent.length,De=Math.min(Q.start,me),lt=Q.end===void 0?De:Math.min(Q.end,me);!oe.extend&&De>lt&&(T=lt,lt=De,De=T);var te=Zh($,De),J=Zh($,lt);if(te&&J&&(oe.rangeCount!==1||oe.anchorNode!==te.node||oe.anchorOffset!==te.offset||oe.focusNode!==J.node||oe.focusOffset!==J.offset)){var se=de.createRange();se.setStart(te.node,te.offset),oe.removeAllRanges(),De>lt?(oe.addRange(se),oe.extend(J.node,J.offset)):(se.setEnd(J.node,J.offset),oe.addRange(se))}}}}for(de=[],oe=$;oe=oe.parentNode;)oe.nodeType===1&&de.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof $.focus=="function"&&$.focus(),$=0;$<de.length;$++){var he=de[$];he.element.scrollLeft=he.left,he.element.scrollTop=he.top}}Co=!!Zc,Qc=Zc=null}finally{Ke=v,G.p=s,q.T=i}}e.current=t,zt=2}}function v_(){if(zt===2){zt=0;var e=ks,t=qr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=q.T,q.T=null;var s=G.p;G.p=2;var v=Ke;Ke|=4;try{Wf(e,t.alternate,t)}finally{Ke=v,G.p=s,q.T=i}}zt=3}}function g_(){if(zt===4||zt===3){zt=0,ge();var e=ks,t=qr,i=vs,s=i_;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?zt=5:(zt=0,qr=ks=null,p_(e,e.pendingLanes));var v=e.pendingLanes;if(v===0&&(Os=null),Ft(i),t=t.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(ei,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=q.T,v=G.p,G.p=2,q.T=null;try{for(var y=e.onRecoverableError,T=0;T<s.length;T++){var $=s[T];y($.value,{componentStack:$.stack})}}finally{q.T=t,G.p=v}}(vs&3)!==0&&co(),Vi(e),v=e.pendingLanes,(i&261930)!==0&&(v&42)!==0?e===zc?Pn++:(Pn=0,zc=e):Pn=0,$n(0)}}function p_(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Cn(t)))}function co(){return __(),v_(),g_(),m_()}function m_(){if(zt!==5)return!1;var e=ks,t=Hc;Hc=0;var i=Ft(vs),s=q.T,v=G.p;try{G.p=32>i?32:i,q.T=null,i=jc,jc=null;var y=ks,T=vs;if(zt=0,qr=ks=null,vs=0,(Ke&6)!==0)throw Error(x(331));var $=Ke;if(Ke|=4,Jf(y.current),Kf(y,y.current,T,i),Ke=$,$n(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(ei,y)}catch{}return!0}finally{G.p=v,q.T=s,p_(e,t)}}function b_(e,t,i){t=Li(i,t),t=gc(e.stateNode,t,2),e=Ls(e,t,2),e!==null&&(et(e,2),Vi(e))}function st(e,t,i){if(e.tag===3)b_(e,e,i);else for(;t!==null;){if(t.tag===3){b_(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Os===null||!Os.has(s))){e=Li(i,e),i=Sf(2),s=Ls(t,i,2),s!==null&&(yf(i,s,t,e),et(s,2),Vi(s));break}}t=t.return}}function Pc(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new Wm;var v=new Set;s.set(t,v)}else v=s.get(t),v===void 0&&(v=new Set,s.set(t,v));v.has(i)||(Oc=!0,v.add(i),e=Xm.bind(null,e,t,i),t.then(e,e))}function Xm(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,ht===e&&(ze&i)===i&&(Et===4||Et===3&&(ze&62914560)===ze&&300>xe()-so?(Ke&2)===0&&Gr(e,0):kc|=i,Fr===ze&&(Fr=0)),Vi(e)}function S_(e,t){t===0&&(t=Je()),e=Qs(e,t),e!==null&&(et(e,t),Vi(e))}function Vm(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),S_(e,i)}function Km(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,v=e.memoizedState;v!==null&&(i=v.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(x(314))}s!==null&&s.delete(t),S_(e,i)}function Zm(e,t){return Re(e,t)}var uo=null,Xr=null,$c=!1,ho=!1,Wc=!1,Hs=0;function Vi(e){e!==Xr&&e.next===null&&(Xr===null?uo=Xr=e:Xr=Xr.next=e),ho=!0,$c||($c=!0,Jm())}function $n(e,t){if(!Wc&&ho){Wc=!0;do for(var i=!1,s=uo;s!==null;){if(e!==0){var v=s.pendingLanes;if(v===0)var y=0;else{var T=s.suspendedLanes,$=s.pingedLanes;y=(1<<31-wt(42|e)+1)-1,y&=v&~(T&~$),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(i=!0,x_(s,y))}else y=ze,y=ye(s,s===ht?y:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(y&3)===0||qe(s,y)||(i=!0,x_(s,y));s=s.next}while(i);Wc=!1}}function Qm(){y_()}function y_(){ho=$c=!1;var e=0;Hs!==0&&c0()&&(e=Hs);for(var t=xe(),i=null,s=uo;s!==null;){var v=s.next,y=C_(s,t);y===0?(s.next=null,i===null?uo=v:i.next=v,v===null&&(Xr=i)):(i=s,(e!==0||(y&3)!==0)&&(ho=!0)),s=v}zt!==0&&zt!==5||$n(e),Hs!==0&&(Hs=0)}function C_(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,v=e.expirationTimes,y=e.pendingLanes&-62914561;0<y;){var T=31-wt(y),$=1<<T,Q=v[T];Q===-1?(($&i)===0||($&s)!==0)&&(v[T]=Ve($,t)):Q<=t&&(e.expiredLanes|=$),y&=~$}if(t=ht,i=ze,i=ye(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(it===2||it===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Me(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||qe(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Me(s),Ft(i)){case 2:case 8:i=Dt;break;case 32:i=tt;break;case 268435456:i=Fe;break;default:i=tt}return s=w_.bind(null,e),i=Re(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Me(s),e.callbackPriority=2,e.callbackNode=null,2}function w_(e,t){if(zt!==0&&zt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(co()&&e.callbackNode!==i)return null;var s=ze;return s=ye(e,e===ht?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(r_(e,s,t),C_(e,xe()),e.callbackNode!=null&&e.callbackNode===i?w_.bind(null,e):null)}function x_(e,t){if(co())return null;r_(e,t,!0)}function Jm(){h0(function(){(Ke&6)!==0?Re(Ue,Qm):y_()})}function Fc(){if(Hs===0){var e=Or;e===0&&(e=Si,Si<<=1,(Si&261888)===0&&(Si=256)),Hs=e}return Hs}function E_(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ba(""+e)}function D_(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function e0(e,t,i,s,v){if(t==="submit"&&i&&i.stateNode===v){var y=E_((v[si]||null).action),T=s.submitter;T&&(t=(t=T[si]||null)?E_(t.formAction):T.getAttribute("formAction"),t!==null&&(y=t,T=null));var $=new wa("action","action",null,s,v);e.push({event:$,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Hs!==0){var Q=T?D_(v,T):new FormData(v);uc(i,{pending:!0,data:Q,method:v.method,action:y},null,Q)}}else typeof y=="function"&&($.preventDefault(),Q=T?D_(v,T):new FormData(v),uc(i,{pending:!0,data:Q,method:v.method,action:y},y,Q))},currentTarget:v}]})}}for(var qc=0;qc<Ll.length;qc++){var Gc=Ll[qc],t0=Gc.toLowerCase(),i0=Gc[0].toUpperCase()+Gc.slice(1);ji(t0,"on"+i0)}ji(id,"onAnimationEnd"),ji(sd,"onAnimationIteration"),ji(rd,"onAnimationStart"),ji("dblclick","onDoubleClick"),ji("focusin","onFocus"),ji("focusout","onBlur"),ji(mm,"onTransitionRun"),ji(bm,"onTransitionStart"),ji(Sm,"onTransitionCancel"),ji(nd,"onTransitionEnd"),br("onMouseEnter",["mouseout","mouseover"]),br("onMouseLeave",["mouseout","mouseover"]),br("onPointerEnter",["pointerout","pointerover"]),br("onPointerLeave",["pointerout","pointerover"]),Xs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xs("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wn="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(" "),s0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wn));function L_(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],v=s.event;s=s.listeners;e:{var y=void 0;if(t)for(var T=s.length-1;0<=T;T--){var $=s[T],Q=$.instance,re=$.currentTarget;if($=$.listener,Q!==y&&v.isPropagationStopped())break e;y=$,v.currentTarget=re;try{y(v)}catch(ce){Da(ce)}v.currentTarget=null,y=Q}else for(T=0;T<s.length;T++){if($=s[T],Q=$.instance,re=$.currentTarget,$=$.listener,Q!==y&&v.isPropagationStopped())break e;y=$,v.currentTarget=re;try{y(v)}catch(ce){Da(ce)}v.currentTarget=null,y=Q}}}}function je(e,t){var i=t[nl];i===void 0&&(i=t[nl]=new Set);var s=e+"__bubble";i.has(s)||(R_(t,e,2,!1),i.add(s))}function Yc(e,t,i){var s=0;t&&(s|=4),R_(i,e,s,t)}var fo="_reactListening"+Math.random().toString(36).slice(2);function Xc(e){if(!e[fo]){e[fo]=!0,Sh.forEach(function(i){i!=="selectionchange"&&(s0.has(i)||Yc(i,!1,e),Yc(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fo]||(t[fo]=!0,Yc("selectionchange",!1,t))}}function R_(e,t,i,s){switch(sv(t)){case 2:var v=T0;break;case 8:v=B0;break;default:v=cu}i=v.bind(null,t,i,e),v=void 0,!_l||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(v=!0),s?v!==void 0?e.addEventListener(t,i,{capture:!0,passive:v}):e.addEventListener(t,i,!0):v!==void 0?e.addEventListener(t,i,{passive:v}):e.addEventListener(t,i,!1)}function Vc(e,t,i,s,v){var y=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var T=s.tag;if(T===3||T===4){var $=s.stateNode.containerInfo;if($===v)break;if(T===4)for(T=s.return;T!==null;){var Q=T.tag;if((Q===3||Q===4)&&T.stateNode.containerInfo===v)return;T=T.return}for(;$!==null;){if(T=gr($),T===null)return;if(Q=T.tag,Q===5||Q===6||Q===26||Q===27){s=y=T;continue e}$=$.parentNode}}s=s.return}Bh(function(){var re=y,ce=dl(i),de=[];e:{var ne=ad.get(e);if(ne!==void 0){var oe=wa,me=e;switch(e){case"keypress":if(ya(i)===0)break e;case"keydown":case"keyup":oe=Kp;break;case"focusin":me="focus",oe=ml;break;case"focusout":me="blur",oe=ml;break;case"beforeblur":case"afterblur":oe=ml;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=Nh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=zp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=Jp;break;case id:case sd:case rd:oe=Pp;break;case nd:oe=tm;break;case"scroll":case"scrollend":oe=Hp;break;case"wheel":oe=sm;break;case"copy":case"cut":case"paste":oe=Wp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=jh;break;case"toggle":case"beforetoggle":oe=nm}var De=(t&4)!==0,lt=!De&&(e==="scroll"||e==="scrollend"),te=De?ne!==null?ne+"Capture":null:ne;De=[];for(var J=re,se;J!==null;){var he=J;if(se=he.stateNode,he=he.tag,he!==5&&he!==26&&he!==27||se===null||te===null||(he=hn(J,te),he!=null&&De.push(Fn(J,he,se))),lt)break;J=J.return}0<De.length&&(ne=new oe(ne,me,null,i,ce),de.push({event:ne,listeners:De}))}}if((t&7)===0){e:{if(ne=e==="mouseover"||e==="pointerover",oe=e==="mouseout"||e==="pointerout",ne&&i!==hl&&(me=i.relatedTarget||i.fromElement)&&(gr(me)||me[vr]))break e;if((oe||ne)&&(ne=ce.window===ce?ce:(ne=ce.ownerDocument)?ne.defaultView||ne.parentWindow:window,oe?(me=i.relatedTarget||i.toElement,oe=re,me=me?gr(me):null,me!==null&&(lt=B(me),De=me.tag,me!==lt||De!==5&&De!==27&&De!==6)&&(me=null)):(oe=null,me=re),oe!==me)){if(De=Nh,he="onMouseLeave",te="onMouseEnter",J="mouse",(e==="pointerout"||e==="pointerover")&&(De=jh,he="onPointerLeave",te="onPointerEnter",J="pointer"),lt=oe==null?ne:un(oe),se=me==null?ne:un(me),ne=new De(he,J+"leave",oe,i,ce),ne.target=lt,ne.relatedTarget=se,he=null,gr(ce)===re&&(De=new De(te,J+"enter",me,i,ce),De.target=se,De.relatedTarget=lt,he=De),lt=he,oe&&me)t:{for(De=r0,te=oe,J=me,se=0,he=te;he;he=De(he))se++;he=0;for(var we=J;we;we=De(we))he++;for(;0<se-he;)te=De(te),se--;for(;0<he-se;)J=De(J),he--;for(;se--;){if(te===J||J!==null&&te===J.alternate){De=te;break t}te=De(te),J=De(J)}De=null}else De=null;oe!==null&&M_(de,ne,oe,De,!1),me!==null&<!==null&&M_(de,lt,me,De,!0)}}e:{if(ne=re?un(re):window,oe=ne.nodeName&&ne.nodeName.toLowerCase(),oe==="select"||oe==="input"&&ne.type==="file")var Ye=qh;else if(Wh(ne))if(Gh)Ye=vm;else{Ye=fm;var Se=dm}else oe=ne.nodeName,!oe||oe.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?re&&ul(re.elementType)&&(Ye=qh):Ye=_m;if(Ye&&(Ye=Ye(e,re))){Fh(de,Ye,i,ce);break e}Se&&Se(e,ne,re),e==="focusout"&&re&&ne.type==="number"&&re.memoizedProps.value!=null&&cl(ne,"number",ne.value)}switch(Se=re?un(re):window,e){case"focusin":(Wh(Se)||Se.contentEditable==="true")&&(Er=Se,xl=re,bn=null);break;case"focusout":bn=xl=Er=null;break;case"mousedown":El=!0;break;case"contextmenu":case"mouseup":case"dragend":El=!1,ed(de,i,ce);break;case"selectionchange":if(pm)break;case"keydown":case"keyup":ed(de,i,ce)}var Oe;if(Sl)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else xr?Ph(e,i)&&(Ie="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ie="onCompositionStart");Ie&&(zh&&i.locale!=="ko"&&(xr||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&xr&&(Oe=Oh()):(Ss=ce,vl="value"in Ss?Ss.value:Ss.textContent,xr=!0)),Se=_o(re,Ie),0<Se.length&&(Ie=new Hh(Ie,e,null,i,ce),de.push({event:Ie,listeners:Se}),Oe?Ie.data=Oe:(Oe=$h(i),Oe!==null&&(Ie.data=Oe)))),(Oe=om?lm(e,i):cm(e,i))&&(Ie=_o(re,"onBeforeInput"),0<Ie.length&&(Se=new Hh("onBeforeInput","beforeinput",null,i,ce),de.push({event:Se,listeners:Ie}),Se.data=Oe)),e0(de,e,re,i,ce)}L_(de,t)})}function Fn(e,t,i){return{instance:e,listener:t,currentTarget:i}}function _o(e,t){for(var i=t+"Capture",s=[];e!==null;){var v=e,y=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||y===null||(v=hn(e,i),v!=null&&s.unshift(Fn(e,v,y)),v=hn(e,t),v!=null&&s.push(Fn(e,v,y))),e.tag===3)return s;e=e.return}return[]}function r0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function M_(e,t,i,s,v){for(var y=t._reactName,T=[];i!==null&&i!==s;){var $=i,Q=$.alternate,re=$.stateNode;if($=$.tag,Q!==null&&Q===s)break;$!==5&&$!==26&&$!==27||re===null||(Q=re,v?(re=hn(i,y),re!=null&&T.unshift(Fn(i,re,Q))):v||(re=hn(i,y),re!=null&&T.push(Fn(i,re,Q)))),i=i.return}T.length!==0&&e.push({event:t,listeners:T})}var n0=/\r\n?/g,a0=/\u0000|\uFFFD/g;function A_(e){return(typeof e=="string"?e:""+e).replace(n0,`
|
|
49
|
+
`).replace(a0,"")}function T_(e,t){return t=A_(t),A_(e)===t}function ot(e,t,i,s,v,y){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||yr(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&yr(e,""+s);break;case"className":pa(e,"class",s);break;case"tabIndex":pa(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":pa(e,i,s);break;case"style":Ah(e,s,y);break;case"data":if(t!=="object"){pa(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=ba(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(i==="formAction"?(t!=="input"&&ot(e,t,"name",v.name,v,null),ot(e,t,"formEncType",v.formEncType,v,null),ot(e,t,"formMethod",v.formMethod,v,null),ot(e,t,"formTarget",v.formTarget,v,null)):(ot(e,t,"encType",v.encType,v,null),ot(e,t,"method",v.method,v,null),ot(e,t,"target",v.target,v,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=ba(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=es);break;case"onScroll":s!=null&&je("scroll",e);break;case"onScrollEnd":s!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(x(61));if(i=s.__html,i!=null){if(v.children!=null)throw Error(x(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=ba(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":je("beforetoggle",e),je("toggle",e),ga(e,"popover",s);break;case"xlinkActuate":Ji(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ji(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ji(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ji(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ji(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ji(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ji(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ji(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ji(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":ga(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=kp.get(i)||i,ga(e,i,s))}}function Kc(e,t,i,s,v,y){switch(i){case"style":Ah(e,s,y);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(x(61));if(i=s.__html,i!=null){if(v.children!=null)throw Error(x(60));e.innerHTML=i}}break;case"children":typeof s=="string"?yr(e,s):(typeof s=="number"||typeof s=="bigint")&&yr(e,""+s);break;case"onScroll":s!=null&&je("scroll",e);break;case"onScrollEnd":s!=null&&je("scrollend",e);break;case"onClick":s!=null&&(e.onclick=es);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(v=i.endsWith("Capture"),t=i.slice(2,v?i.length-7:void 0),y=e[si]||null,y=y!=null?y[i]:null,typeof y=="function"&&e.removeEventListener(t,y,v),typeof s=="function")){typeof y!="function"&&y!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,v);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):ga(e,i,s)}}}function Vt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var s=!1,v=!1,y;for(y in i)if(i.hasOwnProperty(y)){var T=i[y];if(T!=null)switch(y){case"src":s=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(x(137,t));default:ot(e,t,y,T,i,null)}}v&&ot(e,t,"srcSet",i.srcSet,i,null),s&&ot(e,t,"src",i.src,i,null);return;case"input":je("invalid",e);var $=y=T=v=null,Q=null,re=null;for(s in i)if(i.hasOwnProperty(s)){var ce=i[s];if(ce!=null)switch(s){case"name":v=ce;break;case"type":T=ce;break;case"checked":Q=ce;break;case"defaultChecked":re=ce;break;case"value":y=ce;break;case"defaultValue":$=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(x(137,t));break;default:ot(e,t,s,ce,i,null)}}Dh(e,y,$,Q,re,T,v,!1);return;case"select":je("invalid",e),s=T=y=null;for(v in i)if(i.hasOwnProperty(v)&&($=i[v],$!=null))switch(v){case"value":y=$;break;case"defaultValue":T=$;break;case"multiple":s=$;default:ot(e,t,v,$,i,null)}t=y,i=T,e.multiple=!!s,t!=null?Sr(e,!!s,t,!1):i!=null&&Sr(e,!!s,i,!0);return;case"textarea":je("invalid",e),y=v=s=null;for(T in i)if(i.hasOwnProperty(T)&&($=i[T],$!=null))switch(T){case"value":s=$;break;case"defaultValue":v=$;break;case"children":y=$;break;case"dangerouslySetInnerHTML":if($!=null)throw Error(x(91));break;default:ot(e,t,T,$,i,null)}Rh(e,s,v,y);return;case"option":for(Q in i)if(i.hasOwnProperty(Q)&&(s=i[Q],s!=null))switch(Q){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ot(e,t,Q,s,i,null)}return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(s=0;s<Wn.length;s++)je(Wn[s],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("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(re in i)if(i.hasOwnProperty(re)&&(s=i[re],s!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(x(137,t));default:ot(e,t,re,s,i,null)}return;default:if(ul(t)){for(ce in i)i.hasOwnProperty(ce)&&(s=i[ce],s!==void 0&&Kc(e,t,ce,s,i,void 0));return}}for($ in i)i.hasOwnProperty($)&&(s=i[$],s!=null&&ot(e,t,$,s,i,null))}function o0(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,y=null,T=null,$=null,Q=null,re=null,ce=null;for(oe in i){var de=i[oe];if(i.hasOwnProperty(oe)&&de!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":Q=de;default:s.hasOwnProperty(oe)||ot(e,t,oe,null,s,de)}}for(var ne in s){var oe=s[ne];if(de=i[ne],s.hasOwnProperty(ne)&&(oe!=null||de!=null))switch(ne){case"type":y=oe;break;case"name":v=oe;break;case"checked":re=oe;break;case"defaultChecked":ce=oe;break;case"value":T=oe;break;case"defaultValue":$=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(x(137,t));break;default:oe!==de&&ot(e,t,ne,oe,s,de)}}ll(e,T,$,Q,re,ce,y,v);return;case"select":oe=T=$=ne=null;for(y in i)if(Q=i[y],i.hasOwnProperty(y)&&Q!=null)switch(y){case"value":break;case"multiple":oe=Q;default:s.hasOwnProperty(y)||ot(e,t,y,null,s,Q)}for(v in s)if(y=s[v],Q=i[v],s.hasOwnProperty(v)&&(y!=null||Q!=null))switch(v){case"value":ne=y;break;case"defaultValue":$=y;break;case"multiple":T=y;default:y!==Q&&ot(e,t,v,y,s,Q)}t=$,i=T,s=oe,ne!=null?Sr(e,!!i,ne,!1):!!s!=!!i&&(t!=null?Sr(e,!!i,t,!0):Sr(e,!!i,i?[]:"",!1));return;case"textarea":oe=ne=null;for($ in i)if(v=i[$],i.hasOwnProperty($)&&v!=null&&!s.hasOwnProperty($))switch($){case"value":break;case"children":break;default:ot(e,t,$,null,s,v)}for(T in s)if(v=s[T],y=i[T],s.hasOwnProperty(T)&&(v!=null||y!=null))switch(T){case"value":ne=v;break;case"defaultValue":oe=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(x(91));break;default:v!==y&&ot(e,t,T,v,s,y)}Lh(e,ne,oe);return;case"option":for(var me in i)if(ne=i[me],i.hasOwnProperty(me)&&ne!=null&&!s.hasOwnProperty(me))switch(me){case"selected":e.selected=!1;break;default:ot(e,t,me,null,s,ne)}for(Q in s)if(ne=s[Q],oe=i[Q],s.hasOwnProperty(Q)&&ne!==oe&&(ne!=null||oe!=null))switch(Q){case"selected":e.selected=ne&&typeof ne!="function"&&typeof ne!="symbol";break;default:ot(e,t,Q,ne,s,oe)}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 De in i)ne=i[De],i.hasOwnProperty(De)&&ne!=null&&!s.hasOwnProperty(De)&&ot(e,t,De,null,s,ne);for(re in s)if(ne=s[re],oe=i[re],s.hasOwnProperty(re)&&ne!==oe&&(ne!=null||oe!=null))switch(re){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(x(137,t));break;default:ot(e,t,re,ne,s,oe)}return;default:if(ul(t)){for(var lt in i)ne=i[lt],i.hasOwnProperty(lt)&&ne!==void 0&&!s.hasOwnProperty(lt)&&Kc(e,t,lt,void 0,s,ne);for(ce in s)ne=s[ce],oe=i[ce],!s.hasOwnProperty(ce)||ne===oe||ne===void 0&&oe===void 0||Kc(e,t,ce,ne,s,oe);return}}for(var te in i)ne=i[te],i.hasOwnProperty(te)&&ne!=null&&!s.hasOwnProperty(te)&&ot(e,t,te,null,s,ne);for(de in s)ne=s[de],oe=i[de],!s.hasOwnProperty(de)||ne===oe||ne==null&&oe==null||ot(e,t,de,ne,s,oe)}function B_(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function l0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var v=i[s],y=v.transferSize,T=v.initiatorType,$=v.duration;if(y&&$&&B_(T)){for(T=0,$=v.responseEnd,s+=1;s<i.length;s++){var Q=i[s],re=Q.startTime;if(re>$)break;var ce=Q.transferSize,de=Q.initiatorType;ce&&B_(de)&&(Q=Q.responseEnd,T+=ce*(Q<$?1:($-re)/(Q-re)))}if(--s,t+=8*(y+T)/(v.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 Zc=null,Qc=null;function vo(e){return e.nodeType===9?e:e.ownerDocument}function O_(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 k_(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 Jc(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 eu=null;function c0(){var e=window.event;return e&&e.type==="popstate"?e===eu?!1:(eu=e,!0):(eu=null,!1)}var N_=typeof setTimeout=="function"?setTimeout:void 0,u0=typeof clearTimeout=="function"?clearTimeout:void 0,H_=typeof Promise=="function"?Promise:void 0,h0=typeof queueMicrotask=="function"?queueMicrotask:typeof H_<"u"?function(e){return H_.resolve(null).then(e).catch(d0)}:N_;function d0(e){setTimeout(function(){throw e})}function js(e){return e==="head"}function j_(e,t){var i=t,s=0;do{var v=i.nextSibling;if(e.removeChild(i),v&&v.nodeType===8)if(i=v.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(v),Qr(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")qn(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,qn(i);for(var y=i.firstChild;y;){var T=y.nextSibling,$=y.nodeName;y[cn]||$==="SCRIPT"||$==="STYLE"||$==="LINK"&&y.rel.toLowerCase()==="stylesheet"||i.removeChild(y),y=T}}else i==="body"&&qn(e.ownerDocument.body);i=v}while(i);Qr(t)}function z_(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function tu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":tu(i),al(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function f0(e,t,i,s){for(;e.nodeType===1;){var v=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[cn])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!==v.rel||e.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||e.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||e.getAttribute("title")!==(v.title==null?null:v.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(y=e.getAttribute("src"),(y!==(v.src==null?null:v.src)||e.getAttribute("type")!==(v.type==null?null:v.type)||e.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&y&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var y=v.name==null?null:""+v.name;if(v.type==="hidden"&&e.getAttribute("name")===y)return e}else return e;if(e=Bi(e.nextSibling),e===null)break}return null}function _0(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Bi(e.nextSibling),e===null))return null;return e}function I_(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Bi(e.nextSibling),e===null))return null;return e}function iu(e){return e.data==="$?"||e.data==="$~"}function su(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function v0(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Bi(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 ru=null;function U_(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Bi(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function P_(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function $_(e,t,i){switch(t=vo(i),e){case"html":if(e=t.documentElement,!e)throw Error(x(452));return e;case"head":if(e=t.head,!e)throw Error(x(453));return e;case"body":if(e=t.body,!e)throw Error(x(454));return e;default:throw Error(x(451))}}function qn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);al(e)}var Oi=new Map,W_=new Set;function go(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var gs=G.d;G.d={f:g0,r:p0,D:m0,C:b0,L:S0,m:y0,X:w0,S:C0,M:x0};function g0(){var e=gs.f(),t=ao();return e||t}function p0(e){var t=pr(e);t!==null&&t.tag===5&&t.type==="form"?af(t):gs.r(e)}var Vr=typeof document>"u"?null:document;function F_(e,t,i){var s=Vr;if(s&&typeof t=="string"&&t){var v=Ei(t);v='link[rel="'+e+'"][href="'+v+'"]',typeof i=="string"&&(v+='[crossorigin="'+i+'"]'),W_.has(v)||(W_.add(v),e={rel:e,crossOrigin:i,href:t},s.querySelector(v)===null&&(t=s.createElement("link"),Vt(t,"link",e),Ut(t),s.head.appendChild(t)))}}function m0(e){gs.D(e),F_("dns-prefetch",e,null)}function b0(e,t){gs.C(e,t),F_("preconnect",e,t)}function S0(e,t,i){gs.L(e,t,i);var s=Vr;if(s&&e&&t){var v='link[rel="preload"][as="'+Ei(t)+'"]';t==="image"&&i&&i.imageSrcSet?(v+='[imagesrcset="'+Ei(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(v+='[imagesizes="'+Ei(i.imageSizes)+'"]')):v+='[href="'+Ei(e)+'"]';var y=v;switch(t){case"style":y=Kr(e);break;case"script":y=Zr(e)}Oi.has(y)||(e=l({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Oi.set(y,e),s.querySelector(v)!==null||t==="style"&&s.querySelector(Gn(y))||t==="script"&&s.querySelector(Yn(y))||(t=s.createElement("link"),Vt(t,"link",e),Ut(t),s.head.appendChild(t)))}}function y0(e,t){gs.m(e,t);var i=Vr;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",v='link[rel="modulepreload"][as="'+Ei(s)+'"][href="'+Ei(e)+'"]',y=v;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Zr(e)}if(!Oi.has(y)&&(e=l({rel:"modulepreload",href:e},t),Oi.set(y,e),i.querySelector(v)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Yn(y)))return}s=i.createElement("link"),Vt(s,"link",e),Ut(s),i.head.appendChild(s)}}}function C0(e,t,i){gs.S(e,t,i);var s=Vr;if(s&&e){var v=mr(s).hoistableStyles,y=Kr(e);t=t||"default";var T=v.get(y);if(!T){var $={loading:0,preload:null};if(T=s.querySelector(Gn(y)))$.loading=5;else{e=l({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Oi.get(y))&&nu(e,i);var Q=T=s.createElement("link");Ut(Q),Vt(Q,"link",e),Q._p=new Promise(function(re,ce){Q.onload=re,Q.onerror=ce}),Q.addEventListener("load",function(){$.loading|=1}),Q.addEventListener("error",function(){$.loading|=2}),$.loading|=4,po(T,t,s)}T={type:"stylesheet",instance:T,count:1,state:$},v.set(y,T)}}}function w0(e,t){gs.X(e,t);var i=Vr;if(i&&e){var s=mr(i).hoistableScripts,v=Zr(e),y=s.get(v);y||(y=i.querySelector(Yn(v)),y||(e=l({src:e,async:!0},t),(t=Oi.get(v))&&au(e,t),y=i.createElement("script"),Ut(y),Vt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},s.set(v,y))}}function x0(e,t){gs.M(e,t);var i=Vr;if(i&&e){var s=mr(i).hoistableScripts,v=Zr(e),y=s.get(v);y||(y=i.querySelector(Yn(v)),y||(e=l({src:e,async:!0,type:"module"},t),(t=Oi.get(v))&&au(e,t),y=i.createElement("script"),Ut(y),Vt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},s.set(v,y))}}function q_(e,t,i,s){var v=(v=ue.current)?go(v):null;if(!v)throw Error(x(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Kr(i.href),i=mr(v).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Kr(i.href);var y=mr(v).hoistableStyles,T=y.get(e);if(T||(v=v.ownerDocument||v,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(e,T),(y=v.querySelector(Gn(e)))&&!y._p&&(T.instance=y,T.state.loading=5),Oi.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Oi.set(e,i),y||E0(v,e,i,T.state))),t&&s===null)throw Error(x(528,""));return T}if(t&&s!==null)throw Error(x(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zr(i),i=mr(v).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(x(444,e))}}function Kr(e){return'href="'+Ei(e)+'"'}function Gn(e){return'link[rel="stylesheet"]['+e+"]"}function G_(e){return l({},e,{"data-precedence":e.precedence,precedence:null})}function E0(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),Vt(t,"link",i),Ut(t),e.head.appendChild(t))}function Zr(e){return'[src="'+Ei(e)+'"]'}function Yn(e){return"script[async]"+e}function Y_(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ei(i.href)+'"]');if(s)return t.instance=s,Ut(s),s;var v=l({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Ut(s),Vt(s,"style",v),po(s,i.precedence,e),t.instance=s;case"stylesheet":v=Kr(i.href);var y=e.querySelector(Gn(v));if(y)return t.state.loading|=4,t.instance=y,Ut(y),y;s=G_(i),(v=Oi.get(v))&&nu(s,v),y=(e.ownerDocument||e).createElement("link"),Ut(y);var T=y;return T._p=new Promise(function($,Q){T.onload=$,T.onerror=Q}),Vt(y,"link",s),t.state.loading|=4,po(y,i.precedence,e),t.instance=y;case"script":return y=Zr(i.src),(v=e.querySelector(Yn(y)))?(t.instance=v,Ut(v),v):(s=i,(v=Oi.get(y))&&(s=l({},i),au(s,v)),e=e.ownerDocument||e,v=e.createElement("script"),Ut(v),Vt(v,"link",s),e.head.appendChild(v),t.instance=v);case"void":return null;default:throw Error(x(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,po(s,i.precedence,e));return t.instance}function po(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=s.length?s[s.length-1]:null,y=v,T=0;T<s.length;T++){var $=s[T];if($.dataset.precedence===t)y=$;else if(y!==v)break}y?y.parentNode.insertBefore(e,y.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function nu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function au(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var mo=null;function X_(e,t,i){if(mo===null){var s=new Map,v=mo=new Map;v.set(i,s)}else v=mo,s=v.get(i),s||(s=new Map,v.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),v=0;v<i.length;v++){var y=i[v];if(!(y[cn]||y[qt]||e==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var T=y.getAttribute(t)||"";T=e+T;var $=s.get(T);$?$.push(y):s.set(T,[y])}}return s}function V_(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function D0(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function K_(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function L0(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var v=Kr(s.href),y=t.querySelector(Gn(v));if(y){t=y._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=bo.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=y,Ut(y);return}y=t.ownerDocument||t,s=G_(s),(v=Oi.get(v))&&nu(s,v),y=y.createElement("link"),Ut(y);var T=y;T._p=new Promise(function($,Q){T.onload=$,T.onerror=Q}),Vt(y,"link",s),i.instance=y}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=bo.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var ou=0;function R0(e,t){return e.stylesheets&&e.count===0&&yo(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&yo(e,e.stylesheets),e.unsuspend){var y=e.unsuspend;e.unsuspend=null,y()}},6e4+t);0<e.imgBytes&&ou===0&&(ou=62500*l0());var v=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&yo(e,e.stylesheets),e.unsuspend)){var y=e.unsuspend;e.unsuspend=null,y()}},(e.imgBytes>ou?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(v)}}:null}function bo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var So=null;function yo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,So=new Map,t.forEach(M0,e),So=null,bo.call(e))}function M0(e,t){if(!(t.state.loading&4)){var i=So.get(e);if(i)var s=i.get(null);else{i=new Map,So.set(e,i);for(var v=e.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<v.length;y++){var T=v[y];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(i.set(T.dataset.precedence,T),s=T)}s&&i.set(null,s)}v=t.instance,T=v.getAttribute("data-precedence"),y=i.get(T)||s,y===s&&i.set(null,v),i.set(T,v),this.count++,s=bo.bind(this),v.addEventListener("load",s),v.addEventListener("error",s),y?y.parentNode.insertBefore(v,y.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(v,e.firstChild)),t.state.loading|=4}}var Xn={$$typeof:u,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function A0(e,t,i,s,v,y,T,$,Q){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=jt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jt(0),this.hiddenUpdates=jt(null),this.identifierPrefix=s,this.onUncaughtError=v,this.onCaughtError=y,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function Z_(e,t,i,s,v,y,T,$,Q,re,ce,de){return e=new A0(e,t,i,T,Q,re,ce,de,$),t=1,y===!0&&(t|=24),y=_i(3,null,null,t),e.current=y,y.stateNode=e,t=Ul(),t.refCount++,e.pooledCache=t,t.refCount++,y.memoizedState={element:s,isDehydrated:i,cache:t},Fl(y),e}function Q_(e){return e?(e=Rr,e):Rr}function J_(e,t,i,s,v,y){v=Q_(v),s.context===null?s.context=v:s.pendingContext=v,s=Ds(t),s.payload={element:i},y=y===void 0?null:y,y!==null&&(s.callback=y),i=Ls(e,s,t),i!==null&&(ci(i,e,t),Dn(i,e,t))}function ev(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function lu(e,t){ev(e,t),(e=e.alternate)&&ev(e,t)}function tv(e){if(e.tag===13||e.tag===31){var t=Qs(e,67108864);t!==null&&ci(t,e,67108864),lu(e,67108864)}}function iv(e){if(e.tag===13||e.tag===31){var t=bi();t=yi(t);var i=Qs(e,t);i!==null&&ci(i,e,t),lu(e,t)}}var Co=!0;function T0(e,t,i,s){var v=q.T;q.T=null;var y=G.p;try{G.p=2,cu(e,t,i,s)}finally{G.p=y,q.T=v}}function B0(e,t,i,s){var v=q.T;q.T=null;var y=G.p;try{G.p=8,cu(e,t,i,s)}finally{G.p=y,q.T=v}}function cu(e,t,i,s){if(Co){var v=uu(s);if(v===null)Vc(e,t,s,wo,i),rv(e,s);else if(k0(v,e,t,i,s))s.stopPropagation();else if(rv(e,s),t&4&&-1<O0.indexOf(e)){for(;v!==null;){var y=pr(v);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var T=dt(y.pendingLanes);if(T!==0){var $=y;for($.pendingLanes|=2,$.entangledLanes|=2;T;){var Q=1<<31-wt(T);$.entanglements[1]|=Q,T&=~Q}Vi(y),(Ke&6)===0&&(ro=xe()+500,$n(0))}}break;case 31:case 13:$=Qs(y,2),$!==null&&ci($,y,2),ao(),lu(y,2)}if(y=uu(s),y===null&&Vc(e,t,s,wo,i),y===v)break;v=y}v!==null&&s.stopPropagation()}else Vc(e,t,s,null,i)}}function uu(e){return e=dl(e),hu(e)}var wo=null;function hu(e){if(wo=null,e=gr(e),e!==null){var t=B(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=A(t),e!==null)return e;e=null}else if(i===31){if(e=n(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wo=e,null}function sv(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(nt()){case Ue:return 2;case Dt:return 8;case tt:case mt:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var du=!1,zs=null,Is=null,Us=null,Vn=new Map,Kn=new Map,Ps=[],O0="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 rv(e,t){switch(e){case"focusin":case"focusout":zs=null;break;case"dragenter":case"dragleave":Is=null;break;case"mouseover":case"mouseout":Us=null;break;case"pointerover":case"pointerout":Vn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kn.delete(t.pointerId)}}function Zn(e,t,i,s,v,y){return e===null||e.nativeEvent!==y?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:y,targetContainers:[v]},t!==null&&(t=pr(t),t!==null&&tv(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,v!==null&&t.indexOf(v)===-1&&t.push(v),e)}function k0(e,t,i,s,v){switch(t){case"focusin":return zs=Zn(zs,e,t,i,s,v),!0;case"dragenter":return Is=Zn(Is,e,t,i,s,v),!0;case"mouseover":return Us=Zn(Us,e,t,i,s,v),!0;case"pointerover":var y=v.pointerId;return Vn.set(y,Zn(Vn.get(y)||null,e,t,i,s,v)),!0;case"gotpointercapture":return y=v.pointerId,Kn.set(y,Zn(Kn.get(y)||null,e,t,i,s,v)),!0}return!1}function nv(e){var t=gr(e.target);if(t!==null){var i=B(t);if(i!==null){if(t=i.tag,t===13){if(t=A(i),t!==null){e.blockedOn=t,bs(e.priority,function(){iv(i)});return}}else if(t===31){if(t=n(i),t!==null){e.blockedOn=t,bs(e.priority,function(){iv(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=uu(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);hl=s,i.target.dispatchEvent(s),hl=null}else return t=pr(i),t!==null&&tv(t),e.blockedOn=i,!1;t.shift()}return!0}function av(e,t,i){xo(e)&&i.delete(t)}function N0(){du=!1,zs!==null&&xo(zs)&&(zs=null),Is!==null&&xo(Is)&&(Is=null),Us!==null&&xo(Us)&&(Us=null),Vn.forEach(av),Kn.forEach(av)}function Eo(e,t){e.blockedOn===t&&(e.blockedOn=null,du||(du=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,N0)))}var Do=null;function ov(e){Do!==e&&(Do=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Do===e&&(Do=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],v=e[t+2];if(typeof s!="function"){if(hu(s||i)===null)continue;break}var y=pr(i);y!==null&&(e.splice(t,3),t-=3,uc(y,{pending:!0,data:v,method:i.method,action:s},s,v))}}))}function Qr(e){function t(Q){return Eo(Q,e)}zs!==null&&Eo(zs,e),Is!==null&&Eo(Is,e),Us!==null&&Eo(Us,e),Vn.forEach(t),Kn.forEach(t);for(var i=0;i<Ps.length;i++){var s=Ps[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Ps.length&&(i=Ps[0],i.blockedOn===null);)nv(i),i.blockedOn===null&&Ps.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var v=i[s],y=i[s+1],T=v[si]||null;if(typeof y=="function")T||ov(i);else if(T){var $=null;if(y&&y.hasAttribute("formAction")){if(v=y,T=y[si]||null)$=T.formAction;else if(hu(v)!==null)continue}else $=T.action;typeof $=="function"?i[s+1]=$:(i.splice(s,3),s-=3),ov(i)}}}function lv(){function e(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(T){return v=T})},focusReset:"manual",scroll:"manual"})}function t(){v!==null&&(v(),v=null),s||setTimeout(i,20)}function i(){if(!s&&!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 s=!1,v=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),v!==null&&(v(),v=null)}}}function fu(e){this._internalRoot=e}Lo.prototype.render=fu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(x(409));var i=t.current,s=bi();J_(i,s,e,t,null,null)},Lo.prototype.unmount=fu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;J_(e.current,2,null,e,null,null),ao(),t[vr]=null}};function Lo(e){this._internalRoot=e}Lo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ci();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ps.length&&t!==0&&t<Ps[i].priority;i++);Ps.splice(i,0,e),i===0&&nv(e)}};var cv=f.version;if(cv!=="19.2.4")throw Error(x(527,cv,"19.2.4"));G.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(x(188)):(e=Object.keys(e).join(","),Error(x(268,e)));return e=d(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var H0={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ro=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ro.isDisabled&&Ro.supportsFiber)try{ei=Ro.inject(H0),Ct=Ro}catch{}}return Jn.createRoot=function(e,t){if(!M(e))throw Error(x(299));var i=!1,s="",v=gf,y=pf,T=mf;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(v=t.onUncaughtError),t.onCaughtError!==void 0&&(y=t.onCaughtError),t.onRecoverableError!==void 0&&(T=t.onRecoverableError)),t=Z_(e,1,!1,null,null,i,s,null,v,y,T,lv),e[vr]=t.current,Xc(e),new fu(t)},Jn.hydrateRoot=function(e,t,i){if(!M(e))throw Error(x(299));var s=!1,v="",y=gf,T=pf,$=mf,Q=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(v=i.identifierPrefix),i.onUncaughtError!==void 0&&(y=i.onUncaughtError),i.onCaughtError!==void 0&&(T=i.onCaughtError),i.onRecoverableError!==void 0&&($=i.onRecoverableError),i.formState!==void 0&&(Q=i.formState)),t=Z_(e,1,!0,t,i??null,s,v,Q,y,T,$,lv),t.context=Q_(null),i=t.current,s=bi(),s=yi(s),v=Ds(s),v.callback=null,Ls(i,v,s),i=s,t.current.lanes=i,et(t,i),Vi(t),e[vr]=t.current,Xc(e),new Lo(t)},Jn.version="19.2.4",Jn}var bv;function G0(){if(bv)return gu.exports;bv=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(f){console.error(f)}}return r(),gu.exports=q0(),gu.exports}var Y0=G0();const X0=eh(Y0);var hr=ug();const hg=eh(hr);function V0(r){if(typeof document>"u")return;let f=document.head||document.getElementsByTagName("head")[0],m=document.createElement("style");m.type="text/css",f.appendChild(m),m.styleSheet?m.styleSheet.cssText=r:m.appendChild(document.createTextNode(r))}const K0=r=>{switch(r){case"success":return J0;case"info":return t1;case"warning":return e1;case"error":return i1;default:return null}},Z0=Array(12).fill(0),Q0=({visible:r,className:f})=>fe.createElement("div",{className:["sonner-loading-wrapper",f].filter(Boolean).join(" "),"data-visible":r},fe.createElement("div",{className:"sonner-spinner"},Z0.map((m,x)=>fe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${x}`})))),J0=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),e1=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),t1=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),i1=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),s1=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},fe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),fe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),r1=()=>{const[r,f]=fe.useState(document.hidden);return fe.useEffect(()=>{const m=()=>{f(document.hidden)};return document.addEventListener("visibilitychange",m),()=>window.removeEventListener("visibilitychange",m)},[]),r};let Gu=1;class n1{constructor(){this.subscribe=f=>(this.subscribers.push(f),()=>{const m=this.subscribers.indexOf(f);this.subscribers.splice(m,1)}),this.publish=f=>{this.subscribers.forEach(m=>m(f))},this.addToast=f=>{this.publish(f),this.toasts=[...this.toasts,f]},this.create=f=>{var m;const{message:x,...M}=f,B=typeof(f==null?void 0:f.id)=="number"||((m=f.id)==null?void 0:m.length)>0?f.id:Gu++,A=this.toasts.find(h=>h.id===B),n=f.dismissible===void 0?!0:f.dismissible;return this.dismissedToasts.has(B)&&this.dismissedToasts.delete(B),A?this.toasts=this.toasts.map(h=>h.id===B?(this.publish({...h,...f,id:B,title:x}),{...h,...f,id:B,dismissible:n,title:x}):h):this.addToast({title:x,...M,dismissible:n,id:B}),B},this.dismiss=f=>(f?(this.dismissedToasts.add(f),requestAnimationFrame(()=>this.subscribers.forEach(m=>m({id:f,dismiss:!0})))):this.toasts.forEach(m=>{this.subscribers.forEach(x=>x({id:m.id,dismiss:!0}))}),f),this.message=(f,m)=>this.create({...m,message:f}),this.error=(f,m)=>this.create({...m,message:f,type:"error"}),this.success=(f,m)=>this.create({...m,type:"success",message:f}),this.info=(f,m)=>this.create({...m,type:"info",message:f}),this.warning=(f,m)=>this.create({...m,type:"warning",message:f}),this.loading=(f,m)=>this.create({...m,type:"loading",message:f}),this.promise=(f,m)=>{if(!m)return;let x;m.loading!==void 0&&(x=this.create({...m,promise:f,type:"loading",message:m.loading,description:typeof m.description!="function"?m.description:void 0}));const M=Promise.resolve(f instanceof Function?f():f);let B=x!==void 0,A;const n=M.then(async d=>{if(A=["resolve",d],fe.isValidElement(d))B=!1,this.create({id:x,type:"default",message:d});else if(o1(d)&&!d.ok){B=!1;const l=typeof m.error=="function"?await m.error(`HTTP error! status: ${d.status}`):m.error,g=typeof m.description=="function"?await m.description(`HTTP error! status: ${d.status}`):m.description,L=typeof l=="object"&&!fe.isValidElement(l)?l:{message:l};this.create({id:x,type:"error",description:g,...L})}else if(d instanceof Error){B=!1;const l=typeof m.error=="function"?await m.error(d):m.error,g=typeof m.description=="function"?await m.description(d):m.description,L=typeof l=="object"&&!fe.isValidElement(l)?l:{message:l};this.create({id:x,type:"error",description:g,...L})}else if(m.success!==void 0){B=!1;const l=typeof m.success=="function"?await m.success(d):m.success,g=typeof m.description=="function"?await m.description(d):m.description,L=typeof l=="object"&&!fe.isValidElement(l)?l:{message:l};this.create({id:x,type:"success",description:g,...L})}}).catch(async d=>{if(A=["reject",d],m.error!==void 0){B=!1;const p=typeof m.error=="function"?await m.error(d):m.error,l=typeof m.description=="function"?await m.description(d):m.description,C=typeof p=="object"&&!fe.isValidElement(p)?p:{message:p};this.create({id:x,type:"error",description:l,...C})}}).finally(()=>{B&&(this.dismiss(x),x=void 0),m.finally==null||m.finally.call(m)}),h=()=>new Promise((d,p)=>n.then(()=>A[0]==="reject"?p(A[1]):d(A[1])).catch(p));return typeof x!="string"&&typeof x!="number"?{unwrap:h}:Object.assign(x,{unwrap:h})},this.custom=(f,m)=>{const x=(m==null?void 0:m.id)||Gu++;return this.create({jsx:f(x),id:x,...m}),x},this.getActiveToasts=()=>this.toasts.filter(f=>!this.dismissedToasts.has(f.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ui=new n1,a1=(r,f)=>{const m=(f==null?void 0:f.id)||Gu++;return ui.addToast({title:r,...f,id:m}),m},o1=r=>r&&typeof r=="object"&&"ok"in r&&typeof r.ok=="boolean"&&"status"in r&&typeof r.status=="number",l1=a1,c1=()=>ui.toasts,u1=()=>ui.getActiveToasts(),Qe=Object.assign(l1,{success:ui.success,info:ui.info,warning:ui.warning,error:ui.error,custom:ui.custom,message:ui.message,promise:ui.promise,dismiss:ui.dismiss,loading:ui.loading},{getHistory:c1,getToasts:u1});V0("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Mo(r){return r.label!==void 0}const h1=3,d1="24px",f1="16px",Sv=4e3,_1=356,v1=14,g1=45,p1=200;function Ki(...r){return r.filter(Boolean).join(" ")}function m1(r){const[f,m]=r.split("-"),x=[];return f&&x.push(f),m&&x.push(m),x}const b1=r=>{var f,m,x,M,B,A,n,h,d;const{invert:p,toast:l,unstyled:g,interacting:C,setHeights:L,visibleToasts:_,heights:a,index:c,toasts:o,expanded:u,removeToast:S,defaultRichColors:D,closeButton:b,style:E,cancelButtonStyle:w,actionButtonStyle:R,className:N="",descriptionClassName:z="",duration:I,position:U,gap:Y,expandByDefault:X,classNames:q,icons:G,closeButtonAriaLabel:K="Close toast"}=r,[H,W]=fe.useState(null),[j,F]=fe.useState(null),[V,ee]=fe.useState(!1),[le,ue]=fe.useState(!1),[Z,P]=fe.useState(!1),[ae,ie]=fe.useState(!1),[ve,_e]=fe.useState(!1),[Ee,pe]=fe.useState(0),[ke,$e]=fe.useState(0),be=fe.useRef(l.duration||I||Sv),Ht=fe.useRef(null),pt=fe.useRef(null),Re=c===0,Me=c+1<=_,Ce=l.type,ge=l.dismissible!==!1,xe=l.className||"",nt=l.descriptionClassName||"",Ue=fe.useMemo(()=>a.findIndex(ye=>ye.toastId===l.id)||0,[a,l.id]),Dt=fe.useMemo(()=>{var ye;return(ye=l.closeButton)!=null?ye:b},[l.closeButton,b]),tt=fe.useMemo(()=>l.duration||I||Sv,[l.duration,I]),mt=fe.useRef(0),Fe=fe.useRef(0),Ne=fe.useRef(0),Le=fe.useRef(null),[ei,Ct]=U.split("-"),At=fe.useMemo(()=>a.reduce((ye,qe,Ve)=>Ve>=Ue?ye:ye+qe.height,0),[a,Ue]),wt=r1(),Fi=l.invert||p,qi=Ce==="loading";Fe.current=fe.useMemo(()=>Ue*Y+At,[Ue,At]),fe.useEffect(()=>{be.current=tt},[tt]),fe.useEffect(()=>{ee(!0)},[]),fe.useEffect(()=>{const ye=pt.current;if(ye){const qe=ye.getBoundingClientRect().height;return $e(qe),L(Ve=>[{toastId:l.id,height:qe,position:l.position},...Ve]),()=>L(Ve=>Ve.filter(Je=>Je.toastId!==l.id))}},[L,l.id]),fe.useLayoutEffect(()=>{if(!V)return;const ye=pt.current,qe=ye.style.height;ye.style.height="auto";const Ve=ye.getBoundingClientRect().height;ye.style.height=qe,$e(Ve),L(Je=>Je.find(et=>et.toastId===l.id)?Je.map(et=>et.toastId===l.id?{...et,height:Ve}:et):[{toastId:l.id,height:Ve,position:l.position},...Je])},[V,l.title,l.description,L,l.id,l.jsx,l.action,l.cancel]);const ii=fe.useCallback(()=>{ue(!0),pe(Fe.current),L(ye=>ye.filter(qe=>qe.toastId!==l.id)),setTimeout(()=>{S(l)},p1)},[l,S,L,Fe]);fe.useEffect(()=>{if(l.promise&&Ce==="loading"||l.duration===1/0||l.type==="loading")return;let ye;return u||C||wt?(()=>{if(Ne.current<mt.current){const Je=new Date().getTime()-mt.current;be.current=be.current-Je}Ne.current=new Date().getTime()})():(()=>{be.current!==1/0&&(mt.current=new Date().getTime(),ye=setTimeout(()=>{l.onAutoClose==null||l.onAutoClose.call(l,l),ii()},be.current))})(),()=>clearTimeout(ye)},[u,C,l,Ce,wt,ii]),fe.useEffect(()=>{l.delete&&(ii(),l.onDismiss==null||l.onDismiss.call(l,l))},[ii,l.delete]);function Si(){var ye;if(G!=null&&G.loading){var qe;return fe.createElement("div",{className:Ki(q==null?void 0:q.loader,l==null||(qe=l.classNames)==null?void 0:qe.loader,"sonner-loader"),"data-visible":Ce==="loading"},G.loading)}return fe.createElement(Q0,{className:Ki(q==null?void 0:q.loader,l==null||(ye=l.classNames)==null?void 0:ye.loader),visible:Ce==="loading"})}const Hi=l.icon||(G==null?void 0:G[Ce])||K0(Ce);var ut,dt;return fe.createElement("li",{tabIndex:0,ref:pt,className:Ki(N,xe,q==null?void 0:q.toast,l==null||(f=l.classNames)==null?void 0:f.toast,q==null?void 0:q.default,q==null?void 0:q[Ce],l==null||(m=l.classNames)==null?void 0:m[Ce]),"data-sonner-toast":"","data-rich-colors":(ut=l.richColors)!=null?ut:D,"data-styled":!(l.jsx||l.unstyled||g),"data-mounted":V,"data-promise":!!l.promise,"data-swiped":ve,"data-removed":le,"data-visible":Me,"data-y-position":ei,"data-x-position":Ct,"data-index":c,"data-front":Re,"data-swiping":Z,"data-dismissible":ge,"data-type":Ce,"data-invert":Fi,"data-swipe-out":ae,"data-swipe-direction":j,"data-expanded":!!(u||X&&V),"data-testid":l.testId,style:{"--index":c,"--toasts-before":c,"--z-index":o.length-c,"--offset":`${le?Ee:Fe.current}px`,"--initial-height":X?"auto":`${ke}px`,...E,...l.style},onDragEnd:()=>{P(!1),W(null),Le.current=null},onPointerDown:ye=>{ye.button!==2&&(qi||!ge||(Ht.current=new Date,pe(Fe.current),ye.target.setPointerCapture(ye.pointerId),ye.target.tagName!=="BUTTON"&&(P(!0),Le.current={x:ye.clientX,y:ye.clientY})))},onPointerUp:()=>{var ye,qe,Ve;if(ae||!ge)return;Le.current=null;const Je=Number(((ye=pt.current)==null?void 0:ye.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),jt=Number(((qe=pt.current)==null?void 0:qe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((Ve=Ht.current)==null?void 0:Ve.getTime()),Ge=H==="x"?Je:jt,Zt=Math.abs(Ge)/et;if(Math.abs(Ge)>=g1||Zt>.11){pe(Fe.current),l.onDismiss==null||l.onDismiss.call(l,l),F(H==="x"?Je>0?"right":"left":jt>0?"down":"up"),ii(),ie(!0);return}else{var _t,bt;(_t=pt.current)==null||_t.style.setProperty("--swipe-amount-x","0px"),(bt=pt.current)==null||bt.style.setProperty("--swipe-amount-y","0px")}_e(!1),P(!1),W(null)},onPointerMove:ye=>{var qe,Ve,Je;if(!Le.current||!ge||((qe=window.getSelection())==null?void 0:qe.toString().length)>0)return;const et=ye.clientY-Le.current.y,Ge=ye.clientX-Le.current.x;var Zt;const _t=(Zt=r.swipeDirections)!=null?Zt:m1(U);!H&&(Math.abs(Ge)>1||Math.abs(et)>1)&&W(Math.abs(Ge)>Math.abs(et)?"x":"y");let bt={x:0,y:0};const yi=Ft=>1/(1.5+Math.abs(Ft)/20);if(H==="y"){if(_t.includes("top")||_t.includes("bottom"))if(_t.includes("top")&&et<0||_t.includes("bottom")&&et>0)bt.y=et;else{const Ft=et*yi(et);bt.y=Math.abs(Ft)<Math.abs(et)?Ft:et}}else if(H==="x"&&(_t.includes("left")||_t.includes("right")))if(_t.includes("left")&&Ge<0||_t.includes("right")&&Ge>0)bt.x=Ge;else{const Ft=Ge*yi(Ge);bt.x=Math.abs(Ft)<Math.abs(Ge)?Ft:Ge}(Math.abs(bt.x)>0||Math.abs(bt.y)>0)&&_e(!0),(Ve=pt.current)==null||Ve.style.setProperty("--swipe-amount-x",`${bt.x}px`),(Je=pt.current)==null||Je.style.setProperty("--swipe-amount-y",`${bt.y}px`)}},Dt&&!l.jsx&&Ce!=="loading"?fe.createElement("button",{"aria-label":K,"data-disabled":qi,"data-close-button":!0,onClick:qi||!ge?()=>{}:()=>{ii(),l.onDismiss==null||l.onDismiss.call(l,l)},className:Ki(q==null?void 0:q.closeButton,l==null||(x=l.classNames)==null?void 0:x.closeButton)},(dt=G==null?void 0:G.close)!=null?dt:s1):null,(Ce||l.icon||l.promise)&&l.icon!==null&&((G==null?void 0:G[Ce])!==null||l.icon)?fe.createElement("div",{"data-icon":"",className:Ki(q==null?void 0:q.icon,l==null||(M=l.classNames)==null?void 0:M.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||Si():null,l.type!=="loading"?Hi:null):null,fe.createElement("div",{"data-content":"",className:Ki(q==null?void 0:q.content,l==null||(B=l.classNames)==null?void 0:B.content)},fe.createElement("div",{"data-title":"",className:Ki(q==null?void 0:q.title,l==null||(A=l.classNames)==null?void 0:A.title)},l.jsx?l.jsx:typeof l.title=="function"?l.title():l.title),l.description?fe.createElement("div",{"data-description":"",className:Ki(z,nt,q==null?void 0:q.description,l==null||(n=l.classNames)==null?void 0:n.description)},typeof l.description=="function"?l.description():l.description):null),fe.isValidElement(l.cancel)?l.cancel:l.cancel&&Mo(l.cancel)?fe.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||w,onClick:ye=>{Mo(l.cancel)&&ge&&(l.cancel.onClick==null||l.cancel.onClick.call(l.cancel,ye),ii())},className:Ki(q==null?void 0:q.cancelButton,l==null||(h=l.classNames)==null?void 0:h.cancelButton)},l.cancel.label):null,fe.isValidElement(l.action)?l.action:l.action&&Mo(l.action)?fe.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||R,onClick:ye=>{Mo(l.action)&&(l.action.onClick==null||l.action.onClick.call(l.action,ye),!ye.defaultPrevented&&ii())},className:Ki(q==null?void 0:q.actionButton,l==null||(d=l.classNames)==null?void 0:d.actionButton)},l.action.label):null)};function yv(){if(typeof window>"u"||typeof document>"u")return"ltr";const r=document.documentElement.getAttribute("dir");return r==="auto"||!r?window.getComputedStyle(document.documentElement).direction:r}function S1(r,f){const m={};return[r,f].forEach((x,M)=>{const B=M===1,A=B?"--mobile-offset":"--offset",n=B?f1:d1;function h(d){["top","right","bottom","left"].forEach(p=>{m[`${A}-${p}`]=typeof d=="number"?`${d}px`:d})}typeof x=="number"||typeof x=="string"?h(x):typeof x=="object"?["top","right","bottom","left"].forEach(d=>{x[d]===void 0?m[`${A}-${d}`]=n:m[`${A}-${d}`]=typeof x[d]=="number"?`${x[d]}px`:x[d]}):h(n)}),m}const y1=fe.forwardRef(function(f,m){const{id:x,invert:M,position:B="bottom-right",hotkey:A=["altKey","KeyT"],expand:n,closeButton:h,className:d,offset:p,mobileOffset:l,theme:g="light",richColors:C,duration:L,style:_,visibleToasts:a=h1,toastOptions:c,dir:o=yv(),gap:u=v1,icons:S,containerAriaLabel:D="Notifications"}=f,[b,E]=fe.useState([]),w=fe.useMemo(()=>x?b.filter(V=>V.toasterId===x):b.filter(V=>!V.toasterId),[b,x]),R=fe.useMemo(()=>Array.from(new Set([B].concat(w.filter(V=>V.position).map(V=>V.position)))),[w,B]),[N,z]=fe.useState([]),[I,U]=fe.useState(!1),[Y,X]=fe.useState(!1),[q,G]=fe.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),K=fe.useRef(null),H=A.join("+").replace(/Key/g,"").replace(/Digit/g,""),W=fe.useRef(null),j=fe.useRef(!1),F=fe.useCallback(V=>{E(ee=>{var le;return(le=ee.find(ue=>ue.id===V.id))!=null&&le.delete||ui.dismiss(V.id),ee.filter(({id:ue})=>ue!==V.id)})},[]);return fe.useEffect(()=>ui.subscribe(V=>{if(V.dismiss){requestAnimationFrame(()=>{E(ee=>ee.map(le=>le.id===V.id?{...le,delete:!0}:le))});return}setTimeout(()=>{hg.flushSync(()=>{E(ee=>{const le=ee.findIndex(ue=>ue.id===V.id);return le!==-1?[...ee.slice(0,le),{...ee[le],...V},...ee.slice(le+1)]:[V,...ee]})})})}),[b]),fe.useEffect(()=>{if(g!=="system"){G(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?G("dark"):G("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:ee})=>{G(ee?"dark":"light")})}catch{V.addListener(({matches:le})=>{try{G(le?"dark":"light")}catch(ue){console.error(ue)}})}},[g]),fe.useEffect(()=>{b.length<=1&&U(!1)},[b]),fe.useEffect(()=>{const V=ee=>{var le;if(A.every(P=>ee[P]||ee.code===P)){var Z;U(!0),(Z=K.current)==null||Z.focus()}ee.code==="Escape"&&(document.activeElement===K.current||(le=K.current)!=null&&le.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[A]),fe.useEffect(()=>{if(K.current)return()=>{W.current&&(W.current.focus({preventScroll:!0}),W.current=null,j.current=!1)}},[K.current]),fe.createElement("section",{ref:m,"aria-label":`${D} ${H}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((V,ee)=>{var le;const[ue,Z]=V.split("-");return w.length?fe.createElement("ol",{key:V,dir:o==="auto"?yv():o,tabIndex:-1,ref:K,className:d,"data-sonner-toaster":!0,"data-sonner-theme":q,"data-y-position":ue,"data-x-position":Z,style:{"--front-toast-height":`${((le=N[0])==null?void 0:le.height)||0}px`,"--width":`${_1}px`,"--gap":`${u}px`,..._,...S1(p,l)},onBlur:P=>{j.current&&!P.currentTarget.contains(P.relatedTarget)&&(j.current=!1,W.current&&(W.current.focus({preventScroll:!0}),W.current=null))},onFocus:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||j.current||(j.current=!0,W.current=P.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{Y||U(!1)},onDragEnd:()=>U(!1),onPointerDown:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||X(!0)},onPointerUp:()=>X(!1)},w.filter(P=>!P.position&&ee===0||P.position===V).map((P,ae)=>{var ie,ve;return fe.createElement(b1,{key:P.id,icons:S,index:ae,toast:P,defaultRichColors:C,duration:(ie=c==null?void 0:c.duration)!=null?ie:L,className:c==null?void 0:c.className,descriptionClassName:c==null?void 0:c.descriptionClassName,invert:M,visibleToasts:a,closeButton:(ve=c==null?void 0:c.closeButton)!=null?ve:h,interacting:Y,position:V,style:c==null?void 0:c.style,unstyled:c==null?void 0:c.unstyled,classNames:c==null?void 0:c.classNames,cancelButtonStyle:c==null?void 0:c.cancelButtonStyle,actionButtonStyle:c==null?void 0:c.actionButtonStyle,closeButtonAriaLabel:c==null?void 0:c.closeButtonAriaLabel,removeToast:F,toasts:w.filter(_e=>_e.position==P.position),heights:N.filter(_e=>_e.position==P.position),setHeights:z,expandByDefault:n,gap:u,expanded:I,swipeDirections:f.swipeDirections})})):null}))}),Ni="";async function da(r){if(!r.ok){const f=await r.text().catch(()=>r.statusText);throw new Error(f||`HTTP ${r.status}`)}return r.json()}async function zo(){const r=await fetch(`${Ni}/api/sessions`,{credentials:"same-origin"});return da(r)}async function C1(r){const f=await fetch(`${Ni}/api/sessions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r),credentials:"same-origin"});return da(f)}async function nn(r){const f=await fetch(`${Ni}/api/sessions/${r}`,{method:"DELETE",credentials:"same-origin"});if(!f.ok){const m=await f.text().catch(()=>f.statusText);throw new Error(m||`HTTP ${f.status}`)}}async function w1(r,f){const m=await fetch(`${Ni}/api/sessions/${r}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:f}),credentials:"same-origin"});if(!m.ok){const x=await m.text().catch(()=>m.statusText);throw new Error(x||`HTTP ${m.status}`)}}async function x1(){const r=await fetch(`${Ni}/api/shells`,{credentials:"same-origin"}),f=await da(r);return{shells:f.shells,defaultShell:f.default,cwd:f.cwd}}async function E1(r){const f=r.endsWith("/")||r.endsWith("\\")?r:r+"/",m=await fetch(`${Ni}/api/dirs?q=${encodeURIComponent(f)}`,{credentials:"same-origin"});return da(m)}function dg(r,f,m,x){return new Promise((M,B)=>{const A=new XMLHttpRequest;A.open("POST",r);for(const[n,h]of Object.entries(m))A.setRequestHeader(n,h);A.withCredentials=!0,x&&(A.upload.onprogress=n=>{n.lengthComputable&&x(Math.round(n.loaded/n.total*100))}),A.onload=()=>{if(A.status>=200&&A.status<300)try{M(JSON.parse(A.responseText))}catch{B(new Error("Invalid response"))}else try{const n=JSON.parse(A.responseText);B(new Error(n.error||`Upload failed (${A.status})`))}catch{B(new Error(`Upload failed (${A.status})`))}},A.onerror=()=>B(new Error("Network error")),A.send(f)})}function D1(r,f,m,x){const M={"Content-Type":"application/octet-stream","X-Filename":f.name};return m&&(M["X-Target-Dir"]=m),dg(`${Ni}/api/sessions/${r}/upload`,f,M,x)}function fg(r,f,m){return dg(`${Ni}/api/upload`,r,{"Content-Type":f},m)}async function L1(){try{const r=await fetch(`${Ni}/api/sessions`,{credentials:"same-origin"});return r.status===401?{authenticated:!1}:r.status===429?{authenticated:!1}:{authenticated:!0}}catch{return{authenticated:!1}}}async function R1(r){const f=await fetch(`${Ni}/api/auth`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:r}),credentials:"same-origin"});if(f.status===429)throw new Error("Too many attempts. Try again later.");return da(f)}async function M1(){}async function ih(r=!1){try{const f=await fetch(`${Ni}/api/update-check${r?"?force=true":""}`,{credentials:"same-origin"});return f.ok?f.json():null}catch{return null}}async function sh(){try{const r=await ih();if(r!=null&&r.current)return r.current}catch{}return""}function A1(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function _g(){return fetch(`${Ni}/api/share-token`,{credentials:"same-origin"}).then(r=>r.ok?r.json():null).then(r=>{if(!(r!=null&&r.url))return window.location.href;try{const f=new URL(r.url);return`${window.location.origin}${f.pathname}${f.search}`}catch{return r.url}}).catch(()=>window.location.href)}function T1(){const[r,f]=k.useState(null),[m,x]=k.useState(!1);k.useEffect(()=>{let A=!1;async function n(){const h=new URLSearchParams(window.location.search),d=h.get("ott");if(d){h.delete("ott");const p=h.toString(),l=window.location.pathname+(p?`?${p}`:"")+window.location.hash;window.history.replaceState(null,"",l);try{const g=await fetch("/api/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:d})});if(!A&&g.ok&&(await g.json()).ok){f(!0);return}}catch{}}try{const{authenticated:p}=await L1();A||f(p)}catch{A||f(!1)}}return n(),()=>{A=!0}},[]);const M=k.useCallback(async A=>{x(!0);try{const{ok:n}=await R1(A);return f(n),n}catch(n){throw n}finally{x(!1)}},[]),B=k.useCallback(async()=>{await M1(),f(!1)},[]);return{authenticated:r,login:M,logout:B,loading:m}}const B1="_backdrop_barei_1",O1="_card_barei_10",k1="_logo_barei_24",N1="_logoIcon_barei_34",H1="_form_barei_38",j1="_input_barei_45",z1="_button_barei_62",I1="_error_barei_90",Ws={backdrop:B1,card:O1,logo:k1,logoIcon:N1,form:H1,input:j1,button:z1,error:I1};function U1({onLogin:r,loading:f}){const[m,x]=k.useState(""),[M,B]=k.useState("");async function A(n){if(n.preventDefault(),B(""),!!m.trim())try{await r(m)||B("Incorrect password")}catch(h){const d=h instanceof Error?h.message:String(h);d.includes("429")||d.toLowerCase().includes("too many")?B("Too many attempts. Please wait and try again."):B("Login failed. Please try again.")}}return O.jsx("div",{className:Ws.backdrop,children:O.jsxs("div",{className:Ws.card,children:[O.jsxs("div",{className:Ws.logo,children:[O.jsx("span",{className:Ws.logoIcon,children:"📡"}),"TermBeam"]}),O.jsxs("form",{className:Ws.form,onSubmit:A,children:[O.jsx("input",{className:Ws.input,type:"password",placeholder:"Password",value:m,onChange:n=>x(n.target.value),autoFocus:!0,autoComplete:"current-password"}),O.jsx("button",{className:Ws.button,type:"submit",disabled:f||!m.trim(),children:f?"Unlocking…":"Unlock"})]}),M&&O.jsx("p",{className:Ws.error,children:M})]})})}const Cv=r=>{let f;const m=new Set,x=(d,p)=>{const l=typeof d=="function"?d(f):d;if(!Object.is(l,f)){const g=f;f=p??(typeof l!="object"||l===null)?l:Object.assign({},f,l),m.forEach(C=>C(f,g))}},M=()=>f,n={setState:x,getState:M,getInitialState:()=>h,subscribe:d=>(m.add(d),()=>m.delete(d))},h=f=r(x,M,n);return n},P1=(r=>r?Cv(r):Cv),$1=r=>r;function W1(r,f=$1){const m=fe.useSyncExternalStore(r.subscribe,fe.useCallback(()=>f(r.getState()),[r,f]),fe.useCallback(()=>f(r.getInitialState()),[r,f]));return fe.useDebugValue(m),m}const wv=r=>{const f=P1(r),m=x=>W1(f,x);return Object.assign(m,f),m},rh=(r=>r?wv(r):wv),vg="termbeam-font-size",gg=2,pg=32,F1=14;function q1(){try{const r=localStorage.getItem(vg);if(r){const f=Number(r);if(!Number.isNaN(f)&&f>=gg&&f<=pg)return f}}catch{}return F1}const We=rh(r=>({commandPaletteOpen:!1,searchBarOpen:!1,sidePanelOpen:!1,newSessionModalOpen:!1,uploadModalOpen:!1,previewModalOpen:!1,selectModeActive:!1,copyOverlayOpen:!1,fontSize:q1(),openCommandPalette:()=>r({commandPaletteOpen:!0}),closeCommandPalette:()=>r({commandPaletteOpen:!1}),toggleCommandPalette:()=>r(f=>({commandPaletteOpen:!f.commandPaletteOpen})),openSearchBar:()=>r({searchBarOpen:!0}),closeSearchBar:()=>r({searchBarOpen:!1}),openSidePanel:()=>r({sidePanelOpen:!0}),closeSidePanel:()=>r({sidePanelOpen:!1}),openNewSessionModal:()=>r({newSessionModalOpen:!0}),closeNewSessionModal:()=>r({newSessionModalOpen:!1}),openUploadModal:()=>r({uploadModalOpen:!0}),closeUploadModal:()=>r({uploadModalOpen:!1}),openPreviewModal:()=>r({previewModalOpen:!0}),closePreviewModal:()=>r({previewModalOpen:!1}),setSelectMode:f=>r({selectModeActive:f}),openCopyOverlay:()=>r({copyOverlayOpen:!0}),closeCopyOverlay:()=>r({copyOverlayOpen:!1}),setFontSize:f=>{const m=Math.max(gg,Math.min(pg,Math.round(f)));try{localStorage.setItem(vg,String(m))}catch{}r({fontSize:m})}})),xv={dark:{background:"#1e1e1e",foreground:"#d4d4d4",cursor:"#aeafad",cursorAccent:"#1e1e1e",selectionBackground:"rgba(38, 79, 120, 0.5)",black:"#000000",red:"#cd3131",green:"#0dbc79",yellow:"#e5e510",blue:"#2472c8",magenta:"#bc3fbc",cyan:"#11a8cd",white:"#e5e5e5",brightBlack:"#666666",brightRed:"#f14c4c",brightGreen:"#23d18b",brightYellow:"#f5f543",brightBlue:"#3b8eea",brightMagenta:"#d670d6",brightCyan:"#29b8db",brightWhite:"#e5e5e5"},light:{background:"#ffffff",foreground:"#1e1e1e",cursor:"#000000",cursorAccent:"#ffffff",selectionBackground:"rgba(0, 120, 215, 0.3)",black:"#000000",red:"#cd3131",green:"#00bc7c",yellow:"#949800",blue:"#0451a5",magenta:"#bc05bc",cyan:"#0598bc",white:"#555555",brightBlack:"#666666",brightRed:"#cd3131",brightGreen:"#14ce14",brightYellow:"#b5ba00",brightBlue:"#0451a5",brightMagenta:"#bc05bc",brightCyan:"#0598bc",brightWhite:"#a5a5a5"},monokai:{background:"#272822",foreground:"#f8f8f2",cursor:"#f8f8f0",cursorAccent:"#272822",selectionBackground:"rgba(166, 226, 46, 0.3)",black:"#272822",red:"#f92672",green:"#a6e22e",yellow:"#f4bf75",blue:"#66d9e8",magenta:"#ae81ff",cyan:"#a1efe4",white:"#f8f8f2",brightBlack:"#75715e",brightRed:"#f92672",brightGreen:"#a6e22e",brightYellow:"#f4bf75",brightBlue:"#66d9e8",brightMagenta:"#ae81ff",brightCyan:"#a1efe4",brightWhite:"#f9f8f5"},"solarized-dark":{background:"#002b36",foreground:"#839496",cursor:"#839496",cursorAccent:"#002b36",selectionBackground:"rgba(7, 54, 66, 0.8)",black:"#073642",red:"#dc322f",green:"#859900",yellow:"#b58900",blue:"#268bd2",magenta:"#d33682",cyan:"#2aa198",white:"#eee8d5",brightBlack:"#002b36",brightRed:"#cb4b16",brightGreen:"#586e75",brightYellow:"#657b83",brightBlue:"#839496",brightMagenta:"#6c71c4",brightCyan:"#93a1a1",brightWhite:"#fdf6e3"},"solarized-light":{background:"#fdf6e3",foreground:"#657b83",cursor:"#586e75",cursorAccent:"#fdf6e3",selectionBackground:"rgba(238, 232, 213, 0.8)",black:"#073642",red:"#dc322f",green:"#859900",yellow:"#b58900",blue:"#268bd2",magenta:"#d33682",cyan:"#2aa198",white:"#eee8d5",brightBlack:"#002b36",brightRed:"#cb4b16",brightGreen:"#586e75",brightYellow:"#657b83",brightBlue:"#839496",brightMagenta:"#6c71c4",brightCyan:"#93a1a1",brightWhite:"#fdf6e3"},nord:{background:"#2e3440",foreground:"#d8dee9",cursor:"#d8dee9",cursorAccent:"#2e3440",selectionBackground:"rgba(67, 76, 94, 0.5)",black:"#3b4252",red:"#bf616a",green:"#a3be8c",yellow:"#ebcb8b",blue:"#81a1c1",magenta:"#b48ead",cyan:"#88c0d0",white:"#e5e9f0",brightBlack:"#4c566a",brightRed:"#bf616a",brightGreen:"#a3be8c",brightYellow:"#ebcb8b",brightBlue:"#81a1c1",brightMagenta:"#b48ead",brightCyan:"#8fbcbb",brightWhite:"#eceff4"},dracula:{background:"#282a36",foreground:"#f8f8f2",cursor:"#f8f8f2",cursorAccent:"#282a36",selectionBackground:"rgba(68, 71, 90, 0.7)",black:"#21222c",red:"#ff5555",green:"#50fa7b",yellow:"#f1fa8c",blue:"#bd93f9",magenta:"#ff79c6",cyan:"#8be9fd",white:"#f8f8f2",brightBlack:"#6272a4",brightRed:"#ff6e6e",brightGreen:"#69ff94",brightYellow:"#ffffa5",brightBlue:"#d6acff",brightMagenta:"#ff92df",brightCyan:"#a4ffff",brightWhite:"#ffffff"},"github-dark":{background:"#0d1117",foreground:"#c9d1d9",cursor:"#c9d1d9",cursorAccent:"#0d1117",selectionBackground:"rgba(56, 139, 253, 0.3)",black:"#484f58",red:"#ff7b72",green:"#3fb950",yellow:"#d29922",blue:"#58a6ff",magenta:"#bc8cff",cyan:"#39c5cf",white:"#c9d1d9",brightBlack:"#6e7681",brightRed:"#ffa198",brightGreen:"#56d364",brightYellow:"#e3b341",brightBlue:"#79c0ff",brightMagenta:"#d2a8ff",brightCyan:"#56d4dd",brightWhite:"#f0f6fc"},"one-dark":{background:"#282c34",foreground:"#abb2bf",cursor:"#528bff",cursorAccent:"#282c34",selectionBackground:"rgba(62, 68, 82, 0.7)",black:"#3f4451",red:"#e06c75",green:"#98c379",yellow:"#e5c07b",blue:"#61afef",magenta:"#c678dd",cyan:"#56b6c2",white:"#d7dae0",brightBlack:"#4f5666",brightRed:"#e06c75",brightGreen:"#98c379",brightYellow:"#e5c07b",brightBlue:"#61afef",brightMagenta:"#c678dd",brightCyan:"#56b6c2",brightWhite:"#ffffff"},catppuccin:{background:"#1e1e2e",foreground:"#cdd6f4",cursor:"#f5e0dc",cursorAccent:"#1e1e2e",selectionBackground:"rgba(88, 91, 112, 0.5)",black:"#45475a",red:"#f38ba8",green:"#a6e3a1",yellow:"#f9e2af",blue:"#89b4fa",magenta:"#f5c2e7",cyan:"#94e2d5",white:"#bac2de",brightBlack:"#585b70",brightRed:"#f38ba8",brightGreen:"#a6e3a1",brightYellow:"#f9e2af",brightBlue:"#89b4fa",brightMagenta:"#f5c2e7",brightCyan:"#94e2d5",brightWhite:"#a6adc8"},gruvbox:{background:"#282828",foreground:"#ebdbb2",cursor:"#ebdbb2",cursorAccent:"#282828",selectionBackground:"rgba(80, 73, 69, 0.7)",black:"#282828",red:"#cc241d",green:"#98971a",yellow:"#d79921",blue:"#458588",magenta:"#b16286",cyan:"#689d6a",white:"#a89984",brightBlack:"#928374",brightRed:"#fb4934",brightGreen:"#b8bb26",brightYellow:"#fabd2f",brightBlue:"#83a598",brightMagenta:"#d3869b",brightCyan:"#8ec07c",brightWhite:"#ebdbb2"},"night-owl":{background:"#011627",foreground:"#d6deeb",cursor:"#80a4c2",cursorAccent:"#011627",selectionBackground:"rgba(29, 59, 83, 0.7)",black:"#010e1a",red:"#ef5350",green:"#22da6e",yellow:"#addb67",blue:"#82aaff",magenta:"#c792ea",cyan:"#21c7a8",white:"#d6deeb",brightBlack:"#575656",brightRed:"#ef5350",brightGreen:"#22da6e",brightYellow:"#ffeb95",brightBlue:"#82aaff",brightMagenta:"#c792ea",brightCyan:"#7fdbca",brightWhite:"#ffffff"}},dr=[{id:"dark",name:"Dark",bg:"#1e1e1e"},{id:"light",name:"Light",bg:"#f3f3f3"},{id:"monokai",name:"Monokai",bg:"#272822"},{id:"solarized-dark",name:"Solarized Dark",bg:"#002b36"},{id:"solarized-light",name:"Solarized Light",bg:"#fdf6e3"},{id:"nord",name:"Nord",bg:"#2e3440"},{id:"dracula",name:"Dracula",bg:"#282a36"},{id:"github-dark",name:"GitHub Dark",bg:"#0d1117"},{id:"one-dark",name:"One Dark",bg:"#282c34"},{id:"catppuccin",name:"Catppuccin",bg:"#1e1e2e"},{id:"gruvbox",name:"Gruvbox",bg:"#282828"},{id:"night-owl",name:"Night Owl",bg:"#011627"}];function Ev(r){return xv[r]??xv.dark}function mg(){try{const r=localStorage.getItem("termbeam-theme");if(r&&dr.some(f=>f.id===r))return r}catch{}return"dark"}const aa=rh(r=>({themeId:mg(),setTheme:f=>{try{localStorage.setItem("termbeam-theme",f)}catch{}document.documentElement.setAttribute("data-theme",f);const m=dr.find(M=>M.id===f)??dr[0],x=document.querySelector('meta[name="theme-color"]');x&&x.setAttribute("content",m.bg),r({themeId:f})}})),bg=mg();document.documentElement.setAttribute("data-theme",bg);const Dv=document.querySelector('meta[name="theme-color"]');if(Dv){const r=dr.find(f=>f.id===bg)??dr[0];Dv.setAttribute("content",r.bg)}const G1="_banner_1ribv_1",Y1="_text_1ribv_14",X1="_dismiss_1ribv_19",Su={banner:G1,text:Y1,dismiss:X1};function V1(){const[r,f]=k.useState(null),[m,x]=k.useState(!1);return k.useEffect(()=>{ih().then(M=>{M!=null&&M.updateAvailable&&f({current:M.current,latest:M.latest})})},[]),!r||m?null:O.jsxs("div",{className:Su.banner,children:[O.jsxs("span",{className:Su.text,children:["Update available: v",r.current," → v",r.latest]}),O.jsx("button",{className:Su.dismiss,onClick:()=>x(!0),"aria-label":"Dismiss update banner",children:"✕"})]})}const K1="_wrapper_18ism_1",Z1="_deleteBackground_18ism_7",Q1="_card_18ism_34",J1="_topRow_18ism_54",eb="_nameGroup_18ism_61",tb="_colorDot_18ism_68",ib="_name_18ism_61",sb="_pidBadge_18ism_84",rb="_detailsRow_18ism_95",nb="_detailItem_18ism_103",ab="_gitRow_18ism_115",ob="_gitBadge_18ism_122",lb="_statusClean_18ism_137",cb="_statusDirty_18ism_141",ub="_connectBtn_18ism_146",Mt={wrapper:K1,deleteBackground:Z1,card:Q1,topRow:J1,nameGroup:eb,colorDot:tb,name:ib,pidBadge:sb,detailsRow:rb,detailItem:nb,gitRow:ab,gitBadge:ob,statusClean:lb,statusDirty:cb,connectBtn:ub};function hb(r){const f=typeof r=="number"?r:new Date(r).getTime(),m=Date.now()-f;return m<1e4?"just now":m<6e4?`${Math.floor(m/1e3)}s ago`:m<36e5?`${Math.floor(m/6e4)}m ago`:m<864e5?`${Math.floor(m/36e5)}h ago`:new Date(f).toLocaleDateString()}const Lv=50,db=()=>O.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:O.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}),fb=()=>O.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[O.jsx("polyline",{points:"4 17 10 11 4 5"}),O.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),_b=()=>O.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[O.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),O.jsx("circle",{cx:"9",cy:"7",r:"4"}),O.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),O.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}),vb=()=>O.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[O.jsx("circle",{cx:"12",cy:"12",r:"10"}),O.jsx("polyline",{points:"12 6 12 12 16 14"})]}),gb=()=>O.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[O.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),O.jsx("circle",{cx:"18",cy:"6",r:"3"}),O.jsx("circle",{cx:"6",cy:"18",r:"3"}),O.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]}),pb=()=>O.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[O.jsx("polyline",{points:"3 6 5 6 21 6"}),O.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]}),mb=()=>O.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:O.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})}),bb=()=>O.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:O.jsx("path",{d:"M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"})});function Sb(r){if(!r)return null;const f=r.toLowerCase();return f.includes("github")?O.jsx(mb,{}):f.includes("gitlab")?O.jsx(bb,{}):null}function yb({session:r,onSelect:f,onDelete:m,revealedId:x,onRevealChange:M}){var S;const B=k.useRef(null),A=k.useRef(0),n=k.useRef(0),h=k.useRef(0),d=k.useRef(!1),p=x===r.id,l=k.useCallback(D=>{const b=B.current;b&&(b.style.transition="transform 0.25s ease",b.style.transform=`translateX(${D}px)`,h.current=D)},[]);k.useEffect(()=>{p||l(0)},[p,l]);const g=k.useCallback(D=>{const b=D.touches[0];if(!b)return;A.current=b.clientX,n.current=b.clientY,d.current=!1;const E=B.current;E&&(E.style.transition="none")},[]),C=k.useCallback(D=>{const b=D.touches[0];if(!b)return;const E=b.clientX-A.current,w=b.clientY-n.current;if(!d.current&&Math.abs(E)>5){if(Math.abs(w)>Math.abs(E))return;d.current=!0}if(!d.current)return;const R=B.current;if(!R)return;let z=(p?-80:0)+E;z=Math.max(z,-80),z=Math.min(z,0),R.style.transform=`translateX(${z}px)`},[p]),L=k.useCallback(D=>{if(!d.current)return;const b=D.changedTouches[0];if(!b)return;const E=b.clientX-A.current,R=(p?-80:0)+E;p?E>Lv?(M(null),l(0)):l(-80):R<-Lv?(M(r.id),l(-80)):l(0)},[p,r.id,M,l]),_=k.useCallback(D=>{D.stopPropagation(),m(r.id),M(null)},[r.id,m,M]),a=r.shell.split("/").pop()??r.shell,c=r.color??"var(--success)",o=r.git,u=((S=o==null?void 0:o.status)==null?void 0:S.clean)===!0;return O.jsxs("div",{className:Mt.wrapper,children:[O.jsxs("button",{className:Mt.deleteBackground,onClick:_,"aria-label":`Delete session ${r.name}`,type:"button",children:[O.jsx(pb,{}),"Delete"]}),O.jsxs("div",{ref:B,className:Mt.card,"data-testid":"session-card",onTouchStart:g,onTouchMove:C,onTouchEnd:L,children:[O.jsxs("div",{className:Mt.topRow,children:[O.jsxs("div",{className:Mt.nameGroup,children:[O.jsx("span",{className:Mt.colorDot,style:{background:c}}),O.jsx("span",{className:Mt.name,"data-testid":"session-name",children:r.name})]}),O.jsxs("span",{className:Mt.pidBadge,"data-testid":"session-pid",children:["PID ",r.pid]})]}),O.jsxs("div",{className:Mt.detailsRow,children:[O.jsxs("span",{className:Mt.detailItem,children:[O.jsx(db,{})," ",r.cwd]}),O.jsxs("span",{className:Mt.detailItem,"data-testid":"session-shell",children:[O.jsx(fb,{})," ",a]}),O.jsxs("span",{className:Mt.detailItem,children:[O.jsx(_b,{})," ",r.clients??0," connected"]}),O.jsxs("span",{className:Mt.detailItem,children:[O.jsx(vb,{})," ",hb(r.lastActivity)]})]}),o&&O.jsxs("div",{className:Mt.gitRow,children:[O.jsxs("span",{className:Mt.gitBadge,children:[O.jsx(gb,{})," ",o.branch]}),o.provider&&O.jsxs("span",{className:Mt.gitBadge,children:[Sb(o.provider)," ",o.provider]}),o.repoName&&O.jsx("span",{className:Mt.gitBadge,children:o.repoName}),o.status!=null&&O.jsx("span",{className:`${Mt.gitBadge} ${u?Mt.statusClean:Mt.statusDirty}`,children:u?"✓ clean":o.status.summary})]}),O.jsx("button",{className:Mt.connectBtn,"data-testid":"connect-btn",onClick:D=>{D.stopPropagation(),f(r.id)},children:"Connect →"})]})]})}function Ys(r,f,{checkForDefaultPrevented:m=!0}={}){return function(M){if(r==null||r(M),m===!1||!M.defaultPrevented)return f==null?void 0:f(M)}}function Rv(r,f){if(typeof r=="function")return r(f);r!=null&&(r.current=f)}function Sg(...r){return f=>{let m=!1;const x=r.map(M=>{const B=Rv(M,f);return!m&&typeof B=="function"&&(m=!0),B});if(m)return()=>{for(let M=0;M<x.length;M++){const B=x[M];typeof B=="function"?B():Rv(r[M],null)}}}}function _r(...r){return k.useCallback(Sg(...r),r)}function Cb(r,f){const m=k.createContext(f),x=B=>{const{children:A,...n}=B,h=k.useMemo(()=>n,Object.values(n));return O.jsx(m.Provider,{value:h,children:A})};x.displayName=r+"Provider";function M(B){const A=k.useContext(m);if(A)return A;if(f!==void 0)return f;throw new Error(`\`${B}\` must be used within \`${r}\``)}return[x,M]}function wb(r,f=[]){let m=[];function x(B,A){const n=k.createContext(A),h=m.length;m=[...m,A];const d=l=>{var c;const{scope:g,children:C,...L}=l,_=((c=g==null?void 0:g[r])==null?void 0:c[h])||n,a=k.useMemo(()=>L,Object.values(L));return O.jsx(_.Provider,{value:a,children:C})};d.displayName=B+"Provider";function p(l,g){var _;const C=((_=g==null?void 0:g[r])==null?void 0:_[h])||n,L=k.useContext(C);if(L)return L;if(A!==void 0)return A;throw new Error(`\`${l}\` must be used within \`${B}\``)}return[d,p]}const M=()=>{const B=m.map(A=>k.createContext(A));return function(n){const h=(n==null?void 0:n[r])||B;return k.useMemo(()=>({[`__scope${r}`]:{...n,[r]:h}}),[n,h])}};return M.scopeName=r,[x,xb(M,...f)]}function xb(...r){const f=r[0];if(r.length===1)return f;const m=()=>{const x=r.map(M=>({useScope:M(),scopeName:M.scopeName}));return function(B){const A=x.reduce((n,{useScope:h,scopeName:d})=>{const l=h(B)[`__scope${d}`];return{...n,...l}},{});return k.useMemo(()=>({[`__scope${f.scopeName}`]:A}),[A])}};return m.scopeName=f.scopeName,m}var oa=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},Eb=cg[" useId ".trim().toString()]||(()=>{}),Db=0;function yu(r){const[f,m]=k.useState(Eb());return oa(()=>{m(x=>x??String(Db++))},[r]),r||(f?`radix-${f}`:"")}var Lb=cg[" useInsertionEffect ".trim().toString()]||oa;function Rb({prop:r,defaultProp:f,onChange:m=()=>{},caller:x}){const[M,B,A]=Mb({defaultProp:f,onChange:m}),n=r!==void 0,h=n?r:M;{const p=k.useRef(r!==void 0);k.useEffect(()=>{const l=p.current;l!==n&&console.warn(`${x} is changing from ${l?"controlled":"uncontrolled"} to ${n?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=n},[n,x])}const d=k.useCallback(p=>{var l;if(n){const g=Ab(p)?p(r):p;g!==r&&((l=A.current)==null||l.call(A,g))}else B(p)},[n,r,B,A]);return[h,d]}function Mb({defaultProp:r,onChange:f}){const[m,x]=k.useState(r),M=k.useRef(m),B=k.useRef(f);return Lb(()=>{B.current=f},[f]),k.useEffect(()=>{var A;M.current!==m&&((A=B.current)==null||A.call(B,m),M.current=m)},[m,M]),[m,x,B]}function Ab(r){return typeof r=="function"}function yg(r){const f=Tb(r),m=k.forwardRef((x,M)=>{const{children:B,...A}=x,n=k.Children.toArray(B),h=n.find(Ob);if(h){const d=h.props.children,p=n.map(l=>l===h?k.Children.count(d)>1?k.Children.only(null):k.isValidElement(d)?d.props.children:null:l);return O.jsx(f,{...A,ref:M,children:k.isValidElement(d)?k.cloneElement(d,void 0,p):null})}return O.jsx(f,{...A,ref:M,children:B})});return m.displayName=`${r}.Slot`,m}function Tb(r){const f=k.forwardRef((m,x)=>{const{children:M,...B}=m;if(k.isValidElement(M)){const A=Nb(M),n=kb(B,M.props);return M.type!==k.Fragment&&(n.ref=x?Sg(x,A):A),k.cloneElement(M,n)}return k.Children.count(M)>1?k.Children.only(null):null});return f.displayName=`${r}.SlotClone`,f}var Bb=Symbol("radix.slottable");function Ob(r){return k.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===Bb}function kb(r,f){const m={...f};for(const x in f){const M=r[x],B=f[x];/^on[A-Z]/.test(x)?M&&B?m[x]=(...n)=>{const h=B(...n);return M(...n),h}:M&&(m[x]=M):x==="style"?m[x]={...M,...B}:x==="className"&&(m[x]=[M,B].filter(Boolean).join(" "))}return{...r,...m}}function Nb(r){var x,M;let f=(x=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:x.get,m=f&&"isReactWarning"in f&&f.isReactWarning;return m?r.ref:(f=(M=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:M.get,m=f&&"isReactWarning"in f&&f.isReactWarning,m?r.props.ref:r.props.ref||r.ref)}var Hb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ms=Hb.reduce((r,f)=>{const m=yg(`Primitive.${f}`),x=k.forwardRef((M,B)=>{const{asChild:A,...n}=M,h=A?m:f;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(h,{...n,ref:B})});return x.displayName=`Primitive.${f}`,{...r,[f]:x}},{});function jb(r,f){r&&hr.flushSync(()=>r.dispatchEvent(f))}function la(r){const f=k.useRef(r);return k.useEffect(()=>{f.current=r}),k.useMemo(()=>(...m)=>{var x;return(x=f.current)==null?void 0:x.call(f,...m)},[])}function zb(r,f=globalThis==null?void 0:globalThis.document){const m=la(r);k.useEffect(()=>{const x=M=>{M.key==="Escape"&&m(M)};return f.addEventListener("keydown",x,{capture:!0}),()=>f.removeEventListener("keydown",x,{capture:!0})},[m,f])}var Ib="DismissableLayer",Yu="dismissableLayer.update",Ub="dismissableLayer.pointerDownOutside",Pb="dismissableLayer.focusOutside",Mv,Cg=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wg=k.forwardRef((r,f)=>{const{disableOutsidePointerEvents:m=!1,onEscapeKeyDown:x,onPointerDownOutside:M,onFocusOutside:B,onInteractOutside:A,onDismiss:n,...h}=r,d=k.useContext(Cg),[p,l]=k.useState(null),g=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=k.useState({}),L=_r(f,E=>l(E)),_=Array.from(d.layers),[a]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),c=_.indexOf(a),o=p?_.indexOf(p):-1,u=d.layersWithOutsidePointerEventsDisabled.size>0,S=o>=c,D=Fb(E=>{const w=E.target,R=[...d.branches].some(N=>N.contains(w));!S||R||(M==null||M(E),A==null||A(E),E.defaultPrevented||n==null||n())},g),b=qb(E=>{const w=E.target;[...d.branches].some(N=>N.contains(w))||(B==null||B(E),A==null||A(E),E.defaultPrevented||n==null||n())},g);return zb(E=>{o===d.layers.size-1&&(x==null||x(E),!E.defaultPrevented&&n&&(E.preventDefault(),n()))},g),k.useEffect(()=>{if(p)return m&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Mv=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),Av(),()=>{m&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Mv)}},[p,g,m,d]),k.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),Av())},[p,d]),k.useEffect(()=>{const E=()=>C({});return document.addEventListener(Yu,E),()=>document.removeEventListener(Yu,E)},[]),O.jsx(ms.div,{...h,ref:L,style:{pointerEvents:u?S?"auto":"none":void 0,...r.style},onFocusCapture:Ys(r.onFocusCapture,b.onFocusCapture),onBlurCapture:Ys(r.onBlurCapture,b.onBlurCapture),onPointerDownCapture:Ys(r.onPointerDownCapture,D.onPointerDownCapture)})});wg.displayName=Ib;var $b="DismissableLayerBranch",Wb=k.forwardRef((r,f)=>{const m=k.useContext(Cg),x=k.useRef(null),M=_r(f,x);return k.useEffect(()=>{const B=x.current;if(B)return m.branches.add(B),()=>{m.branches.delete(B)}},[m.branches]),O.jsx(ms.div,{...r,ref:M})});Wb.displayName=$b;function Fb(r,f=globalThis==null?void 0:globalThis.document){const m=la(r),x=k.useRef(!1),M=k.useRef(()=>{});return k.useEffect(()=>{const B=n=>{if(n.target&&!x.current){let h=function(){xg(Ub,m,d,{discrete:!0})};const d={originalEvent:n};n.pointerType==="touch"?(f.removeEventListener("click",M.current),M.current=h,f.addEventListener("click",M.current,{once:!0})):h()}else f.removeEventListener("click",M.current);x.current=!1},A=window.setTimeout(()=>{f.addEventListener("pointerdown",B)},0);return()=>{window.clearTimeout(A),f.removeEventListener("pointerdown",B),f.removeEventListener("click",M.current)}},[f,m]),{onPointerDownCapture:()=>x.current=!0}}function qb(r,f=globalThis==null?void 0:globalThis.document){const m=la(r),x=k.useRef(!1);return k.useEffect(()=>{const M=B=>{B.target&&!x.current&&xg(Pb,m,{originalEvent:B},{discrete:!1})};return f.addEventListener("focusin",M),()=>f.removeEventListener("focusin",M)},[f,m]),{onFocusCapture:()=>x.current=!0,onBlurCapture:()=>x.current=!1}}function Av(){const r=new CustomEvent(Yu);document.dispatchEvent(r)}function xg(r,f,m,{discrete:x}){const M=m.originalEvent.target,B=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:m});f&&M.addEventListener(r,f,{once:!0}),x?jb(M,B):M.dispatchEvent(B)}var Cu="focusScope.autoFocusOnMount",wu="focusScope.autoFocusOnUnmount",Tv={bubbles:!1,cancelable:!0},Gb="FocusScope",Eg=k.forwardRef((r,f)=>{const{loop:m=!1,trapped:x=!1,onMountAutoFocus:M,onUnmountAutoFocus:B,...A}=r,[n,h]=k.useState(null),d=la(M),p=la(B),l=k.useRef(null),g=_r(f,_=>h(_)),C=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(x){let _=function(u){if(C.paused||!n)return;const S=u.target;n.contains(S)?l.current=S:qs(l.current,{select:!0})},a=function(u){if(C.paused||!n)return;const S=u.relatedTarget;S!==null&&(n.contains(S)||qs(l.current,{select:!0}))},c=function(u){if(document.activeElement===document.body)for(const D of u)D.removedNodes.length>0&&qs(n)};document.addEventListener("focusin",_),document.addEventListener("focusout",a);const o=new MutationObserver(c);return n&&o.observe(n,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",a),o.disconnect()}}},[x,n,C.paused]),k.useEffect(()=>{if(n){Ov.add(C);const _=document.activeElement;if(!n.contains(_)){const c=new CustomEvent(Cu,Tv);n.addEventListener(Cu,d),n.dispatchEvent(c),c.defaultPrevented||(Yb(Qb(Dg(n)),{select:!0}),document.activeElement===_&&qs(n))}return()=>{n.removeEventListener(Cu,d),setTimeout(()=>{const c=new CustomEvent(wu,Tv);n.addEventListener(wu,p),n.dispatchEvent(c),c.defaultPrevented||qs(_??document.body,{select:!0}),n.removeEventListener(wu,p),Ov.remove(C)},0)}}},[n,d,p,C]);const L=k.useCallback(_=>{if(!m&&!x||C.paused)return;const a=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,c=document.activeElement;if(a&&c){const o=_.currentTarget,[u,S]=Xb(o);u&&S?!_.shiftKey&&c===S?(_.preventDefault(),m&&qs(u,{select:!0})):_.shiftKey&&c===u&&(_.preventDefault(),m&&qs(S,{select:!0})):c===o&&_.preventDefault()}},[m,x,C.paused]);return O.jsx(ms.div,{tabIndex:-1,...A,ref:g,onKeyDown:L})});Eg.displayName=Gb;function Yb(r,{select:f=!1}={}){const m=document.activeElement;for(const x of r)if(qs(x,{select:f}),document.activeElement!==m)return}function Xb(r){const f=Dg(r),m=Bv(f,r),x=Bv(f.reverse(),r);return[m,x]}function Dg(r){const f=[],m=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:x=>{const M=x.tagName==="INPUT"&&x.type==="hidden";return x.disabled||x.hidden||M?NodeFilter.FILTER_SKIP:x.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;m.nextNode();)f.push(m.currentNode);return f}function Bv(r,f){for(const m of r)if(!Vb(m,{upTo:f}))return m}function Vb(r,{upTo:f}){if(getComputedStyle(r).visibility==="hidden")return!0;for(;r;){if(f!==void 0&&r===f)return!1;if(getComputedStyle(r).display==="none")return!0;r=r.parentElement}return!1}function Kb(r){return r instanceof HTMLInputElement&&"select"in r}function qs(r,{select:f=!1}={}){if(r&&r.focus){const m=document.activeElement;r.focus({preventScroll:!0}),r!==m&&Kb(r)&&f&&r.select()}}var Ov=Zb();function Zb(){let r=[];return{add(f){const m=r[0];f!==m&&(m==null||m.pause()),r=kv(r,f),r.unshift(f)},remove(f){var m;r=kv(r,f),(m=r[0])==null||m.resume()}}}function kv(r,f){const m=[...r],x=m.indexOf(f);return x!==-1&&m.splice(x,1),m}function Qb(r){return r.filter(f=>f.tagName!=="A")}var Jb="Portal",Lg=k.forwardRef((r,f)=>{var n;const{container:m,...x}=r,[M,B]=k.useState(!1);oa(()=>B(!0),[]);const A=m||M&&((n=globalThis==null?void 0:globalThis.document)==null?void 0:n.body);return A?hg.createPortal(O.jsx(ms.div,{...x,ref:f}),A):null});Lg.displayName=Jb;function eS(r,f){return k.useReducer((m,x)=>f[m][x]??m,r)}var Xo=r=>{const{present:f,children:m}=r,x=tS(f),M=typeof m=="function"?m({present:x.isPresent}):k.Children.only(m),B=_r(x.ref,iS(M));return typeof m=="function"||x.isPresent?k.cloneElement(M,{ref:B}):null};Xo.displayName="Presence";function tS(r){const[f,m]=k.useState(),x=k.useRef(null),M=k.useRef(r),B=k.useRef("none"),A=r?"mounted":"unmounted",[n,h]=eS(A,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const d=Ao(x.current);B.current=n==="mounted"?d:"none"},[n]),oa(()=>{const d=x.current,p=M.current;if(p!==r){const g=B.current,C=Ao(d);r?h("MOUNT"):C==="none"||(d==null?void 0:d.display)==="none"?h("UNMOUNT"):h(p&&g!==C?"ANIMATION_OUT":"UNMOUNT"),M.current=r}},[r,h]),oa(()=>{if(f){let d;const p=f.ownerDocument.defaultView??window,l=C=>{const _=Ao(x.current).includes(CSS.escape(C.animationName));if(C.target===f&&_&&(h("ANIMATION_END"),!M.current)){const a=f.style.animationFillMode;f.style.animationFillMode="forwards",d=p.setTimeout(()=>{f.style.animationFillMode==="forwards"&&(f.style.animationFillMode=a)})}},g=C=>{C.target===f&&(B.current=Ao(x.current))};return f.addEventListener("animationstart",g),f.addEventListener("animationcancel",l),f.addEventListener("animationend",l),()=>{p.clearTimeout(d),f.removeEventListener("animationstart",g),f.removeEventListener("animationcancel",l),f.removeEventListener("animationend",l)}}else h("ANIMATION_END")},[f,h]),{isPresent:["mounted","unmountSuspended"].includes(n),ref:k.useCallback(d=>{x.current=d?getComputedStyle(d):null,m(d)},[])}}function Ao(r){return(r==null?void 0:r.animationName)||"none"}function iS(r){var x,M;let f=(x=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:x.get,m=f&&"isReactWarning"in f&&f.isReactWarning;return m?r.ref:(f=(M=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:M.get,m=f&&"isReactWarning"in f&&f.isReactWarning,m?r.props.ref:r.props.ref||r.ref)}var xu=0;function sS(){k.useEffect(()=>{const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",r[0]??Nv()),document.body.insertAdjacentElement("beforeend",r[1]??Nv()),xu++,()=>{xu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(f=>f.remove()),xu--}},[])}function Nv(){const r=document.createElement("span");return r.setAttribute("data-radix-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}var Zi=function(){return Zi=Object.assign||function(f){for(var m,x=1,M=arguments.length;x<M;x++){m=arguments[x];for(var B in m)Object.prototype.hasOwnProperty.call(m,B)&&(f[B]=m[B])}return f},Zi.apply(this,arguments)};function Rg(r,f){var m={};for(var x in r)Object.prototype.hasOwnProperty.call(r,x)&&f.indexOf(x)<0&&(m[x]=r[x]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var M=0,x=Object.getOwnPropertySymbols(r);M<x.length;M++)f.indexOf(x[M])<0&&Object.prototype.propertyIsEnumerable.call(r,x[M])&&(m[x[M]]=r[x[M]]);return m}function rS(r,f,m){if(m||arguments.length===2)for(var x=0,M=f.length,B;x<M;x++)(B||!(x in f))&&(B||(B=Array.prototype.slice.call(f,0,x)),B[x]=f[x]);return r.concat(B||Array.prototype.slice.call(f))}var Io="right-scroll-bar-position",Uo="width-before-scroll-bar",nS="with-scroll-bars-hidden",aS="--removed-body-scroll-bar-size";function Eu(r,f){return typeof r=="function"?r(f):r&&(r.current=f),r}function oS(r,f){var m=k.useState(function(){return{value:r,callback:f,facade:{get current(){return m.value},set current(x){var M=m.value;M!==x&&(m.value=x,m.callback(x,M))}}}})[0];return m.callback=f,m.facade}var lS=typeof window<"u"?k.useLayoutEffect:k.useEffect,Hv=new WeakMap;function cS(r,f){var m=oS(null,function(x){return r.forEach(function(M){return Eu(M,x)})});return lS(function(){var x=Hv.get(m);if(x){var M=new Set(x),B=new Set(r),A=m.current;M.forEach(function(n){B.has(n)||Eu(n,null)}),B.forEach(function(n){M.has(n)||Eu(n,A)})}Hv.set(m,r)},[r]),m}function uS(r){return r}function hS(r,f){f===void 0&&(f=uS);var m=[],x=!1,M={read:function(){if(x)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return m.length?m[m.length-1]:r},useMedium:function(B){var A=f(B,x);return m.push(A),function(){m=m.filter(function(n){return n!==A})}},assignSyncMedium:function(B){for(x=!0;m.length;){var A=m;m=[],A.forEach(B)}m={push:function(n){return B(n)},filter:function(){return m}}},assignMedium:function(B){x=!0;var A=[];if(m.length){var n=m;m=[],n.forEach(B),A=m}var h=function(){var p=A;A=[],p.forEach(B)},d=function(){return Promise.resolve().then(h)};d(),m={push:function(p){A.push(p),d()},filter:function(p){return A=A.filter(p),m}}}};return M}function dS(r){r===void 0&&(r={});var f=hS(null);return f.options=Zi({async:!0,ssr:!1},r),f}var Mg=function(r){var f=r.sideCar,m=Rg(r,["sideCar"]);if(!f)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var x=f.read();if(!x)throw new Error("Sidecar medium not found");return k.createElement(x,Zi({},m))};Mg.isSideCarExport=!0;function fS(r,f){return r.useMedium(f),Mg}var Ag=dS(),Du=function(){},Vo=k.forwardRef(function(r,f){var m=k.useRef(null),x=k.useState({onScrollCapture:Du,onWheelCapture:Du,onTouchMoveCapture:Du}),M=x[0],B=x[1],A=r.forwardProps,n=r.children,h=r.className,d=r.removeScrollBar,p=r.enabled,l=r.shards,g=r.sideCar,C=r.noRelative,L=r.noIsolation,_=r.inert,a=r.allowPinchZoom,c=r.as,o=c===void 0?"div":c,u=r.gapMode,S=Rg(r,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=g,b=cS([m,f]),E=Zi(Zi({},S),M);return k.createElement(k.Fragment,null,p&&k.createElement(D,{sideCar:Ag,removeScrollBar:d,shards:l,noRelative:C,noIsolation:L,inert:_,setCallbacks:B,allowPinchZoom:!!a,lockRef:m,gapMode:u}),A?k.cloneElement(k.Children.only(n),Zi(Zi({},E),{ref:b})):k.createElement(o,Zi({},E,{className:h,ref:b}),n))});Vo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vo.classNames={fullWidth:Uo,zeroRight:Io};var _S=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function vS(){if(!document)return null;var r=document.createElement("style");r.type="text/css";var f=_S();return f&&r.setAttribute("nonce",f),r}function gS(r,f){r.styleSheet?r.styleSheet.cssText=f:r.appendChild(document.createTextNode(f))}function pS(r){var f=document.head||document.getElementsByTagName("head")[0];f.appendChild(r)}var mS=function(){var r=0,f=null;return{add:function(m){r==0&&(f=vS())&&(gS(f,m),pS(f)),r++},remove:function(){r--,!r&&f&&(f.parentNode&&f.parentNode.removeChild(f),f=null)}}},bS=function(){var r=mS();return function(f,m){k.useEffect(function(){return r.add(f),function(){r.remove()}},[f&&m])}},Tg=function(){var r=bS(),f=function(m){var x=m.styles,M=m.dynamic;return r(x,M),null};return f},SS={left:0,top:0,right:0,gap:0},Lu=function(r){return parseInt(r||"",10)||0},yS=function(r){var f=window.getComputedStyle(document.body),m=f[r==="padding"?"paddingLeft":"marginLeft"],x=f[r==="padding"?"paddingTop":"marginTop"],M=f[r==="padding"?"paddingRight":"marginRight"];return[Lu(m),Lu(x),Lu(M)]},CS=function(r){if(r===void 0&&(r="margin"),typeof window>"u")return SS;var f=yS(r),m=document.documentElement.clientWidth,x=window.innerWidth;return{left:f[0],top:f[1],right:f[2],gap:Math.max(0,x-m+f[2]-f[0])}},wS=Tg(),sn="data-scroll-locked",xS=function(r,f,m,x){var M=r.left,B=r.top,A=r.right,n=r.gap;return m===void 0&&(m="margin"),`
|
|
50
|
+
.`.concat(nS,` {
|
|
51
|
+
overflow: hidden `).concat(x,`;
|
|
52
|
+
padding-right: `).concat(n,"px ").concat(x,`;
|
|
53
|
+
}
|
|
54
|
+
body[`).concat(sn,`] {
|
|
55
|
+
overflow: hidden `).concat(x,`;
|
|
56
|
+
overscroll-behavior: contain;
|
|
57
|
+
`).concat([f&&"position: relative ".concat(x,";"),m==="margin"&&`
|
|
58
|
+
padding-left: `.concat(M,`px;
|
|
59
|
+
padding-top: `).concat(B,`px;
|
|
60
|
+
padding-right: `).concat(A,`px;
|
|
61
|
+
margin-left:0;
|
|
62
|
+
margin-top:0;
|
|
63
|
+
margin-right: `).concat(n,"px ").concat(x,`;
|
|
64
|
+
`),m==="padding"&&"padding-right: ".concat(n,"px ").concat(x,";")].filter(Boolean).join(""),`
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.`).concat(Io,` {
|
|
68
|
+
right: `).concat(n,"px ").concat(x,`;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.`).concat(Uo,` {
|
|
72
|
+
margin-right: `).concat(n,"px ").concat(x,`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.`).concat(Io," .").concat(Io,` {
|
|
76
|
+
right: 0 `).concat(x,`;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.`).concat(Uo," .").concat(Uo,` {
|
|
80
|
+
margin-right: 0 `).concat(x,`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
body[`).concat(sn,`] {
|
|
84
|
+
`).concat(aS,": ").concat(n,`px;
|
|
85
|
+
}
|
|
86
|
+
`)},jv=function(){var r=parseInt(document.body.getAttribute(sn)||"0",10);return isFinite(r)?r:0},ES=function(){k.useEffect(function(){return document.body.setAttribute(sn,(jv()+1).toString()),function(){var r=jv()-1;r<=0?document.body.removeAttribute(sn):document.body.setAttribute(sn,r.toString())}},[])},DS=function(r){var f=r.noRelative,m=r.noImportant,x=r.gapMode,M=x===void 0?"margin":x;ES();var B=k.useMemo(function(){return CS(M)},[M]);return k.createElement(wS,{styles:xS(B,!f,M,m?"":"!important")})},Xu=!1;if(typeof window<"u")try{var To=Object.defineProperty({},"passive",{get:function(){return Xu=!0,!0}});window.addEventListener("test",To,To),window.removeEventListener("test",To,To)}catch{Xu=!1}var Jr=Xu?{passive:!1}:!1,LS=function(r){return r.tagName==="TEXTAREA"},Bg=function(r,f){if(!(r instanceof Element))return!1;var m=window.getComputedStyle(r);return m[f]!=="hidden"&&!(m.overflowY===m.overflowX&&!LS(r)&&m[f]==="visible")},RS=function(r){return Bg(r,"overflowY")},MS=function(r){return Bg(r,"overflowX")},zv=function(r,f){var m=f.ownerDocument,x=f;do{typeof ShadowRoot<"u"&&x instanceof ShadowRoot&&(x=x.host);var M=Og(r,x);if(M){var B=kg(r,x),A=B[1],n=B[2];if(A>n)return!0}x=x.parentNode}while(x&&x!==m.body);return!1},AS=function(r){var f=r.scrollTop,m=r.scrollHeight,x=r.clientHeight;return[f,m,x]},TS=function(r){var f=r.scrollLeft,m=r.scrollWidth,x=r.clientWidth;return[f,m,x]},Og=function(r,f){return r==="v"?RS(f):MS(f)},kg=function(r,f){return r==="v"?AS(f):TS(f)},BS=function(r,f){return r==="h"&&f==="rtl"?-1:1},OS=function(r,f,m,x,M){var B=BS(r,window.getComputedStyle(f).direction),A=B*x,n=m.target,h=f.contains(n),d=!1,p=A>0,l=0,g=0;do{if(!n)break;var C=kg(r,n),L=C[0],_=C[1],a=C[2],c=_-a-B*L;(L||c)&&Og(r,n)&&(l+=c,g+=L);var o=n.parentNode;n=o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:o}while(!h&&n!==document.body||h&&(f.contains(n)||f===n));return(p&&Math.abs(l)<1||!p&&Math.abs(g)<1)&&(d=!0),d},Bo=function(r){return"changedTouches"in r?[r.changedTouches[0].clientX,r.changedTouches[0].clientY]:[0,0]},Iv=function(r){return[r.deltaX,r.deltaY]},Uv=function(r){return r&&"current"in r?r.current:r},kS=function(r,f){return r[0]===f[0]&&r[1]===f[1]},NS=function(r){return`
|
|
87
|
+
.block-interactivity-`.concat(r,` {pointer-events: none;}
|
|
88
|
+
.allow-interactivity-`).concat(r,` {pointer-events: all;}
|
|
89
|
+
`)},HS=0,en=[];function jS(r){var f=k.useRef([]),m=k.useRef([0,0]),x=k.useRef(),M=k.useState(HS++)[0],B=k.useState(Tg)[0],A=k.useRef(r);k.useEffect(function(){A.current=r},[r]),k.useEffect(function(){if(r.inert){document.body.classList.add("block-interactivity-".concat(M));var _=rS([r.lockRef.current],(r.shards||[]).map(Uv),!0).filter(Boolean);return _.forEach(function(a){return a.classList.add("allow-interactivity-".concat(M))}),function(){document.body.classList.remove("block-interactivity-".concat(M)),_.forEach(function(a){return a.classList.remove("allow-interactivity-".concat(M))})}}},[r.inert,r.lockRef.current,r.shards]);var n=k.useCallback(function(_,a){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!A.current.allowPinchZoom;var c=Bo(_),o=m.current,u="deltaX"in _?_.deltaX:o[0]-c[0],S="deltaY"in _?_.deltaY:o[1]-c[1],D,b=_.target,E=Math.abs(u)>Math.abs(S)?"h":"v";if("touches"in _&&E==="h"&&b.type==="range")return!1;var w=window.getSelection(),R=w&&w.anchorNode,N=R?R===b||R.contains(b):!1;if(N)return!1;var z=zv(E,b);if(!z)return!0;if(z?D=E:(D=E==="v"?"h":"v",z=zv(E,b)),!z)return!1;if(!x.current&&"changedTouches"in _&&(u||S)&&(x.current=D),!D)return!0;var I=x.current||D;return OS(I,a,_,I==="h"?u:S)},[]),h=k.useCallback(function(_){var a=_;if(!(!en.length||en[en.length-1]!==B)){var c="deltaY"in a?Iv(a):Bo(a),o=f.current.filter(function(D){return D.name===a.type&&(D.target===a.target||a.target===D.shadowParent)&&kS(D.delta,c)})[0];if(o&&o.should){a.cancelable&&a.preventDefault();return}if(!o){var u=(A.current.shards||[]).map(Uv).filter(Boolean).filter(function(D){return D.contains(a.target)}),S=u.length>0?n(a,u[0]):!A.current.noIsolation;S&&a.cancelable&&a.preventDefault()}}},[]),d=k.useCallback(function(_,a,c,o){var u={name:_,delta:a,target:c,should:o,shadowParent:zS(c)};f.current.push(u),setTimeout(function(){f.current=f.current.filter(function(S){return S!==u})},1)},[]),p=k.useCallback(function(_){m.current=Bo(_),x.current=void 0},[]),l=k.useCallback(function(_){d(_.type,Iv(_),_.target,n(_,r.lockRef.current))},[]),g=k.useCallback(function(_){d(_.type,Bo(_),_.target,n(_,r.lockRef.current))},[]);k.useEffect(function(){return en.push(B),r.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:g}),document.addEventListener("wheel",h,Jr),document.addEventListener("touchmove",h,Jr),document.addEventListener("touchstart",p,Jr),function(){en=en.filter(function(_){return _!==B}),document.removeEventListener("wheel",h,Jr),document.removeEventListener("touchmove",h,Jr),document.removeEventListener("touchstart",p,Jr)}},[]);var C=r.removeScrollBar,L=r.inert;return k.createElement(k.Fragment,null,L?k.createElement(B,{styles:NS(M)}):null,C?k.createElement(DS,{noRelative:r.noRelative,gapMode:r.gapMode}):null)}function zS(r){for(var f=null;r!==null;)r instanceof ShadowRoot&&(f=r.host,r=r.host),r=r.parentNode;return f}const IS=fS(Ag,jS);var Ng=k.forwardRef(function(r,f){return k.createElement(Vo,Zi({},r,{ref:f,sideCar:IS}))});Ng.classNames=Vo.classNames;var US=function(r){if(typeof document>"u")return null;var f=Array.isArray(r)?r[0]:r;return f.ownerDocument.body},tn=new WeakMap,Oo=new WeakMap,ko={},Ru=0,Hg=function(r){return r&&(r.host||Hg(r.parentNode))},PS=function(r,f){return f.map(function(m){if(r.contains(m))return m;var x=Hg(m);return x&&r.contains(x)?x:(console.error("aria-hidden",m,"in not contained inside",r,". Doing nothing"),null)}).filter(function(m){return!!m})},$S=function(r,f,m,x){var M=PS(f,Array.isArray(r)?r:[r]);ko[m]||(ko[m]=new WeakMap);var B=ko[m],A=[],n=new Set,h=new Set(M),d=function(l){!l||n.has(l)||(n.add(l),d(l.parentNode))};M.forEach(d);var p=function(l){!l||h.has(l)||Array.prototype.forEach.call(l.children,function(g){if(n.has(g))p(g);else try{var C=g.getAttribute(x),L=C!==null&&C!=="false",_=(tn.get(g)||0)+1,a=(B.get(g)||0)+1;tn.set(g,_),B.set(g,a),A.push(g),_===1&&L&&Oo.set(g,!0),a===1&&g.setAttribute(m,"true"),L||g.setAttribute(x,"true")}catch(c){console.error("aria-hidden: cannot operate on ",g,c)}})};return p(f),n.clear(),Ru++,function(){A.forEach(function(l){var g=tn.get(l)-1,C=B.get(l)-1;tn.set(l,g),B.set(l,C),g||(Oo.has(l)||l.removeAttribute(x),Oo.delete(l)),C||l.removeAttribute(m)}),Ru--,Ru||(tn=new WeakMap,tn=new WeakMap,Oo=new WeakMap,ko={})}},WS=function(r,f,m){m===void 0&&(m="data-aria-hidden");var x=Array.from(Array.isArray(r)?r:[r]),M=US(r);return M?(x.push.apply(x,Array.from(M.querySelectorAll("[aria-live], script"))),$S(x,M,m,"aria-hidden")):function(){return null}},Ko="Dialog",[jg]=wb(Ko),[FS,Wi]=jg(Ko),zg=r=>{const{__scopeDialog:f,children:m,open:x,defaultOpen:M,onOpenChange:B,modal:A=!0}=r,n=k.useRef(null),h=k.useRef(null),[d,p]=Rb({prop:x,defaultProp:M??!1,onChange:B,caller:Ko});return O.jsx(FS,{scope:f,triggerRef:n,contentRef:h,contentId:yu(),titleId:yu(),descriptionId:yu(),open:d,onOpenChange:p,onOpenToggle:k.useCallback(()=>p(l=>!l),[p]),modal:A,children:m})};zg.displayName=Ko;var Ig="DialogTrigger",qS=k.forwardRef((r,f)=>{const{__scopeDialog:m,...x}=r,M=Wi(Ig,m),B=_r(f,M.triggerRef);return O.jsx(ms.button,{type:"button","aria-haspopup":"dialog","aria-expanded":M.open,"aria-controls":M.contentId,"data-state":oh(M.open),...x,ref:B,onClick:Ys(r.onClick,M.onOpenToggle)})});qS.displayName=Ig;var nh="DialogPortal",[GS,Ug]=jg(nh,{forceMount:void 0}),Pg=r=>{const{__scopeDialog:f,forceMount:m,children:x,container:M}=r,B=Wi(nh,f);return O.jsx(GS,{scope:f,forceMount:m,children:k.Children.map(x,A=>O.jsx(Xo,{present:m||B.open,children:O.jsx(Lg,{asChild:!0,container:M,children:A})}))})};Pg.displayName=nh;var Wo="DialogOverlay",$g=k.forwardRef((r,f)=>{const m=Ug(Wo,r.__scopeDialog),{forceMount:x=m.forceMount,...M}=r,B=Wi(Wo,r.__scopeDialog);return B.modal?O.jsx(Xo,{present:x||B.open,children:O.jsx(XS,{...M,ref:f})}):null});$g.displayName=Wo;var YS=yg("DialogOverlay.RemoveScroll"),XS=k.forwardRef((r,f)=>{const{__scopeDialog:m,...x}=r,M=Wi(Wo,m);return O.jsx(Ng,{as:YS,allowPinchZoom:!0,shards:[M.contentRef],children:O.jsx(ms.div,{"data-state":oh(M.open),...x,ref:f,style:{pointerEvents:"auto",...x.style}})})}),fr="DialogContent",Wg=k.forwardRef((r,f)=>{const m=Ug(fr,r.__scopeDialog),{forceMount:x=m.forceMount,...M}=r,B=Wi(fr,r.__scopeDialog);return O.jsx(Xo,{present:x||B.open,children:B.modal?O.jsx(VS,{...M,ref:f}):O.jsx(KS,{...M,ref:f})})});Wg.displayName=fr;var VS=k.forwardRef((r,f)=>{const m=Wi(fr,r.__scopeDialog),x=k.useRef(null),M=_r(f,m.contentRef,x);return k.useEffect(()=>{const B=x.current;if(B)return WS(B)},[]),O.jsx(Fg,{...r,ref:M,trapFocus:m.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ys(r.onCloseAutoFocus,B=>{var A;B.preventDefault(),(A=m.triggerRef.current)==null||A.focus()}),onPointerDownOutside:Ys(r.onPointerDownOutside,B=>{const A=B.detail.originalEvent,n=A.button===0&&A.ctrlKey===!0;(A.button===2||n)&&B.preventDefault()}),onFocusOutside:Ys(r.onFocusOutside,B=>B.preventDefault())})}),KS=k.forwardRef((r,f)=>{const m=Wi(fr,r.__scopeDialog),x=k.useRef(!1),M=k.useRef(!1);return O.jsx(Fg,{...r,ref:f,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:B=>{var A,n;(A=r.onCloseAutoFocus)==null||A.call(r,B),B.defaultPrevented||(x.current||(n=m.triggerRef.current)==null||n.focus(),B.preventDefault()),x.current=!1,M.current=!1},onInteractOutside:B=>{var h,d;(h=r.onInteractOutside)==null||h.call(r,B),B.defaultPrevented||(x.current=!0,B.detail.originalEvent.type==="pointerdown"&&(M.current=!0));const A=B.target;((d=m.triggerRef.current)==null?void 0:d.contains(A))&&B.preventDefault(),B.detail.originalEvent.type==="focusin"&&M.current&&B.preventDefault()}})}),Fg=k.forwardRef((r,f)=>{const{__scopeDialog:m,trapFocus:x,onOpenAutoFocus:M,onCloseAutoFocus:B,...A}=r,n=Wi(fr,m),h=k.useRef(null),d=_r(f,h);return sS(),O.jsxs(O.Fragment,{children:[O.jsx(Eg,{asChild:!0,loop:!0,trapped:x,onMountAutoFocus:M,onUnmountAutoFocus:B,children:O.jsx(wg,{role:"dialog",id:n.contentId,"aria-describedby":n.descriptionId,"aria-labelledby":n.titleId,"data-state":oh(n.open),...A,ref:d,onDismiss:()=>n.onOpenChange(!1)})}),O.jsxs(O.Fragment,{children:[O.jsx(QS,{titleId:n.titleId}),O.jsx(ey,{contentRef:h,descriptionId:n.descriptionId})]})]})}),ah="DialogTitle",qg=k.forwardRef((r,f)=>{const{__scopeDialog:m,...x}=r,M=Wi(ah,m);return O.jsx(ms.h2,{id:M.titleId,...x,ref:f})});qg.displayName=ah;var Gg="DialogDescription",Yg=k.forwardRef((r,f)=>{const{__scopeDialog:m,...x}=r,M=Wi(Gg,m);return O.jsx(ms.p,{id:M.descriptionId,...x,ref:f})});Yg.displayName=Gg;var Xg="DialogClose",ZS=k.forwardRef((r,f)=>{const{__scopeDialog:m,...x}=r,M=Wi(Xg,m);return O.jsx(ms.button,{type:"button",...x,ref:f,onClick:Ys(r.onClick,()=>M.onOpenChange(!1))})});ZS.displayName=Xg;function oh(r){return r?"open":"closed"}var Vg="DialogTitleWarning",[OE,Kg]=Cb(Vg,{contentName:fr,titleName:ah,docsSlug:"dialog"}),QS=({titleId:r})=>{const f=Kg(Vg),m=`\`${f.contentName}\` requires a \`${f.titleName}\` for the component to be accessible for screen reader users.
|
|
90
|
+
|
|
91
|
+
If you want to hide the \`${f.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
92
|
+
|
|
93
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${f.docsSlug}`;return k.useEffect(()=>{r&&(document.getElementById(r)||console.error(m))},[m,r]),null},JS="DialogDescriptionWarning",ey=({contentRef:r,descriptionId:f})=>{const x=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Kg(JS).contentName}}.`;return k.useEffect(()=>{var B;const M=(B=r.current)==null?void 0:B.getAttribute("aria-describedby");f&&M&&(document.getElementById(f)||console.warn(x))},[x,r,f]),null},Zo=zg,Qo=Pg,Jo=$g,el=Wg,tl=qg,Zg=Yg;const Mu=["#4a9eff","#4ade80","#fbbf24","#c084fc","#f87171","#22d3ee","#fb923c","#f472b6"];function ty(){try{const r=localStorage.getItem("termbeam-tab-order");return r?JSON.parse(r):[]}catch{return[]}}function Au(r){try{localStorage.setItem("termbeam-tab-order",JSON.stringify(r))}catch{}}const Te=rh((r,f)=>({sessions:new Map,activeId:null,tabOrder:ty(),splitMode:!1,deletedIds:new Set,addSession:m=>r(x=>{if(x.sessions.has(m.id)||x.deletedIds.has(m.id))return x;const M=new Map(x.sessions);M.set(m.id,m);const B=x.tabOrder.includes(m.id)?x.tabOrder:[...x.tabOrder,m.id];return Au(B),{sessions:M,tabOrder:B,activeId:x.activeId??m.id}}),removeSession:m=>r(x=>{var d,p;const M=new Map(x.sessions),B=M.get(m);B&&((d=B.ws)==null||d.close(),(p=B.term)==null||p.dispose()),M.delete(m);const A=x.tabOrder.filter(l=>l!==m);Au(A);const n=new Set(x.deletedIds);n.add(m),setTimeout(()=>{const l=f(),g=new Set(l.deletedIds);g.delete(m),r({deletedIds:g})},3e4);let h=x.activeId;return h===m&&(h=A[0]??null),{sessions:M,tabOrder:A,activeId:h,deletedIds:n}}),setActiveId:m=>r({activeId:m}),updateSession:(m,x)=>r(M=>{const B=new Map(M.sessions),A=B.get(m);return A&&B.set(m,{...A,...x}),{sessions:B}}),setTabOrder:m=>{Au(m),r({tabOrder:m})},toggleSplit:()=>r(m=>({splitMode:!m.splitMode})),setSplit:m=>r({splitMode:m}),markUnread:m=>r(x=>{const M=new Map(x.sessions),B=M.get(m);return B&&!B.hasUnread?(M.set(m,{...B,hasUnread:!0}),{sessions:M}):x}),clearUnread:m=>r(x=>{const M=new Map(x.sessions),B=M.get(m);return B&&B.hasUnread?(M.set(m,{...B,hasUnread:!1}),{sessions:M}):x}),isDeleted:m=>f().deletedIds.has(m)})),iy="_container_tkgsa_1",sy="_breadcrumb_tkgsa_9",ry="_breadcrumbSegment_tkgsa_24",ny="_breadcrumbSep_tkgsa_39",ay="_list_tkgsa_44",oy="_entry_tkgsa_58",ly="_entryIcon_tkgsa_78",cy="_entryName_tkgsa_83",uy="_actions_tkgsa_98",hy="_selectBtn_tkgsa_106",dy="_cancelBtn_tkgsa_127",fy="_loading_tkgsa_145",_y="_error_tkgsa_154",$t={container:iy,breadcrumb:sy,breadcrumbSegment:ry,breadcrumbSep:ny,list:ay,entry:oy,entryIcon:ly,entryName:cy,actions:uy,selectBtn:hy,cancelBtn:dy,loading:fy,error:_y};function Qg({currentDir:r="/",onSelect:f,onCancel:m}){const[x,M]=k.useState(r),[B,A]=k.useState([]),[n,h]=k.useState(!0),[d,p]=k.useState(""),l=k.useCallback(async L=>{h(!0),p("");try{const _=await E1(L);M(_.base),A([..._.dirs].sort((a,c)=>a.localeCompare(c)))}catch(_){p(_ instanceof Error?_.message:"Failed to load directory")}finally{h(!1)}},[]);k.useEffect(()=>{l(r)},[r,l]);const g=x.split("/").filter(Boolean);function C(L){const _="/"+g.slice(0,L+1).join("/");l(_)}return O.jsxs("div",{className:$t.container,children:[O.jsxs("div",{className:$t.breadcrumb,children:[O.jsx("button",{className:$t.breadcrumbSegment,onClick:()=>l("/"),children:"/"}),g.map((L,_)=>O.jsxs("span",{children:[O.jsx("span",{className:$t.breadcrumbSep,children:"/"}),O.jsx("button",{className:$t.breadcrumbSegment,onClick:()=>C(_),children:L})]},_))]}),n?O.jsx("div",{className:$t.loading,children:"Loading…"}):d?O.jsx("div",{className:$t.error,children:d}):O.jsxs("div",{className:$t.list,children:[g.length>0&&O.jsxs("button",{className:$t.entry,onClick:()=>l("/"+g.slice(0,-1).join("/")),children:[O.jsx("span",{className:$t.entryIcon,children:"📁"}),O.jsx("span",{className:$t.entryName,children:".."})]}),B.map(L=>{const _=L.split(/[/\\]/).pop()||L;return O.jsxs("button",{className:$t.entry,onClick:()=>l(L),children:[O.jsx("span",{className:$t.entryIcon,children:"📁"}),O.jsx("span",{className:$t.entryName,children:_})]},L)}),B.length===0&&O.jsx("div",{className:$t.loading,children:"Empty directory"})]}),O.jsxs("div",{className:$t.actions,children:[m&&O.jsx("button",{className:$t.cancelBtn,onClick:m,children:"Cancel"}),O.jsx("button",{className:$t.selectBtn,onClick:()=>f(x),disabled:n,children:"Select"})]})]})}const vy="_overlay_qhgrm_1",gy="_content_qhgrm_9",py="_title_qhgrm_27",my="_form_qhgrm_34",by="_field_qhgrm_40",Sy="_label_qhgrm_46",yy="_input_qhgrm_54",Cy="_select_qhgrm_71 _input_qhgrm_54",wy="_dirRow_qhgrm_81",xy="_browseBtn_qhgrm_90",Ey="_colorPicker_qhgrm_109",Dy="_colorDot_qhgrm_115",Ly="_colorDotActive_qhgrm_130",Ry="_actions_qhgrm_134",My="_cancelBtn_qhgrm_141",Ay="_submitBtn_qhgrm_159",ft={overlay:vy,content:gy,title:py,form:my,field:by,label:Sy,input:yy,select:Cy,dirRow:wy,browseBtn:xy,colorPicker:Ey,colorDot:Dy,colorDotActive:Ly,actions:Ry,cancelBtn:My,submitBtn:Ay};function Jg({onCreated:r}){const{newSessionModalOpen:f,closeNewSessionModal:m}=We(),[x,M]=k.useState(""),[B,A]=k.useState(""),[n,h]=k.useState([]),[d,p]=k.useState(""),[l,g]=k.useState(""),[C,L]=k.useState(Mu[0]),[_,a]=k.useState(!1),[c,o]=k.useState(!1);k.useEffect(()=>{f&&x1().then(({shells:D,defaultShell:b,cwd:E})=>{var w;if(h(D),!B){const R=D.find(N=>N.cmd===b)||D.find(N=>N.path===b);A((R==null?void 0:R.cmd)??((w=D[0])==null?void 0:w.cmd)??"")}!d&&E&&p(E)}).catch(()=>h([]))},[f]);function u(){M(""),A(""),p(""),g(""),L(Mu[0]),o(!1)}async function S(){var D,b;a(!0);try{const E=Te.getState(),w=E.activeId?E.sessions.get(E.activeId):null,R=(D=w==null?void 0:w.term)==null?void 0:D.cols,N=(b=w==null?void 0:w.term)==null?void 0:b.rows,z=await C1({name:x.trim()||void 0,shell:B||void 0,cwd:d.trim()||void 0,color:C,initialCommand:l.trim()||void 0,...R&&N?{cols:R,rows:N}:{}});m(),u(),r(z.id)}catch(E){Qe.error(E instanceof Error?E.message:"Failed to create session")}finally{a(!1)}}return O.jsx(Zo,{open:f,onOpenChange:D=>{D||(m(),u())},children:O.jsxs(Qo,{children:[O.jsx(Jo,{className:ft.overlay}),O.jsxs(el,{className:ft.content,"data-testid":"new-session-modal",onOpenAutoFocus:D=>D.preventDefault(),children:[O.jsx(tl,{className:ft.title,children:"New Session"}),c?O.jsx(Qg,{currentDir:d||"/",onSelect:D=>{p(D),o(!1)},onCancel:()=>o(!1)}):O.jsxs("div",{className:ft.form,children:[O.jsxs("div",{className:ft.field,children:[O.jsx("label",{className:ft.label,children:"Name"}),O.jsx("input",{className:ft.input,type:"text",placeholder:"my-session",value:x,onChange:D=>M(D.target.value),"data-testid":"ns-name"})]}),O.jsxs("div",{className:ft.field,children:[O.jsx("label",{className:ft.label,children:"Shell"}),O.jsx("select",{className:ft.select,value:B,onChange:D=>A(D.target.value),"data-testid":"ns-shell",children:n.map(D=>O.jsxs("option",{value:D.cmd,children:[D.name," (",D.path,")"]},D.path))})]}),O.jsxs("div",{className:ft.field,children:[O.jsx("label",{className:ft.label,children:"Initial command"}),O.jsx("input",{className:ft.input,type:"text",placeholder:"e.g. npm run dev",value:l,onChange:D=>g(D.target.value)})]}),O.jsxs("div",{className:ft.field,children:[O.jsx("label",{className:ft.label,children:"Working Directory"}),O.jsxs("div",{className:ft.dirRow,children:[O.jsx("input",{className:ft.input,type:"text",placeholder:"/",value:d,onChange:D=>p(D.target.value)}),O.jsx("button",{type:"button",className:ft.browseBtn,onClick:()=>o(!0),children:"Browse"})]})]}),O.jsxs("div",{className:ft.field,children:[O.jsx("label",{className:ft.label,children:"Color"}),O.jsx("div",{className:ft.colorPicker,children:Mu.map(D=>O.jsx("button",{type:"button",className:`${ft.colorDot} ${D===C?ft.colorDotActive:""}`,style:{background:D},onClick:()=>L(D),"aria-label":`Color ${D}`},D))})]}),O.jsxs("div",{className:ft.actions,children:[O.jsx("button",{type:"button",className:ft.cancelBtn,"data-testid":"ns-cancel",onClick:()=>{m(),u()},children:"Cancel"}),O.jsx("button",{type:"button",className:ft.submitBtn,disabled:_,"data-testid":"ns-create",onClick:S,children:_?"Creating…":"Create"})]})]})]})]})})}const Ty="_page_3cz84_1",By="_header_3cz84_9",Oy="_title_3cz84_16",ky="_accent_3cz84_23",Ny="_tagline_3cz84_27",Hy="_headerBtn_3cz84_33",jy="_shareBtn_3cz84_57",zy="_refreshBtn_3cz84_61",Iy="_themeWrap_3cz84_65",Uy="_themeBtn_3cz84_71",Py="_themeDropdown_3cz84_75",$y="_themeOption_3cz84_100",Wy="_themeOptionActive_3cz84_120",Fy="_themeSwatch_3cz84_125",qy="_themeCheck_3cz84_133",Gy="_content_3cz84_139",Yy="_sessionsList_3cz84_144",Xy="_emptyState_3cz84_152",Vy="_emptyIcon_3cz84_163",Ky="_emptyText_3cz84_168",Zy="_emptyHint_3cz84_172",Qy="_newSessionBtn_3cz84_177",Jy="_refreshSpin_3cz84_206",ct={page:Ty,header:By,title:Oy,accent:ky,tagline:Ny,headerBtn:Hy,shareBtn:jy,refreshBtn:zy,themeWrap:Iy,themeBtn:Uy,themeDropdown:Py,themeOption:$y,themeOptionActive:Wy,themeSwatch:Fy,themeCheck:qy,content:Gy,sessionsList:Yy,emptyState:Xy,emptyIcon:Vy,emptyText:Ky,emptyHint:Zy,newSessionBtn:Qy,refreshSpin:Jy},eC=3e3;function Pv(r){const f=document.createElement("textarea");f.value=r,f.style.position="fixed",f.style.opacity="0",document.body.appendChild(f),f.select();try{document.execCommand("copy"),Qe.success("URL copied to clipboard")}catch{Qe.error("Failed to copy URL")}document.body.removeChild(f)}const tC=()=>O.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[O.jsx("circle",{cx:"18",cy:"5",r:"3"}),O.jsx("circle",{cx:"6",cy:"12",r:"3"}),O.jsx("circle",{cx:"18",cy:"19",r:"3"}),O.jsx("line",{x1:"8.59",y1:"13.51",x2:"15.42",y2:"17.49"}),O.jsx("line",{x1:"15.41",y1:"6.51",x2:"8.59",y2:"10.49"})]}),iC=()=>O.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[O.jsx("polyline",{points:"23 4 23 10 17 10"}),O.jsx("polyline",{points:"1 20 1 14 7 14"}),O.jsx("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})]}),sC=()=>O.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor"}),O.jsx("circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor"}),O.jsx("circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor"}),O.jsx("circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor"}),O.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"})]});function rC(){const[r,f]=k.useState([]),[m,x]=k.useState(!0),[M,B]=k.useState(!1),[A,n]=k.useState(""),[h,d]=k.useState(!1),[p,l]=k.useState(null),g=k.useRef(null),{openNewSessionModal:C}=We(),{themeId:L,setTheme:_}=aa(),a=k.useCallback(async()=>{try{const b=await zo();f(b)}catch{}finally{x(!1)}},[]);k.useEffect(()=>{a();const b=setInterval(a,eC);return()=>clearInterval(b)},[a]),k.useEffect(()=>{sh().then(b=>{b&&n(b)})},[]);function c(b){window.history.pushState(null,"",`/terminal?id=${b}`),window.dispatchEvent(new PopStateEvent("popstate"))}async function o(b){const E=r.find(w=>w.id===b);try{await nn(b),f(w=>w.filter(R=>R.id!==b)),Qe.success(`Session "${(E==null?void 0:E.name)??b}" deleted`)}catch(w){Qe.error(w instanceof Error?w.message:"Failed to delete session")}}async function u(){B(!0),await a(),setTimeout(()=>B(!1),600)}function S(){_g().then(b=>{var E;(E=navigator.clipboard)!=null&&E.writeText?navigator.clipboard.writeText(b).then(()=>Qe.success("URL copied to clipboard"),()=>Pv(b)):Pv(b)})}function D(){d(b=>!b)}return k.useEffect(()=>{if(!h)return;const b=E=>{g.current&&!g.current.contains(E.target)&&d(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[h]),O.jsxs("div",{className:ct.page,children:[O.jsx(V1,{}),O.jsxs("header",{className:ct.header,children:[O.jsxs("h1",{className:ct.title,children:["📡 Term",O.jsx("span",{className:ct.accent,children:"Beam"})]}),O.jsxs("p",{className:ct.tagline,children:["Beam your terminal to any device",A?O.jsxs("span",{"data-testid":"hub-version",children:[" · v",A]}):""]}),O.jsx("button",{className:`${ct.headerBtn} ${ct.shareBtn}`,onClick:S,"aria-label":"Share URL",title:"Share",children:O.jsx(tC,{})}),O.jsx("button",{className:`${ct.headerBtn} ${ct.refreshBtn}`,onClick:u,"aria-label":"Refresh sessions",title:"Refresh","data-testid":"hub-refresh-btn",children:O.jsx("span",{className:M?ct.refreshSpin:"",style:{display:"flex"},children:O.jsx(iC,{})})}),O.jsxs("div",{className:ct.themeWrap,ref:g,children:[O.jsx("button",{className:`${ct.headerBtn} ${ct.themeBtn}`,onClick:D,"aria-label":"Change theme",title:"Change theme",children:O.jsx(sC,{})}),h&&O.jsx("div",{className:ct.themeDropdown,children:dr.map(b=>O.jsxs("button",{className:`${ct.themeOption} ${b.id===L?ct.themeOptionActive:""}`,onClick:()=>{_(b.id),d(!1)},children:[O.jsx("span",{className:ct.themeSwatch,style:{background:b.bg}}),b.name,b.id===L&&O.jsx("span",{className:ct.themeCheck,children:"✓"})]},b.id))})]})]}),O.jsx("main",{className:ct.content,children:m?O.jsxs("div",{className:ct.emptyState,children:[O.jsx("span",{className:ct.emptyIcon,children:"⏳"}),O.jsx("span",{className:ct.emptyText,children:"Loading sessions…"})]}):r.length===0?O.jsxs("div",{className:ct.emptyState,"data-testid":"empty-state",children:[O.jsx("span",{className:ct.emptyIcon,children:"📡"}),O.jsx("span",{className:ct.emptyText,children:"No active sessions"}),O.jsx("span",{className:ct.emptyHint,children:'Tap "+ New Session" to create a new terminal session'})]}):O.jsx("div",{className:ct.sessionsList,"data-testid":"sessions-list",children:r.map(b=>O.jsx(yb,{session:b,onSelect:c,onDelete:o,revealedId:p,onRevealChange:l},b.id))})}),O.jsx("button",{className:ct.newSessionBtn,onClick:C,"aria-label":"New session","data-testid":"hub-new-session-btn",children:"+ New Session"}),O.jsx(Jg,{onCreated:c})]})}function nC(){const r=k.useRef(null);k.useEffect(()=>{if(!("wakeLock"in navigator))return;async function f(){try{r.current=await navigator.wakeLock.request("screen")}catch{}}function m(){document.visibilityState==="visible"&&f()}return f(),document.addEventListener("visibilitychange",m),()=>{var x;document.removeEventListener("visibilitychange",m),(x=r.current)==null||x.release().catch(()=>{}),r.current=null}},[])}const aC=50;function lh(){const[r,f]=k.useState({keyboardOpen:!1,keyboardHeight:0});return k.useEffect(()=>{const m=window.visualViewport;if(!m)return;const x=m.height;function M(){const B=m.height,A=x-B,n=A>aC;f({keyboardOpen:n,keyboardHeight:n?A:0})}return m.addEventListener("resize",M),()=>m.removeEventListener("resize",M)},[]),r}var Tu={exports:{}},$v;function oC(){return $v||($v=1,(function(r,f){(function(m,x){r.exports=x()})(globalThis,(()=>(()=>{var m={4567:function(A,n,h){var d=this&&this.__decorate||function(o,u,S,D){var b,E=arguments.length,w=E<3?u:D===null?D=Object.getOwnPropertyDescriptor(u,S):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(o,u,S,D);else for(var R=o.length-1;R>=0;R--)(b=o[R])&&(w=(E<3?b(w):E>3?b(u,S,w):b(u,S))||w);return E>3&&w&&Object.defineProperty(u,S,w),w},p=this&&this.__param||function(o,u){return function(S,D){u(S,D,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const l=h(9042),g=h(9924),C=h(844),L=h(4725),_=h(2585),a=h(3656);let c=n.AccessibilityManager=class extends C.Disposable{constructor(o,u,S,D){super(),this._terminal=o,this._coreBrowserService=S,this._renderService=D,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 b=0;b<this._terminal.rows;b++)this._rowElements[b]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[b]);if(this._topBoundaryFocusListener=b=>this._handleBoundaryFocus(b,0),this._bottomBoundaryFocusListener=b=>this._handleBoundaryFocus(b,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 g.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((b=>this._handleResize(b.rows)))),this.register(this._terminal.onRender((b=>this._refreshRows(b.start,b.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((b=>this._handleChar(b)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
94
|
+
`)))),this.register(this._terminal.onA11yTab((b=>this._handleTab(b)))),this.register(this._terminal.onKey((b=>this._handleKey(b.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,a.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,C.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(o){for(let u=0;u<o;u++)this._handleChar(" ")}_handleChar(o){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==o&&(this._charsToAnnounce+=o):this._charsToAnnounce+=o,o===`
|
|
95
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=l.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(o){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(o)||this._charsToConsume.push(o)}_refreshRows(o,u){this._liveRegionDebouncer.refresh(o,u,this._terminal.rows)}_renderRows(o,u){const S=this._terminal.buffer,D=S.lines.length.toString();for(let b=o;b<=u;b++){const E=S.lines.get(S.ydisp+b),w=[],R=(E==null?void 0:E.translateToString(!0,void 0,void 0,w))||"",N=(S.ydisp+b+1).toString(),z=this._rowElements[b];z&&(R.length===0?(z.innerText=" ",this._rowColumns.set(z,[0,1])):(z.textContent=R,this._rowColumns.set(z,w)),z.setAttribute("aria-posinset",N),z.setAttribute("aria-setsize",D))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,u){const S=o.target,D=this._rowElements[u===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")===(u===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==D)return;let b,E;if(u===0?(b=S,E=this._rowElements.pop(),this._rowContainer.removeChild(E)):(b=this._rowElements.shift(),E=S,this._rowContainer.removeChild(b)),b.removeEventListener("focus",this._topBoundaryFocusListener),E.removeEventListener("focus",this._bottomBoundaryFocusListener),u===0){const w=this._createAccessibilityTreeNode();this._rowElements.unshift(w),this._rowContainer.insertAdjacentElement("afterbegin",w)}else{const w=this._createAccessibilityTreeNode();this._rowElements.push(w),this._rowContainer.appendChild(w)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(u===0?-1:1),this._rowElements[u===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var R;if(this._rowElements.length===0)return;const o=document.getSelection();if(!o)return;if(o.isCollapsed)return void(this._rowContainer.contains(o.anchorNode)&&this._terminal.clearSelection());if(!o.anchorNode||!o.focusNode)return void console.error("anchorNode and/or focusNode are null");let u={node:o.anchorNode,offset:o.anchorOffset},S={node:o.focusNode,offset:o.focusOffset};if((u.node.compareDocumentPosition(S.node)&Node.DOCUMENT_POSITION_PRECEDING||u.node===S.node&&u.offset>S.offset)&&([u,S]=[S,u]),u.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(u={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(u.node))return;const D=this._rowElements.slice(-1)[0];if(S.node.compareDocumentPosition(D)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(S={node:D,offset:((R=D.textContent)==null?void 0:R.length)??0}),!this._rowContainer.contains(S.node))return;const b=({node:N,offset:z})=>{const I=N instanceof Text?N.parentNode:N;let U=parseInt(I==null?void 0:I.getAttribute("aria-posinset"),10)-1;if(isNaN(U))return console.warn("row is invalid. Race condition?"),null;const Y=this._rowColumns.get(I);if(!Y)return console.warn("columns is null. Race condition?"),null;let X=z<Y.length?Y[z]:Y.slice(-1)[0]+1;return X>=this._terminal.cols&&(++U,X=0),{row:U,column:X}},E=b(u),w=b(S);if(E&&w){if(E.row>w.row||E.row===w.row&&E.column>=w.column)throw new Error("invalid range");this._terminal.select(E.column,E.row,(w.row-E.row)*this._terminal.cols-E.column+w.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let u=this._rowContainer.children.length;u<this._terminal.rows;u++)this._rowElements[u]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[u]);for(;this._rowElements.length>o;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const o=this._coreBrowserService.mainDocument.createElement("div");return o.setAttribute("role","listitem"),o.tabIndex=-1,this._refreshRowDimensions(o),o}_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 o=0;o<this._terminal.rows;o++)this._refreshRowDimensions(this._rowElements[o])}}_refreshRowDimensions(o){o.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=c=d([p(1,_.IInstantiationService),p(2,L.ICoreBrowserService),p(3,L.IRenderService)],c)},3614:(A,n)=>{function h(g){return g.replace(/\r?\n/g,"\r")}function d(g,C){return C?"\x1B[200~"+g+"\x1B[201~":g}function p(g,C,L,_){g=d(g=h(g),L.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),L.triggerDataEvent(g,!0),C.value=""}function l(g,C,L){const _=L.getBoundingClientRect(),a=g.clientX-_.left-10,c=g.clientY-_.top-10;C.style.width="20px",C.style.height="20px",C.style.left=`${a}px`,C.style.top=`${c}px`,C.style.zIndex="1000",C.focus()}Object.defineProperty(n,"__esModule",{value:!0}),n.rightClickHandler=n.moveTextAreaUnderMouseCursor=n.paste=n.handlePasteEvent=n.copyHandler=n.bracketTextForPaste=n.prepareTextForTerminal=void 0,n.prepareTextForTerminal=h,n.bracketTextForPaste=d,n.copyHandler=function(g,C){g.clipboardData&&g.clipboardData.setData("text/plain",C.selectionText),g.preventDefault()},n.handlePasteEvent=function(g,C,L,_){g.stopPropagation(),g.clipboardData&&p(g.clipboardData.getData("text/plain"),C,L,_)},n.paste=p,n.moveTextAreaUnderMouseCursor=l,n.rightClickHandler=function(g,C,L,_,a){l(g,C,L),a&&_.rightClickSelect(g),C.value=_.selectionText,C.select()}},7239:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const d=h(1505);n.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(p,l,g){this._css.set(p,l,g)}getCss(p,l){return this._css.get(p,l)}setColor(p,l,g){this._color.set(p,l,g)}getColor(p,l){return this._color.get(p,l)}clear(){this._color.clear(),this._css.clear()}}},3656:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(h,d,p,l){h.addEventListener(d,p,l);let g=!1;return{dispose:()=>{g||(g=!0,h.removeEventListener(d,p,l))}}}},3551:function(A,n,h){var d=this&&this.__decorate||function(c,o,u,S){var D,b=arguments.length,E=b<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,u):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,u,S);else for(var w=c.length-1;w>=0;w--)(D=c[w])&&(E=(b<3?D(E):b>3?D(o,u,E):D(o,u))||E);return b>3&&E&&Object.defineProperty(o,u,E),E},p=this&&this.__param||function(c,o){return function(u,S){o(u,S,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const l=h(3656),g=h(8460),C=h(844),L=h(2585),_=h(4725);let a=n.Linkifier=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(c,o,u,S,D){super(),this._element=c,this._mouseService=o,this._renderService=u,this._bufferService=S,this._linkProviderService=D,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,C.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,C.toDisposable)((()=>{var b;this._lastMouseEvent=void 0,(b=this._activeProviderReplies)==null||b.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,l.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,l.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,l.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,l.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(c){this._lastMouseEvent=c;const o=this._positionFromMouseEvent(c,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const u=c.composedPath();for(let S=0;S<u.length;S++){const D=u[S];if(D.classList.contains("xterm"))break;if(D.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(c){if(this._activeLine!==c.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(c,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,c)||(this._clearCurrentLink(),this._askForLink(c,!0))}_askForLink(c,o){var S,D;this._activeProviderReplies&&o||((S=this._activeProviderReplies)==null||S.forEach((b=>{b==null||b.forEach((E=>{E.link.dispose&&E.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=c.y);let u=!1;for(const[b,E]of this._linkProviderService.linkProviders.entries())o?(D=this._activeProviderReplies)!=null&&D.get(b)&&(u=this._checkLinkProviderResult(b,c,u)):E.provideLinks(c.y,(w=>{var N,z;if(this._isMouseOut)return;const R=w==null?void 0:w.map((I=>({link:I})));(N=this._activeProviderReplies)==null||N.set(b,R),u=this._checkLinkProviderResult(b,c,u),((z=this._activeProviderReplies)==null?void 0:z.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(c.y,this._activeProviderReplies)}))}_removeIntersectingLinks(c,o){const u=new Set;for(let S=0;S<o.size;S++){const D=o.get(S);if(D)for(let b=0;b<D.length;b++){const E=D[b],w=E.link.range.start.y<c?0:E.link.range.start.x,R=E.link.range.end.y>c?this._bufferService.cols:E.link.range.end.x;for(let N=w;N<=R;N++){if(u.has(N)){D.splice(b--,1);break}u.add(N)}}}}_checkLinkProviderResult(c,o,u){var b;if(!this._activeProviderReplies)return u;const S=this._activeProviderReplies.get(c);let D=!1;for(let E=0;E<c;E++)this._activeProviderReplies.has(E)&&!this._activeProviderReplies.get(E)||(D=!0);if(!D&&S){const E=S.find((w=>this._linkAtPosition(w.link,o)));E&&(u=!0,this._handleNewLink(E))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!u)for(let E=0;E<this._activeProviderReplies.size;E++){const w=(b=this._activeProviderReplies.get(E))==null?void 0:b.find((R=>this._linkAtPosition(R.link,o)));if(w){u=!0,this._handleNewLink(w);break}}return u}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(c){if(!this._currentLink)return;const o=this._positionFromMouseEvent(c,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(c,this._currentLink.link.text)}_clearCurrentLink(c,o){this._currentLink&&this._lastMouseEvent&&(!c||!o||this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))}_handleNewLink(c){if(!this._lastMouseEvent)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(c.link,o)&&(this._currentLink=c,this._currentLink.state={decorations:{underline:c.link.decorations===void 0||c.link.decorations.underline,pointerCursor:c.link.decorations===void 0||c.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,c.link,this._lastMouseEvent),c.link.decorations={},Object.defineProperties(c.link.decorations,{pointerCursor:{get:()=>{var u,S;return(S=(u=this._currentLink)==null?void 0:u.state)==null?void 0:S.decorations.pointerCursor},set:u=>{var S;(S=this._currentLink)!=null&&S.state&&this._currentLink.state.decorations.pointerCursor!==u&&(this._currentLink.state.decorations.pointerCursor=u,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",u))}},underline:{get:()=>{var u,S;return(S=(u=this._currentLink)==null?void 0:u.state)==null?void 0:S.decorations.underline},set:u=>{var S,D,b;(S=this._currentLink)!=null&&S.state&&((b=(D=this._currentLink)==null?void 0:D.state)==null?void 0:b.decorations.underline)!==u&&(this._currentLink.state.decorations.underline=u,this._currentLink.state.isHovered&&this._fireUnderlineEvent(c.link,u))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((u=>{if(!this._currentLink)return;const S=u.start===0?0:u.start+1+this._bufferService.buffer.ydisp,D=this._bufferService.buffer.ydisp+1+u.end;if(this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=D&&(this._clearCurrentLink(S,D),this._lastMouseEvent)){const b=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);b&&this._askForLink(b,!1)}}))))}_linkHover(c,o,u){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&c.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(u,o.text)}_fireUnderlineEvent(c,o){const u=c.range,S=this._bufferService.buffer.ydisp,D=this._createLinkUnderlineEvent(u.start.x-1,u.start.y-S-1,u.end.x,u.end.y-S-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(D)}_linkLeave(c,o,u){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&c.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(u,o.text)}_linkAtPosition(c,o){const u=c.range.start.y*this._bufferService.cols+c.range.start.x,S=c.range.end.y*this._bufferService.cols+c.range.end.x,D=o.y*this._bufferService.cols+o.x;return u<=D&&D<=S}_positionFromMouseEvent(c,o,u){const S=u.getCoords(c,o,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,o,u,S,D){return{x1:c,y1:o,x2:u,y2:S,cols:this._bufferService.cols,fg:D}}};n.Linkifier=a=d([p(1,_.IMouseService),p(2,_.IRenderService),p(3,L.IBufferService),p(4,_.ILinkProviderService)],a)},9042:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tooMuchOutput=n.promptLabel=void 0,n.promptLabel="Terminal input",n.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(A,n,h){var d=this&&this.__decorate||function(_,a,c,o){var u,S=arguments.length,D=S<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,c):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(_,a,c,o);else for(var b=_.length-1;b>=0;b--)(u=_[b])&&(D=(S<3?u(D):S>3?u(a,c,D):u(a,c))||D);return S>3&&D&&Object.defineProperty(a,c,D),D},p=this&&this.__param||function(_,a){return function(c,o){a(c,o,_)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const l=h(511),g=h(2585);let C=n.OscLinkProvider=class{constructor(_,a,c){this._bufferService=_,this._optionsService=a,this._oscLinkService=c}provideLinks(_,a){var R;const c=this._bufferService.buffer.lines.get(_-1);if(!c)return void a(void 0);const o=[],u=this._optionsService.rawOptions.linkHandler,S=new l.CellData,D=c.getTrimmedLength();let b=-1,E=-1,w=!1;for(let N=0;N<D;N++)if(E!==-1||c.hasContent(N)){if(c.loadCell(N,S),S.hasExtendedAttrs()&&S.extended.urlId){if(E===-1){E=N,b=S.extended.urlId;continue}w=S.extended.urlId!==b}else E!==-1&&(w=!0);if(w||E!==-1&&N===D-1){const z=(R=this._oscLinkService.getLinkData(b))==null?void 0:R.uri;if(z){const I={start:{x:E+1,y:_},end:{x:N+(w||N!==D-1?0:1),y:_}};let U=!1;if(!(u!=null&&u.allowNonHttpProtocols))try{const Y=new URL(z);["http:","https:"].includes(Y.protocol)||(U=!0)}catch{U=!0}U||o.push({text:z,range:I,activate:(Y,X)=>u?u.activate(Y,X,I):L(0,X),hover:(Y,X)=>{var q;return(q=u==null?void 0:u.hover)==null?void 0:q.call(u,Y,X,I)},leave:(Y,X)=>{var q;return(q=u==null?void 0:u.leave)==null?void 0:q.call(u,Y,X,I)}})}w=!1,S.hasExtendedAttrs()&&S.extended.urlId?(E=N,b=S.extended.urlId):(E=-1,b=-1)}}a(o)}};function L(_,a){if(confirm(`Do you want to navigate to ${a}?
|
|
96
|
+
|
|
97
|
+
WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=a}else console.warn("Opening link blocked as opener could not be cleared")}}n.OscLinkProvider=C=d([p(0,g.IBufferService),p(1,g.IOptionsService),p(2,g.IOscLinkService)],C)},6193:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(h,d){this._renderCallback=h,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(h){return this._refreshCallbacks.push(h),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(h,d,p){this._rowCount=p,h=h!==void 0?h:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,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 h=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const h of this._refreshCallbacks)h(0);this._refreshCallbacks=[]}}},3236:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const d=h(3614),p=h(3656),l=h(3551),g=h(9042),C=h(3730),L=h(1680),_=h(3107),a=h(5744),c=h(2950),o=h(1296),u=h(428),S=h(4269),D=h(5114),b=h(8934),E=h(3230),w=h(9312),R=h(4725),N=h(6731),z=h(8055),I=h(8969),U=h(8460),Y=h(844),X=h(6114),q=h(8437),G=h(2584),K=h(7399),H=h(5941),W=h(9074),j=h(2585),F=h(5435),V=h(4567),ee=h(779);class le extends I.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(Z={}){super(Z),this.browser=X,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Y.MutableDisposable),this._onCursorMove=this.register(new U.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new U.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new U.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new U.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new U.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new U.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new U.EventEmitter),this._onBlur=this.register(new U.EventEmitter),this._onA11yCharEmitter=this.register(new U.EventEmitter),this._onA11yTabEmitter=this.register(new U.EventEmitter),this._onWillOpen=this.register(new U.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(W.DecorationService),this._instantiationService.setService(j.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ee.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(C.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((P,ae)=>this.refresh(P,ae)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((P=>this._reportWindowsOptions(P)))),this.register(this._inputHandler.onColor((P=>this._handleColorEvent(P)))),this.register((0,U.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,U.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((P=>this._afterResize(P.cols,P.rows)))),this.register((0,Y.toDisposable)((()=>{var P,ae;this._customKeyEventHandler=void 0,(ae=(P=this.element)==null?void 0:P.parentNode)==null||ae.removeChild(this.element)})))}_handleColorEvent(Z){if(this._themeService)for(const P of Z){let ae,ie="";switch(P.index){case 256:ae="foreground",ie="10";break;case 257:ae="background",ie="11";break;case 258:ae="cursor",ie="12";break;default:ae="ansi",ie="4;"+P.index}switch(P.type){case 0:const ve=z.color.toColorRGB(ae==="ansi"?this._themeService.colors.ansi[P.index]:this._themeService.colors[ae]);this.coreService.triggerDataEvent(`${G.C0.ESC}]${ie};${(0,H.toRgbString)(ve)}${G.C1_ESCAPED.ST}`);break;case 1:if(ae==="ansi")this._themeService.modifyColors((_e=>_e.ansi[P.index]=z.channels.toColor(...P.color)));else{const _e=ae;this._themeService.modifyColors((Ee=>Ee[_e]=z.channels.toColor(...P.color)))}break;case 2:this._themeService.restoreColor(P.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Z){Z?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Z){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(G.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var Z;return(Z=this.textarea)==null?void 0:Z.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(G.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 Z=this.buffer.ybase+this.buffer.y,P=this.buffer.lines.get(Z);if(!P)return;const ae=Math.min(this.buffer.x,this.cols-1),ie=this._renderService.dimensions.css.cell.height,ve=P.getWidth(ae),_e=this._renderService.dimensions.css.cell.width*ve,Ee=this.buffer.y*this._renderService.dimensions.css.cell.height,pe=ae*this._renderService.dimensions.css.cell.width;this.textarea.style.left=pe+"px",this.textarea.style.top=Ee+"px",this.textarea.style.width=_e+"px",this.textarea.style.height=ie+"px",this.textarea.style.lineHeight=ie+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,p.addDisposableDomListener)(this.element,"copy",(P=>{this.hasSelection()&&(0,d.copyHandler)(P,this._selectionService)})));const Z=P=>(0,d.handlePasteEvent)(P,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",Z)),this.register((0,p.addDisposableDomListener)(this.element,"paste",Z)),X.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(P=>{P.button===2&&(0,d.rightClickHandler)(P,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",(P=>{(0,d.rightClickHandler)(P,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),X.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",(P=>{P.button===1&&(0,d.moveTextAreaUnderMouseCursor)(P,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",(Z=>this._keyUp(Z)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(Z=>this._keyDown(Z)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(Z=>this._keyPress(Z)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(Z=>this._compositionHelper.compositionupdate(Z)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(Z=>this._inputEvent(Z)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Z){var ae;if(!Z)throw new Error("Terminal requires a parent element.");if(Z.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ae=this.element)==null?void 0:ae.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Z.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"),Z.appendChild(this.element);const P=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),P.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,p.addDisposableDomListener)(this.screenElement,"mousemove",(ie=>this.updateCursorStyle(ie)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),P.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),X.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(D.CoreBrowserService,this.textarea,Z.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",(ie=>this._handleTextAreaFocus(ie)))),this.register((0,p.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(u.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(N.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(E.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ie=>this._onRender.fire(ie)))),this.onResize((ie=>this._renderService.resize(ie.cols,ie.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(c.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(b.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(l.Linkifier,this.screenElement)),this.element.appendChild(P);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(L.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ie=>this.scrollLines(ie.amount,ie.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(w.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ie=>this.scrollLines(ie.amount,ie.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ie=>this._renderService.handleSelectionChanged(ie.start,ie.end,ie.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ie=>{this.textarea.value=ie,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ie=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(_.BufferDecorationRenderer,this.screenElement)),this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(ie=>this._selectionService.handleMouseDown(ie)))),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(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ie=>this._handleScreenReaderModeOptionChange(ie)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(a.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ie=>{!this._overviewRulerRenderer&&ie&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(a.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(o.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Z=this,P=this.element;function ae(_e){const Ee=Z._mouseService.getMouseReportCoords(_e,Z.screenElement);if(!Ee)return!1;let pe,ke;switch(_e.overrideType||_e.type){case"mousemove":ke=32,_e.buttons===void 0?(pe=3,_e.button!==void 0&&(pe=_e.button<3?_e.button:3)):pe=1&_e.buttons?0:4&_e.buttons?1:2&_e.buttons?2:3;break;case"mouseup":ke=0,pe=_e.button<3?_e.button:3;break;case"mousedown":ke=1,pe=_e.button<3?_e.button:3;break;case"wheel":if(Z._customWheelEventHandler&&Z._customWheelEventHandler(_e)===!1||Z.viewport.getLinesScrolled(_e)===0)return!1;ke=_e.deltaY<0?0:1,pe=4;break;default:return!1}return!(ke===void 0||pe===void 0||pe>4)&&Z.coreMouseService.triggerMouseEvent({col:Ee.col,row:Ee.row,x:Ee.x,y:Ee.y,button:pe,action:ke,ctrl:_e.ctrlKey,alt:_e.altKey,shift:_e.shiftKey})}const ie={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ve={mouseup:_e=>(ae(_e),_e.buttons||(this._document.removeEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.removeEventListener("mousemove",ie.mousedrag)),this.cancel(_e)),wheel:_e=>(ae(_e),this.cancel(_e,!0)),mousedrag:_e=>{_e.buttons&&ae(_e)},mousemove:_e=>{_e.buttons||ae(_e)}};this.register(this.coreMouseService.onProtocolChange((_e=>{_e?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(_e)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&_e?ie.mousemove||(P.addEventListener("mousemove",ve.mousemove),ie.mousemove=ve.mousemove):(P.removeEventListener("mousemove",ie.mousemove),ie.mousemove=null),16&_e?ie.wheel||(P.addEventListener("wheel",ve.wheel,{passive:!1}),ie.wheel=ve.wheel):(P.removeEventListener("wheel",ie.wheel),ie.wheel=null),2&_e?ie.mouseup||(ie.mouseup=ve.mouseup):(this._document.removeEventListener("mouseup",ie.mouseup),ie.mouseup=null),4&_e?ie.mousedrag||(ie.mousedrag=ve.mousedrag):(this._document.removeEventListener("mousemove",ie.mousedrag),ie.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(P,"mousedown",(_e=>{if(_e.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(_e))return ae(_e),ie.mouseup&&this._document.addEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.addEventListener("mousemove",ie.mousedrag),this.cancel(_e)}))),this.register((0,p.addDisposableDomListener)(P,"wheel",(_e=>{if(!ie.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(_e)===!1)return!1;if(!this.buffer.hasScrollback){const Ee=this.viewport.getLinesScrolled(_e);if(Ee===0)return;const pe=G.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(_e.deltaY<0?"A":"B");let ke="";for(let $e=0;$e<Math.abs(Ee);$e++)ke+=pe;return this.coreService.triggerDataEvent(ke,!0),this.cancel(_e,!0)}return this.viewport.handleWheel(_e)?this.cancel(_e):void 0}}),{passive:!1})),this.register((0,p.addDisposableDomListener)(P,"touchstart",(_e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(_e),this.cancel(_e)}),{passive:!0})),this.register((0,p.addDisposableDomListener)(P,"touchmove",(_e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(_e)?void 0:this.cancel(_e)}),{passive:!1}))}refresh(Z,P){var ae;(ae=this._renderService)==null||ae.refreshRows(Z,P)}updateCursorStyle(Z){var P;(P=this._selectionService)!=null&&P.shouldColumnSelect(Z)?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(Z,P,ae=0){var ie;ae===1?(super.scrollLines(Z,P,ae),this.refresh(0,this.rows-1)):(ie=this.viewport)==null||ie.scrollLines(Z)}paste(Z){(0,d.paste)(Z,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Z){this._customKeyEventHandler=Z}attachCustomWheelEventHandler(Z){this._customWheelEventHandler=Z}registerLinkProvider(Z){return this._linkProviderService.registerLinkProvider(Z)}registerCharacterJoiner(Z){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const P=this._characterJoinerService.register(Z);return this.refresh(0,this.rows-1),P}deregisterCharacterJoiner(Z){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Z)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Z){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Z)}registerDecoration(Z){return this._decorationService.registerDecoration(Z)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Z,P,ae){this._selectionService.setSelection(Z,P,ae)}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 Z;(Z=this._selectionService)==null||Z.clearSelection()}selectAll(){var Z;(Z=this._selectionService)==null||Z.selectAll()}selectLines(Z,P){var ae;(ae=this._selectionService)==null||ae.selectLines(Z,P)}_keyDown(Z){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Z)===!1)return!1;const P=this.browser.isMac&&this.options.macOptionIsMeta&&Z.altKey;if(!P&&!this._compositionHelper.keydown(Z))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;P||Z.key!=="Dead"&&Z.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ae=(0,K.evaluateKeyboardEvent)(Z,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Z),ae.type===3||ae.type===2){const ie=this.rows-1;return this.scrollLines(ae.type===2?-ie:ie),this.cancel(Z,!0)}return ae.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Z)||(ae.cancel&&this.cancel(Z,!0),!ae.key||!!(Z.key&&!Z.ctrlKey&&!Z.altKey&&!Z.metaKey&&Z.key.length===1&&Z.key.charCodeAt(0)>=65&&Z.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ae.key!==G.C0.ETX&&ae.key!==G.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ae.key,domEvent:Z}),this._showCursor(),this.coreService.triggerDataEvent(ae.key,!0),!this.optionsService.rawOptions.screenReaderMode||Z.altKey||Z.ctrlKey?this.cancel(Z,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Z,P){const ae=Z.isMac&&!this.options.macOptionIsMeta&&P.altKey&&!P.ctrlKey&&!P.metaKey||Z.isWindows&&P.altKey&&P.ctrlKey&&!P.metaKey||Z.isWindows&&P.getModifierState("AltGraph");return P.type==="keypress"?ae:ae&&(!P.keyCode||P.keyCode>47)}_keyUp(Z){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Z)===!1||((function(P){return P.keyCode===16||P.keyCode===17||P.keyCode===18})(Z)||this.focus(),this.updateCursorStyle(Z),this._keyPressHandled=!1)}_keyPress(Z){let P;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Z)===!1)return!1;if(this.cancel(Z),Z.charCode)P=Z.charCode;else if(Z.which===null||Z.which===void 0)P=Z.keyCode;else{if(Z.which===0||Z.charCode===0)return!1;P=Z.which}return!(!P||(Z.altKey||Z.ctrlKey||Z.metaKey)&&!this._isThirdLevelShift(this.browser,Z)||(P=String.fromCharCode(P),this._onKey.fire({key:P,domEvent:Z}),this._showCursor(),this.coreService.triggerDataEvent(P,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Z){if(Z.data&&Z.inputType==="insertText"&&(!Z.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const P=Z.data;return this.coreService.triggerDataEvent(P,!0),this.cancel(Z),!0}return!1}resize(Z,P){Z!==this.cols||P!==this.rows?super.resize(Z,P):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Z,P){var ae,ie;(ae=this._charSizeService)==null||ae.measure(),(ie=this.viewport)==null||ie.syncScrollArea(!0)}clear(){var Z;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 P=1;P<this.rows;P++)this.buffer.lines.push(this.buffer.getBlankLine(q.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(Z=this.viewport)==null||Z.reset(),this.refresh(0,this.rows-1)}}reset(){var P,ae;this.options.rows=this.rows,this.options.cols=this.cols;const Z=this._customKeyEventHandler;this._setup(),super.reset(),(P=this._selectionService)==null||P.reset(),this._decorationService.reset(),(ae=this.viewport)==null||ae.reset(),this._customKeyEventHandler=Z,this.refresh(0,this.rows-1)}clearTextureAtlas(){var Z;(Z=this._renderService)==null||Z.clearTextureAtlas()}_reportFocus(){var Z;(Z=this.element)!=null&&Z.classList.contains("focus")?this.coreService.triggerDataEvent(G.C0.ESC+"[I"):this.coreService.triggerDataEvent(G.C0.ESC+"[O")}_reportWindowsOptions(Z){if(this._renderService)switch(Z){case F.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const P=this._renderService.dimensions.css.canvas.width.toFixed(0),ae=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${G.C0.ESC}[4;${ae};${P}t`);break;case F.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ie=this._renderService.dimensions.css.cell.width.toFixed(0),ve=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${G.C0.ESC}[6;${ve};${ie}t`)}}cancel(Z,P){if(this.options.cancelEvents||P)return Z.preventDefault(),Z.stopPropagation(),!1}}n.Terminal=le},9924:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(h,d=1e3){this._renderCallback=h,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(h,d,p){this._rowCount=p,h=h!==void 0?h:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const l=Date.now();if(l-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=l,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=l-this._lastRefreshMs,C=this._debounceThresholdMS-g;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),C)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const h=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,d)}}},1680:function(A,n,h){var d=this&&this.__decorate||function(c,o,u,S){var D,b=arguments.length,E=b<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,u):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,u,S);else for(var w=c.length-1;w>=0;w--)(D=c[w])&&(E=(b<3?D(E):b>3?D(o,u,E):D(o,u))||E);return b>3&&E&&Object.defineProperty(o,u,E),E},p=this&&this.__param||function(c,o){return function(u,S){o(u,S,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const l=h(3656),g=h(4725),C=h(8460),L=h(844),_=h(2585);let a=n.Viewport=class extends L.Disposable{constructor(c,o,u,S,D,b,E,w){super(),this._viewportElement=c,this._scrollArea=o,this._bufferService=u,this._optionsService=S,this._charSizeService=D,this._renderService=b,this._coreBrowserService=E,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new C.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,l.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((R=>this._activeBuffer=R.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((R=>this._renderDimensions=R))),this._handleThemeChange(w.colors),this.register(w.onChangeColors((R=>this._handleThemeChange(R)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(c){this._viewportElement.style.backgroundColor=c.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(c){if(c)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 o=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==o&&(this._lastRecordedBufferHeight=o,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const c=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==c&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=c),this._refreshAnimationFrame=null}syncScrollArea(c=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(c);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(c)}_handleScroll(c){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 o=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const c=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(c*(this._smoothScrollState.target-this._smoothScrollState.origin)),c<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(c,o){const u=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&u<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const o=this._getPixelsScrolled(c);return o!==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+o:this._smoothScrollState.target+=o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=o,this._bubbleScroll(c,o))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:c,suppressScrollEvent:!1})}_getPixelsScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let o=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(c,o){var w;let u,S="";const D=[],b=o??this._bufferService.buffer.lines.length,E=this._bufferService.buffer.lines;for(let R=c;R<b;R++){const N=E.get(R);if(!N)continue;const z=(w=E.get(R+1))==null?void 0:w.isWrapped;if(S+=N.translateToString(!z),!z||R===E.length-1){const I=document.createElement("div");I.textContent=S,D.push(I),S.length>0&&(u=I),S=""}}return{bufferElements:D,cursorElement:u}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let o=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=this._currentRowHeight+0,this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(c,o){const u=this._optionsService.rawOptions.fastScrollModifier;return u==="alt"&&o.altKey||u==="ctrl"&&o.ctrlKey||u==="shift"&&o.shiftKey?c*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:c*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(c){this._lastTouchY=c.touches[0].pageY}handleTouchMove(c){const o=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(c,o))}};n.Viewport=a=d([p(2,_.IBufferService),p(3,_.IOptionsService),p(4,g.ICharSizeService),p(5,g.IRenderService),p(6,g.ICoreBrowserService),p(7,g.IThemeService)],a)},3107:function(A,n,h){var d=this&&this.__decorate||function(_,a,c,o){var u,S=arguments.length,D=S<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,c):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(_,a,c,o);else for(var b=_.length-1;b>=0;b--)(u=_[b])&&(D=(S<3?u(D):S>3?u(a,c,D):u(a,c))||D);return S>3&&D&&Object.defineProperty(a,c,D),D},p=this&&this.__param||function(_,a){return function(c,o){a(c,o,_)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const l=h(4725),g=h(844),C=h(2585);let L=n.BufferDecorationRenderer=class extends g.Disposable{constructor(_,a,c,o,u){super(),this._screenElement=_,this._bufferService=a,this._coreBrowserService=c,this._decorationService=o,this._renderService=u,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((S=>this._removeDecoration(S)))),this.register((0,g.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 _ of this._decorationService.decorations)this._renderDecoration(_);this._dimensionsChanged=!1}_renderDecoration(_){this._refreshStyle(_),this._dimensionsChanged&&this._refreshXPosition(_)}_createElement(_){var o;const a=this._coreBrowserService.mainDocument.createElement("div");a.classList.add("xterm-decoration"),a.classList.toggle("xterm-decoration-top-layer",((o=_==null?void 0:_.options)==null?void 0:o.layer)==="top"),a.style.width=`${Math.round((_.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,a.style.height=(_.options.height||1)*this._renderService.dimensions.css.cell.height+"px",a.style.top=(_.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",a.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const c=_.options.x??0;return c&&c>this._bufferService.cols&&(a.style.display="none"),this._refreshXPosition(_,a),a}_refreshStyle(_){const a=_.marker.line-this._bufferService.buffers.active.ydisp;if(a<0||a>=this._bufferService.rows)_.element&&(_.element.style.display="none",_.onRenderEmitter.fire(_.element));else{let c=this._decorationElements.get(_);c||(c=this._createElement(_),_.element=c,this._decorationElements.set(_,c),this._container.appendChild(c),_.onDispose((()=>{this._decorationElements.delete(_),c.remove()}))),c.style.top=a*this._renderService.dimensions.css.cell.height+"px",c.style.display=this._altBufferIsActive?"none":"block",_.onRenderEmitter.fire(c)}}_refreshXPosition(_,a=_.element){if(!a)return;const c=_.options.x??0;(_.options.anchor||"left")==="right"?a.style.right=c?c*this._renderService.dimensions.css.cell.width+"px":"":a.style.left=c?c*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(_){var a;(a=this._decorationElements.get(_))==null||a.remove(),this._decorationElements.delete(_),_.dispose()}};n.BufferDecorationRenderer=L=d([p(1,C.IBufferService),p(2,l.ICoreBrowserService),p(3,C.IDecorationService),p(4,l.IRenderService)],L)},5871:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorZoneStore=void 0,n.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(h){if(h.options.overviewRulerOptions){for(const d of this._zones)if(d.color===h.options.overviewRulerOptions.color&&d.position===h.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,h.marker.line))return;if(this._lineAdjacentToZone(d,h.marker.line,h.options.overviewRulerOptions.position))return void this._addLineToZone(d,h.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=h.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=h.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=h.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=h.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:h.options.overviewRulerOptions.color,position:h.options.overviewRulerOptions.position,startBufferLine:h.marker.line,endBufferLine:h.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(h){this._linePadding=h}_lineIntersectsZone(h,d){return d>=h.startBufferLine&&d<=h.endBufferLine}_lineAdjacentToZone(h,d,p){return d>=h.startBufferLine-this._linePadding[p||"full"]&&d<=h.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(h,d){h.startBufferLine=Math.min(h.startBufferLine,d),h.endBufferLine=Math.max(h.endBufferLine,d)}}},5744:function(A,n,h){var d=this&&this.__decorate||function(u,S,D,b){var E,w=arguments.length,R=w<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,D):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(u,S,D,b);else for(var N=u.length-1;N>=0;N--)(E=u[N])&&(R=(w<3?E(R):w>3?E(S,D,R):E(S,D))||R);return w>3&&R&&Object.defineProperty(S,D,R),R},p=this&&this.__param||function(u,S){return function(D,b){S(D,b,u)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const l=h(5871),g=h(4725),C=h(844),L=h(2585),_={full:0,left:0,center:0,right:0},a={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0};let o=n.OverviewRulerRenderer=class extends C.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(u,S,D,b,E,w,R){var z;super(),this._viewportElement=u,this._screenElement=S,this._bufferService=D,this._decorationService=b,this._renderService=E,this._optionsService=w,this._coreBrowserService=R,this._colorZoneStore=new l.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(),(z=this._viewportElement.parentElement)==null||z.insertBefore(this._canvas,this._viewportElement);const N=this._canvas.getContext("2d");if(!N)throw new Error("Ctx cannot be null");this._ctx=N,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,C.toDisposable)((()=>{var I;(I=this._canvas)==null||I.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 u=Math.floor(this._canvas.width/3),S=Math.ceil(this._canvas.width/3);a.full=this._canvas.width,a.left=u,a.center=S,a.right=u,this._refreshDrawHeightConstants(),c.full=0,c.left=0,c.center=a.left,c.right=a.left+a.center}_refreshDrawHeightConstants(){_.full=Math.round(2*this._coreBrowserService.dpr);const u=this._canvas.height/this._bufferService.buffer.lines.length,S=Math.round(Math.max(Math.min(u,12),6)*this._coreBrowserService.dpr);_.left=S,_.center=S,_.right=S}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.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 S of this._decorationService.decorations)this._colorZoneStore.addDecoration(S);this._ctx.lineWidth=1;const u=this._colorZoneStore.zones;for(const S of u)S.position!=="full"&&this._renderColorZone(S);for(const S of u)S.position==="full"&&this._renderColorZone(S);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(u){this._ctx.fillStyle=u.color,this._ctx.fillRect(c[u.position||"full"],Math.round((this._canvas.height-1)*(u.startBufferLine/this._bufferService.buffers.active.lines.length)-_[u.position||"full"]/2),a[u.position||"full"],Math.round((this._canvas.height-1)*((u.endBufferLine-u.startBufferLine)/this._bufferService.buffers.active.lines.length)+_[u.position||"full"]))}_queueRefresh(u,S){this._shouldUpdateDimensions=u||this._shouldUpdateDimensions,this._shouldUpdateAnchor=S||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};n.OverviewRulerRenderer=o=d([p(2,L.IBufferService),p(3,L.IDecorationService),p(4,g.IRenderService),p(5,L.IOptionsService),p(6,g.ICoreBrowserService)],o)},2950:function(A,n,h){var d=this&&this.__decorate||function(_,a,c,o){var u,S=arguments.length,D=S<3?a:o===null?o=Object.getOwnPropertyDescriptor(a,c):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(_,a,c,o);else for(var b=_.length-1;b>=0;b--)(u=_[b])&&(D=(S<3?u(D):S>3?u(a,c,D):u(a,c))||D);return S>3&&D&&Object.defineProperty(a,c,D),D},p=this&&this.__param||function(_,a){return function(c,o){a(c,o,_)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const l=h(4725),g=h(2585),C=h(2584);let L=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(_,a,c,o,u,S){this._textarea=_,this._compositionView=a,this._bufferService=c,this._optionsService=o,this._coreService=u,this._renderService=S,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(_){this._compositionView.textContent=_.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(_){if(this._isComposing||this._isSendingComposition){if(_.keyCode===229||_.keyCode===16||_.keyCode===17||_.keyCode===18)return!1;this._finalizeComposition(!1)}return _.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(_){if(this._compositionView.classList.remove("active"),this._isComposing=!1,_){const a={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,a.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(a.start,a.end):this._textarea.value.substring(a.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const a=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(a,!0)}}_handleAnyTextareaChanges(){const _=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const a=this._textarea.value,c=a.replace(_,"");this._dataAlreadySent=c,a.length>_.length?this._coreService.triggerDataEvent(c,!0):a.length<_.length?this._coreService.triggerDataEvent(`${C.C0.DEL}`,!0):a.length===_.length&&a!==_&&this._coreService.triggerDataEvent(a,!0)}}),0)}updateCompositionElements(_){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const a=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,u=a*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=u+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=c+"px",this._compositionView.style.lineHeight=c+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const S=this._compositionView.getBoundingClientRect();this._textarea.style.left=u+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(S.width,1)+"px",this._textarea.style.height=Math.max(S.height,1)+"px",this._textarea.style.lineHeight=S.height+"px"}_||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};n.CompositionHelper=L=d([p(2,g.IBufferService),p(3,g.IOptionsService),p(4,g.ICoreService),p(5,l.IRenderService)],L)},9806:(A,n)=>{function h(d,p,l){const g=l.getBoundingClientRect(),C=d.getComputedStyle(l),L=parseInt(C.getPropertyValue("padding-left")),_=parseInt(C.getPropertyValue("padding-top"));return[p.clientX-g.left-L,p.clientY-g.top-_]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=h,n.getCoords=function(d,p,l,g,C,L,_,a,c){if(!L)return;const o=h(d,p,l);return o?(o[0]=Math.ceil((o[0]+(c?_/2:0))/_),o[1]=Math.ceil(o[1]/a),o[0]=Math.min(Math.max(o[0],1),g+(c?1:0)),o[1]=Math.min(Math.max(o[1],1),C),o):void 0}},9504:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const d=h(2584);function p(a,c,o,u){const S=a-l(a,o),D=c-l(c,o),b=Math.abs(S-D)-(function(E,w,R){let N=0;const z=E-l(E,R),I=w-l(w,R);for(let U=0;U<Math.abs(z-I);U++){const Y=g(E,w)==="A"?-1:1,X=R.buffer.lines.get(z+Y*U);X!=null&&X.isWrapped&&N++}return N})(a,c,o);return _(b,L(g(a,c),u))}function l(a,c){let o=0,u=c.buffer.lines.get(a),S=u==null?void 0:u.isWrapped;for(;S&&a>=0&&a<c.rows;)o++,u=c.buffer.lines.get(--a),S=u==null?void 0:u.isWrapped;return o}function g(a,c){return a>c?"A":"B"}function C(a,c,o,u,S,D){let b=a,E=c,w="";for(;b!==o||E!==u;)b+=S?1:-1,S&&b>D.cols-1?(w+=D.buffer.translateBufferLineToString(E,!1,a,b),b=0,a=0,E++):!S&&b<0&&(w+=D.buffer.translateBufferLineToString(E,!1,0,a+1),b=D.cols-1,a=b,E--);return w+D.buffer.translateBufferLineToString(E,!1,a,b)}function L(a,c){const o=c?"O":"[";return d.C0.ESC+o+a}function _(a,c){a=Math.floor(a);let o="";for(let u=0;u<a;u++)o+=c;return o}n.moveToCellSequence=function(a,c,o,u){const S=o.buffer.x,D=o.buffer.y;if(!o.buffer.hasScrollback)return(function(w,R,N,z,I,U){return p(R,z,I,U).length===0?"":_(C(w,R,w,R-l(R,I),!1,I).length,L("D",U))})(S,D,0,c,o,u)+p(D,c,o,u)+(function(w,R,N,z,I,U){let Y;Y=p(R,z,I,U).length>0?z-l(z,I):R;const X=z,q=(function(G,K,H,W,j,F){let V;return V=p(H,W,j,F).length>0?W-l(W,j):K,G<H&&V<=W||G>=H&&V<W?"C":"D"})(w,R,N,z,I,U);return _(C(w,Y,N,X,q==="C",I).length,L(q,U))})(S,D,a,c,o,u);let b;if(D===c)return b=S>a?"D":"C",_(Math.abs(S-a),L(b,u));b=D>c?"D":"C";const E=Math.abs(D-c);return _((function(w,R){return R.cols-w})(D>c?a:S,o)+(E-1)*o.cols+1+((D>c?S:a)-1),L(b,u))}},1296:function(A,n,h){var d=this&&this.__decorate||function(U,Y,X,q){var G,K=arguments.length,H=K<3?Y:q===null?q=Object.getOwnPropertyDescriptor(Y,X):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(U,Y,X,q);else for(var W=U.length-1;W>=0;W--)(G=U[W])&&(H=(K<3?G(H):K>3?G(Y,X,H):G(Y,X))||H);return K>3&&H&&Object.defineProperty(Y,X,H),H},p=this&&this.__param||function(U,Y){return function(X,q){Y(X,q,U)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const l=h(3787),g=h(2550),C=h(2223),L=h(6171),_=h(6052),a=h(4725),c=h(8055),o=h(8460),u=h(844),S=h(2585),D="xterm-dom-renderer-owner-",b="xterm-rows",E="xterm-fg-",w="xterm-bg-",R="xterm-focus",N="xterm-selection";let z=1,I=n.DomRenderer=class extends u.Disposable{constructor(U,Y,X,q,G,K,H,W,j,F,V,ee,le){super(),this._terminal=U,this._document=Y,this._element=X,this._screenElement=q,this._viewportElement=G,this._helperContainer=K,this._linkifier2=H,this._charSizeService=j,this._optionsService=F,this._bufferService=V,this._coreBrowserService=ee,this._themeService=le,this._terminalClass=z++,this._rowElements=[],this._selectionRenderModel=(0,_.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(b),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(N),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,L.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ue=>this._injectCss(ue)))),this._injectCss(this._themeService.colors),this._rowFactory=W.createInstance(l.DomRendererRowFactory,document),this._element.classList.add(D+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ue=>this._handleLinkHover(ue)))),this.register(this._linkifier2.onHideLinkUnderline((ue=>this._handleLinkLeave(ue)))),this.register((0,u.toDisposable)((()=>{this._element.classList.remove(D+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new g.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 U=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*U,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*U),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/U),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/U),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 X of this._rowElements)X.style.width=`${this.dimensions.css.canvas.width}px`,X.style.height=`${this.dimensions.css.cell.height}px`,X.style.lineHeight=`${this.dimensions.css.cell.height}px`,X.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Y=`${this._terminalSelector} .${b} 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(U){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Y=`${this._terminalSelector} .${b} { color: ${U.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Y+=`${this._terminalSelector} .${b} .xterm-dim { color: ${c.color.multiplyOpacity(U.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 X=`blink_underline_${this._terminalClass}`,q=`blink_bar_${this._terminalClass}`,G=`blink_block_${this._terminalClass}`;Y+=`@keyframes ${X} { 50% { border-bottom-style: hidden; }}`,Y+=`@keyframes ${q} { 50% { box-shadow: none; }}`,Y+=`@keyframes ${G} { 0% { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css}; } 50% { background-color: inherit; color: ${U.cursor.css}; }}`,Y+=`${this._terminalSelector} .${b}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${b}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${b}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${G} 1s step-end infinite;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-block { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css};}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${U.cursor.css} !important; color: ${U.cursorAccent.css} !important;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${U.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${U.cursor.css} inset;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${U.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Y+=`${this._terminalSelector} .${N} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${N} div { position: absolute; background-color: ${U.selectionBackgroundOpaque.css};}${this._terminalSelector} .${N} div { position: absolute; background-color: ${U.selectionInactiveBackgroundOpaque.css};}`;for(const[K,H]of U.ansi.entries())Y+=`${this._terminalSelector} .${E}${K} { color: ${H.css}; }${this._terminalSelector} .${E}${K}.xterm-dim { color: ${c.color.multiplyOpacity(H,.5).css}; }${this._terminalSelector} .${w}${K} { background-color: ${H.css}; }`;Y+=`${this._terminalSelector} .${E}${C.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(U.background).css}; }${this._terminalSelector} .${E}${C.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(U.background),.5).css}; }${this._terminalSelector} .${w}${C.INVERTED_DEFAULT_COLOR} { background-color: ${U.foreground.css}; }`,this._themeStyleElement.textContent=Y}_setDefaultSpacing(){const U=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${U}px`,this._rowFactory.defaultSpacing=U}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(U,Y){for(let X=this._rowElements.length;X<=Y;X++){const q=this._document.createElement("div");this._rowContainer.appendChild(q),this._rowElements.push(q)}for(;this._rowElements.length>Y;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(U,Y){this._refreshRowElements(U,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(R),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(R),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(U,Y,X){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(U,Y,X),this.renderRows(0,this._bufferService.rows-1),!U||!Y)return;this._selectionRenderModel.update(this._terminal,U,Y,X);const q=this._selectionRenderModel.viewportStartRow,G=this._selectionRenderModel.viewportEndRow,K=this._selectionRenderModel.viewportCappedStartRow,H=this._selectionRenderModel.viewportCappedEndRow;if(K>=this._bufferService.rows||H<0)return;const W=this._document.createDocumentFragment();if(X){const j=U[0]>Y[0];W.appendChild(this._createSelectionElement(K,j?Y[0]:U[0],j?U[0]:Y[0],H-K+1))}else{const j=q===K?U[0]:0,F=K===G?Y[0]:this._bufferService.cols;W.appendChild(this._createSelectionElement(K,j,F));const V=H-K-1;if(W.appendChild(this._createSelectionElement(K+1,0,this._bufferService.cols,V)),K!==H){const ee=G===H?Y[0]:this._bufferService.cols;W.appendChild(this._createSelectionElement(H,0,ee))}}this._selectionContainer.appendChild(W)}_createSelectionElement(U,Y,X,q=1){const G=this._document.createElement("div"),K=Y*this.dimensions.css.cell.width;let H=this.dimensions.css.cell.width*(X-Y);return K+H>this.dimensions.css.canvas.width&&(H=this.dimensions.css.canvas.width-K),G.style.height=q*this.dimensions.css.cell.height+"px",G.style.top=U*this.dimensions.css.cell.height+"px",G.style.left=`${K}px`,G.style.width=`${H}px`,G}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 U of this._rowElements)U.replaceChildren()}renderRows(U,Y){const X=this._bufferService.buffer,q=X.ybase+X.y,G=Math.min(X.x,this._bufferService.cols-1),K=this._optionsService.rawOptions.cursorBlink,H=this._optionsService.rawOptions.cursorStyle,W=this._optionsService.rawOptions.cursorInactiveStyle;for(let j=U;j<=Y;j++){const F=j+X.ydisp,V=this._rowElements[j],ee=X.lines.get(F);if(!V||!ee)break;V.replaceChildren(...this._rowFactory.createRow(ee,F,F===q,H,W,G,K,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${D}${this._terminalClass}`}_handleLinkHover(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!0)}_handleLinkLeave(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!1)}_setCellUnderline(U,Y,X,q,G,K){X<0&&(U=0),q<0&&(Y=0);const H=this._bufferService.rows-1;X=Math.max(Math.min(X,H),0),q=Math.max(Math.min(q,H),0),G=Math.min(G,this._bufferService.cols);const W=this._bufferService.buffer,j=W.ybase+W.y,F=Math.min(W.x,G-1),V=this._optionsService.rawOptions.cursorBlink,ee=this._optionsService.rawOptions.cursorStyle,le=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=X;ue<=q;++ue){const Z=ue+W.ydisp,P=this._rowElements[ue],ae=W.lines.get(Z);if(!P||!ae)break;P.replaceChildren(...this._rowFactory.createRow(ae,Z,Z===j,ee,le,F,V,this.dimensions.css.cell.width,this._widthCache,K?ue===X?U:0:-1,K?(ue===q?Y:G)-1:-1))}}};n.DomRenderer=I=d([p(7,S.IInstantiationService),p(8,a.ICharSizeService),p(9,S.IOptionsService),p(10,S.IBufferService),p(11,a.ICoreBrowserService),p(12,a.IThemeService)],I)},3787:function(A,n,h){var d=this&&this.__decorate||function(b,E,w,R){var N,z=arguments.length,I=z<3?E:R===null?R=Object.getOwnPropertyDescriptor(E,w):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(b,E,w,R);else for(var U=b.length-1;U>=0;U--)(N=b[U])&&(I=(z<3?N(I):z>3?N(E,w,I):N(E,w))||I);return z>3&&I&&Object.defineProperty(E,w,I),I},p=this&&this.__param||function(b,E){return function(w,R){E(w,R,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const l=h(2223),g=h(643),C=h(511),L=h(2585),_=h(8055),a=h(4725),c=h(4269),o=h(6171),u=h(3734);let S=n.DomRendererRowFactory=class{constructor(b,E,w,R,N,z,I){this._document=b,this._characterJoinerService=E,this._optionsService=w,this._coreBrowserService=R,this._coreService=N,this._decorationService=z,this._themeService=I,this._workCell=new C.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(b,E,w){this._selectionStart=b,this._selectionEnd=E,this._columnSelectMode=w}createRow(b,E,w,R,N,z,I,U,Y,X,q){const G=[],K=this._characterJoinerService.getJoinedCharacters(E),H=this._themeService.colors;let W,j=b.getNoBgTrimmedLength();w&&j<z+1&&(j=z+1);let F=0,V="",ee=0,le=0,ue=0,Z=!1,P=0,ae=!1,ie=0;const ve=[],_e=X!==-1&&q!==-1;for(let Ee=0;Ee<j;Ee++){b.loadCell(Ee,this._workCell);let pe=this._workCell.getWidth();if(pe===0)continue;let ke=!1,$e=Ee,be=this._workCell;if(K.length>0&&Ee===K[0][0]){ke=!0;const Le=K.shift();be=new c.JoinedCellData(this._workCell,b.translateToString(!0,Le[0],Le[1]),Le[1]-Le[0]),$e=Le[1]-1,pe=be.getWidth()}const Ht=this._isCellInSelection(Ee,E),pt=w&&Ee===z,Re=_e&&Ee>=X&&Ee<=q;let Me=!1;this._decorationService.forEachDecorationAtCell(Ee,E,void 0,(Le=>{Me=!0}));let Ce=be.getChars()||g.WHITESPACE_CELL_CHAR;if(Ce===" "&&(be.isUnderline()||be.isOverline())&&(Ce=" "),ie=pe*U-Y.get(Ce,be.isBold(),be.isItalic()),W){if(F&&(Ht&&ae||!Ht&&!ae&&be.bg===ee)&&(Ht&&ae&&H.selectionForeground||be.fg===le)&&be.extended.ext===ue&&Re===Z&&ie===P&&!pt&&!ke&&!Me){be.isInvisible()?V+=g.WHITESPACE_CELL_CHAR:V+=Ce,F++;continue}F&&(W.textContent=V),W=this._document.createElement("span"),F=0,V=""}else W=this._document.createElement("span");if(ee=be.bg,le=be.fg,ue=be.extended.ext,Z=Re,P=ie,ae=Ht,ke&&z>=Ee&&z<=$e&&(z=Ee),!this._coreService.isCursorHidden&&pt&&this._coreService.isCursorInitialized){if(ve.push("xterm-cursor"),this._coreBrowserService.isFocused)I&&ve.push("xterm-cursor-blink"),ve.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(N)switch(N){case"outline":ve.push("xterm-cursor-outline");break;case"block":ve.push("xterm-cursor-block");break;case"bar":ve.push("xterm-cursor-bar");break;case"underline":ve.push("xterm-cursor-underline")}}if(be.isBold()&&ve.push("xterm-bold"),be.isItalic()&&ve.push("xterm-italic"),be.isDim()&&ve.push("xterm-dim"),V=be.isInvisible()?g.WHITESPACE_CELL_CHAR:be.getChars()||g.WHITESPACE_CELL_CHAR,be.isUnderline()&&(ve.push(`xterm-underline-${be.extended.underlineStyle}`),V===" "&&(V=" "),!be.isUnderlineColorDefault()))if(be.isUnderlineColorRGB())W.style.textDecorationColor=`rgb(${u.AttributeData.toColorRGB(be.getUnderlineColor()).join(",")})`;else{let Le=be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&be.isBold()&&Le<8&&(Le+=8),W.style.textDecorationColor=H.ansi[Le].css}be.isOverline()&&(ve.push("xterm-overline"),V===" "&&(V=" ")),be.isStrikethrough()&&ve.push("xterm-strikethrough"),Re&&(W.style.textDecoration="underline");let ge=be.getFgColor(),xe=be.getFgColorMode(),nt=be.getBgColor(),Ue=be.getBgColorMode();const Dt=!!be.isInverse();if(Dt){const Le=ge;ge=nt,nt=Le;const ei=xe;xe=Ue,Ue=ei}let tt,mt,Fe,Ne=!1;switch(this._decorationService.forEachDecorationAtCell(Ee,E,void 0,(Le=>{Le.options.layer!=="top"&&Ne||(Le.backgroundColorRGB&&(Ue=50331648,nt=Le.backgroundColorRGB.rgba>>8&16777215,tt=Le.backgroundColorRGB),Le.foregroundColorRGB&&(xe=50331648,ge=Le.foregroundColorRGB.rgba>>8&16777215,mt=Le.foregroundColorRGB),Ne=Le.options.layer==="top")})),!Ne&&Ht&&(tt=this._coreBrowserService.isFocused?H.selectionBackgroundOpaque:H.selectionInactiveBackgroundOpaque,nt=tt.rgba>>8&16777215,Ue=50331648,Ne=!0,H.selectionForeground&&(xe=50331648,ge=H.selectionForeground.rgba>>8&16777215,mt=H.selectionForeground)),Ne&&ve.push("xterm-decoration-top"),Ue){case 16777216:case 33554432:Fe=H.ansi[nt],ve.push(`xterm-bg-${nt}`);break;case 50331648:Fe=_.channels.toColor(nt>>16,nt>>8&255,255&nt),this._addStyle(W,`background-color:#${D((nt>>>0).toString(16),"0",6)}`);break;default:Dt?(Fe=H.foreground,ve.push(`xterm-bg-${l.INVERTED_DEFAULT_COLOR}`)):Fe=H.background}switch(tt||be.isDim()&&(tt=_.color.multiplyOpacity(Fe,.5)),xe){case 16777216:case 33554432:be.isBold()&&ge<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ge+=8),this._applyMinimumContrast(W,Fe,H.ansi[ge],be,tt,void 0)||ve.push(`xterm-fg-${ge}`);break;case 50331648:const Le=_.channels.toColor(ge>>16&255,ge>>8&255,255&ge);this._applyMinimumContrast(W,Fe,Le,be,tt,mt)||this._addStyle(W,`color:#${D(ge.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(W,Fe,H.foreground,be,tt,mt)||Dt&&ve.push(`xterm-fg-${l.INVERTED_DEFAULT_COLOR}`)}ve.length&&(W.className=ve.join(" "),ve.length=0),pt||ke||Me?W.textContent=V:F++,ie!==this.defaultSpacing&&(W.style.letterSpacing=`${ie}px`),G.push(W),Ee=$e}return W&&F&&(W.textContent=V),G}_applyMinimumContrast(b,E,w,R,N,z){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const I=this._getContrastCache(R);let U;if(N||z||(U=I.getColor(E.rgba,w.rgba)),U===void 0){const Y=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);U=_.color.ensureContrastRatio(N||E,z||w,Y),I.setColor((N||E).rgba,(z||w).rgba,U??null)}return!!U&&(this._addStyle(b,`color:${U.css}`),!0)}_getContrastCache(b){return b.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(b,E){b.setAttribute("style",`${b.getAttribute("style")||""}${E};`)}_isCellInSelection(b,E){const w=this._selectionStart,R=this._selectionEnd;return!(!w||!R)&&(this._columnSelectMode?w[0]<=R[0]?b>=w[0]&&E>=w[1]&&b<R[0]&&E<=R[1]:b<w[0]&&E>=w[1]&&b>=R[0]&&E<=R[1]:E>w[1]&&E<R[1]||w[1]===R[1]&&E===w[1]&&b>=w[0]&&b<R[0]||w[1]<R[1]&&E===R[1]&&b<R[0]||w[1]<R[1]&&E===w[1]&&b>=w[0])}};function D(b,E,w){for(;b.length<w;)b=E+b;return b}n.DomRendererRowFactory=S=d([p(1,a.ICharacterJoinerService),p(2,L.IOptionsService),p(3,a.ICoreBrowserService),p(4,L.ICoreService),p(5,L.IDecorationService),p(6,a.IThemeService)],S)},2550:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(h,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=h.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const p=h.createElement("span");p.classList.add("xterm-char-measure-element");const l=h.createElement("span");l.classList.add("xterm-char-measure-element"),l.style.fontWeight="bold";const g=h.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontStyle="italic";const C=h.createElement("span");C.classList.add("xterm-char-measure-element"),C.style.fontWeight="bold",C.style.fontStyle="italic",this._measureElements=[p,l,g,C],this._container.appendChild(p),this._container.appendChild(l),this._container.appendChild(g),this._container.appendChild(C),d.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(h,d,p,l){h===this._font&&d===this._fontSize&&p===this._weight&&l===this._weightBold||(this._font=h,this._fontSize=d,this._weight=p,this._weightBold=l,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${l}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${l}`,this.clear())}get(h,d,p){let l=0;if(!d&&!p&&h.length===1&&(l=h.charCodeAt(0))<256){if(this._flat[l]!==-9999)return this._flat[l];const L=this._measure(h,0);return L>0&&(this._flat[l]=L),L}let g=h;d&&(g+="B"),p&&(g+="I");let C=this._holey.get(g);if(C===void 0){let L=0;d&&(L|=1),p&&(L|=2),C=this._measure(h,L),C>0&&this._holey.set(g,C)}return C}_measure(h,d){const p=this._measureElements[d];return p.textContent=h.repeat(32),p.offsetWidth/32}}},2223:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const d=h(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(A,n)=>{function h(p){return 57508<=p&&p<=57558}function d(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(n,"__esModule",{value:!0}),n.computeNextVariantOffset=n.createRenderDimensions=n.treatGlyphAsBackgroundColor=n.allowRescaling=n.isEmoji=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},n.isPowerlineGlyph=h,n.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},n.isEmoji=d,n.allowRescaling=function(p,l,g,C){return l===1&&g>Math.ceil(1.5*C)&&p!==void 0&&p>255&&!d(p)&&!h(p)&&!(function(L){return 57344<=L&&L<=63743})(p)},n.treatGlyphAsBackgroundColor=function(p){return h(p)||(function(l){return 9472<=l&&l<=9631})(p)},n.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}}}},n.computeNextVariantOffset=function(p,l,g=0){return(p-(2*Math.round(l)-g))%(2*Math.round(l))}},6052:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class h{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,l,g,C=!1){if(this.selectionStart=l,this.selectionEnd=g,!l||!g||l[0]===g[0]&&l[1]===g[1])return void this.clear();const L=p.buffers.active.ydisp,_=l[1]-L,a=g[1]-L,c=Math.max(_,0),o=Math.min(a,p.rows-1);c>=p.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=C,this.viewportStartRow=_,this.viewportEndRow=a,this.viewportCappedStartRow=c,this.viewportCappedEndRow=o,this.startCol=l[0],this.endCol=g[0])}isCellSelected(p,l,g){return!!this.hasSelection&&(g-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?l>=this.startCol&&g>=this.viewportCappedStartRow&&l<this.endCol&&g<=this.viewportCappedEndRow:l<this.startCol&&g>=this.viewportCappedStartRow&&l>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&l>=this.startCol&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&l>=this.startCol)}}n.createSelectionRenderModel=function(){return new h}},456:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.SelectionModel=class{constructor(h){this._bufferService=h,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 h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?h%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)-1]:[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[Math.max(h,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const h=this.selectionStart,d=this.selectionEnd;return!(!h||!d)&&(h[1]>d[1]||h[1]===d[1]&&h[0]>d[0])}handleTrim(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(A,n,h){var d=this&&this.__decorate||function(o,u,S,D){var b,E=arguments.length,w=E<3?u:D===null?D=Object.getOwnPropertyDescriptor(u,S):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(o,u,S,D);else for(var R=o.length-1;R>=0;R--)(b=o[R])&&(w=(E<3?b(w):E>3?b(u,S,w):b(u,S))||w);return E>3&&w&&Object.defineProperty(u,S,w),w},p=this&&this.__param||function(o,u){return function(S,D){u(S,D,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const l=h(2585),g=h(8460),C=h(844);let L=n.CharSizeService=class extends C.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,u,S){super(),this._optionsService=S,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new c(this._optionsService))}catch{this._measureStrategy=this.register(new a(o,u,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())}};n.CharSizeService=L=d([p(2,l.IOptionsService)],L);class _ extends C.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(u,S){u!==void 0&&u>0&&S!==void 0&&S>0&&(this._result.width=u,this._result.height=S)}}class a extends _{constructor(u,S,D){super(),this._document=u,this._parentElement=S,this._optionsService=D,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 c extends _{constructor(u){super(),this._optionsService=u,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const S=this._ctx.measureText("W");if(!("width"in S&&"fontBoundingBoxAscent"in S&&"fontBoundingBoxDescent"in S))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const u=this._ctx.measureText("W");return this._validateAndSet(u.width,u.fontBoundingBoxAscent+u.fontBoundingBoxDescent),this._result}}},4269:function(A,n,h){var d=this&&this.__decorate||function(c,o,u,S){var D,b=arguments.length,E=b<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,u):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,u,S);else for(var w=c.length-1;w>=0;w--)(D=c[w])&&(E=(b<3?D(E):b>3?D(o,u,E):D(o,u))||E);return b>3&&E&&Object.defineProperty(o,u,E),E},p=this&&this.__param||function(c,o){return function(u,S){o(u,S,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const l=h(3734),g=h(643),C=h(511),L=h(2585);class _ extends l.AttributeData{constructor(o,u,S){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=u,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=_;let a=n.CharacterJoinerService=class ep{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(o){const u={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(u),u.id}deregister(o){for(let u=0;u<this._characterJoiners.length;u++)if(this._characterJoiners[u].id===o)return this._characterJoiners.splice(u,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const u=this._bufferService.buffer.lines.get(o);if(!u||u.length===0)return[];const S=[],D=u.translateToString(!0);let b=0,E=0,w=0,R=u.getFg(0),N=u.getBg(0);for(let z=0;z<u.getTrimmedLength();z++)if(u.loadCell(z,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==N){if(z-b>1){const I=this._getJoinedRanges(D,w,E,u,b);for(let U=0;U<I.length;U++)S.push(I[U])}b=z,w=E,R=this._workCell.fg,N=this._workCell.bg}E+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-b>1){const z=this._getJoinedRanges(D,w,E,u,b);for(let I=0;I<z.length;I++)S.push(z[I])}return S}_getJoinedRanges(o,u,S,D,b){const E=o.substring(u,S);let w=[];try{w=this._characterJoiners[0].handler(E)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const N=this._characterJoiners[R].handler(E);for(let z=0;z<N.length;z++)ep._mergeRanges(w,N[z])}catch(N){console.error(N)}return this._stringRangesToCellRanges(w,D,b),w}_stringRangesToCellRanges(o,u,S){let D=0,b=!1,E=0,w=o[D];if(w){for(let R=S;R<this._bufferService.cols;R++){const N=u.getWidth(R),z=u.getString(R).length||g.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!b&&w[0]<=E&&(w[0]=R,b=!0),w[1]<=E){if(w[1]=R,w=o[++D],!w)break;w[0]<=E?(w[0]=R,b=!0):b=!1}E+=z}}w&&(w[1]=this._bufferService.cols)}}static _mergeRanges(o,u){let S=!1;for(let D=0;D<o.length;D++){const b=o[D];if(S){if(u[1]<=b[0])return o[D-1][1]=u[1],o;if(u[1]<=b[1])return o[D-1][1]=Math.max(u[1],b[1]),o.splice(D,1),o;o.splice(D,1),D--}else{if(u[1]<=b[0])return o.splice(D,0,u),o;if(u[1]<=b[1])return b[0]=Math.min(u[0],b[0]),o;u[0]<b[1]&&(b[0]=Math.min(u[0],b[0]),S=!0)}}return S?o[o.length-1][1]=u[1]:o.push(u),o}};n.CharacterJoinerService=a=d([p(0,L.IBufferService)],a)},5114:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;const d=h(844),p=h(8460),l=h(3656);class g extends d.Disposable{constructor(_,a,c){super(),this._textarea=_,this._window=a,this.mainDocument=c,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new C(this._window),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new p.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((o=>this._screenDprMonitor.setWindow(o)))),this.register((0,p.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(_){this._window!==_&&(this._window=_,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}}n.CoreBrowserService=g;class C extends d.Disposable{constructor(_){super(),this._parentWindow=_,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(_){this._parentWindow=_,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,l.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var _;this._outerListener&&((_=this._resolutionMediaMatchList)==null||_.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,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkProviderService=void 0;const d=h(844);class p extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(g){return this.linkProviders.push(g),{dispose:()=>{const C=this.linkProviders.indexOf(g);C!==-1&&this.linkProviders.splice(C,1)}}}}n.LinkProviderService=p},8934:function(A,n,h){var d=this&&this.__decorate||function(L,_,a,c){var o,u=arguments.length,S=u<3?_:c===null?c=Object.getOwnPropertyDescriptor(_,a):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(L,_,a,c);else for(var D=L.length-1;D>=0;D--)(o=L[D])&&(S=(u<3?o(S):u>3?o(_,a,S):o(_,a))||S);return u>3&&S&&Object.defineProperty(_,a,S),S},p=this&&this.__param||function(L,_){return function(a,c){_(a,c,L)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const l=h(4725),g=h(9806);let C=n.MouseService=class{constructor(L,_){this._renderService=L,this._charSizeService=_}getCoords(L,_,a,c,o){return(0,g.getCoords)(window,L,_,a,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(L,_){const a=(0,g.getCoordsRelativeToElement)(window,L,_);if(this._charSizeService.hasValidSize)return a[0]=Math.min(Math.max(a[0],0),this._renderService.dimensions.css.canvas.width-1),a[1]=Math.min(Math.max(a[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(a[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(a[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(a[0]),y:Math.floor(a[1])}}};n.MouseService=C=d([p(0,l.IRenderService),p(1,l.ICharSizeService)],C)},3230:function(A,n,h){var d=this&&this.__decorate||function(o,u,S,D){var b,E=arguments.length,w=E<3?u:D===null?D=Object.getOwnPropertyDescriptor(u,S):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(o,u,S,D);else for(var R=o.length-1;R>=0;R--)(b=o[R])&&(w=(E<3?b(w):E>3?b(u,S,w):b(u,S))||w);return E>3&&w&&Object.defineProperty(u,S,w),w},p=this&&this.__param||function(o,u){return function(S,D){u(S,D,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const l=h(6193),g=h(4725),C=h(8460),L=h(844),_=h(7226),a=h(2585);let c=n.RenderService=class extends L.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,u,S,D,b,E,w,R){super(),this._rowCount=o,this._charSizeService=D,this._renderer=this.register(new L.MutableDisposable),this._pausedResizeTask=new _.DebouncedIdleTask,this._observerDisposable=this.register(new L.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new C.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new C.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new C.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new C.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new l.RenderDebouncer(((N,z)=>this._renderRows(N,z)),w),this.register(this._renderDebouncer),this.register(w.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(E.onResize((()=>this._fullRefresh()))),this.register(E.buffers.onBufferActivate((()=>{var N;return(N=this._renderer.value)==null?void 0:N.clear()}))),this.register(S.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(b.onDecorationRegistered((()=>this._fullRefresh()))),this.register(b.onDecorationRemoved((()=>this._fullRefresh()))),this.register(S.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()}))),this.register(S.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(E.buffer.y,E.buffer.y,!0)))),this.register(R.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(w.window,u),this.register(w.onWindowChange((N=>this._registerIntersectionObserver(N,u))))}_registerIntersectionObserver(o,u){if("IntersectionObserver"in o){const S=new o.IntersectionObserver((D=>this._handleIntersectionChange(D[D.length-1])),{threshold:0});S.observe(u),this._observerDisposable.value=(0,L.toDisposable)((()=>S.disconnect()))}}_handleIntersectionChange(o){this._isPaused=o.isIntersecting===void 0?o.intersectionRatio===0:!o.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(o,u,S=!1){this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,u,this._rowCount))}_renderRows(o,u){this._renderer.value&&(o=Math.min(o,this._rowCount-1),u=Math.min(u,this._rowCount-1),this._renderer.value.renderRows(o,u),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:o,end:u}),this._onRender.fire({start:o,end:u}),this._isNextRenderRedrawOnly=!0)}resize(o,u){this._rowCount=u,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(o){this._renderer.value=o,this._renderer.value&&(this._renderer.value.onRequestRedraw((u=>this.refreshRows(u.start,u.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(o){return this._renderDebouncer.addRefreshCallback(o)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var o,u;this._renderer.value&&((u=(o=this._renderer.value).clearTextureAtlas)==null||u.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,u){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var S;return(S=this._renderer.value)==null?void 0:S.handleResize(o,u)})):this._renderer.value.handleResize(o,u),this._fullRefresh())}handleCharSizeChanged(){var o;(o=this._renderer.value)==null||o.handleCharSizeChanged()}handleBlur(){var o;(o=this._renderer.value)==null||o.handleBlur()}handleFocus(){var o;(o=this._renderer.value)==null||o.handleFocus()}handleSelectionChanged(o,u,S){var D;this._selectionState.start=o,this._selectionState.end=u,this._selectionState.columnSelectMode=S,(D=this._renderer.value)==null||D.handleSelectionChanged(o,u,S)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};n.RenderService=c=d([p(2,a.IOptionsService),p(3,g.ICharSizeService),p(4,a.IDecorationService),p(5,a.IBufferService),p(6,g.ICoreBrowserService),p(7,g.IThemeService)],c)},9312:function(A,n,h){var d=this&&this.__decorate||function(w,R,N,z){var I,U=arguments.length,Y=U<3?R:z===null?z=Object.getOwnPropertyDescriptor(R,N):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(w,R,N,z);else for(var X=w.length-1;X>=0;X--)(I=w[X])&&(Y=(U<3?I(Y):U>3?I(R,N,Y):I(R,N))||Y);return U>3&&Y&&Object.defineProperty(R,N,Y),Y},p=this&&this.__param||function(w,R){return function(N,z){R(N,z,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const l=h(9806),g=h(9504),C=h(456),L=h(4725),_=h(8460),a=h(844),c=h(6114),o=h(4841),u=h(511),S=h(2585),D=" ",b=new RegExp(D,"g");let E=n.SelectionService=class extends a.Disposable{constructor(w,R,N,z,I,U,Y,X,q){super(),this._element=w,this._screenElement=R,this._linkifier=N,this._bufferService=z,this._coreService=I,this._mouseService=U,this._optionsService=Y,this._renderService=X,this._coreBrowserService=q,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new u.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new _.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new _.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new _.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new _.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=G=>this._handleMouseMove(G),this._mouseUpListener=G=>this._handleMouseUp(G),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((G=>this._handleTrim(G))),this.register(this._bufferService.buffers.onBufferActivate((G=>this._handleBufferActivate(G)))),this.enable(),this._model=new C.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,a.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 w=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!w||!R||w[0]===R[0]&&w[1]===R[1])}get selectionText(){const w=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!w||!R)return"";const N=this._bufferService.buffer,z=[];if(this._activeSelectionMode===3){if(w[0]===R[0])return"";const I=w[0]<R[0]?w[0]:R[0],U=w[0]<R[0]?R[0]:w[0];for(let Y=w[1];Y<=R[1];Y++){const X=N.translateBufferLineToString(Y,!0,I,U);z.push(X)}}else{const I=w[1]===R[1]?R[0]:void 0;z.push(N.translateBufferLineToString(w[1],!0,w[0],I));for(let U=w[1]+1;U<=R[1]-1;U++){const Y=N.lines.get(U),X=N.translateBufferLineToString(U,!0);Y!=null&&Y.isWrapped?z[z.length-1]+=X:z.push(X)}if(w[1]!==R[1]){const U=N.lines.get(R[1]),Y=N.translateBufferLineToString(R[1],!0,0,R[0]);U&&U.isWrapped?z[z.length-1]+=Y:z.push(Y)}}return z.map((I=>I.replace(b," "))).join(c.isWindows?`\r
|
|
98
|
+
`:`
|
|
99
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(w){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&w&&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(w){const R=this._getMouseBufferCoords(w),N=this._model.finalSelectionStart,z=this._model.finalSelectionEnd;return!!(N&&z&&R)&&this._areCoordsInSelection(R,N,z)}isCellInSelection(w,R){const N=this._model.finalSelectionStart,z=this._model.finalSelectionEnd;return!(!N||!z)&&this._areCoordsInSelection([w,R],N,z)}_areCoordsInSelection(w,R,N){return w[1]>R[1]&&w[1]<N[1]||R[1]===N[1]&&w[1]===R[1]&&w[0]>=R[0]&&w[0]<N[0]||R[1]<N[1]&&w[1]===N[1]&&w[0]<N[0]||R[1]<N[1]&&w[1]===R[1]&&w[0]>=R[0]}_selectWordAtCursor(w,R){var I,U;const N=(U=(I=this._linkifier.currentLink)==null?void 0:I.link)==null?void 0:U.range;if(N)return this._model.selectionStart=[N.start.x-1,N.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(N,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const z=this._getMouseBufferCoords(w);return!!z&&(this._selectWordAt(z,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(w,R){this._model.clearSelection(),w=Math.max(w,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,w],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(w){this._model.handleTrim(w)&&this.refresh()}_getMouseBufferCoords(w){const R=this._mouseService.getCoords(w,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(w){let R=(0,l.getCoordsRelativeToElement)(this._coreBrowserService.window,w,this._screenElement)[1];const N=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=N?0:(R>N&&(R-=N),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(w){return c.isMac?w.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:w.shiftKey}handleMouseDown(w){if(this._mouseDownTimeStamp=w.timeStamp,(w.button!==2||!this.hasSelection)&&w.button===0){if(!this._enabled){if(!this.shouldForceSelection(w))return;w.stopPropagation()}w.preventDefault(),this._dragScrollAmount=0,this._enabled&&w.shiftKey?this._handleIncrementalClick(w):w.detail===1?this._handleSingleClick(w):w.detail===2?this._handleDoubleClick(w):w.detail===3&&this._handleTripleClick(w),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(w){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(w))}_handleSingleClick(w){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(w)?3:0,this._model.selectionStart=this._getMouseBufferCoords(w),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(w){this._selectWordAtCursor(w,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(w){const R=this._getMouseBufferCoords(w);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(w){return w.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(w){if(w.stopImmediatePropagation(),!this._model.selectionStart)return;const R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(w),!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(w),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const N=this._bufferService.buffer;if(this._model.selectionEnd[1]<N.lines.length){const z=N.lines.get(this._model.selectionEnd[1]);z&&z.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}R&&R[0]===this._model.selectionEnd[0]&&R[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 w=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(w.ydisp+this._bufferService.rows,w.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=w.ydisp),this.refresh()}}_handleMouseUp(w){const R=w.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&w.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const N=this._mouseService.getCoords(w,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(N&&N[0]!==void 0&&N[1]!==void 0){const z=(0,g.moveToCellSequence)(N[0]-1,N[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(z,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const w=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,N=!(!w||!R||w[0]===R[0]&&w[1]===R[1]);N?w&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&w[0]===this._oldSelectionStart[0]&&w[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(w,R,N)):this._oldHasSelection&&this._fireOnSelectionChange(w,R,N)}_fireOnSelectionChange(w,R,N){this._oldSelectionStart=w,this._oldSelectionEnd=R,this._oldHasSelection=N,this._onSelectionChange.fire()}_handleBufferActivate(w){this.clearSelection(),this._trimListener.dispose(),this._trimListener=w.activeBuffer.lines.onTrim((R=>this._handleTrim(R)))}_convertViewportColToCharacterIndex(w,R){let N=R;for(let z=0;R>=z;z++){const I=w.loadCell(z,this._workCell).getChars().length;this._workCell.getWidth()===0?N--:I>1&&R!==z&&(N+=I-1)}return N}setSelection(w,R,N){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[w,R],this._model.selectionStartLength=N,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(w){this._isClickInSelection(w)||(this._selectWordAtCursor(w,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(w,R,N=!0,z=!0){if(w[0]>=this._bufferService.cols)return;const I=this._bufferService.buffer,U=I.lines.get(w[1]);if(!U)return;const Y=I.translateBufferLineToString(w[1],!1);let X=this._convertViewportColToCharacterIndex(U,w[0]),q=X;const G=w[0]-X;let K=0,H=0,W=0,j=0;if(Y.charAt(X)===" "){for(;X>0&&Y.charAt(X-1)===" ";)X--;for(;q<Y.length&&Y.charAt(q+1)===" ";)q++}else{let ee=w[0],le=w[0];U.getWidth(ee)===0&&(K++,ee--),U.getWidth(le)===2&&(H++,le++);const ue=U.getString(le).length;for(ue>1&&(j+=ue-1,q+=ue-1);ee>0&&X>0&&!this._isCharWordSeparator(U.loadCell(ee-1,this._workCell));){U.loadCell(ee-1,this._workCell);const Z=this._workCell.getChars().length;this._workCell.getWidth()===0?(K++,ee--):Z>1&&(W+=Z-1,X-=Z-1),X--,ee--}for(;le<U.length&&q+1<Y.length&&!this._isCharWordSeparator(U.loadCell(le+1,this._workCell));){U.loadCell(le+1,this._workCell);const Z=this._workCell.getChars().length;this._workCell.getWidth()===2?(H++,le++):Z>1&&(j+=Z-1,q+=Z-1),q++,le++}}q++;let F=X+G-K+W,V=Math.min(this._bufferService.cols,q-X+K+H-W-j);if(R||Y.slice(X,q).trim()!==""){if(N&&F===0&&U.getCodePoint(0)!==32){const ee=I.lines.get(w[1]-1);if(ee&&U.isWrapped&&ee.getCodePoint(this._bufferService.cols-1)!==32){const le=this._getWordAt([this._bufferService.cols-1,w[1]-1],!1,!0,!1);if(le){const ue=this._bufferService.cols-le.start;F-=ue,V+=ue}}}if(z&&F+V===this._bufferService.cols&&U.getCodePoint(this._bufferService.cols-1)!==32){const ee=I.lines.get(w[1]+1);if(ee!=null&&ee.isWrapped&&ee.getCodePoint(0)!==32){const le=this._getWordAt([0,w[1]+1],!1,!1,!0);le&&(V+=le.length)}}return{start:F,length:V}}}_selectWordAt(w,R){const N=this._getWordAt(w,R);if(N){for(;N.start<0;)N.start+=this._bufferService.cols,w[1]--;this._model.selectionStart=[N.start,w[1]],this._model.selectionStartLength=N.length}}_selectToWordAt(w){const R=this._getWordAt(w,!0);if(R){let N=w[1];for(;R.start<0;)R.start+=this._bufferService.cols,N--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,N++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,N]}}_isCharWordSeparator(w){return w.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(w.getChars())>=0}_selectLineAt(w){const R=this._bufferService.buffer.getWrappedRangeForLine(w),N={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(N,this._bufferService.cols)}};n.SelectionService=E=d([p(3,S.IBufferService),p(4,S.ICoreService),p(5,L.IMouseService),p(6,S.IOptionsService),p(7,L.IRenderService),p(8,L.ICoreBrowserService)],E)},4725:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ILinkProviderService=n.IThemeService=n.ICharacterJoinerService=n.ISelectionService=n.IRenderService=n.IMouseService=n.ICoreBrowserService=n.ICharSizeService=void 0;const d=h(8343);n.ICharSizeService=(0,d.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),n.IMouseService=(0,d.createDecorator)("MouseService"),n.IRenderService=(0,d.createDecorator)("RenderService"),n.ISelectionService=(0,d.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,d.createDecorator)("ThemeService"),n.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(A,n,h){var d=this&&this.__decorate||function(E,w,R,N){var z,I=arguments.length,U=I<3?w:N===null?N=Object.getOwnPropertyDescriptor(w,R):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(E,w,R,N);else for(var Y=E.length-1;Y>=0;Y--)(z=E[Y])&&(U=(I<3?z(U):I>3?z(w,R,U):z(w,R))||U);return I>3&&U&&Object.defineProperty(w,R,U),U},p=this&&this.__param||function(E,w){return function(R,N){w(R,N,E)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const l=h(7239),g=h(8055),C=h(8460),L=h(844),_=h(2585),a=g.css.toColor("#ffffff"),c=g.css.toColor("#000000"),o=g.css.toColor("#ffffff"),u=g.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const E=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],w=[0,95,135,175,215,255];for(let R=0;R<216;R++){const N=w[R/36%6|0],z=w[R/6%6|0],I=w[R%6];E.push({css:g.channels.toCss(N,z,I),rgba:g.channels.toRgba(N,z,I)})}for(let R=0;R<24;R++){const N=8+10*R;E.push({css:g.channels.toCss(N,N,N),rgba:g.channels.toRgba(N,N,N)})}return E})());let D=n.ThemeService=class extends L.Disposable{get colors(){return this._colors}constructor(E){super(),this._optionsService=E,this._contrastCache=new l.ColorContrastCache,this._halfContrastCache=new l.ColorContrastCache,this._onChangeColors=this.register(new C.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:a,background:c,cursor:o,cursorAccent:u,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:g.color.blend(c,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:g.color.blend(c,S),ansi:n.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(E={}){const w=this._colors;if(w.foreground=b(E.foreground,a),w.background=b(E.background,c),w.cursor=b(E.cursor,o),w.cursorAccent=b(E.cursorAccent,u),w.selectionBackgroundTransparent=b(E.selectionBackground,S),w.selectionBackgroundOpaque=g.color.blend(w.background,w.selectionBackgroundTransparent),w.selectionInactiveBackgroundTransparent=b(E.selectionInactiveBackground,w.selectionBackgroundTransparent),w.selectionInactiveBackgroundOpaque=g.color.blend(w.background,w.selectionInactiveBackgroundTransparent),w.selectionForeground=E.selectionForeground?b(E.selectionForeground,g.NULL_COLOR):void 0,w.selectionForeground===g.NULL_COLOR&&(w.selectionForeground=void 0),g.color.isOpaque(w.selectionBackgroundTransparent)&&(w.selectionBackgroundTransparent=g.color.opacity(w.selectionBackgroundTransparent,.3)),g.color.isOpaque(w.selectionInactiveBackgroundTransparent)&&(w.selectionInactiveBackgroundTransparent=g.color.opacity(w.selectionInactiveBackgroundTransparent,.3)),w.ansi=n.DEFAULT_ANSI_COLORS.slice(),w.ansi[0]=b(E.black,n.DEFAULT_ANSI_COLORS[0]),w.ansi[1]=b(E.red,n.DEFAULT_ANSI_COLORS[1]),w.ansi[2]=b(E.green,n.DEFAULT_ANSI_COLORS[2]),w.ansi[3]=b(E.yellow,n.DEFAULT_ANSI_COLORS[3]),w.ansi[4]=b(E.blue,n.DEFAULT_ANSI_COLORS[4]),w.ansi[5]=b(E.magenta,n.DEFAULT_ANSI_COLORS[5]),w.ansi[6]=b(E.cyan,n.DEFAULT_ANSI_COLORS[6]),w.ansi[7]=b(E.white,n.DEFAULT_ANSI_COLORS[7]),w.ansi[8]=b(E.brightBlack,n.DEFAULT_ANSI_COLORS[8]),w.ansi[9]=b(E.brightRed,n.DEFAULT_ANSI_COLORS[9]),w.ansi[10]=b(E.brightGreen,n.DEFAULT_ANSI_COLORS[10]),w.ansi[11]=b(E.brightYellow,n.DEFAULT_ANSI_COLORS[11]),w.ansi[12]=b(E.brightBlue,n.DEFAULT_ANSI_COLORS[12]),w.ansi[13]=b(E.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),w.ansi[14]=b(E.brightCyan,n.DEFAULT_ANSI_COLORS[14]),w.ansi[15]=b(E.brightWhite,n.DEFAULT_ANSI_COLORS[15]),E.extendedAnsi){const R=Math.min(w.ansi.length-16,E.extendedAnsi.length);for(let N=0;N<R;N++)w.ansi[N+16]=b(E.extendedAnsi[N],n.DEFAULT_ANSI_COLORS[N+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(E){this._restoreColor(E),this._onChangeColors.fire(this.colors)}_restoreColor(E){if(E!==void 0)switch(E){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[E]=this._restoreColors.ansi[E]}else for(let w=0;w<this._restoreColors.ansi.length;++w)this._colors.ansi[w]=this._restoreColors.ansi[w]}modifyColors(E){E(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 b(E,w){if(E!==void 0)try{return g.css.toColor(E)}catch{}return w}n.ThemeService=D=d([p(0,_.IOptionsService)],D)},6349:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const d=h(8460),p=h(844);class l extends p.Disposable{constructor(C){super(),this._maxLength=C,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(C){if(this._maxLength===C)return;const L=new Array(C);for(let _=0;_<Math.min(C,this.length);_++)L[_]=this._array[this._getCyclicIndex(_)];this._array=L,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let L=this._length;L<C;L++)this._array[L]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,L){this._array[this._getCyclicIndex(C)]=L}push(C){this._array[this._getCyclicIndex(this._length)]=C,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(C,L,..._){if(L){for(let a=C;a<this._length-L;a++)this._array[this._getCyclicIndex(a)]=this._array[this._getCyclicIndex(a+L)];this._length-=L,this.onDeleteEmitter.fire({index:C,amount:L})}for(let a=this._length-1;a>=C;a--)this._array[this._getCyclicIndex(a+_.length)]=this._array[this._getCyclicIndex(a)];for(let a=0;a<_.length;a++)this._array[this._getCyclicIndex(C+a)]=_[a];if(_.length&&this.onInsertEmitter.fire({index:C,amount:_.length}),this._length+_.length>this._maxLength){const a=this._length+_.length-this._maxLength;this._startIndex+=a,this._length=this._maxLength,this.onTrimEmitter.fire(a)}else this._length+=_.length}trimStart(C){C>this._length&&(C=this._length),this._startIndex+=C,this._length-=C,this.onTrimEmitter.fire(C)}shiftElements(C,L,_){if(!(L<=0)){if(C<0||C>=this._length)throw new Error("start argument out of range");if(C+_<0)throw new Error("Cannot shift elements in list beyond index 0");if(_>0){for(let c=L-1;c>=0;c--)this.set(C+c+_,this.get(C+c));const a=C+L+_-this._length;if(a>0)for(this._length+=a;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let a=0;a<L;a++)this.set(C+a+_,this.get(C+a))}}_getCyclicIndex(C){return(this._startIndex+C)%this._maxLength}}n.CircularList=l},1439:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function h(d,p=5){if(typeof d!="object")return d;const l=Array.isArray(d)?[]:{};for(const g in d)l[g]=p<=1?d[g]:d[g]&&h(d[g],p-1);return l}},8055:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let h=0,d=0,p=0,l=0;var g,C,L,_,a;function c(u){const S=u.toString(16);return S.length<2?"0"+S:S}function o(u,S){return u<S?(S+.05)/(u+.05):(u+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(u){u.toCss=function(S,D,b,E){return E!==void 0?`#${c(S)}${c(D)}${c(b)}${c(E)}`:`#${c(S)}${c(D)}${c(b)}`},u.toRgba=function(S,D,b,E=255){return(S<<24|D<<16|b<<8|E)>>>0},u.toColor=function(S,D,b,E){return{css:u.toCss(S,D,b,E),rgba:u.toRgba(S,D,b,E)}}})(g||(n.channels=g={})),(function(u){function S(D,b){return l=Math.round(255*b),[h,d,p]=a.toChannels(D.rgba),{css:g.toCss(h,d,p,l),rgba:g.toRgba(h,d,p,l)}}u.blend=function(D,b){if(l=(255&b.rgba)/255,l===1)return{css:b.css,rgba:b.rgba};const E=b.rgba>>24&255,w=b.rgba>>16&255,R=b.rgba>>8&255,N=D.rgba>>24&255,z=D.rgba>>16&255,I=D.rgba>>8&255;return h=N+Math.round((E-N)*l),d=z+Math.round((w-z)*l),p=I+Math.round((R-I)*l),{css:g.toCss(h,d,p),rgba:g.toRgba(h,d,p)}},u.isOpaque=function(D){return(255&D.rgba)==255},u.ensureContrastRatio=function(D,b,E){const w=a.ensureContrastRatio(D.rgba,b.rgba,E);if(w)return g.toColor(w>>24&255,w>>16&255,w>>8&255)},u.opaque=function(D){const b=(255|D.rgba)>>>0;return[h,d,p]=a.toChannels(b),{css:g.toCss(h,d,p),rgba:b}},u.opacity=S,u.multiplyOpacity=function(D,b){return l=255&D.rgba,S(D,l*b/255)},u.toColorRGB=function(D){return[D.rgba>>24&255,D.rgba>>16&255,D.rgba>>8&255]}})(C||(n.color=C={})),(function(u){let S,D;try{const b=document.createElement("canvas");b.width=1,b.height=1;const E=b.getContext("2d",{willReadFrequently:!0});E&&(S=E,S.globalCompositeOperation="copy",D=S.createLinearGradient(0,0,1,1))}catch{}u.toColor=function(b){if(b.match(/#[\da-f]{3,8}/i))switch(b.length){case 4:return h=parseInt(b.slice(1,2).repeat(2),16),d=parseInt(b.slice(2,3).repeat(2),16),p=parseInt(b.slice(3,4).repeat(2),16),g.toColor(h,d,p);case 5:return h=parseInt(b.slice(1,2).repeat(2),16),d=parseInt(b.slice(2,3).repeat(2),16),p=parseInt(b.slice(3,4).repeat(2),16),l=parseInt(b.slice(4,5).repeat(2),16),g.toColor(h,d,p,l);case 7:return{css:b,rgba:(parseInt(b.slice(1),16)<<8|255)>>>0};case 9:return{css:b,rgba:parseInt(b.slice(1),16)>>>0}}const E=b.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return h=parseInt(E[1]),d=parseInt(E[2]),p=parseInt(E[3]),l=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),g.toColor(h,d,p,l);if(!S||!D)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=D,S.fillStyle=b,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[h,d,p,l]=S.getImageData(0,0,1,1).data,l!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(h,d,p,l),css:b}}})(L||(n.css=L={})),(function(u){function S(D,b,E){const w=D/255,R=b/255,N=E/255;return .2126*(w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))}u.relativeLuminance=function(D){return S(D>>16&255,D>>8&255,255&D)},u.relativeLuminance2=S})(_||(n.rgb=_={})),(function(u){function S(b,E,w){const R=b>>24&255,N=b>>16&255,z=b>>8&255;let I=E>>24&255,U=E>>16&255,Y=E>>8&255,X=o(_.relativeLuminance2(I,U,Y),_.relativeLuminance2(R,N,z));for(;X<w&&(I>0||U>0||Y>0);)I-=Math.max(0,Math.ceil(.1*I)),U-=Math.max(0,Math.ceil(.1*U)),Y-=Math.max(0,Math.ceil(.1*Y)),X=o(_.relativeLuminance2(I,U,Y),_.relativeLuminance2(R,N,z));return(I<<24|U<<16|Y<<8|255)>>>0}function D(b,E,w){const R=b>>24&255,N=b>>16&255,z=b>>8&255;let I=E>>24&255,U=E>>16&255,Y=E>>8&255,X=o(_.relativeLuminance2(I,U,Y),_.relativeLuminance2(R,N,z));for(;X<w&&(I<255||U<255||Y<255);)I=Math.min(255,I+Math.ceil(.1*(255-I))),U=Math.min(255,U+Math.ceil(.1*(255-U))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),X=o(_.relativeLuminance2(I,U,Y),_.relativeLuminance2(R,N,z));return(I<<24|U<<16|Y<<8|255)>>>0}u.blend=function(b,E){if(l=(255&E)/255,l===1)return E;const w=E>>24&255,R=E>>16&255,N=E>>8&255,z=b>>24&255,I=b>>16&255,U=b>>8&255;return h=z+Math.round((w-z)*l),d=I+Math.round((R-I)*l),p=U+Math.round((N-U)*l),g.toRgba(h,d,p)},u.ensureContrastRatio=function(b,E,w){const R=_.relativeLuminance(b>>8),N=_.relativeLuminance(E>>8);if(o(R,N)<w){if(N<R){const U=S(b,E,w),Y=o(R,_.relativeLuminance(U>>8));if(Y<w){const X=D(b,E,w);return Y>o(R,_.relativeLuminance(X>>8))?U:X}return U}const z=D(b,E,w),I=o(R,_.relativeLuminance(z>>8));if(I<w){const U=S(b,E,w);return I>o(R,_.relativeLuminance(U>>8))?z:U}return z}},u.reduceLuminance=S,u.increaseLuminance=D,u.toChannels=function(b){return[b>>24&255,b>>16&255,b>>8&255,255&b]}})(a||(n.rgba=a={})),n.toPaddedHex=c,n.contrastRatio=o},8969:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const d=h(844),p=h(2585),l=h(4348),g=h(7866),C=h(744),L=h(7302),_=h(6975),a=h(8460),c=h(1753),o=h(1480),u=h(7994),S=h(9282),D=h(5435),b=h(5981),E=h(2660);let w=!1;class R extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new a.EventEmitter),this._onScroll.event((z=>{var I;(I=this._onScrollApi)==null||I.fire(z.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(z){for(const I in z)this.optionsService.options[I]=z[I]}constructor(z){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new a.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new a.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new a.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new a.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new a.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new a.EventEmitter),this._instantiationService=new l.InstantiationService,this.optionsService=this.register(new L.OptionsService(z)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(_.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(u.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(E.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new D.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,a.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,a.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,a.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,a.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((I=>{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((I=>{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 b.WriteBuffer(((I,U)=>this._inputHandler.parse(I,U)))),this.register((0,a.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(z,I){this._writeBuffer.write(z,I)}writeSync(z,I){this._logService.logLevel<=p.LogLevelEnum.WARN&&!w&&(this._logService.warn("writeSync is unreliable and will be removed soon."),w=!0),this._writeBuffer.writeSync(z,I)}input(z,I=!0){this.coreService.triggerDataEvent(z,I)}resize(z,I){isNaN(z)||isNaN(I)||(z=Math.max(z,C.MINIMUM_COLS),I=Math.max(I,C.MINIMUM_ROWS),this._bufferService.resize(z,I))}scroll(z,I=!1){this._bufferService.scroll(z,I)}scrollLines(z,I,U){this._bufferService.scrollLines(z,I,U)}scrollPages(z){this.scrollLines(z*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(z){const I=z-this._bufferService.buffer.ydisp;I!==0&&this.scrollLines(I)}registerEscHandler(z,I){return this._inputHandler.registerEscHandler(z,I)}registerDcsHandler(z,I){return this._inputHandler.registerDcsHandler(z,I)}registerCsiHandler(z,I){return this._inputHandler.registerCsiHandler(z,I)}registerOscHandler(z,I){return this._inputHandler.registerOscHandler(z,I)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let z=!1;const I=this.optionsService.rawOptions.windowsPty;I&&I.buildNumber!==void 0&&I.buildNumber!==void 0?z=I.backend==="conpty"&&I.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(z=!0),z?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const z=[];z.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),z.push(this.registerCsiHandler({final:"H"},(()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const I of z)I.dispose()}))}}}n.CoreTerminal=R},8460:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===h)return void this._listeners.splice(d,1)}}})),this._event}fire(h,d){const p=[];for(let l=0;l<this._listeners.length;l++)p.push(this._listeners[l]);for(let l=0;l<p.length;l++)p[l].call(void 0,h,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(h,d){return h((p=>d.fire(p)))},n.runAndSubscribe=function(h,d){return d(void 0),h((p=>d(p)))}},5435:function(A,n,h){var d=this&&this.__decorate||function(K,H,W,j){var F,V=arguments.length,ee=V<3?H:j===null?j=Object.getOwnPropertyDescriptor(H,W):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(K,H,W,j);else for(var le=K.length-1;le>=0;le--)(F=K[le])&&(ee=(V<3?F(ee):V>3?F(H,W,ee):F(H,W))||ee);return V>3&&ee&&Object.defineProperty(H,W,ee),ee},p=this&&this.__param||function(K,H){return function(W,j){H(W,j,K)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const l=h(2584),g=h(7116),C=h(2015),L=h(844),_=h(482),a=h(8437),c=h(8460),o=h(643),u=h(511),S=h(3734),D=h(2585),b=h(1480),E=h(6242),w=h(6351),R=h(5941),N={"(":0,")":1,"*":2,"+":3,"-":1,".":2},z=131072;function I(K,H){if(K>24)return H.setWinLines||!1;switch(K){case 1:return!!H.restoreWin;case 2:return!!H.minimizeWin;case 3:return!!H.setWinPosition;case 4:return!!H.setWinSizePixels;case 5:return!!H.raiseWin;case 6:return!!H.lowerWin;case 7:return!!H.refreshWin;case 8:return!!H.setWinSizeChars;case 9:return!!H.maximizeWin;case 10:return!!H.fullscreenWin;case 11:return!!H.getWinState;case 13:return!!H.getWinPosition;case 14:return!!H.getWinSizePixels;case 15:return!!H.getScreenSizePixels;case 16:return!!H.getCellSizePixels;case 18:return!!H.getWinSizeChars;case 19:return!!H.getScreenSizeChars;case 20:return!!H.getIconTitle;case 21:return!!H.getWinTitle;case 22:return!!H.pushTitle;case 23:return!!H.popTitle;case 24:return!!H.setWinLines}return!1}var U;(function(K){K[K.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",K[K.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(U||(n.WindowsOptionsReportType=U={}));let Y=0;class X extends L.Disposable{getAttrData(){return this._curAttrData}constructor(H,W,j,F,V,ee,le,ue,Z=new C.EscapeSequenceParser){super(),this._bufferService=H,this._charsetService=W,this._coreService=j,this._logService=F,this._optionsService=V,this._oscLinkService=ee,this._coreMouseService=le,this._unicodeService=ue,this._parser=Z,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new _.StringToUtf32,this._utf8Decoder=new _.Utf8ToUtf32,this._workCell=new u.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=a.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=a.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new c.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new c.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new c.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new c.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new c.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new c.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new c.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new c.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new c.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new c.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new c.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 q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((P=>this._activeBuffer=P.activeBuffer))),this._parser.setCsiHandlerFallback(((P,ae)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(P),params:ae.toArray()})})),this._parser.setEscHandlerFallback((P=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(P)})})),this._parser.setExecuteHandlerFallback((P=>{this._logService.debug("Unknown EXECUTE code: ",{code:P})})),this._parser.setOscHandlerFallback(((P,ae,ie)=>{this._logService.debug("Unknown OSC code: ",{identifier:P,action:ae,data:ie})})),this._parser.setDcsHandlerFallback(((P,ae,ie)=>{ae==="HOOK"&&(ie=ie.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(P),action:ae,payload:ie})})),this._parser.setPrintHandler(((P,ae,ie)=>this.print(P,ae,ie))),this._parser.registerCsiHandler({final:"@"},(P=>this.insertChars(P))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(P=>this.scrollLeft(P))),this._parser.registerCsiHandler({final:"A"},(P=>this.cursorUp(P))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(P=>this.scrollRight(P))),this._parser.registerCsiHandler({final:"B"},(P=>this.cursorDown(P))),this._parser.registerCsiHandler({final:"C"},(P=>this.cursorForward(P))),this._parser.registerCsiHandler({final:"D"},(P=>this.cursorBackward(P))),this._parser.registerCsiHandler({final:"E"},(P=>this.cursorNextLine(P))),this._parser.registerCsiHandler({final:"F"},(P=>this.cursorPrecedingLine(P))),this._parser.registerCsiHandler({final:"G"},(P=>this.cursorCharAbsolute(P))),this._parser.registerCsiHandler({final:"H"},(P=>this.cursorPosition(P))),this._parser.registerCsiHandler({final:"I"},(P=>this.cursorForwardTab(P))),this._parser.registerCsiHandler({final:"J"},(P=>this.eraseInDisplay(P,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(P=>this.eraseInDisplay(P,!0))),this._parser.registerCsiHandler({final:"K"},(P=>this.eraseInLine(P,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(P=>this.eraseInLine(P,!0))),this._parser.registerCsiHandler({final:"L"},(P=>this.insertLines(P))),this._parser.registerCsiHandler({final:"M"},(P=>this.deleteLines(P))),this._parser.registerCsiHandler({final:"P"},(P=>this.deleteChars(P))),this._parser.registerCsiHandler({final:"S"},(P=>this.scrollUp(P))),this._parser.registerCsiHandler({final:"T"},(P=>this.scrollDown(P))),this._parser.registerCsiHandler({final:"X"},(P=>this.eraseChars(P))),this._parser.registerCsiHandler({final:"Z"},(P=>this.cursorBackwardTab(P))),this._parser.registerCsiHandler({final:"`"},(P=>this.charPosAbsolute(P))),this._parser.registerCsiHandler({final:"a"},(P=>this.hPositionRelative(P))),this._parser.registerCsiHandler({final:"b"},(P=>this.repeatPrecedingCharacter(P))),this._parser.registerCsiHandler({final:"c"},(P=>this.sendDeviceAttributesPrimary(P))),this._parser.registerCsiHandler({prefix:">",final:"c"},(P=>this.sendDeviceAttributesSecondary(P))),this._parser.registerCsiHandler({final:"d"},(P=>this.linePosAbsolute(P))),this._parser.registerCsiHandler({final:"e"},(P=>this.vPositionRelative(P))),this._parser.registerCsiHandler({final:"f"},(P=>this.hVPosition(P))),this._parser.registerCsiHandler({final:"g"},(P=>this.tabClear(P))),this._parser.registerCsiHandler({final:"h"},(P=>this.setMode(P))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(P=>this.setModePrivate(P))),this._parser.registerCsiHandler({final:"l"},(P=>this.resetMode(P))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(P=>this.resetModePrivate(P))),this._parser.registerCsiHandler({final:"m"},(P=>this.charAttributes(P))),this._parser.registerCsiHandler({final:"n"},(P=>this.deviceStatus(P))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(P=>this.deviceStatusPrivate(P))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(P=>this.softReset(P))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(P=>this.setCursorStyle(P))),this._parser.registerCsiHandler({final:"r"},(P=>this.setScrollRegion(P))),this._parser.registerCsiHandler({final:"s"},(P=>this.saveCursor(P))),this._parser.registerCsiHandler({final:"t"},(P=>this.windowOptions(P))),this._parser.registerCsiHandler({final:"u"},(P=>this.restoreCursor(P))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(P=>this.insertColumns(P))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(P=>this.deleteColumns(P))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(P=>this.selectProtected(P))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(P=>this.requestMode(P,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(P=>this.requestMode(P,!1))),this._parser.setExecuteHandler(l.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(l.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(l.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(l.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(l.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(l.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(l.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(l.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(l.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new E.OscHandler((P=>(this.setTitle(P),this.setIconName(P),!0)))),this._parser.registerOscHandler(1,new E.OscHandler((P=>this.setIconName(P)))),this._parser.registerOscHandler(2,new E.OscHandler((P=>this.setTitle(P)))),this._parser.registerOscHandler(4,new E.OscHandler((P=>this.setOrReportIndexedColor(P)))),this._parser.registerOscHandler(8,new E.OscHandler((P=>this.setHyperlink(P)))),this._parser.registerOscHandler(10,new E.OscHandler((P=>this.setOrReportFgColor(P)))),this._parser.registerOscHandler(11,new E.OscHandler((P=>this.setOrReportBgColor(P)))),this._parser.registerOscHandler(12,new E.OscHandler((P=>this.setOrReportCursorColor(P)))),this._parser.registerOscHandler(104,new E.OscHandler((P=>this.restoreIndexedColor(P)))),this._parser.registerOscHandler(110,new E.OscHandler((P=>this.restoreFgColor(P)))),this._parser.registerOscHandler(111,new E.OscHandler((P=>this.restoreBgColor(P)))),this._parser.registerOscHandler(112,new E.OscHandler((P=>this.restoreCursorColor(P)))),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 P in g.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:P},(()=>this.selectCharset("("+P))),this._parser.registerEscHandler({intermediates:")",final:P},(()=>this.selectCharset(")"+P))),this._parser.registerEscHandler({intermediates:"*",final:P},(()=>this.selectCharset("*"+P))),this._parser.registerEscHandler({intermediates:"+",final:P},(()=>this.selectCharset("+"+P))),this._parser.registerEscHandler({intermediates:"-",final:P},(()=>this.selectCharset("-"+P))),this._parser.registerEscHandler({intermediates:".",final:P},(()=>this.selectCharset("."+P))),this._parser.registerEscHandler({intermediates:"/",final:P},(()=>this.selectCharset("/"+P)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((P=>(this._logService.error("Parsing error: ",P),P))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new w.DcsHandler(((P,ae)=>this.requestStatusString(P,ae))))}_preserveStack(H,W,j,F){this._parseStack.paused=!0,this._parseStack.cursorStartX=H,this._parseStack.cursorStartY=W,this._parseStack.decodedLength=j,this._parseStack.position=F}_logSlowResolvingAsync(H){this._logService.logLevel<=D.LogLevelEnum.WARN&&Promise.race([H,new Promise(((W,j)=>setTimeout((()=>j("#SLOW_TIMEOUT")),5e3)))]).catch((W=>{if(W!=="#SLOW_TIMEOUT")throw W;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(H,W){let j,F=this._activeBuffer.x,V=this._activeBuffer.y,ee=0;const le=this._parseStack.paused;if(le){if(j=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,W))return this._logSlowResolvingAsync(j),j;F=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,H.length>z&&(ee=this._parseStack.position+z)}if(this._logService.logLevel<=D.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof H=="string"?` "${H}"`:` "${Array.prototype.map.call(H,(P=>String.fromCharCode(P))).join("")}"`),typeof H=="string"?H.split("").map((P=>P.charCodeAt(0))):H),this._parseBuffer.length<H.length&&this._parseBuffer.length<z&&(this._parseBuffer=new Uint32Array(Math.min(H.length,z))),le||this._dirtyRowTracker.clearRange(),H.length>z)for(let P=ee;P<H.length;P+=z){const ae=P+z<H.length?P+z:H.length,ie=typeof H=="string"?this._stringDecoder.decode(H.substring(P,ae),this._parseBuffer):this._utf8Decoder.decode(H.subarray(P,ae),this._parseBuffer);if(j=this._parser.parse(this._parseBuffer,ie))return this._preserveStack(F,V,ie,P),this._logSlowResolvingAsync(j),j}else if(!le){const P=typeof H=="string"?this._stringDecoder.decode(H,this._parseBuffer):this._utf8Decoder.decode(H,this._parseBuffer);if(j=this._parser.parse(this._parseBuffer,P))return this._preserveStack(F,V,P,0),this._logSlowResolvingAsync(j),j}this._activeBuffer.x===F&&this._activeBuffer.y===V||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Z=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Z<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Z,this._bufferService.rows-1),Math.min(ue,this._bufferService.rows-1))}print(H,W,j){let F,V;const ee=this._charsetService.charset,le=this._optionsService.rawOptions.screenReaderMode,ue=this._bufferService.cols,Z=this._coreService.decPrivateModes.wraparound,P=this._coreService.modes.insertMode,ae=this._curAttrData;let ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&j-W>0&&ie.getWidth(this._activeBuffer.x-1)===2&&ie.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ae);let ve=this._parser.precedingJoinState;for(let _e=W;_e<j;++_e){if(F=H[_e],F<127&&ee){const $e=ee[String.fromCharCode(F)];$e&&(F=$e.charCodeAt(0))}const Ee=this._unicodeService.charProperties(F,ve);V=b.UnicodeService.extractWidth(Ee);const pe=b.UnicodeService.extractShouldJoin(Ee),ke=pe?b.UnicodeService.extractWidth(ve):0;if(ve=Ee,le&&this._onA11yChar.fire((0,_.stringFromCodePoint)(F)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+V-ke>ue){if(Z){const $e=ie;let be=this._activeBuffer.x-ke;for(this._activeBuffer.x=ke,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),ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ke>0&&ie instanceof a.BufferLine&&ie.copyCellsFrom($e,be,0,ke,!1);be<ue;)$e.setCellFromCodepoint(be++,0,1,ae)}else if(this._activeBuffer.x=ue-1,V===2)continue}if(pe&&this._activeBuffer.x){const $e=ie.getWidth(this._activeBuffer.x-1)?1:2;ie.addCodepointToCell(this._activeBuffer.x-$e,F,V);for(let be=V-ke;--be>=0;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}else if(P&&(ie.insertCells(this._activeBuffer.x,V-ke,this._activeBuffer.getNullCell(ae)),ie.getWidth(ue-1)===2&&ie.setCellFromCodepoint(ue-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,ae)),ie.setCellFromCodepoint(this._activeBuffer.x++,F,V,ae),V>0)for(;--V;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}this._parser.precedingJoinState=ve,this._activeBuffer.x<ue&&j-W>0&&ie.getWidth(this._activeBuffer.x)===0&&!ie.hasContent(this._activeBuffer.x)&&ie.setCellFromCodepoint(this._activeBuffer.x,0,1,ae),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(H,W){return H.final!=="t"||H.prefix||H.intermediates?this._parser.registerCsiHandler(H,W):this._parser.registerCsiHandler(H,(j=>!I(j.params[0],this._optionsService.rawOptions.windowOptions)||W(j)))}registerDcsHandler(H,W){return this._parser.registerDcsHandler(H,new w.DcsHandler(W))}registerEscHandler(H,W){return this._parser.registerEscHandler(H,W)}registerOscHandler(H,W){return this._parser.registerOscHandler(H,new E.OscHandler(W))}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 H;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&&((H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&H.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);W.hasWidth(this._activeBuffer.x)&&!W.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const H=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-H),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(H=this._bufferService.cols-1){this._activeBuffer.x=Math.min(H,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(H,W){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=H,this._activeBuffer.y=this._activeBuffer.scrollTop+W):(this._activeBuffer.x=H,this._activeBuffer.y=W),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(H,W){this._restrictCursor(),this._setCursor(this._activeBuffer.x+H,this._activeBuffer.y+W)}cursorUp(H){const W=this._activeBuffer.y-this._activeBuffer.scrollTop;return W>=0?this._moveCursor(0,-Math.min(W,H.params[0]||1)):this._moveCursor(0,-(H.params[0]||1)),!0}cursorDown(H){const W=this._activeBuffer.scrollBottom-this._activeBuffer.y;return W>=0?this._moveCursor(0,Math.min(W,H.params[0]||1)):this._moveCursor(0,H.params[0]||1),!0}cursorForward(H){return this._moveCursor(H.params[0]||1,0),!0}cursorBackward(H){return this._moveCursor(-(H.params[0]||1),0),!0}cursorNextLine(H){return this.cursorDown(H),this._activeBuffer.x=0,!0}cursorPrecedingLine(H){return this.cursorUp(H),this._activeBuffer.x=0,!0}cursorCharAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(H){return this._setCursor(H.length>=2?(H.params[1]||1)-1:0,(H.params[0]||1)-1),!0}charPosAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(H){return this._moveCursor(H.params[0]||1,0),!0}linePosAbsolute(H){return this._setCursor(this._activeBuffer.x,(H.params[0]||1)-1),!0}vPositionRelative(H){return this._moveCursor(0,H.params[0]||1),!0}hVPosition(H){return this.cursorPosition(H),!0}tabClear(H){const W=H.params[0];return W===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:W===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let W=H.params[0]||1;for(;W--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let W=H.params[0]||1;for(;W--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(H){const W=H.params[0];return W===1&&(this._curAttrData.bg|=536870912),W!==2&&W!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(H,W,j,F=!1,V=!1){const ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);ee.replaceCells(W,j,this._activeBuffer.getNullCell(this._eraseAttrData()),V),F&&(ee.isWrapped=!1)}_resetBufferLine(H,W=!1){const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);j&&(j.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),W),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+H),j.isWrapped=!1)}eraseInDisplay(H,W=!1){let j;switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:for(j=this._activeBuffer.y,this._dirtyRowTracker.markDirty(j),this._eraseInBufferLine(j++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,W);j<this._bufferService.rows;j++)this._resetBufferLine(j,W);this._dirtyRowTracker.markDirty(j);break;case 1:for(j=this._activeBuffer.y,this._dirtyRowTracker.markDirty(j),this._eraseInBufferLine(j,0,this._activeBuffer.x+1,!0,W),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(j+1).isWrapped=!1);j--;)this._resetBufferLine(j,W);this._dirtyRowTracker.markDirty(0);break;case 2:for(j=this._bufferService.rows,this._dirtyRowTracker.markDirty(j-1);j--;)this._resetBufferLine(j,W);this._dirtyRowTracker.markDirty(0);break;case 3:const F=this._activeBuffer.lines.length-this._bufferService.rows;F>0&&(this._activeBuffer.lines.trimStart(F),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-F,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-F,0),this._onScroll.fire(0))}return!0}eraseInLine(H,W=!1){switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,W);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,W);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,W)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(H){this._restrictCursor();let W=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=this._activeBuffer.ybase+this._activeBuffer.y,F=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-F+1;for(;W--;)this._activeBuffer.lines.splice(V-1,1),this._activeBuffer.lines.splice(j,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(H){this._restrictCursor();let W=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=this._activeBuffer.ybase+this._activeBuffer.y;let F;for(F=this._bufferService.rows-1-this._activeBuffer.scrollBottom,F=this._bufferService.rows-1+this._activeBuffer.ybase-F;W--;)this._activeBuffer.lines.splice(j,1),this._activeBuffer.lines.splice(F,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(H){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.insertCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(H){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.deleteCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(H){let W=H.params[0]||1;for(;W--;)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(H){let W=H.params[0]||1;for(;W--;)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(a.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=H.params[0]||1;for(let j=this._activeBuffer.scrollTop;j<=this._activeBuffer.scrollBottom;++j){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);F.deleteCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData())),F.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=H.params[0]||1;for(let j=this._activeBuffer.scrollTop;j<=this._activeBuffer.scrollBottom;++j){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);F.insertCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData())),F.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=H.params[0]||1;for(let j=this._activeBuffer.scrollTop;j<=this._activeBuffer.scrollBottom;++j){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);F.insertCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData())),F.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const W=H.params[0]||1;for(let j=this._activeBuffer.scrollTop;j<=this._activeBuffer.scrollBottom;++j){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);F.deleteCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData())),F.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(H){this._restrictCursor();const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(H.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(H){const W=this._parser.precedingJoinState;if(!W)return!0;const j=H.params[0]||1,F=b.UnicodeService.extractWidth(W),V=this._activeBuffer.x-F,ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(V),le=new Uint32Array(ee.length*j);let ue=0;for(let P=0;P<ee.length;){const ae=ee.codePointAt(P)||0;le[ue++]=ae,P+=ae>65535?2:1}let Z=ue;for(let P=1;P<j;++P)le.copyWithin(Z,0,ue),Z+=ue;return this.print(le,0,Z),!0}sendDeviceAttributesPrimary(H){return H.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(l.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(l.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(H){return H.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(l.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(l.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(H.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(l.C0.ESC+"[>83;40003;0c")),!0}_is(H){return(this._optionsService.rawOptions.termName+"").indexOf(H)===0}setMode(H){for(let W=0;W<H.length;W++)switch(H.params[W]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(H){for(let W=0;W<H.length;W++)switch(H.params[W]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.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(H){for(let W=0;W<H.length;W++)switch(H.params[W]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(H){for(let W=0;W<H.length;W++)switch(H.params[W]){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(),H.params[W]===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(H,W){const j=this._coreService.decPrivateModes,{activeProtocol:F,activeEncoding:V}=this._coreMouseService,ee=this._coreService,{buffers:le,cols:ue}=this._bufferService,{active:Z,alt:P}=le,ae=this._optionsService.rawOptions,ie=pe=>pe?1:2,ve=H.params[0];return _e=ve,Ee=W?ve===2?4:ve===4?ie(ee.modes.insertMode):ve===12?3:ve===20?ie(ae.convertEol):0:ve===1?ie(j.applicationCursorKeys):ve===3?ae.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:ve===6?ie(j.origin):ve===7?ie(j.wraparound):ve===8?3:ve===9?ie(F==="X10"):ve===12?ie(ae.cursorBlink):ve===25?ie(!ee.isCursorHidden):ve===45?ie(j.reverseWraparound):ve===66?ie(j.applicationKeypad):ve===67?4:ve===1e3?ie(F==="VT200"):ve===1002?ie(F==="DRAG"):ve===1003?ie(F==="ANY"):ve===1004?ie(j.sendFocus):ve===1005?4:ve===1006?ie(V==="SGR"):ve===1015?4:ve===1016?ie(V==="SGR_PIXELS"):ve===1048?1:ve===47||ve===1047||ve===1049?ie(Z===P):ve===2004?ie(j.bracketedPasteMode):0,ee.triggerDataEvent(`${l.C0.ESC}[${W?"":"?"}${_e};${Ee}$y`),!0;var _e,Ee}_updateAttrColor(H,W,j,F,V){return W===2?(H|=50331648,H&=-16777216,H|=S.AttributeData.fromColorRGB([j,F,V])):W===5&&(H&=-50331904,H|=33554432|255&j),H}_extractColor(H,W,j){const F=[0,0,-1,0,0,0];let V=0,ee=0;do{if(F[ee+V]=H.params[W+ee],H.hasSubParams(W+ee)){const le=H.getSubParams(W+ee);let ue=0;do F[1]===5&&(V=1),F[ee+ue+1+V]=le[ue];while(++ue<le.length&&ue+ee+1+V<F.length);break}if(F[1]===5&&ee+V>=2||F[1]===2&&ee+V>=5)break;F[1]&&(V=1)}while(++ee+W<H.length&&ee+V<F.length);for(let le=2;le<F.length;++le)F[le]===-1&&(F[le]=0);switch(F[0]){case 38:j.fg=this._updateAttrColor(j.fg,F[1],F[3],F[4],F[5]);break;case 48:j.bg=this._updateAttrColor(j.bg,F[1],F[3],F[4],F[5]);break;case 58:j.extended=j.extended.clone(),j.extended.underlineColor=this._updateAttrColor(j.extended.underlineColor,F[1],F[3],F[4],F[5])}return ee}_processUnderline(H,W){W.extended=W.extended.clone(),(!~H||H>5)&&(H=1),W.extended.underlineStyle=H,W.fg|=268435456,H===0&&(W.fg&=-268435457),W.updateExtended()}_processSGR0(H){H.fg=a.DEFAULT_ATTR_DATA.fg,H.bg=a.DEFAULT_ATTR_DATA.bg,H.extended=H.extended.clone(),H.extended.underlineStyle=0,H.extended.underlineColor&=-67108864,H.updateExtended()}charAttributes(H){if(H.length===1&&H.params[0]===0)return this._processSGR0(this._curAttrData),!0;const W=H.length;let j;const F=this._curAttrData;for(let V=0;V<W;V++)j=H.params[V],j>=30&&j<=37?(F.fg&=-50331904,F.fg|=16777216|j-30):j>=40&&j<=47?(F.bg&=-50331904,F.bg|=16777216|j-40):j>=90&&j<=97?(F.fg&=-50331904,F.fg|=16777224|j-90):j>=100&&j<=107?(F.bg&=-50331904,F.bg|=16777224|j-100):j===0?this._processSGR0(F):j===1?F.fg|=134217728:j===3?F.bg|=67108864:j===4?(F.fg|=268435456,this._processUnderline(H.hasSubParams(V)?H.getSubParams(V)[0]:1,F)):j===5?F.fg|=536870912:j===7?F.fg|=67108864:j===8?F.fg|=1073741824:j===9?F.fg|=2147483648:j===2?F.bg|=134217728:j===21?this._processUnderline(2,F):j===22?(F.fg&=-134217729,F.bg&=-134217729):j===23?F.bg&=-67108865:j===24?(F.fg&=-268435457,this._processUnderline(0,F)):j===25?F.fg&=-536870913:j===27?F.fg&=-67108865:j===28?F.fg&=-1073741825:j===29?F.fg&=2147483647:j===39?(F.fg&=-67108864,F.fg|=16777215&a.DEFAULT_ATTR_DATA.fg):j===49?(F.bg&=-67108864,F.bg|=16777215&a.DEFAULT_ATTR_DATA.bg):j===38||j===48||j===58?V+=this._extractColor(H,V,F):j===53?F.bg|=1073741824:j===55?F.bg&=-1073741825:j===59?(F.extended=F.extended.clone(),F.extended.underlineColor=-1,F.updateExtended()):j===100?(F.fg&=-67108864,F.fg|=16777215&a.DEFAULT_ATTR_DATA.fg,F.bg&=-67108864,F.bg|=16777215&a.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",j);return!0}deviceStatus(H){switch(H.params[0]){case 5:this._coreService.triggerDataEvent(`${l.C0.ESC}[0n`);break;case 6:const W=this._activeBuffer.y+1,j=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${l.C0.ESC}[${W};${j}R`)}return!0}deviceStatusPrivate(H){if(H.params[0]===6){const W=this._activeBuffer.y+1,j=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${l.C0.ESC}[?${W};${j}R`)}return!0}softReset(H){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=a.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(H){const W=H.params[0]||1;switch(W){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 j=W%2==1;return this._optionsService.options.cursorBlink=j,!0}setScrollRegion(H){const W=H.params[0]||1;let j;return(H.length<2||(j=H.params[1])>this._bufferService.rows||j===0)&&(j=this._bufferService.rows),j>W&&(this._activeBuffer.scrollTop=W-1,this._activeBuffer.scrollBottom=j-1,this._setCursor(0,0)),!0}windowOptions(H){if(!I(H.params[0],this._optionsService.rawOptions.windowOptions))return!0;const W=H.length>1?H.params[1]:0;switch(H.params[0]){case 14:W!==2&&this._onRequestWindowsOptionsReport.fire(U.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(U.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${l.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:W!==0&&W!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),W!==0&&W!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:W!==0&&W!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),W!==0&&W!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(H){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(H){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(H){return this._windowTitle=H,this._onTitleChange.fire(H),!0}setIconName(H){return this._iconName=H,!0}setOrReportIndexedColor(H){const W=[],j=H.split(";");for(;j.length>1;){const F=j.shift(),V=j.shift();if(/^\d+$/.exec(F)){const ee=parseInt(F);if(G(ee))if(V==="?")W.push({type:0,index:ee});else{const le=(0,R.parseColor)(V);le&&W.push({type:1,index:ee,color:le})}}}return W.length&&this._onColor.fire(W),!0}setHyperlink(H){const W=H.split(";");return!(W.length<2)&&(W[1]?this._createHyperlink(W[0],W[1]):!W[0]&&this._finishHyperlink())}_createHyperlink(H,W){this._getCurrentLinkId()&&this._finishHyperlink();const j=H.split(":");let F;const V=j.findIndex((ee=>ee.startsWith("id=")));return V!==-1&&(F=j[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:F,uri:W}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(H,W){const j=H.split(";");for(let F=0;F<j.length&&!(W>=this._specialColors.length);++F,++W)if(j[F]==="?")this._onColor.fire([{type:0,index:this._specialColors[W]}]);else{const V=(0,R.parseColor)(j[F]);V&&this._onColor.fire([{type:1,index:this._specialColors[W],color:V}])}return!0}setOrReportFgColor(H){return this._setOrReportSpecialColor(H,0)}setOrReportBgColor(H){return this._setOrReportSpecialColor(H,1)}setOrReportCursorColor(H){return this._setOrReportSpecialColor(H,2)}restoreIndexedColor(H){if(!H)return this._onColor.fire([{type:2}]),!0;const W=[],j=H.split(";");for(let F=0;F<j.length;++F)if(/^\d+$/.exec(j[F])){const V=parseInt(j[F]);G(V)&&W.push({type:2,index:V})}return W.length&&this._onColor.fire(W),!0}restoreFgColor(H){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(H){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(H){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,g.DEFAULT_CHARSET),!0}selectCharset(H){return H.length!==2?(this.selectDefaultCharset(),!0):(H[0]==="/"||this._charsetService.setgCharset(N[H[0]],g.CHARSETS[H[1]]||g.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 H=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,H,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=a.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=a.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(H){return this._charsetService.setgLevel(H),!0}screenAlignmentPattern(){const H=new u.CellData;H.content=4194373,H.fg=this._curAttrData.fg,H.bg=this._curAttrData.bg,this._setCursor(0,0);for(let W=0;W<this._bufferService.rows;++W){const j=this._activeBuffer.ybase+this._activeBuffer.y+W,F=this._activeBuffer.lines.get(j);F&&(F.fill(H),F.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(H,W){const j=this._bufferService.buffer,F=this._optionsService.rawOptions;return(V=>(this._coreService.triggerDataEvent(`${l.C0.ESC}${V}${l.C0.ESC}\\`),!0))(H==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:H==='"p'?'P1$r61;1"p':H==="r"?`P1$r${j.scrollTop+1};${j.scrollBottom+1}r`:H==="m"?"P1$r0m":H===" q"?`P1$r${{block:2,underline:4,bar:6}[F.cursorStyle]-(F.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(H,W){this._dirtyRowTracker.markRangeDirty(H,W)}}n.InputHandler=X;let q=class{constructor(K){this._bufferService=K,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(K){K<this.start?this.start=K:K>this.end&&(this.end=K)}markRangeDirty(K,H){K>H&&(Y=K,K=H,H=Y),K<this.start&&(this.start=K),H>this.end&&(this.end=H)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function G(K){return 0<=K&&K<256}q=d([p(0,D.IBufferService)],q)},844:(A,n)=>{function h(d){for(const p of d)p.dispose();d.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const p=this._disposables.indexOf(d);p!==-1&&this._disposables.splice(p,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var p;this._isDisposed||d===this._value||((p=this._value)==null||p.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},n.toDisposable=function(d){return{dispose:d}},n.disposeArray=h,n.getDisposeArrayDisposable=function(d){return{dispose:()=>h(d)}}},1505:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(p,l,g){this._data[p]||(this._data[p]={}),this._data[p][l]=g}get(p,l){return this._data[p]?this._data[p][l]:void 0}clear(){this._data={}}}n.TwoKeyMap=h,n.FourKeyMap=class{constructor(){this._data=new h}set(d,p,l,g,C){this._data.get(d,p)||this._data.set(d,p,new h),this._data.get(d,p).set(l,g,C)}get(d,p,l,g){var C;return(C=this._data.get(d,p))==null?void 0:C.get(l,g)}clear(){this._data.clear()}}},6114:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof process<"u"&&"title"in process;const h=n.isNode?"node":navigator.userAgent,d=n.isNode?"node":navigator.platform;n.isFirefox=h.includes("Firefox"),n.isLegacyEdge=h.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(h),n.getSafariVersion=function(){if(!n.isSafari)return 0;const p=h.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),n.isIpad=d==="iPad",n.isIphone=d==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),n.isLinux=d.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(h)},6106:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let h=0;n.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(h=this._search(this._getKey(d)),this._array.splice(h,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const p=this._getKey(d);if(p===void 0||(h=this._search(p),h===-1)||this._getKey(this._array[h])!==p)return!1;do if(this._array[h]===d)return this._array.splice(h,1),!0;while(++h<this._array.length&&this._getKey(this._array[h])===p);return!1}*getKeyIterator(d){if(this._array.length!==0&&(h=this._search(d),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===d))do yield this._array[h];while(++h<this._array.length&&this._getKey(this._array[h])===d)}forEachByKey(d,p){if(this._array.length!==0&&(h=this._search(d),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===d))do p(this._array[h]);while(++h<this._array.length&&this._getKey(this._array[h])===d)}values(){return[...this._array].values()}_search(d){let p=0,l=this._array.length-1;for(;l>=p;){let g=p+l>>1;const C=this._getKey(this._array[g]);if(C>d)l=g-1;else{if(!(C<d)){for(;g>0&&this._getKey(this._array[g-1])===d;)g--;return g}p=g+1}}return p}}},7226:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const d=h(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(C){this._tasks.push(C),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(C){this._idleCallback=void 0;let L=0,_=0,a=C.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(L=Date.now(),this._tasks[this._i]()||this._i++,L=Math.max(1,Date.now()-L),_=Math.max(L,_),c=C.timeRemaining(),1.5*_>c)return a-L<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(a-L))}ms`),void this._start();a=c}this.clear()}}class l extends p{_requestCallback(C){return setTimeout((()=>C(this._createDeadline(16))))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const L=Date.now()+C;return{timeRemaining:()=>Math.max(0,L-Date.now())}}}n.PriorityTaskQueue=l,n.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:l,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const d=h(643);n.updateWindowsModeWrappedState=function(p){const l=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),g=l==null?void 0:l.get(p.cols-1),C=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);C&&g&&(C.isWrapped=g[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&g[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(l){return[l>>>16&255,l>>>8&255,255&l]}static fromColorRGB(l){return(255&l[0])<<16|(255&l[1])<<8|255&l[2]}clone(){const l=new h;return l.fg=this.fg,l.bg=this.bg,l.extended=this.extended.clone(),l}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}}n.AttributeData=h;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(l){this._ext=l}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(l){this._ext&=-469762049,this._ext|=l<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(l){this._ext&=-67108864,this._ext|=67108863&l}get urlId(){return this._urlId}set urlId(l){this._urlId=l}get underlineVariantOffset(){const l=(3758096384&this._ext)>>29;return l<0?4294967288^l:l}set underlineVariantOffset(l){this._ext&=536870911,this._ext|=l<<29&3758096384}constructor(l=0,g=0){this._ext=0,this._urlId=0,this._ext=l,this._urlId=g}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=d},9092:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const d=h(6349),p=h(7226),l=h(3734),g=h(8437),C=h(4634),L=h(511),_=h(643),a=h(4863),c=h(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(o,u,S){this._hasScrollback=o,this._optionsService=u,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=L.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]),this._whitespaceCell=L.CellData.fromCharData([0,_.WHITESPACE_CELL_CHAR,_.WHITESPACE_CELL_WIDTH,_.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(o){return o?(this._nullCell.fg=o.fg,this._nullCell.bg=o.bg,this._nullCell.extended=o.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new l.ExtendedAttrs),this._nullCell}getWhitespaceCell(o){return o?(this._whitespaceCell.fg=o.fg,this._whitespaceCell.bg=o.bg,this._whitespaceCell.extended=o.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new l.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,u){return new g.BufferLine(this._bufferService.cols,this.getNullCell(o),u)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const o=this.ybase+this.y-this.ydisp;return o>=0&&o<this._rows}_getCorrectBufferLength(o){if(!this._hasScrollback)return o;const u=o+this._optionsService.rawOptions.scrollback;return u>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:u}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=g.DEFAULT_ATTR_DATA);let u=this._rows;for(;u--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,u){const S=this.getNullCell(g.DEFAULT_ATTR_DATA);let D=0;const b=this._getCorrectBufferLength(u);if(b>this.lines.maxLength&&(this.lines.maxLength=b),this.lines.length>0){if(this._cols<o)for(let w=0;w<this.lines.length;w++)D+=+this.lines.get(w).resize(o,S);let E=0;if(this._rows<u)for(let w=this._rows;w<u;w++)this.lines.length<u+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new g.BufferLine(o,S)):this.ybase>0&&this.lines.length<=this.ybase+this.y+E+1?(this.ybase--,E++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(o,S)));else for(let w=this._rows;w>u;w--)this.lines.length>u+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(b<this.lines.maxLength){const w=this.lines.length-b;w>0&&(this.lines.trimStart(w),this.ybase=Math.max(this.ybase-w,0),this.ydisp=Math.max(this.ydisp-w,0),this.savedY=Math.max(this.savedY-w,0)),this.lines.maxLength=b}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,u-1),E&&(this.y+=E),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=u-1,this._isReflowEnabled&&(this._reflow(o,u),this._cols>o))for(let E=0;E<this.lines.length;E++)D+=+this.lines.get(E).resize(o,S);this._cols=o,this._rows=u,this._memoryCleanupQueue.clear(),D>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let o=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,o=!1);let u=0;for(;this._memoryCleanupPosition<this.lines.length;)if(u+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),u>100)return!0;return o}get _isReflowEnabled(){const o=this._optionsService.rawOptions.windowsPty;return o&&o.buildNumber?this._hasScrollback&&o.backend==="conpty"&&o.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(o,u){this._cols!==o&&(o>this._cols?this._reflowLarger(o,u):this._reflowSmaller(o,u))}_reflowLarger(o,u){const S=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(S.length>0){const D=(0,C.reflowLargerCreateNewLayout)(this.lines,S);(0,C.reflowLargerApplyNewLayout)(this.lines,D.layout),this._reflowLargerAdjustViewport(o,u,D.countRemoved)}}_reflowLargerAdjustViewport(o,u,S){const D=this.getNullCell(g.DEFAULT_ATTR_DATA);let b=S;for(;b-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<u&&this.lines.push(new g.BufferLine(o,D))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-S,0)}_reflowSmaller(o,u){const S=this.getNullCell(g.DEFAULT_ATTR_DATA),D=[];let b=0;for(let E=this.lines.length-1;E>=0;E--){let w=this.lines.get(E);if(!w||!w.isWrapped&&w.getTrimmedLength()<=o)continue;const R=[w];for(;w.isWrapped&&E>0;)w=this.lines.get(--E),R.unshift(w);const N=this.ybase+this.y;if(N>=E&&N<E+R.length)continue;const z=R[R.length-1].getTrimmedLength(),I=(0,C.reflowSmallerGetNewLineLengths)(R,this._cols,o),U=I.length-R.length;let Y;Y=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+U):Math.max(0,this.lines.length-this.lines.maxLength+U);const X=[];for(let j=0;j<U;j++){const F=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);X.push(F)}X.length>0&&(D.push({start:E+R.length+b,newLines:X}),b+=X.length),R.push(...X);let q=I.length-1,G=I[q];G===0&&(q--,G=I[q]);let K=R.length-U-1,H=z;for(;K>=0;){const j=Math.min(H,G);if(R[q]===void 0)break;if(R[q].copyCellsFrom(R[K],H-j,G-j,j,!0),G-=j,G===0&&(q--,G=I[q]),H-=j,H===0){K--;const F=Math.max(K,0);H=(0,C.getWrappedLineTrimmedLength)(R,F,this._cols)}}for(let j=0;j<R.length;j++)I[j]<o&&R[j].setCell(I[j],S);let W=U-Y;for(;W-- >0;)this.ybase===0?this.y<u-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+b)-u&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+U,this.ybase+u-1)}if(D.length>0){const E=[],w=[];for(let q=0;q<this.lines.length;q++)w.push(this.lines.get(q));const R=this.lines.length;let N=R-1,z=0,I=D[z];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+b);let U=0;for(let q=Math.min(this.lines.maxLength-1,R+b-1);q>=0;q--)if(I&&I.start>N+U){for(let G=I.newLines.length-1;G>=0;G--)this.lines.set(q--,I.newLines[G]);q++,E.push({index:N+1,amount:I.newLines.length}),U+=I.newLines.length,I=D[++z]}else this.lines.set(q,w[N--]);let Y=0;for(let q=E.length-1;q>=0;q--)E[q].index+=Y,this.lines.onInsertEmitter.fire(E[q]),Y+=E[q].amount;const X=Math.max(0,R+b-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}}translateBufferLineToString(o,u,S=0,D){const b=this.lines.get(o);return b?b.translateToString(u,S,D):""}getWrappedRangeForLine(o){let u=o,S=o;for(;u>0&&this.lines.get(u).isWrapped;)u--;for(;S+1<this.lines.length&&this.lines.get(S+1).isWrapped;)S++;return{first:u,last:S}}setupTabStops(o){for(o!=null?this.tabs[o]||(o=this.prevStop(o)):(this.tabs={},o=0);o<this._cols;o+=this._optionsService.rawOptions.tabStopWidth)this.tabs[o]=!0}prevStop(o){for(o==null&&(o=this.x);!this.tabs[--o]&&o>0;);return o>=this._cols?this._cols-1:o<0?0:o}nextStop(o){for(o==null&&(o=this.x);!this.tabs[++o]&&o<this._cols;);return o>=this._cols?this._cols-1:o<0?0:o}clearMarkers(o){this._isClearing=!0;for(let u=0;u<this.markers.length;u++)this.markers[u].line===o&&(this.markers[u].dispose(),this.markers.splice(u--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].dispose(),this.markers.splice(o--,1);this._isClearing=!1}addMarker(o){const u=new a.Marker(o);return this.markers.push(u),u.register(this.lines.onTrim((S=>{u.line-=S,u.line<0&&u.dispose()}))),u.register(this.lines.onInsert((S=>{u.line>=S.index&&(u.line+=S.amount)}))),u.register(this.lines.onDelete((S=>{u.line>=S.index&&u.line<S.index+S.amount&&u.dispose(),u.line>S.index&&(u.line-=S.amount)}))),u.register(u.onDispose((()=>this._removeMarker(u)))),u}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const d=h(3734),p=h(511),l=h(643),g=h(482);n.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let C=0;class L{constructor(a,c,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*a);const u=c||p.CellData.fromCharData([0,l.NULL_CELL_CHAR,l.NULL_CELL_WIDTH,l.NULL_CELL_CODE]);for(let S=0;S<a;++S)this.setCell(S,u);this.length=a}get(a){const c=this._data[3*a+0],o=2097151&c;return[this._data[3*a+1],2097152&c?this._combined[a]:o?(0,g.stringFromCodePoint)(o):"",c>>22,2097152&c?this._combined[a].charCodeAt(this._combined[a].length-1):o]}set(a,c){this._data[3*a+1]=c[l.CHAR_DATA_ATTR_INDEX],c[l.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[a]=c[1],this._data[3*a+0]=2097152|a|c[l.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*a+0]=c[l.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[l.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(a){return this._data[3*a+0]>>22}hasWidth(a){return 12582912&this._data[3*a+0]}getFg(a){return this._data[3*a+1]}getBg(a){return this._data[3*a+2]}hasContent(a){return 4194303&this._data[3*a+0]}getCodePoint(a){const c=this._data[3*a+0];return 2097152&c?this._combined[a].charCodeAt(this._combined[a].length-1):2097151&c}isCombined(a){return 2097152&this._data[3*a+0]}getString(a){const c=this._data[3*a+0];return 2097152&c?this._combined[a]:2097151&c?(0,g.stringFromCodePoint)(2097151&c):""}isProtected(a){return 536870912&this._data[3*a+2]}loadCell(a,c){return C=3*a,c.content=this._data[C+0],c.fg=this._data[C+1],c.bg=this._data[C+2],2097152&c.content&&(c.combinedData=this._combined[a]),268435456&c.bg&&(c.extended=this._extendedAttrs[a]),c}setCell(a,c){2097152&c.content&&(this._combined[a]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[a]=c.extended),this._data[3*a+0]=c.content,this._data[3*a+1]=c.fg,this._data[3*a+2]=c.bg}setCellFromCodepoint(a,c,o,u){268435456&u.bg&&(this._extendedAttrs[a]=u.extended),this._data[3*a+0]=c|o<<22,this._data[3*a+1]=u.fg,this._data[3*a+2]=u.bg}addCodepointToCell(a,c,o){let u=this._data[3*a+0];2097152&u?this._combined[a]+=(0,g.stringFromCodePoint)(c):2097151&u?(this._combined[a]=(0,g.stringFromCodePoint)(2097151&u)+(0,g.stringFromCodePoint)(c),u&=-2097152,u|=2097152):u=c|4194304,o&&(u&=-12582913,u|=o<<22),this._data[3*a+0]=u}insertCells(a,c,o){if((a%=this.length)&&this.getWidth(a-1)===2&&this.setCellFromCodepoint(a-1,0,1,o),c<this.length-a){const u=new p.CellData;for(let S=this.length-a-c-1;S>=0;--S)this.setCell(a+c+S,this.loadCell(a+S,u));for(let S=0;S<c;++S)this.setCell(a+S,o)}else for(let u=a;u<this.length;++u)this.setCell(u,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(a,c,o){if(a%=this.length,c<this.length-a){const u=new p.CellData;for(let S=0;S<this.length-a-c;++S)this.setCell(a+S,this.loadCell(a+c+S,u));for(let S=this.length-c;S<this.length;++S)this.setCell(S,o)}else for(let u=a;u<this.length;++u)this.setCell(u,o);a&&this.getWidth(a-1)===2&&this.setCellFromCodepoint(a-1,0,1,o),this.getWidth(a)!==0||this.hasContent(a)||this.setCellFromCodepoint(a,0,1,o)}replaceCells(a,c,o,u=!1){if(u)for(a&&this.getWidth(a-1)===2&&!this.isProtected(a-1)&&this.setCellFromCodepoint(a-1,0,1,o),c<this.length&&this.getWidth(c-1)===2&&!this.isProtected(c)&&this.setCellFromCodepoint(c,0,1,o);a<c&&a<this.length;)this.isProtected(a)||this.setCell(a,o),a++;else for(a&&this.getWidth(a-1)===2&&this.setCellFromCodepoint(a-1,0,1,o),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c,0,1,o);a<c&&a<this.length;)this.setCell(a++,o)}resize(a,c){if(a===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*a;if(a>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const u=new Uint32Array(o);u.set(this._data),this._data=u}for(let u=this.length;u<a;++u)this.setCell(u,c)}else{this._data=this._data.subarray(0,o);const u=Object.keys(this._combined);for(let D=0;D<u.length;D++){const b=parseInt(u[D],10);b>=a&&delete this._combined[b]}const S=Object.keys(this._extendedAttrs);for(let D=0;D<S.length;D++){const b=parseInt(S[D],10);b>=a&&delete this._extendedAttrs[b]}}return this.length=a,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const a=new Uint32Array(this._data.length);return a.set(this._data),this._data=a,1}return 0}fill(a,c=!1){if(c)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,a);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,a)}}copyFrom(a){this.length!==a.length?this._data=new Uint32Array(a._data):this._data.set(a._data),this.length=a.length,this._combined={};for(const c in a._combined)this._combined[c]=a._combined[c];this._extendedAttrs={};for(const c in a._extendedAttrs)this._extendedAttrs[c]=a._extendedAttrs[c];this.isWrapped=a.isWrapped}clone(){const a=new L(0);a._data=new Uint32Array(this._data),a.length=this.length;for(const c in this._combined)a._combined[c]=this._combined[c];for(const c in this._extendedAttrs)a._extendedAttrs[c]=this._extendedAttrs[c];return a.isWrapped=this.isWrapped,a}getTrimmedLength(){for(let a=this.length-1;a>=0;--a)if(4194303&this._data[3*a+0])return a+(this._data[3*a+0]>>22);return 0}getNoBgTrimmedLength(){for(let a=this.length-1;a>=0;--a)if(4194303&this._data[3*a+0]||50331648&this._data[3*a+2])return a+(this._data[3*a+0]>>22);return 0}copyCellsFrom(a,c,o,u,S){const D=a._data;if(S)for(let E=u-1;E>=0;E--){for(let w=0;w<3;w++)this._data[3*(o+E)+w]=D[3*(c+E)+w];268435456&D[3*(c+E)+2]&&(this._extendedAttrs[o+E]=a._extendedAttrs[c+E])}else for(let E=0;E<u;E++){for(let w=0;w<3;w++)this._data[3*(o+E)+w]=D[3*(c+E)+w];268435456&D[3*(c+E)+2]&&(this._extendedAttrs[o+E]=a._extendedAttrs[c+E])}const b=Object.keys(a._combined);for(let E=0;E<b.length;E++){const w=parseInt(b[E],10);w>=c&&(this._combined[w-c+o]=a._combined[w])}}translateToString(a,c,o,u){c=c??0,o=o??this.length,a&&(o=Math.min(o,this.getTrimmedLength())),u&&(u.length=0);let S="";for(;c<o;){const D=this._data[3*c+0],b=2097151&D,E=2097152&D?this._combined[c]:b?(0,g.stringFromCodePoint)(b):l.WHITESPACE_CELL_CHAR;if(S+=E,u)for(let w=0;w<E.length;++w)u.push(c);c+=D>>22||1}return u&&u.push(c),S}}n.BufferLine=L},4841:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(h,d){if(h.start.y>h.end.y)throw new Error(`Buffer range end (${h.end.x}, ${h.end.y}) cannot be before start (${h.start.x}, ${h.start.y})`);return d*(h.end.y-h.start.y)+(h.end.x-h.start.x+1)}},4634:(A,n)=>{function h(d,p,l){if(p===d.length-1)return d[p].getTrimmedLength();const g=!d[p].hasContent(l-1)&&d[p].getWidth(l-1)===1,C=d[p+1].getWidth(0)===2;return g&&C?l-1:l}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(d,p,l,g,C){const L=[];for(let _=0;_<d.length-1;_++){let a=_,c=d.get(++a);if(!c.isWrapped)continue;const o=[d.get(_)];for(;a<d.length&&c.isWrapped;)o.push(c),c=d.get(++a);if(g>=_&&g<a){_+=o.length-1;continue}let u=0,S=h(o,u,p),D=1,b=0;for(;D<o.length;){const w=h(o,D,p),R=w-b,N=l-S,z=Math.min(R,N);o[u].copyCellsFrom(o[D],b,S,z,!1),S+=z,S===l&&(u++,S=0),b+=z,b===w&&(D++,b=0),S===0&&u!==0&&o[u-1].getWidth(l-1)===2&&(o[u].copyCellsFrom(o[u-1],l-1,S++,1,!1),o[u-1].setCell(l-1,C))}o[u].replaceCells(S,l,C);let E=0;for(let w=o.length-1;w>0&&(w>u||o[w].getTrimmedLength()===0);w--)E++;E>0&&(L.push(_+o.length-E),L.push(E)),_+=o.length-1}return L},n.reflowLargerCreateNewLayout=function(d,p){const l=[];let g=0,C=p[g],L=0;for(let _=0;_<d.length;_++)if(C===_){const a=p[++g];d.onDeleteEmitter.fire({index:_-L,amount:a}),_+=a-1,L+=a,C=p[++g]}else l.push(_);return{layout:l,countRemoved:L}},n.reflowLargerApplyNewLayout=function(d,p){const l=[];for(let g=0;g<p.length;g++)l.push(d.get(p[g]));for(let g=0;g<l.length;g++)d.set(g,l[g]);d.length=p.length},n.reflowSmallerGetNewLineLengths=function(d,p,l){const g=[],C=d.map(((c,o)=>h(d,o,p))).reduce(((c,o)=>c+o));let L=0,_=0,a=0;for(;a<C;){if(C-a<l){g.push(C-a);break}L+=l;const c=h(d,_,p);L>c&&(L-=c,_++);const o=d[_].getWidth(L-1)===2;o&&L--;const u=o?l-1:l;g.push(u),a+=u}return g},n.getWrappedLineTrimmedLength=h},5295:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const d=h(8460),p=h(844),l=h(9092);class g extends p.Disposable{constructor(L,_){super(),this._optionsService=L,this._bufferService=_,this._onBufferActivate=this.register(new d.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 l.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new l.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(L){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(L),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(L,_){this._normal.resize(L,_),this._alt.resize(L,_),this.setupTabStops(L)}setupTabStops(L){this._normal.setupTabStops(L),this._alt.setupTabStops(L)}}n.BufferSet=g},511:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const d=h(482),p=h(643),l=h(3734);class g extends l.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new l.ExtendedAttrs,this.combinedData=""}static fromCharData(L){const _=new g;return _.setFromCharData(L),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(L){this.fg=L[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(L[p.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(L[p.CHAR_DATA_CHAR_INDEX].length===2){const a=L[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=a&&a<=56319){const c=L[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(a-55296)+c-56320+65536|L[p.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=L[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|L[p.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=L[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|L[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=g},643:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},4863:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const d=h(8460),p=h(844);class l{get id(){return this._id}constructor(C){this.line=C,this.isDisposed=!1,this._disposables=[],this._id=l._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,p.disposeArray)(this._disposables),this._disposables.length=0)}register(C){return this._disposables.push(C),C}}n.Marker=l,l._nextId=1},7116:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_CHARSET=n.CHARSETS=void 0,n.CHARSETS={},n.DEFAULT_CHARSET=n.CHARSETS.B,n.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:"≥","{":"π","|":"≠","}":"£","~":"·"},n.CHARSETS.A={"#":"£"},n.CHARSETS.B=void 0,n.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},n.CHARSETS.C=n.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},n.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},n.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},n.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},n.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},n.CHARSETS.E=n.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},n.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},n.CHARSETS.H=n.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},n.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(A,n)=>{var h,d,p;Object.defineProperty(n,"__esModule",{value:!0}),n.C1_ESCAPED=n.C1=n.C0=void 0,(function(l){l.NUL="\0",l.SOH="",l.STX="",l.ETX="",l.EOT="",l.ENQ="",l.ACK="",l.BEL="\x07",l.BS="\b",l.HT=" ",l.LF=`
|
|
100
|
+
`,l.VT="\v",l.FF="\f",l.CR="\r",l.SO="",l.SI="",l.DLE="",l.DC1="",l.DC2="",l.DC3="",l.DC4="",l.NAK="",l.SYN="",l.ETB="",l.CAN="",l.EM="",l.SUB="",l.ESC="\x1B",l.FS="",l.GS="",l.RS="",l.US="",l.SP=" ",l.DEL=""})(h||(n.C0=h={})),(function(l){l.PAD="",l.HOP="",l.BPH="",l.NBH="",l.IND="",l.NEL="
",l.SSA="",l.ESA="",l.HTS="",l.HTJ="",l.VTS="",l.PLD="",l.PLU="",l.RI="",l.SS2="",l.SS3="",l.DCS="",l.PU1="",l.PU2="",l.STS="",l.CCH="",l.MW="",l.SPA="",l.EPA="",l.SOS="",l.SGCI="",l.SCI="",l.CSI="",l.ST="",l.OSC="",l.PM="",l.APC=""})(d||(n.C1=d={})),(function(l){l.ST=`${h.ESC}\\`})(p||(n.C1_ESCAPED=p={}))},7399:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const d=h(2584),p={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};n.evaluateKeyboardEvent=function(l,g,C,L){const _={type:0,cancel:!1,key:void 0},a=(l.shiftKey?1:0)|(l.altKey?2:0)|(l.ctrlKey?4:0)|(l.metaKey?8:0);switch(l.keyCode){case 0:l.key==="UIKeyInputUpArrow"?_.key=g?d.C0.ESC+"OA":d.C0.ESC+"[A":l.key==="UIKeyInputLeftArrow"?_.key=g?d.C0.ESC+"OD":d.C0.ESC+"[D":l.key==="UIKeyInputRightArrow"?_.key=g?d.C0.ESC+"OC":d.C0.ESC+"[C":l.key==="UIKeyInputDownArrow"&&(_.key=g?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:_.key=l.ctrlKey?"\b":d.C0.DEL,l.altKey&&(_.key=d.C0.ESC+_.key);break;case 9:if(l.shiftKey){_.key=d.C0.ESC+"[Z";break}_.key=d.C0.HT,_.cancel=!0;break;case 13:_.key=l.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,_.cancel=!0;break;case 27:_.key=d.C0.ESC,l.altKey&&(_.key=d.C0.ESC+d.C0.ESC),_.cancel=!0;break;case 37:if(l.metaKey)break;a?(_.key=d.C0.ESC+"[1;"+(a+1)+"D",_.key===d.C0.ESC+"[1;3D"&&(_.key=d.C0.ESC+(C?"b":"[1;5D"))):_.key=g?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(l.metaKey)break;a?(_.key=d.C0.ESC+"[1;"+(a+1)+"C",_.key===d.C0.ESC+"[1;3C"&&(_.key=d.C0.ESC+(C?"f":"[1;5C"))):_.key=g?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(l.metaKey)break;a?(_.key=d.C0.ESC+"[1;"+(a+1)+"A",C||_.key!==d.C0.ESC+"[1;3A"||(_.key=d.C0.ESC+"[1;5A")):_.key=g?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(l.metaKey)break;a?(_.key=d.C0.ESC+"[1;"+(a+1)+"B",C||_.key!==d.C0.ESC+"[1;3B"||(_.key=d.C0.ESC+"[1;5B")):_.key=g?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:l.shiftKey||l.ctrlKey||(_.key=d.C0.ESC+"[2~");break;case 46:_.key=a?d.C0.ESC+"[3;"+(a+1)+"~":d.C0.ESC+"[3~";break;case 36:_.key=a?d.C0.ESC+"[1;"+(a+1)+"H":g?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:_.key=a?d.C0.ESC+"[1;"+(a+1)+"F":g?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:l.shiftKey?_.type=2:l.ctrlKey?_.key=d.C0.ESC+"[5;"+(a+1)+"~":_.key=d.C0.ESC+"[5~";break;case 34:l.shiftKey?_.type=3:l.ctrlKey?_.key=d.C0.ESC+"[6;"+(a+1)+"~":_.key=d.C0.ESC+"[6~";break;case 112:_.key=a?d.C0.ESC+"[1;"+(a+1)+"P":d.C0.ESC+"OP";break;case 113:_.key=a?d.C0.ESC+"[1;"+(a+1)+"Q":d.C0.ESC+"OQ";break;case 114:_.key=a?d.C0.ESC+"[1;"+(a+1)+"R":d.C0.ESC+"OR";break;case 115:_.key=a?d.C0.ESC+"[1;"+(a+1)+"S":d.C0.ESC+"OS";break;case 116:_.key=a?d.C0.ESC+"[15;"+(a+1)+"~":d.C0.ESC+"[15~";break;case 117:_.key=a?d.C0.ESC+"[17;"+(a+1)+"~":d.C0.ESC+"[17~";break;case 118:_.key=a?d.C0.ESC+"[18;"+(a+1)+"~":d.C0.ESC+"[18~";break;case 119:_.key=a?d.C0.ESC+"[19;"+(a+1)+"~":d.C0.ESC+"[19~";break;case 120:_.key=a?d.C0.ESC+"[20;"+(a+1)+"~":d.C0.ESC+"[20~";break;case 121:_.key=a?d.C0.ESC+"[21;"+(a+1)+"~":d.C0.ESC+"[21~";break;case 122:_.key=a?d.C0.ESC+"[23;"+(a+1)+"~":d.C0.ESC+"[23~";break;case 123:_.key=a?d.C0.ESC+"[24;"+(a+1)+"~":d.C0.ESC+"[24~";break;default:if(!l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)if(C&&!L||!l.altKey||l.metaKey)!C||l.altKey||l.ctrlKey||l.shiftKey||!l.metaKey?l.key&&!l.ctrlKey&&!l.altKey&&!l.metaKey&&l.keyCode>=48&&l.key.length===1?_.key=l.key:l.key&&l.ctrlKey&&(l.key==="_"&&(_.key=d.C0.US),l.key==="@"&&(_.key=d.C0.NUL)):l.keyCode===65&&(_.type=1);else{const c=p[l.keyCode],o=c==null?void 0:c[l.shiftKey?1:0];if(o)_.key=d.C0.ESC+o;else if(l.keyCode>=65&&l.keyCode<=90){const u=l.ctrlKey?l.keyCode-64:l.keyCode+32;let S=String.fromCharCode(u);l.shiftKey&&(S=S.toUpperCase()),_.key=d.C0.ESC+S}else if(l.keyCode===32)_.key=d.C0.ESC+(l.ctrlKey?d.C0.NUL:" ");else if(l.key==="Dead"&&l.code.startsWith("Key")){let u=l.code.slice(3,4);l.shiftKey||(u=u.toLowerCase()),_.key=d.C0.ESC+u,_.cancel=!0}}else l.keyCode>=65&&l.keyCode<=90?_.key=String.fromCharCode(l.keyCode-64):l.keyCode===32?_.key=d.C0.NUL:l.keyCode>=51&&l.keyCode<=55?_.key=String.fromCharCode(l.keyCode-51+27):l.keyCode===56?_.key=d.C0.DEL:l.keyCode===219?_.key=d.C0.ESC:l.keyCode===220?_.key=d.C0.FS:l.keyCode===221&&(_.key=d.C0.GS)}return _}},482:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},n.utf32ToString=function(h,d=0,p=h.length){let l="";for(let g=d;g<p;++g){let C=h[g];C>65535?(C-=65536,l+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):l+=String.fromCharCode(C)}return l},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,d){const p=h.length;if(!p)return 0;let l=0,g=0;if(this._interim){const C=h.charCodeAt(g++);56320<=C&&C<=57343?d[l++]=1024*(this._interim-55296)+C-56320+65536:(d[l++]=this._interim,d[l++]=C),this._interim=0}for(let C=g;C<p;++C){const L=h.charCodeAt(C);if(55296<=L&&L<=56319){if(++C>=p)return this._interim=L,l;const _=h.charCodeAt(C);56320<=_&&_<=57343?d[l++]=1024*(L-55296)+_-56320+65536:(d[l++]=L,d[l++]=_)}else L!==65279&&(d[l++]=L)}return l}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,d){const p=h.length;if(!p)return 0;let l,g,C,L,_=0,a=0,c=0;if(this.interim[0]){let S=!1,D=this.interim[0];D&=(224&D)==192?31:(240&D)==224?15:7;let b,E=0;for(;(b=63&this.interim[++E])&&E<4;)D<<=6,D|=b;const w=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=w-E;for(;c<R;){if(c>=p)return 0;if(b=h[c++],(192&b)!=128){c--,S=!0;break}this.interim[E++]=b,D<<=6,D|=63&b}S||(w===2?D<128?c--:d[_++]=D:w===3?D<2048||D>=55296&&D<=57343||D===65279||(d[_++]=D):D<65536||D>1114111||(d[_++]=D)),this.interim.fill(0)}const o=p-4;let u=c;for(;u<p;){for(;!(!(u<o)||128&(l=h[u])||128&(g=h[u+1])||128&(C=h[u+2])||128&(L=h[u+3]));)d[_++]=l,d[_++]=g,d[_++]=C,d[_++]=L,u+=4;if(l=h[u++],l<128)d[_++]=l;else if((224&l)==192){if(u>=p)return this.interim[0]=l,_;if(g=h[u++],(192&g)!=128){u--;continue}if(a=(31&l)<<6|63&g,a<128){u--;continue}d[_++]=a}else if((240&l)==224){if(u>=p)return this.interim[0]=l,_;if(g=h[u++],(192&g)!=128){u--;continue}if(u>=p)return this.interim[0]=l,this.interim[1]=g,_;if(C=h[u++],(192&C)!=128){u--;continue}if(a=(15&l)<<12|(63&g)<<6|63&C,a<2048||a>=55296&&a<=57343||a===65279)continue;d[_++]=a}else if((248&l)==240){if(u>=p)return this.interim[0]=l,_;if(g=h[u++],(192&g)!=128){u--;continue}if(u>=p)return this.interim[0]=l,this.interim[1]=g,_;if(C=h[u++],(192&C)!=128){u--;continue}if(u>=p)return this.interim[0]=l,this.interim[1]=g,this.interim[2]=C,_;if(L=h[u++],(192&L)!=128){u--;continue}if(a=(7&l)<<18|(63&g)<<12|(63&C)<<6|63&L,a<65536||a>1114111)continue;d[_++]=a}}return _}}},225:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const d=h(1480),p=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],l=[[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 g;n.UnicodeV6=class{constructor(){if(this.version="6",!g){g=new Uint8Array(65536),g.fill(1),g[0]=0,g.fill(0,1,32),g.fill(0,127,160),g.fill(2,4352,4448),g[9001]=2,g[9002]=2,g.fill(2,11904,42192),g[12351]=1,g.fill(2,44032,55204),g.fill(2,63744,64256),g.fill(2,65040,65050),g.fill(2,65072,65136),g.fill(2,65280,65377),g.fill(2,65504,65511);for(let C=0;C<p.length;++C)g.fill(0,p[C][0],p[C][1]+1)}}wcwidth(C){return C<32?0:C<127?1:C<65536?g[C]:(function(L,_){let a,c=0,o=_.length-1;if(L<_[0][0]||L>_[o][1])return!1;for(;o>=c;)if(a=c+o>>1,L>_[a][1])c=a+1;else{if(!(L<_[a][0]))return!0;o=a-1}return!1})(C,l)?0:C>=131072&&C<=196605||C>=196608&&C<=262141?2:1}charProperties(C,L){let _=this.wcwidth(C),a=_===0&&L!==0;if(a){const c=d.UnicodeService.extractWidth(L);c===0?a=!1:c>_&&(_=c)}return d.UnicodeService.createPropertyValue(0,_,a)}}},5981:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const d=h(8460),p=h(844);class l extends p.Disposable{constructor(C){super(),this._action=C,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(C,L){if(L!==void 0&&this._syncCalls>L)return void(this._syncCalls=0);if(this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let _;for(this._isSyncWriting=!0;_=this._writeBuffer.shift();){this._action(_);const a=this._callbacks.shift();a&&a()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(C,L){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(L),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(L)}_innerWrite(C=0,L=!0){const _=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const a=this._writeBuffer[this._bufferOffset],c=this._action(a,L);if(c){const u=S=>Date.now()-_>=12?setTimeout((()=>this._innerWrite(0,S))):this._innerWrite(_,S);return void c.catch((S=>(queueMicrotask((()=>{throw S})),Promise.resolve(!1)))).then(u)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=a.length,Date.now()-_>=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()}}n.WriteBuffer=l},5941:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.parseColor=void 0;const h=/^([\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})$/,d=/^[\da-f]+$/;function p(l,g){const C=l.toString(16),L=C.length<2?"0"+C:C;switch(g){case 4:return C[0];case 8:return L;case 12:return(L+L).slice(0,3);default:return L+L}}n.parseColor=function(l){if(!l)return;let g=l.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const C=h.exec(g);if(C){const L=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/L*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/L*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/L*255)]}}else if(g.indexOf("#")===0&&(g=g.slice(1),d.exec(g)&&[3,6,9,12].includes(g.length))){const C=g.length/3,L=[0,0,0];for(let _=0;_<3;++_){const a=parseInt(g.slice(C*_,C*_+C),16);L[_]=C===1?a<<4:C===2?a:C===3?a>>4:a>>8}return L}},n.toRgbString=function(l,g=16){const[C,L,_]=l;return`rgb:${p(C,g)}/${p(L,g)}/${p(_,g)}`}},5770:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const d=h(482),p=h(8742),l=h(5770),g=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=g}registerHandler(L,_){this._handlers[L]===void 0&&(this._handlers[L]=[]);const a=this._handlers[L];return a.push(_),{dispose:()=>{const c=a.indexOf(_);c!==-1&&a.splice(c,1)}}}clearHandler(L){this._handlers[L]&&delete this._handlers[L]}setHandlerFallback(L){this._handlerFb=L}reset(){if(this._active.length)for(let L=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;L>=0;--L)this._active[L].unhook(!1);this._stack.paused=!1,this._active=g,this._ident=0}hook(L,_){if(this.reset(),this._ident=L,this._active=this._handlers[L]||g,this._active.length)for(let a=this._active.length-1;a>=0;a--)this._active[a].hook(_);else this._handlerFb(this._ident,"HOOK",_)}put(L,_,a){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(L,_,a);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(L,_,a))}unhook(L,_=!0){if(this._active.length){let a=!1,c=this._active.length-1,o=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,a=_,o=this._stack.fallThrough,this._stack.paused=!1),!o&&a===!1){for(;c>=0&&(a=this._active[c].unhook(L),a!==!0);c--)if(a instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,a;c--}for(;c>=0;c--)if(a=this._active[c].unhook(!1),a instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,a}else this._handlerFb(this._ident,"UNHOOK",L);this._active=g,this._ident=0}};const C=new p.Params;C.addParam(0),n.DcsHandler=class{constructor(L){this._handler=L,this._data="",this._params=C,this._hitLimit=!1}hook(L){this._params=L.length>1||L.params[0]?L.clone():C,this._data="",this._hitLimit=!1}put(L,_,a){this._hitLimit||(this._data+=(0,d.utf32ToString)(L,_,a),this._data.length>l.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(L){let _=!1;if(this._hitLimit)_=!1;else if(L&&(_=this._handler(this._data,this._params),_ instanceof Promise))return _.then((a=>(this._params=C,this._data="",this._hitLimit=!1,a)));return this._params=C,this._data="",this._hitLimit=!1,_}}},2015:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const d=h(844),p=h(8742),l=h(6242),g=h(6351);class C{constructor(c){this.table=new Uint8Array(c)}setDefault(c,o){this.table.fill(c<<4|o)}add(c,o,u,S){this.table[o<<8|c]=u<<4|S}addMany(c,o,u,S){for(let D=0;D<c.length;D++)this.table[o<<8|c[D]]=u<<4|S}}n.TransitionTable=C;const L=160;n.VT500_TRANSITION_TABLE=(function(){const a=new C(4095),c=Array.apply(null,Array(256)).map(((E,w)=>w)),o=(E,w)=>c.slice(E,w),u=o(32,127),S=o(0,24);S.push(25),S.push.apply(S,o(28,32));const D=o(0,14);let b;for(b in a.setDefault(1,0),a.addMany(u,0,2,0),D)a.addMany([24,26,153,154],b,3,0),a.addMany(o(128,144),b,3,0),a.addMany(o(144,152),b,3,0),a.add(156,b,0,0),a.add(27,b,11,1),a.add(157,b,4,8),a.addMany([152,158,159],b,0,7),a.add(155,b,11,3),a.add(144,b,11,9);return a.addMany(S,0,3,0),a.addMany(S,1,3,1),a.add(127,1,0,1),a.addMany(S,8,0,8),a.addMany(S,3,3,3),a.add(127,3,0,3),a.addMany(S,4,3,4),a.add(127,4,0,4),a.addMany(S,6,3,6),a.addMany(S,5,3,5),a.add(127,5,0,5),a.addMany(S,2,3,2),a.add(127,2,0,2),a.add(93,1,4,8),a.addMany(u,8,5,8),a.add(127,8,5,8),a.addMany([156,27,24,26,7],8,6,0),a.addMany(o(28,32),8,0,8),a.addMany([88,94,95],1,0,7),a.addMany(u,7,0,7),a.addMany(S,7,0,7),a.add(156,7,0,0),a.add(127,7,0,7),a.add(91,1,11,3),a.addMany(o(64,127),3,7,0),a.addMany(o(48,60),3,8,4),a.addMany([60,61,62,63],3,9,4),a.addMany(o(48,60),4,8,4),a.addMany(o(64,127),4,7,0),a.addMany([60,61,62,63],4,0,6),a.addMany(o(32,64),6,0,6),a.add(127,6,0,6),a.addMany(o(64,127),6,0,0),a.addMany(o(32,48),3,9,5),a.addMany(o(32,48),5,9,5),a.addMany(o(48,64),5,0,6),a.addMany(o(64,127),5,7,0),a.addMany(o(32,48),4,9,5),a.addMany(o(32,48),1,9,2),a.addMany(o(32,48),2,9,2),a.addMany(o(48,127),2,10,0),a.addMany(o(48,80),1,10,0),a.addMany(o(81,88),1,10,0),a.addMany([89,90,92],1,10,0),a.addMany(o(96,127),1,10,0),a.add(80,1,11,9),a.addMany(S,9,0,9),a.add(127,9,0,9),a.addMany(o(28,32),9,0,9),a.addMany(o(32,48),9,9,12),a.addMany(o(48,60),9,8,10),a.addMany([60,61,62,63],9,9,10),a.addMany(S,11,0,11),a.addMany(o(32,128),11,0,11),a.addMany(o(28,32),11,0,11),a.addMany(S,10,0,10),a.add(127,10,0,10),a.addMany(o(28,32),10,0,10),a.addMany(o(48,60),10,8,10),a.addMany([60,61,62,63],10,0,11),a.addMany(o(32,48),10,9,12),a.addMany(S,12,0,12),a.add(127,12,0,12),a.addMany(o(28,32),12,0,12),a.addMany(o(32,48),12,9,12),a.addMany(o(48,64),12,0,11),a.addMany(o(64,127),12,12,13),a.addMany(o(64,127),10,12,13),a.addMany(o(64,127),9,12,13),a.addMany(S,13,13,13),a.addMany(u,13,13,13),a.add(127,13,0,13),a.addMany([27,156,24,26],13,14,0),a.add(L,0,2,0),a.add(L,8,5,8),a.add(L,6,0,6),a.add(L,11,0,11),a.add(L,13,13,13),a})();class _ extends d.Disposable{constructor(c=n.VT500_TRANSITION_TABLE){super(),this._transitions=c,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(o,u,S)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,u)=>{},this._escHandlerFb=o=>{},this._errorHandlerFb=o=>o,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new l.OscParser),this._dcsParser=this.register(new g.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,o=[64,126]){let u=0;if(c.prefix){if(c.prefix.length>1)throw new Error("only one byte as prefix supported");if(u=c.prefix.charCodeAt(0),u&&60>u||u>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(c.intermediates){if(c.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let D=0;D<c.intermediates.length;++D){const b=c.intermediates.charCodeAt(D);if(32>b||b>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");u<<=8,u|=b}}if(c.final.length!==1)throw new Error("final must be a single byte");const S=c.final.charCodeAt(0);if(o[0]>S||S>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return u<<=8,u|=S,u}identToString(c){const o=[];for(;c;)o.push(String.fromCharCode(255&c)),c>>=8;return o.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,o){const u=this._identifier(c,[48,126]);this._escHandlers[u]===void 0&&(this._escHandlers[u]=[]);const S=this._escHandlers[u];return S.push(o),{dispose:()=>{const D=S.indexOf(o);D!==-1&&S.splice(D,1)}}}clearEscHandler(c){this._escHandlers[this._identifier(c,[48,126])]&&delete this._escHandlers[this._identifier(c,[48,126])]}setEscHandlerFallback(c){this._escHandlerFb=c}setExecuteHandler(c,o){this._executeHandlers[c.charCodeAt(0)]=o}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,o){const u=this._identifier(c);this._csiHandlers[u]===void 0&&(this._csiHandlers[u]=[]);const S=this._csiHandlers[u];return S.push(o),{dispose:()=>{const D=S.indexOf(o);D!==-1&&S.splice(D,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,o){return this._dcsParser.registerHandler(this._identifier(c),o)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,o){return this._oscParser.registerHandler(c,o)}clearOscHandler(c){this._oscParser.clearHandler(c)}setOscHandlerFallback(c){this._oscParser.setHandlerFallback(c)}setErrorHandler(c){this._errorHandler=c}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(c,o,u,S,D){this._parseStack.state=c,this._parseStack.handlers=o,this._parseStack.handlerPos=u,this._parseStack.transition=S,this._parseStack.chunkPos=D}parse(c,o,u){let S,D=0,b=0,E=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,E=this._parseStack.chunkPos+1;else{if(u===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const w=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(u===!1&&R>-1){for(;R>=0&&(S=w[R](this._params),S!==!0);R--)if(S instanceof Promise)return this._parseStack.handlerPos=R,S}this._parseStack.handlers=[];break;case 4:if(u===!1&&R>-1){for(;R>=0&&(S=w[R](),S!==!0);R--)if(S instanceof Promise)return this._parseStack.handlerPos=R,S}this._parseStack.handlers=[];break;case 6:if(D=c[this._parseStack.chunkPos],S=this._dcsParser.unhook(D!==24&&D!==26,u),S)return S;D===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(D=c[this._parseStack.chunkPos],S=this._oscParser.end(D!==24&&D!==26,u),S)return S;D===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,E=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let w=E;w<o;++w){switch(D=c[w],b=this._transitions.table[this.currentState<<8|(D<160?D:L)],b>>4){case 2:for(let U=w+1;;++U){if(U>=o||(D=c[U])<32||D>126&&D<L){this._printHandler(c,w,U),w=U-1;break}if(++U>=o||(D=c[U])<32||D>126&&D<L){this._printHandler(c,w,U),w=U-1;break}if(++U>=o||(D=c[U])<32||D>126&&D<L){this._printHandler(c,w,U),w=U-1;break}if(++U>=o||(D=c[U])<32||D>126&&D<L){this._printHandler(c,w,U),w=U-1;break}}break;case 3:this._executeHandlers[D]?this._executeHandlers[D]():this._executeHandlerFb(D),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:w,code:D,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|D];let N=R?R.length-1:-1;for(;N>=0&&(S=R[N](this._params),S!==!0);N--)if(S instanceof Promise)return this._preserveStack(3,R,N,b,w),S;N<0&&this._csiHandlerFb(this._collect<<8|D,this._params),this.precedingJoinState=0;break;case 8:do switch(D){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(D-48)}while(++w<o&&(D=c[w])>47&&D<60);w--;break;case 9:this._collect<<=8,this._collect|=D;break;case 10:const z=this._escHandlers[this._collect<<8|D];let I=z?z.length-1:-1;for(;I>=0&&(S=z[I](),S!==!0);I--)if(S instanceof Promise)return this._preserveStack(4,z,I,b,w),S;I<0&&this._escHandlerFb(this._collect<<8|D),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|D,this._params);break;case 13:for(let U=w+1;;++U)if(U>=o||(D=c[U])===24||D===26||D===27||D>127&&D<L){this._dcsParser.put(c,w,U),w=U-1;break}break;case 14:if(S=this._dcsParser.unhook(D!==24&&D!==26),S)return this._preserveStack(6,[],0,b,w),S;D===27&&(b|=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 U=w+1;;U++)if(U>=o||(D=c[U])<32||D>127&&D<L){this._oscParser.put(c,w,U),w=U-1;break}break;case 6:if(S=this._oscParser.end(D!==24&&D!==26),S)return this._preserveStack(5,[],0,b,w),S;D===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&b}}}n.EscapeSequenceParser=_},6242:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const d=h(5770),p=h(482),l=[];n.OscParser=class{constructor(){this._state=0,this._active=l,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(g,C){this._handlers[g]===void 0&&(this._handlers[g]=[]);const L=this._handlers[g];return L.push(C),{dispose:()=>{const _=L.indexOf(C);_!==-1&&L.splice(_,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=l}reset(){if(this._state===2)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].end(!1);this._stack.paused=!1,this._active=l,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||l,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].start();else this._handlerFb(this._id,"START")}_put(g,C,L){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(g,C,L);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(g,C,L))}start(){this.reset(),this._state=1}put(g,C,L){if(this._state!==3){if(this._state===1)for(;C<L;){const _=g[C++];if(_===59){this._state=2,this._start();break}if(_<48||57<_)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+_-48}this._state===2&&L-C>0&&this._put(g,C,L)}}end(g,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let L=!1,_=this._active.length-1,a=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,L=C,a=this._stack.fallThrough,this._stack.paused=!1),!a&&L===!1){for(;_>=0&&(L=this._active[_].end(g),L!==!0);_--)if(L instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,L;_--}for(;_>=0;_--)if(L=this._active[_].end(!1),L instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,L}else this._handlerFb(this._id,"END",g);this._active=l,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,C,L){this._hitLimit||(this._data+=(0,p.utf32ToString)(g,C,L),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let C=!1;if(this._hitLimit)C=!1;else if(g&&(C=this._handler(this._data),C instanceof Promise))return C.then((L=>(this._data="",this._hitLimit=!1,L)));return this._data="",this._hitLimit=!1,C}}},8742:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const h=2147483647;class d{static fromArray(l){const g=new d;if(!l.length)return g;for(let C=Array.isArray(l[0])?1:0;C<l.length;++C){const L=l[C];if(Array.isArray(L))for(let _=0;_<L.length;++_)g.addSubParam(L[_]);else g.addParam(L)}return g}constructor(l=32,g=32){if(this.maxLength=l,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(l),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(l),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const l=new d(this.maxLength,this.maxSubParamsLength);return l.params.set(this.params),l.length=this.length,l._subParams.set(this._subParams),l._subParamsLength=this._subParamsLength,l._subParamsIdx.set(this._subParamsIdx),l._rejectDigits=this._rejectDigits,l._rejectSubDigits=this._rejectSubDigits,l._digitIsSub=this._digitIsSub,l}toArray(){const l=[];for(let g=0;g<this.length;++g){l.push(this.params[g]);const C=this._subParamsIdx[g]>>8,L=255&this._subParamsIdx[g];L-C>0&&l.push(Array.prototype.slice.call(this._subParams,C,L))}return l}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(l){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(l<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=l>h?h:l}}addSubParam(l){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(l<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=l>h?h:l,this._subParamsIdx[this.length-1]++}}hasSubParams(l){return(255&this._subParamsIdx[l])-(this._subParamsIdx[l]>>8)>0}getSubParams(l){const g=this._subParamsIdx[l]>>8,C=255&this._subParamsIdx[l];return C-g>0?this._subParams.subarray(g,C):null}getSubParamsAll(){const l={};for(let g=0;g<this.length;++g){const C=this._subParamsIdx[g]>>8,L=255&this._subParamsIdx[g];L-C>0&&(l[g]=this._subParams.slice(C,L))}return l}addDigit(l){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const C=this._digitIsSub?this._subParams:this.params,L=C[g-1];C[g-1]=~L?Math.min(10*L+l,h):l}}n.Params=d},5741:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()}loadAddon(h,d){const p={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(p),d.dispose=()=>this._wrappedAddonDispose(p),d.activate(h)}_wrappedAddonDispose(h){if(h.isDisposed)return;let d=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===h){d=p;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(d,1)}}},8771:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const d=h(3785),p=h(511);n.BufferApiView=class{constructor(l,g){this._buffer=l,this.type=g}init(l){return this._buffer=l,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(l){const g=this._buffer.lines.get(l);if(g)return new d.BufferLineApiView(g)}getNullCell(){return new p.CellData}}},3785:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const d=h(511);n.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,l){if(!(p<0||p>=this._line.length))return l?(this._line.loadCell(p,l),l):this._line.loadCell(p,new d.CellData)}translateToString(p,l,g){return this._line.translateToString(p,l,g)}}},8285:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const d=h(8771),p=h(8460),l=h(844);class g extends l.Disposable{constructor(L){super(),this._core=L,this._onBufferChange=this.register(new p.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.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)}}n.BufferNamespaceApi=g},7975:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(h){this._core=h}registerCsiHandler(h,d){return this._core.registerCsiHandler(h,(p=>d(p.toArray())))}addCsiHandler(h,d){return this.registerCsiHandler(h,d)}registerDcsHandler(h,d){return this._core.registerDcsHandler(h,((p,l)=>d(p,l.toArray())))}addDcsHandler(h,d){return this.registerDcsHandler(h,d)}registerEscHandler(h,d){return this._core.registerEscHandler(h,d)}addEscHandler(h,d){return this.registerEscHandler(h,d)}registerOscHandler(h,d){return this._core.registerOscHandler(h,d)}addOscHandler(h,d){return this.registerOscHandler(h,d)}}},7090:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.UnicodeApi=class{constructor(h){this._core=h}register(h){this._core.unicodeService.register(h)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(h){this._core.unicodeService.activeVersion=h}}},744:function(A,n,h){var d=this&&this.__decorate||function(a,c,o,u){var S,D=arguments.length,b=D<3?c:u===null?u=Object.getOwnPropertyDescriptor(c,o):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(a,c,o,u);else for(var E=a.length-1;E>=0;E--)(S=a[E])&&(b=(D<3?S(b):D>3?S(c,o,b):S(c,o))||b);return D>3&&b&&Object.defineProperty(c,o,b),b},p=this&&this.__param||function(a,c){return function(o,u){c(o,u,a)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const l=h(8460),g=h(844),C=h(5295),L=h(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let _=n.BufferService=class extends g.Disposable{get buffer(){return this.buffers.active}constructor(a){super(),this.isUserScrolling=!1,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new l.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(a.rawOptions.cols||0,n.MINIMUM_COLS),this.rows=Math.max(a.rawOptions.rows||0,n.MINIMUM_ROWS),this.buffers=this.register(new C.BufferSet(a,this))}resize(a,c){this.cols=a,this.rows=c,this.buffers.resize(a,c),this._onResize.fire({cols:a,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(a,c=!1){const o=this.buffer;let u;u=this._cachedBlankLine,u&&u.length===this.cols&&u.getFg(0)===a.fg&&u.getBg(0)===a.bg||(u=o.getBlankLine(a,c),this._cachedBlankLine=u),u.isWrapped=c;const S=o.ybase+o.scrollTop,D=o.ybase+o.scrollBottom;if(o.scrollTop===0){const b=o.lines.isFull;D===o.lines.length-1?b?o.lines.recycle().copyFrom(u):o.lines.push(u.clone()):o.lines.splice(D+1,0,u.clone()),b?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const b=D-S+1;o.lines.shiftElements(S+1,b-1,-1),o.lines.set(D,u.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(a,c,o){const u=this.buffer;if(a<0){if(u.ydisp===0)return;this.isUserScrolling=!0}else a+u.ydisp>=u.ybase&&(this.isUserScrolling=!1);const S=u.ydisp;u.ydisp=Math.max(Math.min(u.ydisp+a,u.ybase),0),S!==u.ydisp&&(c||this._onScroll.fire(u.ydisp))}};n.BufferService=_=d([p(0,L.IOptionsService)],_)},7994:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CharsetService=void 0,n.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(h){this.glevel=h,this.charset=this._charsets[h]}setgCharset(h,d){this._charsets[h]=d,this.glevel===h&&(this.charset=d)}}},1753:function(A,n,h){var d=this&&this.__decorate||function(u,S,D,b){var E,w=arguments.length,R=w<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,D):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(u,S,D,b);else for(var N=u.length-1;N>=0;N--)(E=u[N])&&(R=(w<3?E(R):w>3?E(S,D,R):E(S,D))||R);return w>3&&R&&Object.defineProperty(S,D,R),R},p=this&&this.__param||function(u,S){return function(D,b){S(D,b,u)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const l=h(2585),g=h(8460),C=h(844),L={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:u=>u.button!==4&&u.action===1&&(u.ctrl=!1,u.alt=!1,u.shift=!1,!0)},VT200:{events:19,restrict:u=>u.action!==32},DRAG:{events:23,restrict:u=>u.action!==32||u.button!==3},ANY:{events:31,restrict:u=>!0}};function _(u,S){let D=(u.ctrl?16:0)|(u.shift?4:0)|(u.alt?8:0);return u.button===4?(D|=64,D|=u.action):(D|=3&u.button,4&u.button&&(D|=64),8&u.button&&(D|=128),u.action===32?D|=32:u.action!==0||S||(D|=3)),D}const a=String.fromCharCode,c={DEFAULT:u=>{const S=[_(u,!1)+32,u.col+32,u.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${a(S[0])}${a(S[1])}${a(S[2])}`},SGR:u=>{const S=u.action===0&&u.button!==4?"m":"M";return`\x1B[<${_(u,!0)};${u.col};${u.row}${S}`},SGR_PIXELS:u=>{const S=u.action===0&&u.button!==4?"m":"M";return`\x1B[<${_(u,!0)};${u.x};${u.y}${S}`}};let o=n.CoreMouseService=class extends C.Disposable{constructor(u,S){super(),this._bufferService=u,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new g.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const D of Object.keys(L))this.addProtocol(D,L[D]);for(const D of Object.keys(c))this.addEncoding(D,c[D]);this.reset()}addProtocol(u,S){this._protocols[u]=S}addEncoding(u,S){this._encodings[u]=S}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(u){if(!this._protocols[u])throw new Error(`unknown protocol "${u}"`);this._activeProtocol=u,this._onProtocolChange.fire(this._protocols[u].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(u){if(!this._encodings[u])throw new Error(`unknown encoding "${u}"`);this._activeEncoding=u}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(u){if(u.col<0||u.col>=this._bufferService.cols||u.row<0||u.row>=this._bufferService.rows||u.button===4&&u.action===32||u.button===3&&u.action!==32||u.button!==4&&(u.action===2||u.action===3)||(u.col++,u.row++,u.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,u,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(u))return!1;const S=this._encodings[this._activeEncoding](u);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!0)),this._lastEvent=u,!0}explainEvents(u){return{down:!!(1&u),up:!!(2&u),drag:!!(4&u),move:!!(8&u),wheel:!!(16&u)}}_equalEvents(u,S,D){if(D){if(u.x!==S.x||u.y!==S.y)return!1}else if(u.col!==S.col||u.row!==S.row)return!1;return u.button===S.button&&u.action===S.action&&u.ctrl===S.ctrl&&u.alt===S.alt&&u.shift===S.shift}};n.CoreMouseService=o=d([p(0,l.IBufferService),p(1,l.ICoreService)],o)},6975:function(A,n,h){var d=this&&this.__decorate||function(o,u,S,D){var b,E=arguments.length,w=E<3?u:D===null?D=Object.getOwnPropertyDescriptor(u,S):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(o,u,S,D);else for(var R=o.length-1;R>=0;R--)(b=o[R])&&(w=(E<3?b(w):E>3?b(u,S,w):b(u,S))||w);return E>3&&w&&Object.defineProperty(u,S,w),w},p=this&&this.__param||function(o,u){return function(S,D){u(S,D,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const l=h(1439),g=h(8460),C=h(844),L=h(2585),_=Object.freeze({insertMode:!1}),a=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=n.CoreService=class extends C.Disposable{constructor(o,u,S){super(),this._bufferService=o,this._logService=u,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new g.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new g.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,l.clone)(_),this.decPrivateModes=(0,l.clone)(a)}reset(){this.modes=(0,l.clone)(_),this.decPrivateModes=(0,l.clone)(a)}triggerDataEvent(o,u=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;u&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.ydisp&&this._onRequestScrollToBottom.fire(),u&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((D=>D.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((u=>u.charCodeAt(0))))),this._onBinary.fire(o))}};n.CoreService=c=d([p(0,L.IBufferService),p(1,L.ILogService),p(2,L.IOptionsService)],c)},9074:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const d=h(8055),p=h(8460),l=h(844),g=h(6106);let C=0,L=0;class _ extends l.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.SortedList((o=>o==null?void 0:o.marker.line)),this._onDecorationRegistered=this.register(new p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,l.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const u=new a(o);if(u){const S=u.marker.onDispose((()=>u.dispose()));u.onDispose((()=>{u&&(this._decorations.delete(u)&&this._onDecorationRemoved.fire(u),S.dispose())})),this._decorations.insert(u),this._onDecorationRegistered.fire(u)}return u}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,u,S){let D=0,b=0;for(const E of this._decorations.getKeyIterator(u))D=E.options.x??0,b=D+(E.options.width??1),o>=D&&o<b&&(!S||(E.options.layer??"bottom")===S)&&(yield E)}forEachDecorationAtCell(o,u,S,D){this._decorations.forEachByKey(u,(b=>{C=b.options.x??0,L=C+(b.options.width??1),o>=C&&o<L&&(!S||(b.options.layer??"bottom")===S)&&D(b)}))}}n.DecorationService=_;class a extends l.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(o){super(),this.options=o,this.onRenderEmitter=this.register(new p.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new p.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=o.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const d=h(2585),p=h(8343);class l{constructor(...C){this._entries=new Map;for(const[L,_]of C)this.set(L,_)}set(C,L){const _=this._entries.get(C);return this._entries.set(C,L),_}forEach(C){for(const[L,_]of this._entries.entries())C(L,_)}has(C){return this._entries.has(C)}get(C){return this._entries.get(C)}}n.ServiceCollection=l,n.InstantiationService=class{constructor(){this._services=new l,this._services.set(d.IInstantiationService,this)}setService(g,C){this._services.set(g,C)}getService(g){return this._services.get(g)}createInstance(g,...C){const L=(0,p.getServiceDependencies)(g).sort(((c,o)=>c.index-o.index)),_=[];for(const c of L){const o=this._services.get(c.id);if(!o)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${c.id}.`);_.push(o)}const a=L.length>0?L[0].index:C.length;if(C.length!==a)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${a+1} conflicts with ${C.length} static arguments`);return new g(...C,..._)}}},7866:function(A,n,h){var d=this&&this.__decorate||function(a,c,o,u){var S,D=arguments.length,b=D<3?c:u===null?u=Object.getOwnPropertyDescriptor(c,o):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(a,c,o,u);else for(var E=a.length-1;E>=0;E--)(S=a[E])&&(b=(D<3?S(b):D>3?S(c,o,b):S(c,o))||b);return D>3&&b&&Object.defineProperty(c,o,b),b},p=this&&this.__param||function(a,c){return function(o,u){c(o,u,a)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const l=h(844),g=h(2585),C={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let L,_=n.LogService=class extends l.Disposable{get logLevel(){return this._logLevel}constructor(a){super(),this._optionsService=a,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),L=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(a){for(let c=0;c<a.length;c++)typeof a[c]=="function"&&(a[c]=a[c]())}_log(a,c,o){this._evalLazyOptionalParams(o),a.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...o)}trace(a,...c){var o;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,a,c)}debug(a,...c){var o;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,a,c)}info(a,...c){var o;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,a,c)}warn(a,...c){var o;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,a,c)}error(a,...c){var o;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,a,c)}};n.LogService=_=d([p(0,g.IOptionsService)],_),n.setTraceLogger=function(a){L=a},n.traceCall=function(a,c,o){if(typeof o.value!="function")throw new Error("not supported");const u=o.value;o.value=function(...S){if(L.logLevel!==g.LogLevelEnum.TRACE)return u.apply(this,S);L.trace(`GlyphRenderer#${u.name}(${S.map((b=>JSON.stringify(b))).join(", ")})`);const D=u.apply(this,S);return L.trace(`GlyphRenderer#${u.name} return`,D),D}}},7302:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const d=h(8460),p=h(844),l=h(6114);n.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:l.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const g=["normal","bold","100","200","300","400","500","600","700","800","900"];class C extends p.Disposable{constructor(_){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const a={...n.DEFAULT_OPTIONS};for(const c in _)if(c in a)try{const o=_[c];a[c]=this._sanitizeAndValidateOption(c,o)}catch(o){console.error(o)}this.rawOptions=a,this.options={...a},this._setupOptions(),this.register((0,p.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(_,a){return this.onOptionChange((c=>{c===_&&a(this.rawOptions[_])}))}onMultipleOptionChange(_,a){return this.onOptionChange((c=>{_.indexOf(c)!==-1&&a()}))}_setupOptions(){const _=c=>{if(!(c in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},a=(c,o)=>{if(!(c in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);o=this._sanitizeAndValidateOption(c,o),this.rawOptions[c]!==o&&(this.rawOptions[c]=o,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const o={get:_.bind(this,c),set:a.bind(this,c)};Object.defineProperty(this.options,c,o)}}_sanitizeAndValidateOption(_,a){switch(_){case"cursorStyle":if(a||(a=n.DEFAULT_OPTIONS[_]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(a))throw new Error(`"${a}" is not a valid value for ${_}`);break;case"wordSeparator":a||(a=n.DEFAULT_OPTIONS[_]);break;case"fontWeight":case"fontWeightBold":if(typeof a=="number"&&1<=a&&a<=1e3)break;a=g.includes(a)?a:n.DEFAULT_OPTIONS[_];break;case"cursorWidth":a=Math.floor(a);case"lineHeight":case"tabStopWidth":if(a<1)throw new Error(`${_} cannot be less than 1, value: ${a}`);break;case"minimumContrastRatio":a=Math.max(1,Math.min(21,Math.round(10*a)/10));break;case"scrollback":if((a=Math.min(a,4294967295))<0)throw new Error(`${_} cannot be less than 0, value: ${a}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(a<=0)throw new Error(`${_} cannot be less than or equal to 0, value: ${a}`);break;case"rows":case"cols":if(!a&&a!==0)throw new Error(`${_} must be numeric, value: ${a}`);break;case"windowsPty":a=a??{}}return a}}n.OptionsService=C},2660:function(A,n,h){var d=this&&this.__decorate||function(C,L,_,a){var c,o=arguments.length,u=o<3?L:a===null?a=Object.getOwnPropertyDescriptor(L,_):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(C,L,_,a);else for(var S=C.length-1;S>=0;S--)(c=C[S])&&(u=(o<3?c(u):o>3?c(L,_,u):c(L,_))||u);return o>3&&u&&Object.defineProperty(L,_,u),u},p=this&&this.__param||function(C,L){return function(_,a){L(_,a,C)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const l=h(2585);let g=n.OscLinkService=class{constructor(C){this._bufferService=C,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(C){const L=this._bufferService.buffer;if(C.id===void 0){const S=L.addMarker(L.ybase+L.y),D={data:C,id:this._nextId++,lines:[S]};return S.onDispose((()=>this._removeMarkerFromLink(D,S))),this._dataByLinkId.set(D.id,D),D.id}const _=C,a=this._getEntryIdKey(_),c=this._entriesWithId.get(a);if(c)return this.addLineToLink(c.id,L.ybase+L.y),c.id;const o=L.addMarker(L.ybase+L.y),u={id:this._nextId++,key:this._getEntryIdKey(_),data:_,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(u,o))),this._entriesWithId.set(u.key,u),this._dataByLinkId.set(u.id,u),u.id}addLineToLink(C,L){const _=this._dataByLinkId.get(C);if(_&&_.lines.every((a=>a.line!==L))){const a=this._bufferService.buffer.addMarker(L);_.lines.push(a),a.onDispose((()=>this._removeMarkerFromLink(_,a)))}}getLinkData(C){var L;return(L=this._dataByLinkId.get(C))==null?void 0:L.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,L){const _=C.lines.indexOf(L);_!==-1&&(C.lines.splice(_,1),C.lines.length===0&&(C.data.id!==void 0&&this._entriesWithId.delete(C.key),this._dataByLinkId.delete(C.id)))}};n.OscLinkService=g=d([p(0,l.IBufferService)],g)},8343:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const h="di$target",d="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(p){return p[d]||[]},n.createDecorator=function(p){if(n.serviceRegistry.has(p))return n.serviceRegistry.get(p);const l=function(g,C,L){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,a,c){a[h]===a?a[d].push({id:_,index:c}):(a[d]=[{id:_,index:c}],a[h]=a)})(l,g,L)};return l.toString=()=>p,n.serviceRegistry.set(p,l),l}},2585:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const d=h(8343);var p;n.IBufferService=(0,d.createDecorator)("BufferService"),n.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),n.ICoreService=(0,d.createDecorator)("CoreService"),n.ICharsetService=(0,d.createDecorator)("CharsetService"),n.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(l){l[l.TRACE=0]="TRACE",l[l.DEBUG=1]="DEBUG",l[l.INFO=2]="INFO",l[l.WARN=3]="WARN",l[l.ERROR=4]="ERROR",l[l.OFF=5]="OFF"})(p||(n.LogLevelEnum=p={})),n.ILogService=(0,d.createDecorator)("LogService"),n.IOptionsService=(0,d.createDecorator)("OptionsService"),n.IOscLinkService=(0,d.createDecorator)("OscLinkService"),n.IUnicodeService=(0,d.createDecorator)("UnicodeService"),n.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const d=h(8460),p=h(225);class l{static extractShouldJoin(C){return(1&C)!=0}static extractWidth(C){return C>>1&3}static extractCharKind(C){return C>>3}static createPropertyValue(C,L,_=!1){return(16777215&C)<<3|(3&L)<<1|(_?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const C=new p.UnicodeV6;this.register(C),this._active=C.version,this._activeProvider=C}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(C){if(!this._providers[C])throw new Error(`unknown Unicode version "${C}"`);this._active=C,this._activeProvider=this._providers[C],this._onChange.fire(C)}register(C){this._providers[C.version]=C}wcwidth(C){return this._activeProvider.wcwidth(C)}getStringCellWidth(C){let L=0,_=0;const a=C.length;for(let c=0;c<a;++c){let o=C.charCodeAt(c);if(55296<=o&&o<=56319){if(++c>=a)return L+this.wcwidth(o);const D=C.charCodeAt(c);56320<=D&&D<=57343?o=1024*(o-55296)+D-56320+65536:L+=this.wcwidth(D)}const u=this.charProperties(o,_);let S=l.extractWidth(u);l.extractShouldJoin(u)&&(S-=l.extractWidth(_)),L+=S,_=u}return L}charProperties(C,L){return this._activeProvider.charProperties(C,L)}}n.UnicodeService=l}},x={};function M(A){var n=x[A];if(n!==void 0)return n.exports;var h=x[A]={exports:{}};return m[A].call(h.exports,h,h.exports,M),h.exports}var B={};return(()=>{var A=B;Object.defineProperty(A,"__esModule",{value:!0}),A.Terminal=void 0;const n=M(9042),h=M(3236),d=M(844),p=M(5741),l=M(8285),g=M(7975),C=M(7090),L=["cols","rows"];class _ extends d.Disposable{constructor(c){super(),this._core=this.register(new h.Terminal(c)),this._addonManager=this.register(new p.AddonManager),this._publicOptions={...this._core.options};const o=S=>this._core.options[S],u=(S,D)=>{this._checkReadonlyOptions(S),this._core.options[S]=D};for(const S in this._core.options){const D={get:o.bind(this,S),set:u.bind(this,S)};Object.defineProperty(this._publicOptions,S,D)}}_checkReadonlyOptions(c){if(L.includes(c))throw new Error(`Option "${c}" 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 g.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new C.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new l.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const c=this._core.coreService.decPrivateModes;let o="none";switch(this._core.coreMouseService.activeProtocol){case"X10":o="x10";break;case"VT200":o="vt200";break;case"DRAG":o="drag";break;case"ANY":o="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const o in c)this._publicOptions[o]=c[o]}blur(){this._core.blur()}focus(){this._core.focus()}input(c,o=!0){this._core.input(c,o)}resize(c,o){this._verifyIntegers(c,o),this._core.resize(c,o)}open(c){this._core.open(c)}attachCustomKeyEventHandler(c){this._core.attachCustomKeyEventHandler(c)}attachCustomWheelEventHandler(c){this._core.attachCustomWheelEventHandler(c)}registerLinkProvider(c){return this._core.registerLinkProvider(c)}registerCharacterJoiner(c){return this._checkProposedApi(),this._core.registerCharacterJoiner(c)}deregisterCharacterJoiner(c){this._checkProposedApi(),this._core.deregisterCharacterJoiner(c)}registerMarker(c=0){return this._verifyIntegers(c),this._core.registerMarker(c)}registerDecoration(c){return this._checkProposedApi(),this._verifyPositiveIntegers(c.x??0,c.width??0,c.height??0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,o,u){this._verifyIntegers(c,o,u),this._core.select(c,o,u)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,o){this._verifyIntegers(c,o),this._core.selectLines(c,o)}dispose(){super.dispose()}scrollLines(c){this._verifyIntegers(c),this._core.scrollLines(c)}scrollPages(c){this._verifyIntegers(c),this._core.scrollPages(c)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(c){this._verifyIntegers(c),this._core.scrollToLine(c)}clear(){this._core.clear()}write(c,o){this._core.write(c,o)}writeln(c,o){this._core.write(c),this._core.write(`\r
|
|
101
|
+
`,o)}paste(c){this._core.paste(c)}refresh(c,o){this._verifyIntegers(c,o),this._core.refresh(c,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return n}_verifyIntegers(...c){for(const o of c)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const o of c)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}A.Terminal=_})(),B})()))})(Tu)),Tu.exports}var lC=oC(),Bu={exports:{}},Wv;function cC(){return Wv||(Wv=1,(function(r,f){(function(m,x){r.exports=x()})(self,(()=>(()=>{var m={};return(()=>{var x=m;Object.defineProperty(x,"__esModule",{value:!0}),x.FitAddon=void 0,x.FitAddon=class{activate(M){this._terminal=M}dispose(){}fit(){const M=this.proposeDimensions();if(!M||!this._terminal||isNaN(M.cols)||isNaN(M.rows))return;const B=this._terminal._core;this._terminal.rows===M.rows&&this._terminal.cols===M.cols||(B._renderService.clear(),this._terminal.resize(M.cols,M.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const M=this._terminal._core,B=M._renderService.dimensions;if(B.css.cell.width===0||B.css.cell.height===0)return;const A=this._terminal.options.scrollback===0?0:M.viewport.scrollBarWidth,n=window.getComputedStyle(this._terminal.element.parentElement),h=parseInt(n.getPropertyValue("height")),d=Math.max(0,parseInt(n.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),l=h-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),g=d-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-A;return{cols:Math.max(2,Math.floor(g/B.css.cell.width)),rows:Math.max(1,Math.floor(l/B.css.cell.height))}}}})(),m})()))})(Bu)),Bu.exports}var uC=cC(),Ou={exports:{}},Fv;function hC(){return Fv||(Fv=1,(function(r,f){(function(m,x){r.exports=x()})(self,(()=>(()=>{var m={345:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===h)return void this._listeners.splice(d,1)}}})),this._event}fire(h,d){const p=[];for(let l=0;l<this._listeners.length;l++)p.push(this._listeners[l]);for(let l=0;l<p.length;l++)p[l].call(void 0,h,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(h,d){return h((p=>d.fire(p)))},n.runAndSubscribe=function(h,d){return d(void 0),h((p=>d(p)))}},859:(A,n)=>{function h(d){for(const p of d)p.dispose();d.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const p=this._disposables.indexOf(d);p!==-1&&this._disposables.splice(p,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var p;this._isDisposed||d===this._value||((p=this._value)==null||p.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},n.toDisposable=function(d){return{dispose:d}},n.disposeArray=h,n.getDisposeArrayDisposable=function(d){return{dispose:()=>h(d)}}}},x={};function M(A){var n=x[A];if(n!==void 0)return n.exports;var h=x[A]={exports:{}};return m[A](h,h.exports,M),h.exports}var B={};return(()=>{var A=B;Object.defineProperty(A,"__esModule",{value:!0}),A.SearchAddon=void 0;const n=M(345),h=M(859),d=" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?";class p extends h.Disposable{constructor(g){super(),this._highlightedLines=new Set,this._highlightDecorations=[],this._selectedDecoration=this.register(new h.MutableDisposable),this._linesCacheTimeoutId=0,this._linesCacheDisposables=new h.MutableDisposable,this._onDidChangeResults=this.register(new n.EventEmitter),this.onDidChangeResults=this._onDidChangeResults.event,this._highlightLimit=(g==null?void 0:g.highlightLimit)??1e3}activate(g){this._terminal=g,this.register(this._terminal.onWriteParsed((()=>this._updateMatches()))),this.register(this._terminal.onResize((()=>this._updateMatches()))),this.register((0,h.toDisposable)((()=>this.clearDecorations())))}_updateMatches(){var g;this._highlightTimeout&&window.clearTimeout(this._highlightTimeout),this._cachedSearchTerm&&((g=this._lastSearchOptions)!=null&&g.decorations)&&(this._highlightTimeout=setTimeout((()=>{const C=this._cachedSearchTerm;this._cachedSearchTerm=void 0,this.findPrevious(C,{...this._lastSearchOptions,incremental:!0,noScroll:!0})}),200))}clearDecorations(g){this._selectedDecoration.clear(),(0,h.disposeArray)(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear(),g||(this._cachedSearchTerm=void 0)}clearActiveDecoration(){this._selectedDecoration.clear()}findNext(g,C){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");const L=!this._lastSearchOptions||this._didOptionsChange(this._lastSearchOptions,C);this._lastSearchOptions=C,C!=null&&C.decorations&&(this._cachedSearchTerm===void 0||g!==this._cachedSearchTerm||L)&&this._highlightAllMatches(g,C);const _=this._findNextAndSelect(g,C);return this._fireResults(C),this._cachedSearchTerm=g,_}_highlightAllMatches(g,C){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!g||g.length===0)return void this.clearDecorations();C=C||{},this.clearDecorations(!0);const L=[];let _,a=this._find(g,0,0,C);for(;a&&((_==null?void 0:_.row)!==a.row||(_==null?void 0:_.col)!==a.col)&&!(L.length>=this._highlightLimit);)_=a,L.push(_),a=this._find(g,_.col+_.term.length>=this._terminal.cols?_.row+1:_.row,_.col+_.term.length>=this._terminal.cols?0:_.col+1,C);for(const c of L){const o=this._createResultDecoration(c,C.decorations);o&&(this._highlightedLines.add(o.marker.line),this._highlightDecorations.push({decoration:o,match:c,dispose(){o.dispose()}}))}}_find(g,C,L,_){var o;if(!this._terminal||!g||g.length===0)return(o=this._terminal)==null||o.clearSelection(),void this.clearDecorations();if(L>this._terminal.cols)throw new Error(`Invalid col: ${L} to search in terminal of ${this._terminal.cols} cols`);let a;this._initLinesCache();const c={startRow:C,startCol:L};if(a=this._findInLine(g,c,_),!a)for(let u=C+1;u<this._terminal.buffer.active.baseY+this._terminal.rows&&(c.startRow=u,c.startCol=0,a=this._findInLine(g,c,_),!a);u++);return a}_findNextAndSelect(g,C){var u;if(!this._terminal||!g||g.length===0)return(u=this._terminal)==null||u.clearSelection(),this.clearDecorations(),!1;const L=this._terminal.getSelectionPosition();this._terminal.clearSelection();let _=0,a=0;L&&(this._cachedSearchTerm===g?(_=L.end.x,a=L.end.y):(_=L.start.x,a=L.start.y)),this._initLinesCache();const c={startRow:a,startCol:_};let o=this._findInLine(g,c,C);if(!o)for(let S=a+1;S<this._terminal.buffer.active.baseY+this._terminal.rows&&(c.startRow=S,c.startCol=0,o=this._findInLine(g,c,C),!o);S++);if(!o&&a!==0)for(let S=0;S<a&&(c.startRow=S,c.startCol=0,o=this._findInLine(g,c,C),!o);S++);return!o&&L&&(c.startRow=L.start.y,c.startCol=0,o=this._findInLine(g,c,C)),this._selectResult(o,C==null?void 0:C.decorations,C==null?void 0:C.noScroll)}findPrevious(g,C){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");const L=!this._lastSearchOptions||this._didOptionsChange(this._lastSearchOptions,C);this._lastSearchOptions=C,C!=null&&C.decorations&&(this._cachedSearchTerm===void 0||g!==this._cachedSearchTerm||L)&&this._highlightAllMatches(g,C);const _=this._findPreviousAndSelect(g,C);return this._fireResults(C),this._cachedSearchTerm=g,_}_didOptionsChange(g,C){return!!C&&(g.caseSensitive!==C.caseSensitive||g.regex!==C.regex||g.wholeWord!==C.wholeWord)}_fireResults(g){if(g!=null&&g.decorations){let C=-1;if(this._selectedDecoration.value){const L=this._selectedDecoration.value.match;for(let _=0;_<this._highlightDecorations.length;_++){const a=this._highlightDecorations[_].match;if(a.row===L.row&&a.col===L.col&&a.size===L.size){C=_;break}}}this._onDidChangeResults.fire({resultIndex:C,resultCount:this._highlightDecorations.length})}}_findPreviousAndSelect(g,C){var S;if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!this._terminal||!g||g.length===0)return(S=this._terminal)==null||S.clearSelection(),this.clearDecorations(),!1;const L=this._terminal.getSelectionPosition();this._terminal.clearSelection();let _=this._terminal.buffer.active.baseY+this._terminal.rows-1,a=this._terminal.cols;const c=!0;this._initLinesCache();const o={startRow:_,startCol:a};let u;if(L&&(o.startRow=_=L.start.y,o.startCol=a=L.start.x,this._cachedSearchTerm!==g&&(u=this._findInLine(g,o,C,!1),u||(o.startRow=_=L.end.y,o.startCol=a=L.end.x))),u||(u=this._findInLine(g,o,C,c)),!u){o.startCol=Math.max(o.startCol,this._terminal.cols);for(let D=_-1;D>=0&&(o.startRow=D,u=this._findInLine(g,o,C,c),!u);D--);}if(!u&&_!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let D=this._terminal.buffer.active.baseY+this._terminal.rows-1;D>=_&&(o.startRow=D,u=this._findInLine(g,o,C,c),!u);D--);return this._selectResult(u,C==null?void 0:C.decorations,C==null?void 0:C.noScroll)}_initLinesCache(){const g=this._terminal;this._linesCache||(this._linesCache=new Array(g.buffer.active.length),this._linesCacheDisposables.value=(0,h.getDisposeArrayDisposable)([g.onLineFeed((()=>this._destroyLinesCache())),g.onCursorMove((()=>this._destroyLinesCache())),g.onResize((()=>this._destroyLinesCache()))])),window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=window.setTimeout((()=>this._destroyLinesCache()),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeoutId&&(window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=0)}_isWholeWord(g,C,L){return(g===0||d.includes(C[g-1]))&&(g+L.length===C.length||d.includes(C[g+L.length]))}_findInLine(g,C,L={},_=!1){var z;const a=this._terminal,c=C.startRow,o=C.startCol,u=a.buffer.active.getLine(c);if(u!=null&&u.isWrapped)return _?void(C.startCol+=a.cols):(C.startRow--,C.startCol+=a.cols,this._findInLine(g,C,L));let S=(z=this._linesCache)==null?void 0:z[c];S||(S=this._translateBufferLineToStringWithWrap(c,!0),this._linesCache&&(this._linesCache[c]=S));const[D,b]=S,E=this._bufferColsToStringOffset(c,o),w=L.caseSensitive?g:g.toLowerCase(),R=L.caseSensitive?D:D.toLowerCase();let N=-1;if(L.regex){const I=RegExp(w,"g");let U;if(_)for(;U=I.exec(R.slice(0,E));)N=I.lastIndex-U[0].length,g=U[0],I.lastIndex-=g.length-1;else U=I.exec(R.slice(E)),U&&U[0].length>0&&(N=E+(I.lastIndex-U[0].length),g=U[0])}else _?E-w.length>=0&&(N=R.lastIndexOf(w,E-w.length)):N=R.indexOf(w,E);if(N>=0){if(L.wholeWord&&!this._isWholeWord(N,R,g))return;let I=0;for(;I<b.length-1&&N>=b[I+1];)I++;let U=I;for(;U<b.length-1&&N+g.length>=b[U+1];)U++;const Y=N-b[I],X=N+g.length-b[U],q=this._stringLengthToBufferSize(c+I,Y);return{term:g,col:q,row:c+I,size:this._stringLengthToBufferSize(c+U,X)-q+a.cols*(U-I)}}}_stringLengthToBufferSize(g,C){const L=this._terminal.buffer.active.getLine(g);if(!L)return 0;for(let _=0;_<C;_++){const a=L.getCell(_);if(!a)break;const c=a.getChars();c.length>1&&(C-=c.length-1);const o=L.getCell(_+1);o&&o.getWidth()===0&&C++}return C}_bufferColsToStringOffset(g,C){const L=this._terminal;let _=g,a=0,c=L.buffer.active.getLine(_);for(;C>0&&c;){for(let o=0;o<C&&o<L.cols;o++){const u=c.getCell(o);if(!u)break;u.getWidth()&&(a+=u.getCode()===0?1:u.getChars().length)}if(_++,c=L.buffer.active.getLine(_),c&&!c.isWrapped)break;C-=L.cols}return a}_translateBufferLineToStringWithWrap(g,C){var o;const L=this._terminal,_=[],a=[0];let c=L.buffer.active.getLine(g);for(;c;){const u=L.buffer.active.getLine(g+1),S=!!u&&u.isWrapped;let D=c.translateToString(!S&&C);if(S&&u){const b=c.getCell(c.length-1);b&&b.getCode()===0&&b.getWidth()===1&&((o=u.getCell(0))==null?void 0:o.getWidth())===2&&(D=D.slice(0,-1))}if(_.push(D),!S)break;a.push(a[a.length-1]+D.length),g++,c=u}return[_.join(""),a]}_selectResult(g,C,L){const _=this._terminal;if(this._selectedDecoration.clear(),!g)return _.clearSelection(),!1;if(_.select(g.col,g.row,g.size),C){const a=_.registerMarker(-_.buffer.active.baseY-_.buffer.active.cursorY+g.row);if(a){const c=_.registerDecoration({marker:a,x:g.col,width:g.size,backgroundColor:C.activeMatchBackground,layer:"top",overviewRulerOptions:{color:C.activeMatchColorOverviewRuler}});if(c){const o=[];o.push(a),o.push(c.onRender((u=>this._applyStyles(u,C.activeMatchBorder,!0)))),o.push(c.onDispose((()=>(0,h.disposeArray)(o)))),this._selectedDecoration.value={decoration:c,match:g,dispose(){c.dispose()}}}}}if(!L&&(g.row>=_.buffer.active.viewportY+_.rows||g.row<_.buffer.active.viewportY)){let a=g.row-_.buffer.active.viewportY;a-=Math.floor(_.rows/2),_.scrollLines(a)}return!0}_applyStyles(g,C,L){g.classList.contains("xterm-find-result-decoration")||(g.classList.add("xterm-find-result-decoration"),C&&(g.style.outline=`1px solid ${C}`)),L&&g.classList.add("xterm-find-active-result-decoration")}_createResultDecoration(g,C){const L=this._terminal,_=L.registerMarker(-L.buffer.active.baseY-L.buffer.active.cursorY+g.row);if(!_)return;const a=L.registerDecoration({marker:_,x:g.col,width:g.size,backgroundColor:C.matchBackground,overviewRulerOptions:this._highlightedLines.has(_.line)?void 0:{color:C.matchOverviewRuler,position:"center"}});if(a){const c=[];c.push(_),c.push(a.onRender((o=>this._applyStyles(o,C.matchBorder,!1)))),c.push(a.onDispose((()=>(0,h.disposeArray)(c))))}return a}}A.SearchAddon=p})(),B})()))})(Ou)),Ou.exports}var dC=hC(),ku={exports:{}},qv;function fC(){return qv||(qv=1,(function(r,f){(function(m,x){r.exports=x()})(self,(()=>(()=>{var m={6:(A,n)=>{function h(p){try{const l=new URL(p),g=l.password&&l.username?`${l.protocol}//${l.username}:${l.password}@${l.host}`:l.username?`${l.protocol}//${l.username}@${l.host}`:`${l.protocol}//${l.host}`;return p.toLocaleLowerCase().startsWith(g.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(n,"__esModule",{value:!0}),n.LinkComputer=n.WebLinkProvider=void 0,n.WebLinkProvider=class{constructor(p,l,g,C={}){this._terminal=p,this._regex=l,this._handler=g,this._options=C}provideLinks(p,l){const g=d.computeLink(p,this._regex,this._terminal,this._handler);l(this._addCallbacks(g))}_addCallbacks(p){return p.map((l=>(l.leave=this._options.leave,l.hover=(g,C)=>{if(this._options.hover){const{range:L}=l;this._options.hover(g,C,L)}},l)))}};class d{static computeLink(l,g,C,L){const _=new RegExp(g.source,(g.flags||"")+"g"),[a,c]=d._getWindowedLineStrings(l-1,C),o=a.join("");let u;const S=[];for(;u=_.exec(o);){const D=u[0];if(!h(D))continue;const[b,E]=d._mapStrIdx(C,c,0,u.index),[w,R]=d._mapStrIdx(C,b,E,D.length);if(b===-1||E===-1||w===-1||R===-1)continue;const N={start:{x:E+1,y:b+1},end:{x:R,y:w+1}};S.push({range:N,text:D,activate:L})}return S}static _getWindowedLineStrings(l,g){let C,L=l,_=l,a=0,c="";const o=[];if(C=g.buffer.active.getLine(l)){const u=C.translateToString(!0);if(C.isWrapped&&u[0]!==" "){for(a=0;(C=g.buffer.active.getLine(--L))&&a<2048&&(c=C.translateToString(!0),a+=c.length,o.push(c),C.isWrapped&&c.indexOf(" ")===-1););o.reverse()}for(o.push(u),a=0;(C=g.buffer.active.getLine(++_))&&C.isWrapped&&a<2048&&(c=C.translateToString(!0),a+=c.length,o.push(c),c.indexOf(" ")===-1););}return[o,L]}static _mapStrIdx(l,g,C,L){const _=l.buffer.active,a=_.getNullCell();let c=C;for(;L;){const o=_.getLine(g);if(!o)return[-1,-1];for(let u=c;u<o.length;++u){o.getCell(u,a);const S=a.getChars();if(a.getWidth()&&(L-=S.length||1,u===o.length-1&&S==="")){const D=_.getLine(g+1);D&&D.isWrapped&&(D.getCell(0,a),a.getWidth()===2&&(L+=1))}if(L<0)return[g,u]}g++,c=0}return[g,c]}}n.LinkComputer=d}},x={};function M(A){var n=x[A];if(n!==void 0)return n.exports;var h=x[A]={exports:{}};return m[A](h,h.exports,M),h.exports}var B={};return(()=>{var A=B;Object.defineProperty(A,"__esModule",{value:!0}),A.WebLinksAddon=void 0;const n=M(6),h=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(p,l){const g=window.open();if(g){try{g.opener=null}catch{}g.location.href=l}else console.warn("Opening link blocked as opener could not be cleared")}A.WebLinksAddon=class{constructor(p=d,l={}){this._handler=p,this._options=l}activate(p){this._terminal=p;const l=this._options,g=l.urlRegex||h;this._linkProvider=this._terminal.registerLinkProvider(new n.WebLinkProvider(this._terminal,g,this._handler,l))}dispose(){var p;(p=this._linkProvider)==null||p.dispose()}}})(),B})()))})(ku)),ku.exports}var _C=fC(),Nu={exports:{}},Gv;function vC(){return Gv||(Gv=1,(function(r,f){(function(m,x){r.exports=x()})(self,(()=>(()=>{var m={903:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const d=h(274),p=h(627),l=h(237),g=h(860),C=h(374),L=h(296),_=h(345),a=h(859),c=h(399),o=h(855);class u extends a.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var b;return(b=this._charAtlas)==null?void 0:b.pages[0].canvas}constructor(b,E,w,R,N,z,I,U,Y,X){super(),this._terminal=b,this._container=E,this._alpha=N,this._themeService=z,this._bufferService=I,this._optionsService=U,this._decorationService=Y,this._coreBrowserService=X,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,L.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new a.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new _.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new d.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${w}-layer`),this._canvas.style.zIndex=R.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors((q=>{this._refreshCharAtlas(q),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}))),this.register((0,a.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,C.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(b,E){}handleSelectionChanged(b,E,w=!1){this._selectionModel.update(this._terminal._core,b,E,w)}_setTransparency(b){if(b===this._alpha)return;const E=this._canvas;this._alpha=b,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,E),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(b){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,p.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,b,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,_.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let E=0;E<this._charAtlas.pages.length;E++)this._bitmapGenerator[E]=new S(this._charAtlas.pages[E].canvas)}}resize(b){this._deviceCellWidth=b.device.cell.width,this._deviceCellHeight=b.device.cell.height,this._deviceCharWidth=b.device.char.width,this._deviceCharHeight=b.device.char.height,this._deviceCharLeft=b.device.char.left,this._deviceCharTop=b.device.char.top,this._canvas.width=b.device.canvas.width,this._canvas.height=b.device.canvas.height,this._canvas.style.width=`${b.css.canvas.width}px`,this._canvas.style.height=`${b.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var b;(b=this._charAtlas)==null||b.clearTexture()}_fillCells(b,E,w,R){this._ctx.fillRect(b*this._deviceCellWidth,E*this._deviceCellHeight,w*this._deviceCellWidth,R*this._deviceCellHeight)}_fillMiddleLineAtCells(b,E,w=1){const R=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(b*this._deviceCellWidth,(E+1)*this._deviceCellHeight-R-this._coreBrowserService.dpr,w*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(b,E,w=1,R=0){this._ctx.fillRect(b*this._deviceCellWidth,(E+1)*this._deviceCellHeight+R-this._coreBrowserService.dpr-1,w*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(b,E,w=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const R=this._coreBrowserService.dpr;this._ctx.lineWidth=R;for(let N=0;N<w;N++){const z=(b+N)*this._deviceCellWidth,I=(b+N+.5)*this._deviceCellWidth,U=(b+N+1)*this._deviceCellWidth,Y=(E+1)*this._deviceCellHeight-R-1,X=Y-R,q=Y+R;this._ctx.moveTo(z,Y),this._ctx.bezierCurveTo(z,X,I,X,I,Y),this._ctx.bezierCurveTo(I,q,U,q,U,Y)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(b,E,w=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const R=this._coreBrowserService.dpr;this._ctx.lineWidth=R,this._ctx.setLineDash([2*R,R]);const N=b*this._deviceCellWidth,z=(E+1)*this._deviceCellHeight-R-1;this._ctx.moveTo(N,z);for(let I=0;I<w;I++){const U=(b+w+I)*this._deviceCellWidth;this._ctx.lineTo(U,z)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(b,E,w=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const R=this._coreBrowserService.dpr;this._ctx.lineWidth=R,this._ctx.setLineDash([4*R,3*R]);const N=b*this._deviceCellWidth,z=(b+w)*this._deviceCellWidth,I=(E+1)*this._deviceCellHeight-R-1;this._ctx.moveTo(N,I),this._ctx.lineTo(z,I),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(b,E,w){this._ctx.fillRect(b*this._deviceCellWidth,E*this._deviceCellHeight,this._coreBrowserService.dpr*w,this._deviceCellHeight)}_strokeRectAtCell(b,E,w,R){const N=this._coreBrowserService.dpr;this._ctx.lineWidth=N,this._ctx.strokeRect(b*this._deviceCellWidth+N/2,E*this._deviceCellHeight+N/2,w*this._deviceCellWidth-N,R*this._deviceCellHeight-N)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(b,E,w,R){this._alpha?this._ctx.clearRect(b*this._deviceCellWidth,E*this._deviceCellHeight,w*this._deviceCellWidth,R*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(b*this._deviceCellWidth,E*this._deviceCellHeight,w*this._deviceCellWidth,R*this._deviceCellHeight))}_fillCharTrueColor(b,E,w){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=l.TEXT_BASELINE,this._clipRow(w);let R=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(R=(0,g.tryDrawCustomChar)(this._ctx,b.getChars(),E*this._deviceCellWidth,w*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),R||this._ctx.fillText(b.getChars(),E*this._deviceCellWidth+this._deviceCharLeft,w*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(b,E,w){var Y,X,q,G;const R=b.getChars(),N=b.getCode(),z=b.getWidth();if(this._cellColorResolver.resolve(b,E,this._bufferService.buffer.ydisp+w,this._deviceCellWidth),!this._charAtlas)return;let I;if(I=R&&R.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(R,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(b.getCode()||o.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!I.size.x||!I.size.y)return;this._ctx.save(),this._clipRow(w),this._bitmapGenerator[I.texturePage]&&this._charAtlas.pages[I.texturePage].canvas!==this._bitmapGenerator[I.texturePage].canvas&&((X=(Y=this._bitmapGenerator[I.texturePage])==null?void 0:Y.bitmap)==null||X.close(),delete this._bitmapGenerator[I.texturePage]),this._charAtlas.pages[I.texturePage].version!==((q=this._bitmapGenerator[I.texturePage])==null?void 0:q.version)&&(this._bitmapGenerator[I.texturePage]||(this._bitmapGenerator[I.texturePage]=new S(this._charAtlas.pages[I.texturePage].canvas)),this._bitmapGenerator[I.texturePage].refresh(),this._bitmapGenerator[I.texturePage].version=this._charAtlas.pages[I.texturePage].version);let U=I.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,C.allowRescaling)(N,z,I.size.x,this._deviceCellWidth)&&(U=this._deviceCellWidth-1),this._ctx.drawImage(((G=this._bitmapGenerator[I.texturePage])==null?void 0:G.bitmap)||this._charAtlas.pages[I.texturePage].canvas,I.texturePosition.x,I.texturePosition.y,I.size.x,I.size.y,E*this._deviceCellWidth+this._deviceCharLeft-I.offset.x,w*this._deviceCellHeight+this._deviceCharTop-I.offset.y,U,I.size.y),this._ctx.restore()}_clipRow(b){this._ctx.beginPath(),this._ctx.rect(0,b*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(b,E){return`${E?"italic":""} ${b?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}n.BaseRenderLayer=u;class S{get bitmap(){return this._bitmap}constructor(b){this.canvas=b,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var b;(b=this._bitmap)==null||b.close(),this._bitmap=void 0,c.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout((()=>this._generate()),100)),this._state===1&&(this._state=2))}_generate(){var b;this._state===0&&((b=this._bitmap)==null||b.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then((E=>{this._state===2?this.refresh():this._bitmap=E,this._state=0})),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CanvasRenderer=void 0;const d=h(627),p=h(56),l=h(374),g=h(345),C=h(859),L=h(873),_=h(43),a=h(630),c=h(744);class o extends C.Disposable{constructor(S,D,b,E,w,R,N,z,I,U,Y){super(),this._terminal=S,this._screenElement=D,this._bufferService=E,this._charSizeService=w,this._optionsService=R,this._coreBrowserService=I,this._themeService=Y,this._observerDisposable=this.register(new C.MutableDisposable),this._onRequestRedraw=this.register(new g.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new g.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new g.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const X=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new c.TextRenderLayer(this._terminal,this._screenElement,0,X,this._bufferService,this._optionsService,N,U,this._coreBrowserService,Y),new a.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,U,this._optionsService,Y),new _.LinkRenderLayer(this._terminal,this._screenElement,2,b,this._bufferService,this._optionsService,U,this._coreBrowserService,Y),new L.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,z,this._coreBrowserService,U,Y)];for(const q of this._renderLayers)(0,g.forwardEvent)(q.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,l.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,p.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,((q,G)=>this._setCanvasDevicePixelDimensions(q,G))),this.register(this._coreBrowserService.onWindowChange((q=>{this._observerDisposable.value=(0,p.observeDevicePixelDimensions)(this._renderLayers[0].canvas,q,((G,K)=>this._setCanvasDevicePixelDimensions(G,K)))}))),this.register((0,C.toDisposable)((()=>{for(const q of this._renderLayers)q.dispose();(0,d.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(S,D){this._updateDimensions();for(const b of this._renderLayers)b.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation((S=>S.handleBlur()))}handleFocus(){this._runOperation((S=>S.handleFocus()))}handleSelectionChanged(S,D,b=!1){this._runOperation((E=>E.handleSelectionChanged(S,D,b))),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation((S=>S.handleCursorMove()))}clear(){this._runOperation((S=>S.reset()))}_runOperation(S){for(const D of this._renderLayers)S(D)}renderRows(S,D){for(const b of this._renderLayers)b.handleGridChanged(S,D)}clearTextureAtlas(){for(const S of this._renderLayers)S.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const S=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*S),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*S),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/S),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/S),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(S,D){this.dimensions.device.canvas.height=D,this.dimensions.device.canvas.width=S;for(const b of this._renderLayers)b.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}n.CanvasRenderer=o},873:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorRenderLayer=void 0;const d=h(457),p=h(859),l=h(399),g=h(782),C=h(903);class L extends C.BaseRenderLayer{constructor(a,c,o,u,S,D,b,E,w,R){super(a,c,"cursor",o,!0,R,S,D,w,E),this._onRequestRedraw=u,this._coreService=b,this._cursorBlinkStateManager=this.register(new p.MutableDisposable),this._cell=new g.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(D.onOptionChange((()=>this._handleOptionsChanged()))),this._handleOptionsChanged()}resize(a){super.resize(a),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var a;this._clearCursor(),(a=this._cursorBlinkStateManager.value)==null||a.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var a;(a=this._cursorBlinkStateManager.value)==null||a.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var a;(a=this._cursorBlinkStateManager.value)==null||a.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new d.CursorBlinkStateManager((()=>this._render(!0)),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var a;(a=this._cursorBlinkStateManager.value)==null||a.restartBlinkAnimation()}handleGridChanged(a,c){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(a){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const c=this._bufferService.buffer.ybase+this._bufferService.buffer.y,o=c-this._bufferService.buffer.ydisp;if(o<0||o>=this._bufferService.rows)return void this._clearCursor();const u=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(c).loadCell(u,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const S=this._optionsService.rawOptions.cursorStyle,D=this._optionsService.rawOptions.cursorInactiveStyle;return D&&D!=="none"&&this._cursorRenderers[D](u,o,this._cell),this._ctx.restore(),this._state.x=u,this._state.y=o,this._state.isFocused=!1,this._state.style=S,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===u&&this._state.y===o&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](u,o,this._cell),this._ctx.restore(),this._state.x=u,this._state.y=o,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(l.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(a,c,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(a,c,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(a,c,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(a,c,o.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(o,a,c),this._ctx.restore()}_renderUnderlineCursor(a,c,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(a,c),this._ctx.restore()}_renderOutlineCursor(a,c,o){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(a,c,o.getWidth(),1),this._ctx.restore()}}n.CursorRenderLayer=L},574:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GridCache=void 0,n.GridCache=class{constructor(){this.cache=[]}resize(h,d){for(let p=0;p<h;p++){this.cache.length<=p&&this.cache.push([]);for(let l=this.cache[p].length;l<d;l++)this.cache[p].push(void 0);this.cache[p].length=d}this.cache.length=h}clear(){for(let h=0;h<this.cache.length;h++)for(let d=0;d<this.cache[h].length;d++)this.cache[h][d]=void 0}}},43:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const d=h(197),p=h(237),l=h(903);class g extends l.BaseRenderLayer{constructor(L,_,a,c,o,u,S,D,b){super(L,_,"link",a,!0,b,o,u,S,D),this.register(c.onShowLinkUnderline((E=>this._handleShowLinkUnderline(E)))),this.register(c.onHideLinkUnderline((E=>this._handleHideLinkUnderline(E))))}resize(L){super.resize(L),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const L=this._state.y2-this._state.y1-1;L>0&&this._clearCells(0,this._state.y1+1,this._state.cols,L),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(L){if(L.fg===p.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:L.fg&&(0,d.is256Color)(L.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[L.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,L.y1===L.y2)this._fillBottomLineAtCells(L.x1,L.y1,L.x2-L.x1);else{this._fillBottomLineAtCells(L.x1,L.y1,L.cols-L.x1);for(let _=L.y1+1;_<L.y2;_++)this._fillBottomLineAtCells(0,_,L.cols);this._fillBottomLineAtCells(0,L.y2,L.x2)}this._state=L}_handleHideLinkUnderline(L){this._clearCurrentLink()}}n.LinkRenderLayer=g},630:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionRenderLayer=void 0;const d=h(903);class p extends d.BaseRenderLayer{constructor(g,C,L,_,a,c,o,u){super(g,C,"selection",L,!0,u,_,o,c,a),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(g){super.resize(g),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(g,C,L){super.handleSelectionChanged(g,C,L),this._redrawSelection(g,C,L)}_redrawSelection(g,C,L){if(!this._didStateChange(g,C,L,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!g||!C)return void this._clearState();const _=g[1]-this._bufferService.buffer.ydisp,a=C[1]-this._bufferService.buffer.ydisp,c=Math.max(_,0),o=Math.min(a,this._bufferService.rows-1);if(c>=this._bufferService.rows||o<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,L){const u=g[0],S=C[0]-u,D=o-c+1;this._fillCells(u,c,S,D)}else{const u=_===c?g[0]:0,S=c===a?C[0]:this._bufferService.cols;this._fillCells(u,c,S-u,1);const D=Math.max(o-c-1,0);if(this._fillCells(0,c+1,this._bufferService.cols,D),c!==o){const b=a===o?C[0]:this._bufferService.cols;this._fillCells(0,o,b,1)}}this._state.start=[g[0],g[1]],this._state.end=[C[0],C[1]],this._state.columnSelectMode=L,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(g,C,L,_){return!this._areCoordinatesEqual(g,this._state.start)||!this._areCoordinatesEqual(C,this._state.end)||L!==this._state.columnSelectMode||_!==this._state.ydisp}_areCoordinatesEqual(g,C){return!(!g||!C)&&g[0]===C[0]&&g[1]===C[1]}}n.SelectionRenderLayer=p},744:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextRenderLayer=void 0;const d=h(577),p=h(147),l=h(782),g=h(855),C=h(903),L=h(574);class _ extends C.BaseRenderLayer{constructor(c,o,u,S,D,b,E,w,R,N){super(c,o,"text",u,S,N,D,b,w,R),this._characterJoinerService=E,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new l.CellData,this._state=new L.GridCache,this.register(b.onSpecificOptionChange("allowTransparency",(z=>this._setTransparency(z))))}resize(c){super.resize(c);const o=this._getFont(!1,!1);this._characterWidth===c.device.char.width&&this._characterFont===o||(this._characterWidth=c.device.char.width,this._characterFont=o,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(c,o,u){for(let S=c;S<=o;S++){const D=S+this._bufferService.buffer.ydisp,b=this._bufferService.buffer.lines.get(D),E=this._characterJoinerService.getJoinedCharacters(D);for(let w=0;w<this._bufferService.cols;w++){b.loadCell(w,this._workCell);let R=this._workCell,N=!1,z=w;if(R.getWidth()!==0){if(E.length>0&&w===E[0][0]){N=!0;const I=E.shift();R=new d.JoinedCellData(this._workCell,b.translateToString(!0,I[0],I[1]),I[1]-I[0]),z=I[1]-1}!N&&this._isOverlapping(R)&&z<b.length-1&&b.getCodePoint(z+1)===g.NULL_CELL_CODE&&(R.content&=-12582913,R.content|=8388608),u(R,w,S),w=z}}}}_drawBackground(c,o){const u=this._ctx,S=this._bufferService.cols;let D=0,b=0,E=null;u.save(),this._forEachCell(c,o,((w,R,N)=>{let z=null;w.isInverse()?z=w.isFgDefault()?this._themeService.colors.foreground.css:w.isFgRGB()?`rgb(${p.AttributeData.toColorRGB(w.getFgColor()).join(",")})`:this._themeService.colors.ansi[w.getFgColor()].css:w.isBgRGB()?z=`rgb(${p.AttributeData.toColorRGB(w.getBgColor()).join(",")})`:w.isBgPalette()&&(z=this._themeService.colors.ansi[w.getBgColor()].css);let I=!1;this._decorationService.forEachDecorationAtCell(R,this._bufferService.buffer.ydisp+N,void 0,(U=>{U.options.layer!=="top"&&I||(U.backgroundColorRGB&&(z=U.backgroundColorRGB.css),I=U.options.layer==="top")})),E===null&&(D=R,b=N),N!==b?(u.fillStyle=E||"",this._fillCells(D,b,S-D,1),D=R,b=N):E!==z&&(u.fillStyle=E||"",this._fillCells(D,b,R-D,1),D=R,b=N),E=z})),E!==null&&(u.fillStyle=E,this._fillCells(D,b,S-D,1)),u.restore()}_drawForeground(c,o){this._forEachCell(c,o,((u,S,D)=>this._drawChars(u,S,D)))}handleGridChanged(c,o){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,c,this._bufferService.cols,o-c+1),this._drawBackground(c,o),this._drawForeground(c,o))}_isOverlapping(c){if(c.getWidth()!==1||c.getCode()<256)return!1;const o=c.getChars();if(this._characterOverlapCache.hasOwnProperty(o))return this._characterOverlapCache[o];this._ctx.save(),this._ctx.font=this._characterFont;const u=Math.floor(this._ctx.measureText(o).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[o]=u,u}}n.TextRenderLayer=_},274:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const d=h(855),p=h(160),l=h(374);let g,C=0,L=0,_=!1,a=!1,c=!1,o=0;n.CellColorResolver=class{constructor(u,S,D,b,E,w){this._terminal=u,this._optionService=S,this._selectionRenderModel=D,this._decorationService=b,this._coreBrowserService=E,this._themeService=w,this.result={fg:0,bg:0,ext:0}}resolve(u,S,D,b){if(this.result.bg=u.bg,this.result.fg=u.fg,this.result.ext=268435456&u.bg?u.extended.ext:0,L=0,C=0,a=!1,_=!1,c=!1,g=this._themeService.colors,o=0,u.getCode()!==d.NULL_CELL_CODE&&u.extended.underlineStyle===4){const E=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=S*b%(2*Math.round(E))}if(this._decorationService.forEachDecorationAtCell(S,D,"bottom",(E=>{E.backgroundColorRGB&&(L=E.backgroundColorRGB.rgba>>8&16777215,a=!0),E.foregroundColorRGB&&(C=E.foregroundColorRGB.rgba>>8&16777215,_=!0)})),c=this._selectionRenderModel.isCellSelected(this._terminal,S,D),c){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:L=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:L=(16777215&this.result.fg)<<8|255;break;default:L=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:L=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:L=(16777215&this.result.bg)<<8|255}L=p.rgba.blend(L,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else L=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(a=!0,g.selectionForeground&&(C=g.selectionForeground.rgba>>8&16777215,_=!0),(0,l.treatGlyphAsBackgroundColor)(u.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)C=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:C=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:C=(16777215&this.result.fg)<<8|255;break;default:C=this._themeService.colors.foreground.rgba}C=p.rgba.blend(C,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}_=!0}}this._decorationService.forEachDecorationAtCell(S,D,"top",(E=>{E.backgroundColorRGB&&(L=E.backgroundColorRGB.rgba>>8&16777215,a=!0),E.foregroundColorRGB&&(C=E.foregroundColorRGB.rgba>>8&16777215,_=!0)})),a&&(L=c?-16777216&u.bg&-134217729|L|50331648:-16777216&u.bg|L|50331648),_&&(C=-16777216&u.fg&-67108865|C|50331648),67108864&this.result.fg&&(a&&!_&&(C=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&g.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,_=!0),!a&&_&&(L=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&g.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,a=!0)),g=void 0,this.result.bg=a?L:this.result.bg,this.result.fg=_?C:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const d=h(509),p=h(197),l=[];n.acquireTextureAtlas=function(g,C,L,_,a,c,o,u){const S=(0,p.generateConfig)(_,a,c,o,C,L,u);for(let E=0;E<l.length;E++){const w=l[E],R=w.ownedBy.indexOf(g);if(R>=0){if((0,p.configEquals)(w.config,S))return w.atlas;w.ownedBy.length===1?(w.atlas.dispose(),l.splice(E,1)):w.ownedBy.splice(R,1);break}}for(let E=0;E<l.length;E++){const w=l[E];if((0,p.configEquals)(w.config,S))return w.ownedBy.push(g),w.atlas}const D=g._core,b={atlas:new d.TextureAtlas(document,S,D.unicodeService),config:S,ownedBy:[g]};return l.push(b),b.atlas},n.removeTerminalFromCache=function(g){for(let C=0;C<l.length;C++){const L=l[C].ownedBy.indexOf(g);if(L!==-1){l[C].ownedBy.length===1?(l[C].atlas.dispose(),l.splice(C,1)):l[C].ownedBy.splice(L,1);break}}}},197:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const d=h(160);n.generateConfig=function(p,l,g,C,L,_,a){const c={foreground:_.foreground,background:_.background,cursor:d.NULL_COLOR,cursorAccent:d.NULL_COLOR,selectionForeground:d.NULL_COLOR,selectionBackgroundTransparent:d.NULL_COLOR,selectionBackgroundOpaque:d.NULL_COLOR,selectionInactiveBackgroundTransparent:d.NULL_COLOR,selectionInactiveBackgroundOpaque:d.NULL_COLOR,ansi:_.ansi.slice(),contrastCache:_.contrastCache,halfContrastCache:_.halfContrastCache};return{customGlyphs:L.customGlyphs,devicePixelRatio:a,letterSpacing:L.letterSpacing,lineHeight:L.lineHeight,deviceCellWidth:p,deviceCellHeight:l,deviceCharWidth:g,deviceCharHeight:C,fontFamily:L.fontFamily,fontSize:L.fontSize,fontWeight:L.fontWeight,fontWeightBold:L.fontWeightBold,allowTransparency:L.allowTransparency,drawBoldTextInBrightColors:L.drawBoldTextInBrightColors,minimumContrastRatio:L.minimumContrastRatio,colors:c}},n.configEquals=function(p,l){for(let g=0;g<p.colors.ansi.length;g++)if(p.colors.ansi[g].rgba!==l.colors.ansi[g].rgba)return!1;return p.devicePixelRatio===l.devicePixelRatio&&p.customGlyphs===l.customGlyphs&&p.lineHeight===l.lineHeight&&p.letterSpacing===l.letterSpacing&&p.fontFamily===l.fontFamily&&p.fontSize===l.fontSize&&p.fontWeight===l.fontWeight&&p.fontWeightBold===l.fontWeightBold&&p.allowTransparency===l.allowTransparency&&p.deviceCharWidth===l.deviceCharWidth&&p.deviceCharHeight===l.deviceCharHeight&&p.drawBoldTextInBrightColors===l.drawBoldTextInBrightColors&&p.minimumContrastRatio===l.minimumContrastRatio&&p.colors.foreground.rgba===l.colors.foreground.rgba&&p.colors.background.rgba===l.colors.background.rgba},n.is256Color=function(p){return(50331648&p)==16777216||(50331648&p)==33554432}},237:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const d=h(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},457:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(h,d){this._renderCallback=h,this._coreBrowserService=d,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(h=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const d=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,d>0)return void this._restartInterval(d)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const d=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(d)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),h)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const d=h(374);n.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const p={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};n.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(_,a)=>`M0,${.5-a} L1,${.5-a} M0,${.5+a} L1,${.5+a}`},"║":{1:(_,a)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╒":{1:(_,a)=>`M.5,1 L.5,${.5-a} L1,${.5-a} M.5,${.5+a} L1,${.5+a}`},"╓":{1:(_,a)=>`M${.5-_},1 L${.5-_},.5 L1,.5 M${.5+_},.5 L${.5+_},1`},"╔":{1:(_,a)=>`M1,${.5-a} L${.5-_},${.5-a} L${.5-_},1 M1,${.5+a} L${.5+_},${.5+a} L${.5+_},1`},"╕":{1:(_,a)=>`M0,${.5-a} L.5,${.5-a} L.5,1 M0,${.5+a} L.5,${.5+a}`},"╖":{1:(_,a)=>`M${.5+_},1 L${.5+_},.5 L0,.5 M${.5-_},.5 L${.5-_},1`},"╗":{1:(_,a)=>`M0,${.5+a} L${.5-_},${.5+a} L${.5-_},1 M0,${.5-a} L${.5+_},${.5-a} L${.5+_},1`},"╘":{1:(_,a)=>`M.5,0 L.5,${.5+a} L1,${.5+a} M.5,${.5-a} L1,${.5-a}`},"╙":{1:(_,a)=>`M1,.5 L${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"╚":{1:(_,a)=>`M1,${.5-a} L${.5+_},${.5-a} L${.5+_},0 M1,${.5+a} L${.5-_},${.5+a} L${.5-_},0`},"╛":{1:(_,a)=>`M0,${.5+a} L.5,${.5+a} L.5,0 M0,${.5-a} L.5,${.5-a}`},"╜":{1:(_,a)=>`M0,.5 L${.5+_},.5 L${.5+_},0 M${.5-_},.5 L${.5-_},0`},"╝":{1:(_,a)=>`M0,${.5-a} L${.5-_},${.5-a} L${.5-_},0 M0,${.5+a} L${.5+_},${.5+a} L${.5+_},0`},"╞":{1:(_,a)=>`M.5,0 L.5,1 M.5,${.5-a} L1,${.5-a} M.5,${.5+a} L1,${.5+a}`},"╟":{1:(_,a)=>`M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1 M${.5+_},.5 L1,.5`},"╠":{1:(_,a)=>`M${.5-_},0 L${.5-_},1 M1,${.5+a} L${.5+_},${.5+a} L${.5+_},1 M1,${.5-a} L${.5+_},${.5-a} L${.5+_},0`},"╡":{1:(_,a)=>`M.5,0 L.5,1 M0,${.5-a} L.5,${.5-a} M0,${.5+a} L.5,${.5+a}`},"╢":{1:(_,a)=>`M0,.5 L${.5-_},.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╣":{1:(_,a)=>`M${.5+_},0 L${.5+_},1 M0,${.5+a} L${.5-_},${.5+a} L${.5-_},1 M0,${.5-a} L${.5-_},${.5-a} L${.5-_},0`},"╤":{1:(_,a)=>`M0,${.5-a} L1,${.5-a} M0,${.5+a} L1,${.5+a} M.5,${.5+a} L.5,1`},"╥":{1:(_,a)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},1 M${.5+_},.5 L${.5+_},1`},"╦":{1:(_,a)=>`M0,${.5-a} L1,${.5-a} M0,${.5+a} L${.5-_},${.5+a} L${.5-_},1 M1,${.5+a} L${.5+_},${.5+a} L${.5+_},1`},"╧":{1:(_,a)=>`M.5,0 L.5,${.5-a} M0,${.5-a} L1,${.5-a} M0,${.5+a} L1,${.5+a}`},"╨":{1:(_,a)=>`M0,.5 L1,.5 M${.5-_},.5 L${.5-_},0 M${.5+_},.5 L${.5+_},0`},"╩":{1:(_,a)=>`M0,${.5+a} L1,${.5+a} M0,${.5-a} L${.5-_},${.5-a} L${.5-_},0 M1,${.5-a} L${.5+_},${.5-a} L${.5+_},0`},"╪":{1:(_,a)=>`M.5,0 L.5,1 M0,${.5-a} L1,${.5-a} M0,${.5+a} L1,${.5+a}`},"╫":{1:(_,a)=>`M0,.5 L1,.5 M${.5-_},0 L${.5-_},1 M${.5+_},0 L${.5+_},1`},"╬":{1:(_,a)=>`M0,${.5+a} L${.5-_},${.5+a} L${.5-_},1 M1,${.5+a} L${.5+_},${.5+a} L${.5+_},1 M0,${.5-a} L${.5-_},${.5-a} L${.5-_},0 M1,${.5-a} L${.5+_},${.5-a} L${.5+_},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(_,a)=>`M.5,1 L.5,${.5+a/.15*.5} C.5,${.5+a/.15*.5},.5,.5,1,.5`},"╮":{1:(_,a)=>`M.5,1 L.5,${.5+a/.15*.5} C.5,${.5+a/.15*.5},.5,.5,0,.5`},"╯":{1:(_,a)=>`M.5,0 L.5,${.5-a/.15*.5} C.5,${.5-a/.15*.5},.5,.5,0,.5`},"╰":{1:(_,a)=>`M.5,0 L.5,${.5-a/.15*.5} C.5,${.5-a/.15*.5},.5,.5,1,.5`}},n.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},n.powerlineDefinitions[""]=n.powerlineDefinitions[""],n.powerlineDefinitions[""]=n.powerlineDefinitions[""],n.tryDrawCustomChar=function(_,a,c,o,u,S,D,b){const E=n.blockElementDefinitions[a];if(E)return(function(z,I,U,Y,X,q){for(let G=0;G<I.length;G++){const K=I[G],H=X/8,W=q/8;z.fillRect(U+K.x*H,Y+K.y*W,K.w*H,K.h*W)}})(_,E,c,o,u,S),!0;const w=p[a];if(w)return(function(z,I,U,Y,X,q){let G=l.get(I);G||(G=new Map,l.set(I,G));const K=z.fillStyle;if(typeof K!="string")throw new Error(`Unexpected fillStyle type "${K}"`);let H=G.get(K);if(!H){const W=I[0].length,j=I.length,F=z.canvas.ownerDocument.createElement("canvas");F.width=W,F.height=j;const V=(0,d.throwIfFalsy)(F.getContext("2d")),ee=new ImageData(W,j);let le,ue,Z,P;if(K.startsWith("#"))le=parseInt(K.slice(1,3),16),ue=parseInt(K.slice(3,5),16),Z=parseInt(K.slice(5,7),16),P=K.length>7&&parseInt(K.slice(7,9),16)||1;else{if(!K.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${K}" when drawing pattern glyph`);[le,ue,Z,P]=K.substring(5,K.length-1).split(",").map((ae=>parseFloat(ae)))}for(let ae=0;ae<j;ae++)for(let ie=0;ie<W;ie++)ee.data[4*(ae*W+ie)]=le,ee.data[4*(ae*W+ie)+1]=ue,ee.data[4*(ae*W+ie)+2]=Z,ee.data[4*(ae*W+ie)+3]=I[ae][ie]*(255*P);V.putImageData(ee,0,0),H=(0,d.throwIfFalsy)(z.createPattern(F,null)),G.set(K,H)}z.fillStyle=H,z.fillRect(U,Y,X,q)})(_,w,c,o,u,S),!0;const R=n.boxDrawingDefinitions[a];if(R)return(function(z,I,U,Y,X,q,G){z.strokeStyle=z.fillStyle;for(const[K,H]of Object.entries(I)){let W;z.beginPath(),z.lineWidth=G*Number.parseInt(K),W=typeof H=="function"?H(.15,.15/q*X):H;for(const j of W.split(" ")){const F=j[0],V=C[F];if(!V){console.error(`Could not find drawing instructions for "${F}"`);continue}const ee=j.substring(1).split(",");ee[0]&&ee[1]&&V(z,L(ee,X,q,U,Y,!0,G))}z.stroke(),z.closePath()}})(_,R,c,o,u,S,b),!0;const N=n.powerlineDefinitions[a];return!!N&&((function(z,I,U,Y,X,q,G,K){const H=new Path2D;H.rect(U,Y,X,q),z.clip(H),z.beginPath();const W=G/12;z.lineWidth=K*W;for(const j of I.d.split(" ")){const F=j[0],V=C[F];if(!V){console.error(`Could not find drawing instructions for "${F}"`);continue}const ee=j.substring(1).split(",");ee[0]&&ee[1]&&V(z,L(ee,X,q,U,Y,!1,K,(I.leftPadding??0)*(W/2),(I.rightPadding??0)*(W/2)))}I.type===1?(z.strokeStyle=z.fillStyle,z.stroke()):z.fill(),z.closePath()})(_,N,c,o,u,S,D,b),!0)};const l=new Map;function g(_,a,c=0){return Math.max(Math.min(_,a),c)}const C={C:(_,a)=>_.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]),L:(_,a)=>_.lineTo(a[0],a[1]),M:(_,a)=>_.moveTo(a[0],a[1])};function L(_,a,c,o,u,S,D,b=0,E=0){const w=_.map((R=>parseFloat(R)||parseInt(R)));if(w.length<2)throw new Error("Too few arguments for instruction");for(let R=0;R<w.length;R+=2)w[R]*=a-b*D-E*D,S&&w[R]!==0&&(w[R]=g(Math.round(w[R]+.5)-.5,a,0)),w[R]+=o+b*D;for(let R=1;R<w.length;R+=2)w[R]*=c,S&&w[R]!==0&&(w[R]=g(Math.round(w[R]+.5)-.5,c,0)),w[R]+=u;return w}},56:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const d=h(859);n.observeDevicePixelDimensions=function(p,l,g){let C=new l.ResizeObserver((L=>{const _=L.find((o=>o.target===p));if(!_)return;if(!("devicePixelContentBoxSize"in _))return C==null||C.disconnect(),void(C=void 0);const a=_.devicePixelContentBoxSize[0].inlineSize,c=_.devicePixelContentBoxSize[0].blockSize;a>0&&c>0&&g(a,c)}));try{C.observe(p,{box:["device-pixel-content-box"]})}catch{C.disconnect(),C=void 0}return(0,d.toDisposable)((()=>C==null?void 0:C.disconnect()))}},374:(A,n)=>{function h(p){return 57508<=p&&p<=57558}function d(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(n,"__esModule",{value:!0}),n.computeNextVariantOffset=n.createRenderDimensions=n.treatGlyphAsBackgroundColor=n.allowRescaling=n.isEmoji=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},n.isPowerlineGlyph=h,n.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},n.isEmoji=d,n.allowRescaling=function(p,l,g,C){return l===1&&g>Math.ceil(1.5*C)&&p!==void 0&&p>255&&!d(p)&&!h(p)&&!(function(L){return 57344<=L&&L<=63743})(p)},n.treatGlyphAsBackgroundColor=function(p){return h(p)||(function(l){return 9472<=l&&l<=9631})(p)},n.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}}}},n.computeNextVariantOffset=function(p,l,g=0){return(p-(2*Math.round(l)-g))%(2*Math.round(l))}},296:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class h{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,l,g,C=!1){if(this.selectionStart=l,this.selectionEnd=g,!l||!g||l[0]===g[0]&&l[1]===g[1])return void this.clear();const L=p.buffers.active.ydisp,_=l[1]-L,a=g[1]-L,c=Math.max(_,0),o=Math.min(a,p.rows-1);c>=p.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=C,this.viewportStartRow=_,this.viewportEndRow=a,this.viewportCappedStartRow=c,this.viewportCappedEndRow=o,this.startCol=l[0],this.endCol=g[0])}isCellSelected(p,l,g){return!!this.hasSelection&&(g-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?l>=this.startCol&&g>=this.viewportCappedStartRow&&l<this.endCol&&g<=this.viewportCappedEndRow:l<this.startCol&&g>=this.viewportCappedStartRow&&l>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&l>=this.startCol&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&l>=this.startCol)}}n.createSelectionRenderModel=function(){return new h}},509:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const d=h(237),p=h(860),l=h(374),g=h(160),C=h(345),L=h(485),_=h(385),a=h(147),c=h(855),o={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let u;class S{get pages(){return this._pages}constructor(R,N,z){this._document=R,this._config=N,this._unicodeService=z,this._didWarmUp=!1,this._cacheMap=new L.FourKeyMap,this._cacheMapCombined=new L.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new a.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new C.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new C.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=E(R,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,l.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const R of this.pages)R.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const R=new _.IdleTaskQueue;for(let N=33;N<126;N++)R.enqueue((()=>{if(!this._cacheMap.get(N,c.DEFAULT_COLOR,c.DEFAULT_COLOR,c.DEFAULT_EXT)){const z=this._drawToCache(N,c.DEFAULT_COLOR,c.DEFAULT_COLOR,c.DEFAULT_EXT);this._cacheMap.set(N,c.DEFAULT_COLOR,c.DEFAULT_COLOR,c.DEFAULT_EXT,z)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const R of this._pages)R.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(S.maxAtlasPages&&this._pages.length>=Math.max(4,S.maxAtlasPages)){const N=this._pages.filter((G=>2*G.canvas.width<=(S.maxTextureSize||4096))).sort(((G,K)=>K.canvas.width!==G.canvas.width?K.canvas.width-G.canvas.width:K.percentageUsed-G.percentageUsed));let z=-1,I=0;for(let G=0;G<N.length;G++)if(N[G].canvas.width!==I)z=G,I=N[G].canvas.width;else if(G-z==3)break;const U=N.slice(z,z+4),Y=U.map((G=>G.glyphs[0].texturePage)).sort(((G,K)=>G>K?1:-1)),X=this.pages.length-U.length,q=this._mergePages(U,X);q.version++;for(let G=Y.length-1;G>=0;G--)this._deletePage(Y[G]);this.pages.push(q),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(q.canvas)}const R=new D(this._document,this._textureSize);return this._pages.push(R),this._activePages.push(R),this._onAddTextureAtlasCanvas.fire(R.canvas),R}_mergePages(R,N){const z=2*R[0].canvas.width,I=new D(this._document,z,R);for(const[U,Y]of R.entries()){const X=U*Y.canvas.width%z,q=Math.floor(U/2)*Y.canvas.height;I.ctx.drawImage(Y.canvas,X,q);for(const K of Y.glyphs)K.texturePage=N,K.sizeClipSpace.x=K.size.x/z,K.sizeClipSpace.y=K.size.y/z,K.texturePosition.x+=X,K.texturePosition.y+=q,K.texturePositionClipSpace.x=K.texturePosition.x/z,K.texturePositionClipSpace.y=K.texturePosition.y/z;this._onRemoveTextureAtlasCanvas.fire(Y.canvas);const G=this._activePages.indexOf(Y);G!==-1&&this._activePages.splice(G,1)}return I}_deletePage(R){this._pages.splice(R,1);for(let N=R;N<this._pages.length;N++){const z=this._pages[N];for(const I of z.glyphs)I.texturePage--;z.version++}}getRasterizedGlyphCombinedChar(R,N,z,I,U){return this._getFromCacheMap(this._cacheMapCombined,R,N,z,I,U)}getRasterizedGlyph(R,N,z,I,U){return this._getFromCacheMap(this._cacheMap,R,N,z,I,U)}_getFromCacheMap(R,N,z,I,U,Y=!1){return u=R.get(N,z,I,U),u||(u=this._drawToCache(N,z,I,U,Y),R.set(N,z,I,U,u)),u}_getColorFromAnsiIndex(R){if(R>=this._config.colors.ansi.length)throw new Error("No color found for idx "+R);return this._config.colors.ansi[R]}_getBackgroundColor(R,N,z,I){if(this._config.allowTransparency)return g.NULL_COLOR;let U;switch(R){case 16777216:case 33554432:U=this._getColorFromAnsiIndex(N);break;case 50331648:const Y=a.AttributeData.toColorRGB(N);U=g.channels.toColor(Y[0],Y[1],Y[2]);break;default:U=z?g.color.opaque(this._config.colors.foreground):this._config.colors.background}return U}_getForegroundColor(R,N,z,I,U,Y,X,q,G,K){const H=this._getMinimumContrastColor(R,N,z,I,U,Y,X,G,q,K);if(H)return H;let W;switch(U){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&G&&Y<8&&(Y+=8),W=this._getColorFromAnsiIndex(Y);break;case 50331648:const j=a.AttributeData.toColorRGB(Y);W=g.channels.toColor(j[0],j[1],j[2]);break;default:W=X?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(W=g.color.opaque(W)),q&&(W=g.color.multiplyOpacity(W,d.DIM_OPACITY)),W}_resolveBackgroundRgba(R,N,z){switch(R){case 16777216:case 33554432:return this._getColorFromAnsiIndex(N).rgba;case 50331648:return N<<8;default:return z?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(R,N,z,I){switch(R){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&I&&N<8&&(N+=8),this._getColorFromAnsiIndex(N).rgba;case 50331648:return N<<8;default:return z?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(R,N,z,I,U,Y,X,q,G,K){if(this._config.minimumContrastRatio===1||K)return;const H=this._getContrastCache(G),W=H.getColor(R,I);if(W!==void 0)return W||void 0;const j=this._resolveBackgroundRgba(N,z,X),F=this._resolveForegroundRgba(U,Y,X,q),V=g.rgba.ensureContrastRatio(j,F,this._config.minimumContrastRatio/(G?2:1));if(!V)return void H.setColor(R,I,null);const ee=g.channels.toColor(V>>24&255,V>>16&255,V>>8&255);return H.setColor(R,I,ee),ee}_getContrastCache(R){return R?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(R,N,z,I,U=!1){const Y=typeof R=="number"?String.fromCharCode(R):R,X=Math.min(this._config.deviceCellWidth*Math.max(Y.length,2)+4,this._textureSize);this._tmpCanvas.width<X&&(this._tmpCanvas.width=X);const q=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<q&&(this._tmpCanvas.height=q),this._tmpCtx.save(),this._workAttributeData.fg=z,this._workAttributeData.bg=N,this._workAttributeData.extended.ext=I,this._workAttributeData.isInvisible())return o;const G=!!this._workAttributeData.isBold(),K=!!this._workAttributeData.isInverse(),H=!!this._workAttributeData.isDim(),W=!!this._workAttributeData.isItalic(),j=!!this._workAttributeData.isUnderline(),F=!!this._workAttributeData.isStrikethrough(),V=!!this._workAttributeData.isOverline();let ee=this._workAttributeData.getFgColor(),le=this._workAttributeData.getFgColorMode(),ue=this._workAttributeData.getBgColor(),Z=this._workAttributeData.getBgColorMode();if(K){const ge=ee;ee=ue,ue=ge;const xe=le;le=Z,Z=xe}const P=this._getBackgroundColor(Z,ue,K,H);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=P.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const ae=G?this._config.fontWeightBold:this._config.fontWeight,ie=W?"italic":"";this._tmpCtx.font=`${ie} ${ae} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=d.TEXT_BASELINE;const ve=Y.length===1&&(0,l.isPowerlineGlyph)(Y.charCodeAt(0)),_e=Y.length===1&&(0,l.isRestrictedPowerlineGlyph)(Y.charCodeAt(0)),Ee=this._getForegroundColor(N,Z,ue,z,le,ee,K,H,G,(0,l.treatGlyphAsBackgroundColor)(Y.charCodeAt(0)));this._tmpCtx.fillStyle=Ee.css;const pe=_e?0:4;let ke=!1;this._config.customGlyphs!==!1&&(ke=(0,p.tryDrawCustomChar)(this._tmpCtx,Y,pe,pe,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let $e,be=!ve;if($e=typeof R=="number"?this._unicodeService.wcwidth(R):this._unicodeService.getStringCellWidth(R),j){this._tmpCtx.save();const ge=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),xe=ge%2==1?.5:0;if(this._tmpCtx.lineWidth=ge,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${a.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let Fe=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Fe<8&&(Fe+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Fe).css}this._tmpCtx.beginPath();const nt=pe,Ue=Math.ceil(pe+this._config.deviceCharHeight)-xe-(U?2*ge:0),Dt=Ue+ge,tt=Ue+2*ge;let mt=this._workAttributeData.getUnderlineVariantOffset();for(let Fe=0;Fe<$e;Fe++){this._tmpCtx.save();const Ne=nt+Fe*this._config.deviceCellWidth,Le=nt+(Fe+1)*this._config.deviceCellWidth,ei=Ne+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Ne,Ue),this._tmpCtx.lineTo(Le,Ue),this._tmpCtx.moveTo(Ne,tt),this._tmpCtx.lineTo(Le,tt);break;case 3:const Ct=ge<=1?tt:Math.ceil(pe+this._config.deviceCharHeight-ge/2)-xe,At=ge<=1?Ue:Math.ceil(pe+this._config.deviceCharHeight+ge/2)-xe,wt=new Path2D;wt.rect(Ne,Ue,this._config.deviceCellWidth,tt-Ue),this._tmpCtx.clip(wt),this._tmpCtx.moveTo(Ne-this._config.deviceCellWidth/2,Dt),this._tmpCtx.bezierCurveTo(Ne-this._config.deviceCellWidth/2,At,Ne,At,Ne,Dt),this._tmpCtx.bezierCurveTo(Ne,Ct,ei,Ct,ei,Dt),this._tmpCtx.bezierCurveTo(ei,At,Le,At,Le,Dt),this._tmpCtx.bezierCurveTo(Le,Ct,Le+this._config.deviceCellWidth/2,Ct,Le+this._config.deviceCellWidth/2,Dt);break;case 4:const Fi=mt===0?0:mt>=ge?2*ge-mt:ge-mt;mt>=ge||Fi===0?(this._tmpCtx.setLineDash([Math.round(ge),Math.round(ge)]),this._tmpCtx.moveTo(Ne+Fi,Ue),this._tmpCtx.lineTo(Le,Ue)):(this._tmpCtx.setLineDash([Math.round(ge),Math.round(ge)]),this._tmpCtx.moveTo(Ne,Ue),this._tmpCtx.lineTo(Ne+Fi,Ue),this._tmpCtx.moveTo(Ne+Fi+ge,Ue),this._tmpCtx.lineTo(Le,Ue)),mt=(0,l.computeNextVariantOffset)(Le-Ne,ge,mt);break;case 5:const qi=.6,ii=.3,Si=Le-Ne,Hi=Math.floor(qi*Si),ut=Math.floor(ii*Si),dt=Si-Hi-ut;this._tmpCtx.setLineDash([Hi,ut,dt]),this._tmpCtx.moveTo(Ne,Ue),this._tmpCtx.lineTo(Le,Ue);break;default:this._tmpCtx.moveTo(Ne,Ue),this._tmpCtx.lineTo(Le,Ue)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!ke&&this._config.fontSize>=12&&!this._config.allowTransparency&&Y!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Fe=this._tmpCtx.measureText(Y);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Fe&&Fe.actualBoundingBoxDescent>0){this._tmpCtx.save();const Ne=new Path2D;Ne.rect(nt,Ue-Math.ceil(ge/2),this._config.deviceCellWidth*$e,tt-Ue+Math.ceil(ge/2)),this._tmpCtx.clip(Ne),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=P.css,this._tmpCtx.strokeText(Y,pe,pe+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(V){const ge=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),xe=ge%2==1?.5:0;this._tmpCtx.lineWidth=ge,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(pe,pe+xe),this._tmpCtx.lineTo(pe+this._config.deviceCharWidth*$e,pe+xe),this._tmpCtx.stroke()}if(ke||this._tmpCtx.fillText(Y,pe,pe+this._config.deviceCharHeight),Y==="_"&&!this._config.allowTransparency){let ge=b(this._tmpCtx.getImageData(pe,pe,this._config.deviceCellWidth,this._config.deviceCellHeight),P,Ee,be);if(ge)for(let xe=1;xe<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=P.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(Y,pe,pe+this._config.deviceCharHeight-xe),ge=b(this._tmpCtx.getImageData(pe,pe,this._config.deviceCellWidth,this._config.deviceCellHeight),P,Ee,be),ge);xe++);}if(F){const ge=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),xe=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ge,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(pe,pe+Math.floor(this._config.deviceCharHeight/2)-xe),this._tmpCtx.lineTo(pe+this._config.deviceCharWidth*$e,pe+Math.floor(this._config.deviceCharHeight/2)-xe),this._tmpCtx.stroke()}this._tmpCtx.restore();const Ht=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let pt;if(pt=this._config.allowTransparency?(function(ge){for(let xe=0;xe<ge.data.length;xe+=4)if(ge.data[xe+3]>0)return!1;return!0})(Ht):b(Ht,P,Ee,be),pt)return o;const Re=this._findGlyphBoundingBox(Ht,this._workBoundingBox,X,_e,ke,pe);let Me,Ce;for(;;){if(this._activePages.length===0){const ge=this._createNewPage();Me=ge,Ce=ge.currentRow,Ce.height=Re.size.y;break}Me=this._activePages[this._activePages.length-1],Ce=Me.currentRow;for(const ge of this._activePages)Re.size.y<=ge.currentRow.height&&(Me=ge,Ce=ge.currentRow);for(let ge=this._activePages.length-1;ge>=0;ge--)for(const xe of this._activePages[ge].fixedRows)xe.height<=Ce.height&&Re.size.y<=xe.height&&(Me=this._activePages[ge],Ce=xe);if(Ce.y+Re.size.y>=Me.canvas.height||Ce.height>Re.size.y+2){let ge=!1;if(Me.currentRow.y+Me.currentRow.height+Re.size.y>=Me.canvas.height){let xe;for(const nt of this._activePages)if(nt.currentRow.y+nt.currentRow.height+Re.size.y<nt.canvas.height){xe=nt;break}if(xe)Me=xe;else if(S.maxAtlasPages&&this._pages.length>=S.maxAtlasPages&&Ce.y+Re.size.y<=Me.canvas.height&&Ce.height>=Re.size.y&&Ce.x+Re.size.x<=Me.canvas.width)ge=!0;else{const nt=this._createNewPage();Me=nt,Ce=nt.currentRow,Ce.height=Re.size.y,ge=!0}}ge||(Me.currentRow.height>0&&Me.fixedRows.push(Me.currentRow),Ce={x:0,y:Me.currentRow.y+Me.currentRow.height,height:Re.size.y},Me.fixedRows.push(Ce),Me.currentRow={x:0,y:Ce.y+Ce.height,height:0})}if(Ce.x+Re.size.x<=Me.canvas.width)break;Ce===Me.currentRow?(Ce.x=0,Ce.y+=Ce.height,Ce.height=0):Me.fixedRows.splice(Me.fixedRows.indexOf(Ce),1)}return Re.texturePage=this._pages.indexOf(Me),Re.texturePosition.x=Ce.x,Re.texturePosition.y=Ce.y,Re.texturePositionClipSpace.x=Ce.x/Me.canvas.width,Re.texturePositionClipSpace.y=Ce.y/Me.canvas.height,Re.sizeClipSpace.x/=Me.canvas.width,Re.sizeClipSpace.y/=Me.canvas.height,Ce.height=Math.max(Ce.height,Re.size.y),Ce.x+=Re.size.x,Me.ctx.putImageData(Ht,Re.texturePosition.x-this._workBoundingBox.left,Re.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Re.size.x,Re.size.y),Me.addGlyph(Re),Me.version++,Re}_findGlyphBoundingBox(R,N,z,I,U,Y){N.top=0;const X=I?this._config.deviceCellHeight:this._tmpCanvas.height,q=I?this._config.deviceCellWidth:z;let G=!1;for(let K=0;K<X;K++){for(let H=0;H<q;H++){const W=K*this._tmpCanvas.width*4+4*H+3;if(R.data[W]!==0){N.top=K,G=!0;break}}if(G)break}N.left=0,G=!1;for(let K=0;K<Y+q;K++){for(let H=0;H<X;H++){const W=H*this._tmpCanvas.width*4+4*K+3;if(R.data[W]!==0){N.left=K,G=!0;break}}if(G)break}N.right=q,G=!1;for(let K=Y+q-1;K>=Y;K--){for(let H=0;H<X;H++){const W=H*this._tmpCanvas.width*4+4*K+3;if(R.data[W]!==0){N.right=K,G=!0;break}}if(G)break}N.bottom=X,G=!1;for(let K=X-1;K>=0;K--){for(let H=0;H<q;H++){const W=K*this._tmpCanvas.width*4+4*H+3;if(R.data[W]!==0){N.bottom=K,G=!0;break}}if(G)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:N.right-N.left+1,y:N.bottom-N.top+1},sizeClipSpace:{x:N.right-N.left+1,y:N.bottom-N.top+1},offset:{x:-N.left+Y+(I||U?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-N.top+Y+(I||U?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=S;class D{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(R){this._glyphs.push(R),this._usedPixels+=R.size.x*R.size.y}constructor(R,N,z){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],z)for(const I of z)this._glyphs.push(...I.glyphs),this._usedPixels+=I._usedPixels;this.canvas=E(R,N,N),this.ctx=(0,l.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function b(w,R,N,z){const I=R.rgba>>>24,U=R.rgba>>>16&255,Y=R.rgba>>>8&255,X=N.rgba>>>24,q=N.rgba>>>16&255,G=N.rgba>>>8&255,K=Math.floor((Math.abs(I-X)+Math.abs(U-q)+Math.abs(Y-G))/12);let H=!0;for(let W=0;W<w.data.length;W+=4)w.data[W]===I&&w.data[W+1]===U&&w.data[W+2]===Y||z&&Math.abs(w.data[W]-I)+Math.abs(w.data[W+1]-U)+Math.abs(w.data[W+2]-Y)<K?w.data[W+3]=0:H=!1;return H}function E(w,R,N){const z=w.createElement("canvas");return z.width=R,z.height=N,z}},577:function(A,n,h){var d=this&&this.__decorate||function(c,o,u,S){var D,b=arguments.length,E=b<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,u):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,o,u,S);else for(var w=c.length-1;w>=0;w--)(D=c[w])&&(E=(b<3?D(E):b>3?D(o,u,E):D(o,u))||E);return b>3&&E&&Object.defineProperty(o,u,E),E},p=this&&this.__param||function(c,o){return function(u,S){o(u,S,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const l=h(147),g=h(855),C=h(782),L=h(97);class _ extends l.AttributeData{constructor(o,u,S){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=u,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=_;let a=n.CharacterJoinerService=class tp{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(o){const u={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(u),u.id}deregister(o){for(let u=0;u<this._characterJoiners.length;u++)if(this._characterJoiners[u].id===o)return this._characterJoiners.splice(u,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const u=this._bufferService.buffer.lines.get(o);if(!u||u.length===0)return[];const S=[],D=u.translateToString(!0);let b=0,E=0,w=0,R=u.getFg(0),N=u.getBg(0);for(let z=0;z<u.getTrimmedLength();z++)if(u.loadCell(z,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==N){if(z-b>1){const I=this._getJoinedRanges(D,w,E,u,b);for(let U=0;U<I.length;U++)S.push(I[U])}b=z,w=E,R=this._workCell.fg,N=this._workCell.bg}E+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-b>1){const z=this._getJoinedRanges(D,w,E,u,b);for(let I=0;I<z.length;I++)S.push(z[I])}return S}_getJoinedRanges(o,u,S,D,b){const E=o.substring(u,S);let w=[];try{w=this._characterJoiners[0].handler(E)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const N=this._characterJoiners[R].handler(E);for(let z=0;z<N.length;z++)tp._mergeRanges(w,N[z])}catch(N){console.error(N)}return this._stringRangesToCellRanges(w,D,b),w}_stringRangesToCellRanges(o,u,S){let D=0,b=!1,E=0,w=o[D];if(w){for(let R=S;R<this._bufferService.cols;R++){const N=u.getWidth(R),z=u.getString(R).length||g.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!b&&w[0]<=E&&(w[0]=R,b=!0),w[1]<=E){if(w[1]=R,w=o[++D],!w)break;w[0]<=E?(w[0]=R,b=!0):b=!1}E+=z}}w&&(w[1]=this._bufferService.cols)}}static _mergeRanges(o,u){let S=!1;for(let D=0;D<o.length;D++){const b=o[D];if(S){if(u[1]<=b[0])return o[D-1][1]=u[1],o;if(u[1]<=b[1])return o[D-1][1]=Math.max(u[1],b[1]),o.splice(D,1),o;o.splice(D,1),D--}else{if(u[1]<=b[0])return o.splice(D,0,u),o;if(u[1]<=b[1])return b[0]=Math.min(u[0],b[0]),o;u[0]<b[1]&&(b[0]=Math.min(u[0],b[0]),S=!0)}}return S?o[o.length-1][1]=u[1]:o.push(u),o}};n.CharacterJoinerService=a=d([p(0,L.IBufferService)],a)},160:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let h=0,d=0,p=0,l=0;var g,C,L,_,a;function c(u){const S=u.toString(16);return S.length<2?"0"+S:S}function o(u,S){return u<S?(S+.05)/(u+.05):(u+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(u){u.toCss=function(S,D,b,E){return E!==void 0?`#${c(S)}${c(D)}${c(b)}${c(E)}`:`#${c(S)}${c(D)}${c(b)}`},u.toRgba=function(S,D,b,E=255){return(S<<24|D<<16|b<<8|E)>>>0},u.toColor=function(S,D,b,E){return{css:u.toCss(S,D,b,E),rgba:u.toRgba(S,D,b,E)}}})(g||(n.channels=g={})),(function(u){function S(D,b){return l=Math.round(255*b),[h,d,p]=a.toChannels(D.rgba),{css:g.toCss(h,d,p,l),rgba:g.toRgba(h,d,p,l)}}u.blend=function(D,b){if(l=(255&b.rgba)/255,l===1)return{css:b.css,rgba:b.rgba};const E=b.rgba>>24&255,w=b.rgba>>16&255,R=b.rgba>>8&255,N=D.rgba>>24&255,z=D.rgba>>16&255,I=D.rgba>>8&255;return h=N+Math.round((E-N)*l),d=z+Math.round((w-z)*l),p=I+Math.round((R-I)*l),{css:g.toCss(h,d,p),rgba:g.toRgba(h,d,p)}},u.isOpaque=function(D){return(255&D.rgba)==255},u.ensureContrastRatio=function(D,b,E){const w=a.ensureContrastRatio(D.rgba,b.rgba,E);if(w)return g.toColor(w>>24&255,w>>16&255,w>>8&255)},u.opaque=function(D){const b=(255|D.rgba)>>>0;return[h,d,p]=a.toChannels(b),{css:g.toCss(h,d,p),rgba:b}},u.opacity=S,u.multiplyOpacity=function(D,b){return l=255&D.rgba,S(D,l*b/255)},u.toColorRGB=function(D){return[D.rgba>>24&255,D.rgba>>16&255,D.rgba>>8&255]}})(C||(n.color=C={})),(function(u){let S,D;try{const b=document.createElement("canvas");b.width=1,b.height=1;const E=b.getContext("2d",{willReadFrequently:!0});E&&(S=E,S.globalCompositeOperation="copy",D=S.createLinearGradient(0,0,1,1))}catch{}u.toColor=function(b){if(b.match(/#[\da-f]{3,8}/i))switch(b.length){case 4:return h=parseInt(b.slice(1,2).repeat(2),16),d=parseInt(b.slice(2,3).repeat(2),16),p=parseInt(b.slice(3,4).repeat(2),16),g.toColor(h,d,p);case 5:return h=parseInt(b.slice(1,2).repeat(2),16),d=parseInt(b.slice(2,3).repeat(2),16),p=parseInt(b.slice(3,4).repeat(2),16),l=parseInt(b.slice(4,5).repeat(2),16),g.toColor(h,d,p,l);case 7:return{css:b,rgba:(parseInt(b.slice(1),16)<<8|255)>>>0};case 9:return{css:b,rgba:parseInt(b.slice(1),16)>>>0}}const E=b.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return h=parseInt(E[1]),d=parseInt(E[2]),p=parseInt(E[3]),l=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),g.toColor(h,d,p,l);if(!S||!D)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=D,S.fillStyle=b,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[h,d,p,l]=S.getImageData(0,0,1,1).data,l!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(h,d,p,l),css:b}}})(L||(n.css=L={})),(function(u){function S(D,b,E){const w=D/255,R=b/255,N=E/255;return .2126*(w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))}u.relativeLuminance=function(D){return S(D>>16&255,D>>8&255,255&D)},u.relativeLuminance2=S})(_||(n.rgb=_={})),(function(u){function S(b,E,w){const R=b>>24&255,N=b>>16&255,z=b>>8&255;let I=E>>24&255,U=E>>16&255,Y=E>>8&255,X=o(_.relativeLuminance2(I,U,Y),_.relativeLuminance2(R,N,z));for(;X<w&&(I>0||U>0||Y>0);)I-=Math.max(0,Math.ceil(.1*I)),U-=Math.max(0,Math.ceil(.1*U)),Y-=Math.max(0,Math.ceil(.1*Y)),X=o(_.relativeLuminance2(I,U,Y),_.relativeLuminance2(R,N,z));return(I<<24|U<<16|Y<<8|255)>>>0}function D(b,E,w){const R=b>>24&255,N=b>>16&255,z=b>>8&255;let I=E>>24&255,U=E>>16&255,Y=E>>8&255,X=o(_.relativeLuminance2(I,U,Y),_.relativeLuminance2(R,N,z));for(;X<w&&(I<255||U<255||Y<255);)I=Math.min(255,I+Math.ceil(.1*(255-I))),U=Math.min(255,U+Math.ceil(.1*(255-U))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),X=o(_.relativeLuminance2(I,U,Y),_.relativeLuminance2(R,N,z));return(I<<24|U<<16|Y<<8|255)>>>0}u.blend=function(b,E){if(l=(255&E)/255,l===1)return E;const w=E>>24&255,R=E>>16&255,N=E>>8&255,z=b>>24&255,I=b>>16&255,U=b>>8&255;return h=z+Math.round((w-z)*l),d=I+Math.round((R-I)*l),p=U+Math.round((N-U)*l),g.toRgba(h,d,p)},u.ensureContrastRatio=function(b,E,w){const R=_.relativeLuminance(b>>8),N=_.relativeLuminance(E>>8);if(o(R,N)<w){if(N<R){const U=S(b,E,w),Y=o(R,_.relativeLuminance(U>>8));if(Y<w){const X=D(b,E,w);return Y>o(R,_.relativeLuminance(X>>8))?U:X}return U}const z=D(b,E,w),I=o(R,_.relativeLuminance(z>>8));if(I<w){const U=S(b,E,w);return I>o(R,_.relativeLuminance(U>>8))?z:U}return z}},u.reduceLuminance=S,u.increaseLuminance=D,u.toChannels=function(b){return[b>>24&255,b>>16&255,b>>8&255,255&b]}})(a||(n.rgba=a={})),n.toPaddedHex=c,n.contrastRatio=o},345:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===h)return void this._listeners.splice(d,1)}}})),this._event}fire(h,d){const p=[];for(let l=0;l<this._listeners.length;l++)p.push(this._listeners[l]);for(let l=0;l<p.length;l++)p[l].call(void 0,h,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(h,d){return h((p=>d.fire(p)))},n.runAndSubscribe=function(h,d){return d(void 0),h((p=>d(p)))}},859:(A,n)=>{function h(d){for(const p of d)p.dispose();d.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const p=this._disposables.indexOf(d);p!==-1&&this._disposables.splice(p,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var p;this._isDisposed||d===this._value||((p=this._value)==null||p.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},n.toDisposable=function(d){return{dispose:d}},n.disposeArray=h,n.getDisposeArrayDisposable=function(d){return{dispose:()=>h(d)}}},485:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(p,l,g){this._data[p]||(this._data[p]={}),this._data[p][l]=g}get(p,l){return this._data[p]?this._data[p][l]:void 0}clear(){this._data={}}}n.TwoKeyMap=h,n.FourKeyMap=class{constructor(){this._data=new h}set(d,p,l,g,C){this._data.get(d,p)||this._data.set(d,p,new h),this._data.get(d,p).set(l,g,C)}get(d,p,l,g){var C;return(C=this._data.get(d,p))==null?void 0:C.get(l,g)}clear(){this._data.clear()}}},399:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof process<"u"&&"title"in process;const h=n.isNode?"node":navigator.userAgent,d=n.isNode?"node":navigator.platform;n.isFirefox=h.includes("Firefox"),n.isLegacyEdge=h.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(h),n.getSafariVersion=function(){if(!n.isSafari)return 0;const p=h.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),n.isIpad=d==="iPad",n.isIphone=d==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),n.isLinux=d.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(h)},385:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const d=h(399);class p{constructor(){this._tasks=[],this._i=0}enqueue(C){this._tasks.push(C),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(C){this._idleCallback=void 0;let L=0,_=0,a=C.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(L=Date.now(),this._tasks[this._i]()||this._i++,L=Math.max(1,Date.now()-L),_=Math.max(L,_),c=C.timeRemaining(),1.5*_>c)return a-L<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(a-L))}ms`),void this._start();a=c}this.clear()}}class l extends p{_requestCallback(C){return setTimeout((()=>C(this._createDeadline(16))))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const L=Date.now()+C;return{timeRemaining:()=>Math.max(0,L-Date.now())}}}n.PriorityTaskQueue=l,n.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:l,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},147:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(l){return[l>>>16&255,l>>>8&255,255&l]}static fromColorRGB(l){return(255&l[0])<<16|(255&l[1])<<8|255&l[2]}clone(){const l=new h;return l.fg=this.fg,l.bg=this.bg,l.extended=this.extended.clone(),l}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}}n.AttributeData=h;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(l){this._ext=l}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(l){this._ext&=-469762049,this._ext|=l<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(l){this._ext&=-67108864,this._ext|=67108863&l}get urlId(){return this._urlId}set urlId(l){this._urlId=l}get underlineVariantOffset(){const l=(3758096384&this._ext)>>29;return l<0?4294967288^l:l}set underlineVariantOffset(l){this._ext&=536870911,this._ext|=l<<29&3758096384}constructor(l=0,g=0){this._ext=0,this._urlId=0,this._ext=l,this._urlId=g}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=d},782:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const d=h(133),p=h(855),l=h(147);class g extends l.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new l.ExtendedAttrs,this.combinedData=""}static fromCharData(L){const _=new g;return _.setFromCharData(L),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(L){this.fg=L[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(L[p.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(L[p.CHAR_DATA_CHAR_INDEX].length===2){const a=L[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=a&&a<=56319){const c=L[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(a-55296)+c-56320+65536|L[p.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=L[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|L[p.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=L[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|L[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=g},855:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},133:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},n.utf32ToString=function(h,d=0,p=h.length){let l="";for(let g=d;g<p;++g){let C=h[g];C>65535?(C-=65536,l+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):l+=String.fromCharCode(C)}return l},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,d){const p=h.length;if(!p)return 0;let l=0,g=0;if(this._interim){const C=h.charCodeAt(g++);56320<=C&&C<=57343?d[l++]=1024*(this._interim-55296)+C-56320+65536:(d[l++]=this._interim,d[l++]=C),this._interim=0}for(let C=g;C<p;++C){const L=h.charCodeAt(C);if(55296<=L&&L<=56319){if(++C>=p)return this._interim=L,l;const _=h.charCodeAt(C);56320<=_&&_<=57343?d[l++]=1024*(L-55296)+_-56320+65536:(d[l++]=L,d[l++]=_)}else L!==65279&&(d[l++]=L)}return l}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,d){const p=h.length;if(!p)return 0;let l,g,C,L,_=0,a=0,c=0;if(this.interim[0]){let S=!1,D=this.interim[0];D&=(224&D)==192?31:(240&D)==224?15:7;let b,E=0;for(;(b=63&this.interim[++E])&&E<4;)D<<=6,D|=b;const w=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=w-E;for(;c<R;){if(c>=p)return 0;if(b=h[c++],(192&b)!=128){c--,S=!0;break}this.interim[E++]=b,D<<=6,D|=63&b}S||(w===2?D<128?c--:d[_++]=D:w===3?D<2048||D>=55296&&D<=57343||D===65279||(d[_++]=D):D<65536||D>1114111||(d[_++]=D)),this.interim.fill(0)}const o=p-4;let u=c;for(;u<p;){for(;!(!(u<o)||128&(l=h[u])||128&(g=h[u+1])||128&(C=h[u+2])||128&(L=h[u+3]));)d[_++]=l,d[_++]=g,d[_++]=C,d[_++]=L,u+=4;if(l=h[u++],l<128)d[_++]=l;else if((224&l)==192){if(u>=p)return this.interim[0]=l,_;if(g=h[u++],(192&g)!=128){u--;continue}if(a=(31&l)<<6|63&g,a<128){u--;continue}d[_++]=a}else if((240&l)==224){if(u>=p)return this.interim[0]=l,_;if(g=h[u++],(192&g)!=128){u--;continue}if(u>=p)return this.interim[0]=l,this.interim[1]=g,_;if(C=h[u++],(192&C)!=128){u--;continue}if(a=(15&l)<<12|(63&g)<<6|63&C,a<2048||a>=55296&&a<=57343||a===65279)continue;d[_++]=a}else if((248&l)==240){if(u>=p)return this.interim[0]=l,_;if(g=h[u++],(192&g)!=128){u--;continue}if(u>=p)return this.interim[0]=l,this.interim[1]=g,_;if(C=h[u++],(192&C)!=128){u--;continue}if(u>=p)return this.interim[0]=l,this.interim[1]=g,this.interim[2]=C,_;if(L=h[u++],(192&L)!=128){u--;continue}if(a=(7&l)<<18|(63&g)<<12|(63&C)<<6|63&L,a<65536||a>1114111)continue;d[_++]=a}}return _}}},776:function(A,n,h){var d=this&&this.__decorate||function(a,c,o,u){var S,D=arguments.length,b=D<3?c:u===null?u=Object.getOwnPropertyDescriptor(c,o):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(a,c,o,u);else for(var E=a.length-1;E>=0;E--)(S=a[E])&&(b=(D<3?S(b):D>3?S(c,o,b):S(c,o))||b);return D>3&&b&&Object.defineProperty(c,o,b),b},p=this&&this.__param||function(a,c){return function(o,u){c(o,u,a)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const l=h(859),g=h(97),C={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let L,_=n.LogService=class extends l.Disposable{get logLevel(){return this._logLevel}constructor(a){super(),this._optionsService=a,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),L=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(a){for(let c=0;c<a.length;c++)typeof a[c]=="function"&&(a[c]=a[c]())}_log(a,c,o){this._evalLazyOptionalParams(o),a.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...o)}trace(a,...c){var o;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,a,c)}debug(a,...c){var o;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,a,c)}info(a,...c){var o;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,a,c)}warn(a,...c){var o;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,a,c)}error(a,...c){var o;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,a,c)}};n.LogService=_=d([p(0,g.IOptionsService)],_),n.setTraceLogger=function(a){L=a},n.traceCall=function(a,c,o){if(typeof o.value!="function")throw new Error("not supported");const u=o.value;o.value=function(...S){if(L.logLevel!==g.LogLevelEnum.TRACE)return u.apply(this,S);L.trace(`GlyphRenderer#${u.name}(${S.map((b=>JSON.stringify(b))).join(", ")})`);const D=u.apply(this,S);return L.trace(`GlyphRenderer#${u.name} return`,D),D}}},726:(A,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const h="di$target",d="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(p){return p[d]||[]},n.createDecorator=function(p){if(n.serviceRegistry.has(p))return n.serviceRegistry.get(p);const l=function(g,C,L){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,a,c){a[h]===a?a[d].push({id:_,index:c}):(a[d]=[{id:_,index:c}],a[h]=a)})(l,g,L)};return l.toString=()=>p,n.serviceRegistry.set(p,l),l}},97:(A,n,h)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const d=h(726);var p;n.IBufferService=(0,d.createDecorator)("BufferService"),n.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),n.ICoreService=(0,d.createDecorator)("CoreService"),n.ICharsetService=(0,d.createDecorator)("CharsetService"),n.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(l){l[l.TRACE=0]="TRACE",l[l.DEBUG=1]="DEBUG",l[l.INFO=2]="INFO",l[l.WARN=3]="WARN",l[l.ERROR=4]="ERROR",l[l.OFF=5]="OFF"})(p||(n.LogLevelEnum=p={})),n.ILogService=(0,d.createDecorator)("LogService"),n.IOptionsService=(0,d.createDecorator)("OptionsService"),n.IOscLinkService=(0,d.createDecorator)("OscLinkService"),n.IUnicodeService=(0,d.createDecorator)("UnicodeService"),n.IDecorationService=(0,d.createDecorator)("DecorationService")}},x={};function M(A){var n=x[A];if(n!==void 0)return n.exports;var h=x[A]={exports:{}};return m[A].call(h.exports,h,h.exports,M),h.exports}var B={};return(()=>{var A=B;Object.defineProperty(A,"__esModule",{value:!0}),A.CanvasAddon=void 0;const n=M(345),h=M(859),d=M(776),p=M(949);class l extends h.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var C;return(C=this._renderer)==null?void 0:C.textureAtlas}activate(C){const L=C._core;if(!C.element)return void this.register(L.onWillOpen((()=>this.activate(C))));this._terminal=C;const _=L.coreService,a=L.optionsService,c=L.screenElement,o=L.linkifier,u=L,S=u._bufferService,D=u._renderService,b=u._characterJoinerService,E=u._charSizeService,w=u._coreBrowserService,R=u._decorationService,N=u._logService,z=u._themeService;(0,d.setTraceLogger)(N),this._renderer=new p.CanvasRenderer(C,c,o,S,E,a,b,_,w,R,z),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),D.setRenderer(this._renderer),D.handleResize(S.cols,S.rows),this.register((0,h.toDisposable)((()=>{var I;D.setRenderer(this._terminal._core._createRenderer()),D.handleResize(C.cols,C.rows),(I=this._renderer)==null||I.dispose(),this._renderer=void 0})))}clearTextureAtlas(){var C;(C=this._renderer)==null||C.clearTextureAtlas()}}A.CanvasAddon=l})(),B})()))})(Nu)),Nu.exports}var gC=vC();function pC(r={}){const{fontSize:f=14,onData:m,onResize:x,onSelectionChange:M}=r,B=k.useRef(null),A=k.useRef(null),n=k.useRef(null),h=k.useRef(null),[d,p]=k.useState(null),[l,g]=k.useState(null),[C,L]=k.useState(null),_=aa(u=>u.themeId),a=k.useCallback(()=>{var u;try{(u=n.current)==null||u.fit()}catch{}},[]),c=k.useCallback(u=>{var S;(S=A.current)==null||S.write(u)},[]),o=k.useCallback(()=>{var u;return((u=A.current)==null?void 0:u.getSelection())??""},[]);return k.useEffect(()=>{const u=B.current;if(!u)return;const S="'NerdFont', 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Menlo', 'Consolas', monospace",D=Ev(_),b=new lC.Terminal({cursorBlink:!0,fontFamily:S,fontSize:f,scrollback:1e4,fontWeight:"normal",fontWeightBold:"bold",letterSpacing:0,lineHeight:1,allowProposedApi:!0,theme:D}),E=new uC.FitAddon,w=new dC.SearchAddon,R=new _C.WebLinksAddon;b.loadAddon(E),b.loadAddon(w),b.loadAddon(R),b.attachCustomKeyEventHandler(q=>{if((q.ctrlKey||q.metaKey)&&(q.key==="k"||q.key==="f"))return!1;if(q.key==="Escape"){const G=We.getState();if(G.commandPaletteOpen||G.searchBarOpen||G.copyOverlayOpen)return!1}return!0});let N=!1;const z=q=>{var G;(G=q.message)!=null&&G.includes("dimensions")&&q.preventDefault()},I=()=>{if(!N){window.addEventListener("error",z);try{b.open(u)}catch{window.removeEventListener("error",z);return}if(setTimeout(()=>window.removeEventListener("error",z),50),!navigator.webdriver)try{const q=new gC.CanvasAddon;b.loadAddon(q)}catch{}try{E.fit()}catch{}}};let U=null;u.offsetWidth>0&&u.offsetHeight>0?I():(U=new ResizeObserver(()=>{u.offsetWidth>0&&u.offsetHeight>0&&(U.disconnect(),U=null,I())}),U.observe(u)),A.current=b,n.current=E,h.current=w,p(b),g(E),L(w),new FontFace("NerdFont","url(https://cdn.jsdelivr.net/gh/ryanoasis/nerd-fonts@latest/patched-fonts/JetBrainsMono/Ligatures/Regular/JetBrainsMonoNerdFont-Regular.ttf)").load().then(q=>{var G;if(!N&&(document.fonts.add(q),A.current)){A.current.options.fontFamily=S;try{(G=n.current)==null||G.fit()}catch{}}}).catch(()=>{});const X=new ResizeObserver(q=>{var K;const G=q[0];if(!(!G||G.contentRect.width===0||G.contentRect.height===0))try{(K=n.current)==null||K.fit()}catch{}});return X.observe(u),()=>{N=!0,U==null||U.disconnect(),X.disconnect(),b.dispose(),A.current=null,n.current=null,h.current=null,p(null),g(null),L(null)}},[]),k.useEffect(()=>{let u;const S=()=>{clearTimeout(u),u=setTimeout(()=>{var D;try{(D=n.current)==null||D.fit()}catch{}},100)};return window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S),clearTimeout(u)}},[]),k.useEffect(()=>{const u=screen.orientation;if(!u)return;let S;const D=()=>{S=setTimeout(()=>{var b;try{(b=n.current)==null||b.fit()}catch{}},150)};return u.addEventListener("change",D),()=>{u.removeEventListener("change",D),clearTimeout(S)}},[]),k.useEffect(()=>{A.current&&(A.current.options.theme=Ev(_))},[_]),k.useEffect(()=>{A.current&&(A.current.options.fontSize=f,a())},[f,a]),k.useEffect(()=>{if(!A.current||!m)return;const u=A.current.onData(m);return()=>u.dispose()},[d,m]),k.useEffect(()=>{if(!A.current||!x)return;const u=A.current.onResize(({cols:S,rows:D})=>x(S,D));return()=>u.dispose()},[d,x]),k.useEffect(()=>{if(!A.current||!M)return;const u=A.current.onSelectionChange(()=>{var D;const S=((D=A.current)==null?void 0:D.getSelection())??"";S&&M(S)});return()=>u.dispose()},[d,M]),{terminalRef:B,terminal:d,fitAddon:l,searchAddon:C,fit:a,write:c,getSelection:o}}let ea=null;function ch(){return ea||(ea=new(window.AudioContext||window.webkitAudioContext)),ea.state==="suspended"&&ea.resume(),ea}document.addEventListener("click",()=>ch(),{once:!0});document.addEventListener("touchstart",()=>ch(),{once:!0});function ip(){try{const r=ch(),f=r.createOscillator(),m=r.createGain();f.type="sine",f.frequency.setValueAtTime(440,r.currentTime),m.gain.setValueAtTime(.15,r.currentTime),m.gain.exponentialRampToValueAtTime(.001,r.currentTime+.15),f.connect(m),m.connect(r.destination),f.start(r.currentTime),f.stop(r.currentTime+.15)}catch{}}function Po(){try{return localStorage.getItem("termbeam-notifications")!=="false"}catch{return!0}}function mC(r){try{localStorage.setItem("termbeam-notifications",String(r))}catch{}}function bC(r){if(Po()&&Notification.permission==="granted")try{new Notification("Command finished in "+r,{icon:"/icons/icon-192.png",tag:"termbeam-cmd"})}catch{}}const Hu=3e3,SC=3e4,yC=3e4,CC=3e3,sp=document.title,ta=new Map,wC=2e3,No=new Map;function xC(r){return r.replace(/\x1b\](?:4|10|11|12);[^\x07\x1b]*(?:\x07|\x1b\\)/g,"")}function EC(){document.hidden||(document.title=sp)}document.addEventListener("visibilitychange",EC);function DC(r){const{sessionId:f,terminal:m,onExit:x,onConnected:M}=r,B=k.useRef(null),A=k.useRef(Hu),n=k.useRef(null),h=k.useRef(null),d=k.useRef(!0),p=k.useRef(null),[l,g]=k.useState(!1),C=k.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null),h.current&&(clearInterval(h.current),h.current=null)},[]),L=k.useCallback(c=>{const o=B.current;(o==null?void 0:o.readyState)===WebSocket.OPEN&&o.send(JSON.stringify({type:"input",data:c}))},[]),_=k.useCallback((c,o)=>{const u=B.current;(u==null?void 0:u.readyState)===WebSocket.OPEN&&u.send(JSON.stringify({type:"resize",cols:c,rows:o}))},[]);k.useEffect(()=>{if(!m||!f)return;d.current=!0;let c="",o=!1;function u(){c&&m&&(m.write(c),c=""),o=!1}function S(b){c+=b,o||(o=!0,requestAnimationFrame(()=>{c.length>512?requestAnimationFrame(u):u()}))}function D(){if(!d.current)return;const b=A1(),E=new WebSocket(b);B.current=E,E.onopen=()=>{if(!d.current){E.close();return}E.send(JSON.stringify({type:"attach",sessionId:f})),A.current=Hu,h.current=setInterval(()=>{E.readyState===WebSocket.OPEN&&E.send(JSON.stringify({type:"ping"}))},yC)},E.onmessage=w=>{var N;if(!d.current||!m)return;let R;try{R=JSON.parse(w.data)}catch{const z=w.data;typeof z=="string"&&z.length>0&&S(z);return}switch(R.type){case"attached":{g(!0),M==null||M(),R.scrollback&&m.write(xC(R.scrollback)),m.cols&&m.rows&&E.send(JSON.stringify({type:"resize",cols:m.cols,rows:m.rows}));const z=No.get(f);z&&clearTimeout(z),No.set(f,setTimeout(()=>No.delete(f),wC));break}case"output":{S(R.data);const z=Te.getState(),I=z.sessions.get(f);if(z.activeId!==f){const U=(I==null?void 0:I.hasUnread)??!1;z.markUnread(f),!U&&!No.has(f)&&Po()&&ip()}if(document.hidden&&Po()&&(document.title.startsWith("(●) ")||(document.title="(●) "+sp)),Po()){const U=ta.get(f);U&&clearTimeout(U),ta.set(f,setTimeout(()=>{ta.delete(f),document.hidden&&bC((I==null?void 0:I.name)??f)},CC))}break}case"exit":{x==null||x(R.sessionId);break}case"error":{(N=R.message)!=null&&N.toLowerCase().includes("not found")?(d.current=!1,Te.getState().isDeleted(f)||(Qe.error(R.message),x==null||x(f)),E.close()):Qe.error(R.message);break}}},E.onclose=()=>{if(g(!1),B.current=null,h.current&&(clearInterval(h.current),h.current=null),!d.current)return;const w=A.current;A.current=Math.min(w*2,SC),n.current=setTimeout(D,w)},E.onerror=()=>{}}return p.current=D,D(),()=>{d.current=!1,C();const b=ta.get(f);b&&(clearTimeout(b),ta.delete(f));const E=B.current;E&&(E.onclose=null,E.onerror=null,E.onmessage=null,E.close(),B.current=null),g(!1)}},[m,f,x,M,C]);const a=k.useCallback(()=>{var o;n.current&&(clearTimeout(n.current),n.current=null),h.current&&(clearInterval(h.current),h.current=null);const c=B.current;c&&(c.onclose=null,c.onerror=null,c.onmessage=null,c.close(),B.current=null),A.current=Hu,g(!1),(o=p.current)==null||o.call(p)},[]);return{send:L,connected:l,sendResize:_,reconnect:a,ws:B.current}}const LC="_pane_r8ota_1",RC="_terminalContainer_r8ota_8",MC="_scrollToBottom_r8ota_13",AC="_exitOverlay_r8ota_37",TC="_exitMessage_r8ota_47",BC="_reconnectOverlay_r8ota_57",OC="_reconnectContent_r8ota_77",kC="_reconnectMessage_r8ota_88",NC="_reconnectActions_r8ota_93",HC="_reconnectBtn_r8ota_98",Ui={pane:LC,terminalContainer:RC,scrollToBottom:MC,exitOverlay:AC,exitMessage:TC,reconnectOverlay:BC,reconnectContent:OC,reconnectMessage:kC,reconnectActions:NC,reconnectBtn:HC};function jC({sessionId:r,active:f,visible:m,fontSize:x=14}){const[M,B]=k.useState(!1),[A,n]=k.useState(!1),h=Te(X=>X.updateSession),d=k.useRef(null),p=k.useRef(!1),l=k.useRef(()=>{}),g=k.useRef(()=>{}),C=k.useCallback(X=>{B(!0),h(X,{exited:!0})},[h]),L=k.useCallback(X=>{l.current(X)},[]),_=k.useCallback((X,q)=>{g.current(X,q)},[]),a=k.useCallback(X=>{X&&navigator.clipboard.writeText(X).then(()=>Qe.success("Copied to clipboard"),()=>{})},[]),{terminalRef:c,terminal:o,fitAddon:u,searchAddon:S,fit:D}=pC({fontSize:x,onData:L,onResize:_,onSelectionChange:a}),{send:b,sendResize:E,connected:w,reconnect:R}=DC({sessionId:r,terminal:o,onExit:C});k.useEffect(()=>{if(w&&(p.current=!0,o)){const X=[];for(const q of[50,150,400,1e3])X.push(setTimeout(()=>{D(),o.refresh(0,o.rows-1),o.scrollToBottom()},q));return X.push(setTimeout(()=>o.focus(),50)),()=>X.forEach(clearTimeout)}},[w,o,D]),k.useEffect(()=>{l.current=b,g.current=E});const N=Te(X=>X.clearUnread);k.useEffect(()=>{f&&N(r)},[f,r,N]),k.useEffect(()=>{if(f&&o){const X=requestAnimationFrame(()=>{D(),o.refresh(0,o.rows-1),o.scrollToBottom(),o.focus()});return()=>cancelAnimationFrame(X)}},[f,o,D]),k.useEffect(()=>{if(!o)return;const X=o.element,q=()=>{const K=o.buffer.active,H=K.viewportY>=K.baseY;n(!H)},G=o.onScroll(q);return X==null||X.addEventListener("wheel",q,{passive:!0}),X==null||X.addEventListener("touchmove",q,{passive:!0}),()=>{G.dispose(),X==null||X.removeEventListener("wheel",q),X==null||X.removeEventListener("touchmove",q)}},[o]),k.useEffect(()=>{o&&h(r,{term:o,fitAddon:u,searchAddon:S,connected:w,send:b})},[o,u,S,w,b,r,h]),k.useEffect(()=>{const X=d.current;if(!X)return;let q=0,G=0,K=!1,H=null;function W(ee){const le=ee[0],ue=ee[1],Z=le.clientX-ue.clientX,P=le.clientY-ue.clientY;return Math.sqrt(Z*Z+P*P)}function j(ee){ee.touches.length===2&&(K=!0,q=W(ee.touches),G=We.getState().fontSize)}function F(ee){if(!K||ee.touches.length!==2)return;ee.preventDefault(),ee.stopPropagation();const ue=W(ee.touches)/q,Z=Math.round(G*ue);H&&clearTimeout(H),H=setTimeout(()=>{We.getState().setFontSize(Z)},50)}function V(){K=!1}return X.addEventListener("touchstart",j,{passive:!0,capture:!0}),X.addEventListener("touchmove",F,{passive:!1,capture:!0}),X.addEventListener("touchend",V,{capture:!0}),X.addEventListener("touchcancel",V,{capture:!0}),()=>{X.removeEventListener("touchstart",j),X.removeEventListener("touchmove",F),X.removeEventListener("touchend",V),X.removeEventListener("touchcancel",V),H&&clearTimeout(H)}},[]);const{keyboardOpen:z}=lh();k.useEffect(()=>{z&&o&&o.scrollToBottom()},[z,o]),k.useEffect(()=>{if(!f)return;function X(q){var K;const G=(K=q.clipboardData)==null?void 0:K.items;if(G){for(const H of Array.from(G))if(H.type.startsWith("image/")){q.preventDefault(),q.stopPropagation();const W=H.getAsFile();if(!W)return;const j=Qe.loading("Uploading image... 0%");fg(W,H.type,F=>{Qe.loading(`Uploading image... ${F}%`,{id:j})}).then(F=>{const V=F.path;V&&l.current(V+" "),Qe.success("Image uploaded",{id:j})}).catch(()=>{Qe.error("Image upload failed",{id:j})});return}}}return document.addEventListener("paste",X,!0),()=>document.removeEventListener("paste",X,!0)},[f]);const I=k.useCallback(()=>{o&&(o.scrollToBottom(),n(!1))},[o]),U=k.useCallback(()=>{o==null||o.clear(),R()},[o,R]),Y=!w&&!M&&p.current;return O.jsxs("div",{ref:d,className:Ui.pane,"data-testid":"terminal-pane",...m??f?{"data-visible":"true"}:{},children:[O.jsx("div",{ref:c,className:Ui.terminalContainer}),A&&O.jsx("button",{className:Ui.scrollToBottom,onClick:I,"aria-label":"Scroll to bottom",children:"↓"}),Y&&O.jsx("div",{className:Ui.reconnectOverlay,children:O.jsxs("div",{className:Ui.reconnectContent,children:[O.jsx("span",{className:Ui.reconnectMessage,children:"Session disconnected"}),O.jsxs("div",{className:Ui.reconnectActions,children:[O.jsx("a",{href:"/",className:Ui.reconnectBtn,children:"Sessions"}),O.jsx("button",{className:Ui.reconnectBtn,onClick:U,children:"Reconnect"})]})]})}),M&&O.jsx("div",{className:Ui.exitOverlay,children:O.jsx("span",{className:Ui.exitMessage,children:"Session ended"})})]})}function zC(){for(var r=arguments.length,f=new Array(r),m=0;m<r;m++)f[m]=arguments[m];return k.useMemo(()=>x=>{f.forEach(M=>M(x))},f)}const il=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function an(r){const f=Object.prototype.toString.call(r);return f==="[object Window]"||f==="[object global]"}function uh(r){return"nodeType"in r}function di(r){var f,m;return r?an(r)?r:uh(r)&&(f=(m=r.ownerDocument)==null?void 0:m.defaultView)!=null?f:window:window}function hh(r){const{Document:f}=di(r);return r instanceof f}function fa(r){return an(r)?!1:r instanceof di(r).HTMLElement}function rp(r){return r instanceof di(r).SVGElement}function on(r){return r?an(r)?r.document:uh(r)?hh(r)?r:fa(r)||rp(r)?r.ownerDocument:document:document:document}const Qi=il?k.useLayoutEffect:k.useEffect;function dh(r){const f=k.useRef(r);return Qi(()=>{f.current=r}),k.useCallback(function(){for(var m=arguments.length,x=new Array(m),M=0;M<m;M++)x[M]=arguments[M];return f.current==null?void 0:f.current(...x)},[])}function IC(){const r=k.useRef(null),f=k.useCallback((x,M)=>{r.current=setInterval(x,M)},[]),m=k.useCallback(()=>{r.current!==null&&(clearInterval(r.current),r.current=null)},[]);return[f,m]}function ca(r,f){f===void 0&&(f=[r]);const m=k.useRef(r);return Qi(()=>{m.current!==r&&(m.current=r)},f),m}function _a(r,f){const m=k.useRef();return k.useMemo(()=>{const x=r(m.current);return m.current=x,x},[...f])}function Fo(r){const f=dh(r),m=k.useRef(null),x=k.useCallback(M=>{M!==m.current&&(f==null||f(M,m.current)),m.current=M},[]);return[m,x]}function Vu(r){const f=k.useRef();return k.useEffect(()=>{f.current=r},[r]),f.current}let ju={};function va(r,f){return k.useMemo(()=>{if(f)return f;const m=ju[r]==null?0:ju[r]+1;return ju[r]=m,r+"-"+m},[r,f])}function np(r){return function(f){for(var m=arguments.length,x=new Array(m>1?m-1:0),M=1;M<m;M++)x[M-1]=arguments[M];return x.reduce((B,A)=>{const n=Object.entries(A);for(const[h,d]of n){const p=B[h];p!=null&&(B[h]=p+r*d)}return B},{...f})}}const rn=np(1),qo=np(-1);function UC(r){return"clientX"in r&&"clientY"in r}function fh(r){if(!r)return!1;const{KeyboardEvent:f}=di(r.target);return f&&r instanceof f}function PC(r){if(!r)return!1;const{TouchEvent:f}=di(r.target);return f&&r instanceof f}function Ku(r){if(PC(r)){if(r.touches&&r.touches.length){const{clientX:f,clientY:m}=r.touches[0];return{x:f,y:m}}else if(r.changedTouches&&r.changedTouches.length){const{clientX:f,clientY:m}=r.changedTouches[0];return{x:f,y:m}}}return UC(r)?{x:r.clientX,y:r.clientY}:null}const ua=Object.freeze({Translate:{toString(r){if(!r)return;const{x:f,y:m}=r;return"translate3d("+(f?Math.round(f):0)+"px, "+(m?Math.round(m):0)+"px, 0)"}},Scale:{toString(r){if(!r)return;const{scaleX:f,scaleY:m}=r;return"scaleX("+f+") scaleY("+m+")"}},Transform:{toString(r){if(r)return[ua.Translate.toString(r),ua.Scale.toString(r)].join(" ")}},Transition:{toString(r){let{property:f,duration:m,easing:x}=r;return f+" "+m+"ms "+x}}}),Yv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function $C(r){return r.matches(Yv)?r:r.querySelector(Yv)}const WC={display:"none"};function FC(r){let{id:f,value:m}=r;return fe.createElement("div",{id:f,style:WC},m)}function qC(r){let{id:f,announcement:m,ariaLiveType:x="assertive"}=r;const M={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return fe.createElement("div",{id:f,style:M,role:"status","aria-live":x,"aria-atomic":!0},m)}function GC(){const[r,f]=k.useState("");return{announce:k.useCallback(x=>{x!=null&&f(x)},[]),announcement:r}}const ap=k.createContext(null);function YC(r){const f=k.useContext(ap);k.useEffect(()=>{if(!f)throw new Error("useDndMonitor must be used within a children of <DndContext>");return f(r)},[r,f])}function XC(){const[r]=k.useState(()=>new Set),f=k.useCallback(x=>(r.add(x),()=>r.delete(x)),[r]);return[k.useCallback(x=>{let{type:M,event:B}=x;r.forEach(A=>{var n;return(n=A[M])==null?void 0:n.call(A,B)})},[r]),f]}const VC={draggable:`
|
|
102
|
+
To pick up a draggable item, press the space bar.
|
|
103
|
+
While dragging, use the arrow keys to move the item.
|
|
104
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
105
|
+
`},KC={onDragStart(r){let{active:f}=r;return"Picked up draggable item "+f.id+"."},onDragOver(r){let{active:f,over:m}=r;return m?"Draggable item "+f.id+" was moved over droppable area "+m.id+".":"Draggable item "+f.id+" is no longer over a droppable area."},onDragEnd(r){let{active:f,over:m}=r;return m?"Draggable item "+f.id+" was dropped over droppable area "+m.id:"Draggable item "+f.id+" was dropped."},onDragCancel(r){let{active:f}=r;return"Dragging was cancelled. Draggable item "+f.id+" was dropped."}};function ZC(r){let{announcements:f=KC,container:m,hiddenTextDescribedById:x,screenReaderInstructions:M=VC}=r;const{announce:B,announcement:A}=GC(),n=va("DndLiveRegion"),[h,d]=k.useState(!1);if(k.useEffect(()=>{d(!0)},[]),YC(k.useMemo(()=>({onDragStart(l){let{active:g}=l;B(f.onDragStart({active:g}))},onDragMove(l){let{active:g,over:C}=l;f.onDragMove&&B(f.onDragMove({active:g,over:C}))},onDragOver(l){let{active:g,over:C}=l;B(f.onDragOver({active:g,over:C}))},onDragEnd(l){let{active:g,over:C}=l;B(f.onDragEnd({active:g,over:C}))},onDragCancel(l){let{active:g,over:C}=l;B(f.onDragCancel({active:g,over:C}))}}),[B,f])),!h)return null;const p=fe.createElement(fe.Fragment,null,fe.createElement(FC,{id:x,value:M.draggable}),fe.createElement(qC,{id:n,announcement:A}));return m?hr.createPortal(p,m):p}var It;(function(r){r.DragStart="dragStart",r.DragMove="dragMove",r.DragEnd="dragEnd",r.DragCancel="dragCancel",r.DragOver="dragOver",r.RegisterDroppable="registerDroppable",r.SetDroppableDisabled="setDroppableDisabled",r.UnregisterDroppable="unregisterDroppable"})(It||(It={}));function Go(){}function Xv(r,f){return k.useMemo(()=>({sensor:r,options:f??{}}),[r,f])}function QC(){for(var r=arguments.length,f=new Array(r),m=0;m<r;m++)f[m]=arguments[m];return k.useMemo(()=>[...f].filter(x=>x!=null),[...f])}const $i=Object.freeze({x:0,y:0});function JC(r,f){return Math.sqrt(Math.pow(r.x-f.x,2)+Math.pow(r.y-f.y,2))}function ew(r,f){let{data:{value:m}}=r,{data:{value:x}}=f;return m-x}function tw(r,f){let{data:{value:m}}=r,{data:{value:x}}=f;return x-m}function iw(r,f){if(!r||r.length===0)return null;const[m]=r;return m[f]}function Vv(r,f,m){return f===void 0&&(f=r.left),m===void 0&&(m=r.top),{x:f+r.width*.5,y:m+r.height*.5}}const sw=r=>{let{collisionRect:f,droppableRects:m,droppableContainers:x}=r;const M=Vv(f,f.left,f.top),B=[];for(const A of x){const{id:n}=A,h=m.get(n);if(h){const d=JC(Vv(h),M);B.push({id:n,data:{droppableContainer:A,value:d}})}}return B.sort(ew)};function rw(r,f){const m=Math.max(f.top,r.top),x=Math.max(f.left,r.left),M=Math.min(f.left+f.width,r.left+r.width),B=Math.min(f.top+f.height,r.top+r.height),A=M-x,n=B-m;if(x<M&&m<B){const h=f.width*f.height,d=r.width*r.height,p=A*n,l=p/(h+d-p);return Number(l.toFixed(4))}return 0}const nw=r=>{let{collisionRect:f,droppableRects:m,droppableContainers:x}=r;const M=[];for(const B of x){const{id:A}=B,n=m.get(A);if(n){const h=rw(n,f);h>0&&M.push({id:A,data:{droppableContainer:B,value:h}})}}return M.sort(tw)};function aw(r,f,m){return{...r,scaleX:f&&m?f.width/m.width:1,scaleY:f&&m?f.height/m.height:1}}function op(r,f){return r&&f?{x:r.left-f.left,y:r.top-f.top}:$i}function ow(r){return function(m){for(var x=arguments.length,M=new Array(x>1?x-1:0),B=1;B<x;B++)M[B-1]=arguments[B];return M.reduce((A,n)=>({...A,top:A.top+r*n.y,bottom:A.bottom+r*n.y,left:A.left+r*n.x,right:A.right+r*n.x}),{...m})}}const lw=ow(1);function cw(r){if(r.startsWith("matrix3d(")){const f=r.slice(9,-1).split(/, /);return{x:+f[12],y:+f[13],scaleX:+f[0],scaleY:+f[5]}}else if(r.startsWith("matrix(")){const f=r.slice(7,-1).split(/, /);return{x:+f[4],y:+f[5],scaleX:+f[0],scaleY:+f[3]}}return null}function uw(r,f,m){const x=cw(f);if(!x)return r;const{scaleX:M,scaleY:B,x:A,y:n}=x,h=r.left-A-(1-M)*parseFloat(m),d=r.top-n-(1-B)*parseFloat(m.slice(m.indexOf(" ")+1)),p=M?r.width/M:r.width,l=B?r.height/B:r.height;return{width:p,height:l,top:d,right:h+p,bottom:d+l,left:h}}const hw={ignoreTransform:!1};function ln(r,f){f===void 0&&(f=hw);let m=r.getBoundingClientRect();if(f.ignoreTransform){const{transform:d,transformOrigin:p}=di(r).getComputedStyle(r);d&&(m=uw(m,d,p))}const{top:x,left:M,width:B,height:A,bottom:n,right:h}=m;return{top:x,left:M,width:B,height:A,bottom:n,right:h}}function Kv(r){return ln(r,{ignoreTransform:!0})}function dw(r){const f=r.innerWidth,m=r.innerHeight;return{top:0,left:0,right:f,bottom:m,width:f,height:m}}function fw(r,f){return f===void 0&&(f=di(r).getComputedStyle(r)),f.position==="fixed"}function _w(r,f){f===void 0&&(f=di(r).getComputedStyle(r));const m=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(M=>{const B=f[M];return typeof B=="string"?m.test(B):!1})}function _h(r,f){const m=[];function x(M){if(f!=null&&m.length>=f||!M)return m;if(hh(M)&&M.scrollingElement!=null&&!m.includes(M.scrollingElement))return m.push(M.scrollingElement),m;if(!fa(M)||rp(M)||m.includes(M))return m;const B=di(r).getComputedStyle(M);return M!==r&&_w(M,B)&&m.push(M),fw(M,B)?m:x(M.parentNode)}return r?x(r):m}function lp(r){const[f]=_h(r,1);return f??null}function zu(r){return!il||!r?null:an(r)?r:uh(r)?hh(r)||r===on(r).scrollingElement?window:fa(r)?r:null:null}function cp(r){return an(r)?r.scrollX:r.scrollLeft}function up(r){return an(r)?r.scrollY:r.scrollTop}function Zu(r){return{x:cp(r),y:up(r)}}var Wt;(function(r){r[r.Forward=1]="Forward",r[r.Backward=-1]="Backward"})(Wt||(Wt={}));function hp(r){return!il||!r?!1:r===document.scrollingElement}function dp(r){const f={x:0,y:0},m=hp(r)?{height:window.innerHeight,width:window.innerWidth}:{height:r.clientHeight,width:r.clientWidth},x={x:r.scrollWidth-m.width,y:r.scrollHeight-m.height},M=r.scrollTop<=f.y,B=r.scrollLeft<=f.x,A=r.scrollTop>=x.y,n=r.scrollLeft>=x.x;return{isTop:M,isLeft:B,isBottom:A,isRight:n,maxScroll:x,minScroll:f}}const vw={x:.2,y:.2};function gw(r,f,m,x,M){let{top:B,left:A,right:n,bottom:h}=m;x===void 0&&(x=10),M===void 0&&(M=vw);const{isTop:d,isBottom:p,isLeft:l,isRight:g}=dp(r),C={x:0,y:0},L={x:0,y:0},_={height:f.height*M.y,width:f.width*M.x};return!d&&B<=f.top+_.height?(C.y=Wt.Backward,L.y=x*Math.abs((f.top+_.height-B)/_.height)):!p&&h>=f.bottom-_.height&&(C.y=Wt.Forward,L.y=x*Math.abs((f.bottom-_.height-h)/_.height)),!g&&n>=f.right-_.width?(C.x=Wt.Forward,L.x=x*Math.abs((f.right-_.width-n)/_.width)):!l&&A<=f.left+_.width&&(C.x=Wt.Backward,L.x=x*Math.abs((f.left+_.width-A)/_.width)),{direction:C,speed:L}}function pw(r){if(r===document.scrollingElement){const{innerWidth:B,innerHeight:A}=window;return{top:0,left:0,right:B,bottom:A,width:B,height:A}}const{top:f,left:m,right:x,bottom:M}=r.getBoundingClientRect();return{top:f,left:m,right:x,bottom:M,width:r.clientWidth,height:r.clientHeight}}function fp(r){return r.reduce((f,m)=>rn(f,Zu(m)),$i)}function mw(r){return r.reduce((f,m)=>f+cp(m),0)}function bw(r){return r.reduce((f,m)=>f+up(m),0)}function Sw(r,f){if(f===void 0&&(f=ln),!r)return;const{top:m,left:x,bottom:M,right:B}=f(r);lp(r)&&(M<=0||B<=0||m>=window.innerHeight||x>=window.innerWidth)&&r.scrollIntoView({block:"center",inline:"center"})}const yw=[["x",["left","right"],mw],["y",["top","bottom"],bw]];class vh{constructor(f,m){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const x=_h(m),M=fp(x);this.rect={...f},this.width=f.width,this.height=f.height;for(const[B,A,n]of yw)for(const h of A)Object.defineProperty(this,h,{get:()=>{const d=n(x),p=M[B]-d;return this.rect[h]+p},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class sa{constructor(f){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(m=>{var x;return(x=this.target)==null?void 0:x.removeEventListener(...m)})},this.target=f}add(f,m,x){var M;(M=this.target)==null||M.addEventListener(f,m,x),this.listeners.push([f,m,x])}}function Cw(r){const{EventTarget:f}=di(r);return r instanceof f?r:on(r)}function Iu(r,f){const m=Math.abs(r.x),x=Math.abs(r.y);return typeof f=="number"?Math.sqrt(m**2+x**2)>f:"x"in f&&"y"in f?m>f.x&&x>f.y:"x"in f?m>f.x:"y"in f?x>f.y:!1}var ki;(function(r){r.Click="click",r.DragStart="dragstart",r.Keydown="keydown",r.ContextMenu="contextmenu",r.Resize="resize",r.SelectionChange="selectionchange",r.VisibilityChange="visibilitychange"})(ki||(ki={}));function Zv(r){r.preventDefault()}function ww(r){r.stopPropagation()}var Ze;(function(r){r.Space="Space",r.Down="ArrowDown",r.Right="ArrowRight",r.Left="ArrowLeft",r.Up="ArrowUp",r.Esc="Escape",r.Enter="Enter",r.Tab="Tab"})(Ze||(Ze={}));const _p={start:[Ze.Space,Ze.Enter],cancel:[Ze.Esc],end:[Ze.Space,Ze.Enter,Ze.Tab]},xw=(r,f)=>{let{currentCoordinates:m}=f;switch(r.code){case Ze.Right:return{...m,x:m.x+25};case Ze.Left:return{...m,x:m.x-25};case Ze.Down:return{...m,y:m.y+25};case Ze.Up:return{...m,y:m.y-25}}};class vp{constructor(f){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=f;const{event:{target:m}}=f;this.props=f,this.listeners=new sa(on(m)),this.windowListeners=new sa(di(m)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ki.Resize,this.handleCancel),this.windowListeners.add(ki.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ki.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:f,onStart:m}=this.props,x=f.node.current;x&&Sw(x),m($i)}handleKeyDown(f){if(fh(f)){const{active:m,context:x,options:M}=this.props,{keyboardCodes:B=_p,coordinateGetter:A=xw,scrollBehavior:n="smooth"}=M,{code:h}=f;if(B.end.includes(h)){this.handleEnd(f);return}if(B.cancel.includes(h)){this.handleCancel(f);return}const{collisionRect:d}=x.current,p=d?{x:d.left,y:d.top}:$i;this.referenceCoordinates||(this.referenceCoordinates=p);const l=A(f,{active:m,context:x.current,currentCoordinates:p});if(l){const g=qo(l,p),C={x:0,y:0},{scrollableAncestors:L}=x.current;for(const _ of L){const a=f.code,{isTop:c,isRight:o,isLeft:u,isBottom:S,maxScroll:D,minScroll:b}=dp(_),E=pw(_),w={x:Math.min(a===Ze.Right?E.right-E.width/2:E.right,Math.max(a===Ze.Right?E.left:E.left+E.width/2,l.x)),y:Math.min(a===Ze.Down?E.bottom-E.height/2:E.bottom,Math.max(a===Ze.Down?E.top:E.top+E.height/2,l.y))},R=a===Ze.Right&&!o||a===Ze.Left&&!u,N=a===Ze.Down&&!S||a===Ze.Up&&!c;if(R&&w.x!==l.x){const z=_.scrollLeft+g.x,I=a===Ze.Right&&z<=D.x||a===Ze.Left&&z>=b.x;if(I&&!g.y){_.scrollTo({left:z,behavior:n});return}I?C.x=_.scrollLeft-z:C.x=a===Ze.Right?_.scrollLeft-D.x:_.scrollLeft-b.x,C.x&&_.scrollBy({left:-C.x,behavior:n});break}else if(N&&w.y!==l.y){const z=_.scrollTop+g.y,I=a===Ze.Down&&z<=D.y||a===Ze.Up&&z>=b.y;if(I&&!g.x){_.scrollTo({top:z,behavior:n});return}I?C.y=_.scrollTop-z:C.y=a===Ze.Down?_.scrollTop-D.y:_.scrollTop-b.y,C.y&&_.scrollBy({top:-C.y,behavior:n});break}}this.handleMove(f,rn(qo(l,this.referenceCoordinates),C))}}}handleMove(f,m){const{onMove:x}=this.props;f.preventDefault(),x(m)}handleEnd(f){const{onEnd:m}=this.props;f.preventDefault(),this.detach(),m()}handleCancel(f){const{onCancel:m}=this.props;f.preventDefault(),this.detach(),m()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}vp.activators=[{eventName:"onKeyDown",handler:(r,f,m)=>{let{keyboardCodes:x=_p,onActivation:M}=f,{active:B}=m;const{code:A}=r.nativeEvent;if(x.start.includes(A)){const n=B.activatorNode.current;return n&&r.target!==n?!1:(r.preventDefault(),M==null||M({event:r.nativeEvent}),!0)}return!1}}];function Qv(r){return!!(r&&"distance"in r)}function Jv(r){return!!(r&&"delay"in r)}class gh{constructor(f,m,x){var M;x===void 0&&(x=Cw(f.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=f,this.events=m;const{event:B}=f,{target:A}=B;this.props=f,this.events=m,this.document=on(A),this.documentListeners=new sa(this.document),this.listeners=new sa(x),this.windowListeners=new sa(di(A)),this.initialCoordinates=(M=Ku(B))!=null?M:$i,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:f,props:{options:{activationConstraint:m,bypassActivationConstraint:x}}}=this;if(this.listeners.add(f.move.name,this.handleMove,{passive:!1}),this.listeners.add(f.end.name,this.handleEnd),f.cancel&&this.listeners.add(f.cancel.name,this.handleCancel),this.windowListeners.add(ki.Resize,this.handleCancel),this.windowListeners.add(ki.DragStart,Zv),this.windowListeners.add(ki.VisibilityChange,this.handleCancel),this.windowListeners.add(ki.ContextMenu,Zv),this.documentListeners.add(ki.Keydown,this.handleKeydown),m){if(x!=null&&x({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Jv(m)){this.timeoutId=setTimeout(this.handleStart,m.delay),this.handlePending(m);return}if(Qv(m)){this.handlePending(m);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(f,m){const{active:x,onPending:M}=this.props;M(x,f,this.initialCoordinates,m)}handleStart(){const{initialCoordinates:f}=this,{onStart:m}=this.props;f&&(this.activated=!0,this.documentListeners.add(ki.Click,ww,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ki.SelectionChange,this.removeTextSelection),m(f))}handleMove(f){var m;const{activated:x,initialCoordinates:M,props:B}=this,{onMove:A,options:{activationConstraint:n}}=B;if(!M)return;const h=(m=Ku(f))!=null?m:$i,d=qo(M,h);if(!x&&n){if(Qv(n)){if(n.tolerance!=null&&Iu(d,n.tolerance))return this.handleCancel();if(Iu(d,n.distance))return this.handleStart()}if(Jv(n)&&Iu(d,n.tolerance))return this.handleCancel();this.handlePending(n,d);return}f.cancelable&&f.preventDefault(),A(h)}handleEnd(){const{onAbort:f,onEnd:m}=this.props;this.detach(),this.activated||f(this.props.active),m()}handleCancel(){const{onAbort:f,onCancel:m}=this.props;this.detach(),this.activated||f(this.props.active),m()}handleKeydown(f){f.code===Ze.Esc&&this.handleCancel()}removeTextSelection(){var f;(f=this.document.getSelection())==null||f.removeAllRanges()}}const Ew={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ph extends gh{constructor(f){const{event:m}=f,x=on(m.target);super(f,Ew,x)}}ph.activators=[{eventName:"onPointerDown",handler:(r,f)=>{let{nativeEvent:m}=r,{onActivation:x}=f;return!m.isPrimary||m.button!==0?!1:(x==null||x({event:m}),!0)}}];const Dw={move:{name:"mousemove"},end:{name:"mouseup"}};var Qu;(function(r){r[r.RightClick=2]="RightClick"})(Qu||(Qu={}));class Lw extends gh{constructor(f){super(f,Dw,on(f.event.target))}}Lw.activators=[{eventName:"onMouseDown",handler:(r,f)=>{let{nativeEvent:m}=r,{onActivation:x}=f;return m.button===Qu.RightClick?!1:(x==null||x({event:m}),!0)}}];const Uu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class gp extends gh{constructor(f){super(f,Uu)}static setup(){return window.addEventListener(Uu.move.name,f,{capture:!1,passive:!1}),function(){window.removeEventListener(Uu.move.name,f)};function f(){}}}gp.activators=[{eventName:"onTouchStart",handler:(r,f)=>{let{nativeEvent:m}=r,{onActivation:x}=f;const{touches:M}=m;return M.length>1?!1:(x==null||x({event:m}),!0)}}];var ra;(function(r){r[r.Pointer=0]="Pointer",r[r.DraggableRect=1]="DraggableRect"})(ra||(ra={}));var Yo;(function(r){r[r.TreeOrder=0]="TreeOrder",r[r.ReversedTreeOrder=1]="ReversedTreeOrder"})(Yo||(Yo={}));function Rw(r){let{acceleration:f,activator:m=ra.Pointer,canScroll:x,draggingRect:M,enabled:B,interval:A=5,order:n=Yo.TreeOrder,pointerCoordinates:h,scrollableAncestors:d,scrollableAncestorRects:p,delta:l,threshold:g}=r;const C=Aw({delta:l,disabled:!B}),[L,_]=IC(),a=k.useRef({x:0,y:0}),c=k.useRef({x:0,y:0}),o=k.useMemo(()=>{switch(m){case ra.Pointer:return h?{top:h.y,bottom:h.y,left:h.x,right:h.x}:null;case ra.DraggableRect:return M}},[m,M,h]),u=k.useRef(null),S=k.useCallback(()=>{const b=u.current;if(!b)return;const E=a.current.x*c.current.x,w=a.current.y*c.current.y;b.scrollBy(E,w)},[]),D=k.useMemo(()=>n===Yo.TreeOrder?[...d].reverse():d,[n,d]);k.useEffect(()=>{if(!B||!d.length||!o){_();return}for(const b of D){if((x==null?void 0:x(b))===!1)continue;const E=d.indexOf(b),w=p[E];if(!w)continue;const{direction:R,speed:N}=gw(b,w,o,f,g);for(const z of["x","y"])C[z][R[z]]||(N[z]=0,R[z]=0);if(N.x>0||N.y>0){_(),u.current=b,L(S,A),a.current=N,c.current=R;return}}a.current={x:0,y:0},c.current={x:0,y:0},_()},[f,S,x,_,B,A,JSON.stringify(o),JSON.stringify(C),L,d,D,p,JSON.stringify(g)])}const Mw={x:{[Wt.Backward]:!1,[Wt.Forward]:!1},y:{[Wt.Backward]:!1,[Wt.Forward]:!1}};function Aw(r){let{delta:f,disabled:m}=r;const x=Vu(f);return _a(M=>{if(m||!x||!M)return Mw;const B={x:Math.sign(f.x-x.x),y:Math.sign(f.y-x.y)};return{x:{[Wt.Backward]:M.x[Wt.Backward]||B.x===-1,[Wt.Forward]:M.x[Wt.Forward]||B.x===1},y:{[Wt.Backward]:M.y[Wt.Backward]||B.y===-1,[Wt.Forward]:M.y[Wt.Forward]||B.y===1}}},[m,f,x])}function Tw(r,f){const m=f!=null?r.get(f):void 0,x=m?m.node.current:null;return _a(M=>{var B;return f==null?null:(B=x??M)!=null?B:null},[x,f])}function Bw(r,f){return k.useMemo(()=>r.reduce((m,x)=>{const{sensor:M}=x,B=M.activators.map(A=>({eventName:A.eventName,handler:f(A.handler,x)}));return[...m,...B]},[]),[r,f])}var ha;(function(r){r[r.Always=0]="Always",r[r.BeforeDragging=1]="BeforeDragging",r[r.WhileDragging=2]="WhileDragging"})(ha||(ha={}));var Ju;(function(r){r.Optimized="optimized"})(Ju||(Ju={}));const eg=new Map;function Ow(r,f){let{dragging:m,dependencies:x,config:M}=f;const[B,A]=k.useState(null),{frequency:n,measure:h,strategy:d}=M,p=k.useRef(r),l=a(),g=ca(l),C=k.useCallback(function(c){c===void 0&&(c=[]),!g.current&&A(o=>o===null?c:o.concat(c.filter(u=>!o.includes(u))))},[g]),L=k.useRef(null),_=_a(c=>{if(l&&!m)return eg;if(!c||c===eg||p.current!==r||B!=null){const o=new Map;for(let u of r){if(!u)continue;if(B&&B.length>0&&!B.includes(u.id)&&u.rect.current){o.set(u.id,u.rect.current);continue}const S=u.node.current,D=S?new vh(h(S),S):null;u.rect.current=D,D&&o.set(u.id,D)}return o}return c},[r,B,m,l,h]);return k.useEffect(()=>{p.current=r},[r]),k.useEffect(()=>{l||C()},[m,l]),k.useEffect(()=>{B&&B.length>0&&A(null)},[JSON.stringify(B)]),k.useEffect(()=>{l||typeof n!="number"||L.current!==null||(L.current=setTimeout(()=>{C(),L.current=null},n))},[n,l,C,...x]),{droppableRects:_,measureDroppableContainers:C,measuringScheduled:B!=null};function a(){switch(d){case ha.Always:return!1;case ha.BeforeDragging:return m;default:return!m}}}function pp(r,f){return _a(m=>r?m||(typeof f=="function"?f(r):r):null,[f,r])}function kw(r,f){return pp(r,f)}function Nw(r){let{callback:f,disabled:m}=r;const x=dh(f),M=k.useMemo(()=>{if(m||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:B}=window;return new B(x)},[x,m]);return k.useEffect(()=>()=>M==null?void 0:M.disconnect(),[M]),M}function sl(r){let{callback:f,disabled:m}=r;const x=dh(f),M=k.useMemo(()=>{if(m||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:B}=window;return new B(x)},[m]);return k.useEffect(()=>()=>M==null?void 0:M.disconnect(),[M]),M}function Hw(r){return new vh(ln(r),r)}function tg(r,f,m){f===void 0&&(f=Hw);const[x,M]=k.useState(null);function B(){M(h=>{if(!r)return null;if(r.isConnected===!1){var d;return(d=h??m)!=null?d:null}const p=f(r);return JSON.stringify(h)===JSON.stringify(p)?h:p})}const A=Nw({callback(h){if(r)for(const d of h){const{type:p,target:l}=d;if(p==="childList"&&l instanceof HTMLElement&&l.contains(r)){B();break}}}}),n=sl({callback:B});return Qi(()=>{B(),r?(n==null||n.observe(r),A==null||A.observe(document.body,{childList:!0,subtree:!0})):(n==null||n.disconnect(),A==null||A.disconnect())},[r]),x}function jw(r){const f=pp(r);return op(r,f)}const ig=[];function zw(r){const f=k.useRef(r),m=_a(x=>r?x&&x!==ig&&r&&f.current&&r.parentNode===f.current.parentNode?x:_h(r):ig,[r]);return k.useEffect(()=>{f.current=r},[r]),m}function Iw(r){const[f,m]=k.useState(null),x=k.useRef(r),M=k.useCallback(B=>{const A=zu(B.target);A&&m(n=>n?(n.set(A,Zu(A)),new Map(n)):null)},[]);return k.useEffect(()=>{const B=x.current;if(r!==B){A(B);const n=r.map(h=>{const d=zu(h);return d?(d.addEventListener("scroll",M,{passive:!0}),[d,Zu(d)]):null}).filter(h=>h!=null);m(n.length?new Map(n):null),x.current=r}return()=>{A(r),A(B)};function A(n){n.forEach(h=>{const d=zu(h);d==null||d.removeEventListener("scroll",M)})}},[M,r]),k.useMemo(()=>r.length?f?Array.from(f.values()).reduce((B,A)=>rn(B,A),$i):fp(r):$i,[r,f])}function sg(r,f){f===void 0&&(f=[]);const m=k.useRef(null);return k.useEffect(()=>{m.current=null},f),k.useEffect(()=>{const x=r!==$i;x&&!m.current&&(m.current=r),!x&&m.current&&(m.current=null)},[r]),m.current?qo(r,m.current):$i}function Uw(r){k.useEffect(()=>{if(!il)return;const f=r.map(m=>{let{sensor:x}=m;return x.setup==null?void 0:x.setup()});return()=>{for(const m of f)m==null||m()}},r.map(f=>{let{sensor:m}=f;return m}))}function Pw(r,f){return k.useMemo(()=>r.reduce((m,x)=>{let{eventName:M,handler:B}=x;return m[M]=A=>{B(A,f)},m},{}),[r,f])}function mp(r){return k.useMemo(()=>r?dw(r):null,[r])}const rg=[];function $w(r,f){f===void 0&&(f=ln);const[m]=r,x=mp(m?di(m):null),[M,B]=k.useState(rg);function A(){B(()=>r.length?r.map(h=>hp(h)?x:new vh(f(h),h)):rg)}const n=sl({callback:A});return Qi(()=>{n==null||n.disconnect(),A(),r.forEach(h=>n==null?void 0:n.observe(h))},[r]),M}function Ww(r){if(!r)return null;if(r.children.length>1)return r;const f=r.children[0];return fa(f)?f:r}function Fw(r){let{measure:f}=r;const[m,x]=k.useState(null),M=k.useCallback(d=>{for(const{target:p}of d)if(fa(p)){x(l=>{const g=f(p);return l?{...l,width:g.width,height:g.height}:g});break}},[f]),B=sl({callback:M}),A=k.useCallback(d=>{const p=Ww(d);B==null||B.disconnect(),p&&(B==null||B.observe(p)),x(p?f(p):null)},[f,B]),[n,h]=Fo(A);return k.useMemo(()=>({nodeRef:n,rect:m,setRef:h}),[m,n,h])}const qw=[{sensor:ph,options:{}},{sensor:vp,options:{}}],Gw={current:{}},$o={draggable:{measure:Kv},droppable:{measure:Kv,strategy:ha.WhileDragging,frequency:Ju.Optimized},dragOverlay:{measure:ln}};class na extends Map{get(f){var m;return f!=null&&(m=super.get(f))!=null?m:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(f=>{let{disabled:m}=f;return!m})}getNodeFor(f){var m,x;return(m=(x=this.get(f))==null?void 0:x.node.current)!=null?m:void 0}}const Yw={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new na,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Go},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:$o,measureDroppableContainers:Go,windowRect:null,measuringScheduled:!1},Xw={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Go,draggableNodes:new Map,over:null,measureDroppableContainers:Go},rl=k.createContext(Xw),bp=k.createContext(Yw);function Vw(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new na}}}function Kw(r,f){switch(f.type){case It.DragStart:return{...r,draggable:{...r.draggable,initialCoordinates:f.initialCoordinates,active:f.active}};case It.DragMove:return r.draggable.active==null?r:{...r,draggable:{...r.draggable,translate:{x:f.coordinates.x-r.draggable.initialCoordinates.x,y:f.coordinates.y-r.draggable.initialCoordinates.y}}};case It.DragEnd:case It.DragCancel:return{...r,draggable:{...r.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case It.RegisterDroppable:{const{element:m}=f,{id:x}=m,M=new na(r.droppable.containers);return M.set(x,m),{...r,droppable:{...r.droppable,containers:M}}}case It.SetDroppableDisabled:{const{id:m,key:x,disabled:M}=f,B=r.droppable.containers.get(m);if(!B||x!==B.key)return r;const A=new na(r.droppable.containers);return A.set(m,{...B,disabled:M}),{...r,droppable:{...r.droppable,containers:A}}}case It.UnregisterDroppable:{const{id:m,key:x}=f,M=r.droppable.containers.get(m);if(!M||x!==M.key)return r;const B=new na(r.droppable.containers);return B.delete(m),{...r,droppable:{...r.droppable,containers:B}}}default:return r}}function Zw(r){let{disabled:f}=r;const{active:m,activatorEvent:x,draggableNodes:M}=k.useContext(rl),B=Vu(x),A=Vu(m==null?void 0:m.id);return k.useEffect(()=>{if(!f&&!x&&B&&A!=null){if(!fh(B)||document.activeElement===B.target)return;const n=M.get(A);if(!n)return;const{activatorNode:h,node:d}=n;if(!h.current&&!d.current)return;requestAnimationFrame(()=>{for(const p of[h.current,d.current]){if(!p)continue;const l=$C(p);if(l){l.focus();break}}})}},[x,f,M,A,B]),null}function Qw(r,f){let{transform:m,...x}=f;return r!=null&&r.length?r.reduce((M,B)=>B({transform:M,...x}),m):m}function Jw(r){return k.useMemo(()=>({draggable:{...$o.draggable,...r==null?void 0:r.draggable},droppable:{...$o.droppable,...r==null?void 0:r.droppable},dragOverlay:{...$o.dragOverlay,...r==null?void 0:r.dragOverlay}}),[r==null?void 0:r.draggable,r==null?void 0:r.droppable,r==null?void 0:r.dragOverlay])}function e5(r){let{activeNode:f,measure:m,initialRect:x,config:M=!0}=r;const B=k.useRef(!1),{x:A,y:n}=typeof M=="boolean"?{x:M,y:M}:M;Qi(()=>{if(!A&&!n||!f){B.current=!1;return}if(B.current||!x)return;const d=f==null?void 0:f.node.current;if(!d||d.isConnected===!1)return;const p=m(d),l=op(p,x);if(A||(l.x=0),n||(l.y=0),B.current=!0,Math.abs(l.x)>0||Math.abs(l.y)>0){const g=lp(d);g&&g.scrollBy({top:l.y,left:l.x})}},[f,A,n,x,m])}const Sp=k.createContext({...$i,scaleX:1,scaleY:1});var Gs;(function(r){r[r.Uninitialized=0]="Uninitialized",r[r.Initializing=1]="Initializing",r[r.Initialized=2]="Initialized"})(Gs||(Gs={}));const t5=k.memo(function(f){var m,x,M,B;let{id:A,accessibility:n,autoScroll:h=!0,children:d,sensors:p=qw,collisionDetection:l=nw,measuring:g,modifiers:C,...L}=f;const _=k.useReducer(Kw,void 0,Vw),[a,c]=_,[o,u]=XC(),[S,D]=k.useState(Gs.Uninitialized),b=S===Gs.Initialized,{draggable:{active:E,nodes:w,translate:R},droppable:{containers:N}}=a,z=E!=null?w.get(E):null,I=k.useRef({initial:null,translated:null}),U=k.useMemo(()=>{var ut;return E!=null?{id:E,data:(ut=z==null?void 0:z.data)!=null?ut:Gw,rect:I}:null},[E,z]),Y=k.useRef(null),[X,q]=k.useState(null),[G,K]=k.useState(null),H=ca(L,Object.values(L)),W=va("DndDescribedBy",A),j=k.useMemo(()=>N.getEnabled(),[N]),F=Jw(g),{droppableRects:V,measureDroppableContainers:ee,measuringScheduled:le}=Ow(j,{dragging:b,dependencies:[R.x,R.y],config:F.droppable}),ue=Tw(w,E),Z=k.useMemo(()=>G?Ku(G):null,[G]),P=Hi(),ae=kw(ue,F.draggable.measure);e5({activeNode:E!=null?w.get(E):null,config:P.layoutShiftCompensation,initialRect:ae,measure:F.draggable.measure});const ie=tg(ue,F.draggable.measure,ae),ve=tg(ue?ue.parentElement:null),_e=k.useRef({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:V,draggableNodes:w,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ee=N.getNodeFor((m=_e.current.over)==null?void 0:m.id),pe=Fw({measure:F.dragOverlay.measure}),ke=(x=pe.nodeRef.current)!=null?x:ue,$e=b?(M=pe.rect)!=null?M:ie:null,be=!!(pe.nodeRef.current&&pe.rect),Ht=jw(be?null:ie),pt=mp(ke?di(ke):null),Re=zw(b?Ee??ue:null),Me=$w(Re),Ce=Qw(C,{transform:{x:R.x-Ht.x,y:R.y-Ht.y,scaleX:1,scaleY:1},activatorEvent:G,active:U,activeNodeRect:ie,containerNodeRect:ve,draggingNodeRect:$e,over:_e.current.over,overlayNodeRect:pe.rect,scrollableAncestors:Re,scrollableAncestorRects:Me,windowRect:pt}),ge=Z?rn(Z,R):null,xe=Iw(Re),nt=sg(xe),Ue=sg(xe,[ie]),Dt=rn(Ce,nt),tt=$e?lw($e,Ce):null,mt=U&&tt?l({active:U,collisionRect:tt,droppableRects:V,droppableContainers:j,pointerCoordinates:ge}):null,Fe=iw(mt,"id"),[Ne,Le]=k.useState(null),ei=be?Ce:rn(Ce,Ue),Ct=aw(ei,(B=Ne==null?void 0:Ne.rect)!=null?B:null,ie),At=k.useRef(null),wt=k.useCallback((ut,dt)=>{let{sensor:ye,options:qe}=dt;if(Y.current==null)return;const Ve=w.get(Y.current);if(!Ve)return;const Je=ut.nativeEvent,jt=new ye({active:Y.current,activeNode:Ve,event:Je,options:qe,context:_e,onAbort(Ge){if(!w.get(Ge))return;const{onDragAbort:_t}=H.current,bt={id:Ge};_t==null||_t(bt),o({type:"onDragAbort",event:bt})},onPending(Ge,Zt,_t,bt){if(!w.get(Ge))return;const{onDragPending:Ft}=H.current,Ci={id:Ge,constraint:Zt,initialCoordinates:_t,offset:bt};Ft==null||Ft(Ci),o({type:"onDragPending",event:Ci})},onStart(Ge){const Zt=Y.current;if(Zt==null)return;const _t=w.get(Zt);if(!_t)return;const{onDragStart:bt}=H.current,yi={activatorEvent:Je,active:{id:Zt,data:_t.data,rect:I}};hr.unstable_batchedUpdates(()=>{bt==null||bt(yi),D(Gs.Initializing),c({type:It.DragStart,initialCoordinates:Ge,active:Zt}),o({type:"onDragStart",event:yi}),q(At.current),K(Je)})},onMove(Ge){c({type:It.DragMove,coordinates:Ge})},onEnd:et(It.DragEnd),onCancel:et(It.DragCancel)});At.current=jt;function et(Ge){return async function(){const{active:_t,collisions:bt,over:yi,scrollAdjustedTranslate:Ft}=_e.current;let Ci=null;if(_t&&Ft){const{cancelDrop:bs}=H.current;Ci={activatorEvent:Je,active:_t,collisions:bt,delta:Ft,over:yi},Ge===It.DragEnd&&typeof bs=="function"&&await Promise.resolve(bs(Ci))&&(Ge=It.DragCancel)}Y.current=null,hr.unstable_batchedUpdates(()=>{c({type:Ge}),D(Gs.Uninitialized),Le(null),q(null),K(null),At.current=null;const bs=Ge===It.DragEnd?"onDragEnd":"onDragCancel";if(Ci){const wi=H.current[bs];wi==null||wi(Ci),o({type:bs,event:Ci})}})}}},[w]),Fi=k.useCallback((ut,dt)=>(ye,qe)=>{const Ve=ye.nativeEvent,Je=w.get(qe);if(Y.current!==null||!Je||Ve.dndKit||Ve.defaultPrevented)return;const jt={active:Je};ut(ye,dt.options,jt)===!0&&(Ve.dndKit={capturedBy:dt.sensor},Y.current=qe,wt(ye,dt))},[w,wt]),qi=Bw(p,Fi);Uw(p),Qi(()=>{ie&&S===Gs.Initializing&&D(Gs.Initialized)},[ie,S]),k.useEffect(()=>{const{onDragMove:ut}=H.current,{active:dt,activatorEvent:ye,collisions:qe,over:Ve}=_e.current;if(!dt||!ye)return;const Je={active:dt,activatorEvent:ye,collisions:qe,delta:{x:Dt.x,y:Dt.y},over:Ve};hr.unstable_batchedUpdates(()=>{ut==null||ut(Je),o({type:"onDragMove",event:Je})})},[Dt.x,Dt.y]),k.useEffect(()=>{const{active:ut,activatorEvent:dt,collisions:ye,droppableContainers:qe,scrollAdjustedTranslate:Ve}=_e.current;if(!ut||Y.current==null||!dt||!Ve)return;const{onDragOver:Je}=H.current,jt=qe.get(Fe),et=jt&&jt.rect.current?{id:jt.id,rect:jt.rect.current,data:jt.data,disabled:jt.disabled}:null,Ge={active:ut,activatorEvent:dt,collisions:ye,delta:{x:Ve.x,y:Ve.y},over:et};hr.unstable_batchedUpdates(()=>{Le(et),Je==null||Je(Ge),o({type:"onDragOver",event:Ge})})},[Fe]),Qi(()=>{_e.current={activatorEvent:G,active:U,activeNode:ue,collisionRect:tt,collisions:mt,droppableRects:V,draggableNodes:w,draggingNode:ke,draggingNodeRect:$e,droppableContainers:N,over:Ne,scrollableAncestors:Re,scrollAdjustedTranslate:Dt},I.current={initial:$e,translated:tt}},[U,ue,mt,tt,w,ke,$e,V,N,Ne,Re,Dt]),Rw({...P,delta:R,draggingRect:tt,pointerCoordinates:ge,scrollableAncestors:Re,scrollableAncestorRects:Me});const ii=k.useMemo(()=>({active:U,activeNode:ue,activeNodeRect:ie,activatorEvent:G,collisions:mt,containerNodeRect:ve,dragOverlay:pe,draggableNodes:w,droppableContainers:N,droppableRects:V,over:Ne,measureDroppableContainers:ee,scrollableAncestors:Re,scrollableAncestorRects:Me,measuringConfiguration:F,measuringScheduled:le,windowRect:pt}),[U,ue,ie,G,mt,ve,pe,w,N,V,Ne,ee,Re,Me,F,le,pt]),Si=k.useMemo(()=>({activatorEvent:G,activators:qi,active:U,activeNodeRect:ie,ariaDescribedById:{draggable:W},dispatch:c,draggableNodes:w,over:Ne,measureDroppableContainers:ee}),[G,qi,U,ie,c,W,w,Ne,ee]);return fe.createElement(ap.Provider,{value:u},fe.createElement(rl.Provider,{value:Si},fe.createElement(bp.Provider,{value:ii},fe.createElement(Sp.Provider,{value:Ct},d)),fe.createElement(Zw,{disabled:(n==null?void 0:n.restoreFocus)===!1})),fe.createElement(ZC,{...n,hiddenTextDescribedById:W}));function Hi(){const ut=(X==null?void 0:X.autoScrollEnabled)===!1,dt=typeof h=="object"?h.enabled===!1:h===!1,ye=b&&!ut&&!dt;return typeof h=="object"?{...h,enabled:ye}:{enabled:ye}}}),i5=k.createContext(null),ng="button",s5="Draggable";function r5(r){let{id:f,data:m,disabled:x=!1,attributes:M}=r;const B=va(s5),{activators:A,activatorEvent:n,active:h,activeNodeRect:d,ariaDescribedById:p,draggableNodes:l,over:g}=k.useContext(rl),{role:C=ng,roleDescription:L="draggable",tabIndex:_=0}=M??{},a=(h==null?void 0:h.id)===f,c=k.useContext(a?Sp:i5),[o,u]=Fo(),[S,D]=Fo(),b=Pw(A,f),E=ca(m);Qi(()=>(l.set(f,{id:f,key:B,node:o,activatorNode:S,data:E}),()=>{const R=l.get(f);R&&R.key===B&&l.delete(f)}),[l,f]);const w=k.useMemo(()=>({role:C,tabIndex:_,"aria-disabled":x,"aria-pressed":a&&C===ng?!0:void 0,"aria-roledescription":L,"aria-describedby":p.draggable}),[x,C,_,a,L,p.draggable]);return{active:h,activatorEvent:n,activeNodeRect:d,attributes:w,isDragging:a,listeners:x?void 0:b,node:o,over:g,setNodeRef:u,setActivatorNodeRef:D,transform:c}}function n5(){return k.useContext(bp)}const a5="Droppable",o5={timeout:25};function l5(r){let{data:f,disabled:m=!1,id:x,resizeObserverConfig:M}=r;const B=va(a5),{active:A,dispatch:n,over:h,measureDroppableContainers:d}=k.useContext(rl),p=k.useRef({disabled:m}),l=k.useRef(!1),g=k.useRef(null),C=k.useRef(null),{disabled:L,updateMeasurementsFor:_,timeout:a}={...o5,...M},c=ca(_??x),o=k.useCallback(()=>{if(!l.current){l.current=!0;return}C.current!=null&&clearTimeout(C.current),C.current=setTimeout(()=>{d(Array.isArray(c.current)?c.current:[c.current]),C.current=null},a)},[a]),u=sl({callback:o,disabled:L||!A}),S=k.useCallback((w,R)=>{u&&(R&&(u.unobserve(R),l.current=!1),w&&u.observe(w))},[u]),[D,b]=Fo(S),E=ca(f);return k.useEffect(()=>{!u||!D.current||(u.disconnect(),l.current=!1,u.observe(D.current))},[D,u]),k.useEffect(()=>(n({type:It.RegisterDroppable,element:{id:x,key:B,disabled:m,node:D,rect:g,data:E}}),()=>n({type:It.UnregisterDroppable,key:B,id:x})),[x]),k.useEffect(()=>{m!==p.current.disabled&&(n({type:It.SetDroppableDisabled,id:x,key:B,disabled:m}),p.current.disabled=m)},[x,B,m,n]),{active:A,rect:g,isOver:(h==null?void 0:h.id)===x,node:D,over:h,setNodeRef:b}}function mh(r,f,m){const x=r.slice();return x.splice(m<0?x.length+m:m,0,x.splice(f,1)[0]),x}function c5(r,f){return r.reduce((m,x,M)=>{const B=f.get(x);return B&&(m[M]=B),m},Array(r.length))}function Ho(r){return r!==null&&r>=0}function u5(r,f){if(r===f)return!0;if(r.length!==f.length)return!1;for(let m=0;m<r.length;m++)if(r[m]!==f[m])return!1;return!0}function h5(r){return typeof r=="boolean"?{draggable:r,droppable:r}:r}const jo={scaleX:1,scaleY:1},d5=r=>{var f;let{rects:m,activeNodeRect:x,activeIndex:M,overIndex:B,index:A}=r;const n=(f=m[M])!=null?f:x;if(!n)return null;const h=f5(m,A,M);if(A===M){const d=m[B];return d?{x:M<B?d.left+d.width-(n.left+n.width):d.left-n.left,y:0,...jo}:null}return A>M&&A<=B?{x:-n.width-h,y:0,...jo}:A<M&&A>=B?{x:n.width+h,y:0,...jo}:{x:0,y:0,...jo}};function f5(r,f,m){const x=r[f],M=r[f-1],B=r[f+1];return!x||!M&&!B?0:m<f?M?x.left-(M.left+M.width):B.left-(x.left+x.width):B?B.left-(x.left+x.width):x.left-(M.left+M.width)}const yp=r=>{let{rects:f,activeIndex:m,overIndex:x,index:M}=r;const B=mh(f,x,m),A=f[M],n=B[M];return!n||!A?null:{x:n.left-A.left,y:n.top-A.top,scaleX:n.width/A.width,scaleY:n.height/A.height}},Cp="Sortable",wp=fe.createContext({activeIndex:-1,containerId:Cp,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:yp,disabled:{draggable:!1,droppable:!1}});function _5(r){let{children:f,id:m,items:x,strategy:M=yp,disabled:B=!1}=r;const{active:A,dragOverlay:n,droppableRects:h,over:d,measureDroppableContainers:p}=n5(),l=va(Cp,m),g=n.rect!==null,C=k.useMemo(()=>x.map(b=>typeof b=="object"&&"id"in b?b.id:b),[x]),L=A!=null,_=A?C.indexOf(A.id):-1,a=d?C.indexOf(d.id):-1,c=k.useRef(C),o=!u5(C,c.current),u=a!==-1&&_===-1||o,S=h5(B);Qi(()=>{o&&L&&p(C)},[o,C,L,p]),k.useEffect(()=>{c.current=C},[C]);const D=k.useMemo(()=>({activeIndex:_,containerId:l,disabled:S,disableTransforms:u,items:C,overIndex:a,useDragOverlay:g,sortedRects:c5(C,h),strategy:M}),[_,l,S.draggable,S.droppable,u,C,a,h,g,M]);return fe.createElement(wp.Provider,{value:D},f)}const v5=r=>{let{id:f,items:m,activeIndex:x,overIndex:M}=r;return mh(m,x,M).indexOf(f)},g5=r=>{let{containerId:f,isSorting:m,wasDragging:x,index:M,items:B,newIndex:A,previousItems:n,previousContainerId:h,transition:d}=r;return!d||!x||n!==B&&M===A?!1:m?!0:A!==M&&f===h},p5={duration:200,easing:"ease"},xp="transform",m5=ua.Transition.toString({property:xp,duration:0,easing:"linear"}),b5={roleDescription:"sortable"};function S5(r){let{disabled:f,index:m,node:x,rect:M}=r;const[B,A]=k.useState(null),n=k.useRef(m);return Qi(()=>{if(!f&&m!==n.current&&x.current){const h=M.current;if(h){const d=ln(x.current,{ignoreTransform:!0}),p={x:h.left-d.left,y:h.top-d.top,scaleX:h.width/d.width,scaleY:h.height/d.height};(p.x||p.y)&&A(p)}}m!==n.current&&(n.current=m)},[f,m,x,M]),k.useEffect(()=>{B&&A(null)},[B]),B}function y5(r){let{animateLayoutChanges:f=g5,attributes:m,disabled:x,data:M,getNewIndex:B=v5,id:A,strategy:n,resizeObserverConfig:h,transition:d=p5}=r;const{items:p,containerId:l,activeIndex:g,disabled:C,disableTransforms:L,sortedRects:_,overIndex:a,useDragOverlay:c,strategy:o}=k.useContext(wp),u=C5(x,C),S=p.indexOf(A),D=k.useMemo(()=>({sortable:{containerId:l,index:S,items:p},...M}),[l,M,S,p]),b=k.useMemo(()=>p.slice(p.indexOf(A)),[p,A]),{rect:E,node:w,isOver:R,setNodeRef:N}=l5({id:A,data:D,disabled:u.droppable,resizeObserverConfig:{updateMeasurementsFor:b,...h}}),{active:z,activatorEvent:I,activeNodeRect:U,attributes:Y,setNodeRef:X,listeners:q,isDragging:G,over:K,setActivatorNodeRef:H,transform:W}=r5({id:A,data:D,attributes:{...b5,...m},disabled:u.draggable}),j=zC(N,X),F=!!z,V=F&&!L&&Ho(g)&&Ho(a),ee=!c&&G,le=ee&&V?W:null,Z=V?le??(n??o)({rects:_,activeNodeRect:U,activeIndex:g,overIndex:a,index:S}):null,P=Ho(g)&&Ho(a)?B({id:A,items:p,activeIndex:g,overIndex:a}):S,ae=z==null?void 0:z.id,ie=k.useRef({activeId:ae,items:p,newIndex:P,containerId:l}),ve=p!==ie.current.items,_e=f({active:z,containerId:l,isDragging:G,isSorting:F,id:A,index:S,items:p,newIndex:ie.current.newIndex,previousItems:ie.current.items,previousContainerId:ie.current.containerId,transition:d,wasDragging:ie.current.activeId!=null}),Ee=S5({disabled:!_e,index:S,node:w,rect:E});return k.useEffect(()=>{F&&ie.current.newIndex!==P&&(ie.current.newIndex=P),l!==ie.current.containerId&&(ie.current.containerId=l),p!==ie.current.items&&(ie.current.items=p)},[F,P,l,p]),k.useEffect(()=>{if(ae===ie.current.activeId)return;if(ae!=null&&ie.current.activeId==null){ie.current.activeId=ae;return}const ke=setTimeout(()=>{ie.current.activeId=ae},50);return()=>clearTimeout(ke)},[ae]),{active:z,activeIndex:g,attributes:Y,data:D,rect:E,index:S,newIndex:P,items:p,isOver:R,isSorting:F,isDragging:G,listeners:q,node:w,overIndex:a,over:K,setNodeRef:j,setActivatorNodeRef:H,setDroppableNodeRef:N,setDraggableNodeRef:X,transform:Ee??Z,transition:pe()};function pe(){if(Ee||ve&&ie.current.newIndex===S)return m5;if(!(ee&&!fh(I)||!d)&&(F||_e))return ua.Transition.toString({...d,property:xp})}}function C5(r,f){var m,x;return typeof r=="boolean"?{draggable:r,droppable:!1}:{draggable:(m=r==null?void 0:r.draggable)!=null?m:f.draggable,droppable:(x=r==null?void 0:r.droppable)!=null?x:f.droppable}}Ze.Down,Ze.Right,Ze.Up,Ze.Left;const w5="_tabBar_c6cms_1",x5="_tabBarInline_c6cms_13",E5="_addBtnLabel_c6cms_37",D5="_tabScroller_c6cms_42",L5="_tab_c6cms_1",R5="_tabActive_c6cms_84",M5="_tabSplit_c6cms_90",A5="_colorDot_c6cms_95",T5="_tabName_c6cms_102",B5="_tabActivity_c6cms_108",O5="_closeBtn_c6cms_114",k5="_addBtn_c6cms_37",N5="_statusDot_c6cms_165",H5="_unreadDot_c6cms_173",hi={tabBar:w5,tabBarInline:x5,addBtnLabel:E5,tabScroller:D5,tab:L5,tabActive:R5,tabSplit:M5,colorDot:A5,tabName:T5,tabActivity:B5,closeBtn:O5,addBtn:k5,statusDot:N5,unreadDot:H5};function j5(r){const f=typeof r=="number"?r:new Date(r).getTime(),m=Date.now()-f;return m<6e4?"":m<36e5?`${Math.floor(m/6e4)}m`:m<864e5?`${Math.floor(m/36e5)}h`:`${Math.floor(m/864e5)}d`}function z5({session:r,isActive:f,isSplit:m=!1,onActivate:x,onClose:M,onMouseEnter:B,onMouseLeave:A}){const{attributes:n,listeners:h,setNodeRef:d,transform:p,transition:l,isDragging:g}=y5({id:r.id}),C={transform:ua.Transform.toString(p),transition:l,opacity:g?.5:1},L=j5(r.lastActivity);return O.jsxs("div",{ref:d,style:C,className:`${hi.tab} ${f?hi.tabActive:""} ${m?hi.tabSplit:""}`,"data-testid":"session-tab",...f?{"data-active":"true"}:{},onClick:x,onAuxClick:_=>{_.button===1&&(_.preventDefault(),confirm("Close this session?")&&M())},onMouseEnter:B,onMouseLeave:A,...n,...h,children:[O.jsx("span",{className:hi.colorDot,style:{backgroundColor:r.color}}),O.jsx("span",{className:hi.tabName,"data-testid":"tab-name",children:r.name}),!f&&r.hasUnread&&O.jsx("span",{className:hi.unreadDot,"data-testid":"tab-unread"}),L&&O.jsx("span",{className:hi.tabActivity,children:L}),O.jsx("span",{className:hi.statusDot,"data-testid":"tab-status-dot",style:{background:r.exited?"var(--danger)":r.connected?"var(--success)":"var(--text-muted)"}}),O.jsx("button",{className:hi.closeBtn,"data-testid":"tab-close",onClick:_=>{_.stopPropagation(),M()},"aria-label":`Close ${r.name}`,children:"×"})]})}const I5="_preview_pobdq_1",U5="_lines_pobdq_19",P5="_empty_pobdq_29",Pu={preview:I5,lines:U5,empty:P5};function $5(r,f){const m=r.term;if(!m)return[];const x=m.buffer.active,M=[],B=Math.max(0,x.cursorY-f+1);for(let A=B;A<=x.cursorY;A++){const n=x.getLine(A);n&&M.push(n.translateToString(!0))}return M}function W5({session:r,anchorEl:f}){const[m,x]=k.useState(!1),M=k.useRef(null),B=k.useRef(!1),A=k.useCallback(()=>{B.current||(M.current=setTimeout(()=>x(!0),300))},[]),n=k.useCallback(()=>{M.current&&(clearTimeout(M.current),M.current=null),x(!1)},[]);if(k.useEffect(()=>{if(!f)return;const d=()=>{B.current=!0};return f.addEventListener("touchstart",d,{passive:!0}),f.addEventListener("mouseenter",A),f.addEventListener("mouseleave",n),()=>{f.removeEventListener("touchstart",d),f.removeEventListener("mouseenter",A),f.removeEventListener("mouseleave",n),n()}},[f,A,n]),!m)return null;const h=$5(r,12);return O.jsx("div",{className:Pu.preview,children:h.length>0?O.jsx("div",{className:Pu.lines,children:h.join(`
|
|
106
|
+
`)}):O.jsx("div",{className:Pu.empty,children:"No output yet"})})}function F5({inline:r=!1}){const f=Te(a=>a.sessions),m=Te(a=>a.activeId),x=Te(a=>a.tabOrder),M=Te(a=>a.splitMode),B=Te(a=>a.setActiveId),A=Te(a=>a.setTabOrder),n=Te(a=>a.removeSession),h=We(a=>a.openNewSessionModal),[d,p]=k.useState(null),l=k.useRef(null),g=QC(Xv(ph,{activationConstraint:{distance:5}}),Xv(gp,{activationConstraint:{delay:200,tolerance:5}})),C=k.useCallback(a=>{const{active:c,over:o}=a;if(o&&c.id!==o.id){const u=x.indexOf(c.id),S=x.indexOf(o.id);A(mh(x,u,S))}},[x,A]),L=x.map(a=>f.get(a)).filter(a=>a!=null),_=M&&m?x.filter(a=>f.has(a)).find(a=>a!==m)??null:null;return O.jsxs("div",{className:r?hi.tabBarInline:hi.tabBar,children:[O.jsx(t5,{sensors:g,collisionDetection:sw,onDragEnd:C,children:O.jsx(_5,{items:x,strategy:d5,children:O.jsx("div",{className:hi.tabScroller,children:L.map(a=>O.jsxs("div",{style:{position:"relative"},children:[O.jsx(z5,{session:a,isActive:a.id===m,isSplit:a.id===_,onActivate:()=>B(a.id),onClose:()=>{nn(a.id).catch(()=>{}),n(a.id)},onMouseEnter:c=>{l.current=c.currentTarget,p(a.id)},onMouseLeave:()=>p(null)}),d===a.id&&O.jsx(W5,{session:a,anchorEl:l.current})]},a.id))})})}),!r&&O.jsxs("button",{className:hi.addBtn,"data-testid":"tab-new-btn",onClick:h,"aria-label":"New session",title:"New session",children:["+ ",O.jsx("span",{className:hi.addBtnLabel,children:"New"})]})]})}const q5="_touchBar_11u4i_1",G5="_row_11u4i_20",Y5="_keyBtn_11u4i_26",X5="_special_11u4i_46",V5="_modifier_11u4i_52",K5="_active_11u4i_58",Z5="_iconBtn_11u4i_65",Q5="_keyEnter_11u4i_69",J5="_keyDanger_11u4i_75",e2="_flash_11u4i_80",Pi={touchBar:q5,row:G5,keyBtn:Y5,special:X5,modifier:V5,active:K5,iconBtn:Z5,keyEnter:Q5,keyDanger:J5,flash:e2},t2=[{label:"Esc",data:"\x1B",type:"special"},{label:"Copy",data:"",type:"special",action:"copy"},{label:"Paste",data:"",type:"special",action:"paste"},{label:"Home",data:"\x1BOH",type:"special"},{label:"End",data:"\x1BOF",type:"special"},{label:"↑",data:"\x1B[A",type:"icon"},{label:"↵",data:"\r",type:"enter"}],i2=[{label:"Ctrl",data:"",type:"modifier",modifier:"ctrl"},{label:"Shift",data:"",type:"modifier",modifier:"shift"},{label:"Tab",data:" ",type:"special"},{label:"^C",data:"",type:"danger"},{label:"←",data:"\x1B[D",type:"icon"},{label:"↓",data:"\x1B[B",type:"icon"},{label:"→",data:"\x1B[C",type:"icon"}],Ep={"\x1B[A":"A","\x1B[B":"B","\x1B[C":"C","\x1B[D":"D"},Dp={"\x1BOH":"H","\x1BOF":"F"};function s2(r,f,m){const x=Ep[r];return x?f&&m?`\x1B[1;6${x}`:f?`\x1B[1;5${x}`:m?`\x1B[1;2${x}`:r:r}function r2(r,f,m){const x=Dp[r];return x?f&&m?`\x1B[1;6${x}`:f?`\x1B[1;5${x}`:m?`\x1B[1;2${x}`:r:r}function ia(r){const{sessions:f,activeId:m}=Te.getState();if(!m)return;const x=f.get(m);x!=null&&x.send&&x.send(r)}function $u(){var x;const{sessions:r,activeId:f}=Te.getState();if(!f)return;const m=r.get(f);(x=m==null?void 0:m.term)==null||x.focus()}const ag=10;function n2(){const[r,f]=k.useState(!1),[m,x]=k.useState(!1),[M,B]=k.useState(null),A=k.useRef(null),n=k.useRef(null),h=k.useRef(null),{keyboardHeight:d}=lh(),p=k.useCallback(()=>{A.current&&(clearTimeout(A.current),A.current=null),n.current&&(clearInterval(n.current),n.current=null)},[]),l=k.useCallback(w=>w.modifier||w.action?null:w.data===" "&&m?"\x1B[Z":Ep[w.data]?s2(w.data,r,m):Dp[w.data]?r2(w.data,r,m):w.data,[r,m]),g=k.useCallback(w=>{B(w),setTimeout(()=>B(null),120)},[]),C=k.useCallback(()=>{We.getState().openCopyOverlay()},[]),L=k.useCallback(async()=>{var R,N;if((R=navigator.clipboard)!=null&&R.read)try{const z=await navigator.clipboard.read();for(const I of z){const U=I.types.find(Y=>Y.startsWith("image/"));if(U){const Y=await I.getType(U),X=Qe.loading("Uploading image... 0%");fg(Y,U,q=>{Qe.loading(`Uploading image... ${q}%`,{id:X})}).then(q=>{q.path&&ia(q.path+" "),Qe.success("Image uploaded",{id:X})}).catch(()=>{Qe.error("Image upload failed",{id:X})});return}}}catch{}if((N=navigator.clipboard)!=null&&N.readText)try{const z=await navigator.clipboard.readText();if(z){ia(z),$u();return}}catch{}const w=window.prompt("Paste text:");w&&(ia(w),$u())},[]),_=k.useCallback((w,R=!1)=>{if(w.action==="copy"){g(w.label),C();return}if(w.action==="paste"){g(w.label),L();return}if(w.modifier==="ctrl"){f(z=>!z);return}if(w.modifier==="shift"){x(z=>!z);return}const N=l(w);N!==null&&(g(w.label),ia(N),r&&f(!1),m&&x(!1),R||$u())},[l,g,r,m,C,L]),a=k.useCallback(w=>{w.modifier||w.action||(p(),A.current=setTimeout(()=>{n.current=setInterval(()=>{const R=l(w);R!==null&&ia(R)},80)},400))},[l,p]),c=k.useCallback(()=>{p()},[p]),o=k.useCallback(w=>{const R=w.touches[0];R&&(h.current={x:R.clientX,y:R.clientY})},[]),u=k.useCallback((w,R)=>{R.preventDefault();const N=h.current,z=R.changedTouches[0];if(h.current=null,N&&z){const I=Math.abs(z.clientX-N.x),U=Math.abs(z.clientY-N.y);if(I>ag||U>ag)return}_(w,!0)},[_]),S=w=>{const R=[Pi.keyBtn],N=w.modifier==="ctrl"&&r||w.modifier==="shift"&&m;return w.type==="special"&&R.push(Pi.special),w.type==="modifier"&&R.push(Pi.modifier),w.type==="icon"&&R.push(Pi.iconBtn),w.type==="enter"&&R.push(Pi.keyEnter),w.type==="danger"&&R.push(Pi.keyDanger),N&&R.push(Pi.active),M===w.label&&R.push(Pi.flash),R.join(" ")},D=w=>{if(w.modifier==="ctrl")return"ctrl-btn";if(w.modifier==="shift")return"shift-btn";if(w.action==="copy")return"select-btn";if(w.action==="paste")return"paste-btn"},b=w=>O.jsx("button",{className:S(w),"data-testid":D(w),onClick:()=>_(w),onMouseDown:()=>a(w),onMouseUp:c,onMouseLeave:c,onTouchStart:o,onTouchEnd:R=>u(w,R),children:w.label},w.label),E=d>0?{height:`${80+d}px`,paddingBottom:`${d}px`}:{};return O.jsxs("div",{className:Pi.touchBar,style:E,children:[O.jsx("div",{className:Pi.row,children:t2.map(b)}),O.jsx("div",{className:Pi.row,children:i2.map(b)})]})}const a2="_searchBar_1su33_1",o2="_input_1su33_16",l2="_btn_1su33_33",c2="_btnActive_1su33_48",u2="_indicator_1su33_54",Fs={searchBar:a2,input:o2,btn:l2,btnActive:c2,indicator:u2};function h2(){const r=We(c=>c.searchBarOpen),f=We(c=>c.closeSearchBar),m=Te(c=>c.activeId),[x,M]=k.useState(""),[B,A]=k.useState(!1),[n,h]=k.useState(null),[d,p]=k.useState(null),l=k.useRef(null);k.useEffect(()=>{var c,o;r&&((c=l.current)==null||c.focus(),(o=l.current)==null||o.select())},[r]);const g=k.useCallback(()=>{if(!m)return null;const c=Te.getState().sessions.get(m);return(c==null?void 0:c.searchAddon)??null},[m]);k.useEffect(()=>{if(!r)return;const c=g();if(!c)return;const o=c.onDidChangeResults(u=>{p(u)});return()=>o.dispose()},[r,g]);const C=k.useCallback((c,o)=>{const u=g();if(!u||!c){h(null);return}const S={regex:B,caseSensitive:!1,incremental:!0},D=o==="next"?u.findNext(c,S):u.findPrevious(c,S);h(D)},[g,B]),L=k.useCallback(c=>{M(c),C(c,"next")},[C]),_=k.useCallback(()=>{var o;const c=g();if(c==null||c.clearDecorations(),M(""),h(null),p(null),f(),m){const u=Te.getState().sessions.get(m);(o=u==null?void 0:u.term)==null||o.focus()}},[g,f,m]),a=k.useCallback(c=>{c.key==="Enter"&&(c.preventDefault(),C(x,c.shiftKey?"prev":"next")),c.key==="Escape"&&(c.preventDefault(),_())},[x,C,_]);return r?O.jsxs("div",{className:Fs.searchBar,"data-testid":"search-bar","data-open":"true",children:[O.jsx("input",{ref:l,className:Fs.input,type:"text",placeholder:"Search...",value:x,onChange:c=>L(c.target.value),onKeyDown:a,"data-testid":"search-input"}),O.jsx("button",{className:Fs.btn,onClick:()=>C(x,"prev"),title:"Previous (Shift+Enter)","data-testid":"search-prev",children:"▲"}),O.jsx("button",{className:Fs.btn,onClick:()=>C(x,"next"),title:"Next (Enter)","data-testid":"search-next",children:"▼"}),O.jsx("button",{className:`${Fs.btn} ${B?Fs.btnActive:""}`,onClick:()=>A(c=>!c),title:"Regex",children:".*"}),n!==null&&O.jsx("span",{className:Fs.indicator,children:d&&d.resultCount>0?`${d.resultIndex+1} of ${d.resultCount}`:n?"Found":"No results"}),O.jsx("button",{className:Fs.btn,onClick:_,title:"Close (Esc)","data-testid":"search-close",children:"✕"})]}):null}const d2="_overlay_153fc_1",f2="_content_153fc_9",_2="_title_153fc_25",v2="_description_153fc_32",g2="_label_153fc_38",p2="_input_153fc_45",m2="_actions_153fc_73",b2="_cancelBtn_153fc_80",S2="_openBtn_153fc_95",y2="_close_153fc_116",Kt={overlay:d2,content:f2,title:_2,description:v2,label:g2,input:p2,actions:m2,cancelBtn:b2,openBtn:S2,close:y2};function Wu({open:r,onClose:f,version:m}){const[x,M]=k.useState(""),[B,A]=k.useState(!1),n=k.useCallback(async()=>{A(!0),M("");try{const d=await ih(!0);d?d.updateAvailable?M(`Update available: v${d.latest} (current: v${d.current})`):M(`You're up to date (v${d.current})`):M("Unable to check for updates")}catch{M("Unable to check for updates")}finally{A(!1)}},[]),h=k.useCallback(()=>{M(""),f()},[f]);return O.jsx(Zo,{open:r,onOpenChange:d=>!d&&h(),children:O.jsxs(Qo,{children:[O.jsx(Jo,{className:Kt.overlay}),O.jsxs(el,{className:Kt.content,children:[O.jsxs(tl,{className:Kt.title,children:["TermBeam ",m?`v${m}`:""]}),O.jsx(Zg,{className:Kt.description,children:"Terminal in your browser, optimized for mobile."}),O.jsx("button",{className:Kt.close,onClick:h,"aria-label":"Close",children:"✕"}),O.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[O.jsxs("div",{style:{display:"flex",gap:12,flexWrap:"wrap"},children:[O.jsx("a",{href:"https://github.com/dorlugasigal/TermBeam",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent)",fontSize:"0.9rem"},children:"GitHub"}),O.jsx("a",{href:"https://dorlugasigal.github.io/TermBeam/",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent)",fontSize:"0.9rem"},children:"Docs"}),O.jsx("a",{href:"https://termbeam.pages.dev",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent)",fontSize:"0.9rem"},children:"Website"})]}),O.jsx("div",{className:Kt.actions,style:{justifyContent:"flex-start"},children:O.jsx("button",{type:"button",className:Kt.openBtn,onClick:n,disabled:B,style:{fontSize:"0.85rem"},children:B?"Checking…":"Check for updates"})}),x&&O.jsx("div",{style:{fontSize:"0.8rem",color:"var(--text-secondary)"},children:x})]})]})]})})}const C2="_backdrop_2adtd_1",w2="_panel_2adtd_8",x2="_panelOpen_2adtd_23",E2="_header_2adtd_27",D2="_title_2adtd_35",L2="_closeBtn_2adtd_41",R2="_body_2adtd_56",M2="_section_2adtd_62",A2="_sectionTitle_2adtd_66",T2="_btn_2adtd_75",B2="_list_2adtd_102",O2="_item_2adtd_108",Jt={backdrop:C2,panel:w2,panelOpen:x2,header:E2,title:D2,closeBtn:L2,body:R2,section:M2,sectionTitle:A2,btn:T2,list:B2,item:O2};function k2({onBack:r}){const f=aa(M=>M.themeId),m=aa(M=>M.setTheme),x=M=>{m(M)};return O.jsxs("div",{"data-testid":"theme-subpanel","data-open":"true",children:[O.jsxs("div",{className:Jt.header,children:[O.jsx("button",{className:Jt.closeBtn,onClick:r,children:"←"}),O.jsx("span",{className:Jt.title,children:"Theme"}),O.jsx("span",{})]}),O.jsx("div",{className:Jt.list,children:dr.map(M=>O.jsxs("button",{className:Jt.item,"data-selected":M.id===f,"data-testid":"theme-item","data-tid":M.id,onClick:()=>x(M.id),children:[O.jsx("span",{style:{display:"inline-block",width:16,height:16,borderRadius:4,background:M.bg,border:"1px solid var(--border, #555)",flexShrink:0}}),O.jsx("span",{children:M.name}),M.id===f&&O.jsx("span",{style:{marginLeft:"auto",fontSize:12,opacity:.6},children:"✓"})]},M.id))})]})}const N2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"2"}),O.jsx("line",{x1:"8",y1:"5",x2:"8",y2:"11"}),O.jsx("line",{x1:"5",y1:"8",x2:"11",y2:"8"})]}),H2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("path",{d:"M2 10v3a1 1 0 001 1h10a1 1 0 001-1v-3"}),O.jsx("polyline",{points:"5 5 8 2 11 5"}),O.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"10"})]}),j2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"2"}),O.jsx("line",{x1:"5.5",y1:"5.5",x2:"10.5",y2:"10.5"}),O.jsx("line",{x1:"10.5",y1:"5.5",x2:"5.5",y2:"10.5"})]}),z2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("path",{d:"M11 2l3 3-8 8H3v-3z"}),O.jsx("line",{x1:"9",y1:"4",x2:"12",y2:"7"})]}),I2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"2"}),O.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"14"})]}),U2=O.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:O.jsx("rect",{x:"3",y:"3",width:"10",height:"10",rx:"1"})}),P2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("circle",{cx:"7",cy:"7",r:"4"}),O.jsx("line",{x1:"10",y1:"10",x2:"14",y2:"14"})]}),$2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("path",{d:"M3 13L8 3l5 10"}),O.jsx("line",{x1:"5",y1:"9",x2:"11",y2:"9"}),O.jsx("line",{x1:"13",y1:"5",x2:"13",y2:"1"}),O.jsx("line",{x1:"11",y1:"3",x2:"15",y2:"3"})]}),W2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("path",{d:"M3 13L8 3l5 10"}),O.jsx("line",{x1:"5",y1:"9",x2:"11",y2:"9"}),O.jsx("line",{x1:"11",y1:"3",x2:"15",y2:"3"})]}),F2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("circle",{cx:"8",cy:"8",r:"6"}),O.jsx("path",{d:"M8 2a6 6 0 000 12z",fill:"currentColor",opacity:".3"})]}),q2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("rect",{x:"1",y:"3",width:"14",height:"10",rx:"2"}),O.jsx("line",{x1:"5",y1:"13",x2:"11",y2:"13"}),O.jsx("line",{x1:"8",y1:"13",x2:"8",y2:"15"})]}),G2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("path",{d:"M6.5 9.5a3 3 0 004 .5l2-2a3 3 0 00-4.24-4.24L7 5"}),O.jsx("path",{d:"M9.5 6.5a3 3 0 00-4-.5l-2 2a3 3 0 004.24 4.24L9 11"})]}),Y2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("path",{d:"M4 6a4 4 0 018 0c0 4 2 5 2 5H2s2-1 2-5"}),O.jsx("path",{d:"M6.5 13a1.5 1.5 0 003 0"})]}),X2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("path",{d:"M2 8a6 6 0 0110.47-4"}),O.jsx("polyline",{points:"12 1 13 4 10 5"}),O.jsx("path",{d:"M14 8a6 6 0 01-10.47 4"}),O.jsx("polyline",{points:"4 15 3 12 6 11"})]}),V2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("path",{d:"M3 4h10"}),O.jsx("path",{d:"M5 4V3a1 1 0 011-1h4a1 1 0 011 1v1"}),O.jsx("path",{d:"M4 4l1 10a1 1 0 001 1h4a1 1 0 001-1l1-10"})]}),K2=O.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("circle",{cx:"8",cy:"8",r:"6"}),O.jsx("line",{x1:"8",y1:"7",x2:"8",y2:"11"}),O.jsx("circle",{cx:"8",cy:"5",r:".5",fill:"currentColor"})]});function Fu(r){const f=document.createElement("textarea");f.value=r,f.style.position="fixed",f.style.opacity="0",document.body.appendChild(f),f.select();try{document.execCommand("copy"),Qe.success("URL copied to clipboard")}catch{Qe.error("Failed to copy URL")}document.body.removeChild(f)}function Z2(){const r=We(D=>D.commandPaletteOpen),f=We(D=>D.closeCommandPalette),[m,x]=k.useState(!1),[M,B]=k.useState(()=>localStorage.getItem("termbeam-notifications")!=="false"),[A,n]=k.useState(!1),[h,d]=k.useState(""),p=aa(D=>D.themeId),l=p.charAt(0).toUpperCase()+p.slice(1),[g,C]=k.useState(!1);k.useEffect(()=>{r?requestAnimationFrame(()=>C(!0)):C(!1)},[r]);const L=k.useCallback(D=>{D(),f(),x(!1)},[f]);if(!r)return O.jsx(Wu,{open:A,onClose:()=>n(!1),version:h});const _=`${Jt.panel} ${g?Jt.panelOpen:""}`;if(m)return O.jsxs(O.Fragment,{children:[O.jsx("div",{className:Jt.backdrop,onClick:f}),O.jsx("div",{className:_,"data-testid":"palette-panel","data-open":"true",children:O.jsx(k2,{onBack:()=>x(!1)})}),O.jsx(Wu,{open:A,onClose:()=>n(!1),version:h})]});const a=()=>{const{activeId:D,sessions:b,updateSession:E}=Te.getState();if(!D)return;const w=b.get(D),R=prompt("Rename session:",(w==null?void 0:w.name)??"");!R||R===(w==null?void 0:w.name)||(w1(D,R).then(()=>{E(D,{name:R}),Qe.success("Session renamed")}).catch(()=>Qe.error("Failed to rename session")),f())},c=()=>{const{activeId:D,removeSession:b}=Te.getState();D&&confirm("Stop this session? The process will be killed.")&&(nn(D).catch(()=>Qe.error("Failed to stop session")).finally(()=>b(D)),f())},o=()=>{const D=!M;B(D),mC(D),D&&(ip(),typeof Notification<"u"&&Notification.permission==="default"&&Notification.requestPermission()),Qe(D?"Notifications enabled":"Notifications disabled"),f()},u=()=>{sh().then(D=>{d(D),n(!0)}),f()},S=[{title:"SESSION",actions:[{id:"new-tab",label:"New tab",icon:N2,action:()=>L(()=>We.getState().openNewSessionModal())},{id:"upload",label:"Upload files",icon:H2,action:()=>L(()=>We.getState().openUploadModal())},{id:"close-tab",label:"Close tab",icon:j2,action:()=>L(()=>{const{activeId:D,sessions:b,removeSession:E}=Te.getState();if(!D)return;const w=b.get(D);confirm(`Close session "${(w==null?void 0:w.name)??D}"?`)&&(nn(D).catch(()=>{}),E(D))})},{id:"rename",label:"Rename session",icon:z2,action:a},{id:"split",label:"Split view",icon:I2,action:()=>L(()=>Te.getState().toggleSplit())},{id:"stop",label:"Stop session",icon:U2,action:c}]},{title:"SEARCH",actions:[{id:"find",label:"Find in terminal",icon:P2,action:()=>L(()=>We.getState().openSearchBar())}]},{title:"VIEW",actions:[{id:"font-up",label:"Increase font size",icon:$2,action:()=>L(()=>{const{fontSize:D,setFontSize:b}=We.getState();b(D+1)})},{id:"font-down",label:"Decrease font size",icon:W2,action:()=>L(()=>{const{fontSize:D,setFontSize:b}=We.getState();b(D-1)})},{id:"theme",label:`Theme (${l})`,icon:F2,action:()=>x(!0)},{id:"preview",label:"Preview port",icon:q2,action:()=>L(()=>We.getState().openPreviewModal())}]},{title:"SHARE",actions:[{id:"copy-link",label:"Copy link",icon:G2,action:()=>{const D=_g();if(navigator.clipboard&&typeof ClipboardItem<"u"){const b=D.then(E=>new Blob([E],{type:"text/plain"}));navigator.clipboard.write([new ClipboardItem({"text/plain":b})]).then(()=>Qe.success("Link copied!")).catch(()=>D.then(E=>Fu(E)))}else D.then(b=>{var E;(E=navigator.clipboard)!=null&&E.writeText?navigator.clipboard.writeText(b).then(()=>Qe.success("Link copied!")).catch(()=>Fu(b)):Fu(b)});f()}}]},{title:"NOTIFICATIONS",actions:[{id:"notifications",label:`Notifications (${M?"on":"off"})`,icon:Y2,action:o}]},{title:"SYSTEM",actions:[{id:"refresh",label:"Refresh",icon:X2,action:()=>L(()=>{"caches"in window&&caches.keys().then(D=>D.forEach(b=>caches.delete(b))),location.reload()})},{id:"clear",label:"Clear terminal",icon:V2,action:()=>L(()=>{var w;const{sessions:D,activeId:b}=Te.getState();if(!b)return;const E=D.get(b);(w=E==null?void 0:E.term)==null||w.clear()})},{id:"about",label:"About",icon:K2,action:u}]}];return O.jsxs(O.Fragment,{children:[O.jsx("div",{className:Jt.backdrop,onClick:f}),O.jsxs("div",{className:_,"data-testid":"palette-panel","data-open":"true",children:[O.jsxs("div",{className:Jt.header,children:[O.jsx("span",{className:Jt.title,children:"Tools"}),O.jsx("button",{className:Jt.closeBtn,onClick:f,children:"✕"})]}),O.jsx("div",{className:Jt.body,children:S.map(D=>O.jsxs("div",{className:Jt.section,children:[O.jsx("div",{className:Jt.sectionTitle,children:D.title}),D.actions.map(b=>O.jsxs("button",{className:Jt.btn,onClick:b.action,"data-testid":"palette-action",children:[b.icon,b.label]},b.id))]},D.title))})]}),O.jsx(Wu,{open:A,onClose:()=>n(!1),version:h})]})}const Q2="_backdrop_1df0i_1",J2="_panel_1df0i_13",ex="_header_1df0i_38",tx="_brand_1df0i_46",ix="_version_1df0i_61",sx="_closeBtn_1df0i_69",rx="_sectionTitle_1df0i_97",nx="_list_1df0i_108",ax="_card_1df0i_121",ox="_cardActive_1df0i_138",lx="_cardHeader_1df0i_145",cx="_cardDot_1df0i_152",ux="_cardName_1df0i_159",hx="_cardStatus_1df0i_169",dx="_cardClose_1df0i_176",fx="_cardMeta_1df0i_203",_x="_cardGit_1df0i_214",vx="_gitBadge_1df0i_224",gx="_gitClean_1df0i_233",px="_gitDirty_1df0i_237",mx="_cardPreview_1df0i_243",bx="_cardPreviewEmpty_1df0i_258",Sx="_footer_1df0i_269",yx="_newBtn_1df0i_274",Cx="_unreadDot_1df0i_299",rt={backdrop:Q2,panel:J2,header:ex,brand:tx,version:ix,closeBtn:sx,sectionTitle:rx,list:nx,card:ax,cardActive:ox,cardHeader:lx,cardDot:cx,cardName:ux,cardStatus:hx,cardClose:dx,cardMeta:fx,cardGit:_x,gitBadge:vx,gitClean:gx,gitDirty:px,cardPreview:mx,cardPreviewEmpty:bx,footer:Sx,newBtn:yx,unreadDot:Cx};function wx(r){if(!r)return"";const f=r.buffer.active,m=f.length;let x=-1;for(let A=m-1;A>=0;A--){const n=f.getLine(A);if(n&&n.translateToString(!0).trim()!==""){x=A;break}}if(x<0)return"";const M=Math.max(0,x-5),B=[];for(let A=M;A<=x;A++){const n=f.getLine(A);n&&B.push(n.translateToString(!0))}return B.join(`
|
|
107
|
+
`)}function xx(r){if(!r)return"";const f=typeof r=="string"?new Date(r).getTime():r,m=(Date.now()-f)/1e3;return m<5?"":m<60?`${Math.floor(m)}s ago`:m<3600?`${Math.floor(m/60)}m ago`:`${Math.floor(m/3600)}h ago`}function Ex(r){if(!r)return"";const f=r.replace(/^\/(?:Users|home)\/[^/]+/,"~");if(f.length<=40)return f;const m=f.split("/");return m.length<=3?f:m[0]+"/…/"+m.slice(-2).join("/")}function Dx(r){return r.exited?"var(--danger)":r.connected?"var(--success)":"var(--text-muted)"}function Lx(){return O.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),O.jsx("circle",{cx:"18",cy:"6",r:"3"}),O.jsx("circle",{cx:"6",cy:"18",r:"3"}),O.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]})}function Rx(){const r=We(c=>c.sidePanelOpen),f=We(c=>c.closeSidePanel),m=We(c=>c.openNewSessionModal),x=Te(c=>c.sessions),M=Te(c=>c.activeId),B=Te(c=>c.tabOrder),A=Te(c=>c.setActiveId),n=Te(c=>c.removeSession),[h,d]=k.useState(!1),[p,l]=k.useState(""),g=k.useRef(null),C=k.useCallback(()=>{d(!0),setTimeout(()=>{d(!1),f()},200)},[f]);if(k.useEffect(()=>{r&&sh().then(c=>{c&&l(c)})},[r]),k.useEffect(()=>{if(!r)return;const c=o=>{o.key==="Escape"&&C()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[r,C]),!r)return null;const L=B.map(c=>x.get(c)).filter(c=>c!=null),_=c=>{A(c),C()},a=(c,o)=>{c.stopPropagation(),confirm("Close this session?")&&(nn(o).catch(()=>{}),n(o))};return O.jsxs(O.Fragment,{children:[O.jsx("div",{className:rt.backdrop,"data-closing":h,onClick:C,"aria-hidden":"true"}),O.jsxs("div",{className:rt.panel,"data-closing":h,ref:g,role:"dialog","data-testid":"side-panel",children:[O.jsxs("div",{className:rt.header,children:[O.jsxs("div",{className:rt.brand,children:[O.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("polyline",{points:"4 17 10 11 4 5"}),O.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),"TermBeam"]}),p&&O.jsxs("div",{className:rt.version,children:["v",p]}),O.jsx("button",{className:rt.closeBtn,onClick:C,"aria-label":"Close side panel",children:"×"})]}),O.jsx("div",{className:rt.sectionTitle,children:"Sessions"}),O.jsx("div",{className:rt.list,"data-testid":"side-panel-list",children:L.map(c=>{const o=wx(c.term),u=xx(c.lastActivity),S=c.git;return O.jsxs("div",{className:`${rt.card} ${c.id===M?rt.cardActive:""}`,"data-testid":"side-panel-card",onClick:()=>_(c.id),onAuxClick:D=>{D.button===1&&(D.preventDefault(),confirm("Close this session?")&&(nn(c.id).catch(()=>{}),n(c.id)))},children:[O.jsxs("div",{className:rt.cardHeader,children:[O.jsx("span",{className:rt.cardDot,style:{backgroundColor:c.color}}),O.jsx("span",{className:rt.cardName,children:c.name}),c.id!==M&&c.hasUnread&&O.jsx("span",{className:rt.unreadDot}),O.jsx("span",{className:rt.cardStatus,style:{backgroundColor:Dx(c)},title:c.exited?"Exited":c.connected?"Connected":"Disconnected"}),O.jsx("button",{className:rt.cardClose,onClick:D=>a(D,c.id),title:"Close session",children:"×"})]}),O.jsxs("div",{className:rt.cardMeta,children:[c.shell,c.cwd?` · ${Ex(c.cwd)}`:"",u?` · ${u}`:""]}),S&&O.jsxs("div",{className:rt.cardGit,children:[O.jsxs("span",{className:rt.gitBadge,children:[O.jsx(Lx,{})," ",S.branch||"detached"]}),S.provider&&O.jsx("span",{className:rt.gitBadge,children:S.provider}),S.repoName&&O.jsx("span",{className:rt.gitBadge,children:S.repoName}),S.status&&O.jsx("span",{className:`${rt.gitBadge} ${S.status.clean?rt.gitClean:rt.gitDirty}`,children:S.status.clean?"✓ clean":S.status.summary})]}),o?O.jsx("div",{className:rt.cardPreview,children:o}):O.jsx("div",{className:`${rt.cardPreview} ${rt.cardPreviewEmpty}`,children:"No output yet"})]},c.id)})}),O.jsx("div",{className:rt.footer,children:O.jsx("button",{className:rt.newBtn,onClick:()=>{m(),C()},children:"+ New Session"})})]})]})}const Mx="_overlay_h1a26_1",Ax="_content_h1a26_9",Tx="_title_h1a26_26",Bx="_dropZone_h1a26_33",Ox="_dropZoneDragOver_h1a26_47",kx="_fileList_h1a26_53",Nx="_fileInfo_h1a26_62",Hx="_fileName_h1a26_73",jx="_fileSize_h1a26_81",zx="_targetDirGroup_h1a26_87",Ix="_label_h1a26_91",Ux="_targetDirRow_h1a26_98",Px="_input_h1a26_103",$x="_browseBtn_h1a26_119",Wx="_hint_h1a26_135",Fx="_actions_h1a26_141",qx="_cancelBtn_h1a26_148",Gx="_uploadBtn_h1a26_163",Yx="_close_h1a26_184",Xx="_progressWrapper_h1a26_201",Vx="_progressBar_h1a26_211",Kx="_progressLabel_h1a26_219",Zx="_folderBrowserWrapper_h1a26_231",yt={overlay:Mx,content:Ax,title:Tx,dropZone:Bx,dropZoneDragOver:Ox,fileList:kx,fileInfo:Nx,fileName:Hx,fileSize:jx,targetDirGroup:zx,label:Ix,targetDirRow:Ux,input:Px,browseBtn:$x,hint:Wx,actions:Fx,cancelBtn:qx,uploadBtn:Gx,close:Yx,progressWrapper:Xx,progressBar:Vx,progressLabel:Kx,folderBrowserWrapper:Zx},Qx=10*1024*1024;function og(r){return r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(1)} KB`:`${(r/(1024*1024)).toFixed(1)} MB`}function Jx(){const r=We(E=>E.uploadModalOpen),f=We(E=>E.closeUploadModal),m=Te(E=>E.activeId),[x,M]=k.useState([]),[B,A]=k.useState(""),[n,h]=k.useState(!1),[d,p]=k.useState(0),[l,g]=k.useState(0),[C,L]=k.useState(!1),[_,a]=k.useState(!1),c=k.useRef(null);k.useEffect(()=>{if(r&&m){const E=Te.getState().sessions.get(m);E!=null&&E.cwd&&A(E.cwd)}},[r,m]);const o=k.useCallback(()=>{M([]),A(""),h(!1),p(0),g(0),L(!1),a(!1)},[]),u=k.useCallback(()=>{o(),f()},[o,f]),S=k.useCallback(E=>{if(!E||E.length===0)return;const w=[];let R=0;for(const N of Array.from(E))N.size>Qx?(Qe.error(`"${N.name}" too large (${og(N.size)}). Max 10 MB.`),R++):w.push(N);R>0&&w.length===0||M(w)},[]),D=k.useCallback(E=>{E.preventDefault(),L(!1),S(E.dataTransfer.files)},[S]),b=k.useCallback(async()=>{if(x.length===0||!m)return;h(!0),p(0),g(0);let E=0,w=0;const R=B||void 0;for(let N=0;N<x.length;N++){const z=x[N];g(N),p(0);try{await D1(m,z,R,I=>p(I)),E++}catch{w++}}h(!1),E>0&&Qe.success(`${E} file(s) uploaded${R?` to ${R}`:""}`),w>0&&Qe.error(`${w} file(s) failed to upload`),E>0&&u()},[x,m,B,u]);return O.jsx(Zo,{open:r,onOpenChange:E=>!E&&u(),children:O.jsxs(Qo,{children:[O.jsx(Jo,{className:yt.overlay}),O.jsxs(el,{className:yt.content,children:[O.jsx(tl,{className:yt.title,children:"Upload Files"}),O.jsx("button",{className:yt.close,onClick:u,"aria-label":"Close",children:"✕"}),O.jsx("div",{className:`${yt.dropZone} ${C?yt.dropZoneDragOver:""}`,onClick:()=>{var E;return(E=c.current)==null?void 0:E.click()},onDragOver:E=>{E.preventDefault(),L(!0)},onDragLeave:()=>L(!1),onDrop:D,children:x.length>0?"Click or drag to replace files":"Drop files here or click to browse"}),O.jsx("input",{ref:c,type:"file",multiple:!0,hidden:!0,onChange:E=>{S(E.target.files),E.target.value=""}}),x.length>0&&O.jsx("div",{className:yt.fileList,children:x.map((E,w)=>O.jsxs("div",{className:yt.fileInfo,children:[O.jsx("span",{className:yt.fileName,children:E.name}),O.jsx("span",{className:yt.fileSize,children:og(E.size)})]},`${E.name}-${w}`))}),n&&O.jsxs("div",{className:yt.progressWrapper,children:[O.jsx("div",{className:yt.progressBar,style:{width:`${d}%`}}),O.jsx("span",{className:yt.progressLabel,children:x.length>1?`File ${l+1}/${x.length} — ${d}%`:`${d}%`})]}),O.jsxs("div",{className:yt.targetDirGroup,children:[O.jsx("label",{className:yt.label,children:"Target directory (optional)"}),O.jsxs("div",{className:yt.targetDirRow,children:[O.jsx("input",{className:yt.input,value:B,onChange:E=>A(E.target.value),placeholder:"e.g. /home/user/uploads"}),O.jsx("button",{className:yt.browseBtn,onClick:()=>a(E=>!E),type:"button",children:"Browse"})]})]}),_&&O.jsx("div",{className:yt.folderBrowserWrapper,children:O.jsx(Qg,{currentDir:B||"/",onSelect:E=>{A(E),a(!1)},onCancel:()=>a(!1)})}),!_&&O.jsxs(O.Fragment,{children:[O.jsx("p",{className:yt.hint,children:"Max 10 MB"}),O.jsxs("div",{className:yt.actions,children:[O.jsx("button",{className:yt.cancelBtn,onClick:u,children:"Cancel"}),O.jsx("button",{className:yt.uploadBtn,onClick:b,disabled:x.length===0||!m||n,children:n?"Uploading…":x.length>1?`Upload ${x.length} Files`:"Upload"})]})]})]})]})})}function eE(){const r=We(p=>p.previewModalOpen),f=We(p=>p.closePreviewModal),m=Te(p=>p.activeId),[x,M]=k.useState(""),[B,A]=k.useState("");k.useEffect(()=>{!r||!m||(A(""),fetch(`/api/sessions/${m}/detect-port`).then(p=>p.ok?p.json():null).then(p=>{p!=null&&p.detected&&(M(String(p.port)),A(`Detected port ${p.port}`))}).catch(()=>{}))},[r,m]);const n=k.useCallback(()=>{M(""),A(""),f()},[f]),h=k.useCallback(p=>{p==null||p.preventDefault();const l=parseInt(x,10);!l||l<1||l>65535||(window.open(`/preview/${l}/`,"_blank"),n())},[x,n]),d=(()=>{const p=parseInt(x,10);return!isNaN(p)&&p>=1&&p<=65535})();return O.jsx(Zo,{open:r,onOpenChange:p=>!p&&n(),children:O.jsxs(Qo,{children:[O.jsx(Jo,{className:Kt.overlay}),O.jsxs(el,{className:Kt.content,"data-testid":"preview-modal",children:[O.jsx(tl,{className:Kt.title,children:"Port Preview"}),O.jsx(Zg,{className:Kt.description,children:"Preview a service running on localhost"}),O.jsx("button",{className:Kt.close,onClick:n,"aria-label":"Close",children:"✕"}),O.jsxs("form",{onSubmit:h,children:[O.jsx("label",{className:Kt.label,children:"Port number"}),O.jsx("input",{className:Kt.input,type:"number",min:1,max:65535,value:x,onChange:p=>M(p.target.value),placeholder:"e.g. 3000",autoFocus:!0,"data-testid":"preview-port-input"}),B&&O.jsx("div",{style:{fontSize:"0.8rem",color:"var(--accent)",marginTop:4},children:B}),O.jsxs("div",{className:Kt.actions,children:[O.jsx("button",{type:"button",className:Kt.cancelBtn,onClick:n,children:"Cancel"}),O.jsx("button",{type:"submit",className:Kt.openBtn,disabled:!d,"data-testid":"preview-open",children:"Open Preview"})]})]})]})]})})}const tE="_overlay_1mt11_1",iE="_header_1mt11_11",sE="_title_1mt11_20",rE="_actions_1mt11_26",nE="_btnPrimary_1mt11_31",aE="_btnSecondary_1mt11_45",oE="_content_1mt11_59",lE="_loadMoreBtn_1mt11_65",cE="_pre_1mt11_83",ps={overlay:tE,header:iE,title:sE,actions:rE,btnPrimary:nE,btnSecondary:aE,content:oE,loadMoreBtn:lE,pre:cE},qu=200;function uE(){const r=We(o=>o.copyOverlayOpen),f=We(o=>o.closeCopyOverlay),m=Te(o=>o.activeId),x=Te(o=>o.sessions),M=k.useRef(null),B=k.useMemo(()=>{if(!r||!m)return 0;const o=x.get(m);return o!=null&&o.term?o.term.buffer.active.length:0},[r,m,x]),[A,n]=k.useState(Math.max(0,B-qu));k.useEffect(()=>{n(Math.max(0,B-qu))},[r,m,B]),k.useEffect(()=>{r&&requestAnimationFrame(()=>{const o=M.current;o&&(o.scrollTop=o.scrollHeight)})},[r]);const h=k.useMemo(()=>{var D;if(!r||!m)return"";const o=x.get(m);if(!(o!=null&&o.term))return"";const u=o.term.buffer.active,S=[];for(let b=A;b<u.length;b++)S.push(((D=u.getLine(b))==null?void 0:D.translateToString(!0))??"");for(;S.length>0&&S[S.length-1].trim()==="";)S.pop();return S.join(`
|
|
108
|
+
`)},[r,m,x,A]),d=B-A,p=A,l=k.useCallback(()=>{const o=M.current,u=(o==null?void 0:o.scrollHeight)??0;n(S=>Math.max(0,S-qu)),requestAnimationFrame(()=>{if(o){const S=o.scrollHeight;o.scrollTop+=S-u}})},[]),[g,C]=k.useState(!1),L=k.useRef("");k.useEffect(()=>{if(!r){L.current="",C(!1);return}const o=()=>{var S;const u=((S=window.getSelection())==null?void 0:S.toString())??"";u.length>0&&(L.current=u),C(u.length>0)};return document.addEventListener("selectionchange",o),()=>document.removeEventListener("selectionchange",o)},[r]);const _=k.useCallback(async()=>{const o=L.current||h;if(!o)return;const u=!!L.current;try{await navigator.clipboard.writeText(o),Qe.success(u?"Selection copied":"All text copied")}catch{const S=document.createElement("textarea");S.value=o,S.style.position="fixed",S.style.left="-9999px",document.body.appendChild(S),S.select(),document.execCommand("copy"),document.body.removeChild(S),Qe.success(u?"Selection copied":"All text copied")}},[h]),a=k.useCallback(()=>{var o;if(f(),m){const u=Te.getState().sessions.get(m);(o=u==null?void 0:u.term)==null||o.focus()}},[f,m]);if(k.useEffect(()=>{if(!r)return;const o=u=>{u.key==="Escape"&&a()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[r,a]),!r)return null;const c=d<B?`Copy Text (${d}/${B} lines)`:`Copy Text (${B} lines)`;return O.jsxs("div",{className:ps.overlay,"data-testid":"select-overlay",children:[O.jsxs("div",{className:ps.header,children:[O.jsx("span",{className:ps.title,children:c}),O.jsxs("div",{className:ps.actions,children:[O.jsx("button",{className:ps.btnPrimary,onClick:_,children:g?"Copy Selection":"Copy All"}),O.jsx("button",{className:ps.btnSecondary,onClick:a,"data-testid":"select-close",children:"Done"})]})]}),O.jsxs("div",{className:ps.content,ref:M,"data-testid":"select-content",children:[p>0&&O.jsxs("button",{className:ps.loadMoreBtn,onClick:l,children:["▲ Load more (",p," lines above)"]}),O.jsx("pre",{className:ps.pre,children:h})]})]})}const hE="_layout_w2cgj_1",dE="_topBar_w2cgj_12",fE="_left_w2cgj_28",_E="_right_w2cgj_37",vE="_barBtn_w2cgj_44",gE="_barBtnWithLabel_w2cgj_70",pE="_btnLabel_w2cgj_76",mE="_statusDot_w2cgj_96",bE="_statusConnected_w2cgj_106",SE="_sessionName_w2cgj_110",yE="_statusText_w2cgj_120",CE="_mobileOnly_w2cgj_127",wE="_desktopOnly_w2cgj_132",xE="_terminalArea_w2cgj_147",EE="_split_w2cgj_157",DE="_paneWrapper_w2cgj_161",LE="_visible_w2cgj_169",Nt={layout:hE,topBar:dE,left:fE,right:_E,barBtn:vE,barBtnWithLabel:gE,btnLabel:pE,statusDot:mE,statusConnected:bE,sessionName:SE,statusText:yE,mobileOnly:CE,desktopOnly:wE,terminalArea:xE,split:EE,paneWrapper:DE,visible:LE},RE=3e3;function ME(){const r=new URLSearchParams(window.location.search);return r.get("session")||r.get("id")}function AE(){const r=Te(b=>b.sessions),f=Te(b=>b.activeId),m=Te(b=>b.tabOrder),x=Te(b=>b.splitMode),M=Te(b=>b.setActiveId),B=We(b=>b.openSearchBar),A=We(b=>b.toggleCommandPalette),n=We(b=>b.closeCommandPalette),h=We(b=>b.closeSearchBar),d=We(b=>b.openSidePanel),p=We(b=>b.openNewSessionModal),l=We(b=>b.fontSize),g=k.useRef(null),C=k.useRef(!1);nC(),k.useEffect(()=>{C.current&&r.size===0&&(window.history.pushState(null,"","/"),window.dispatchEvent(new PopStateEvent("popstate")))},[r.size]);const{keyboardOpen:L,keyboardHeight:_}=lh();k.useEffect(()=>{L&&(window.scrollTo(0,0),document.documentElement.scrollTop=0)},[L]);async function a(b){const E=Te.getState();E.sessions.has(b)||E.addSession({id:b,name:b.slice(0,8),shell:"",pid:0,cwd:"",color:"#6ec1e4",createdAt:new Date().toISOString(),lastActivity:Date.now(),term:null,fitAddon:null,searchAddon:null,ws:null,send:null,connected:!1,exited:!1,scrollback:"",hasUnread:!1}),E.setActiveId(b);try{const R=(await zo()).find(N=>N.id===b);R&&(Te.getState().updateSession(b,{name:R.name,shell:R.shell,pid:R.pid,cwd:R.cwd,color:R.color??"#6ec1e4",createdAt:R.createdAt,lastActivity:R.lastActivity}),Qe.success(`Session "${R.name}" created`))}catch{}}k.useEffect(()=>{if(C.current)return;C.current=!0;async function b(){var E;try{const w=await zo(),R=Te.getState(),N=ME();for(const I of w)R.sessions.has(I.id)||R.addSession({id:I.id,name:I.name,shell:I.shell,pid:I.pid,cwd:I.cwd,color:I.color??"#6ec1e4",createdAt:I.createdAt,lastActivity:I.lastActivity,term:null,fitAddon:null,searchAddon:null,ws:null,send:null,connected:!1,exited:!1,scrollback:"",hasUnread:!1});const z=N&&Te.getState().sessions.has(N)?N:((E=w[0])==null?void 0:E.id)??null;z?Te.getState().setActiveId(z):window.location.replace("/")}catch{}}b()},[]),k.useEffect(()=>(g.current=setInterval(async()=>{try{const b=await zo(),E=Te.getState(),w=new Set(b.map(R=>R.id));for(const R of b)E.sessions.has(R.id)?E.updateSession(R.id,{name:R.name,lastActivity:R.lastActivity,cwd:R.cwd,git:R.git}):E.addSession({id:R.id,name:R.name,shell:R.shell,pid:R.pid,cwd:R.cwd,color:R.color??"#6ec1e4",createdAt:R.createdAt,lastActivity:R.lastActivity,term:null,fitAddon:null,searchAddon:null,ws:null,send:null,connected:!1,exited:!1,scrollback:"",hasUnread:!1});for(const[R,N]of E.sessions)!w.has(R)&&!N.exited&&E.removeSession(R)}catch{}},RE),()=>{g.current&&clearInterval(g.current)}),[]),k.useEffect(()=>{const b=E=>{if((E.ctrlKey||E.metaKey)&&E.key==="k"&&(E.preventDefault(),A()),(E.ctrlKey||E.metaKey)&&E.key==="f"&&(E.preventDefault(),B()),E.key==="Escape"){const w=We.getState();w.commandPaletteOpen?(E.preventDefault(),n()):w.searchBarOpen&&(E.preventDefault(),h())}};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[A,B,n,h]);const c=f?r.get(f):null,o=[...new Set(m)].filter(b=>r.has(b)),u=[];if(x&&o.length>=2&&f){u.push(f);const b=o.find(E=>E!==f);b&&u.push(b)}const S=x&&u.length===2?u:f?[f]:[],D=c?c.exited?"Exited":c.connected?"":"Connecting…":"";return O.jsxs("div",{className:Nt.layout,"data-testid":"terminal-app",style:{"--keyboard-height":`${_}px`},children:[O.jsxs("div",{className:Nt.topBar,children:[O.jsxs("div",{className:Nt.left,children:[O.jsx("button",{className:`${Nt.barBtn} ${Nt.mobileOnly}`,onClick:d,onTouchStart:b=>b.stopPropagation(),"aria-label":"Toggle panel",title:"Sessions",children:O.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),O.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),O.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),O.jsx("a",{href:"/",className:`${Nt.barBtn} ${Nt.desktopOnly}`,"aria-label":"Back",title:"Back to sessions",children:O.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:O.jsx("polyline",{points:"15 18 9 12 15 6"})})}),c&&O.jsxs(O.Fragment,{children:[O.jsx("span",{className:`${Nt.statusDot} ${c.connected?Nt.statusConnected:""} ${c.connected?"connected":"disconnected"}`,"data-testid":"status-dot"}),O.jsx("span",{className:Nt.sessionName,"data-testid":"session-name-display",children:c.name}),D&&O.jsx("span",{className:Nt.statusText,children:D})]})]}),O.jsx(F5,{inline:!0}),O.jsxs("div",{className:Nt.right,children:[O.jsxs("button",{className:`${Nt.barBtn} ${Nt.barBtnWithLabel}`,"data-testid":"tab-new-btn",onClick:()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur(),p()},onTouchStart:b=>b.stopPropagation(),"aria-label":"New tab",title:"New tab",children:[O.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:[O.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),O.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),O.jsx("span",{className:Nt.btnLabel,children:"New"})]}),O.jsx("button",{className:Nt.barBtn,onClick:A,onTouchStart:b=>b.stopPropagation(),"aria-label":"Tools",title:"Tools (Ctrl+K)","data-testid":"palette-trigger",children:O.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[O.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),O.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),O.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),O.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"})]})})]})]}),O.jsx(h2,{}),O.jsx("div",{className:`${Nt.terminalArea} ${x?Nt.split:""}`,children:o.map(b=>{const E=S.includes(b),w=b===f;return O.jsx("div",{className:`${Nt.paneWrapper} ${E?Nt.visible:""}`,onClick:()=>{w||M(b)},children:O.jsx(jC,{sessionId:b,active:w,visible:E,fontSize:l})},b)})}),O.jsx(n2,{}),O.jsx(Z2,{}),O.jsx(Rx,{}),O.jsx(Jg,{onCreated:a}),O.jsx(Jx,{}),O.jsx(eE,{}),O.jsx(uE,{})]})}function lg(){return window.location.pathname}function TE(){const r=new URLSearchParams(window.location.search),f=r.get("id");if(f&&!r.get("session")){r.set("session",f),r.delete("id");const m=`${window.location.pathname}?${r.toString()}`;window.history.replaceState(null,"",m)}}function BE(){const{authenticated:r,login:f,loading:m}=T1(),[x,M]=k.useState(lg);return k.useEffect(()=>{TE()},[x]),k.useEffect(()=>{const B=()=>M(lg());return window.addEventListener("popstate",B),()=>window.removeEventListener("popstate",B)},[]),r===null?O.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100vh",background:"var(--bg)",color:"var(--text)"},children:O.jsx("div",{className:"spinner"})}):r?x==="/terminal"?O.jsx(AE,{}):O.jsx(rC,{}):O.jsx(U1,{onLogin:f,loading:m})}X0.createRoot(document.getElementById("root")).render(O.jsxs(fe.StrictMode,{children:[O.jsx(BE,{}),O.jsx(y1,{position:"top-center",richColors:!0})]}));"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(()=>{})});
|